From 5faf4bceca3ae25f71834be42248e6772ab0747f Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Wed, 13 Mar 2024 20:00:49 -0400 Subject: [PATCH 001/172] common refactor (part 1) --- .../src/function_hooks/edge_slipoffs.rs | 282 --- .../src/function_hooks/init_settings.rs | 178 -- .../{ledges.rs => lua_bind_hook/ground.rs} | 2172 +++++++++-------- .../src/function_hooks/lua_bind_hook/mod.rs | 13 + .../motion.rs} | 190 +- .../status.rs} | 171 ++ .../{is_flag.rs => lua_bind_hook/work.rs} | 0 fighters/common/src/function_hooks/mod.rs | 23 +- 8 files changed, 1498 insertions(+), 1531 deletions(-) delete mode 100644 fighters/common/src/function_hooks/edge_slipoffs.rs delete mode 100644 fighters/common/src/function_hooks/init_settings.rs rename fighters/common/src/function_hooks/{ledges.rs => lua_bind_hook/ground.rs} (67%) create mode 100644 fighters/common/src/function_hooks/lua_bind_hook/mod.rs rename fighters/common/src/function_hooks/{change_motion.rs => lua_bind_hook/motion.rs} (97%) rename fighters/common/src/function_hooks/{change_status.rs => lua_bind_hook/status.rs} (59%) rename fighters/common/src/function_hooks/{is_flag.rs => lua_bind_hook/work.rs} (100%) diff --git a/fighters/common/src/function_hooks/edge_slipoffs.rs b/fighters/common/src/function_hooks/edge_slipoffs.rs deleted file mode 100644 index 22da3cf6a1..0000000000 --- a/fighters/common/src/function_hooks/edge_slipoffs.rs +++ /dev/null @@ -1,282 +0,0 @@ -use super::*; -use globals::*; -//================================================================= -//== init_settings for edge_slipoffs module -//== Note: This is called from init_settings::init_settings_hook -//== Note: Forces GroundModule::correct to be called for -// certain statuses -//== Note: JostleModule::set_team(boma, 0) is for walking through -// other fighters -//================================================================= -pub unsafe fn init_settings_edges(boma: &mut BattleObjectModuleAccessor, situation: smash::app::SituationKind, arg3: i32, arg4: u32, - ground_cliff_check_kind: smash::app::GroundCliffCheckKind, arg6: bool, - arg7: i32, arg8: i32, arg9: i32, arg10: i32) -> u32 { - /* "fix" forces GroundModule::correct to be called for the statuses we need */ - let mut fix = arg4; - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - - if boma.is_fighter() - && boma.is_situation(*SITUATION_KIND_GROUND) { - - if status_kind == *FIGHTER_STATUS_KIND_APPEAL { - fix = *GROUND_CORRECT_KIND_GROUND as u32; /* GROUND_CORRECT_KIND_GROUND is i32 */ - } - - if [*FIGHTER_STATUS_KIND_WAIT, - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_STATUS_KIND_TURN, - *FIGHTER_STATUS_KIND_TURN_DASH, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_WAIT, - *FIGHTER_STATUS_KIND_SQUAT_F, - *FIGHTER_STATUS_KIND_SQUAT_B, - *FIGHTER_STATUS_KIND_SQUAT_RV, - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_LANDING_LIGHT, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_GUARD_DAMAGE, - // *FIGHTER_STATUS_KIND_ESCAPE_AIR, - // *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, - *FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_AIR_LASSO_LANDING, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_DAMAGE_SONG, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, - *FIGHTER_STATUS_KIND_DOWN_DAMAGE, - *FIGHTER_STATUS_KIND_SAVING_DAMAGE].contains(&status_kind) { - fix = *GROUND_CORRECT_KIND_GROUND as u32; - } - - if (fighter_kind == *FIGHTER_KIND_EDGE && [*FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind) && StatusModule::prev_status_kind(boma, 0) != *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_CHARGED_RUSH) - || (fighter_kind == *FIGHTER_KIND_KAMUI && [*FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B_LANDING, - *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_MIIFIGHTER && [*FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_START, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_LANDING, - *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_MIISWORDSMAN && [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_END, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_SZEROSUIT && [*FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_FLIP, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_LANDING, - *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_BAYONETTA && [*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_LANDING].contains(&status_kind)) - || (fighter_kind == *FIGHTER_KIND_DOLLY && [*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_ATTACK, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_LANDING, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_LANDING, - *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind)) - || (boma.kind() == *FIGHTER_KIND_KOOPAJR && boma.is_status(*FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_SHEIK && [*FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK, - *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_LANDING].contains(&status_kind)) - || (boma.kind() == *FIGHTER_KIND_LUIGI && boma.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_HI_LANDING_FALL)) - || (boma.kind() == *FIGHTER_KIND_PIT && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PITB && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_SIMON && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) - || (boma.kind() == *FIGHTER_KIND_RICHTER && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) - || (boma.kind() == *FIGHTER_KIND_DEMON && boma.is_status(*FIGHTER_DEMON_STATUS_KIND_SPECIAL_S_LANDING)) - || (boma.kind() == *FIGHTER_KIND_RYU && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_KEN && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PACKUN && boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_KROOL && boma.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_PIKMIN && boma.is_status(*FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_FALCO && boma.is_status(*FIGHTER_FALCO_STATUS_KIND_SPECIAL_S_FALL_LANDING)) - || (boma.kind() == *FIGHTER_KIND_MURABITO && boma.is_status(*FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_LANDING)) - || (boma.kind() == *FIGHTER_KIND_NESS && boma.is_status(*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END)) - || (boma.kind() == *FIGHTER_KIND_LUCAS && boma.is_status(*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END)) - { - fix = *GROUND_CORRECT_KIND_GROUND as u32; - } - } - return fix -} - -//================================================================= -//== GroundModule::correct -//== Note: This is the "can edge slippoff" function in Smash -//================================================================= -#[skyline::hook(replace=GroundModule::correct)] -unsafe fn correct_hook(boma: &mut BattleObjectModuleAccessor, kind: GroundCorrectKind) -> u64 { - - // don't run if boma is not fighter or grounded - if !boma.is_fighter() || !boma.is_situation(*SITUATION_KIND_GROUND) { - return original!()(boma, kind); - } - - let status_kind = StatusModule::status_kind(boma); - if [ - // common statuses that should edge slipoff - *FIGHTER_STATUS_KIND_LANDING, - *FIGHTER_STATUS_KIND_TURN_DASH, - *FIGHTER_STATUS_KIND_DASH, - *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE, - *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, - *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, - *FIGHTER_STATUS_KIND_DAMAGE_SONG, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, - *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, - *FIGHTER_STATUS_KIND_DOWN_DAMAGE, - *FIGHTER_STATUS_KIND_SAVING_DAMAGE - ].contains(&status_kind) - || check_fighter_edge_slipoffs(boma).get_bool() { - return original!()(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - } - - original!()(boma, kind) -} - -unsafe fn check_fighter_edge_slipoffs(boma: &mut BattleObjectModuleAccessor) -> L2CValue { - let status_kind = StatusModule::status_kind(boma); - let fighter_kind = boma.kind(); - - // PIKACHU & PICHU - if (fighter_kind == *FIGHTER_KIND_PIKACHU || fighter_kind == *FIGHTER_KIND_PICHU) - && [ - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_WEAK, - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK, - *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_END - ].contains(&status_kind) { - return true.into(); - } - - // CAPTAIN FALCON - if fighter_kind == *FIGHTER_KIND_CAPTAIN && status_kind == *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END { return true.into(); } - - // GANONDORF - if (fighter_kind == *FIGHTER_KIND_GANON && status_kind == *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END) { return true.into(); } - - // MII SWORDFIGHTER - if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN - && ( - [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END].contains(&status_kind) - || ( - WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO) == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_3 - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) - ) - ) { - return true.into(); - } - - // BOWSER - if (fighter_kind == *FIGHTER_KIND_KOOPA && status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G) { return true.into(); } - - // DONKEY KONG - if (fighter_kind == *FIGHTER_KIND_DONKEY && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } - - // GAOGAEN - if (fighter_kind == *FIGHTER_KIND_GAOGAEN && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } - if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { return true.into(); } - - // LUIGI - if (fighter_kind == *FIGHTER_KIND_LUIGI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } - if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N) { return true.into(); } - - // PEACH - if (fighter_kind == *FIGHTER_KIND_PEACH && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } - - // DAISY - if (fighter_kind == *FIGHTER_KIND_DAISY && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } - - // SEPHIROTH - if (fighter_kind == *FIGHTER_KIND_EDGE && status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH) { return true.into(); } - - // YOSHI - if (fighter_kind == *FIGHTER_KIND_YOSHI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } - - // PAC-MAN - if (fighter_kind == *FIGHTER_KIND_PACMAN && status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN) { return true.into(); } - - // SORA - if (fighter_kind == *FIGHTER_KIND_TRAIL && status_kind == *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END) { return true.into(); } - - // CHARIZARD - if (fighter_kind == *FIGHTER_KIND_PLIZARDON && status_kind == *FIGHTER_PLIZARDON_STATUS_KIND_SPECIAL_S_END) { return true.into(); } - - //KING DEDEDE - if fighter_kind == *FIGHTER_KIND_DEDEDE - && [ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE - ].contains(&status_kind){ - return true.into(); - } - - // FOX - if fighter_kind == *FIGHTER_KIND_FOX - && [ - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_HIT, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_END - ].contains(&status_kind) { - return true.into(); - } - - // WOLF - if fighter_kind == *FIGHTER_KIND_WOLF - && [ - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_HIT, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_END - ].contains(&status_kind) { - return true.into(); - } - - // NESS - if fighter_kind == *FIGHTER_KIND_NESS - && [ - *FIGHTER_STATUS_KIND_SPECIAL_HI, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, - *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END - ].contains(&status_kind) { - return true.into(); - } - - // LUCAS - if fighter_kind == *FIGHTER_KIND_LUCAS - && [ - *FIGHTER_STATUS_KIND_SPECIAL_HI, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, - *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END - ].contains(&status_kind) { - return true.into(); - } - - return false.into(); -} - -extern "C" { - #[link_name = "\u{1}_ZN3app11FighterUtil33get_ground_correct_kind_air_transERNS_26BattleObjectModuleAccessorEi"] - fn get_ground_correct_kind_air_trans(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32; -} - -//================================================================= -//== FighterUtil::get_ground_correct_kind_air_trans -//== Note: Aerial ECB fixes for Link, Captain, Simon, Richter -//================================================================= -#[skyline::hook(replace=get_ground_correct_kind_air_trans)] -unsafe fn get_ground_correct_kind_air_trans_hook(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32 { - return *GROUND_CORRECT_KIND_AIR; -} - -pub fn install() { - skyline::install_hooks!( - correct_hook, - get_ground_correct_kind_air_trans_hook, - ); -} diff --git a/fighters/common/src/function_hooks/init_settings.rs b/fighters/common/src/function_hooks/init_settings.rs deleted file mode 100644 index 8b94f475c2..0000000000 --- a/fighters/common/src/function_hooks/init_settings.rs +++ /dev/null @@ -1,178 +0,0 @@ -use super::*; -use globals::*; - -//================================================================= -//== StatusModule::init_settings -//================================================================= -#[skyline::hook(replace=StatusModule::init_settings)] -unsafe fn init_settings_hook(boma: &mut BattleObjectModuleAccessor, mut situation: smash::app::SituationKind, kinetic_type: i32, arg4: u32, - ground_cliff_check_kind: smash::app::GroundCliffCheckKind, jostle: bool, - keep_flag: i32, keep_int: i32, keep_float: i32, arg10: i32) -> u64 { - let id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - let situation_kind = StatusModule::situation_kind(boma); - let mut cliff_check_kind = ground_cliff_check_kind; - let mut kinetic_type = kinetic_type.clone(); - - // Call edge_slippoffs init_settings - let fix = super::edge_slipoffs::init_settings_edges(boma, situation, kinetic_type, arg4, ground_cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10); - - if boma.is_fighter() { - - if boma.is_prev_situation(*SITUATION_KIND_AIR) - && ( situation.0 == *SITUATION_KIND_GROUND - || (boma.is_situation(*SITUATION_KIND_GROUND) && situation.0 == *SITUATION_KIND_NONE) ) - { - if kinetic_type == *FIGHTER_KINETIC_TYPE_MOTION { - kinetic_type = *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL; - } - } - // Resets your airtime counter when leaving the below statuses - // Prevents ECB from shifting on f1 after an "ignored" status (those defined below) - if boma.is_prev_status_one_of(&[ - *FIGHTER_STATUS_KIND_DEMO, - *FIGHTER_STATUS_KIND_ENTRY, - *FIGHTER_STATUS_KIND_CAPTURE_PULLED, - *FIGHTER_STATUS_KIND_CAPTURE_WAIT, - *FIGHTER_STATUS_KIND_CAPTURE_DAMAGE, - *FIGHTER_STATUS_KIND_THROWN, - *FIGHTER_STATUS_KIND_CATCHED_GANON, - *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, - *FIGHTER_STATUS_KIND_CATCHED_REFLET, - *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, - *FIGHTER_STATUS_KIND_CAPTURE_JACK_WIRE, - *FIGHTER_STATUS_KIND_CAPTURE_MASTER_SWORD]) - && situation.0 == *SITUATION_KIND_AIR - { - WorkModule::set_int(boma, 0, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR); - } - - // Walk through other fighters - JostleModule::set_team(boma, 0); - - // clear platform drop input when entering airdodge (to avoid buffering waveland platdrop with the same down input as the actual waveland) - // if [*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT].contains(&status_kind) { - // ControlModule::reset_flick_y(boma); - // // VarModule::off_flag(boma.object(), vars::common::instance::ENABLE_WAVELAND_PLATDROP); - // } - - if boma.is_prev_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT]) - && boma.is_status(*FIGHTER_STATUS_KIND_LANDING) - && GroundModule::is_passable_ground(boma) { - ControlModule::reset_flick_y(boma); - } - - // Occupy ledge on ledgegrab - if boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_CLIFF_CATCH, - *FIGHTER_STATUS_KIND_CLIFF_CATCH_MOVE, - *FIGHTER_STATUS_KIND_CLIFF_WAIT] - ) { - let cliff_id = GroundModule::get_cliff_id_uint32(boma); - VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, cliff_id as i32); - } - - // heavy item pickup should keep momentum and be affected by gravity in the air - if boma.is_status(*FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP) && boma.is_situation(*SITUATION_KIND_AIR) { - // change the kinetic type to the regular air type - kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; - situation.0 = *SITUATION_KIND_NONE; - } - - if boma.kind() == *FIGHTER_KIND_DONKEY && boma.is_situation(*SITUATION_KIND_AIR) - && boma.is_status_one_of(&[ - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_START, - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_WAIT, - *FIGHTER_STATUS_KIND_THROW,]) { - kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; - situation.0 = *SITUATION_KIND_NONE; - } - - // Repeated tilt scaling; UNUSED - /* - if [*FIGHTER_KIND_RYU, *FIGHTER_KIND_KEN, *FIGHTER_KIND_DOLLY].contains(&fighter_kind) { - VarModule::off_flag(boma.object(), vars::common::status::REPEAT_INCREMENTED); - if status_kind != *FIGHTER_STATUS_KIND_ATTACK_HI3 { - if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_HI) > 0 { - VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_HI, 0); - } - } - if ![*FIGHTER_STATUS_KIND_ATTACK_LW3, - *FIGHTER_STATUS_KIND_SQUAT, - *FIGHTER_STATUS_KIND_SQUAT_WAIT].contains(&status_kind) { - if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_LW) > 0 { - VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_LW, 0); - } - } - } - */ - - //Sword trails - if (boma.kind() == *FIGHTER_KIND_ROY || boma.kind() == *FIGHTER_KIND_CHROM) - && VarModule::is_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT) { - EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); - if fighter_kind == *FIGHTER_KIND_ROY { - EffectModule::req_follow(boma, Hash40::new("roy_fire_small"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); - } - else if fighter_kind == *FIGHTER_KIND_CHROM { - EffectModule::req_follow(boma, Hash40::new("chrom_sword"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); - } - - if [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) { - VarModule::off_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT); - EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); - } - } - - // Set GroundCliffCheckKind here to pass into init_settings - - if ((boma.kind() == *FIGHTER_KIND_RYU || boma.kind() == *FIGHTER_KIND_KEN) - && boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END])) - || (boma.kind() == *FIGHTER_KIND_FALCO - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - || (boma.kind() == *FIGHTER_KIND_REFLET - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - || (boma.kind() == *FIGHTER_KIND_WOLF - && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) - { - cliff_check_kind = app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - - if boma.is_prev_status(*FIGHTER_STATUS_KIND_SWALLOWED_DRINK) { - VisibilityModule::set_whole(boma, true); - } - } - - // VarModule Status Variable reset checks - // This makes the assumption that if the KEEP_FLAG is not NONE, you want to clear the - // status variable array for that data type. Because Smash shares its space between - // INT and INT64, I have included both of them under a single check. - let object = boma.object(); - if VarModule::has_var_module(object) { - let mut mask = 0; - if keep_flag != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG { - mask += VarModule::RESET_STATUS_FLAG; - } - if keep_int != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT { - mask += VarModule::RESET_STATUS_INT; - mask += VarModule::RESET_STATUS_INT64; - } - if keep_float != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT { - mask += VarModule::RESET_STATUS_FLOAT; - } - VarModule::reset(object, mask); - } - - original!()(boma, situation, kinetic_type, fix, cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10) -} - -pub fn install() { - skyline::install_hooks!( - init_settings_hook, - ); -} diff --git a/fighters/common/src/function_hooks/ledges.rs b/fighters/common/src/function_hooks/lua_bind_hook/ground.rs similarity index 67% rename from fighters/common/src/function_hooks/ledges.rs rename to fighters/common/src/function_hooks/lua_bind_hook/ground.rs index 89ffc45373..02ce71d030 100644 --- a/fighters/common/src/function_hooks/ledges.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/ground.rs @@ -1,959 +1,1213 @@ -use super::*; -use globals::*; - -//================================================================= -//== GroundModule::entry_cliff -//== Note: Ledge occupancy handled by sys_line::ledges::occupy_ledge() -//================================================================= -#[skyline::hook(replace=GroundModule::entry_cliff)] -unsafe fn entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64{ - //println!("Grabbing ledge... player number: {}", WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize;); - //println!("Current status kind: {}", StatusModule::status_kind(boma)); - //println!("Previous status kind: {}", StatusModule::prev_status_kind(boma, 0)); - original!()(boma) -} - -//================================================================= -//== GroundModule::can_entry_cliff -//== Note: Handles ledgehogging, fighter-specific ledge entry, -// and disallows rising ledge grabs (for non-specials) -//================================================================= -#[skyline::hook(replace=GroundModule::can_entry_cliff)] -unsafe fn can_entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { - let situation_kind = StatusModule::situation_kind(boma); - let status_kind = StatusModule::status_kind(boma); - let fighter_kind = boma.kind(); - - let rising: f32 = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Rising while jumping/airdodging - - let tether_zair = boma.is_fighter() - && [*FIGHTER_KIND_LUCAS, *FIGHTER_KIND_YOUNGLINK, *FIGHTER_KIND_TOONLINK, *FIGHTER_KIND_SAMUS, *FIGHTER_KIND_SAMUSD, *FIGHTER_KIND_SZEROSUIT].contains(&fighter_kind) - && [*FIGHTER_STATUS_KIND_AIR_LASSO, *FIGHTER_STATUS_KIND_AIR_LASSO_REACH, *FIGHTER_STATUS_KIND_AIR_LASSO_HANG, *FIGHTER_STATUS_KIND_AIR_LASSO_REWIND].contains(&status_kind); - - let tether_special = boma.is_fighter() - && ( (fighter_kind == *FIGHTER_KIND_SZEROSUIT && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) - || (fighter_kind == *FIGHTER_KIND_SHIZUE && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) - || (fighter_kind == *FIGHTER_KIND_TANTAN && (status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)) - || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) - || (fighter_kind == *FIGHTER_KIND_JACK && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) - || (fighter_kind == *FIGHTER_KIND_PFUSHIGISOU && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); - - let tether_aerial = boma.is_fighter() - && ( (fighter_kind == *FIGHTER_KIND_SIMON && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) - || (fighter_kind == *FIGHTER_KIND_RICHTER && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) - || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); - - // Ledgehog code - let cliff_id = GroundModule::get_cliff_id_uint32(boma); - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as u32; - for object_id in util::get_all_active_battle_object_ids() { - let object = ::utils::util::get_battle_object_from_id(object_id); - if !object.is_null() { - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) == WorkModule::get_int(&mut *(*object).module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) { - continue; - } - - if VarModule::get_int(object, vars::common::instance::LEDGE_ID) == cliff_id as i32 { - if !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { - return 0; - } - } - } - } - - if boma.is_fighter() { - // Character specific ledge grabbing rules - // If check_cliff_entry_specializer returns 0, disable ledge grabbing - // If check_cliff_entry_specializer returns 1, run the rising check - // Otherwise (-1 returned) skip the rise check and let the vanilla behavior take place - if check_cliff_entry_specializer(boma) == 0 { - return 0; - } - else if check_cliff_entry_specializer(boma) == 1 { - // Disable grabbing ledge while rising during an airborne state (not specials) - if situation_kind == *SITUATION_KIND_AIR { - if rising >= 0.0 && !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { - return 0; - } - } - } - - // Unable to grab ledge during runfall/walkfall (the first few frames after you run off an edge) - if boma.is_motion_one_of(&[Hash40::new("run_fall_l"), Hash40::new("run_fall_r"), Hash40::new("walk_fall_l"), Hash40::new("walk_fall_r")]) { - return 0; - } - } - - original!()(boma) -} - -//================================================================= -//== GroundModule::leave_cliff -//== Note: Resets ledge occupancy -//================================================================= -#[skyline::hook(replace=GroundModule::leave_cliff)] -unsafe fn leave_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { - VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, -1); - original!()(boma) -} - -pub fn install() { - //skyline::install_hook!(entry_cliff_hook); - skyline::install_hook!(can_entry_cliff_hook); - //skyline::install_hook!(leave_cliff_hook); -} - -//================================================================= -//== GroundModule::can_entry_cliff specializer -//================================================================= -unsafe fn check_cliff_entry_specializer(boma: &mut BattleObjectModuleAccessor) -> i32 { - let fighter_kind = boma.kind(); - let status_kind = StatusModule::status_kind(boma); - let motion_kind = MotionModule::motion_kind(boma); - let prev_status_kind = StatusModule::prev_status_kind(boma, 0); - let prev_status_kind_2 = StatusModule::prev_status_kind(boma, 1); - let frame = MotionModule::frame(boma); - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - - if fighter_kind == *FIGHTER_KIND_MARIO { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DONKEY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 65.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LINK { - if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END]) { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SAMUS || fighter_kind == *FIGHTER_KIND_SAMUSD { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 35.0 { - return 0; - } - } - } - - // Yoshi: Unchanged - - // Kirby: Unchanged - - if fighter_kind == *FIGHTER_KIND_FOX { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 5.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 8.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_PIKACHU { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { - return 1; - } - /* - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { - if frame < 39.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LUIGI { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 31.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_NESS { - if status_kind == *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK { - /* - if frame > 5.0 && frame < 15.0 { - return 1; - } - else{ - return -1; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_CAPTAIN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 41.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - if frame < 34.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PEACH || fighter_kind == *FIGHTER_KIND_DAISY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 24.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { - if frame < 20.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KOOPA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A { - if prev_status_kind != *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { - if frame < 37.0 { - return 1; - } - } - else { - return 1; - } - } - } - - // Ice Climbers - if [*FIGHTER_KIND_ICE_CLIMBER, *FIGHTER_KIND_POPO, *FIGHTER_KIND_NANA].contains(&fighter_kind) { - if [*FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PRE, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_PULL_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP].contains(&status_kind) { - return -1; - } - if status_kind == *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_FAIL { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_SHEIK { - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_MOVE { - return 1; - } - - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 1; - } - } - - if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK || status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN { - if frame < 17.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ZELDA { - if status_kind == *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_MARIOD { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PICHU { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { - return 1; - } - /* - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - - if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { - if frame < 39.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_FALCO { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 5.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 8.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MARTH || fighter_kind == *FIGHTER_KIND_LUCINA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 20.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_YOUNGLINK { - if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GANON { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 39.0 { - return 0; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 42.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MEWTWO { - if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - - if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_3 { - if frame < 6.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROY { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_2 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_3 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_4 { - if frame < 35.0 { - return 0; - } - } - } - - // Chrom: Unchanged - - if fighter_kind == *FIGHTER_KIND_GAMEWATCH { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 22.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_METAKNIGHT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_HI_LOOP { - if frame < 28.0 { - return 0; - } - } - - if status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_RUSH { - if frame < 50.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PIT || fighter_kind == *FIGHTER_KIND_PITB { - if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH { - return 0; - } - if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SZEROSUIT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 30.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WARIO { - if status_kind == *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 35.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SNAKE { - if status_kind == *FIGHTER_SNAKE_STATUS_KIND_SPECIAL_HI_HANG { - //if frame < 60.0 { - return 0; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_IKE { - if status_kind == *FIGHTER_IKE_STATUS_KIND_SPECIAL_S_DASH { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_PZENIGAME { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_PLIZARDON { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 38.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DIDDY { - /* - if status_kind == *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER { - if frame < 28.0 { - return 0; - } - } - */ - } - - if fighter_kind == *FIGHTER_KIND_LUCAS { - if status_kind == *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK { - /* - if frame > 5.0 && frame < 15.0 { - return 1; - } - else{ - return -1; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_SONIC { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 0; - } - if status_kind == *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 23.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_DEDEDE { - if status_kind == *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 25.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PIKMIN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT { - return 0; - } - } - - if fighter_kind == *FIGHTER_KIND_LUCARIO { - if status_kind == *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH { - if frame < 17.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROBOT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_TOONLINK { - if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 42.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WOLF { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_RUSH { - return 1; - } - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 11.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_MURABITO { - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { - return 0; - } - - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROCKMAN { - if status_kind == *FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 28.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_WIIFIT { - if status_kind == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP { - return 0; - } - if prev_status_kind_2 == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP && status_kind == *FIGHTER_STATUS_KIND_FALL_SPECIAL { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_ROSETTA { - if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_JUMP { - return 0; - } - if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END { - if frame < 10.0 { - return 0; - } - } - } - - if fighter_kind == *FIGHTER_KIND_LITTLEMAC { - if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 30.0 { - return 0; - } - } - - if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW { - if frame < 11.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GEKKOUGA { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_LOOP { - return 1; - } - /* - if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_END { - if frame < 6.0 { - return 0; - } - } - */ - } - - if fighter_kind == *FIGHTER_KIND_PALUTENA { - if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_2 { - return 1; - } - if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_3 { - if frame < 6.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_PACMAN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_HI_LOOP { - if frame < 25.0 { - return 1; - } - } - if motion_kind == hash40("special_s_move") || motion_kind == hash40("special_s_dash") { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_REFLET { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 9.0 { - return 0; - } - else { - return 1; - } - } - if status_kind == *FIGHTER_REFLET_STATUS_KIND_SPECIAL_HI_2 { - if frame < 40.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SHULK { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 28.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KOOPAJR { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_SHOOT { - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_DUCKHUNT { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY { - //if frame < 60.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_RYU || fighter_kind == *FIGHTER_KIND_KEN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 25.0 { - return 1; - } - } - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND].contains(&status_kind) { - return 1; - } - } - - // Cloud - if fighter_kind == *FIGHTER_KIND_CLOUD { - if motion_kind == hash40("special_hi") || motion_kind == hash40("special_air_hi") { - /* - if frame > 11.0 && frame < 18.0 { - return 0; - } - */ - return 1; - } - } - - if fighter_kind == *FIGHTER_KIND_KAMUI { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 45.0 { - return 1; - } - } - } - - // Bayonetta: Unchanged - - if fighter_kind == *FIGHTER_KIND_INKLING { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_JUMP { - return 1; - } - - if status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_ROT { - if frame < 15.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_RIDLEY { - if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_F || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_B || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_HI /*|| status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_LW*/ { - return 0; - } - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE { - //if frame < 39.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_SIMON || fighter_kind == *FIGHTER_KIND_RICHTER { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 31.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_KROOL { - if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 0; - //} - } - - if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { - if frame < 14.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_SHIZUE { - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { - return 1; - } - - if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 10.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_GAOGAEN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 1; - } - - if status_kind == *FIGHTER_GAOGAEN_STATUS_KIND_SPECIAL_HI_TURN { - if frame < 4.0 { - return 1; - } - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { - //if frame < 41.0 { - return 1; - //} - } - } - - if fighter_kind == *FIGHTER_KIND_PACKUN { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - //if frame < 60.0 { - return 1; - //} - } - - if status_kind == *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END { - if frame < 14.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_JACK { - if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH { - return 1; - } - - if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_END { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_BRAVE { - if status_kind == *FIGHTER_BRAVE_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 33.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIIFIGHTER { - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_2 || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_3 { - if frame < 26.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_ATTACK { - return 1; - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_END { - if frame < 47.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_WEAK { - return 1; - } - - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - if frame < 33.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN { - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_JUMP { - if frame < 23.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_WEAK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK { - if frame < 42.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH { - return 1; - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - return 1; - } - - if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - if frame < 41.0 { - return 0; - } - } - else { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_MIIGUNNER { - if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { - return 1; - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI2_JUMP { - if frame < 35.0 { - return 1; - } - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH { - return 1; - } - - if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH_END { - if frame < 7.0 { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_BUDDY { - - if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 32.0 { - return 1; - } - } - - if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH { - return 1; - } - } - - if(fighter_kind == *FIGHTER_KIND_PICKEL){ - if(status_kind == *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_GLIDING){ - if VarModule::get_float(boma.object(), vars::pickel::status::GLIDE_TIMER) < 40.0 /*40 frames of up b travel time*/ { - return 1; - } - } - } - - if fighter_kind == *FIGHTER_KIND_EFLAME { - if status_kind == *FIGHTER_EFLAME_STATUS_KIND_SPECIAL_HI_JUMP { - if frame < 3.0 { - return 0; - } - } - } - - // General fighter check stuff - if status_kind == *FIGHTER_STATUS_KIND_ESCAPE_AIR{ - return -1; - } - - 1 -} +use super::*; +use globals::*; + +//================================================================= +//== init_settings for edge_slipoffs module +//== Note: This is called from init_settings::init_settings_hook +//== Note: Forces GroundModule::correct to be called for +// certain statuses +//== Note: JostleModule::set_team(boma, 0) is for walking through +// other fighters +//================================================================= +pub unsafe fn init_settings_edges(boma: &mut BattleObjectModuleAccessor, situation: smash::app::SituationKind, arg3: i32, arg4: u32, + ground_cliff_check_kind: smash::app::GroundCliffCheckKind, arg6: bool, + arg7: i32, arg8: i32, arg9: i32, arg10: i32) -> u32 { + /* "fix" forces GroundModule::correct to be called for the statuses we need */ + let mut fix = arg4; + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + + if boma.is_fighter() + && boma.is_situation(*SITUATION_KIND_GROUND) { + + if status_kind == *FIGHTER_STATUS_KIND_APPEAL { + fix = *GROUND_CORRECT_KIND_GROUND as u32; /* GROUND_CORRECT_KIND_GROUND is i32 */ + } + + if [*FIGHTER_STATUS_KIND_WAIT, + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_STATUS_KIND_TURN, + *FIGHTER_STATUS_KIND_TURN_DASH, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_WAIT, + *FIGHTER_STATUS_KIND_SQUAT_F, + *FIGHTER_STATUS_KIND_SQUAT_B, + *FIGHTER_STATUS_KIND_SQUAT_RV, + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_LANDING_LIGHT, + *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_GUARD_DAMAGE, + // *FIGHTER_STATUS_KIND_ESCAPE_AIR, + // *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, + *FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_AIR_LASSO_LANDING, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_DAMAGE_SONG, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, + *FIGHTER_STATUS_KIND_DOWN_DAMAGE, + *FIGHTER_STATUS_KIND_SAVING_DAMAGE].contains(&status_kind) { + fix = *GROUND_CORRECT_KIND_GROUND as u32; + } + + if (fighter_kind == *FIGHTER_KIND_EDGE && [*FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind) && StatusModule::prev_status_kind(boma, 0) != *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_CHARGED_RUSH) + || (fighter_kind == *FIGHTER_KIND_KAMUI && [*FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_B_LANDING, + *FIGHTER_KAMUI_STATUS_KIND_SPECIAL_S_WALL_ATTACK_F_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_MIIFIGHTER && [*FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_START, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW2_KICK_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_LANDING, + *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_MIISWORDSMAN && [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_END, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_SZEROSUIT && [*FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_FLIP, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_LANDING, + *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_LW_KICK_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_BAYONETTA && [*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, + *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_LANDING].contains(&status_kind)) + || (fighter_kind == *FIGHTER_KIND_DOLLY && [*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_ATTACK, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_LW_LANDING, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_LANDING, + *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_LANDING].contains(&status_kind)) + || (boma.kind() == *FIGHTER_KIND_KOOPAJR && boma.is_status(*FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_SHEIK && [*FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK, + *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_LANDING].contains(&status_kind)) + || (boma.kind() == *FIGHTER_KIND_LUIGI && boma.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_HI_LANDING_FALL)) + || (boma.kind() == *FIGHTER_KIND_PIT && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PITB && boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_SIMON && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) + || (boma.kind() == *FIGHTER_KIND_RICHTER && boma.is_status(*FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING)) + || (boma.kind() == *FIGHTER_KIND_DEMON && boma.is_status(*FIGHTER_DEMON_STATUS_KIND_SPECIAL_S_LANDING)) + || (boma.kind() == *FIGHTER_KIND_RYU && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_KEN && boma.is_status(*FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PACKUN && boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_KROOL && boma.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_PIKMIN && boma.is_status(*FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_FALCO && boma.is_status(*FIGHTER_FALCO_STATUS_KIND_SPECIAL_S_FALL_LANDING)) + || (boma.kind() == *FIGHTER_KIND_MURABITO && boma.is_status(*FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_LANDING)) + || (boma.kind() == *FIGHTER_KIND_NESS && boma.is_status(*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END)) + || (boma.kind() == *FIGHTER_KIND_LUCAS && boma.is_status(*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END)) + { + fix = *GROUND_CORRECT_KIND_GROUND as u32; + } + } + return fix +} + +//================================================================= +//== GroundModule::correct +//== Note: This is the "can edge slippoff" function in Smash +//================================================================= +#[skyline::hook(replace=GroundModule::correct)] +unsafe fn correct_hook(boma: &mut BattleObjectModuleAccessor, kind: GroundCorrectKind) -> u64 { + + // don't run if boma is not fighter or grounded + if !boma.is_fighter() || !boma.is_situation(*SITUATION_KIND_GROUND) { + return original!()(boma, kind); + } + + let status_kind = StatusModule::status_kind(boma); + if [ + // common statuses that should edge slipoff + *FIGHTER_STATUS_KIND_LANDING, + *FIGHTER_STATUS_KIND_TURN_DASH, + *FIGHTER_STATUS_KIND_DASH, + *FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE, + *FIGHTER_STATUS_KIND_TREAD_DAMAGE_RV, + *FIGHTER_STATUS_KIND_LANDING_DAMAGE_LIGHT, + *FIGHTER_STATUS_KIND_DAMAGE_SONG, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_START, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP, + *FIGHTER_STATUS_KIND_DAMAGE_SLEEP_END, + *FIGHTER_STATUS_KIND_DOWN_DAMAGE, + *FIGHTER_STATUS_KIND_SAVING_DAMAGE + ].contains(&status_kind) + || check_fighter_edge_slipoffs(boma).get_bool() { + return original!()(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + } + + original!()(boma, kind) +} + +unsafe fn check_fighter_edge_slipoffs(boma: &mut BattleObjectModuleAccessor) -> L2CValue { + let status_kind = StatusModule::status_kind(boma); + let fighter_kind = boma.kind(); + + // PIKACHU & PICHU + if (fighter_kind == *FIGHTER_KIND_PIKACHU || fighter_kind == *FIGHTER_KIND_PICHU) + && [ + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_WEAK, + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK, + *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_END + ].contains(&status_kind) { + return true.into(); + } + + // CAPTAIN FALCON + if fighter_kind == *FIGHTER_KIND_CAPTAIN && status_kind == *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END { return true.into(); } + + // GANONDORF + if (fighter_kind == *FIGHTER_KIND_GANON && status_kind == *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END) { return true.into(); } + + // MII SWORDFIGHTER + if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN + && ( + [*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END].contains(&status_kind) + || ( + WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO) == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_3 + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) + ) + ) { + return true.into(); + } + + // BOWSER + if (fighter_kind == *FIGHTER_KIND_KOOPA && status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G) { return true.into(); } + + // DONKEY KONG + if (fighter_kind == *FIGHTER_KIND_DONKEY && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } + + // GAOGAEN + if (fighter_kind == *FIGHTER_KIND_GAOGAEN && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } + if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { return true.into(); } + + // LUIGI + if (fighter_kind == *FIGHTER_KIND_LUIGI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N) { return true.into(); } + if (fighter_kind == *FIGHTER_KIND_KIRBY && status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N) { return true.into(); } + + // PEACH + if (fighter_kind == *FIGHTER_KIND_PEACH && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } + + // DAISY + if (fighter_kind == *FIGHTER_KIND_DAISY && status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_AWAY_END) { return true.into(); } + + // SEPHIROTH + if (fighter_kind == *FIGHTER_KIND_EDGE && status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH) { return true.into(); } + + // YOSHI + if (fighter_kind == *FIGHTER_KIND_YOSHI && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) { return true.into(); } + + // PAC-MAN + if (fighter_kind == *FIGHTER_KIND_PACMAN && status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN) { return true.into(); } + + // SORA + if (fighter_kind == *FIGHTER_KIND_TRAIL && status_kind == *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END) { return true.into(); } + + // CHARIZARD + if (fighter_kind == *FIGHTER_KIND_PLIZARDON && status_kind == *FIGHTER_PLIZARDON_STATUS_KIND_SPECIAL_S_END) { return true.into(); } + + //KING DEDEDE + if fighter_kind == *FIGHTER_KIND_DEDEDE + && [ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE + ].contains(&status_kind){ + return true.into(); + } + + // FOX + if fighter_kind == *FIGHTER_KIND_FOX + && [ + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_HIT, + *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_END + ].contains(&status_kind) { + return true.into(); + } + + // WOLF + if fighter_kind == *FIGHTER_KIND_WOLF + && [ + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_HIT, + *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_END + ].contains(&status_kind) { + return true.into(); + } + + // NESS + if fighter_kind == *FIGHTER_KIND_NESS + && [ + *FIGHTER_STATUS_KIND_SPECIAL_HI, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, + *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END + ].contains(&status_kind) { + return true.into(); + } + + // LUCAS + if fighter_kind == *FIGHTER_KIND_LUCAS + && [ + *FIGHTER_STATUS_KIND_SPECIAL_HI, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, + *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END + ].contains(&status_kind) { + return true.into(); + } + + return false.into(); +} + +extern "C" { + #[link_name = "\u{1}_ZN3app11FighterUtil33get_ground_correct_kind_air_transERNS_26BattleObjectModuleAccessorEi"] + fn get_ground_correct_kind_air_trans(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32; +} + +//================================================================= +//== FighterUtil::get_ground_correct_kind_air_trans +//== Note: Aerial ECB fixes for Link, Captain, Simon, Richter +//================================================================= +#[skyline::hook(replace=get_ground_correct_kind_air_trans)] +unsafe fn get_ground_correct_kind_air_trans_hook(boma: &mut BattleObjectModuleAccessor, something: i32) -> i32 { + return *GROUND_CORRECT_KIND_AIR; +} + +//================================================================= +//== GroundModule::can_entry_cliff +//== Note: Handles ledgehogging, fighter-specific ledge entry, +// and disallows rising ledge grabs (for non-specials) +//================================================================= +#[skyline::hook(replace=GroundModule::can_entry_cliff)] +unsafe fn can_entry_cliff_hook(boma: &mut BattleObjectModuleAccessor) -> u64 { + let situation_kind = StatusModule::situation_kind(boma); + let status_kind = StatusModule::status_kind(boma); + let fighter_kind = boma.kind(); + + let rising: f32 = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Rising while jumping/airdodging + + let tether_zair = boma.is_fighter() + && [*FIGHTER_KIND_LUCAS, *FIGHTER_KIND_YOUNGLINK, *FIGHTER_KIND_TOONLINK, *FIGHTER_KIND_SAMUS, *FIGHTER_KIND_SAMUSD, *FIGHTER_KIND_SZEROSUIT].contains(&fighter_kind) + && [*FIGHTER_STATUS_KIND_AIR_LASSO, *FIGHTER_STATUS_KIND_AIR_LASSO_REACH, *FIGHTER_STATUS_KIND_AIR_LASSO_HANG, *FIGHTER_STATUS_KIND_AIR_LASSO_REWIND].contains(&status_kind); + + let tether_special = boma.is_fighter() + && ( (fighter_kind == *FIGHTER_KIND_SZEROSUIT && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) + || (fighter_kind == *FIGHTER_KIND_SHIZUE && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S) + || (fighter_kind == *FIGHTER_KIND_TANTAN && (status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)) + || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) + || (fighter_kind == *FIGHTER_KIND_JACK && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) + || (fighter_kind == *FIGHTER_KIND_PFUSHIGISOU && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); + + let tether_aerial = boma.is_fighter() + && ( (fighter_kind == *FIGHTER_KIND_SIMON && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) + || (fighter_kind == *FIGHTER_KIND_RICHTER && status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR) + || (fighter_kind == *FIGHTER_KIND_MASTER && status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI) ); + + // Ledgehog code + let cliff_id = GroundModule::get_cliff_id_uint32(boma); + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as u32; + for object_id in util::get_all_active_battle_object_ids() { + let object = ::utils::util::get_battle_object_from_id(object_id); + if !object.is_null() { + if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) == WorkModule::get_int(&mut *(*object).module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) { + continue; + } + + if VarModule::get_int(object, vars::common::instance::LEDGE_ID) == cliff_id as i32 { + if !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { + return 0; + } + } + } + } + + if boma.is_fighter() { + // Character specific ledge grabbing rules + // If check_cliff_entry_specializer returns 0, disable ledge grabbing + // If check_cliff_entry_specializer returns 1, run the rising check + // Otherwise (-1 returned) skip the rise check and let the vanilla behavior take place + if check_cliff_entry_specializer(boma) == 0 { + return 0; + } + else if check_cliff_entry_specializer(boma) == 1 { + // Disable grabbing ledge while rising during an airborne state (not specials) + if situation_kind == *SITUATION_KIND_AIR { + if rising >= 0.0 && !((tether_zair || tether_special || tether_aerial) && WorkModule::is_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK)) { + return 0; + } + } + } + + // Unable to grab ledge during runfall/walkfall (the first few frames after you run off an edge) + if boma.is_motion_one_of(&[Hash40::new("run_fall_l"), Hash40::new("run_fall_r"), Hash40::new("walk_fall_l"), Hash40::new("walk_fall_r")]) { + return 0; + } + } + + original!()(boma) +} + +//================================================================= +//== GroundModule::can_entry_cliff specializer +//================================================================= +unsafe fn check_cliff_entry_specializer(boma: &mut BattleObjectModuleAccessor) -> i32 { + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + let motion_kind = MotionModule::motion_kind(boma); + let prev_status_kind = StatusModule::prev_status_kind(boma, 0); + let prev_status_kind_2 = StatusModule::prev_status_kind(boma, 1); + let frame = MotionModule::frame(boma); + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + + if fighter_kind == *FIGHTER_KIND_MARIO { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DONKEY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 65.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LINK { + if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END]) { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SAMUS || fighter_kind == *FIGHTER_KIND_SAMUSD { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 35.0 { + return 0; + } + } + } + + // Yoshi: Unchanged + + // Kirby: Unchanged + + if fighter_kind == *FIGHTER_KIND_FOX { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 5.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 8.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_PIKACHU { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { + return 1; + } + /* + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { + if frame < 39.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LUIGI { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 31.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_NESS { + if status_kind == *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK { + /* + if frame > 5.0 && frame < 15.0 { + return 1; + } + else{ + return -1; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_CAPTAIN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 41.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + if frame < 34.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PEACH || fighter_kind == *FIGHTER_KIND_DAISY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 24.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { + if frame < 20.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KOOPA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A { + if prev_status_kind != *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { + if frame < 37.0 { + return 1; + } + } + else { + return 1; + } + } + } + + // Ice Climbers + if [*FIGHTER_KIND_ICE_CLIMBER, *FIGHTER_KIND_POPO, *FIGHTER_KIND_NANA].contains(&fighter_kind) { + if [*FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PRE, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_PULL_PARTNER, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_CLIFF_COMP].contains(&status_kind) { + return -1; + } + if status_kind == *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_FAIL { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_SHEIK { + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_MOVE { + return 1; + } + + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 1; + } + } + + if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_ATTACK || status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN { + if frame < 17.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ZELDA { + if status_kind == *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_MARIOD { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PICHU { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_WARP { + return 1; + } + /* + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + + if status_kind == *FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_S_ATTACK { + if frame < 39.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_FALCO { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 5.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 8.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MARTH || fighter_kind == *FIGHTER_KIND_LUCINA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 20.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_YOUNGLINK { + if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GANON { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 39.0 { + return 0; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 42.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MEWTWO { + if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + + if status_kind == *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_HI_3 { + if frame < 6.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROY { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_2 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_3 || status_kind == *FIGHTER_ROY_STATUS_KIND_SPECIAL_HI_4 { + if frame < 35.0 { + return 0; + } + } + } + + // Chrom: Unchanged + + if fighter_kind == *FIGHTER_KIND_GAMEWATCH { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 22.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_METAKNIGHT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_HI_LOOP { + if frame < 28.0 { + return 0; + } + } + + if status_kind == *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_RUSH { + if frame < 50.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PIT || fighter_kind == *FIGHTER_KIND_PITB { + if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH { + return 0; + } + if status_kind == *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SZEROSUIT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 30.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WARIO { + if status_kind == *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 35.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SNAKE { + if status_kind == *FIGHTER_SNAKE_STATUS_KIND_SPECIAL_HI_HANG { + //if frame < 60.0 { + return 0; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_IKE { + if status_kind == *FIGHTER_IKE_STATUS_KIND_SPECIAL_S_DASH { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_PZENIGAME { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_PLIZARDON { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 38.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DIDDY { + /* + if status_kind == *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER { + if frame < 28.0 { + return 0; + } + } + */ + } + + if fighter_kind == *FIGHTER_KIND_LUCAS { + if status_kind == *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK { + /* + if frame > 5.0 && frame < 15.0 { + return 1; + } + else{ + return -1; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_SONIC { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 0; + } + if status_kind == *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 23.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_DEDEDE { + if status_kind == *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 25.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PIKMIN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT { + return 0; + } + } + + if fighter_kind == *FIGHTER_KIND_LUCARIO { + if status_kind == *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH { + if frame < 17.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROBOT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_TOONLINK { + if status_kind == *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 42.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WOLF { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_RUSH { + return 1; + } + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 11.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_MURABITO { + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { + return 0; + } + + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROCKMAN { + if status_kind == *FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 28.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_WIIFIT { + if status_kind == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP { + return 0; + } + if prev_status_kind_2 == *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_HI_JUMP && status_kind == *FIGHTER_STATUS_KIND_FALL_SPECIAL { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_ROSETTA { + if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_JUMP { + return 0; + } + if status_kind == *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END { + if frame < 10.0 { + return 0; + } + } + } + + if fighter_kind == *FIGHTER_KIND_LITTLEMAC { + if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 30.0 { + return 0; + } + } + + if status_kind == *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW { + if frame < 11.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GEKKOUGA { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_LOOP { + return 1; + } + /* + if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_HI_END { + if frame < 6.0 { + return 0; + } + } + */ + } + + if fighter_kind == *FIGHTER_KIND_PALUTENA { + if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_2 { + return 1; + } + if status_kind == *FIGHTER_PALUTENA_STATUS_KIND_SPECIAL_HI_3 { + if frame < 6.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_PACMAN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_HI_LOOP { + if frame < 25.0 { + return 1; + } + } + if motion_kind == hash40("special_s_move") || motion_kind == hash40("special_s_dash") { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_REFLET { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 9.0 { + return 0; + } + else { + return 1; + } + } + if status_kind == *FIGHTER_REFLET_STATUS_KIND_SPECIAL_HI_2 { + if frame < 40.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SHULK { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 28.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KOOPAJR { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_SHOOT { + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_DUCKHUNT { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY { + //if frame < 60.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_RYU || fighter_kind == *FIGHTER_KIND_KEN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 25.0 { + return 1; + } + } + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND].contains(&status_kind) { + return 1; + } + } + + // Cloud + if fighter_kind == *FIGHTER_KIND_CLOUD { + if motion_kind == hash40("special_hi") || motion_kind == hash40("special_air_hi") { + /* + if frame > 11.0 && frame < 18.0 { + return 0; + } + */ + return 1; + } + } + + if fighter_kind == *FIGHTER_KIND_KAMUI { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 45.0 { + return 1; + } + } + } + + // Bayonetta: Unchanged + + if fighter_kind == *FIGHTER_KIND_INKLING { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI || status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_JUMP { + return 1; + } + + if status_kind == *FIGHTER_INKLING_STATUS_KIND_SPECIAL_HI_ROT { + if frame < 15.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_RIDLEY { + if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_F || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_B || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_HI /*|| status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_HI_CHARGE_LW*/ { + return 0; + } + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S || status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE { + //if frame < 39.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_SIMON || fighter_kind == *FIGHTER_KIND_RICHTER { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 31.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_KROOL { + if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 0; + //} + } + + if status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END || status_kind == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { + if frame < 14.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_SHIZUE { + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_FLAP { + return 1; + } + + if status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_WAIT || status_kind == *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 10.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_GAOGAEN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 1; + } + + if status_kind == *FIGHTER_GAOGAEN_STATUS_KIND_SPECIAL_HI_TURN { + if frame < 4.0 { + return 1; + } + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_S { + //if frame < 41.0 { + return 1; + //} + } + } + + if fighter_kind == *FIGHTER_KIND_PACKUN { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + //if frame < 60.0 { + return 1; + //} + } + + if status_kind == *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END { + if frame < 14.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_JACK { + if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH { + return 1; + } + + if status_kind == *FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_END { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_BRAVE { + if status_kind == *FIGHTER_BRAVE_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 33.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIIFIGHTER { + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_2 || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI1_3 { + if frame < 26.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_ATTACK { + return 1; + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_HI2_END { + if frame < 47.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_S2_WEAK { + return 1; + } + + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + if frame < 33.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIISWORDSMAN { + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI1_JUMP { + if frame < 23.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_WEAK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK { + if frame < 42.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH { + return 1; + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK || status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + return 1; + } + + if status_kind == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + if frame < 41.0 { + return 0; + } + } + else { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_MIIGUNNER { + if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI { + return 1; + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI2_JUMP { + if frame < 35.0 { + return 1; + } + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH { + return 1; + } + + if status_kind == *FIGHTER_MIIGUNNER_STATUS_KIND_SPECIAL_HI3_RUSH_END { + if frame < 7.0 { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_BUDDY { + + if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 32.0 { + return 1; + } + } + + if status_kind == *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH { + return 1; + } + } + + if(fighter_kind == *FIGHTER_KIND_PICKEL){ + if(status_kind == *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_GLIDING){ + if VarModule::get_float(boma.object(), vars::pickel::status::GLIDE_TIMER) < 40.0 /*40 frames of up b travel time*/ { + return 1; + } + } + } + + if fighter_kind == *FIGHTER_KIND_EFLAME { + if status_kind == *FIGHTER_EFLAME_STATUS_KIND_SPECIAL_HI_JUMP { + if frame < 3.0 { + return 0; + } + } + } + + // General fighter check stuff + if status_kind == *FIGHTER_STATUS_KIND_ESCAPE_AIR{ + return -1; + } + + 1 +} + +pub fn install() { + skyline::install_hooks!( + correct_hook, + get_ground_correct_kind_air_trans_hook, + can_entry_cliff_hook + ); +} diff --git a/fighters/common/src/function_hooks/lua_bind_hook/mod.rs b/fighters/common/src/function_hooks/lua_bind_hook/mod.rs new file mode 100644 index 0000000000..c6965fdc2f --- /dev/null +++ b/fighters/common/src/function_hooks/lua_bind_hook/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod motion; +mod status; +mod ground; +mod work; + +pub fn install() { + motion::install(); + status::install(); + ground::install(); + work::install(); +} \ No newline at end of file diff --git a/fighters/common/src/function_hooks/change_motion.rs b/fighters/common/src/function_hooks/lua_bind_hook/motion.rs similarity index 97% rename from fighters/common/src/function_hooks/change_motion.rs rename to fighters/common/src/function_hooks/lua_bind_hook/motion.rs index 630ad6f2d5..4569cdd483 100644 --- a/fighters/common/src/function_hooks/change_motion.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/motion.rs @@ -1,95 +1,95 @@ -use super::*; -use globals::*; - -//================================================================= -//== CHANGE MOTION HOOKS -//== Note: Hooking functions to clear all hitboxes upon animation changes -//================================================================= - -//================================================================= -//== MotionModule::change_motion -//================================================================= -#[skyline::hook(replace=MotionModule::change_motion)] -unsafe fn change_motion_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: bool, arg6: f32, arg7: bool, arg8: bool) -> u64 { - let mut start_frame = arg3; - change_motion_pos_shift_check(boma); - if boma.is_fighter() { - // Starts landing animations on frame 2 - // This is a purely aesthetic change, makes for snappier landings - if [Hash40::new("landing_heavy"), - Hash40::new("landing_air_n"), - Hash40::new("landing_air_f"), - Hash40::new("landing_air_b"), - Hash40::new("landing_air_hi"), - Hash40::new("landing_air_lw"), - Hash40::new("landing_fall_special")].contains(&motion_hash) - { - start_frame = 1.0; - } - - // Allows a frame-perfect edge canceled waveland to still generate landing smoke GFX - if VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - && MotionModule::motion_kind(boma) == hash40("landing_heavy") { - MotionAnimcmdModule::flush(boma, false); - } - } - original!()(boma, motion_hash, start_frame, arg4, arg5, arg6, arg7, arg8) -} - -#[skyline::hook(replace=MotionModule::change_motion_inherit_frame)] -unsafe fn change_motion_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32, arg6: bool, arg7: bool) -> u64 { - change_motion_pos_shift_check(boma); - if boma.is_fighter() - && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - || StatusModule::is_changing(boma)) - { - MotionAnimcmdModule::flush(boma, false); - } - original!()(boma, motion_hash, arg3, arg4, arg5, arg6, arg7) -} - -#[skyline::hook(replace=MotionModule::change_motion_inherit_frame_keep_rate)] -unsafe fn change_motion_inherit_frame_keep_rate_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { - change_motion_pos_shift_check(boma); - if boma.is_fighter() - && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) - || StatusModule::is_changing(boma)) - { - MotionAnimcmdModule::flush(boma, false); - } - original!()(boma, motion_hash, arg3, arg4, arg5) -} - -#[skyline::hook(replace=MotionModule::change_motion_force_inherit_frame)] -unsafe fn change_motion_force_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { - change_motion_pos_shift_check(boma); - original!()(boma, motion_hash, arg3, arg4, arg5) -} - -#[skyline::hook(replace=MotionModule::change_motion_kind)] -unsafe fn change_motion_kind_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40) -> u64 { - change_motion_pos_shift_check(boma); - original!()(boma, motion_hash) -} - -unsafe fn change_motion_pos_shift_check(boma: &mut BattleObjectModuleAccessor) { - if boma.is_fighter() { - if boma.is_prev_situation(*SITUATION_KIND_AIR) - && boma.is_situation(*SITUATION_KIND_GROUND) - { - if KineticModule::get_kinetic_type(boma) == *FIGHTER_KINETIC_TYPE_MOTION { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - } - } - } -} - -pub fn install() { - skyline::install_hooks!( - change_motion_hook, - change_motion_inherit_frame_hook, - change_motion_inherit_frame_keep_rate_hook, - change_motion_force_inherit_frame_hook, - change_motion_kind_hook, - ); -} +use super::*; +use globals::*; + +//================================================================= +//== CHANGE MOTION HOOKS +//== Note: Hooking functions to clear all hitboxes upon animation changes +//================================================================= + +//================================================================= +//== MotionModule::change_motion +//================================================================= +#[skyline::hook(replace=MotionModule::change_motion)] +unsafe fn change_motion_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: bool, arg6: f32, arg7: bool, arg8: bool) -> u64 { + let mut start_frame = arg3; + change_motion_pos_shift_check(boma); + if boma.is_fighter() { + // Starts landing animations on frame 2 + // This is a purely aesthetic change, makes for snappier landings + if [Hash40::new("landing_heavy"), + Hash40::new("landing_air_n"), + Hash40::new("landing_air_f"), + Hash40::new("landing_air_b"), + Hash40::new("landing_air_hi"), + Hash40::new("landing_air_lw"), + Hash40::new("landing_fall_special")].contains(&motion_hash) + { + start_frame = 1.0; + } + + // Allows a frame-perfect edge canceled waveland to still generate landing smoke GFX + if VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + && MotionModule::motion_kind(boma) == hash40("landing_heavy") { + MotionAnimcmdModule::flush(boma, false); + } + } + original!()(boma, motion_hash, start_frame, arg4, arg5, arg6, arg7, arg8) +} + +#[skyline::hook(replace=MotionModule::change_motion_inherit_frame)] +unsafe fn change_motion_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32, arg6: bool, arg7: bool) -> u64 { + change_motion_pos_shift_check(boma); + if boma.is_fighter() + && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + || StatusModule::is_changing(boma)) + { + MotionAnimcmdModule::flush(boma, false); + } + original!()(boma, motion_hash, arg3, arg4, arg5, arg6, arg7) +} + +#[skyline::hook(replace=MotionModule::change_motion_inherit_frame_keep_rate)] +unsafe fn change_motion_inherit_frame_keep_rate_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { + change_motion_pos_shift_check(boma); + if boma.is_fighter() + && (VarModule::is_flag(boma.object(), vars::common::instance::FLUSH_EFFECT_ACMD) + || StatusModule::is_changing(boma)) + { + MotionAnimcmdModule::flush(boma, false); + } + original!()(boma, motion_hash, arg3, arg4, arg5) +} + +#[skyline::hook(replace=MotionModule::change_motion_force_inherit_frame)] +unsafe fn change_motion_force_inherit_frame_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40, arg3: f32, arg4: f32, arg5: f32) -> u64 { + change_motion_pos_shift_check(boma); + original!()(boma, motion_hash, arg3, arg4, arg5) +} + +#[skyline::hook(replace=MotionModule::change_motion_kind)] +unsafe fn change_motion_kind_hook(boma: &mut BattleObjectModuleAccessor, motion_hash: smash::phx::Hash40) -> u64 { + change_motion_pos_shift_check(boma); + original!()(boma, motion_hash) +} + +unsafe fn change_motion_pos_shift_check(boma: &mut BattleObjectModuleAccessor) { + if boma.is_fighter() { + if boma.is_prev_situation(*SITUATION_KIND_AIR) + && boma.is_situation(*SITUATION_KIND_GROUND) + { + if KineticModule::get_kinetic_type(boma) == *FIGHTER_KINETIC_TYPE_MOTION { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + } + } + } +} + +pub fn install() { + skyline::install_hooks!( + change_motion_hook, + change_motion_inherit_frame_hook, + change_motion_inherit_frame_keep_rate_hook, + change_motion_force_inherit_frame_hook, + change_motion_kind_hook, + ); +} diff --git a/fighters/common/src/function_hooks/change_status.rs b/fighters/common/src/function_hooks/lua_bind_hook/status.rs similarity index 59% rename from fighters/common/src/function_hooks/change_status.rs rename to fighters/common/src/function_hooks/lua_bind_hook/status.rs index b2116c450f..e7615f77bb 100644 --- a/fighters/common/src/function_hooks/change_status.rs +++ b/fighters/common/src/function_hooks/lua_bind_hook/status.rs @@ -2,6 +2,176 @@ use super::*; use globals::*; use utils::game_modes::CustomMode; +//================================================================= +//== StatusModule::init_settings +//================================================================= +#[skyline::hook(replace=StatusModule::init_settings)] +unsafe fn init_settings_hook(boma: &mut BattleObjectModuleAccessor, mut situation: smash::app::SituationKind, kinetic_type: i32, arg4: u32, + ground_cliff_check_kind: smash::app::GroundCliffCheckKind, jostle: bool, + keep_flag: i32, keep_int: i32, keep_float: i32, arg10: i32) -> u64 { + let id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + let fighter_kind = boma.kind(); + let status_kind = StatusModule::status_kind(boma); + let situation_kind = StatusModule::situation_kind(boma); + let mut cliff_check_kind = ground_cliff_check_kind; + let mut kinetic_type = kinetic_type.clone(); + + // Call edge_slippoffs init_settings + let fix = super::ground::init_settings_edges(boma, situation, kinetic_type, arg4, ground_cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10); + + if boma.is_fighter() { + + if boma.is_prev_situation(*SITUATION_KIND_AIR) + && ( situation.0 == *SITUATION_KIND_GROUND + || (boma.is_situation(*SITUATION_KIND_GROUND) && situation.0 == *SITUATION_KIND_NONE) ) + { + if kinetic_type == *FIGHTER_KINETIC_TYPE_MOTION { + kinetic_type = *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL; + } + } + // Resets your airtime counter when leaving the below statuses + // Prevents ECB from shifting on f1 after an "ignored" status (those defined below) + if boma.is_prev_status_one_of(&[ + *FIGHTER_STATUS_KIND_DEMO, + *FIGHTER_STATUS_KIND_ENTRY, + *FIGHTER_STATUS_KIND_CAPTURE_PULLED, + *FIGHTER_STATUS_KIND_CAPTURE_WAIT, + *FIGHTER_STATUS_KIND_CAPTURE_DAMAGE, + *FIGHTER_STATUS_KIND_THROWN, + *FIGHTER_STATUS_KIND_CATCHED_GANON, + *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, + *FIGHTER_STATUS_KIND_CATCHED_REFLET, + *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, + *FIGHTER_STATUS_KIND_CAPTURE_JACK_WIRE, + *FIGHTER_STATUS_KIND_CAPTURE_MASTER_SWORD]) + && situation.0 == *SITUATION_KIND_AIR + { + WorkModule::set_int(boma, 0, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR); + } + + // Walk through other fighters + JostleModule::set_team(boma, 0); + + // clear platform drop input when entering airdodge (to avoid buffering waveland platdrop with the same down input as the actual waveland) + // if [*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT].contains(&status_kind) { + // ControlModule::reset_flick_y(boma); + // // VarModule::off_flag(boma.object(), vars::common::instance::ENABLE_WAVELAND_PLATDROP); + // } + + if boma.is_prev_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, *FIGHTER_STATUS_KIND_JUMP_SQUAT]) + && boma.is_status(*FIGHTER_STATUS_KIND_LANDING) + && GroundModule::is_passable_ground(boma) { + ControlModule::reset_flick_y(boma); + } + + // Occupy ledge on ledgegrab + if boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_CLIFF_CATCH, + *FIGHTER_STATUS_KIND_CLIFF_CATCH_MOVE, + *FIGHTER_STATUS_KIND_CLIFF_WAIT] + ) { + let cliff_id = GroundModule::get_cliff_id_uint32(boma); + VarModule::set_int(boma.object(), vars::common::instance::LEDGE_ID, cliff_id as i32); + } + + // heavy item pickup should keep momentum and be affected by gravity in the air + if boma.is_status(*FIGHTER_STATUS_KIND_ITEM_HEAVY_PICKUP) && boma.is_situation(*SITUATION_KIND_AIR) { + // change the kinetic type to the regular air type + kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; + situation.0 = *SITUATION_KIND_NONE; + } + + if boma.kind() == *FIGHTER_KIND_DONKEY && boma.is_situation(*SITUATION_KIND_AIR) + && boma.is_status_one_of(&[ + *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_START, + *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_WAIT, + *FIGHTER_STATUS_KIND_THROW,]) { + kinetic_type = *FIGHTER_KINETIC_TYPE_FALL; + situation.0 = *SITUATION_KIND_NONE; + } + + // Repeated tilt scaling; UNUSED + /* + if [*FIGHTER_KIND_RYU, *FIGHTER_KIND_KEN, *FIGHTER_KIND_DOLLY].contains(&fighter_kind) { + VarModule::off_flag(boma.object(), vars::common::status::REPEAT_INCREMENTED); + if status_kind != *FIGHTER_STATUS_KIND_ATTACK_HI3 { + if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_HI) > 0 { + VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_HI, 0); + } + } + if ![*FIGHTER_STATUS_KIND_ATTACK_LW3, + *FIGHTER_STATUS_KIND_SQUAT, + *FIGHTER_STATUS_KIND_SQUAT_WAIT].contains(&status_kind) { + if VarModule::get_int(boma.object(), vars::common::REPEAT_NUM_LW) > 0 { + VarModule::set_int(boma.object(), vars::common::REPEAT_NUM_LW, 0); + } + } + } + */ + + //Sword trails + if (boma.kind() == *FIGHTER_KIND_ROY || boma.kind() == *FIGHTER_KIND_CHROM) + && VarModule::is_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT) { + EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); + if fighter_kind == *FIGHTER_KIND_ROY { + EffectModule::req_follow(boma, Hash40::new("roy_fire_small"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); + } + else if fighter_kind == *FIGHTER_KIND_CHROM { + EffectModule::req_follow(boma, Hash40::new("chrom_sword"), Hash40::new("sword1"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, 1.0, false, 0, 0, 0, 0, 0, false, false); + } + + if [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) { + VarModule::off_flag(boma.object(), vars::roy::instance::TRAIL_EFFECT); + EffectModule::kill_joint_id(boma, Hash40::new("sword1"), false, false); + } + } + + // Set GroundCliffCheckKind here to pass into init_settings + + if ((boma.kind() == *FIGHTER_KIND_RYU || boma.kind() == *FIGHTER_KIND_KEN) + && boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, + *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_END])) + || (boma.kind() == *FIGHTER_KIND_FALCO + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + || (boma.kind() == *FIGHTER_KIND_REFLET + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + || (boma.kind() == *FIGHTER_KIND_WOLF + && boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI)) + { + cliff_check_kind = app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + + if boma.is_prev_status(*FIGHTER_STATUS_KIND_SWALLOWED_DRINK) { + VisibilityModule::set_whole(boma, true); + } + } + + // VarModule Status Variable reset checks + // This makes the assumption that if the KEEP_FLAG is not NONE, you want to clear the + // status variable array for that data type. Because Smash shares its space between + // INT and INT64, I have included both of them under a single check. + let object = boma.object(); + if VarModule::has_var_module(object) { + let mut mask = 0; + if keep_flag != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG { + mask += VarModule::RESET_STATUS_FLAG; + } + if keep_int != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT { + mask += VarModule::RESET_STATUS_INT; + mask += VarModule::RESET_STATUS_INT64; + } + if keep_float != *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT { + mask += VarModule::RESET_STATUS_FLOAT; + } + VarModule::reset(object, mask); + } + + original!()(boma, situation, kinetic_type, fix, cliff_check_kind, jostle, keep_flag, keep_int, keep_float, arg10) +} + #[skyline::hook(replace=StatusModule::change_status_request)] unsafe fn change_status_request_hook(boma: &mut BattleObjectModuleAccessor, status_kind: i32, arg3: bool) -> u64 { let mut next_status = status_kind; @@ -225,6 +395,7 @@ unsafe fn change_status_request_from_script_hook(boma: &mut BattleObjectModuleAc pub fn install() { skyline::install_hooks!( + init_settings_hook, change_status_request_hook, change_status_request_from_script_hook ); diff --git a/fighters/common/src/function_hooks/is_flag.rs b/fighters/common/src/function_hooks/lua_bind_hook/work.rs similarity index 100% rename from fighters/common/src/function_hooks/is_flag.rs rename to fighters/common/src/function_hooks/lua_bind_hook/work.rs diff --git a/fighters/common/src/function_hooks/mod.rs b/fighters/common/src/function_hooks/mod.rs index 5b1803c1b5..9d5840cd11 100644 --- a/fighters/common/src/function_hooks/mod.rs +++ b/fighters/common/src/function_hooks/mod.rs @@ -3,17 +3,11 @@ use crate::globals::*; use std::arch::asm; pub mod energy; pub mod effect; -pub mod edge_slipoffs; -pub mod ledges; pub mod get_param; -pub mod change_motion; pub mod transition; pub mod djcancel; -pub mod init_settings; pub mod momentum_transfer; pub mod hitstun; -pub mod change_status; -pub mod is_flag; pub mod controls; pub mod misc; pub mod jumps; @@ -24,6 +18,7 @@ pub mod collision; pub mod camera; pub mod shotos; pub mod sound; +mod lua_bind_hook; mod fighterspecializer; mod fighter_util; mod vtables; @@ -729,29 +724,22 @@ unsafe fn status_module__change_status(status_module: *const u64, status_kind_ne // Only extra elec hitlag for hit character #[skyline::hook(offset = 0x406824, inline)] unsafe fn change_elec_hitlag_for_attacker(ctx: &mut skyline::hooks::InlineCtx) { - let is_attacker = *ctx.registers[4].w.as_ref() & 1 == 0; - if *ctx.registers[8].x.as_ref() == smash::hash40("collision_attr_elec") && is_attacker { - *ctx.registers[8].x.as_mut() = smash::hash40("collision_attr_normal"); - } + let is_attacker = *ctx.registers[4].w.as_ref() & 1 == 0; + if *ctx.registers[8].x.as_ref() == smash::hash40("collision_attr_elec") && is_attacker { + *ctx.registers[8].x.as_mut() = smash::hash40("collision_attr_normal"); + } } pub fn install() { energy::install(); effect::install(); - edge_slipoffs::install(); - ledges::install(); get_param::install(); - change_motion::install(); transition::install(); djcancel::install(); - init_settings::install(); hitstun::install(); - change_status::install(); - is_flag::install(); controls::install(); momentum_transfer::install(); misc::install(); - //dash_dancing::install(); jumps::install(); stage_hazards::install(); set_fighter_status_data::install(); @@ -760,6 +748,7 @@ pub fn install() { camera::install(); shotos::install(); sound::install(); + lua_bind_hook::install(); fighterspecializer::install(); fighter_util::install(); vtables::install(); From 890dfa62fc2b663ece0d7e283225457851d9253b Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Wed, 13 Mar 2024 20:18:46 -0400 Subject: [PATCH 002/172] Mega Man crate refactor --- fighters/rockman/src/acmd/aerials.rs | 48 ++++++------ fighters/rockman/src/acmd/ground.rs | 67 +++++++++-------- fighters/rockman/src/acmd/other.rs | 23 +++--- fighters/rockman/src/acmd/smashes.rs | 73 ++++++++++--------- fighters/rockman/src/acmd/specials.rs | 68 +++++++++-------- fighters/rockman/src/acmd/throws.rs | 14 ++-- fighters/rockman/src/acmd/tilts.rs | 30 ++++---- .../rockman/src/airshooter/acmd/aerials.rs | 4 +- .../rockman/src/chargeshot/acmd/specials.rs | 4 +- .../rockman/src/chargeshot/status/regular.rs | 4 +- .../rockman/src/hardknuckle/acmd/aerials.rs | 8 +- .../rockman/src/leafshield/acmd/specials.rs | 23 +++--- .../rockman/src/rockbuster/acmd/specials.rs | 4 +- fighters/rockman/src/status.rs | 38 ++++------ fighters/rockman/src/status/attack.rs | 4 +- fighters/rockman/src/status/attack_air.rs | 8 +- fighters/rockman/src/status/attack_s3.rs | 4 +- fighters/rockman/src/status/attack_s4.rs | 4 +- fighters/rockman/src/status/helper.rs | 2 +- fighters/rockman/src/status/ladder_attack.rs | 8 +- .../rockman/src/status/rockbuster/helper.rs | 28 +++---- .../src/status/rockbuster/shoot_air.rs | 16 ++-- .../src/status/rockbuster/shoot_jump.rs | 16 ++-- .../src/status/rockbuster/shoot_jump_squat.rs | 22 +++--- .../src/status/rockbuster/shoot_landing.rs | 18 ++--- .../src/status/rockbuster/shoot_turn.rs | 16 ++-- .../src/status/rockbuster/shoot_wait.rs | 20 ++--- .../src/status/rockbuster/shoot_walk.rs | 18 ++--- fighters/rockman/src/status/special_lw.rs | 10 +-- fighters/rockman/src/status/special_n.rs | 18 ++--- fighters/rockman/src/status/special_s.rs | 18 ++--- fighters/rockman/src/status/walk.rs | 12 +-- 32 files changed, 338 insertions(+), 312 deletions(-) diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index 8680b37b73..8575617878 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn rockman_attackairn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 3.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -28,7 +28,7 @@ unsafe extern "C" fn rockman_attackairn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attackairn_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairnmelee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 6.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 6, 1, 30, 0, 0, 0.6, true, *EF_FLIP_YZ, 1); @@ -40,14 +40,14 @@ unsafe extern "C" fn rockman_attackairn_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attackairn_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairnmelee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 6.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } -unsafe extern "C" fn rockman_attackairn_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairnmelee(agent: &mut L2CAgentBase) { if is_excute(agent) { ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -63,7 +63,7 @@ unsafe extern "C" fn rockman_attackairn_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_f_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -92,7 +92,7 @@ unsafe extern "C" fn rockman_attack_air_f_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_f_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 7.0); @@ -110,7 +110,7 @@ unsafe extern "C" fn rockman_attack_air_f_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_f_expression(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -127,7 +127,7 @@ unsafe extern "C" fn rockman_attack_air_f_expression(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn rockman_attack_air_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -171,7 +171,7 @@ unsafe extern "C" fn rockman_attack_air_b_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn rockman_attack_air_b_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; frame(lua_state, 3.0); if is_excute(fighter) { @@ -180,7 +180,7 @@ unsafe extern "C" fn rockman_attack_air_b_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -206,7 +206,7 @@ unsafe extern "C" fn rockman_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -231,15 +231,19 @@ unsafe extern "C" fn rockman_attack_air_lw_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairnmelee", rockman_attackairn); - agent.acmd("effect_attackairnmelee", rockman_attackairn_eff); - agent.acmd("sound_attackairnmelee", rockman_attackairn_snd); - agent.acmd("expression_attackairnmelee", rockman_attackairn_exp); - agent.acmd("game_attackairf", rockman_attack_air_f_game); - agent.acmd("effect_attackairf", rockman_attack_air_f_effect); - agent.acmd("expression_attackairf", rockman_attack_air_f_expression); - agent.acmd("game_attackairb", rockman_attack_air_b_game); - agent.acmd("effect_attackairb", rockman_attack_air_b_effect); - agent.acmd("game_attackairhi", rockman_attack_air_hi_game); - agent.acmd("game_attackairlw", rockman_attack_air_lw_game); + agent.acmd("game_attackairnmelee", game_attackairnmelee); + agent.acmd("effect_attackairnmelee", effect_attackairnmelee); + agent.acmd("sound_attackairnmelee", sound_attackairnmelee); + agent.acmd("expression_attackairnmelee", expression_attackairnmelee); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index 01d566a8e4..a41735e4a1 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn rockman_attack11(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 6.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 15, 0, 30, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); @@ -24,7 +24,7 @@ unsafe extern "C" fn rockman_attack11(agent: &mut L2CAgentBase) { // } } -unsafe extern "C" fn rockman_attack11_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack11melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 5.0); if is_excute(agent) { EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 8, 0, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); @@ -36,14 +36,14 @@ unsafe extern "C" fn rockman_attack11_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack11_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attack11melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_s")); } } -unsafe extern "C" fn rockman_attack11_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack11melee(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::set_attack_reference_joint_id(agent.module_accessor, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); @@ -60,7 +60,7 @@ unsafe extern "C" fn rockman_attack11_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack12(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 15, 0, 30, 4.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); @@ -82,7 +82,7 @@ unsafe extern "C" fn rockman_attack12(agent: &mut L2CAgentBase) { // } } -unsafe extern "C" fn rockman_attack12_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 5.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 8, 2, 10, -39, 10, 0.95, true, *EF_FLIP_YZ); @@ -90,14 +90,14 @@ unsafe extern "C" fn rockman_attack12_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack12_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } -unsafe extern "C" fn rockman_attack12_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -121,7 +121,7 @@ unsafe extern "C" fn rockman_attack12_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack13(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 10.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 74, 70, 0, 70, 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); @@ -132,7 +132,7 @@ unsafe extern "C" fn rockman_attack13(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack13_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 2.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); @@ -152,7 +152,7 @@ unsafe extern "C" fn rockman_attack13_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack13_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 9.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")); @@ -163,7 +163,7 @@ unsafe extern "C" fn rockman_attack13_snd(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack13_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -183,7 +183,7 @@ unsafe extern "C" fn rockman_attack13_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); @@ -207,7 +207,7 @@ unsafe extern "C" fn rockman_attack_dash_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_dash_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; frame(lua_state, 6.0); if is_excute(fighter) { @@ -227,7 +227,7 @@ unsafe extern "C" fn rockman_attack_dash_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; frame(lua_state, 5.0); if is_excute(fighter) { @@ -235,7 +235,7 @@ unsafe extern "C" fn rockman_attack_dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_dash_expression(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -264,20 +264,23 @@ unsafe extern "C" fn rockman_attack_dash_expression(fighter: &mut L2CAgentBase) } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11melee", rockman_attack11); - agent.acmd("effect_attack11melee", rockman_attack11_eff); - agent.acmd("sound_attack11melee", rockman_attack11_snd); - agent.acmd("expression_attack11melee", rockman_attack11_exp); - agent.acmd("game_attack12", rockman_attack12); - agent.acmd("effect_attack12", rockman_attack12_eff); - agent.acmd("sound_attack12", rockman_attack12_snd); - agent.acmd("expression_attack12", rockman_attack12_exp); - agent.acmd("game_attack13", rockman_attack13); - agent.acmd("effect_attack13", rockman_attack13_eff); - agent.acmd("sound_attack13", rockman_attack13_snd); - agent.acmd("expression_attack13", rockman_attack13_exp); - agent.acmd("game_attackdash", rockman_attack_dash_game); - agent.acmd("effect_attackdash", rockman_attack_dash_effect); - agent.acmd("sound_attackdash", rockman_attack_dash_sound); - agent.acmd("expression_attackdash", rockman_attack_dash_expression); + agent.acmd("game_attack11melee", game_attack11melee); + agent.acmd("effect_attack11melee", effect_attack11melee); + agent.acmd("sound_attack11melee", sound_attack11melee); + agent.acmd("expression_attack11melee", expression_attack11melee); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("sound_attack12", sound_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 01f42b0696..6fccec44d9 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 14.0); @@ -11,7 +11,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -29,7 +29,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -63,7 +63,7 @@ unsafe fn rockman_crashbomb_stick_game(fighter: &mut L2CAgentBase) { } */ -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -78,7 +78,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -93,9 +93,12 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_dash", dash_game); - agent.acmd("sound_dash", dash_sound); - agent.acmd("game_turndash", turn_dash_game); - agent.acmd("game_escapeair", escape_air_game); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index 656857f60b..adcf88843b 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn rockman_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); @@ -24,7 +24,7 @@ unsafe extern "C" fn rockman_attacks4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); @@ -39,14 +39,14 @@ unsafe extern "C" fn rockman_attacks4_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } -unsafe extern "C" fn rockman_attacks4_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); @@ -91,7 +91,7 @@ unsafe extern "C" fn rockman_attacks4_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); @@ -111,7 +111,7 @@ unsafe extern "C" fn rockman_attacks4hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4hi_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); @@ -130,14 +130,14 @@ unsafe extern "C" fn rockman_attacks4hi_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4hi_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4hi(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 13.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")) } } -unsafe extern "C" fn rockman_attacks4hi_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); @@ -175,7 +175,7 @@ unsafe extern "C" fn rockman_attacks4hi_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); @@ -198,7 +198,7 @@ unsafe extern "C" fn rockman_attacks4lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4lw_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); @@ -210,14 +210,14 @@ unsafe extern "C" fn rockman_attacks4lw_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4lw_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4lw(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } -unsafe extern "C" fn rockman_attacks4lw_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); @@ -259,7 +259,7 @@ unsafe extern "C" fn rockman_attacks4lw_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4charge_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 5.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 12, 0, 4, 0, 0, 0, false); @@ -272,14 +272,14 @@ unsafe extern "C" fn rockman_attacks4charge_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks4charge_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_smash_start")); } } -unsafe extern "C" fn rockman_attacks4charge_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { if is_excute(agent) { physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.8, -1, 0.8, 0.8, -1, Hash40::new("invalid")); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); @@ -292,7 +292,7 @@ unsafe extern "C" fn rockman_attacks4charge_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_hi4_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); @@ -332,7 +332,7 @@ unsafe extern "C" fn rockman_attack_hi4_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn rockman_attack_lw4_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); @@ -377,21 +377,26 @@ unsafe extern "C" fn rockman_attack_lw4_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", rockman_attacks4); - agent.acmd("effect_attacks4", rockman_attacks4_eff); - agent.acmd("sound_attacks4", rockman_attacks4_snd); - agent.acmd("expression_attacks4", rockman_attacks4_exp); - agent.acmd("game_attacks4hi", rockman_attacks4hi); - agent.acmd("effect_attacks4hi", rockman_attacks4hi_eff); - agent.acmd("sound_attacks4hi", rockman_attacks4hi_snd); - agent.acmd("expression_attacks4hi", rockman_attacks4hi_exp); - agent.acmd("game_attacks4lw", rockman_attacks4lw); - agent.acmd("effect_attacks4lw", rockman_attacks4lw_eff); - agent.acmd("sound_attacks4lw", rockman_attacks4lw_snd); - agent.acmd("expression_attacks4lw", rockman_attacks4lw_exp); - agent.acmd("effect_attacks4charge", rockman_attacks4charge_eff); - agent.acmd("sound_attacks4charge", rockman_attacks4charge_snd); - agent.acmd("expression_attacks4charge", rockman_attacks4charge_exp); - agent.acmd("game_attackhi4", rockman_attack_hi4_game); - agent.acmd("game_attacklw4", rockman_attack_lw4_game); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("sound_attacks4hi", sound_attacks4hi); + agent.acmd("expression_attacks4hi", expression_attacks4hi); + + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("sound_attacks4lw", sound_attacks4lw); + agent.acmd("expression_attacks4lw", expression_attacks4lw); + + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("sound_attacks4charge", sound_attacks4charge); + agent.acmd("expression_attacks4charge", expression_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index 963a2d27aa..7cb8a6e4ec 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn rockman_attack_11_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 2.0); @@ -18,7 +18,7 @@ unsafe extern "C" fn rockman_attack_11_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_air_n_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 2.0); @@ -42,7 +42,7 @@ unsafe extern "C" fn rockman_attack_air_n_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn rockman_attack_s3_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 2.0); @@ -59,7 +59,7 @@ unsafe extern "C" fn rockman_attack_s3_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_specialn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_busterchargeshot(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 11.0); FT_MOTION_RATE(agent, 1.0 / 7.0); frame(agent.lua_state_agent, 18.0); @@ -70,7 +70,7 @@ unsafe extern "C" fn rockman_specialn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_specialn_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_busterchargeshot(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } @@ -88,14 +88,14 @@ unsafe extern "C" fn rockman_specialn_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_specialn_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_busterchargeshot(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 2.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_rockman_smash_s02")); } } -unsafe extern "C" fn rockman_specialn_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_busterchargeshot(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_ROCKBUSTER, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); @@ -117,7 +117,7 @@ unsafe extern "C" fn rockman_specialn_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_special_s_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -141,7 +141,7 @@ unsafe extern "C" fn rockman_special_s_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_special_s_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); @@ -179,7 +179,7 @@ unsafe extern "C" fn rockman_special_s_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_special_air_s_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -200,7 +200,7 @@ unsafe extern "C" fn rockman_special_air_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn rockman_special_air_s_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 7.0); @@ -233,7 +233,7 @@ unsafe extern "C" fn rockman_special_air_s_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_speciallw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 5.0); frame(agent.lua_state_agent, 4.0); if is_excute(agent) { @@ -242,7 +242,7 @@ unsafe extern "C" fn rockman_speciallw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rockman_specialairlw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 5.0); frame(agent.lua_state_agent, 4.0); if is_excute(agent) { @@ -252,21 +252,29 @@ unsafe extern "C" fn rockman_specialairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", rockman_attack_11_game); - agent.acmd("game_attackairn", rockman_attack_air_n_game); - agent.acmd("game_attacks3", rockman_attack_s3_game); - agent.acmd("game_busterchargeshot", rockman_specialn); - agent.acmd("game_busterairchargeshot", rockman_specialn); - agent.acmd("effect_busterchargeshot", rockman_specialn_eff); - agent.acmd("effect_busterairchargeshot", rockman_specialn_eff); - agent.acmd("sound_busterchargeshot", rockman_specialn_snd); - agent.acmd("sound_busterairchargeshot", rockman_specialn_snd); - agent.acmd("expression_busterchargeshot", rockman_specialn_exp); - agent.acmd("expression_busterairchargeshot", rockman_specialn_exp); - agent.acmd("game_specials", rockman_special_s_game); - agent.acmd("effect_specials", rockman_special_s_effect); - agent.acmd("game_specialairs", rockman_special_air_s_game); - agent.acmd("effect_specialairs", rockman_special_air_s_effect); - agent.acmd("game_speciallw", rockman_speciallw); - agent.acmd("game_specialairlw", rockman_specialairlw); + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_busterchargeshot", game_busterchargeshot); + agent.acmd("effect_busterchargeshot", effect_busterchargeshot); + agent.acmd("sound_busterchargeshot", sound_busterchargeshot); + agent.acmd("expression_busterchargeshot", expression_busterchargeshot); + + agent.acmd("game_busterairchargeshot", game_busterchargeshot); + agent.acmd("effect_busterairchargeshot", effect_busterchargeshot); + agent.acmd("sound_busterairchargeshot", sound_busterchargeshot); + agent.acmd("expression_busterairchargeshot", expression_busterchargeshot); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + + agent.acmd("game_speciallw", game_speciallw); + + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/rockman/src/acmd/throws.rs b/fighters/rockman/src/acmd/throws.rs index ae021d365a..52109d53d2 100644 --- a/fighters/rockman/src/acmd/throws.rs +++ b/fighters/rockman/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_throw_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -22,7 +22,7 @@ unsafe extern "C" fn rockman_throw_b_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_throw_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 14.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn rockman_throw_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_throw_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -66,7 +66,9 @@ unsafe extern "C" fn rockman_throw_lw_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_throwb", rockman_throw_b_game); - agent.acmd("game_throwhi", rockman_throw_hi_game); - agent.acmd("game_throwlw", rockman_throw_lw_game); + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index 70f5591b40..6fd0837153 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 13.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); @@ -23,7 +23,7 @@ unsafe extern "C" fn rockman_attacks3(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rockman_attacks3_eff(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 7.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -8, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); @@ -42,7 +42,7 @@ unsafe extern "C" fn rockman_attacks3_eff(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks3_snd(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks3melee(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_jump01")); @@ -57,7 +57,7 @@ unsafe extern "C" fn rockman_attacks3_snd(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attacks3_exp(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -78,7 +78,7 @@ unsafe extern "C" fn rockman_attacks3_exp(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_hi3_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); @@ -105,7 +105,7 @@ unsafe extern "C" fn rockman_attack_hi3_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_hi3_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -137,7 +137,7 @@ unsafe extern "C" fn rockman_attack_hi3_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_attack_lw3_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.75); @@ -161,11 +161,13 @@ unsafe extern "C" fn rockman_attack_lw3_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3melee", rockman_attacks3); - agent.acmd("effect_attacks3melee", rockman_attacks3_eff); - agent.acmd("sound_attacks3melee", rockman_attacks3_snd);; - agent.acmd("expression_attacks3melee", rockman_attacks3_exp); - agent.acmd("game_attackhi3", rockman_attack_hi3_game); - agent.acmd("effect_attackhi3", rockman_attack_hi3_effect); - agent.acmd("game_attacklw3", rockman_attack_lw3_game); + agent.acmd("game_attacks3melee", game_attacks3melee); + agent.acmd("effect_attacks3melee", effect_attacks3melee); + agent.acmd("sound_attacks3melee", sound_attacks3melee);; + agent.acmd("expression_attacks3melee", expression_attacks3melee); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/rockman/src/airshooter/acmd/aerials.rs b/fighters/rockman/src/airshooter/acmd/aerials.rs index b704fa947a..9ec3c806d2 100644 --- a/fighters/rockman/src/airshooter/acmd/aerials.rs +++ b/fighters/rockman/src/airshooter/acmd/aerials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_airshooter_regular_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -20,5 +20,5 @@ unsafe extern "C" fn rockman_airshooter_regular_game(fighter: &mut L2CAgentBase) } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_airshooter_regular_game); + agent.acmd("game_regular", game_regular); } diff --git a/fighters/rockman/src/chargeshot/acmd/specials.rs b/fighters/rockman/src/chargeshot/acmd/specials.rs index 06435989c8..be300ea913 100644 --- a/fighters/rockman/src/chargeshot/acmd/specials.rs +++ b/fighters/rockman/src/chargeshot/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_chargeshot_regular(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { if is_excute(agent) { let is_charge_max = 1.0 <= WorkModule::get_float(agent.module_accessor, *WEAPON_ROCKMAN_CHARGESHOT_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); let damage; @@ -23,5 +23,5 @@ unsafe extern "C" fn rockman_chargeshot_regular(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_chargeshot_regular); + agent.acmd("game_regular", game_regular); } diff --git a/fighters/rockman/src/chargeshot/status/regular.rs b/fighters/rockman/src/chargeshot/status/regular.rs index 4bf544a332..6df8ec3617 100644 --- a/fighters/rockman/src/chargeshot/status/regular.rs +++ b/fighters/rockman/src/chargeshot/status/regular.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_chargeshot_regular_init(weapon: &mut L2CWeaponCommon) -> L2CValue { +unsafe extern "C" fn regular_init(weapon: &mut L2CWeaponCommon) -> L2CValue { // Original Implementation // let life_min = WorkModule::get_param_int(weapon.module_accessor, hash40("param_chargeshot"), hash40("life_min")); // let life_max = WorkModule::get_param_int(weapon.module_accessor, hash40("param_chargeshot"), hash40("life_max")); @@ -97,6 +97,6 @@ pub fn install(agent: &mut Agent) { agent.status( Init, *WEAPON_ROCKMAN_CHARGESHOT_STATUS_KIND_REGULAR, - rockman_chargeshot_regular_init, + regular_init, ); } \ No newline at end of file diff --git a/fighters/rockman/src/hardknuckle/acmd/aerials.rs b/fighters/rockman/src/hardknuckle/acmd/aerials.rs index fdfa9323e2..27b917e4b4 100644 --- a/fighters/rockman/src/hardknuckle/acmd/aerials.rs +++ b/fighters/rockman/src/hardknuckle/acmd/aerials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_hardknuckle_regular_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -43,7 +43,7 @@ unsafe extern "C" fn rockman_hardknuckle_regular_game(fighter: &mut L2CAgentBase // } } -unsafe extern "C" fn rockman_hardknuckle_regular_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -57,6 +57,6 @@ unsafe extern "C" fn rockman_hardknuckle_regular_effect(fighter: &mut L2CAgentBa } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_hardknuckle_regular_game); - agent.acmd("effect_regular", rockman_hardknuckle_regular_effect); + agent.acmd("game_regular", game_regular); + agent.acmd("effect_regular", effect_regular); } diff --git a/fighters/rockman/src/leafshield/acmd/specials.rs b/fighters/rockman/src/leafshield/acmd/specials.rs index 5901207ed1..cd5cf1dd09 100644 --- a/fighters/rockman/src/leafshield/acmd/specials.rs +++ b/fighters/rockman/src/leafshield/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_leafshield_start(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 @@ -18,7 +18,7 @@ unsafe extern "C" fn rockman_leafshield_start(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_leafshield_shield(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_shield(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 @@ -36,7 +36,7 @@ unsafe extern "C" fn rockman_leafshield_shield(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rockman_leafshield_fly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 @@ -55,10 +55,15 @@ unsafe extern "C" fn rockman_leafshield_fly(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_start", rockman_leafshield_start); - agent.acmd("game_startreverse", rockman_leafshield_start); - agent.acmd("game_shield", rockman_leafshield_shield); - agent.acmd("game_shieldreverse", rockman_leafshield_shield); - agent.acmd("game_fly", rockman_leafshield_fly); - agent.acmd("game_flyreverse", rockman_leafshield_fly); + agent.acmd("game_start", game_start); + + agent.acmd("game_startreverse", game_start); + + agent.acmd("game_shield", game_shield); + + agent.acmd("game_shieldreverse", game_shield); + + agent.acmd("game_fly", game_fly); + + agent.acmd("game_flyreverse", game_fly); } diff --git a/fighters/rockman/src/rockbuster/acmd/specials.rs b/fighters/rockman/src/rockbuster/acmd/specials.rs index e68800a9a0..be64314361 100644 --- a/fighters/rockman/src/rockbuster/acmd/specials.rs +++ b/fighters/rockman/src/rockbuster/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_rockbuster_regular_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 22, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } @@ -15,5 +15,5 @@ unsafe extern "C" fn rockman_rockbuster_regular_game(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", rockman_rockbuster_regular_game); + agent.acmd("game_regular", game_regular); } diff --git a/fighters/rockman/src/status.rs b/fighters/rockman/src/status.rs index bc6dc11099..b3f34201e6 100644 --- a/fighters/rockman/src/status.rs +++ b/fighters/rockman/src/status.rs @@ -17,7 +17,7 @@ mod special_s; mod special_lw; -unsafe extern "C" fn rockman_check_special_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn check_special_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_RELEASE) && VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { fighter.global_table[CMD_CAT1].assign(&L2CValue::I32(*FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_N)); @@ -25,35 +25,29 @@ unsafe extern "C" fn rockman_check_special_uniq(fighter: &mut L2CFighterCommon) false.into() } -unsafe extern "C" fn rockman_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { (!WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD)).into() } -unsafe extern "C" fn rockman_check_turn_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn check_turn_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { let leafshield = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_LEAFSHIELD); WorkModule::set_flag(fighter.module_accessor, leafshield, *FIGHTER_STATUS_TURN_FLAG_NO_TURN_TO_ESCAPE); false.into() } -extern "C" fn agent_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let fighter_kind = utility::get_kind(&mut *fighter.module_accessor); - if fighter_kind != *FIGHTER_KIND_ROCKMAN { - return; - } - fighter.global_table[0x27].assign(&L2CValue::Ptr(rockman_check_special_uniq as *const () as _)); - fighter.global_table[0x26].assign(&L2CValue::Ptr(rockman_check_special_uniq as *const () as _)); - fighter.global_table[DASH_CALLBACK].assign(&false.into()); - fighter.global_table[0x2A].assign(&false.into()); - fighter.global_table[0x2B].assign(&false.into()); - fighter.global_table[0x34].assign(&false.into()); - fighter.global_table[0x35].assign(&L2CValue::Ptr(rockman_check_turn_uniq as *const () as _)); - fighter.global_table[0x4E].assign(&false.into()); - fighter.global_table[USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(rockman_special_lw_uniq as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[0x27].assign(&L2CValue::Ptr(check_special_uniq as *const () as _)); + fighter.global_table[0x26].assign(&L2CValue::Ptr(check_special_uniq as *const () as _)); + fighter.global_table[DASH_CALLBACK].assign(&false.into()); + fighter.global_table[0x2A].assign(&false.into()); + fighter.global_table[0x2B].assign(&false.into()); + fighter.global_table[0x34].assign(&false.into()); + fighter.global_table[0x35].assign(&L2CValue::Ptr(check_turn_uniq as *const () as _)); + fighter.global_table[0x4E].assign(&false.into()); + fighter.global_table[USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(special_lw_uniq as *const () as _)); } -unsafe extern "C" fn rockman_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = MotionModule::motion_kind(fighter.module_accessor); if [ hash40("appeal_lw_l"), @@ -66,8 +60,8 @@ unsafe extern "C" fn rockman_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.on_start(agent_reset); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rockman_rebirth_end); + agent.on_start(on_start); + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); walk::install(agent); diff --git a/fighters/rockman/src/status/attack.rs b/fighters/rockman/src/status/attack.rs index 7a44f2e049..886f3f6737 100644 --- a/fighters/rockman/src/status/attack.rs +++ b/fighters/rockman/src/status/attack.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn rockman_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Attack() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, rockman_attack_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, attack_pre); } diff --git a/fighters/rockman/src/status/attack_air.rs b/fighters/rockman/src/status/attack_air.rs index f2c0c90026..85f44784dd 100644 --- a/fighters/rockman/src/status/attack_air.rs +++ b/fighters/rockman/src/status/attack_air.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); if [ @@ -11,7 +11,7 @@ unsafe extern "C" fn rockman_attack_air_main(fighter: &mut L2CFighterCommon) -> fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) } -unsafe extern "C" fn rockman_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_AttackAir() } @@ -19,7 +19,7 @@ pub fn install(agent: &mut Agent) { agent.status( Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, - rockman_attack_air_main, + attack_air_main, ); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, rockman_attack_air_end); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); } diff --git a/fighters/rockman/src/status/attack_s3.rs b/fighters/rockman/src/status/attack_s3.rs index 8d2837cde6..729d1e17a9 100644 --- a/fighters/rockman/src/status/attack_s3.rs +++ b/fighters/rockman/src/status/attack_s3.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn rockman_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_AttackS3() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, rockman_attack_s3_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_pre); } diff --git a/fighters/rockman/src/status/attack_s4.rs b/fighters/rockman/src/status/attack_s4.rs index ff7490df9d..5b649a37a8 100644 --- a/fighters/rockman/src/status/attack_s4.rs +++ b/fighters/rockman/src/status/attack_s4.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn rockman_attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackS4() } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, rockman_attack_s4_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); } diff --git a/fighters/rockman/src/status/helper.rs b/fighters/rockman/src/status/helper.rs index 8fd5a8f51f..edb48e6a9b 100644 --- a/fighters/rockman/src/status/helper.rs +++ b/fighters/rockman/src/status/helper.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe fn rockman_special_motion_helper( +pub unsafe fn special_motion_helper( fighter: &mut L2CFighterCommon, mot_g: L2CValue, mot_a: L2CValue, diff --git a/fighters/rockman/src/status/ladder_attack.rs b/fighters/rockman/src/status/ladder_attack.rs index 4dce5234fd..f3532b1b64 100644 --- a/fighters/rockman/src/status/ladder_attack.rs +++ b/fighters/rockman/src/status/ladder_attack.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn rockman_ladder_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn ladder_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_LadderAttack_common(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); if [ @@ -11,7 +11,7 @@ unsafe extern "C" fn rockman_ladder_attack_main(fighter: &mut L2CFighterCommon) fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_LadderAttack_Main as *const () as _)) } -unsafe extern "C" fn rockman_ladder_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn ladder_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_LadderAttack() } @@ -19,11 +19,11 @@ pub fn install(agent: &mut Agent) { agent.status( Main, *FIGHTER_STATUS_KIND_LADDER_ATTACK, - rockman_ladder_attack_main, + ladder_attack_main, ); agent.status( End, *FIGHTER_STATUS_KIND_LADDER_ATTACK, - rockman_ladder_attack_end, + ladder_attack_end, ); } diff --git a/fighters/rockman/src/status/rockbuster/helper.rs b/fighters/rockman/src/status/rockbuster/helper.rs index 3be0c0612f..f91eb81e71 100644 --- a/fighters/rockman/src/status/rockbuster/helper.rs +++ b/fighters/rockman/src/status/rockbuster/helper.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe fn rockman_rockbuster_pre_helper( +pub unsafe fn rockbuster_pre_helper( prev_status: L2CValue ) -> L2CValue { [ @@ -15,7 +15,7 @@ pub unsafe fn rockman_rockbuster_pre_helper( ].contains(&prev_status.get_i32()).into() } -pub unsafe fn rockman_rockbuster_main_helper( +pub unsafe fn rockbuster_main_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, is_jump_squat: L2CValue, @@ -62,12 +62,12 @@ pub unsafe fn rockman_rockbuster_main_helper( } if !is_turn.get_bool() { let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), step.into(), (!step_is_zero).into(), is_jump_squat.get_bool().into(), was_shoot_walk.get_bool().into()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), step.into(), (!step_is_zero).into(), is_jump_squat.get_bool().into(), was_shoot_walk.get_bool().into()); } WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT_MINI_JUMP_ATTACK); } -pub unsafe fn rockman_rockbuster_main_loop_helper( +pub unsafe fn rockbuster_main_loop_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, is_walk: L2CValue @@ -94,17 +94,17 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( let mut allow_end = true; if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND && fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_TURN != 0 - && rockman_rockbuster_can_turn_helper(fighter).get_bool() { + && rockbuster_can_turn_helper(fighter).get_bool() { allow_end = false; } if allow_end && is_end { if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT_END) { - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); step = 2; } else { - step = rockman_rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); + step = rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT_END); } } @@ -112,7 +112,7 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( else if step == 2 { if is_end { WorkModule::inc_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); - step = rockman_rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); + step = rockbuster_shoot_end_helper(fighter, step.into(), is_air.get_bool().into(), is_walk.get_bool().into()).get_i32(); } } else if step == 3 && is_end { @@ -127,7 +127,7 @@ pub unsafe fn rockman_rockbuster_main_loop_helper( ret.into() } -pub unsafe fn rockman_rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) -> L2CValue { let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); let count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); if step == 1 @@ -146,7 +146,7 @@ pub unsafe fn rockman_rockbuster_can_turn_helper(fighter: &mut L2CFighterCommon) false.into() } -pub unsafe fn rockman_rockbuster_shoot_end_helper( +pub unsafe fn rockbuster_shoot_end_helper( fighter: &mut L2CFighterCommon, _step: L2CValue, is_air: L2CValue, @@ -156,7 +156,7 @@ pub unsafe fn rockman_rockbuster_shoot_end_helper( let count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); if count < 3 { if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_LOOP) { - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 2.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); ControlModule::reset_trigger(fighter.module_accessor); ControlModule::clear_command(fighter.module_accessor, false); @@ -165,11 +165,11 @@ pub unsafe fn rockman_rockbuster_shoot_end_helper( return 2.into(); } } - rockman_rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 3.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); + rockbuster_change_motion_helper(fighter, is_air.get_bool().into(), 3.into(), false.into(), is_walk.get_bool().into(), L2CValue::Void()); 3.into() } -pub unsafe fn rockman_rockbuster_change_motion_helper( +pub unsafe fn rockbuster_change_motion_helper( fighter: &mut L2CFighterCommon, is_air: L2CValue, step: L2CValue, @@ -307,7 +307,7 @@ pub unsafe fn rockman_rockbuster_change_motion_helper( } } -pub unsafe extern "C" fn rockman_rockbuster_walk_mot_helper(_fighter: &mut L2CFighterCommon, walk_mot: L2CValue, curr_mot: L2CValue) -> L2CValue { +pub unsafe extern "C" fn rockbuster_walk_mot_helper(_fighter: &mut L2CFighterCommon, walk_mot: L2CValue, curr_mot: L2CValue) -> L2CValue { let curr = curr_mot.get_u64(); let walk = walk_mot.get_u64(); if curr == hash40("walk_fast") diff --git a/fighters/rockman/src/status/rockbuster/shoot_air.rs b/fighters/rockman/src/status/rockbuster/shoot_air.rs index f1155f573c..291d691d26 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_air.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_air.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let status_attr_add = if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_SPECIAL_N { fighter.sub_status_pre_SpecialNCommon(); *FIGHTER_STATUS_ATTR_START_TURN @@ -44,22 +44,22 @@ unsafe extern "C" fn rockman_rockbuster_shoot_air_pre(fighter: &mut L2CFighterCo 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_flick_x(fighter.module_accessor); ControlModule::reset_flick_sub_x(fighter.module_accessor); fighter.global_table[FLICK_X].assign(&L2CValue::I32(0xFE)); - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { fighter.sub_set_pass(); } fighter.set_situation(SITUATION_KIND_AIR.into()); GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_FALL); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_air_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_air_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -83,11 +83,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_AIR, - rockman_rockbuster_shoot_air_pre, + rockbuster_shoot_air_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_AIR, - rockman_rockbuster_shoot_air_main, + rockbuster_shoot_air_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_jump.rs b/fighters/rockman/src/status/rockbuster/shoot_jump.rs index 4fefc44511..d2f28b4163 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_jump.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_jump.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), @@ -36,13 +36,13 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_jump_main_loop as *const () as _)) +unsafe extern "C" fn rockbuster_shoot_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_jump_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_jump_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -66,11 +66,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP, - rockman_rockbuster_shoot_jump_pre, + rockbuster_shoot_jump_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP, - rockman_rockbuster_shoot_jump_main, + rockbuster_shoot_jump_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs b/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs index 2022e21a01..e786e0ca91 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_jump_squat.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), @@ -36,7 +36,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_pre(fighter: &mut L2CFi 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_jump_life = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_STICK_JUMP_COMMAND_LIFE); if stick_jump_life == 0 || fighter.global_table[FLICK_Y_DIR].get_i32() <= 0 { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_BUTTON); @@ -53,7 +53,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CF WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); } - rockman_rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); MotionModule::change_motion( fighter.module_accessor, Hash40::new("jump_squat_buster"), @@ -65,13 +65,13 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main(fighter: &mut L2CF false ); if !StopModule::is_stop(fighter.module_accessor) { - rockman_rockbuster_shoot_jump_squat_substatus(fighter, false.into()); + rockbuster_shoot_jump_squat_substatus(fighter, false.into()); } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(rockman_rockbuster_shoot_jump_squat_substatus as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_jump_squat_main_loop as *const () as _)) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(rockbuster_shoot_jump_squat_substatus as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_jump_squat_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_substatus(fighter: &mut L2CFighterCommon, param_2: L2CValue) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_jump_squat_substatus(fighter: &mut L2CFighterCommon, param_2: L2CValue) -> L2CValue { if !param_2.get_bool() { fighter.sub_jump_squat_uniq_check_sub(FIGHTER_ROCKMAN_STATUS_ROCKBUSTER_SHOOT_JUMP_WORK_ID_FLAG_BUTTON.into()); fighter.sub_jump_squat_uniq_check_sub_mini_attack(); @@ -79,8 +79,8 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_substatus(fighter: &mut 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_jump_squat_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_jump_squat_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if sit == *SITUATION_KIND_AIR { let status = if helper_ret { @@ -109,11 +109,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP_SQUAT, - rockman_rockbuster_shoot_jump_squat_pre, + rockbuster_shoot_jump_squat_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_JUMP_SQUAT, - rockman_rockbuster_shoot_jump_squat_main, + rockbuster_shoot_jump_squat_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_landing.rs b/fighters/rockman/src/status/rockbuster/shoot_landing.rs index 6bdb740299..11ee690db9 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_landing.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_landing.rs @@ -1,9 +1,9 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_landing_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_landing_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - let was_rockbuster_status = rockman_rockbuster_pre_helper(prev_status.into()).get_bool(); + let was_rockbuster_status = rockbuster_pre_helper(prev_status.into()).get_bool(); let fs_succeeds_add = if was_rockbuster_status || prev_status == *FIGHTER_STATUS_KIND_ATTACK_AIR { *FS_SUCCEEDS_KEEP_SLOPE } @@ -44,15 +44,15 @@ unsafe extern "C" fn rockman_rockbuster_shoot_landing_pre(fighter: &mut L2CFight 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); +unsafe extern "C" fn rockbuster_shoot_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, true.into(), false.into(), L2CValue::Void(), L2CValue::Void()); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_landing_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_landing_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_landing_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_landing_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, true.into(), false.into()).get_bool(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -99,11 +99,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING, - rockman_rockbuster_shoot_landing_pre, + rockbuster_shoot_landing_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING, - rockman_rockbuster_shoot_landing_main, + rockbuster_shoot_landing_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_turn.rs b/fighters/rockman/src/status/rockbuster/shoot_turn.rs index 8020bb28b1..b98f715143 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_turn.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_turn.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_turn_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_turn_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), @@ -35,15 +35,15 @@ unsafe extern "C" fn rockman_rockbuster_shoot_turn_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_turn_main(fighter: &mut L2CFighterCommon) -> L2CValue { - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); +unsafe extern "C" fn rockbuster_shoot_turn_main(fighter: &mut L2CFighterCommon) -> L2CValue { + rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); PostureModule::reverse_lr(fighter.module_accessor); let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); if step == 2 { WorkModule::inc_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_COUNT); } WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); + rockbuster_main_helper(fighter, false.into(), false.into(), false.into(), true.into()); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_LOOP); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_L_SHOULDER_FIX); let ude_motion = MotionModule::motion_kind_partial(fighter.module_accessor, *FIGHTER_ROCKMAN_MOTION_PART_SET_UDE); @@ -62,10 +62,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_turn_main(fighter: &mut L2CFighter false, false ); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_turn_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_turn_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_turn_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_turn_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let helper_ret = false; let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { @@ -120,11 +120,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN, - rockman_rockbuster_shoot_turn_pre, + rockbuster_shoot_turn_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN, - rockman_rockbuster_shoot_turn_main, + rockbuster_shoot_turn_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_wait.rs b/fighters/rockman/src/status/rockbuster/shoot_wait.rs index 5941e86695..b7cd72b8df 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_wait.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_wait.rs @@ -1,14 +1,14 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mut status_data_arg = 0; let step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_INT_ROCKBUSTER_STEP); if step != 0 { status_data_arg = 0; } let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - let was_rockbuster_status = rockman_rockbuster_pre_helper(prev_status.into()).get_bool(); + let was_rockbuster_status = rockbuster_pre_helper(prev_status.into()).get_bool(); let fs_succeeds_add = if was_rockbuster_status || prev_status == *FIGHTER_STATUS_KIND_ATTACK_AIR { *FS_SUCCEEDS_KEEP_SLOPE } @@ -58,18 +58,18 @@ unsafe extern "C" fn rockman_rockbuster_shoot_wait_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); let was_walk = fighter.global_table[PREV_STATUS_KIND].get_i32() == *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK; - rockman_rockbuster_main_helper(fighter, false.into(), false.into(), was_walk.into(), L2CValue::Void()); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_wait_main_loop as *const () as _)) + rockbuster_main_helper(fighter, false.into(), false.into(), was_walk.into(), L2CValue::Void()); + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_wait_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), false.into()).get_bool(); +unsafe extern "C" fn rockbuster_shoot_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), false.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() @@ -123,7 +123,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_wait_main_loop(fighter: &mut L2CFi } if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_TURN != 0 && !helper_ret - && rockman_rockbuster_can_turn_helper(fighter).get_bool() { + && rockbuster_can_turn_helper(fighter).get_bool() { fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_TURN.into(), true.into()); return 1.into(); } @@ -148,11 +148,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT, - rockman_rockbuster_shoot_wait_pre, + rockbuster_shoot_wait_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT, - rockman_rockbuster_shoot_wait_main, + rockbuster_shoot_wait_main, ); } diff --git a/fighters/rockman/src/status/rockbuster/shoot_walk.rs b/fighters/rockman/src/status/rockbuster/shoot_walk.rs index 4a28d6cf52..b51affe3d2 100644 --- a/fighters/rockman/src/status/rockbuster/shoot_walk.rs +++ b/fighters/rockman/src/status/rockbuster/shoot_walk.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_rockbuster_shoot_walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); let keep_flag; let keep_int; @@ -51,7 +51,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_pre(fighter: &mut L2CFighterC 0.into() } -unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); if prev_status != *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WAIT { fighter.sub_GetLightItemImm(L2CValue::Void()); @@ -62,7 +62,7 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighter WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - rockman_rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); + rockbuster_main_helper(fighter, false.into(), true.into(), L2CValue::Void(), L2CValue::Void()); if prev_status != *FIGHTER_STATUS_KIND_WALK { let walk_speed_max = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_speed_max"), 0); fighter.init_walk_speed( @@ -82,10 +82,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main(fighter: &mut L2CFighter 1.0f32.into() ); } - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_rockbuster_shoot_walk_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(rockbuster_shoot_walk_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_rockbuster_shoot_walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rockbuster_shoot_walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let walk_speed = WorkModule::get_float(fighter.module_accessor, *FIGHTER_STATUS_WALK_WORK_FLOAT_SPEED); let walk_speed_max = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_speed_max"), 0); let walk_accel_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("walk_accel_mul"), 0); @@ -108,10 +108,10 @@ unsafe extern "C" fn rockman_rockbuster_shoot_walk_main_loop(fighter: &mut L2CFi hash40("buster_walk_slow").into(), FIGHTER_STATUS_WALK_WORK_FLOAT_SPEED.into(), 1.0f32.into(), - L2CValue::Ptr(rockman_rockbuster_walk_mot_helper as *const () as _) + L2CValue::Ptr(rockbuster_walk_mot_helper as *const () as _) ); - let helper_ret = rockman_rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); + let helper_ret = rockbuster_main_loop_helper(fighter, false.into(), true.into()).get_bool(); let sit = fighter.global_table[SITUATION_KIND].get_i32(); if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() @@ -184,11 +184,11 @@ pub fn install(agent: &mut Agent) { agent.status( Pre, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK, - rockman_rockbuster_shoot_walk_pre, + rockbuster_shoot_walk_pre, ); agent.status( Main, *FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_WALK, - rockman_rockbuster_shoot_walk_main, + rockbuster_shoot_walk_main, ); } diff --git a/fighters/rockman/src/status/special_lw.rs b/fighters/rockman/src/status/special_lw.rs index 1f61c1db9f..431cbd0e1a 100644 --- a/fighters/rockman/src/status/special_lw.rs +++ b/fighters/rockman/src/status/special_lw.rs @@ -1,14 +1,14 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_lw_main_loop as *const () as _)) +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); if StatusModule::is_changing(fighter.module_accessor) || StatusModule::is_situation_changed(fighter.module_accessor) { - rockman_special_motion_helper( + special_motion_helper( fighter, hash40("special_lw").into(), hash40("special_air_lw").into(), @@ -49,6 +49,6 @@ pub fn install(agent: &mut Agent) { agent.status( Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, - rockman_special_lw_main, + special_lw_main, ); } diff --git a/fighters/rockman/src/status/special_n.rs b/fighters/rockman/src/status/special_n.rs index 788da2d750..02bc371ee6 100644 --- a/fighters/rockman/src/status/special_n.rs +++ b/fighters/rockman/src/status/special_n.rs @@ -4,7 +4,7 @@ use super::helper::*; pub const CHARGE_SHOT_DELAY_CHARGE_FRAME : i32 = 50; pub const CHARGE_SHOT_MAX_FRAME : i32 = 160; -unsafe extern "C" fn rockman_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if !VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { let prev_escape = fighter.global_table[PREV_STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ESCAPE; @@ -49,17 +49,17 @@ unsafe extern "C" fn rockman_special_n_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn rockman_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::rockman::status::CHARGE_SHOT_KEEP_CHARGE); let charge_frame = VarModule::get_int(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_FRAME); let top = charge_frame as f32 - CHARGE_SHOT_DELAY_CHARGE_FRAME as f32; let bottom = CHARGE_SHOT_MAX_FRAME as f32 - CHARGE_SHOT_DELAY_CHARGE_FRAME as f32; let ratio = top / bottom; WorkModule::set_float(fighter.module_accessor, ratio, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE); - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_n_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); if StatusModule::is_situation_changed(fighter.module_accessor) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { @@ -68,7 +68,7 @@ unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) } } if StatusModule::is_changing(fighter.module_accessor) || StatusModule::is_situation_changed(fighter.module_accessor) { - rockman_special_motion_helper( + special_motion_helper( fighter, hash40("buster_charge_shot").into(), hash40("buster_air_charge_shot").into(), @@ -100,12 +100,12 @@ unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn rockman_special_n_end(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(_fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, rockman_special_n_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); } diff --git a/fighters/rockman/src/status/special_s.rs b/fighters/rockman/src/status/special_s.rs index f1198234a1..2d8fa0dc4d 100644 --- a/fighters/rockman/src/status/special_s.rs +++ b/fighters/rockman/src/status/special_s.rs @@ -1,7 +1,7 @@ use super::*; use super::helper::*; -unsafe extern "C" fn rockman_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -34,7 +34,7 @@ unsafe extern "C" fn rockman_special_s_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn rockman_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_METALBLADE) { LinkModule::send_event_nodes( fighter.module_accessor, @@ -44,10 +44,10 @@ unsafe extern "C" fn rockman_special_s_main(fighter: &mut L2CFighterCommon) -> L ); WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_ID_FLAG_ALREADY_EXIST_METALBLADE); } - fighter.sub_shift_status_main(L2CValue::Ptr(rockman_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let sit = fighter.global_table[SITUATION_KIND].get_i32(); let mut change_motion = false; if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_ID_FLAG_STICK_CHECK_FRAME_END) { @@ -100,7 +100,7 @@ unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) mot_a = hash40("special_air_n"); } } - rockman_special_motion_helper( + special_motion_helper( fighter, mot_g.into(), mot_a.into(), @@ -132,7 +132,7 @@ unsafe extern "C" fn rockman_special_s_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn rockman_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { if WorkModule::get_int(fighter.module_accessor, *FIGHTER_ROCKMAN_STATUS_SPECIAL_N_WORK_INT_METALBLADE_ID) != 0 { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x29b79a80a1)); } @@ -140,7 +140,7 @@ unsafe extern "C" fn rockman_special_s_end(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, rockman_special_s_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); } diff --git a/fighters/rockman/src/status/walk.rs b/fighters/rockman/src/status/walk.rs index 150feaa694..3190182b90 100644 --- a/fighters/rockman/src/status/walk.rs +++ b/fighters/rockman/src/status/walk.rs @@ -3,7 +3,7 @@ use globals::*; // FIGHTER_STATUS_KIND_WALK -pub unsafe extern "C" fn pre_walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn walk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ground_brake = WorkModule::get_param_float(fighter.module_accessor, hash40("ground_brake"), 0); let mut initial_speed = VarModule::get_float(fighter.battle_object, vars::common::instance::CURR_DASH_SPEED); @@ -20,7 +20,7 @@ pub unsafe extern "C" fn pre_walk(fighter: &mut L2CFighterCommon) -> L2CValue { smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_WALK)(fighter) } -pub unsafe extern "C" fn walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_WALK_FLAG_SLIP); WorkModule::enable_transition_term_group(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL); WorkModule::enable_transition_term_group(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ITEM); @@ -34,15 +34,15 @@ pub unsafe extern "C" fn walk(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::unable_transition_term_group_ex(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_SLIP); - fighter.sub_shift_status_main(L2CValue::Ptr(walk_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(walk_main_loop as *const () as _)) } -unsafe extern "C" fn walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn walk_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_Walk_Main(); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk); - agent.status(Main, *FIGHTER_STATUS_KIND_WALK, walk); + agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, walk_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WALK, walk_main); } From 97627086b7b59fd1678132f9383f354b2b1d3cd0 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Wed, 13 Mar 2024 20:23:19 -0400 Subject: [PATCH 003/172] Mega Man fighter > agent --- fighters/rockman/src/acmd/aerials.rs | 150 ++++++++++++------------- fighters/rockman/src/acmd/ground.rs | 80 +++++++------- fighters/rockman/src/acmd/other.rs | 72 ++++++------ fighters/rockman/src/acmd/smashes.rs | 84 +++++++------- fighters/rockman/src/acmd/specials.rs | 152 +++++++++++++------------- fighters/rockman/src/acmd/throws.rs | 68 ++++++------ fighters/rockman/src/acmd/tilts.rs | 80 +++++++------- 7 files changed, 343 insertions(+), 343 deletions(-) diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index 8575617878..bbfe2b115f 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -63,169 +63,169 @@ unsafe extern "C" fn expression_attackairnmelee(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0, 55, 84, 0, 60, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 11.0, 55, 84, 0, 60, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0, 55, 84, 0, 60, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 10.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("havel"), 9.0, 58, 64, 0, 35, 3.0, 0.0, 10.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_flamesword"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_flamesword"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("rockman_flamesword_ptc"), Hash40::new("top"), 0, 9.0, 0.0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("rockman_flamesword_arc"), Hash40::new("top"), 0.0, 9.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("rockman_flamesword_ptc"), Hash40::new("top"), 0, 9.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_flamesword_arc"), Hash40::new("top"), 0.0, 9.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("rockman_flamesword"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("rockman_flamesword"), -1); } } -unsafe extern "C" fn expression_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 2.0 / 3.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0 / 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 5.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.0, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 5.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.0, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 6.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.5, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 6.0, 0.0, 9.5, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 365, 19, 0, 40, 3.5, 0.0, 9.5, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 7.6, 0.0, 9.5, -13.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 4.5, 0.0, 9.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 7.6, 0.0, 9.5, -13.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 200, 0, 20, 4.5, 0.0, 9.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_slashcraw"), Hash40::new("rockman_slashcraw"), Hash40::new("top"), 0, 10, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 3.0 / 2.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_slashcraw"), Hash40::new("rockman_slashcraw"), Hash40::new("top"), 0, 10, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 3.0 / 2.0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(9.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(9.0 - 1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_AIRSHOOTER, false, 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(23.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(23.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_HARDKNUCKLE, false, 0); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index a41735e4a1..5e992a3ed3 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -183,68 +183,68 @@ unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0 / (22.0 - 8.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 70, 0, 60, 4.0, 0.0, 5.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0 / (22.0 - 8.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 70, 0, 60, 4.0, 0.0, 5.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 65, 70, 0, 75, 2.5, 0.0, 5.0, 3.5, Some(0.0), Some(10.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 65, 70, 0, 75, 2.5, 0.0, 5.0, 3.5, Some(0.0), Some(10.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 14.0 / (58.0 - 25.0)); + FT_MOTION_RATE(agent, 14.0 / (58.0 - 25.0)); } frame(lua_state, 58.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 8, 0, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 11, -1, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 3, -6, 0, 180, 0, 0.6, true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 8, 0, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 11, -1, 0, 180, 0, 0.55, true, *EF_FLIP_YZ, 0.6); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 3, -6, 0, 180, 0, 0.6, true, *EF_FLIP_YZ, 0.6); } wait(lua_state, 5.0); } - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_rockman_attackhard_l01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_rockman_attackhard_l01")); } } -unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 6); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_LEFT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_RIGHT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 6); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_LEFT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), FIGHTER_ROCKMAN_ARM_RIGHT, FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitm"), @@ -254,12 +254,12 @@ unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 6); } wait(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 6); } } diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 6fccec44d9..171659128b 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -1,43 +1,43 @@ use super::*; -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_rockman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_rockman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_rockman_step_right_m"), Hash40::new("se_rockman_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_rockman_step_right_m"), Hash40::new("se_rockman_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_rockman_step_left_m"), Hash40::new("se_rockman_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_rockman_step_left_m"), Hash40::new("se_rockman_step_right_m")); } } -unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } @@ -45,16 +45,16 @@ unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { /* #[acmd_script( agent = "rockman_crashbomb", script = "game_regular" , category = ACMD_GAME , low_priority)] -unsafe fn rockman_crashbomb_stick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe fn rockman_crashbomb_stick_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("body").hash as i64, Hash40::new("body_open").hash as i64); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(owner_boma, rockman::DETONATE_CRASHBOMB){ ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -63,32 +63,32 @@ unsafe fn rockman_crashbomb_stick_game(fighter: &mut L2CAgentBase) { } */ -unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index adcf88843b..77ed4f8e96 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -292,86 +292,86 @@ unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, 6.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, -8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, 6.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 120, 100, 160, 0, 5.0, 0.0, 8.0, -8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 90, 100, 40, 0, 3.0, 0.0, 9.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 2.3, 0.0, 23.799999, 3.0, Some(0.0), Some(23.799999), Some(-3.0), 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 7.0, 0.0, 19.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 90, 100, 40, 0, 3.0, 0.0, 9.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 2.3, 0.0, 23.799999, 3.0, Some(0.0), Some(23.799999), Some(-3.0), 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 366, 100, 15, 0, 7.0, 0.0, 19.0, 0.0, None, None, None, 0.0, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 11.0, 0.0, 19.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 11.0, 0.0, 19.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 90, 188, 0, 34, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.818); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.818); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 31, 5.5, 0.0, 5.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 80, 101, 0, 30, 4.3, 0.0, 15.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 4.0, 0.0, 4.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 65, 114, 0, 30, 2.0, 0.0, 14.0, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index 7cb8a6e4ec..c7b8ac1b60 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -1,60 +1,60 @@ use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 12.6, 5.5, Some(0.0), Some(6.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 9.6, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 12.6, 5.5, Some(0.0), Some(6.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 90, 0, 60, 3.0, 0.0, 9.6, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(25.0 - 5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(25.0 - 5.0)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_ROCKBUSTER, false, 0); WorkModule::on_flag(boma, *FIGHTER_ROCKMAN_INSTANCE_WORK_ID_FLAG_ROCKBUSTER_SHOOT); - // ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - // ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 9.6, 5.5, Some(0.0), Some(3.7), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 135, 0, 40, 3.0, 0.0, 8.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + // ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 2.5, 0.0, 3.2, 5.5, Some(0.0), Some(3.2), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } @@ -117,82 +117,82 @@ unsafe extern "C" fn expression_busterchargeshot(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, false, 0); } else{ - //VarModule::on_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + //VarModule::on_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *WEAPON_ROCKMAN_CRASHBOMB_STATUS_KIND_EXPLODE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - FT_MOTION_RATE(fighter, 15.0 / (44.0 - 19.0)); + FT_MOTION_RATE(agent, 15.0 / (44.0 - 19.0)); } } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 11, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_light"), Hash40::new("havel"), 0, 0, 1.2, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_light"), Hash40::new("havel"), 0, 0, 1.2, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("rockman_clashbomb_misfire"), Hash40::new("rockman_clashbomb_misfire"), Hash40::new("top"), 0, 7.5, 10, 0, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.3, 9.8, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_clashbomb_misfire"), Hash40::new("rockman_clashbomb_misfire"), Hash40::new("top"), 0, 7.5, 10, 0, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //VarModule::off_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, false, 0); } else{ - //VarModule::on_flag(fighter.battle_object, vars::rockman::DETONATE_CRASHBOMB); + //VarModule::on_flag(agent.battle_object, vars::rockman::DETONATE_CRASHBOMB); ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *WEAPON_ROCKMAN_CRASHBOMB_STATUS_KIND_EXPLODE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -200,35 +200,35 @@ unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_start"), Hash40::new("top"), 0, 7, 10, 0, -90, 0, 0.62, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 5.0, 0, 0, 0, 0, 0, 1.2, 3, 3, 3, 0, 0, 0, false); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_ROCKMAN_STATUS_SPECIAL_S_WORK_ID_FLAG_ALREADY_EXIST_CRASHBOMB){ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("rockman_clashbomb_fire"), Hash40::new("top"), 0, 7.5, 11, 0, -0.0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } diff --git a/fighters/rockman/src/acmd/throws.rs b/fighters/rockman/src/acmd/throws.rs index 52109d53d2..c74c8e23ab 100644 --- a/fighters/rockman/src/acmd/throws.rs +++ b/fighters/rockman/src/acmd/throws.rs @@ -1,67 +1,67 @@ use super::*; -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 13); + CHECK_FINISH_CAMERA(agent, 13, 13); } frame(lua_state, 18.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 14.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 14.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 21); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 75, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 75, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 7, 1); - CHECK_FINISH_CAMERA(fighter, 10, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 7, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index 6fd0837153..768efc3b2d 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -78,82 +78,82 @@ unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0 / (6.0 - 5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0 / (6.0 - 5.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 85, 73, 0, 84, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 85, 73, 0, 84, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 85, 54, 0, 80, 6.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 85, 54, 0, 80, 6.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 70, 80, 0, 70, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 10.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 10.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_power"), Hash40::new("armr"), 3.5, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_power"), Hash40::new("armr"), 3.5, 0, 0, 0, 0, 0, 1, true); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), 4, 3, -2, 5, 0, 10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), 4, 3, -2, 5, 0, 10, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), -4, 3, -2, 5, 0, -10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rockman_rockupper_arc"), Hash40::new("trans"), -4, 3, -2, 5, 0, -10, 1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("rockman_rockupper_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("rockman_rockupper_arc"), -1); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("rockman_rockupper_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("rockman_rockupper_arc"), true, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("rockman_rockupper_power"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("rockman_rockupper_power"), false, true); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.75); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.75); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0 / (22.0 - 5.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 67, 60, 0, 70, 3.25, 0.0, 3.2, 3.5, Some(0.0), Some(3.2), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0 / (22.0 - 5.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 67, 60, 0, 70, 3.25, 0.0, 3.2, 3.5, Some(0.0), Some(3.2), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 30.0 / (46.0 - 22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 30.0 / (46.0 - 22.0)); JostleModule::set_status(boma, true); AttackModule::clear_all(boma); } From 38ff3c788481aea16b86aefe8f4315eeb7365fdd Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 14 Mar 2024 10:14:00 -0500 Subject: [PATCH 004/172] stebe --- fighters/pickel/src/acmd/aerials.rs | 413 ++++++++----------- fighters/pickel/src/acmd/other.rs | 317 +++++++------- fighters/pickel/src/acmd/smashes.rs | 29 +- fighters/pickel/src/acmd/specials.rs | 50 +-- fighters/pickel/src/acmd/throws.rs | 61 ++- fighters/pickel/src/acmd/tilts.rs | 297 +++++-------- fighters/pickel/src/fire/acmd/mod.rs | 7 + fighters/pickel/src/fire/acmd/tilts.rs | 74 ++++ fighters/pickel/src/fire/mod.rs | 9 + fighters/pickel/src/forge/acmd/aerials.rs | 64 +++ fighters/pickel/src/forge/acmd/mod.rs | 7 + fighters/pickel/src/forge/mod.rs | 11 + fighters/pickel/src/forge/opff.rs | 26 ++ fighters/pickel/src/lib.rs | 36 +- fighters/pickel/src/melt/acmd/mod.rs | 7 + fighters/pickel/src/melt/acmd/other.rs | 31 ++ fighters/pickel/src/melt/mod.rs | 9 + fighters/pickel/src/opff.rs | 150 +++---- fighters/pickel/src/status.rs | 120 +++--- fighters/pickel/src/trolley/acmd/mod.rs | 7 + fighters/pickel/src/trolley/acmd/specials.rs | 28 ++ fighters/pickel/src/trolley/mod.rs | 11 + fighters/pickel/src/trolley/opff.rs | 32 ++ 23 files changed, 935 insertions(+), 861 deletions(-) create mode 100644 fighters/pickel/src/fire/acmd/mod.rs create mode 100644 fighters/pickel/src/fire/acmd/tilts.rs create mode 100644 fighters/pickel/src/fire/mod.rs create mode 100644 fighters/pickel/src/forge/acmd/aerials.rs create mode 100644 fighters/pickel/src/forge/acmd/mod.rs create mode 100644 fighters/pickel/src/forge/mod.rs create mode 100644 fighters/pickel/src/forge/opff.rs create mode 100644 fighters/pickel/src/melt/acmd/mod.rs create mode 100644 fighters/pickel/src/melt/acmd/other.rs create mode 100644 fighters/pickel/src/melt/mod.rs create mode 100644 fighters/pickel/src/trolley/acmd/mod.rs create mode 100644 fighters/pickel/src/trolley/acmd/specials.rs create mode 100644 fighters/pickel/src/trolley/mod.rs create mode 100644 fighters/pickel/src/trolley/opff.rs diff --git a/fighters/pickel/src/acmd/aerials.rs b/fighters/pickel/src/acmd/aerials.rs index e00e26fcf8..cc23030b60 100644 --- a/fighters/pickel/src/acmd/aerials.rs +++ b/fighters/pickel/src/acmd/aerials.rs @@ -3,42 +3,42 @@ use super::*; // Note: Neutral air is handled in tilts.rs, as it shares a script with forward tilt/jab -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_MINI_FRAME) != 0 { // sword hitboxes frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 6.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 6.0); } } else { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 3.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); MotionModule::set_rate(boma, 1.5); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.5); @@ -56,17 +56,17 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); @@ -78,16 +78,16 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind == gold { MotionModule::set_rate(boma, 3.625); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 3.625); @@ -100,15 +100,15 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { } else { //pickaxe hitboxes frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_PICK, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0 / (7.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0 / (7.0 - 1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); @@ -122,56 +122,56 @@ unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { damage = [11.0, 14.0, 12.5, 15.0]; // damage for diamond } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), damage[0], 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[0], 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), damage[0], 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[0], 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[1], 361, 69, 0, 56, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), damage[2], 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[2], 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[3], 275, 55, 0, 25, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[3], 275, 65, 0, 80, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), damage[2], 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[2], 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[3], 275, 55, 0, 25, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[3], 275, 65, 0, 80, 5.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } } else { // fist hitboxes - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.5, 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.5, 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.5, 55, 63, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.5, 55, 63, 0, 56, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if material_kind == gold { - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } -unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -193,27 +193,27 @@ unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_sword_flare_diamond", "pickel_atk_slash_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 6.5, 0.6, -13, -33, -83, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 6.5, 0.6, -13, -33, -83, 1.15, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effect frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } else { @@ -231,73 +231,73 @@ unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_pick_flare_diamond", "pickel_atk_pick_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1, 8.5, 4, -10, -35, -75.7, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1, 8.5, 4, -10, -35, -75.7, 1, true, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 1.1); + LAST_EFFECT_SET_RATE(agent, 1.1); } else { - LAST_EFFECT_SET_RATE(fighter, 0.6); + LAST_EFFECT_SET_RATE(agent, 0.6); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effect frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 10.7, 2.6, -10, -20, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_MINI_FRAME) != 0 { // sword hitboxes frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 10.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 10.0); } } else { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 5.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 5.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.5); material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); @@ -315,17 +315,17 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"),damage, 45, 134, 0, 27, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 4, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 11.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, -5.4, Some(0.0), Some(6.8), Some(-10.2), 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); @@ -337,16 +337,16 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind == gold { MotionModule::set_rate(boma, 2.15); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 2.15); @@ -359,11 +359,11 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { } else { // pickaxe hitboxes frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_PICK, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); @@ -377,42 +377,41 @@ unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { damage = [13.5, 17.0]; // damage for diamond } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage[0], 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), damage[1], 361, 85, 0, 51, 5.4, 0.0, 4.4, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 6.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } } else { // fist hitboxes - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.7, 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.7, 50, 85, 0, 56, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if material_kind == gold { - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } - -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -434,28 +433,28 @@ unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_sword_flare_diamond", "pickel_atk_slash_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1.25, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 5.9, -2.0, -140, 30, -55, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 1.85, 5.9, -2.0, -140, 30, -55, 1.15, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } } else { // fist effects frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } else { @@ -473,60 +472,60 @@ unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { effect = ["pickel_pick_flare_diamond", "pickel_atk_pick_diamond"]; } if [wood, stone, iron, gold, diamond].contains(&material_kind) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 0, 9.7, -4, 180, 35, -100, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), 0, 9.7, -4, 180, 35, -100, 1, true, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 0.95); + LAST_EFFECT_SET_RATE(agent, 0.95); } else { - LAST_EFFECT_SET_RATE(fighter, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.55); } } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[0]), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[0]), false, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new(effect[1]), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new(effect[1]), true, true); } } else { // fist effects frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11.2, -3, 190, 15, -90, 0.6, true, *EF_FLIP_YZ, 0.06); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_AXE, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.8); } else { @@ -534,7 +533,7 @@ unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); if [wood, stone, iron, gold, diamond].contains(&material_kind) { let mut damage = 5.5; // default damage, used for wood and gold @@ -546,36 +545,36 @@ unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { damage = 8.7; // damage for diamond } WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 71, 76, 0, 48, 5.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 71, 76, 0, 48, 5.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.2, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.2, 71, 76, 0, 48, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.8); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_HI_ENABLE_LANDING); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0) } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -583,27 +582,27 @@ unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let article = ArticleModule::get_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE); let object_id = smash::app::lua_bind::Article::get_battle_object_id(article) as u32; let article_boma = sv_battle_object::module_accessor(object_id); let anvil_pos_y = PostureModule::pos_y(article_boma); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::FORGE_START_Y_POS, anvil_pos_y); + VarModule::set_float(agent.battle_object, vars::pickel::instance::FORGE_START_Y_POS, anvil_pos_y); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); //WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -611,79 +610,21 @@ unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn forge_game_fall(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - JostleModule::set_status(boma, false); - } - frame(lua_state, 8.0); - if is_excute(weapon) { - JostleModule::set_status(boma, true); - WorkModule::on_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); -unsafe extern "C" fn forge_game_fallattack(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let pickel = utils::util::get_battle_object_from_id(owner_id); - let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); - if is_excute(weapon) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), - Hash40::new("attack_air_lw_2"), - Hash40::new("attack_air_lw_fall"),]){ - //below hitbox shows for 1 frame if this isnt here lol - } else { - wait(lua_state, 2.0); - ATTACK(weapon, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - fall_distance), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } else { - ATTACK(weapon, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } -} + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); -unsafe extern "C" fn forge_game_fallattackride(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } -} + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); -pub fn install() { - smashline::Agent::new("pickel_forge") - .acmd("game_fall", forge_game_fall) - .acmd("game_fallattack", forge_game_fallattack) - .acmd("game_fallattackride", forge_game_fallattackride) - .install(); - smashline::Agent::new("pickel") - .acmd("game_attackairf", game_attackairf) - .acmd("effect_attackairf", effect_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_attackairlw2", game_attackairlw2) - .install(); + agent.acmd("game_attackairlw2", game_attackairlw2); } diff --git a/fighters/pickel/src/acmd/other.rs b/fighters/pickel/src/acmd/other.rs index 87b3d7e00b..bc9a678126 100644 --- a/fighters/pickel/src/acmd/other.rs +++ b/fighters/pickel/src/acmd/other.rs @@ -1,291 +1,290 @@ - use super::*; -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pickel_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pickel_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, 60192); WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_BLEND_TURN); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch"), false, -1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -4.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -4.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 17.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 24.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 26.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 28.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch_dash"), false, -1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.8), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, 3.2, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 18.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, -1.0, Some(0.0), Some(-4.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 27.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(-0.5), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 29.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 31.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 51.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("catch_turn"), false, -1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_CATCH_FLAG_SHOOT); GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, Hash40::new("rod"), Hash40::new("rod_cast"), smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.8), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 1.8, 0.0, 7.0, -3.2, Some(0.0), Some(7.0), Some(-10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 3.6, 0.0, 7.0, -5.0, Some(0.0), Some(7.0), Some(-9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.8), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 1.8, 0.0, 7.0, -3.2, Some(0.0), Some(7.0), Some(-10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 3.6, 0.0, 7.0, -5.0, Some(0.0), Some(7.0), Some(-9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_G); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 19.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 26.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -5.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 28.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, 1.0, Some(0.0), Some(-0.5), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, 1.0, Some(0.0), Some(-0.5), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 30.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 2.5, 0.0, -3.0, -1.0, Some(0.0), Some(0.0), Some(-1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_PICKEL, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 32.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FISHINGROD, true, *WEAPON_PICKEL_FISHINGROD_INSTANCE_WORK_ID_FLAG_ENABLE_REWIND); } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn game_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 90.0); - if is_excute(fighter){ + if is_excute(agent){ if DamageModule::damage(boma, 0) > 2.0 { DamageModule::add_damage(boma, -2.0, 0); } } } -unsafe extern "C" fn game_guardon(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_guardon(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); } } -unsafe extern "C" fn game_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); } } } -unsafe extern "C" fn sound_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_PICKEL_STATUS_LANDING_FLAG_HIGH_PLACE) { frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pickel_landing_high_place")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pickel_landing_high_place")); DamageModule::add_damage(boma, 0.1, 0); } } else { frame(lua_state, 0.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_pickel_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_pickel_landing02")); } } } -unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT, Hash40::new("passive"), false, 0.0); let melt = ArticleModule::get_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_MELT); @@ -296,50 +295,30 @@ unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn melt_game_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); -unsafe extern "C" fn melt_effect_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_water_landing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } -} + agent.acmd("game_turndash", game_turndash); -unsafe extern "C" fn melt_sound_passive(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - PLAY_SE(weapon, Hash40::new("se_common_swim_middle_01")); - } -} + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_catchdash", game_catchdash); + + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + + agent.acmd("game_guardon", game_guardon); + + agent.acmd("game_guarddamage", game_guarddamage); + + agent.acmd("sound_landingheavy", sound_landingheavy); -pub fn install() { - smashline::Agent::new("pickel") - .acmd("game_dash", game_dash) - .acmd("sound_dash", sound_dash) - .acmd("game_turndash", game_turndash) - .acmd("game_escapeair", game_escapeair) - .acmd("game_escapeairslide", game_escapeairslide) - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_appealsl", game_appeals) - .acmd("game_appealsr", game_appeals) - .acmd("game_guardon", game_guardon) - .acmd("game_guarddamage", game_guarddamage) - .acmd("sound_landingheavy", sound_landingheavy) - .acmd("game_passive", game_passive) - .install(); - smashline::Agent::new("pickel_melt") - .acmd("game_passive", melt_game_passive) - .acmd("effect_passive", melt_effect_passive) - .acmd("sound_passive", melt_sound_passive) - .install(); + agent.acmd("game_passive", game_passive); } diff --git a/fighters/pickel/src/acmd/smashes.rs b/fighters/pickel/src/acmd/smashes.rs index 16cb0d60af..79bcf75352 100644 --- a/fighters/pickel/src/acmd/smashes.rs +++ b/fighters/pickel/src/acmd/smashes.rs @@ -1,28 +1,25 @@ - use super::*; // shrinks the magma block effects to match its reduced size -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 9, -6, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 9, -6, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pickel_block_magma_heat"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pickel_block_magma_heat"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("null"), Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_block_magma_heat"), false, true); - EFFECT(fighter, Hash40::new("pickel_block_break_magma"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("null"), Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_block_magma_heat"), false, true); + EFFECT(agent, Hash40::new("pickel_block_break_magma"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("effect_attackhi4", effect_attackhi4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attackhi4", effect_attackhi4); } diff --git a/fighters/pickel/src/acmd/specials.rs b/fighters/pickel/src/acmd/specials.rs index b1bf05f546..2e64b922fb 100644 --- a/fighters/pickel/src/acmd/specials.rs +++ b/fighters/pickel/src/acmd/specials.rs @@ -1,47 +1,15 @@ - use super::*; -unsafe extern "C" fn sound_specialn1getgold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pickel_special_n02_iron")); - PLAY_SE(fighter, Hash40::new("se_pickel_special_n_item")); - PLAY_SE(fighter, Hash40::new("se_result_coin_silver")); - } -} - -unsafe extern "C" fn trolley_game_specialsdriveemptypartial(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - if is_excute(weapon) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); - ATTACK(weapon, 0, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, 6.0, Some(0.0), Some(0.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 0, true); - ATTACK(weapon, 1, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, -6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 1, true); - ATTACK(weapon, 2, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 0.0, 6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ignore_ground_shield(boma, 2, true); - ATTACK(weapon, 3, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_IIE, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 4, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_down_only(boma, 4, true); - } - wait(lua_state, 6.0); - if is_excute(weapon) { - ATTACK(weapon, 5, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.5, 0.0, 3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - WorkModule::off_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); +unsafe extern "C" fn sound_specialn1getgold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pickel_special_n02_iron")); + PLAY_SE(agent, Hash40::new("se_pickel_special_n_item")); + PLAY_SE(agent, Hash40::new("se_result_coin_silver")); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("sound_specialn1getgold", sound_specialn1getgold) - .install(); - smashline::Agent::new("pickel_trolley") - .acmd( - "game_specialsdriveemptypartial", - trolley_game_specialsdriveemptypartial, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_specialn1getgold", sound_specialn1getgold); } diff --git a/fighters/pickel/src/acmd/throws.rs b/fighters/pickel/src/acmd/throws.rs index d32a05a4aa..cee8fc761c 100644 --- a/fighters/pickel/src/acmd/throws.rs +++ b/fighters/pickel/src/acmd/throws.rs @@ -1,71 +1,70 @@ use super::*; -unsafe extern "C" fn pickel_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 25, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 25, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, false, -1); ArticleModule::change_motion(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, Hash40::new("throw_f"), false, -1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 4.8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 4.8); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_PUSHOBJECT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn pickel_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 65, 68, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 65, 68, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_STATUS_THROW_FLAG_FORGE_GENERATE_ENABLE); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 2); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } if WorkModule::is_flag(boma, *FIGHTER_PICKEL_STATUS_THROW_FLAG_IS_GENERATE_FORGE) { frame(lua_state, 23.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("pickel") - .acmd("game_throwf", pickel_throw_f_game) - .acmd("game_throwlw", pickel_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/pickel/src/acmd/tilts.rs b/fighters/pickel/src/acmd/tilts.rs index c4f9700cef..09c0deba7c 100644 --- a/fighters/pickel/src/acmd/tilts.rs +++ b/fighters/pickel/src/acmd/tilts.rs @@ -1,29 +1,28 @@ - use super::*; // this script is used for jab, forward tilt, and neutral air -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_SWORD, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 2.0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); if [wood, stone, iron, gold, diamond].contains(&material_kind) { @@ -48,23 +47,23 @@ unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { sfx = *COLLISION_SOUND_ATTR_CUTUP; } // air hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), damage, 45, 134, 0, 27, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); // ground hitboxes if boma.is_situation(*SITUATION_KIND_GROUND) - && (-0.1..0.1).contains(&fighter.left_stick_x()) { // locking hitbox on jab - ATTACK(fighter, 4, 0, Hash40::new("top"), (damage / 2.0), 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + && (-0.1..0.1).contains(&agent.left_stick_x()) { // locking hitbox on jab + ATTACK(agent, 4, 0, Hash40::new("top"), (damage / 2.0), 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 4, false); } else { // non-locking hitbox on ftilt/neutral air - ATTACK(fighter, 4, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.8, 5.4, Some(0.0), Some(6.8), Some(10.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); } - ATTACK(fighter, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATTACK(agent, 5, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), damage, 57, 134, 0, 20, 2.3, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, sfx, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, hitstun[0], false); AttackModule::set_add_reaction_frame_revised(boma, 1, hitstun[0], false); AttackModule::set_add_reaction_frame_revised(boma, 2, hitstun[0], false); @@ -76,50 +75,50 @@ unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 2.0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); } else { // fist hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.72, 60, 50, 0, 72, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); if boma.is_situation(*SITUATION_KIND_GROUND) { // ground-only locking hitbox - ATTACK(fighter, 7, 0, Hash40::new("top"), 1.36, 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("top"), 1.36, 361, 30, 0, 20, 2.5, 0.0, 3.3, 5.4, Some(0.0), Some(3.3), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 4, 5, 6, 7, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 4, 5, 6, 7, 0.25); AttackModule::set_add_reaction_frame_revised(boma, 0, -10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 7, -10.0, false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); if material_kind == gold { - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.25); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; let iron = *FIGHTER_PICKEL_MATERIAL_KIND_IRON; let gold = *FIGHTER_PICKEL_MATERIAL_KIND_GOLD; let diamond = *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND; - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PICKEL_CRAFT_WEAPON_KIND_AXE, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_REQUEST_HAVE_CRAFT_WEAPON_KIND); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); if material_kind != gold { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); @@ -128,7 +127,7 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if [wood, stone, iron, gold, diamond].contains(&material_kind) { let mut damage = 5.5; // default damage, used for wood and gold if material_kind == stone { @@ -139,31 +138,31 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { damage = 8.7; // damage for diamond } WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), damage, 78, 78, 0, 56, 4.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), damage, 78, 78, 0, 56, 4.4, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } else { // fist hitbox - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.2, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.2, 78, 78, 0, 56, 4.4, 0.6, 0.4, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 0.5); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate_partial(boma, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, 1.0); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut material_kind = WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND); let wood = *FIGHTER_PICKEL_MATERIAL_KIND_WOOD; let stone = *FIGHTER_PICKEL_MATERIAL_KIND_STONE; @@ -183,238 +182,166 @@ unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { } else if material_kind == diamond { effect = ["pickel_axe_flare_diamond", "pickel_atk_axe_diamond"]; } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 0.9, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new(effect[0]), Hash40::new("weaponr"), 0, 0, 0, 0, 0, 0, 0.9, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), -3.2, 11.5, -1.89, -80, -80, -27, 0.9, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new(effect[1]), Hash40::new(effect[1]), Hash40::new("top"), -3.2, 11.5, -1.89, -80, -80, -27, 0.9, false, *EF_FLIP_YZ); if material_kind != gold { - LAST_EFFECT_SET_RATE(fighter, 0.4); + LAST_EFFECT_SET_RATE(agent, 0.4); } else { - LAST_EFFECT_SET_RATE(fighter, 0.6); + LAST_EFFECT_SET_RATE(agent, 0.6); } } } else { frame(lua_state, 6.0); // fist effect - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11, -3, -20, -60, -70, 0.7, false, *EF_FLIP_YZ, 0.05); - LAST_EFFECT_SET_COLOR(fighter, 1, 1, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 11, -3, -20, -60, -70, 0.7, false, *EF_FLIP_YZ, 0.05); + LAST_EFFECT_SET_COLOR(agent, 1, 1, 1); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_diamond"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_gold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_iron"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_stone"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pickel_axe_flare_wood"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_diamond"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_gold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_iron"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_stone"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pickel_axe_flare_wood"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), false, true); } } -unsafe extern "C" fn expression_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_77_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { //let mut rotation_vec = Vector3f{ x:0.0, y: 0.0, z: -8.0 }; //let rotation_vec_ptr: *mut Vector3f = &mut rotation_vec; //ModelModule::joint_rotate(boma, Hash40::new("haver"), rotation_vec_ptr); WorkModule::set_float(boma, 5.5, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLOAT_ATTACK_DURABILITY); // Diamond if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attackm"), 0); } // Gold else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_GOLD { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 9); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 9); } // Iron else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_IRON { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attackm"), 6); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attackm"), 6); } // Stone else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_STONE { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 0); } // Wood else if WorkModule::get_int(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_HAVE_CRAFT_WEAPON_MATERIAL_KIND) == *FIGHTER_PICKEL_MATERIAL_KIND_WOOD { - RUMBLE_HIT(fighter, Hash40::new("rbkind_77_attacks"), 8); + RUMBLE_HIT(agent, Hash40::new("rbkind_77_attacks"), 8); } // Punch else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 8); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 8); } } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_REQUEST_REMOVE_HAVE_CRAFT_WEAPON); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - FT_MOTION_RATE(fighter, 8.0); + FT_MOTION_RATE(agent, 8.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK){ VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 12.0/(3.0-2.0)); + FT_MOTION_RATE(agent, 12.0/(3.0-2.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FIRE){ ArticleModule::generate_article(boma, *FIGHTER_PICKEL_GENERATE_ARTICLE_FIRE, false, 0); } if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); - //FT_MOTION_RATE(fighter, 25.0/(30.0-5.0)); + FT_MOTION_RATE(agent, 1.0); + //FT_MOTION_RATE(agent, 25.0/(30.0-5.0)); } else { - FT_MOTION_RATE(fighter, 15.0/(30.0-5.0)); + FT_MOTION_RATE(agent, 15.0/(30.0-5.0)); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - //FT_MOTION_RATE(fighter, 2.0); - FT_MOTION_RATE(fighter, 0.5); + //FT_MOTION_RATE(agent, 2.0); + FT_MOTION_RATE(agent, 0.5); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 7.2, 1, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.075, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT(agent, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 7.2, 1, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.075, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); } else { - EFFECT(fighter, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 6.2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pickel_flint"), Hash40::new("haver"), 1, 6.2, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } else { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_damage_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_damage_aura"), -1); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_aura"), false, false); - } -} - -unsafe extern "C" fn fire_game_attacklw3(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let pickel = pickel_boma.object(); - if is_excute(weapon) { - AttackModule::disable_tip(boma); - VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - if VarModule::is_flag(pickel, vars::common::instance::IS_HEAVY_ATTACK){ - VarModule::on_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - } else { - VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); - } - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE) { - //FT_MOTION_RATE(weapon, 1.25); - ATTACK(weapon, 0, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, 2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, -2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } else { - FT_MOTION_RATE(weapon, 0.75); - ATTACK(weapon, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 24.0); - if is_excute(weapon) { - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ - FT_MOTION_RATE(weapon, 1.0); - ATTACK(weapon, 0, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(weapon, 1, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - } - } - frame(lua_state, 28.0); - if is_excute(weapon) { - AttackModule::clear_all(boma); - } - frame(lua_state, 45.0); - if is_excute(weapon) { - notify_event_msc_cmd!(weapon, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_aura"), false, false); } } -unsafe extern "C" fn fire_effect_attacklw3(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let pickel = pickel_boma.object(); - if is_excute(weapon) { - if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(weapon, 0.137, 0.85, 0.85); - } else { - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(weapon, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(weapon, 1.0, 0.467, 0.0); - } - } - frame(lua_state, 30.0); - if is_excute(weapon) { - EFFECT_DETACH_KIND(weapon, Hash40::new("pickel_fire_soot"), -1); - } - frame(lua_state, 38.0); - if is_excute(weapon) { - EFFECT_DETACH_KIND(weapon, Hash40::new("pickel_fire"), -1); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); -pub fn install() { - smashline::Agent::new("pickel_fire") - .acmd("game_attacklw3", fire_game_attacklw3) - .acmd("effect_attacklw3", fire_effect_attacklw3) - .install(); - smashline::Agent::new("pickel") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("expression_attackhi3", expression_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pickel/src/fire/acmd/mod.rs b/fighters/pickel/src/fire/acmd/mod.rs new file mode 100644 index 0000000000..23a35f5715 --- /dev/null +++ b/fighters/pickel/src/fire/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod tilts; + +pub fn install(agent: &mut Agent) { + tilts::install(agent); +} \ No newline at end of file diff --git a/fighters/pickel/src/fire/acmd/tilts.rs b/fighters/pickel/src/fire/acmd/tilts.rs new file mode 100644 index 0000000000..f177ece1a3 --- /dev/null +++ b/fighters/pickel/src/fire/acmd/tilts.rs @@ -0,0 +1,74 @@ +use super::*; + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let pickel = pickel_boma.object(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + if VarModule::is_flag(pickel, vars::common::instance::IS_HEAVY_ATTACK){ + VarModule::on_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + } else { + VarModule::off_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE); + } + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE) { + //FT_MOTION_RATE(agent, 1.25); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, 2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, -2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } else { + FT_MOTION_RATE(agent, 0.75); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("top"), 6.4, 54, 116, 0, 42, 3.5, 0.0, 2.8, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + } + } + frame(lua_state, 28.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 45.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pickel_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let pickel = pickel_boma.object(); + if is_excute(agent) { + if VarModule::is_flag(pickel, vars::pickel::instance::IS_CURRENT_ATTACK_LW3_SOUL_FIRE){ + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.137, 0.85, 0.85); + } else { + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire_soot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("pickel_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.467, 0.0); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("pickel_fire_soot"), -1); + } + frame(lua_state, 38.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("pickel_fire"), -1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); +} diff --git a/fighters/pickel/src/fire/mod.rs b/fighters/pickel/src/fire/mod.rs new file mode 100644 index 0000000000..fc02aa3c10 --- /dev/null +++ b/fighters/pickel/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pickel_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/forge/acmd/aerials.rs b/fighters/pickel/src/forge/acmd/aerials.rs new file mode 100644 index 0000000000..13b158925f --- /dev/null +++ b/fighters/pickel/src/forge/acmd/aerials.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + JostleModule::set_status(boma, true); + WorkModule::on_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK); + } +} + +unsafe extern "C" fn game_fallattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let pickel = utils::util::get_battle_object_from_id(owner_id); + let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), + Hash40::new("attack_air_lw_2"), + Hash40::new("attack_air_lw_fall"),]){ + //below hitbox shows for 1 frame if this isnt here lol + } else { + wait(lua_state, 2.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - fall_distance), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0 + (fall_distance / 3.2) , 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + } +} + +unsafe extern "C" fn game_fallattackride(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 70, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (fall_distance / 3.2), 58, (80.0 - (fall_distance / 2.0)), 0, 62, 6.4, 0.0, 4.6, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); + + agent.acmd("game_fallattack", game_fallattack); + + agent.acmd("game_fallattackride", game_fallattackride); +} diff --git a/fighters/pickel/src/forge/acmd/mod.rs b/fighters/pickel/src/forge/acmd/mod.rs new file mode 100644 index 0000000000..d952ff14d4 --- /dev/null +++ b/fighters/pickel/src/forge/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod aerials; + +pub fn install(agent: &mut Agent) { + aerials::install(agent); +} \ No newline at end of file diff --git a/fighters/pickel/src/forge/mod.rs b/fighters/pickel/src/forge/mod.rs new file mode 100644 index 0000000000..9089e5072d --- /dev/null +++ b/fighters/pickel/src/forge/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("pickel_forge"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/forge/opff.rs b/fighters/pickel/src/forge/opff.rs new file mode 100644 index 0000000000..4dbc1552f9 --- /dev/null +++ b/fighters/pickel/src/forge/opff.rs @@ -0,0 +1,26 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pickel_forge_frame(agent: &mut smash::lua2cpp::L2CFighterBase){ + let boma = agent.boma(); + let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + if pickel_boma.is_motion_one_of(&[ + Hash40::new("attack_air_lw"), + Hash40::new("attack_air_lw_2"), + Hash40::new("attack_air_lw_fall") ]) + && !boma.is_situation(*SITUATION_KIND_GROUND) + //&& !pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START) + && WorkModule::is_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK){ + MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_GAME, Hash40::new("game_fallattackride"), -1); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_forge_frame); +} diff --git a/fighters/pickel/src/lib.rs b/fighters/pickel/src/lib.rs index 91adab590f..4e49a27e35 100644 --- a/fighters/pickel/src/lib.rs +++ b/fighters/pickel/src/lib.rs @@ -2,6 +2,22 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod status; +pub mod opff; + +// articles + +pub mod fire; +pub mod forge; +pub mod melt; +pub mod trolley; + +// material table hook + +pub mod material_table; + use smash::{ lib::{ L2CValue, @@ -31,16 +47,20 @@ use utils::{ ext::*, consts::*, }; - use smashline::*; -pub mod acmd; -pub mod status; -pub mod opff; -pub mod material_table; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pickel"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + fire::install(); + forge::install(); + melt::install(); + trolley::install(); + material_table::install(); } diff --git a/fighters/pickel/src/melt/acmd/mod.rs b/fighters/pickel/src/melt/acmd/mod.rs new file mode 100644 index 0000000000..10d82b25ce --- /dev/null +++ b/fighters/pickel/src/melt/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod other; + +pub fn install(agent: &mut Agent) { + other::install(agent); +} \ No newline at end of file diff --git a/fighters/pickel/src/melt/acmd/other.rs b/fighters/pickel/src/melt/acmd/other.rs new file mode 100644 index 0000000000..c17e1fd640 --- /dev/null +++ b/fighters/pickel/src/melt/acmd/other.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_water_landing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } +} + +unsafe extern "C" fn sound_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swim_middle_01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_passive", game_passive); + agent.acmd("effect_passive", effect_passive); + agent.acmd("sound_passive", sound_passive); +} diff --git a/fighters/pickel/src/melt/mod.rs b/fighters/pickel/src/melt/mod.rs new file mode 100644 index 0000000000..b12a8ea383 --- /dev/null +++ b/fighters/pickel/src/melt/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pickel_melt"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/opff.rs b/fighters/pickel/src/opff.rs index 684d81cc0a..460efe290d 100644 --- a/fighters/pickel/src/opff.rs +++ b/fighters/pickel/src/opff.rs @@ -3,50 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_FAILED, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL_SPECIAL - ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - } - } - } -} - -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - fastfall_specials(fighter); - material_handling(fighter, boma); - hitstun_handling(fighter, boma, frame); - table_recreate(fighter, boma, status_kind); - build_ecb_shift(boma, status_kind); - elytra_cancel(boma, status_kind); - guardoff_shield(fighter, boma, frame); - appeal_lw_loop(fighter, boma, frame); - training_mode_resources(fighter, boma, status_kind, stick_x, stick_y); - //logging_for_acmd(boma, status_kind); -} - unsafe fn material_handling(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { // wait 2 frames before letting the material table advance, preventing any jumps in entries if !VarModule::is_flag(boma.object(), vars::pickel::instance::SHOULD_CYCLE_MATERIAL) { @@ -384,6 +340,50 @@ unsafe fn logging_for_acmd(boma: &mut BattleObjectModuleAccessor, status_kind: i } } +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_FAILED, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_HI_FALL_SPECIAL + ]) + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + } + } + } +} + +pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + fastfall_specials(fighter); + material_handling(fighter, boma); + hitstun_handling(fighter, boma, frame); + table_recreate(fighter, boma, status_kind); + build_ecb_shift(boma, status_kind); + elytra_cancel(boma, status_kind); + guardoff_shield(fighter, boma, frame); + appeal_lw_loop(fighter, boma, frame); + training_mode_resources(fighter, boma, status_kind, stick_x, stick_y); + //logging_for_acmd(boma, status_kind); +} + pub extern "C" fn pickel_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { common::opff::fighter_common_opff(fighter); @@ -397,64 +397,6 @@ pub unsafe fn pickel_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -/// /// -/// WEAPON FRAMES /// -/// /// - -// minecart -pub unsafe extern "C" fn pickel_trolley_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - // Burn double jump when jumping out of Minecart - if boma.is_situation(*SITUATION_KIND_AIR) - && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP) { - if MotionModule::frame(pickel_boma) <= 1.0 - && pickel_boma.get_num_used_jumps() < pickel_boma.get_jump_count_max() { - WorkModule::inc_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - } - } - // Restore double jump when landing with Minecart - if boma.is_situation(*SITUATION_KIND_GROUND) - && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE) { - if pickel_boma.get_num_used_jumps() >= pickel_boma.get_jump_count_max() { - WorkModule::dec_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - } - } - } - } -} - -// anvil -pub unsafe extern "C" fn pickel_forge_frame(weapon: &mut smash::lua2cpp::L2CFighterBase){ - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { - let pickel = utils::util::get_battle_object_from_id(owner_id); - let pickel_boma = &mut *(*pickel).module_accessor; - if pickel_boma.is_motion_one_of(&[Hash40::new("attack_air_lw"), - Hash40::new("attack_air_lw_2"), - Hash40::new("attack_air_lw_fall"),]) - && !boma.is_situation(*SITUATION_KIND_GROUND) - //&& !pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START) - && WorkModule::is_flag(boma, *WEAPON_PICKEL_FORGE_INSTANCE_WORK_ID_FLAG_UPDATE_ATTACK){ - MotionAnimcmdModule::call_script_single(boma, *FIGHTER_ANIMCMD_GAME, Hash40::new("game_fallattackride"), -1); - } - } - } -} -pub fn install() { - smashline::Agent::new("pickel") - .on_line(Main, pickel_frame_wrapper) - .install(); - smashline::Agent::new("pickel_trolley") - .on_line(Main, pickel_trolley_frame) - .install(); - smashline::Agent::new("pickel_forge") - .on_line(Main, pickel_forge_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_frame_wrapper); } diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status.rs index 25ac2dc08c..95e839d829 100644 --- a/fighters/pickel/src/status.rs +++ b/fighters/pickel/src/status.rs @@ -1,32 +1,5 @@ use super::*; use globals::*; -// status script import - -// prevent steve from spawning the crafting table through vanilla circumstances - -unsafe extern "C" fn recreate_table(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) - || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { - VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); - StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry - - return 1.into(); - } - - smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) -} - -// prevent steve's shield from being locked in place after it is damaged (vanilla bug) - -unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_GuardDamage() -} // lets the "stuff" article generate in new statuses #[skyline::hook(offset = 0xf13d5c, inline)] @@ -41,9 +14,19 @@ unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { } } -// keep shield article visible while shielding +// prevent steve's shield from being locked in place after it is damaged (vanilla bug) +unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_GuardDamage() +} + +// keep shield article visible while shielding +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !ArticleModule::is_exist(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF){ ArticleModule::generate_article(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); ArticleModule::set_rate(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, 0.0); @@ -53,8 +36,7 @@ pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { } // handles the removal of steves resources when respawning - -pub unsafe extern "C" fn rebirth(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn rebirth_main(fighter: &mut L2CFighterCommon) -> L2CValue { let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); @@ -88,8 +70,7 @@ pub unsafe extern "C" fn rebirth(fighter: &mut L2CFighterCommon) -> L2CValue { } // handles materials when steve is entering the match, to account for salty runbacks - -pub unsafe extern "C" fn entry(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn entry_main(fighter: &mut L2CFighterCommon) -> L2CValue { let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); @@ -314,7 +295,7 @@ unsafe extern "C" fn pickel_jump_status_check(fighter: &mut L2CFighterCommon) -> } } -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { return 1.into(); @@ -345,47 +326,44 @@ pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { } } -extern "C" fn pickel_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != FIGHTER_KIND_PICKEL { - return; - } - - // set callbacks and variables on fighter init - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - VarModule::on_flag(fighter.battle_object, vars::pickel::instance::SHOULD_CYCLE_MATERIAL); - VarModule::off_flag(fighter.battle_object, vars::pickel::instance::SHOULD_RESET_ROT); - VarModule::set_int(fighter.battle_object, vars::pickel::instance::MATERIAL_INDEX, 0); - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); - VarModule::set_int(fighter.battle_object, vars::pickel::instance::HITSTUN_TIMER, 0); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::DAMAGE_TRACKER, 0.0); - VarModule::set_float(fighter.battle_object, vars::pickel::instance::TABLE_HP_TRACKER, 20.0); +// prevent steve from spawning the crafting table through vanilla circumstances +unsafe extern "C" fn recreate_table_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) + || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { + VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); + StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry + return 1.into(); } + + smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + VarModule::on_flag(fighter.battle_object, vars::pickel::instance::SHOULD_CYCLE_MATERIAL); + VarModule::off_flag(fighter.battle_object, vars::pickel::instance::SHOULD_RESET_ROT); + VarModule::set_int(fighter.battle_object, vars::pickel::instance::MATERIAL_INDEX, 0); + VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); + VarModule::set_int(fighter.battle_object, vars::pickel::instance::HITSTUN_TIMER, 0); + VarModule::set_float(fighter.battle_object, vars::pickel::instance::DAMAGE_TRACKER, 0.0); + VarModule::set_float(fighter.battle_object, vars::pickel::instance::TABLE_HP_TRACKER, 20.0); } -pub fn install() { + +pub fn install(agent: &mut Agent) { skyline::install_hooks!( stuff_hook ); - smashline::Agent::new("pickel") - .status( - Main, - *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, - recreate_table, - ) - .status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre) - .status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end) - .status(Main, *FIGHTER_STATUS_KIND_GUARD, guard) - .status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth) - .status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry) - .status( - Main, - *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, - attack_air_lw_start_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .on_start(pickel_init) - .install(); + agent.on_start(on_start); + + agent.status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre); + agent.status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); + agent.status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, attack_air_lw_start_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, recreate_table_main); } diff --git a/fighters/pickel/src/trolley/acmd/mod.rs b/fighters/pickel/src/trolley/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/pickel/src/trolley/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/pickel/src/trolley/acmd/specials.rs b/fighters/pickel/src/trolley/acmd/specials.rs new file mode 100644 index 0000000000..18ba54a7be --- /dev/null +++ b/fighters/pickel/src/trolley/acmd/specials.rs @@ -0,0 +1,28 @@ +use super::*; + +unsafe extern "C" fn game_specialsdriveemptypartial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, 6.0, Some(0.0), Some(0.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 0, true); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 5.0, -6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 1, true); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.0, 0.0, 0.0, 6.0, Some(0.0), Some(0.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ignore_ground_shield(boma, 2, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_IIE, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 3.5, 0.0, 3.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_down_only(boma, 4, true); + } + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 7.0, 60, 64, 0, 66, 1.5, 0.0, 3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, f32::NAN, 0.0, 60, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + WorkModule::off_flag(boma, *WEAPON_PICKEL_TROLLEY_INSTANCE_WORK_ID_FLAG_NO_ATTACK_HIT_MOTION); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsdriveemptypartial", game_specialsdriveemptypartial); +} diff --git a/fighters/pickel/src/trolley/mod.rs b/fighters/pickel/src/trolley/mod.rs new file mode 100644 index 0000000000..3dedba0568 --- /dev/null +++ b/fighters/pickel/src/trolley/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("pickel_trolley"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pickel/src/trolley/opff.rs b/fighters/pickel/src/trolley/opff.rs new file mode 100644 index 0000000000..d8bc39ed55 --- /dev/null +++ b/fighters/pickel/src/trolley/opff.rs @@ -0,0 +1,32 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pickel_trolley_frame(agent: &mut smash::lua2cpp::L2CFighterBase) { + let boma = agent.boma(); + let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { + let pickel = utils::util::get_battle_object_from_id(owner_id); + let pickel_boma = &mut *(*pickel).module_accessor; + // Burn double jump when jumping out of Minecart + if boma.is_situation(*SITUATION_KIND_AIR) + && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP) { + if MotionModule::frame(pickel_boma) <= 1.0 + && pickel_boma.get_num_used_jumps() < pickel_boma.get_jump_count_max() { + WorkModule::inc_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + } + } + // Restore double jump when landing with Minecart + if boma.is_situation(*SITUATION_KIND_GROUND) + && pickel_boma.is_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE) { + if pickel_boma.get_num_used_jumps() >= pickel_boma.get_jump_count_max() { + WorkModule::dec_int(pickel_boma, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pickel_trolley_frame); +} From 41a125630ddad3836529023fefb76905d9a1611e Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 14 Mar 2024 10:22:22 -0500 Subject: [PATCH 005/172] fix acmd mod.rs --- fighters/pickel/src/acmd/mod.rs | 16 ++++++++-------- fighters/pickel/src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index 9d951ba688..131bcc9dec 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent: &mut Agent); + tilts::install(agent: &mut Agent); + other::install(agent: &mut Agent); + smashes::install(agent: &mut Agent); + specials::install(agent: &mut Agent); + throws::install(agent: &mut Agent); + ground::install(agent: &mut Agent); } \ No newline at end of file diff --git a/fighters/pickel/src/lib.rs b/fighters/pickel/src/lib.rs index 4e49a27e35..498497e9c0 100644 --- a/fighters/pickel/src/lib.rs +++ b/fighters/pickel/src/lib.rs @@ -53,8 +53,8 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("pickel"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); fire::install(); From 93e83fdc468e4cda23d689e4baaeac60157788fe Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 14 Mar 2024 10:26:05 -0500 Subject: [PATCH 006/172] ... --- fighters/pickel/src/acmd/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index 131bcc9dec..3c5f6b840f 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -8,11 +8,11 @@ mod throws; mod tilts; pub fn install(agent: &mut Agent) { - aerials::install(agent: &mut Agent); - tilts::install(agent: &mut Agent); - other::install(agent: &mut Agent); - smashes::install(agent: &mut Agent); - specials::install(agent: &mut Agent); - throws::install(agent: &mut Agent); - ground::install(agent: &mut Agent); + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file From 6b1fa19a5eeff5dc9520604e7fc2d88fde1df5d3 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 14 Mar 2024 10:31:55 -0500 Subject: [PATCH 007/172] remove empty script from install im sory for the commit spam wuboy please dont take my cheese im literally begging you pleas --- fighters/pickel/src/acmd/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index 3c5f6b840f..c082aca432 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -1,6 +1,6 @@ use super::*; mod aerials; -mod ground; +//mod ground; mod other; mod smashes; mod specials; @@ -14,5 +14,5 @@ pub fn install(agent: &mut Agent) { smashes::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + //ground::install(agent); } \ No newline at end of file From 9d4c539548b1295f6b0ab20b9e37dcaacb9cfb8f Mon Sep 17 00:00:00 2001 From: SirTanknSpank <115139386+SirTanknSpank@users.noreply.github.com> Date: Fri, 15 Mar 2024 07:19:02 -0500 Subject: [PATCH 008/172] King Dedede --- fighters/dedede/src/acmd/aerials.rs | 358 +++++----- fighters/dedede/src/acmd/ground.rs | 109 +-- fighters/dedede/src/acmd/mod.rs | 16 +- fighters/dedede/src/acmd/other.rs | 480 ++++---------- fighters/dedede/src/acmd/smashes.rs | 112 ++-- fighters/dedede/src/acmd/specials.rs | 727 +++++++++++---------- fighters/dedede/src/acmd/throws.rs | 94 +-- fighters/dedede/src/acmd/tilts.rs | 130 ++-- fighters/dedede/src/gordo/acmd/mod.rs | 7 + fighters/dedede/src/gordo/acmd/specials.rs | 219 +++++++ fighters/dedede/src/gordo/mod.rs | 11 + fighters/dedede/src/gordo/status.rs | 17 + fighters/dedede/src/lib.rs | 28 +- fighters/dedede/src/opff.rs | 122 ++-- fighters/dedede/src/star/acmd/mod.rs | 7 + fighters/dedede/src/star/acmd/specials.rs | 13 + fighters/dedede/src/star/mod.rs | 9 + fighters/dedede/src/status.rs | 39 +- 18 files changed, 1285 insertions(+), 1213 deletions(-) create mode 100644 fighters/dedede/src/gordo/acmd/mod.rs create mode 100644 fighters/dedede/src/gordo/acmd/specials.rs create mode 100644 fighters/dedede/src/gordo/mod.rs create mode 100644 fighters/dedede/src/gordo/status.rs create mode 100644 fighters/dedede/src/star/acmd/mod.rs create mode 100644 fighters/dedede/src/star/acmd/specials.rs create mode 100644 fighters/dedede/src/star/mod.rs diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index 40a7743985..4f92da6f16 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -1,350 +1,352 @@ use super::*; -unsafe extern "C" fn dedede_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(5.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(5.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 60, 90, 0, 35, 10.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 90, 0, 35, 10.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 95, 0, 40, 8.5, 0.0, 9.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 95, 0, 40, 8.5, 0.0, 9.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dedede_landing_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn dedede_landing_air_n_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn dedede_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 14.4, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 14.4, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.4); - FT_MOTION_RATE_RANGE(fighter, 14.4, 21.0, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 361, 95, 0, 15, 3.0, -9.0, 1.0, 0.0, Some(-12.00), None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 15.0, 361, 95, 0, 15, 7.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE_RANGE(agent, 14.4, 21.0, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 361, 95, 0, 15, 3.0, -9.0, 1.0, 0.0, Some(-12.00), None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 15.0, 361, 95, 0, 15, 7.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 39.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 39.0, 19.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dedede_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_body"), Hash40::new("hammer2"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_body"), Hash40::new("hammer2"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, -62, 75, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, -62, 75, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.3); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, 0, 75, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.9); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind_c"), Hash40::new("top"), 0, 15, 0, 0, 0, 75, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.9); } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_body"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_body"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), -1); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } } -unsafe extern "C" fn dedede_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.4); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dedede_landing_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn dedede_landing_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -unsafe extern "C" fn dedede_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 100, 0, 20, 5.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 10.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dedede_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 11.0, -16.0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 11.0, -16.0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } -unsafe extern "C" fn dedede_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_b_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_attackair_n01")); - PLAY_SE(fighter, Hash40::new("se_dedede_hammer_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_dedede_rnd_attack01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_attackair_n01")); + PLAY_SE(agent, Hash40::new("se_dedede_hammer_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_dedede_rnd_attack01")); } } -unsafe extern "C" fn dedede_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_b_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dedede_landing_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn dedede_landing_air_b_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn dedede_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 9.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 1.3, 366, 60, 0, 30, 6.0, 17.0, 0.0, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 9.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 1.3, 95, 50, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); //AttackModule::set_add_reaction_frame(boma, 0, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 1, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); //AttackModule::set_add_reaction_frame(boma, 3, -1.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 9.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 6.5, 17.0, 0.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 9.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 5.0, 80, 160, 0, 55, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dedede_landing_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); +unsafe extern "C" fn dedede_landing_air_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } } -unsafe extern "C" fn dedede_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(15.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(15.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 22.0); - if is_excute(fighter) { - //ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + //ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dedede_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); +unsafe extern "C" fn dedede_landing_air_lw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, 0x50000000 /* default value */); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attackairn", dedede_attack_air_n_game) - .acmd("expression_landingairn", dedede_landing_air_n_expression) - .acmd("game_attackairf", dedede_attack_air_f_game) - .acmd("effect_attackairf", dedede_attack_air_f_effect) - .acmd("expression_attackairf", dedede_attack_air_f_expression) - .acmd("expression_landingairf", dedede_landing_air_f_expression) - .acmd("game_attackairb", dedede_attack_air_b_game) - .acmd("effect_attackairb", dedede_attack_air_b_effect) - .acmd("sound_attackairb", dedede_attack_air_b_sound) - .acmd("expression_attackairb", dedede_attack_air_b_expression) - .acmd("expression_landingairb", dedede_landing_air_b_expression) - .acmd("game_attackairhi", dedede_attack_air_hi_game) - .acmd("expression_landingairhi", dedede_landing_air_hi_expression) - .acmd("game_attackairlw", dedede_attack_air_lw_game) - .acmd("expression_landingairlw", dedede_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", dedede_attack_air_n_game); + agent.acmd("expression_landingairn", dedede_landing_air_n_expression); + + agent.acmd("game_attackairf", dedede_attack_air_f_game); + agent.acmd("effect_attackairf", dedede_attack_air_f_effect); + agent.acmd("expression_attackairf", dedede_attack_air_f_expression); + agent.acmd("expression_landingairf", dedede_landing_air_f_expression); + + agent.acmd("game_attackairb", dedede_attack_air_b_game); + agent.acmd("effect_attackairb", dedede_attack_air_b_effect); + agent.acmd("sound_attackairb", dedede_attack_air_b_sound); + agent.acmd("expression_attackairb", dedede_attack_air_b_expression); + agent.acmd("expression_landingairb", dedede_landing_air_b_expression); + + agent.acmd("game_attackairhi", dedede_attack_air_hi_game); + agent.acmd("expression_landingairhi", dedede_landing_air_hi_expression); + + agent.acmd("game_attackairlw", dedede_attack_air_lw_game); + agent.acmd("expression_landingairlw", dedede_landing_air_lw_expression); } diff --git a/fighters/dedede/src/acmd/ground.rs b/fighters/dedede/src/acmd/ground.rs index 6d5e04a608..8188c837a0 100644 --- a/fighters/dedede/src/acmd/ground.rs +++ b/fighters/dedede/src/acmd/ground.rs @@ -1,97 +1,97 @@ use super::*; -unsafe extern "C" fn dedede_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(9.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(9.0-1.0)); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 5.0, 361, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 5.0, 361, 100, 25, 0, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 5.0, 80, 100, 35, 0, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 5.0, 361, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 5.0, 361, 100, 25, 0, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 5.0, 80, 100, 35, 0, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn dedede_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 0, 0, 45, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(20.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 0, 0, 45, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 4.0, 90, 0, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.5, 0.0, 4.5, 4.0, Some(0.0), Some(4.5), Some(20.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn dedede_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.86); +unsafe extern "C" fn dedede_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.86); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(25.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(25.0-1.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 35, 92, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 14.0, 35, 92, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 35, 92, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("waist"), 14.0, 35, 92, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 30.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 361, 96, 0, 45, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(5.0), -2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 361, 95, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 10.0, 361, 95, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 361, 96, 0, 45, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(5.0), -2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 361, 95, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("waist"), 10.0, 361, 95, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } @@ -135,12 +135,13 @@ unsafe extern "C" fn dedede_attack_100_end_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attack11", dedede_attack_11_game) - .acmd("game_attack12", dedede_attack_12_game) - .acmd("game_attackdash", dedede_attack_dash_game) - .acmd("game_attack100end", dedede_attack_100_end_game) - .acmd("effect_attack100end", dedede_attack_100_end_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", dedede_attack_11_game); + + agent.acmd("game_attack12", dedede_attack_12_game); + + agent.acmd("game_attackdash", dedede_attack_dash_game); + + agent.acmd("game_attack100end", dedede_attack_100_end_game); + agent.acmd("effect_attack100end", dedede_attack_100_end_effect); } diff --git a/fighters/dedede/src/acmd/mod.rs b/fighters/dedede/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/dedede/src/acmd/mod.rs +++ b/fighters/dedede/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index 4e40e03196..921038ecf9 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -1,485 +1,271 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dedede_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.5, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.120); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.120); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_dedede_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dedede_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_dedede_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_dedede_step_right_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dedede_gordo_special_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let gordo_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - PostureModule::reverse_rot_y_lr(boma); - PostureModule::reverse_lr(boma); - } - /* Prevents backwards gordos */ - if PostureModule::lr(owner_module_accessor) * gordo_speed_x < 0.0{ - KineticModule::mul_speed(boma, &Vector3f{x: -1.0, y: 1.0,z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - /* Checks every frame the gordo is active, set equal to the gordo life param */ - for _ in 0..181{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 2.0) * 0.25); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 120, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); - - //Reduces the max amount of bounces by 1 per recatch on the same gordo - if (WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) - VarModule::get_int(owner_module_accessor.object(), vars::dedede::instance::RECATCH_COUNTER)) < 0{ - StatusModule::change_status_request(fighter.module_accessor, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); - } - } - else{ - /* Reduces damage on every bounce, by 10% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 8.0) * 0.1); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); - } - } - } - wait(lua_state, 1.0); - } - -} - -unsafe extern "C" fn dedede_gordo_special_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ - //Intentionally blank to kill vanilla effects - } -} - -unsafe extern "C" fn dedede_gordo_special_s_shot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - for _ in 0..181{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - GroundModule::update_force(boma); - /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn dedede_gordo_special_s_shot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn dedede_gordo_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - - //Disables vanilla regrab searchbox, this ALWAYS needs to be on due to new regrab - WorkModule::on_flag(owner_module_accessor, *FIGHTER_DEDEDE_INSTANCE_WORK_ID_FLAG_PERSONAL); - let mut speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - let mut speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - - if is_excute(fighter) { - WorkModule::set_int(boma, 300, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - /* below grabs the boma of the opponent hitting gordo, the attack data of that hit, and adjusts the speed accordingly */ - let num_players = Fighter::get_fighter_entry_count(); - if StopModule::is_hit(boma) - && !StopModule::is_hit(owner_module_accessor) { - for i in 0..num_players{ - let opponent_boma = sv_battle_object::module_accessor(Fighter::get_id_from_entry_id(i)); - - if AttackModule::is_infliction(opponent_boma, *COLLISION_KIND_MASK_HIT){ - let data = AttackModule::attack_data(opponent_boma, 0, false); - let mut angle = (*data).vector as f32; - let mut damage = (*data).power; - let kbg = (*data).r_eff as f32; - let bkb = (*data).r_add as f32; - - //Covering sakurai angle and other funky angles - if angle > 360.0{ - angle = 32.0; - } - //Damage cap, gordo goes to the moon otherwise - if damage > 25.0{ - damage = 25.0; - } - - let radians = angle.to_radians(); - let cos = radians.cos(); - let sin = radians.sin(); - - //formulas for the speed multipliers - let x_speed_mul = cos * ((kbg * 0.3718) + bkb / 100.0) * (damage / 8.0) / 70.0; - let y_speed_mul = sin * (damage / 2.5) * ((kbg * 0.3718) + bkb / 100.0) / 60.0 / speed_y; - - KineticModule::mul_speed(boma, &Vector3f{x: x_speed_mul, y: y_speed_mul , z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - /* Seeing the speed is still the same. This only occurs if the above did not run, which happens on projectiles or non-direct hits (Bayo smash attacks) */ - if speed_x == KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL) && speed_y == KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL){ - let damage = DamageModule::damage(boma, 0); - if damage > 11.0{ - KineticModule::mul_speed(boma, &Vector3f{x: 0.8, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - else{ - KineticModule::mul_speed(boma, &Vector3f{x: 0.4 + 0.05 * (damage - 5.0), y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - } - } - } - } - for _ in 0..301{ - if is_excute(fighter) { - if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { - /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ - let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); - if !StopModule::is_stop(boma){ - speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); - speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); - } - let mut speed = speed_x.max(speed_y); - let mut damage = (7.5 * (speed * 0.6)); - damage = damage.max(7.5); - - ATTACK(fighter, 0, 0, Hash40::new("hip"), damage * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn dedede_gordo_special_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - //Intentionally blank to kill vanilla effects - -} - -unsafe extern "C" fn dedede_gordo_special_s_wall_stop_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - - } -} - -unsafe extern "C" fn dedede_gordo_special_s_start_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } - } - frame(lua_state, 7.0); - if is_excute(fighter){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } -} - -unsafe extern "C" fn dedede_gordo_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - - if is_excute(fighter){ - if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + if is_excute(agent) { + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + if is_excute(agent) { + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 70, 65, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); +unsafe extern "C" fn landing_fall_special_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_dedede_landing03")); } } -unsafe extern "C" fn landing_fall_special_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_dedede_landing03")); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", damageflyhi_sound); + + agent.acmd("sound_damageflylw", damageflylw_sound); + + agent.acmd("sound_damageflyn", damageflyn_sound); + + agent.acmd("sound_damageflyroll", damageflyroll_sound); + + agent.acmd("sound_damageflytop", damageflytop_sound); + + agent.acmd("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_catch", dedede_catch_game); + + agent.acmd("game_dash", dash_game); + agent.acmd("sound_dash", dash_sound); + + agent.acmd("game_turndash", turn_dash_game); + + agent.acmd("game_escapeair", escape_air_game); + + agent.acmd("game_escapeairslide", escape_air_slide_game); -pub fn install() { - smashline::Agent::new("dedede_gordo") - .acmd("game_specialsthrow", dedede_gordo_special_s_throw_game) - .acmd("effect_specialsthrow", dedede_gordo_special_s_throw_effect) - .acmd("game_specialsshot", dedede_gordo_special_s_shot_game) - .acmd("effect_specialsshot", dedede_gordo_special_s_shot_effect) - .acmd("game_specialsattack", dedede_gordo_special_s_attack_game) - .acmd("effect_specialsattack", dedede_gordo_special_s_attack_effect) - .acmd("game_specialswallstop", dedede_gordo_special_s_wall_stop_game) - .acmd("game_specialsstart", dedede_gordo_special_s_start_game) - .acmd("game_specialairsstart", dedede_gordo_special_air_s_start_game) - .install(); - smashline::Agent::new("dedede_star") - .acmd("game_fly", fly_game) - .install(); - smashline::Agent::new("dedede") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("expression_landingheavy", expression_landingheavy) - .acmd("game_catch", dedede_catch_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_landingfallspecial", landing_fall_special_sound) - .install(); + agent.acmd("sound_landingfallspecial", landing_fall_special_sound); } diff --git a/fighters/dedede/src/acmd/smashes.rs b/fighters/dedede/src/acmd/smashes.rs index 1dec7e77de..6ecbb740b5 100644 --- a/fighters/dedede/src/acmd/smashes.rs +++ b/fighters/dedede/src/acmd/smashes.rs @@ -1,110 +1,110 @@ use super::*; -unsafe extern "C" fn dedede_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 0.0, 0, 0, 0, 0, 3.5, -12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 16.0, 361, 90, 0, 30, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); let hit1 = Vector2f { x: 16.0, y: 2.0 }; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &hit1, 2, false); AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &hit1, 2, false); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, -5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, -5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 22.0, 361, 90, 0, 48, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer2"), 24.0, 361, 90, 0, 48, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.3); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn dedede_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.0-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.0-12.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 16.0, 80, 106, 0, 40, 4.0, -12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn dedede_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.0-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.0-9.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 13.0, 45, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 19.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer2"), 13.0, 130, 85, 0, 60, 6.0, -9.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attacks4", dedede_attack_s4_s_game) - .acmd("game_attackhi4", dedede_attack_hi4_game) - .acmd("game_attacklw4", dedede_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", dedede_attack_s4_s_game); + + agent.acmd("game_attackhi4", dedede_attack_hi4_game); + + agent.acmd("game_attacklw4", dedede_attack_lw4_game); } diff --git a/fighters/dedede/src/acmd/specials.rs b/fighters/dedede/src/acmd/specials.rs index df650d03e5..58a2048de9 100644 --- a/fighters/dedede/src/acmd/specials.rs +++ b/fighters/dedede/src/acmd/specials.rs @@ -1,542 +1,542 @@ use super::*; -unsafe extern "C" fn dedede_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn dedede_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_n_loop_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 9.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 6.0, 23.0, Some(0.0), Some(12.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 8.5, 10.0, Some(0.0), Some(8.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 13.0, 5.5, Some(0.0), Some(3.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 8.5, 11.0, Some(0.0), Some(8.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 9.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 6.0, 23.0, Some(0.0), Some(12.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 8.5, 10.0, Some(0.0), Some(8.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 13.0, 5.5, Some(0.0), Some(3.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 8.5, 11.0, Some(0.0), Some(8.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0),Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(12.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0),Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } } } -unsafe extern "C" fn dedede_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); +} + +unsafe extern "C" fn dedede_special_air_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn dedede_special_air_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_air_n_loop_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 12.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 9.0, 23.0, Some(0.0), Some(15.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 11.5, 10.0, Some(0.0), Some(11.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 16.0, 5.5, Some(0.0), Some(6.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 11.5, 11.0, Some(0.0), Some(11.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 12.0, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 9.0, 23.0, Some(0.0), Some(15.0), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 11.5, 10.0, Some(0.0), Some(11.5), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 16.0, 5.5, Some(0.0), Some(6.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 11.5, 11.0, Some(0.0), Some(11.5), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); - SEARCH(fighter, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); - search!(fighter, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(9.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 170, 40, 30, 0, 6.0, 0.0, 6.5, 16.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 170, 40, 10, 0, 7.0, 0.0, 3.5, 23.0, Some(0.0), Some(9.5), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 0, 0, 0, 0, 9.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(21.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 9.5, 5.5, Some(0.0), Some(2.5), Some(5.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 0, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); + SEARCH(agent, 1, 0, Hash40::new("top"), 9.5, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(20.5), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, true); + search!(agent, *MA_MSC_CMD_SEARCH_SET_OPPONENT, 1, 0, *COLLISION_TARGET_PROPERTY, *COLLISION_PROPERTY_MASK_REFLECT); } } } -unsafe extern "C" fn dedede_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 25.0 / (19.0-1.0)); + FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); } -unsafe extern "C" fn dedede_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 25.0 / (19.0-1.0)); -} - -unsafe extern "C" fn dedede_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_s_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_GENERATE); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_PUTOUT); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 35.0 / (65.0-26.0)); + FT_MOTION_RATE(agent, 35.0 / (65.0-26.0)); } -unsafe extern "C" fn dedede_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_s_start_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (PostureModule::lr(boma) == -1.0){ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); } - LAST_EFFECT_SET_COLOR(fighter, 0.96, 0.6, 0.26); + LAST_EFFECT_SET_COLOR(agent, 0.96, 0.6, 0.26); } frame(lua_state, 18.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state,21.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } } -unsafe extern "C" fn dedede_special_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_s_start_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_wad_throw")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_wad_throw")); } } -unsafe extern "C" fn dedede_special_s_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_s_start_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - //RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + //RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_air_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_s_start_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (PostureModule::lr(boma) == -1.0){ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), 2.0, -2.0, -2.0, 90.0, 0.0, 0.0 , 0.6, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("dedede_hammer_arc_wind"), Hash40::new("throw"), -2.0, -2.0, -2.0, 90.0, 180.0, 0.0 , 0.6, true); } - LAST_EFFECT_SET_COLOR(fighter, 0.96, 0.6, 0.26); + LAST_EFFECT_SET_COLOR(agent, 0.96, 0.6, 0.26); } frame(lua_state, 18.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state,21.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("dedede_hammer_arc_wind"), true, true); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } } -unsafe extern "C" fn dedede_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_air_s_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_GENERATE); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_PUTOUT); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 35.0 / (65.0-26.0)); + FT_MOTION_RATE(agent, 35.0 / (65.0-26.0)); } -unsafe extern "C" fn dedede_special_air_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_s_start_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_dedede_wad_throw")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_dedede_wad_throw")); } } -unsafe extern "C" fn dedede_special_air_s_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_air_s_start_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - //RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + //RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_s_miss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_s_miss_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } } -unsafe extern "C" fn dedede_special_air_s_miss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_air_s_miss_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_MISS_SEARCH); } } -unsafe extern "C" fn dedede_special_s_get_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_s_get_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0 / (65.0 - 26.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0 / (65.0 - 26.0)); } } -unsafe extern "C" fn dedede_special_air_s_get_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 18.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); +unsafe extern "C" fn dedede_special_s_get_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent){ + EFFECT(agent, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0 / (65.0 - 26.0)); + frame(lua_state, 5.0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } } } -unsafe extern "C" fn dedede_special_s_get_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT(fighter, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn dedede_special_s_get_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 5.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } + frame(lua_state, 18.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_air_s_get_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT(fighter, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn dedede_special_air_s_get_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_GORDO_THROW_FLAG_THROW); } - frame(lua_state, 5.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } + frame(lua_state, 25.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0 / (65.0 - 26.0)); } } -unsafe extern "C" fn dedede_special_s_get_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn dedede_special_air_s_get_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent){ + EFFECT(agent, Hash40::new("sys_item_get"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 18.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 5.0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4.0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } } } -unsafe extern "C" fn dedede_special_air_s_get_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn dedede_special_air_s_get_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dedede_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 13.0/(18.0-1.0)); + if is_excute(agent){ + FT_MOTION_RATE(agent, 13.0/(18.0-1.0)); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_JETHAMMER, false, -1); } } -unsafe extern "C" fn dedede_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 13.0/(18.0-1.0)); + if is_excute(agent){ + FT_MOTION_RATE(agent, 13.0/(18.0-1.0)); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_JETHAMMER, false, -1); } } -unsafe extern "C" fn dedede_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 43.0/(60.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 43.0/(60.0-15.0)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn dedede_special_lw_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_lw_max_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 16.0); for _ in 0.. 20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0 * (rush_speed/30.0), 0.0, 0.0)); } wait(lua_state, 1.0); } } -unsafe extern "C" fn dedede_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.5, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 10.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 5.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 11.0, 40, 80, 0, 40, 6.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 43.0/(60.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 43.0/(60.0-15.0)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn dedede_special_air_lw_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_air_lw_max_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 14); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(rush_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 40.0, 361, 46, 0, 60, 9.0, 16.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 46, 0, 60, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 16.0); for _ in 0.. 20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0 * (rush_speed/30.0), 0.0, 0.0)); } wait(lua_state, 1.0); } } -unsafe extern "C" fn dedede_special_lw_jump_squat_game(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0 / (8.0-1.0)); +unsafe extern "C" fn dedede_special_lw_jump_squat_game(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0 / (8.0-1.0)); } -unsafe extern "C" fn dedede_special_hi_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_hi_jump_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 4.0, 65, 100, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 4.0, 65, 100, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 65, 100, 0, 50, 6.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SUPER_JUMP_WORK_FLAG_TURN); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -4.0, 0.0)); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 270, 90, 0, 60, 9.8, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 270, 56, 0, 60, 8.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 140); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 270, 90, 0, 60, 9.8, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 270, 56, 0, 60, 8.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn dedede_special_hi_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_special_hi_landing_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - if is_excute(fighter){ - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); + if is_excute(agent){ + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); } frame(lua_state, 3.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 90, 82, 0, 95, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 90, 82, 0, 95, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 82, 0, 95, 6.0, 0.0, 6.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_DEDEDE_STATUS_SUPER_JUMP_WORK_FLAG_STAR_RIGHT); ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_STAR, false, 0); @@ -548,67 +548,82 @@ unsafe extern "C" fn dedede_special_hi_landing_game(fighter: &mut L2CAgentBase) } -unsafe extern "C" fn dedede_special_hi_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 13.0 / (20.0 - 1.0)); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); +unsafe extern "C" fn dedede_special_hi_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 13.0 / (20.0 - 1.0)); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualwaist"), *HIT_STATUS_OFF); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_specialnstart", dedede_special_n_start_game) - .acmd("game_specialnloop", dedede_special_n_loop_game) - .acmd("game_specialairnstart", dedede_special_air_n_start_game) - .acmd("game_specialairnloop", dedede_special_air_n_loop_game) - .acmd("game_specialnend", dedede_special_n_end_game) - .acmd("game_specialairnend", dedede_special_air_n_end_game) - .acmd("game_specialsstart", dedede_special_s_start_game) - .acmd("effect_specialsstart", dedede_special_s_start_effect) - .acmd("sound_specialsstart", dedede_special_s_start_sound) - .acmd("expression_specialsstart", dedede_special_s_start_expression) - .acmd("effect_specialairsstart", dedede_special_air_s_start_effect) - .acmd("game_specialairsstart", dedede_special_air_s_start_game) - .acmd("sound_specialairsstart", dedede_special_air_s_start_sound) - .acmd("expression_specialairsstart", dedede_special_air_s_start_expression) - .acmd("game_specialsmiss", dedede_special_s_miss_game) - .acmd("game_specialairsmiss", dedede_special_air_s_miss_game) - .acmd("game_specialsget", dedede_special_s_get_game) - .acmd("game_specialairsget", dedede_special_air_s_get_game) - .acmd("effect_specialsget", dedede_special_s_get_effect) - .acmd("effect_specialairsget", dedede_special_air_s_get_effect) - .acmd("expression_specialsget", dedede_special_s_get_expression) - .acmd("expression_specialairsget", dedede_special_air_s_get_expression) - .acmd("game_speciallwstart", dedede_special_lw_start_game) - .acmd("game_specialairlwstart", dedede_special_lw_start_game) - .acmd("game_specialairlwstart", dedede_special_air_lw_start_game) - .acmd("game_speciallw", dedede_special_lw_game) - .acmd("game_speciallwmax", dedede_special_lw_max_game) - .acmd("game_specialairlw", dedede_special_air_lw_game) - .acmd("game_specialairlwmax", dedede_special_air_lw_max_game) - .acmd("game_speciallwjumpsquat", dedede_special_lw_jump_squat_game) - .acmd("game_specialhijump", dedede_special_hi_jump_game) - .acmd("game_specialhilandingr", dedede_special_hi_landing_game) - .acmd("game_specialhilandingl", dedede_special_hi_landing_game) - .acmd("game_specialairhiturnl", dedede_special_hi_turn_game) - .acmd("game_specialairhiturnr", dedede_special_hi_turn_game) - .install(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", dedede_special_n_start_game); + agent.acmd("game_specialnloop", dedede_special_n_loop_game); + agent.acmd("game_specialnend", dedede_special_n_end_game); + + agent.acmd("game_specialairnstart", dedede_special_air_n_start_game); + agent.acmd("game_specialairnloop", dedede_special_air_n_loop_game); + agent.acmd("game_specialairnend", dedede_special_air_n_end_game); + + agent.acmd("game_specialsstart", dedede_special_s_start_game); + agent.acmd("effect_specialsstart", dedede_special_s_start_effect); + agent.acmd("sound_specialsstart", dedede_special_s_start_sound); + agent.acmd("expression_specialsstart", dedede_special_s_start_expression); + + agent.acmd("effect_specialairsstart", dedede_special_air_s_start_effect); + agent.acmd("game_specialairsstart", dedede_special_air_s_start_game); + agent.acmd("sound_specialairsstart", dedede_special_air_s_start_sound); + agent.acmd("expression_specialairsstart", dedede_special_air_s_start_expression); + + agent.acmd("game_specialsmiss", dedede_special_s_miss_game); + + agent.acmd("game_specialairsmiss", dedede_special_air_s_miss_game); + + agent.acmd("game_specialsget", dedede_special_s_get_game); + agent.acmd("effect_specialsget", dedede_special_s_get_effect); + agent.acmd("expression_specialsget", dedede_special_s_get_expression); + + agent.acmd("game_specialairsget", dedede_special_air_s_get_game); + agent.acmd("effect_specialairsget", dedede_special_air_s_get_effect); + agent.acmd("expression_specialairsget", dedede_special_air_s_get_expression); + + agent.acmd("game_speciallwstart", dedede_special_lw_start_game); + agent.acmd("game_specialairlwstart", dedede_special_lw_start_game); + + agent.acmd("game_specialairlwstart", dedede_special_air_lw_start_game); + + agent.acmd("game_speciallw", dedede_special_lw_game); + + agent.acmd("game_speciallwmax", dedede_special_lw_max_game); + + agent.acmd("game_specialairlw", dedede_special_air_lw_game); + + agent.acmd("game_specialairlwmax", dedede_special_air_lw_max_game); + + agent.acmd("game_speciallwjumpsquat", dedede_special_lw_jump_squat_game); + + agent.acmd("game_specialhijump", dedede_special_hi_jump_game); + + agent.acmd("game_specialhilandingr", dedede_special_hi_landing_game); + agent.acmd("game_specialhilandingl", dedede_special_hi_landing_game); + + agent.acmd("game_specialairhiturnl", dedede_special_hi_turn_game); + agent.acmd("game_specialairhiturnr", dedede_special_hi_turn_game); } diff --git a/fighters/dedede/src/acmd/throws.rs b/fighters/dedede/src/acmd/throws.rs index 741ff1956f..dc256987d4 100644 --- a/fighters/dedede/src/acmd/throws.rs +++ b/fighters/dedede/src/acmd/throws.rs @@ -1,92 +1,92 @@ use super::*; -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 125, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 125, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 6.0, 17.0, 0.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 4.0, 361, 150, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 20, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 20, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 5, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - //FT_CATCH_STOP(fighter, 8, 1); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 70, 0, 65, 8.0, 0.0, 8.0, 0.0, Some(-5.0), Some(8.0), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_CATCH_STOP(agent, 8, 1); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 70, 0, 65, 8.0, 0.0, 8.0, 0.0, Some(-5.0), Some(8.0), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 8, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.3); //FighterCutInManager::set_throw_finish_offset(boma, 0, 2, 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 90, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 90, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 80, 0, 30, 7.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 80, 0, 30, 7.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 32); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 32); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.7); //FighterCutInManager::set_throw_finish_offset(boma, 0, 12, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_throwf", game_throwf) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/dedede/src/acmd/tilts.rs b/fighters/dedede/src/acmd/tilts.rs index aa33f738cb..83d47c3522 100644 --- a/fighters/dedede/src/acmd/tilts.rs +++ b/fighters/dedede/src/acmd/tilts.rs @@ -1,61 +1,61 @@ use super::*; -unsafe extern "C" fn dedede_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 2.5, 15, 100, 60, 0, 2.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 2.5, 25, 100, 50, 0, 2.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 100, 30, 0, 6.0, 0.0, 7.0, 23.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 100, 100, 30, 0, 4.0, 0.0, 4.0, 20.0, Some(0.0), Some(4.0), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 250, 100, 26, 0, 4.0, 0.0, 10.5, 20.0, Some(0.0), Some(10.5), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 2.5, 15, 100, 60, 0, 2.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 2.5, 25, 100, 50, 0, 2.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 100, 30, 0, 6.0, 0.0, 7.0, 23.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 100, 100, 30, 0, 4.0, 0.0, 4.0, 20.0, Some(0.0), Some(4.0), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 250, 100, 26, 0, 4.0, 0.0, 10.5, 20.0, Some(0.0), Some(10.5), Some(25.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer2"), 3.0, 361, 180, 0, 25, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, -8.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 3.0, 361, 180, 0, 25, 3.5, 1.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer2"), 3.0, 361, 180, 0, 25, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(43.0-27.0)); + FT_MOTION_RATE(agent, 18.0/(43.0-27.0)); } frame(lua_state, 43.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn dedede_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 7.0, 6.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, -1.5, 1.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, 4.5, 0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, -1.5, 1.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 12.0, 88, 90, 0, 60, 5.0, 4.5, 0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } @@ -72,63 +72,63 @@ unsafe extern "C" fn dedede_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 100, 0, 30, 5.0, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 100, 0, 30, 3.5, 0.0, 3.0, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn dedede_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dedede_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 4.0, 18.0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 4.0, 18.0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } -unsafe extern "C" fn dedede_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn dedede_attack_lw3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("dedede") - .acmd("game_attacks3", dedede_attack_s3_s_game) - .acmd("game_attackhi3", dedede_attack_hi3_game) - .acmd("effect_attackhi3", dedede_attack_hi3_effect) - .acmd("game_attacklw3", dedede_attack_lw3_game) - .acmd("effect_attacklw3", dedede_attack_lw3_effect) - .acmd("expression_attacklw3", dedede_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", dedede_attack_s3_s_game); + + agent.acmd("game_attackhi3", dedede_attack_hi3_game); + agent.acmd("effect_attackhi3", dedede_attack_hi3_effect); + + agent.acmd("game_attacklw3", dedede_attack_lw3_game); + agent.acmd("effect_attacklw3", dedede_attack_lw3_effect); + agent.acmd("expression_attacklw3", dedede_attack_lw3_expression); } diff --git a/fighters/dedede/src/gordo/acmd/mod.rs b/fighters/dedede/src/gordo/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/dedede/src/gordo/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/dedede/src/gordo/acmd/specials.rs b/fighters/dedede/src/gordo/acmd/specials.rs new file mode 100644 index 0000000000..3d743bfa90 --- /dev/null +++ b/fighters/dedede/src/gordo/acmd/specials.rs @@ -0,0 +1,219 @@ +use super::*; + +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let gordo_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + PostureModule::reverse_rot_y_lr(boma); + PostureModule::reverse_lr(boma); + } + /* Prevents backwards gordos */ + if PostureModule::lr(owner_module_accessor) * gordo_speed_x < 0.0{ + KineticModule::mul_speed(boma, &Vector3f{x: -1.0, y: 1.0,z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + /* Checks every frame the gordo is active, set equal to the gordo life param */ + for _ in 0..181{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 2.0) * 0.25); + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 120, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); + + //Reduces the max amount of bounces by 1 per recatch on the same gordo + if (WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) - VarModule::get_int(owner_module_accessor.object(), vars::dedede::instance::RECATCH_COUNTER)) < 0{ + StatusModule::change_status_request(agent.module_accessor, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); + } + } + else{ + /* Reduces damage on every bounce, by 10% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 8.0) * 0.1); + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5 * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); + } + } + } + wait(lua_state, 1.0); + } + +} + +unsafe extern "C" fn effect_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + //Intentionally blank to kill vanilla effects + } +} + +unsafe extern "C" fn game_specialsshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + for _ in 0..181{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + GroundModule::update_force(boma); + /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialsshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + + //Disables vanilla regrab searchbox, this ALWAYS needs to be on due to new regrab + WorkModule::on_flag(owner_module_accessor, *FIGHTER_DEDEDE_INSTANCE_WORK_ID_FLAG_PERSONAL); + let mut speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let mut speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + + if is_excute(agent) { + WorkModule::set_int(boma, 300, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + /* below grabs the boma of the opponent hitting gordo, the attack data of that hit, and adjusts the speed accordingly */ + let num_players = Fighter::get_fighter_entry_count(); + if StopModule::is_hit(boma) + && !StopModule::is_hit(owner_module_accessor) { + for i in 0..num_players{ + let opponent_boma = sv_battle_object::module_accessor(Fighter::get_id_from_entry_id(i)); + + if AttackModule::is_infliction(opponent_boma, *COLLISION_KIND_MASK_HIT){ + let data = AttackModule::attack_data(opponent_boma, 0, false); + let mut angle = (*data).vector as f32; + let mut damage = (*data).power; + let kbg = (*data).r_eff as f32; + let bkb = (*data).r_add as f32; + + //Covering sakurai angle and other funky angles + if angle > 360.0{ + angle = 32.0; + } + //Damage cap, gordo goes to the moon otherwise + if damage > 25.0{ + damage = 25.0; + } + + let radians = angle.to_radians(); + let cos = radians.cos(); + let sin = radians.sin(); + + //formulas for the speed multipliers + let x_speed_mul = cos * ((kbg * 0.3718) + bkb / 100.0) * (damage / 8.0) / 70.0; + let y_speed_mul = sin * (damage / 2.5) * ((kbg * 0.3718) + bkb / 100.0) / 60.0 / speed_y; + + KineticModule::mul_speed(boma, &Vector3f{x: x_speed_mul, y: y_speed_mul , z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + /* Seeing the speed is still the same. This only occurs if the above did not run, which happens on projectiles or non-direct hits (Bayo smash attacks) */ + if speed_x == KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL) && speed_y == KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL){ + let damage = DamageModule::damage(boma, 0); + if damage > 11.0{ + KineticModule::mul_speed(boma, &Vector3f{x: 0.8, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + else{ + KineticModule::mul_speed(boma, &Vector3f{x: 0.4 + 0.05 * (damage - 5.0), y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + } + } + } + } + for _ in 0..301{ + if is_excute(agent) { + if !boma.is_status(*WEAPON_DEDEDE_GORDO_STATUS_KIND_HOP) { + /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ + let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); + if !StopModule::is_stop(boma){ + speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); + speed_y = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL).abs(); + } + let mut speed = speed_x.max(speed_y); + let mut damage = (7.5 * (speed * 0.6)); + damage = damage.max(7.5); + + ATTACK(agent, 0, 0, Hash40::new("hip"), damage * bounce_dmg_multiplier, 60, 110, 60, 0, 6.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + } + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn effect_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //Intentionally blank to kill vanilla effects + +} + +unsafe extern "C" fn game_specialswallstop(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + + } +} + +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } + } + frame(lua_state, 7.0); + if is_excute(agent){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } +} + +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + + if is_excute(agent){ + if VarModule::is_flag(owner_module_accessor.object(), vars::dedede::instance::IS_DASH_GORDO){ + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_FLAG_VISIBILITY_ON); + } +} + +pub fn install(agent: &mut Agent){ + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("effect_specialsthrow", effect_specialsthrow); + + agent.acmd("game_specialsshot", game_specialsshot); + agent.acmd("effect_specialsshot", effect_specialsshot); + + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + + agent.acmd("game_specialswallstop", game_specialswallstop); + + agent.acmd("game_specialsstart", game_specialsstart); + + agent.acmd("game_specialairsstart", game_specialairsstart); +} diff --git a/fighters/dedede/src/gordo/mod.rs b/fighters/dedede/src/gordo/mod.rs new file mode 100644 index 0000000000..661596ace3 --- /dev/null +++ b/fighters/dedede/src/gordo/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("dedede_gordo"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dedede/src/gordo/status.rs b/fighters/dedede/src/gordo/status.rs new file mode 100644 index 0000000000..c863547037 --- /dev/null +++ b/fighters/dedede/src/gordo/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; + +unsafe extern "C" fn dead_end(weapon: &mut L2CWeaponCommon) -> L2CValue{ + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_DEDEDE{ + let dedede = utils::util::get_battle_object_from_id(owner_id); + VarModule::set_flag(dedede, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); + VarModule::set_int(dedede, vars::dedede::instance::RECATCH_COUNTER, 0); + VarModule::set_flag(dedede, vars::dedede::instance::IS_DASH_GORDO, false); + } + return smashline::original_status(End, weapon, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD)(weapon) +} + +pub fn install(agent: &mut Agent){ + agent.status(End, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, dead_end); +} \ No newline at end of file diff --git a/fighters/dedede/src/lib.rs b/fighters/dedede/src/lib.rs index 2e11a95392..cd559e3b24 100644 --- a/fighters/dedede/src/lib.rs +++ b/fighters/dedede/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +//articles + +pub mod gordo; +pub mod star; + use smash::{ lib::{ L2CValue, @@ -37,20 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn dedede_init(fighter: &mut L2CFighterCommon){ - if fighter.global_table[globals::FIGHTER_KIND] != FIGHTER_KIND_DEDEDE{ - return; - } - - VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); -} +#[macro_use] extern crate smash_script; pub fn install() { - smashline::Agent::new("dedede") - .on_start(dedede_init) - .install(); - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("dedede"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + gordo::install(); + star::install(); } diff --git a/fighters/dedede/src/opff.rs b/fighters/dedede/src/opff.rs index e128abd4b7..0978d71bee 100644 --- a/fighters/dedede/src/opff.rs +++ b/fighters/dedede/src/opff.rs @@ -23,8 +23,8 @@ unsafe fn rotate_bone(boma: &mut BattleObjectModuleAccessor, max_angle: f32, min angle = max_angle } let mut rotation = Vector3f{x: 0.0, y: 0.0, z: ((angle * -1.0 * strength) - 2.5)}; - let fighter = utils::util::get_fighter_common_from_accessor(boma); - fighter.set_joint_rotate("bust", rotation); + let agent = utils::util::get_fighter_common_from_accessor(boma); + agent.set_joint_rotate("bust", rotation); } unsafe fn bust_lean(boma: &mut BattleObjectModuleAccessor, lean_frame: f32, return_frame: f32, max_angle: f32, min_angle: f32) { @@ -46,16 +46,16 @@ unsafe fn bust_lean(boma: &mut BattleObjectModuleAccessor, lean_frame: f32, retu } } -unsafe fn angled_inhale_shot(fighter: &mut L2CFighterCommon) { - if ArticleModule::is_exist(fighter.boma(), *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ - if fighter.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_N_SHOT_OBJECT_HIT){ - bust_lean(fighter.boma(), 6.0, 12.0, 20.0, -20.0); +unsafe fn angled_inhale_shot(agent: &mut L2CFighterCommon) { + if ArticleModule::is_exist(agent.boma(), *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ + if agent.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_N_SHOT_OBJECT_HIT){ + bust_lean(agent.boma(), 6.0, 12.0, 20.0, -20.0); } } } //Gordo recatch and waddledash -unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, fighter: &mut L2CFighterCommon){ +unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, agent: &mut L2CFighterCommon){ if ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ let article = ArticleModule::get_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO); let object_id = smash::app::lua_bind::Article::get_battle_object_id(article) as u32; @@ -69,35 +69,35 @@ unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, fight if ((gordo_pos.x - (char_pos.x + offset.x)).abs() < 19.0 && (gordo_pos.y - (char_pos.y + offset.y)).abs() < 15.0){ if ((StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_ESCAPE_AIR) || ((StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_LANDING) && StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_ESCAPE_AIR)) - && VarModule::is_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG){ - if fighter.status_frame() > 1 - && fighter.status_frame() < 4 { //We don't want to go into recatch if we are in the middle of airdodge/landing + && VarModule::is_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG){ + if agent.status_frame() > 1 + && agent.status_frame() < 4 { //We don't want to go into recatch if we are in the middle of airdodge/landing if StatusModule::status_kind(article_boma) != *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD{ - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO, true); - VarModule::inc_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER); + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO, true); + VarModule::inc_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER); - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, true); + VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, true); ArticleModule::remove(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO, smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_SPECIAL_S, false); if StatusModule::situation_kind(boma) == *SITUATION_KIND_AIR { - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 1.5, y: 0.0, z:1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_get"), 0.0, 1.0, false, 0.0, false, false); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 1.5, y: 0.0, z:1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_s_get"), 0.0, 1.0, false, 0.0, false, false); } else{ StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_SPECIAL_S, false); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_get"), 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_s_get"), 0.0, 1.0, false, 0.0, false, false); } //Prevents turnarounds - if ControlModule::get_stick_x(fighter.module_accessor) * char_lr < 0.0{ + if ControlModule::get_stick_x(agent.module_accessor) * char_lr < 0.0{ PostureModule::reverse_lr(boma); PostureModule::reverse_rot_y_lr(boma); let new_char_lr = PostureModule::lr(boma); - if (char_lr != new_char_lr) && (ControlModule::get_stick_x(fighter.module_accessor) * new_char_lr < 0.0){ + if (char_lr != new_char_lr) && (ControlModule::get_stick_x(agent.module_accessor) * new_char_lr < 0.0){ PostureModule::reverse_lr(boma); PostureModule::reverse_rot_y_lr(boma); } @@ -111,27 +111,27 @@ unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, fight || StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_LANDING || StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_JUMP_SQUAT || WorkModule::is_flag(boma, *FIGHTER_STATUS_GUARD_ON_WORK_FLAG_JUST_SHIELD){ - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); + VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); } //Prevents B reversing when we are in the dash if StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_SPECIAL_S - && VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - if fighter.status_frame() > 1 && fighter.status_frame() < 4{ + && VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + if agent.status_frame() > 1 && agent.status_frame() < 4{ ControlModule::reset_main_stick(boma); } } - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, false); + VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, false); } //checking if gordo does not exist, but is not removed by this function - else if !ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO) && !VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG){ - VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO, false); - VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); + else if !ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO) && !VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG){ + VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO, false); + VarModule::set_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); } } -unsafe fn super_jump_fail_edge_cancel(fighter: &mut L2CFighterCommon){ - if fighter.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_FALL, false); +unsafe fn super_jump_fail_edge_cancel(agent: &mut L2CFighterCommon){ + if agent.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE) && agent.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + StatusModule::change_status_force(agent.boma(), *FIGHTER_STATUS_KIND_FALL, false); } } @@ -206,10 +206,10 @@ unsafe fn bair_foot_rotation_scaling(boma: &mut BattleObjectModuleAccessor) { } } -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ +unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { + if !agent.is_in_hitlag() + && !StatusModule::is_changing(agent.module_accessor) + && agent.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_LW, @@ -232,51 +232,49 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_FALL, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_PASS ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + && agent.is_situation(*SITUATION_KIND_AIR) { + agent.sub_air_check_dive(); + if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(agent.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); } } } } -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { +pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { //bair_foot_rotation_scaling(boma); super_dedede_jump_quickfall(boma, frame); - gordo_recatch(boma, frame, fighter); - angled_inhale_shot(fighter); - super_jump_fail_edge_cancel(fighter); - fastfall_specials(fighter); + gordo_recatch(boma, frame, agent); + angled_inhale_shot(agent); + super_jump_fail_edge_cancel(agent); + fastfall_specials(agent); } -pub extern "C" fn dedede_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn dedede_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(fighter); - dedede_frame(fighter) + common::opff::fighter_common_opff(agent); + dedede_frame(agent) } } -pub unsafe fn dedede_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn dedede_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(agent) { + moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("dedede") - .on_line(Main, dedede_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dedede_frame_wrapper); } diff --git a/fighters/dedede/src/star/acmd/mod.rs b/fighters/dedede/src/star/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/dedede/src/star/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/dedede/src/star/acmd/specials.rs b/fighters/dedede/src/star/acmd/specials.rs new file mode 100644 index 0000000000..1368696bd1 --- /dev/null +++ b/fighters/dedede/src/star/acmd/specials.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 65, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent){ + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/dedede/src/star/mod.rs b/fighters/dedede/src/star/mod.rs new file mode 100644 index 0000000000..73a6a60efe --- /dev/null +++ b/fighters/dedede/src/star/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("dedede_star"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status.rs index e7affe80e4..4750316072 100644 --- a/fighters/dedede/src/status.rs +++ b/fighters/dedede/src/status.rs @@ -3,39 +3,26 @@ use globals::*; // Prevent going into air jet hammer when Special is released during Jumpsquat -unsafe extern "C" fn special_lw_jump_squat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ - if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); +unsafe extern "C" fn special_lw_jump_squat_exec(agent: &mut L2CFighterCommon) -> L2CValue{ + if ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ + StatusModule::change_status_force(agent.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); } return 0.into(); } -// Reset Gordo recatch flags on despawn +unsafe extern "C" fn dedede_special_hi_status_main(agent: &mut L2CFighterCommon) -> L2CValue{ + MotionModule::change_motion(agent.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); + StatusModule::change_status_force(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); -unsafe extern "C" fn dedede_gordo_dead_end(weapon: &mut L2CWeaponCommon) -> L2CValue{ - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_DEDEDE{ - let dedede = utils::util::get_battle_object_from_id(owner_id); - VarModule::set_flag(dedede, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); - VarModule::set_int(dedede, vars::dedede::instance::RECATCH_COUNTER, 0); - VarModule::set_flag(dedede, vars::dedede::instance::IS_DASH_GORDO, false); - } - return smashline::original_status(End, weapon, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD)(weapon) + return 0.into(); } -unsafe extern "C" fn dedede_special_hi_status_main(fighter: &mut L2CFighterCommon) -> L2CValue{ - MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); - - return 0.into(); +unsafe extern "C" fn on_start(agent: &mut L2CFighterCommon){ + VarModule::set_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); } -pub fn install() { - smashline::Agent::new("dedede_gordo") - .status(End, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, dedede_gordo_dead_end) - .install(); - smashline::Agent::new("dedede") - .status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec) - .status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, dedede_special_hi_status_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec); + agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, dedede_special_hi_status_main); } \ No newline at end of file From b8711727f286face7d9b161a4742236ea63a73b8 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 09:29:10 -0500 Subject: [PATCH 009/172] fox/wolf --- fighters/fox/src/acmd/aerials.rs | 403 +++++++------- fighters/fox/src/acmd/ground.rs | 80 ++- fighters/fox/src/acmd/mod.rs | 16 +- fighters/fox/src/acmd/other.rs | 175 ++++--- fighters/fox/src/acmd/smashes.rs | 156 +++--- fighters/fox/src/acmd/specials.rs | 199 +++---- fighters/fox/src/acmd/throws.rs | 167 +++--- fighters/fox/src/acmd/tilts.rs | 176 +++---- fighters/fox/src/lib.rs | 9 +- fighters/fox/src/opff.rs | 41 +- fighters/fox/src/status.rs | 10 +- fighters/fox/src/status/special_hi.rs | 20 +- fighters/fox/src/status/special_lw.rs | 18 +- fighters/fox/src/status/special_s.rs | 10 +- fighters/wolf/src/acmd/aerials.rs | 168 +++--- fighters/wolf/src/acmd/ground.rs | 153 +++--- fighters/wolf/src/acmd/mod.rs | 16 +- fighters/wolf/src/acmd/other.rs | 210 ++++---- fighters/wolf/src/acmd/smashes.rs | 141 +++-- fighters/wolf/src/acmd/specials.rs | 491 +++++++++--------- fighters/wolf/src/acmd/throws.rs | 73 ++- fighters/wolf/src/acmd/tilts.rs | 136 +++-- fighters/wolf/src/blaster_bullet/acmd/mod.rs | 7 + .../wolf/src/blaster_bullet/acmd/specials.rs | 13 + fighters/wolf/src/blaster_bullet/mod.rs | 9 + fighters/wolf/src/illusion/acmd/mod.rs | 7 + fighters/wolf/src/illusion/acmd/specials.rs | 12 + fighters/wolf/src/illusion/mod.rs | 9 + fighters/wolf/src/lib.rs | 17 +- fighters/wolf/src/opff.rs | 8 +- fighters/wolf/src/status.rs | 8 +- fighters/wolf/src/status/special_hi.rs | 12 +- fighters/wolf/src/status/special_lw.rs | 16 +- fighters/wolf/src/status/special_s.rs | 44 +- 34 files changed, 1478 insertions(+), 1552 deletions(-) create mode 100644 fighters/wolf/src/blaster_bullet/acmd/mod.rs create mode 100644 fighters/wolf/src/blaster_bullet/acmd/specials.rs create mode 100644 fighters/wolf/src/blaster_bullet/mod.rs create mode 100644 fighters/wolf/src/illusion/acmd/mod.rs create mode 100644 fighters/wolf/src/illusion/acmd/specials.rs create mode 100644 fighters/wolf/src/illusion/mod.rs diff --git a/fighters/fox/src/acmd/aerials.rs b/fighters/fox/src/acmd/aerials.rs index f7a2b83675..8e81aff4e3 100644 --- a/fighters/fox/src/acmd/aerials.rs +++ b/fighters/fox/src/acmd/aerials.rs @@ -1,384 +1,379 @@ use super::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.850); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.850); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.8, 75, 130, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed1 = Vector3f{ x: 0.0, y: 0.3, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.3, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.3, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed2 = Vector3f{ x: 0.0, y: 1.1, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed2); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed3 = Vector3f{ x: 0.0, y: 0.9, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed3); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.8, 366, 100, 120, 0, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.8, 75, 150, 0, 60, 4.5, 5.1, -0.8, 1.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed4 = Vector3f{ x: 0.0, y: 0.4, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed4); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.5, 5.1, -0.8, 1.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.8, 60, 90, 0, 57, 5.5, 5.1, -0.8, 1.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.8, 60, 90, 0, 57, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_FOX_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 0, 15, 220, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 0, 115, 220, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 0, 15, 220, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 0, 115, 220, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.7, 2, 8, 25, 195, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.7, 2, 8, 125, 195, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.7, 2, 8, 25, 195, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.7, 2, 8, 125, 195, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 5, 20, 205, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, 5, 120, 205, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 5, 20, 205, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, 5, 120, 205, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 13, 25, 205, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 13, 115, 205, 0.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.3); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.5, 2, 13, 25, 205, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 6.5, 2, 13, 115, 205, 0.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 23, 7, 200, 1.2, true); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, -23, 180, 180, 1.1, true); - //LAST_EFFECT_SET_ALPHA(fighter, 0.6); - //LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7.5, 2, 23, 7, 200, 1.2, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7.5, 2, -23, 180, 180, 1.1, true); + //LAST_EFFECT_SET_ALPHA(agent, 0.6); + //LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } -unsafe extern "C" fn game_landingairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_FOX_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK) { AttackModule::clear_all(boma); } } - } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2.0, 8.0, -3.5, 23, 120, 220, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2.0, 8.0, -3.5, 23, 120, 220, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 6.5, -12.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true, 0.65); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 6.5, -12.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true, 0.65); + LAST_EFFECT_SET_RATE(agent, 1.3); } - } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_fox_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_fox_swing_m")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_fox_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_fox_swing_m")); } - } -unsafe extern "C" fn expression_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 5.0, 92, 130, 30, 0, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 85, 125, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 85, 125, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 85, 125, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter){ + if is_excute(agent){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 3.0, 290, 100, 30, 0, 5.1, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 2.0, 290, 100, 30, 0, 6.0, -1.5, -1.5, 0.0, Some(-1.5), Some(-1.5), Some(0.0), 0.75, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_landingairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("effect_attackairf", effect_attackairf) - .acmd("game_landingairf", game_landingairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_landingairlw", game_landingairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_landingairf", game_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/fox/src/acmd/ground.rs b/fighters/fox/src/acmd/ground.rs index 62b14217e4..202a1c765c 100644 --- a/fighters/fox/src/acmd/ground.rs +++ b/fighters/fox/src/acmd/ground.rs @@ -1,76 +1,72 @@ - use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 70, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 70, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 70, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 0, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 50, 100, 0, 0, 3.5, 6.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 3.0, 3.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(8.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 70, 95, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 95, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 70, 95, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 70, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 70, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/fox/src/acmd/mod.rs b/fighters/fox/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/fox/src/acmd/mod.rs +++ b/fighters/fox/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index d44f988acb..37c3c1a655 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -1,203 +1,206 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_fox_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_fox_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_fox_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_fox_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_fox_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_fox_step_right_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("fox") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + + agent.acmd("sound_damageflylw", sound_damageflylw); + + agent.acmd("sound_damageflyn", sound_damageflyn); + + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_damageflytop", sound_damageflytop); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/fox/src/acmd/smashes.rs b/fighters/fox/src/acmd/smashes.rs index 2e1fd409d3..ab311f0606 100644 --- a/fighters/fox/src/acmd/smashes.rs +++ b/fighters/fox/src/acmd/smashes.rs @@ -1,149 +1,145 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 103, 0, 28, 3.7, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 15.0, 361, 103, 0, 28, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 15.0, 361, 103, 0, 28, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 103, 0, 28, 3.7, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 15.0, 361, 103, 0, 28, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 15.0, 361, 103, 0, 28, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 103, 0, 30, 3.5, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 103, 0, 30, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 361, 103, 0, 30, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 103, 0, 30, 3.5, 4.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 103, 0, 30, 3.1, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 361, 103, 0, 30, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 4.6, 3.0, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 80, 111, 0, 30, 3.8, 0.0, 5.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0, 80, 111, 0, 30, 4.6, 3.0, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 80, 111, 0, 30, 3.8, 0.0, 5.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.8, 2.9, 1.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.3, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 111, 0, 10, 3.8, 2.9, 1.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.7); - + FT_MOTION_RATE(agent, 0.7); } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("fox_smash_arc"), Hash40::new("top"), 0, 12.2, 1.2, 0, 60, 90, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("fox_smash_arc"), Hash40::new("top"), 0, 12.2, 1.2, 0, 60, 90, 0.9, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn expression_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("toer"), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 25, 78, 0, 30, 5.2, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 78, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/fox/src/acmd/specials.rs b/fighters/fox/src/acmd/specials.rs index 5a4f84b157..f7f027adc3 100644 --- a/fighters/fox/src/acmd/specials.rs +++ b/fighters/fox/src/acmd/specials.rs @@ -1,177 +1,150 @@ - use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 20.0/25.0); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 20.0/25.0); } -unsafe extern "C" fn game_specialairsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - -} - -unsafe extern "C" fn game_specialhihold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 20.0); - for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - } - } -unsafe extern "C" fn game_specialhiholdair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhihold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 105, 20, 0, 20, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 16.0, 60, 60, 0, 70, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 16.0, 60, 60, 0, 70, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 60, 50, 0, 85, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 60, 50, 0, 85, 5.0, 2.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn sound_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let rng = app::sv_math::rand(smash::hash40("fighter"), 2); let sound = if rng == 0 { "vc_fox_special_h01" } else { "vc_fox_attack06" }; - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new(sound)); - PLAY_SE(fighter, Hash40::new("se_fox_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new(sound)); + PLAY_SE(agent, Hash40::new("se_fox_special_h02")); } } -unsafe extern "C" fn game_speciallwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 360, 100, 80, 0, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 24, 24, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 360, 100, 80, 0, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 24, 24, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame_revised(boma, 0, -3.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("sys_hit_elec")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("sys_hit_elec")); ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.54); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.54); } frame(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairlwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("fox_ref_loop"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("fox_ref_ref"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 0.5, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn sound_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); + } +} + +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 10, 32, 0, 62, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 24, 45, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 10, 32, 0, 62, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 24, 45, 0, 66, 8.0, 0.0, 6.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("sys_hit_elec")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("sys_hit_elec")); ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.54); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.54); } frame(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specialairlwstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("fox_ref_loop"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("fox_ref_ref"), Hash40::new("top"), 0, 6, 0, 0, 0, 0, 0.5, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); -unsafe extern "C" fn sound_speciallwstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); - } -} + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhihold", game_specialhihold); + agent.acmd("game_specialhiholdair", game_specialhihold); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specialairsend", game_specialairsend) - .acmd("game_specialhihold", game_specialhihold) - .acmd("game_specialhiholdair", game_specialhiholdair) - .acmd("game_specialhi", game_specialhi) - .acmd("sound_specialhi", sound_specialhi) - .acmd("game_speciallwstart", game_speciallwstart) - .acmd("game_specialairlwstart", game_specialairlwstart) - .acmd("effect_speciallwstart", effect_specialairlwstart) - .acmd("effect_specialairlwstart", effect_specialairlwstart) - .acmd("sound_speciallwstart", sound_speciallwstart) - .acmd("sound_specialairlwstart", sound_speciallwstart) - .install(); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("sound_speciallwstart", sound_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("sound_specialairlwstart", sound_speciallwstart); } diff --git a/fighters/fox/src/acmd/throws.rs b/fighters/fox/src/acmd/throws.rs index fcf79e17e6..db31d29a56 100644 --- a/fighters/fox/src/acmd/throws.rs +++ b/fighters/fox/src/acmd/throws.rs @@ -1,188 +1,187 @@ - use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 56, 85, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 56, 85, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 8, 6); + CHECK_FINISH_CAMERA(agent, 8, 6); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.3); //FighterCutInManager::set_throw_finish_offset(boma, 3, 1, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("close"), false, 0.0); } - FT_MOTION_RATE(fighter, 16.0/(50.0-24.0)); + FT_MOTION_RATE(agent, 16.0/(50.0-24.0)); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(5.0-1.0)); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 90, 110, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(5.0-1.0)); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 90, 110, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 20); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.6); //FighterCutInManager::set_throw_finish_offset(boma, 0, 4, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FOX_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("close"), false, 0.0); } - FT_MOTION_RATE(fighter, 7.0/(31.0-27.0)); + FT_MOTION_RATE(agent, 7.0/(31.0-27.0)); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + + agent.acmd("game_catchdash", game_catchdash); + + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/fox/src/acmd/tilts.rs b/fighters/fox/src/acmd/tilts.rs index f92432c803..ab9c4da3f0 100644 --- a/fighters/fox/src/acmd/tilts.rs +++ b/fighters/fox/src/acmd/tilts.rs @@ -1,162 +1,156 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 0.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 40, 3.5, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 70, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn expression_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(2.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(2.5-1.0)); } frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.0-2.5)); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 7.0, 80, 130, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 130, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 84, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 110, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.0-2.5)); + ATTACK(agent, 3, 0, Hash40::new("legr"), 7.0, 80, 130, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 130, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 84, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 110, 130, 0, 30, 5.0, 4.0, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(28.0-7.0)); + FT_MOTION_RATE(agent, 18.0/(28.0-7.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn expression_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 10.0, 70, 120, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 10.0, 80, 120, 0, 25, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 10.0, 90, 120, 0, 25, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 10.0, 70, 120, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 10.0, 80, 120, 0, 25, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 10.0, 90, 120, 0, 25, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); //AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); //AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); //AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 19.0/(27.0-10.0)); + FT_MOTION_RATE(agent, 19.0/(27.0-10.0)); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("fox") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("expression_attacks3hi", expression_attacks3) - .acmd("expression_attacks3", expression_attacks3) - .acmd("expression_attacks3lw", expression_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("expression_attackhi3", expression_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/fox/src/lib.rs b/fighters/fox/src/lib.rs index 8e2ddcc726..eee04662c4 100644 --- a/fighters/fox/src/lib.rs +++ b/fighters/fox/src/lib.rs @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("fox"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/fox/src/opff.rs b/fighters/fox/src/opff.rs index 185c805460..5d817bdf69 100644 --- a/fighters/fox/src/opff.rs +++ b/fighters/fox/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { @@ -26,12 +25,10 @@ unsafe fn shine_jump_cancel(fighter: &mut L2CFighterCommon) { // Utaunt cancel into Fire Fox unsafe fn utaunt_cancel_fire_fox(boma: &mut BattleObjectModuleAccessor, motion_kind: u64, frame: f32) { - if motion_kind == hash40("appeal_hi_r") || motion_kind == hash40("appeal_hi_l") { - if frame > 41.0 && frame < 44.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH, false); - } - } + if motion_kind == (hash40("appeal_hi_r") | hash40("appeal_hi_l")) + && frame > 41.0 && frame < 44.0 + && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH, false); } } @@ -42,6 +39,13 @@ unsafe fn firefox_startup_ledgegrab(fighter: &mut L2CFighterCommon) { } } +unsafe fn frame_data(boma: &mut BattleObjectModuleAccessor, motion_kind: u64, frame: f32) { + if motion_kind == hash40("throw_hi") + && frame >= 10.0 { + MotionModule::set_rate(boma, 1.8); + } +} + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -49,9 +53,7 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, - - ]) + *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND ]) && fighter.is_situation(*SITUATION_KIND_AIR) { fighter.sub_air_check_dive(); if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { @@ -75,23 +77,12 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { } pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); shine_jump_cancel(fighter); utaunt_cancel_fire_fox(boma, motion_kind, frame); firefox_startup_ledgegrab(fighter); + frame_data(boma, motion_kind, frame); fastfall_specials(fighter); - - // Frame Data - frame_data(boma, status_kind, motion_kind, frame); -} - -unsafe fn frame_data(boma: &mut BattleObjectModuleAccessor, status_kind: i32, motion_kind: u64, frame: f32) { - if motion_kind == hash40("throw_hi") { - if frame >= 10.0 { - MotionModule::set_rate(boma, 1.8); - } - } } pub extern "C" fn fox_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -107,8 +98,6 @@ pub unsafe fn fox_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("fox") - .on_line(Main, fox_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, fox_frame_wrapper); } diff --git a/fighters/fox/src/status.rs b/fighters/fox/src/status.rs index ee9a974345..978a1fc9c1 100644 --- a/fighters/fox/src/status.rs +++ b/fighters/fox/src/status.rs @@ -4,8 +4,8 @@ mod special_s; mod special_hi; mod special_lw; -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); -} +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_hi.rs b/fighters/fox/src/status/special_hi.rs index 805e1b3fb5..aba9162ab9 100644 --- a/fighters/fox/src/status/special_hi.rs +++ b/fighters/fox/src/status/special_hi.rs @@ -49,18 +49,8 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("fox") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - Main, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .status( - End, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); + agent.status(End, *FIGHTER_FOX_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_lw.rs b/fighters/fox/src/status/special_lw.rs index ce393837f3..5ba9799a6b 100644 --- a/fighters/fox/src/status/special_lw.rs +++ b/fighters/fox/src/status/special_lw.rs @@ -117,15 +117,9 @@ pub unsafe extern "C" fn special_lw_loop_end(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("fox") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status( - End, - *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, - special_lw_loop_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(End, *FIGHTER_FOX_STATUS_KIND_SPECIAL_LW_LOOP, special_lw_loop_end); +} \ No newline at end of file diff --git a/fighters/fox/src/status/special_s.rs b/fighters/fox/src/status/special_s.rs index 6ff1679722..a183a7ec77 100644 --- a/fighters/fox/src/status/special_s.rs +++ b/fighters/fox/src/status/special_s.rs @@ -560,9 +560,7 @@ pub unsafe extern "C" fn special_s_air_control(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("fox") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec); +} \ No newline at end of file diff --git a/fighters/wolf/src/acmd/aerials.rs b/fighters/wolf/src/acmd/aerials.rs index 7b6e936559..dccc759562 100644 --- a/fighters/wolf/src/acmd/aerials.rs +++ b/fighters/wolf/src/acmd/aerials.rs @@ -1,169 +1,165 @@ - use super::*; -unsafe extern "C" fn wolf_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 75, 0, 30, 4.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 75, 0, 30, 4.0, 3.5, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 75, 0, 30, 3.5, 2.5, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 75, 0, 30, 4.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 75, 0, 30, 4.0, 3.5, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 75, 0, 30, 3.5, 2.5, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 81, 0, 25, 3.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 81, 0, 25, 3.0, 3.4, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 361, 81, 0, 25, 3.0, 2.0, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 81, 0, 25, 3.0, -0.6, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 81, 0, 25, 3.0, 3.4, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 361, 81, 0, 25, 3.0, 2.0, -0.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(7.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 60, 82, 0, 48, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 60, 85, 0, 47, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 11.0, 60, 85, 0, 47, 4.5, 3.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 60, 82, 0, 48, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 60, 85, 0, 47, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 11.0, 60, 85, 0, 47, 4.5, 3.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE (fighter, 8.0/(38.0-25.0)); - if is_excute(fighter) { + FT_MOTION_RATE (agent, 8.0/(38.0-25.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(13.0-1.0)); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 98, 0, 20, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 4.25, 4.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 98, 0, 20, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 98, 0, 32, 4.25, 4.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(6.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 11.0, 55, 95, 0, 20, 5.5, 1.0, -0.5, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 11.0, 55, 95, 0, 20, 5.5, 1.0, -0.5, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 55, 95, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn wolf_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn wolf_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 4.0/(12.0-5.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(12.0-5.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); // f13 ingame - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 70, 0, 6, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 64, 0, 6, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 70, 0, 6, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 64, 0, 6, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 270, 85, 0, 30, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 85, 0, 30, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 270, 85, 0, 30, 5.0, 0.0, 6.0, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 85, 0, 30, 5.75, 0.0, 0.75, 0.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); // f16 ingame - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); // f33 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attackairn", wolf_attack_air_n_game) - .acmd("game_attackairf", wolf_attack_air_f_game) - .acmd("game_attackairb", wolf_attack_air_b_game) - .acmd("game_attackairhi", wolf_attack_air_hi_game) - .acmd("expression_attackairhi", wolf_attack_air_hi_expression) - .acmd("game_attackairlw", wolf_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/wolf/src/acmd/ground.rs b/fighters/wolf/src/acmd/ground.rs index 17fe2c0913..1ccf1320ff 100644 --- a/fighters/wolf/src/acmd/ground.rs +++ b/fighters/wolf/src/acmd/ground.rs @@ -1,32 +1,31 @@ - use super::*; -unsafe extern "C" fn wolf_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 6.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 7.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 6.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 7.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 13.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 11.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 10.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 53, 0, 20, 3.5, 0.0, 13.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 11.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 53, 0, 20, 3.0, 0.0, 10.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } @@ -40,110 +39,110 @@ unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn wolf_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn wolf_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.5, 0.0, 8.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.5, 0.0, 8.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 2.5, 0.0, 3.5, 2.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn wolf_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 4.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 55, 140, 0, 40, 3.5, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wolf_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn wolf_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 80, 92, 0, 40, 2.5, 0.0, 0.0, 0.0, Some(-3.3), Some(0.0), Some(-3.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 50, 91, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 85, 0, 45, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 80, 92, 0, 40, 2.5, 0.0, 0.0, 0.0, Some(-3.3), Some(0.0), Some(-3.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 50, 91, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 85, 0, 45, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 80, 60, 0, 60, 2.5, 0.0, 0.0, 0.0, Some(-3.5), Some(0.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 60, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 60, 0, 60, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 80, 60, 0, 60, 2.5, 0.0, 0.0, 0.0, Some(-3.5), Some(0.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 60, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 60, 0, 60, 4.0, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attack11", wolf_attack_11_game) - .acmd("effect_attack11", effect_attack11) - .acmd("expression_attack11", wolf_attack_11_expression) - .acmd("game_attack12", wolf_attack_12_game) - .acmd("game_attack13", wolf_attack_13_game) - .acmd("expression_attack13", wolf_attack_13_expression) - .acmd("game_attackdash", wolf_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("expression_attack11", expression_attack11); + + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/wolf/src/acmd/mod.rs b/fighters/wolf/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/wolf/src/acmd/mod.rs +++ b/fighters/wolf/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/wolf/src/acmd/other.rs b/fighters/wolf/src/acmd/other.rs index fa8a3a82c0..63e275db01 100644 --- a/fighters/wolf/src/acmd/other.rs +++ b/fighters/wolf/src/acmd/other.rs @@ -1,237 +1,229 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} } } -unsafe extern "C" fn wolf_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_wolf_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_wolf_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wolf_landing01")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wolf_landing01")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn wolf_blaster_bullet_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 40, 120, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_catch", wolf_catch_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("wolf_blaster_bullet") - .acmd("game_fly", wolf_blaster_bullet_fly_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + + agent.acmd("sound_damageflylw", sound_damageflylw); + + agent.acmd("sound_damageflyn", sound_damageflyn); + + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_damageflytop", sound_damageflytop); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wolf/src/acmd/smashes.rs b/fighters/wolf/src/acmd/smashes.rs index ec0b72387a..0f1d4b88dc 100644 --- a/fighters/wolf/src/acmd/smashes.rs +++ b/fighters/wolf/src/acmd/smashes.rs @@ -1,128 +1,125 @@ - use super::*; -unsafe extern "C" fn wolf_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.701); + FT_MOTION_RATE(agent, 1.701); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 17.0, 361, 106, 0, 30, 4.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 106, 0, 30, 4.0, -1.5, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 15.0, 361, 106, 0, 30, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 15.0, 361, 106, 0, 30, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 17.0, 361, 106, 0, 30, 4.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 106, 0, 30, 4.0, -1.5, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 15.0, 361, 106, 0, 30, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 15.0, 361, 106, 0, 30, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state,17.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 110, 15, 0, 70, 5.0, 0.0, 7.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 130, 15, 0, 72, 5.5, 0.0, 7.5, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 95, 76, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 45, 80, 0, 50, 3.5, -1.0, -0.6, -0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 40, 93, 0, 37, 4.0, 0.0, 0.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 16.0, 40, 93, 0, 37, 4.5, 3.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 45, 80, 0, 50, 3.5, -1.0, -0.6, -0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 40, 93, 0, 37, 4.0, 0.0, 0.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 16.0, 40, 93, 0, 37, 4.5, 3.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 80, 0, 50, 2.5, -0.3, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 40, 90, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0, 40, 90, 0, 50, 3.5, 4.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 80, 0, 50, 2.5, -0.3, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 40, 90, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0, 40, 90, 0, 50, 3.5, 4.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wolf_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 5.0, 1.5, 16, -20, 5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 5.0, 1.5, 16, -20, 5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 6, -4, 160, 40, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 3, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_smash_scratch_arc"), Hash40::new("top"), 0, 6, -4, 160, 40, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 3, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attacks4", wolf_attack_s4_s_game) - .acmd("game_attackhi4", wolf_attack_hi4_game) - .acmd("game_attacklw4", wolf_attack_lw4_game) - .acmd("effect_attacklw4", wolf_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/wolf/src/acmd/specials.rs b/fighters/wolf/src/acmd/specials.rs index c3315f5faf..6ec2842304 100644 --- a/fighters/wolf/src/acmd/specials.rs +++ b/fighters/wolf/src/acmd/specials.rs @@ -1,341 +1,316 @@ use super::*; -unsafe extern "C" fn wolf_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 1, false); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 34, 85, 0, 30, 4.5, 0.0, 6.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(agent.lua_state_agent, 15.0); + if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } - frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + frame(agent.lua_state_agent, 16.0); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); } - frame(lua_state, 10.0); - if is_excute(fighter) { - JostleModule::set_status(boma, true); + frame(agent.lua_state_agent, 20.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } - -} - -unsafe extern "C" fn wolf_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 60, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(agent.lua_state_agent, 38.0); + if MotionModule::motion_kind(agent.module_accessor) == smash::hash40("special_air_n") { + FT_MOTION_RATE(agent, 1.8); } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 70, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); } - frame(lua_state, 26.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(agent.lua_state_agent, 45.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn wolf_special_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::select_cliff_hangdata(boma, *FIGHTER_FOX_CLIFF_HANG_DATA_SPECIAL_HI as u32); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, -3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_KICK); - WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_ENABLE_CONTROL); - } +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + EFFECT(agent, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + } } -unsafe extern "C" fn wolf_special_s_end_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash_scratch"), Hash40::new("top"), 5, 13, 0, -40, 0, 0, 0.45, true); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5.5, 5.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT(agent, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); } + frame(lua_state, 22.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("wolf_bayonet"), false, false); + } } -unsafe extern "C" fn wolf_special_s_game(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { - JostleModule::set_status(fighter.module_accessor, false); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { + JostleModule::set_status(agent.module_accessor, false); } - frame(fighter.lua_state_agent, 0.66); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + frame(agent.lua_state_agent, 0.66); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn wolf_illusion_move_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_slash"), Hash40::new("top"), -3, 5.5, 0, 65, 0, 0, 0.75, false); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); + // EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_rush"), Hash40::new("top"), -3, 20.7, 35, 65, 0, 0, 0.75, false); } } -unsafe extern "C" fn wolf_special_s_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash"), Hash40::new("top"), -3, 5.5, 0, 65, 0, 0, 0.75, false); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - // EFFECT_FOLLOW(fighter, Hash40::new("wolf_slash_rush"), Hash40::new("top"), -3, 20.7, 35, 65, 0, 0, 0.75, false); +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.33); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wolf_special_s01")); + PLAY_SE(agent, Hash40::new("se_wolf_special_s02")); } } -unsafe extern "C" fn wolf_special_s_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.33); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wolf_special_s01")); - PLAY_SE(fighter, Hash40::new("se_wolf_special_s02")); - } -} - -unsafe extern "C" fn wolf_special_air_n_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); - } - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(fighter) { - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); - } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, -3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear(agent.module_accessor, 1, false); } - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 34, 85, 0, 30, 4.5, 0.0, 6.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } - frame(fighter.lua_state_agent, 38.0); - if MotionModule::motion_kind(fighter.module_accessor) == smash::hash40("special_air_n") { - FT_MOTION_RATE(fighter, 1.8); + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(fighter) { - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - frame(fighter.lua_state_agent, 45.0); - if is_excute(fighter) { - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + frame(lua_state, 10.0); + if is_excute(agent) { + JostleModule::set_status(boma, true); } } -unsafe extern "C" fn wolf_special_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - EFFECT(fighter, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - } +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_scratch"), Hash40::new("top"), 5, 13, 0, -40, 0, 0, 0.45, true); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5.5, 5.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + } } -unsafe extern "C" fn wolf_special_air_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 3, Hash40::new("haver"), 0.0, -0.3, 3.0, Hash40::new("haver"), 0.0, 0.77, 6.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT(fighter, Hash40::new("wolf_blaster_shot"), Hash40::new("top"), 0, 6.8, 13.2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_bayonet"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_wolf_bayonet1"), Hash40::new("tex_wolf_bayonet2"), 4, Hash40::new("haver"), 0.0, -0.3, 2.5, Hash40::new("haver"), 0.0, 0.77, 6.3, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.1); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 60, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 1.0, 40, 20, 0, 70, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 367, 20, 0, 35, 4.5, -2.0, 0.0, 2.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.0, 40, 20, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.0, 367, 20, 0, 40, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("wolf_bayonet"), false, false); - } } -unsafe extern "C" fn wolf_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 7.7, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - //Reflection begins on same frame shine hitbox is active - ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.72); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, *FIGHTER_FOX_CLIFF_HANG_DATA_SPECIAL_HI as u32); } - frame(lua_state, 2.0); - if is_excute(fighter) { + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 120, 0, 55, 6.0, -3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_KICK); + WorkModule::on_flag(boma, *FIGHTER_FOX_FIRE_STATUS_WORK_ID_FLAG_WOLF_ENABLE_CONTROL); + } } -unsafe extern "C" fn wolf_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 8.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 7.7, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + //Reflection begins on same frame shine hitbox is active ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - // Reflection begins on same frame shine hitbox is active - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.75); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.72); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_loop"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); - EFFECT_FLW_POS(fighter, Hash40::new("wolf_ref_ref"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 1, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_loop"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("wolf_ref_ref"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 1, 0, 0, 0, 0.8, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("wolf_ref_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("wolf_ref_start"), -1); } else{; frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wolf_ref_start"), Hash40::new("top"), 0, 6.5, 0, 0, 0, 0, 1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("wolf_ref_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("wolf_ref_start"), -1); } } -unsafe extern "C" fn wolf_special_lw_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wolf_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wolf_special_l01")); } } -unsafe extern "C" fn wolf_special_lw_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn wolf_special_air_lw_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - } +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 8.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ReflectorModule::set_status(boma, *FIGHTER_FOX_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); + // Reflection begins on same frame shine hitbox is active + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.75); } - frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_specialsend", wolf_special_s_end_game) - .acmd("game_specialairsend", wolf_special_s_end_game) - .acmd("game_specialhi", wolf_special_hi_game) - .acmd("game_specialhifall", wolf_special_hi_fall_game) - .acmd("game_speciallwstart", wolf_special_lw_start_game) - .acmd("game_specialairlwstart", wolf_special_air_lw_start_game) - .acmd("effect_speciallwstart", wolf_special_lw_start_effect) - .acmd("effect_specialairlwstart", wolf_special_lw_start_effect) - .acmd("sound_speciallwstart", wolf_special_lw_start_sound) - .acmd("sound_specialairlwstart", wolf_special_lw_start_sound) - .acmd("effect_specialairsend", wolf_special_s_end_effect) - .acmd("effect_specialsend", wolf_special_s_end_effect) - .acmd("game_specialairs", wolf_special_s_game) - .acmd("game_specials", wolf_special_s_game) - .acmd("effect_specialairs", wolf_special_s_effect) - .acmd("effect_specials", wolf_special_s_effect) - .acmd("sound_specialairs", wolf_special_s_sound) - .acmd("sound_specials", wolf_special_s_sound) - .acmd("game_specialn", wolf_special_air_n_game) - .acmd("game_specialairn", wolf_special_air_n_game) - .acmd("effect_specialn", wolf_special_n_effect) - .acmd("effect_specialairn", wolf_special_air_n_effect) - .install(); - smashline::Agent::new("wolf_illusion") - .acmd("game_moveair", wolf_illusion_move_game) - .acmd("game_moveground", wolf_illusion_move_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialairn", effect_specialairn); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("sound_specialairs", sound_specials); + + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_specialhifall", game_specialhifall); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("sound_speciallwstart", sound_speciallwstart); + agent.acmd("expression_speciallwstart", expression_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("sound_specialairlwstart", sound_speciallwstart); + agent.acmd("expression_specialairlwstart", expression_speciallwstart); } diff --git a/fighters/wolf/src/acmd/throws.rs b/fighters/wolf/src/acmd/throws.rs index 4f6b7e5f99..1c414e0c74 100644 --- a/fighters/wolf/src/acmd/throws.rs +++ b/fighters/wolf/src/acmd/throws.rs @@ -1,68 +1,63 @@ - use super::*; -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 55, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 55, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 55, 100, 140, 10, 5.5, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 55, 100, 140, 10, 5.5, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 7); + CHECK_FINISH_CAMERA(agent, 16, 7); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 58, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 58, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.813); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.813); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 120, 100, 0, 50, 8.0, 2.0, 1.0, 2.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 120, 100, 0, 50, 8.0, 0.0, 12.0, -8.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 120, 100, 0, 50, 8.0, 2.0, 1.0, 2.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 120, 100, 0, 50, 8.0, 0.0, 12.0, -8.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 9); + CHECK_FINISH_CAMERA(agent, 11, 9); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); //AttackModule::resume_absolute_catch_damage(); } - } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/wolf/src/acmd/tilts.rs b/fighters/wolf/src/acmd/tilts.rs index 3ab835ee16..62b22f7025 100644 --- a/fighters/wolf/src/acmd/tilts.rs +++ b/fighters/wolf/src/acmd/tilts.rs @@ -1,124 +1,120 @@ - use super::*; -unsafe extern "C" fn wolf_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 13.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 7.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 6.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 6.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 13.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 7.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 3.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 4.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 6.0, 0.0, 3.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 4.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 83, 0, 54, 4.0, 0.0, 6.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wolf_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 115, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 80, 110, 0, 35, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 10.0, 85, 105, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 4.0/(8.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 115, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 80, 110, 0, 35, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 10.0, 85, 105, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(32.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(32.0-9.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wolf_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn wolf_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 60, 100, 0, 45, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 68, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 60, 100, 0, 45, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 68, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wolf") - .acmd("game_attacks3hi", wolf_attack_s3_hi_game) - .acmd("game_attacks3", wolf_attack_s3_s_game) - .acmd("game_attacks3lw", wolf_attack_s3_lw_game) - .acmd("game_attackhi3", wolf_attack_hi3_game) - .acmd("expression_attackhi3", wolf_attack_hi3_expression) - .acmd("game_attacklw3", wolf_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/wolf/src/blaster_bullet/acmd/mod.rs b/fighters/wolf/src/blaster_bullet/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/wolf/src/blaster_bullet/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/wolf/src/blaster_bullet/acmd/specials.rs b/fighters/wolf/src/blaster_bullet/acmd/specials.rs new file mode 100644 index 0000000000..64f6b52906 --- /dev/null +++ b/fighters/wolf/src/blaster_bullet/acmd/specials.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 40, 120, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/wolf/src/blaster_bullet/mod.rs b/fighters/wolf/src/blaster_bullet/mod.rs new file mode 100644 index 0000000000..9b216f1f15 --- /dev/null +++ b/fighters/wolf/src/blaster_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wolf_blaster_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/illusion/acmd/mod.rs b/fighters/wolf/src/illusion/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/wolf/src/illusion/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/wolf/src/illusion/acmd/specials.rs b/fighters/wolf/src/illusion/acmd/specials.rs new file mode 100644 index 0000000000..60671ea60e --- /dev/null +++ b/fighters/wolf/src/illusion/acmd/specials.rs @@ -0,0 +1,12 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_moveair", game_move); + agent.acmd("game_moveground", game_move); +} diff --git a/fighters/wolf/src/illusion/mod.rs b/fighters/wolf/src/illusion/mod.rs new file mode 100644 index 0000000000..91d859d37f --- /dev/null +++ b/fighters/wolf/src/illusion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wolf_illusion"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/lib.rs b/fighters/wolf/src/lib.rs index 59499afacc..c8dd59c984 100644 --- a/fighters/wolf/src/lib.rs +++ b/fighters/wolf/src/lib.rs @@ -9,6 +9,11 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod blaster_bullet; +mod illusion; + use smash::{ lib::{ L2CValue, @@ -39,9 +44,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wolf"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + blaster_bullet::install(); + illusion::install(); } diff --git a/fighters/wolf/src/opff.rs b/fighters/wolf/src/opff.rs index 12e6a2e9f7..44c51f149e 100644 --- a/fighters/wolf/src/opff.rs +++ b/fighters/wolf/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -95,8 +94,7 @@ pub unsafe fn wolf_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wolf") - .on_line(Main, wolf_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wolf_frame_wrapper); } diff --git a/fighters/wolf/src/status.rs b/fighters/wolf/src/status.rs index ee9a974345..31859e1c73 100644 --- a/fighters/wolf/src/status.rs +++ b/fighters/wolf/src/status.rs @@ -4,8 +4,8 @@ mod special_s; mod special_hi; mod special_lw; -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); } diff --git a/fighters/wolf/src/status/special_hi.rs b/fighters/wolf/src/status/special_hi.rs index 6527177c4a..4198432a86 100644 --- a/fighters/wolf/src/status/special_hi.rs +++ b/fighters/wolf/src/status/special_hi.rs @@ -25,13 +25,7 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("wolf") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - End, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_WOLF_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); } diff --git a/fighters/wolf/src/status/special_lw.rs b/fighters/wolf/src/status/special_lw.rs index 6864fbeeba..b5ed7700e3 100644 --- a/fighters/wolf/src/status/special_lw.rs +++ b/fighters/wolf/src/status/special_lw.rs @@ -119,15 +119,9 @@ pub unsafe extern "C" fn special_lw_loop_end(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("wolf") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status( - End, - *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, - special_lw_loop_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(End, *FIGHTER_WOLF_STATUS_KIND_SPECIAL_LW_LOOP, special_lw_loop_end); } diff --git a/fighters/wolf/src/status/special_s.rs b/fighters/wolf/src/status/special_s.rs index 48c9f75664..f77ac88eb4 100644 --- a/fighters/wolf/src/status/special_s.rs +++ b/fighters/wolf/src/status/special_s.rs @@ -416,33 +416,25 @@ unsafe extern "C" fn special_s_end_exec(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -extern "C" fn wolf_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_WOLF { - return; - } - - let instruction = 0x7100001Fu32 | ((SPECIAL_S_RUSH as u32 & 0xFFF) << 10); - skyline::patching::Patch::in_text(0x12c29c0).data(instruction); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + let instruction = 0x7100001Fu32 | ((SPECIAL_S_RUSH as u32 & 0xFFF) << 10); + skyline::patching::Patch::in_text(0x12c29c0).data(instruction); } pub fn install() { - smashline::Agent::new("wolf") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_end) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_exec) - .status(Pre, SPECIAL_S_RUSH, special_s_rush_pre) - .status(Main, SPECIAL_S_RUSH, special_s_rush_main) - .status(End, SPECIAL_S_RUSH, special_s_rush_end) - .status(Init, SPECIAL_S_RUSH, special_s_rush_init) - .status(Pre, SPECIAL_S_END, special_s_end_pre) - .status(Main, SPECIAL_S_END, special_s_end_main) - .status(End, SPECIAL_S_END, special_s_end_end) - .status(Init, SPECIAL_S_END, special_s_end_init) - .status(Exec, SPECIAL_S_END, special_s_end_exec) - .on_start(wolf_init) - .install(); + agent.on_start(on_start); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_end); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_exec); + agent.status(Pre, SPECIAL_S_RUSH, special_s_rush_pre); + agent.status(Main, SPECIAL_S_RUSH, special_s_rush_main); + agent.status(End, SPECIAL_S_RUSH, special_s_rush_end); + agent.status(Init, SPECIAL_S_RUSH, special_s_rush_init); + agent.status(Pre, SPECIAL_S_END, special_s_end_pre); + agent.status(Main, SPECIAL_S_END, special_s_end_main); + agent.status(End, SPECIAL_S_END, special_s_end_end); + agent.status(Init, SPECIAL_S_END, special_s_end_init); + agent.status(Exec, SPECIAL_S_END, special_s_end_exec); } From e970f529212d07f9eaf61b614a4e678c2bbcfeb3 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 09:34:36 -0500 Subject: [PATCH 010/172] it's always something --- fighters/wolf/src/status/special_s.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/wolf/src/status/special_s.rs b/fighters/wolf/src/status/special_s.rs index f77ac88eb4..e32b304dfb 100644 --- a/fighters/wolf/src/status/special_s.rs +++ b/fighters/wolf/src/status/special_s.rs @@ -421,7 +421,7 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { skyline::patching::Patch::in_text(0x12c29c0).data(instruction); } -pub fn install() { +pub fn install(agent: &mut Agent) { agent.on_start(on_start); agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_pre); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_start_main); From ef1a86b82dfcc13cd3fc2c47bdf945eda87c588e Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 10:51:28 -0500 Subject: [PATCH 011/172] sora + follow up tweaks --- fighters/fox/src/acmd/other.rs | 6 - fighters/pickel/src/acmd/ground.rs | 2 +- fighters/pickel/src/acmd/mod.rs | 4 +- fighters/pickel/src/acmd/other.rs | 4 - fighters/trail/src/acmd/aerials.rs | 530 +++++++-------- fighters/trail/src/acmd/ground.rs | 253 ++++---- fighters/trail/src/acmd/mod.rs | 16 +- fighters/trail/src/acmd/other.rs | 194 +++--- fighters/trail/src/acmd/smashes.rs | 151 +++-- fighters/trail/src/acmd/specials.rs | 673 +++++++++----------- fighters/trail/src/acmd/throws.rs | 84 +-- fighters/trail/src/acmd/tilts.rs | 243 ++++--- fighters/trail/src/fire/acmd/mod.rs | 7 + fighters/trail/src/fire/acmd/specials.rs | 32 + fighters/trail/src/fire/mod.rs | 9 + fighters/trail/src/lib.rs | 19 +- fighters/trail/src/opff.rs | 6 +- fighters/trail/src/status.rs | 21 +- fighters/trail/src/status/attack_air.rs | 30 +- fighters/trail/src/status/attack_lw4.rs | 8 +- fighters/trail/src/status/jump_aerial.rs | 6 +- fighters/trail/src/status/special_n.rs | 10 +- fighters/trail/src/status/special_s.rs | 24 +- fighters/trail/src/thunder/acmd/mod.rs | 7 + fighters/trail/src/thunder/acmd/specials.rs | 19 + fighters/trail/src/thunder/mod.rs | 9 + fighters/wolf/src/acmd/other.rs | 6 - 27 files changed, 1165 insertions(+), 1208 deletions(-) create mode 100644 fighters/trail/src/fire/acmd/mod.rs create mode 100644 fighters/trail/src/fire/acmd/specials.rs create mode 100644 fighters/trail/src/fire/mod.rs create mode 100644 fighters/trail/src/thunder/acmd/mod.rs create mode 100644 fighters/trail/src/thunder/acmd/specials.rs create mode 100644 fighters/trail/src/thunder/mod.rs diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index 37c3c1a655..04719bc142 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -186,21 +186,15 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pickel/src/acmd/ground.rs b/fighters/pickel/src/acmd/ground.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/pickel/src/acmd/ground.rs +++ b/fighters/pickel/src/acmd/ground.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index c082aca432..3c5f6b840f 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -1,6 +1,6 @@ use super::*; mod aerials; -//mod ground; +mod ground; mod other; mod smashes; mod specials; @@ -14,5 +14,5 @@ pub fn install(agent: &mut Agent) { smashes::install(agent); specials::install(agent); throws::install(agent); - //ground::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pickel/src/acmd/other.rs b/fighters/pickel/src/acmd/other.rs index bc9a678126..9e10e8fec4 100644 --- a/fighters/pickel/src/acmd/other.rs +++ b/fighters/pickel/src/acmd/other.rs @@ -298,17 +298,13 @@ unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); agent.acmd("game_catch", game_catch); - agent.acmd("game_catchdash", game_catchdash); - agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_appealsl", game_appeals); diff --git a/fighters/trail/src/acmd/aerials.rs b/fighters/trail/src/acmd/aerials.rs index d6d331b6ea..33c1b417f4 100644 --- a/fighters/trail/src/acmd/aerials.rs +++ b/fighters/trail/src/acmd/aerials.rs @@ -1,292 +1,291 @@ use super::*; -unsafe extern "C" fn sora_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (11.0-1.0)/3.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //MotionModule::set_rate(boma, 2.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 361, 115, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 115, 0, 30, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 361, 115, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 0, 25, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 2.75, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 100, 0, 25, 3.5, 0.0, 5.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 0, 25, 4.0, 0.0, 8.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 0.5); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("trail_air_lw_fall"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("trail_air_lw_fall"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 1.5, 0, 0, 90, 1.15, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -1.0, 1.0, 0, 0, 90, 1.2, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 4.0, 0, 0, 0, 90.0, 0.5, true); - //LAST_EFFECT_SET_COLOR(fighter, 4.0, 5.0, 1.0); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 8.0, 0, 0, 0, 90.0, 0.5, true); - //LAST_EFFECT_SET_COLOR(fighter, 4.0, 5.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_light"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 1.5, 0, 0, 90, 1.15, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -1.0, 1.0, 0, 0, 90, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 4.0, 0, 0, 0, 90.0, 0.5, true); + //LAST_EFFECT_SET_COLOR(agent, 4.0, 5.0, 1.0); + //EFFECT_FOLLOW(agent, Hash40::new("sys_heart"), Hash40::new("haver"), 0, 8.0, 0, 0, 0, 90.0, 0.5, true); + //LAST_EFFECT_SET_COLOR(agent, 4.0, 5.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_light"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_light"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_light"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_attackair_l01")); - //STOP_SE_arg2(fighter, Hash40::new("se_trail_jump02"), 50); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_attackair_l01")); + //STOP_SE_arg2(agent, Hash40::new("se_trail_jump02"), 50); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_attackair_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_attackair_l02")); } } -unsafe extern "C" fn sora_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (1.0)); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 75, 4, 0, 60, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, -1.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 75, 4, 0, 60, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 82, 4, 0, 55, 4.0, 0.0, -1.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); wait(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_F_FLAG_CHECK_COMBO_BUTTON_ON); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sora_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_CHECK_COMBO_BUTTON_ON); //MotionModule::set_rate(boma, 1.25); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 78, 8, 0, 75, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 78, 8, 0, 75, 4.0, 0.0, 9.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 85, 8, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, -1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, -5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, -5.0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_CHECK_COMBO_BUTTON_ON); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_AIR_N_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (37.0-20.0)/12.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_air_f3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 0.0, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 4.5, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.5, 40, 110, 0, 50, 4.6, 0.0, 9.5, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 0.0, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 40, 110, 0, 50, 4.6, 0.0, 4.5, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.5, 40, 110, 0, 50, 4.6, 0.0, 9.5, -1.8, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sora_attack_air_f3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); VarModule::off_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 100, 0, 20, 4.5, 1.5, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.5, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 4.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 8.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 100, 0, 20, 4.5, 1.5, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.5, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 4.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 13.5, 361, 100, 0, 30, 4.5, 0.0, 8.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn sora_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); if VarModule::is_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR){ VarModule::on_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); @@ -294,69 +293,68 @@ unsafe extern "C" fn sora_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (9.5-5.0)/5.0); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (20.0-9.5)/8.0); if VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 75, 136, 0, 44, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 4.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 8.2, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 4.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 75, 70, 0, 65, 3.8, 0.0, 8.2, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn sora_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn sora_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 15.5; let attack_end_frame = 25.0; let attack_duration = 7.0; let attack_duration_rate = (attack_end_frame-attack_start_frame)/attack_duration; let spike_start_frame = attack_start_frame + 5.0*attack_duration_rate; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (10.0-1.0)/3.0); VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); if VarModule::is_flag(boma.object(), vars::trail::instance::COMBO_PLUS_AIR){ @@ -365,184 +363,188 @@ unsafe extern "C" fn sora_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (attack_start_frame-10.0)/4.0); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, attack_duration_rate); if VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.5, 62, 117, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 4.25, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 8.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.5, 62, 117, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 4.25, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.5, 62, 117, 0, 60, 4.0, 0.4, 8.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 4.25, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 8.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 4.25, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 62, 70, 0, 50, 3.8, 0.4, 8.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } } frame(lua_state, spike_start_frame); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 62, 70, 0, 50, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 58, 80, 0, 60, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 58, 80, 0, 60, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 58, 80, 0, 60, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 58, 80, 0, 60, 3.8, 0.4, 0.0, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.0, 285, 100, 0, 45, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 4.25, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 300, 70, 0, 30, 3.8, 0.4, 8.5, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } //println!("spike start"); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::SHOULD_PRORATE_ATTACK); AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); //println!("spike end"); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (50.0-30.0)/13.0); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.0); } - } -unsafe extern "C" fn sora_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 5); } } -unsafe extern "C" fn sora_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_trail_attackair_n03")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_trail_attackair_n03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } } -unsafe extern "C" fn sora_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_81_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_81_attackl"), 0); } } -unsafe extern "C" fn sora_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn sora_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sora_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_trail_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_trail_landing02")); } } -unsafe extern "C" fn sora_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_81_landingairlw"), 0, false, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if ItemModule::is_have_item(boma, 0){ - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0); + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0); } } frame(lua_state, 27.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.08); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.08); } frame(lua_state, 32.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.03); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.03); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attackairn", sora_attack_air_n_game) - .acmd("effect_attackairn", sora_attack_air_n_effect) - .acmd("sound_attackairn", sora_attack_air_n_sound) - .acmd("game_attackairf", sora_attack_air_f_game) - .acmd("effect_attackairf", sora_attack_air_f_effect) - .acmd("game_attackairf2", sora_attack_air_f2_game) - .acmd("game_attackairf3", sora_attack_air_f3_game) - .acmd("effect_attackairf3", sora_attack_air_f3_effect) - .acmd("game_attackairb", sora_attack_air_b_game) - .acmd("game_attackairhi", sora_attack_air_hi_game) - .acmd("effect_attackairhi", sora_attack_air_hi_effect) - .acmd("game_attackairlw", sora_attack_air_lw_game) - .acmd("effect_attackairlw", sora_attack_air_lw_effect) - .acmd("sound_attackairlw", sora_attack_air_lw_sound) - .acmd("expression_attackairlw", sora_attack_air_lw_expression) - .acmd("game_landingairlw", sora_landing_air_lw_game) - .acmd("effect_landingairlw", sora_landing_air_lw_effect) - .acmd("sound_landingairlw", sora_landing_air_lw_sound) - .acmd("expression_landingairlw", sora_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairf2", game_attackairf2); + + agent.acmd("game_attackairf3", game_attackairf3); + agent.acmd("effect_attackairf3", effect_attackairf3); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/trail/src/acmd/ground.rs b/fighters/trail/src/acmd/ground.rs index 13d3be225b..7d1ff53979 100644 --- a/fighters/trail/src/acmd/ground.rs +++ b/fighters/trail/src/acmd/ground.rs @@ -1,253 +1,250 @@ - use super::*; -unsafe extern "C" fn sora_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3); MotionModule::set_rate(boma, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 320, 25, 0, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 7.0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 70, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 75, 25, 0, 20, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("haver"), 3.0, 361, 16, 0, 26, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (30.0-18.0)/7.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); - EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_trail_keyblade1"), Hash40::new("tex_trail_keyblade2"), 7, Hash40::new("haver"), 0.0, 2.0, 0.0, Hash40::new("haver"), 0.0, 13.8, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn sora_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (4.0-1.0)/1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 85, 16, 0, 25, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 60, 16, 0, 30, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 85, 16, 0, 25, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 22, 0, 24, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (25.0-14.0)/9.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn sora_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2.0, 0.0, -8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("trail_keyblade_speedline"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("trail_keyblade_speedline"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } } -unsafe extern "C" fn sora_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (5.0-1.0)/2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 46, 95, 0, 65, 4.0, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + //ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 3.0); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sora_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_atk_slash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_atk_slash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } } -unsafe extern "C" fn sora_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(4.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(4.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(9.0-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(9.0-4.0)); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - //HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + //HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 56, 70, 0, 60, 3.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 2.5, 5.0, 0.0, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 80, 66, 0, 84, 2.5, 5.0, 0.0, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("trans"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("trans"), *HIT_STATUS_NORMAL); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 40.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("trans"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("trans"), *HIT_STATUS_OFF); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); } - frame(lua_state, 52.0); - } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attack11", sora_attack_11_game) - .acmd("effect_attack11", sora_attack_11_effect) - .acmd("game_attack12", sora_attack_12_game) - .acmd("effect_attack12", sora_attack_12_effect) - .acmd("game_attack13", sora_attack_13_game) - .acmd("effect_attack13", sora_attack_13_effect) - .acmd("game_attackdash", sora_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/trail/src/acmd/mod.rs b/fighters/trail/src/acmd/mod.rs index c2888e2ab1..0e204f42d2 100644 --- a/fighters/trail/src/acmd/mod.rs +++ b/fighters/trail/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod smashes; mod throws; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/trail/src/acmd/other.rs b/fighters/trail/src/acmd/other.rs index 351ba923a3..c64f203d54 100644 --- a/fighters/trail/src/acmd/other.rs +++ b/fighters/trail/src/acmd/other.rs @@ -1,225 +1,227 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} } } -unsafe extern "C" fn trail_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_trail_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_trail_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_trail_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_trail_step_left_l")); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn run_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_run(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); loop { frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_step_right_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_step_right_l")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_step_left_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_step_left_l")); } - fighter.clear_lua_stack(); + agent.clear_lua_stack(); sv_animcmd::wait_loop_sync_mot(lua_state); - fighter.pop_lua_stack(1); + agent.pop_lua_stack(1); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_catch", trail_catch_game) - .acmd("game_dash", game_dash) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_run", run_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("sound_run", sound_run); } diff --git a/fighters/trail/src/acmd/smashes.rs b/fighters/trail/src/acmd/smashes.rs index 16ba782fa5..9fa04950b6 100644 --- a/fighters/trail/src/acmd/smashes.rs +++ b/fighters/trail/src/acmd/smashes.rs @@ -1,44 +1,43 @@ - use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(17.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(17.0-7.0)); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 40, 107, 0, 30, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 40, 103, 0, 29, 3.8, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 40, 107, 0, 30, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.5); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 3.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.5, 40, 109, 0, 35, 3.4, 0.0, 7.8, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.5, 40, 106, 0, 32, 3.4, 0.0, 3.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.5, 40, 109, 0, 35, 3.4, 0.0, 7.8, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } @@ -75,95 +74,95 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 85, 20, 0, 88, 3.8, 0.0, 4.0, 0.0, Some(0.0), Some(7.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 85, 20, 0, 88, 3.8, 0.0, 4.0, 0.0, Some(0.0), Some(7.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 12.5, 76, 85, 0, 45, 4.0, 0.0, 4.0, -6.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 11.5, 76, 80, 0, 45, 4.0, 0.0, 4.0, -12.0, Some(0.0), Some(4.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 12.5, 76, 85, 0, 45, 4.0, 0.0, 4.0, -6.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 11.5, 76, 80, 0, 45, 4.0, 0.0, 4.0, -12.0, Some(0.0), Some(4.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_smash_lw_flash"), Hash40::new("haver"), 0, 11, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_smash_lw_flash"), Hash40::new("haver"), 0, 11, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_smash_lw_speedline"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_smash_lw_speedline"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_smash_lw_flash"), false, true); - EFFECT(fighter, Hash40::new("trail_smash_lw_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 0.4); - EFFECT(fighter, Hash40::new("trail_smash_lw_attack"), Hash40::new("haver"), 0, -2, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_smash_lw_flash"), false, true); + EFFECT(agent, Hash40::new("trail_smash_lw_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("trail_keyblade_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 0.4); + EFFECT(agent, Hash40::new("trail_smash_lw_attack"), Hash40::new("haver"), 0, -2, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("trail_keyblade_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("trail_keyblade_flare"), false, true); } frame(lua_state, 57.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -0.9, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -0.9, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/trail/src/acmd/specials.rs b/fighters/trail/src/acmd/specials.rs index f9b82b51be..ebf1744170 100644 --- a/fighters/trail/src/acmd/specials.rs +++ b/fighters/trail/src/acmd/specials.rs @@ -1,215 +1,215 @@ use super::*; -unsafe extern "C" fn game_specialn3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_FLAG_CHANGE_MAGIC); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } } -unsafe extern "C" fn game_specialairn3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairn3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_FLAG_CHANGE_MAGIC); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_TRAIL_STATUS_SPECIAL_N3_INT_THUNDER_NUM); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_CLOUD, false, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn game_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - if is_excute(fighter) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if agent.kind() == *FIGHTER_KIND_KIRBY { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.25); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.25); + if is_excute(agent) { AttackModule::clear(boma, 0, false); WorkModule::set_float(boma, 4.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_CHANGE_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 16.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -8.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 24.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -2.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 12.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -14.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_LAST_SHOOT); WorkModule::set_float(boma, 0.0, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLOAT_ANGLE); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_ICE, false, -1); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 42, 64, 0, 52, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(6.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 42, 64, 0, 52, 3.2, 0.0, 6.4, 2.2, Some(0.0), Some(6.4), Some(6.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear(boma, 0, false); WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); } frame(lua_state, 57.0); - FT_START_ADJUST_MOTION_FRAME_arg1(fighter, 1.0); + FT_START_ADJUST_MOTION_FRAME_arg1(agent, 1.0); } else { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); ArticleModule::remove_exist(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, Hash40::new("special_n2"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_CHANGE_MAGIC); } } } -unsafe extern "C" fn effect_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("trail_ice_hold"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("trail_ice_hold"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("trail_ice_sword_flare"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("trail_ice_sword_flare"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 0, 180, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 180, 180, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 0, 180, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 180, 180, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.25); } } @@ -230,93 +230,93 @@ unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_specialn2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_81_special_n2"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 43.0); if ItemModule::is_have_item(boma, 0) { - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.05); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.05); } } frame(lua_state, 49.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0.08); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.08); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } frame(lua_state, 58.0); - if is_excute(fighter) { - //FT_MOTION_INTP_WAIT_ITEM(fighter, true, 0); + if is_excute(agent) { + //FT_MOTION_INTP_WAIT_ITEM(agent, true, 0); } } // Now unused -unsafe extern "C" fn game_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialairs1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.2, 72, 10, 0, 85, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } // Is now effectively Sonic Blade 1 -unsafe extern "C" fn game_specials2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); if angle == 0.0 || angle >= 180.0 { @@ -324,42 +324,42 @@ unsafe extern "C" fn game_specials2(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } // Ensure only specials2 comes out - WorkModule::set_int(fighter.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(agent.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } -unsafe extern "C" fn game_specialairs2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0 ); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 120, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); if angle == 0.0 || angle >= 180.0 { @@ -367,67 +367,67 @@ unsafe extern "C" fn game_specialairs2(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); // KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } // Ensure only specials2 comes out - WorkModule::set_int(fighter.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(agent.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } -unsafe extern "C" fn sound_specials2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { +unsafe extern "C" fn sound_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { let rng = sv_math::rand(hash40("fighter"), 3) as i32; if rng == 2 { - PLAY_SE(fighter, Hash40::new("vc_trail_special_s01")); + PLAY_SE(agent, Hash40::new("vc_trail_special_s01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_trail_rnd_attack03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_trail_rnd_attack03")); } } frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s02")); } } -unsafe extern "C" fn game_specials3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { // For when you're *not* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } } else { // For when you *are* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); @@ -435,52 +435,52 @@ unsafe extern "C" fn game_specials3(fighter: &mut L2CAgentBase) { GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } -unsafe extern "C" fn game_specialairs3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { // For when you're *not* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); } } else { // For when you *are* on the last rep. if WorkModule::is_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_ATTACK_BUTTON){ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.2, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 72, 10, 0, 80, 3.8, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); } } let angle = WorkModule::get_float(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLOAT_TARGET_ANGLE); @@ -488,113 +488,73 @@ unsafe extern "C" fn game_specialairs3(fighter: &mut L2CAgentBase) { GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0, 0.0)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_FLAG_SEARCH_BUTTON); } } -unsafe extern "C" fn sound_specials3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); let attack_num = WorkModule::get_param_int(boma, hash40("param_special_s"), hash40("attack_num")); // New check since this ACMD script gets used for both the second and third Sonic Blades now. if WorkModule::get_int(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT) < attack_num - 1 { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s03")); } } else { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_trail_special_s04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_trail_special_s04")); } } } -unsafe extern "C" fn effect_specialsstart2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialsup(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialsdown(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsstart2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsup(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn effect_specialairsdown(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsstart2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("trail_sonic_turn"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_JUMP_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.8, 86, 100, 116, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.8, 88, 100, 82, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.8, 86, 100, 116, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.8, 88, 100, 82, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(7.6), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.8, 110, 100, 120, 0, 4.2, 0.0, 4.2, 16.8, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.8, 108, 100, 86, 0, 4.2, 0.0, 12.6, 16.8, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.8, 94, 100, 130, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.8, 92, 100, 76, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 3.8, 110, 100, 120, 0, 4.2, 0.0, 4.2, 16.8, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.8, 108, 100, 86, 0, 4.2, 0.0, 12.6, 16.8, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.8, 94, 100, 130, 0, 4.2, 0.0, 4.2, 7.6, Some(0.0), Some(4.2), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.8, 92, 100, 76, 0, 4.2, 0.0, 12.6, 7.6, Some(0.0), Some(12.6), Some(16.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 2, true, false); AttackModule::set_no_finish_camera(boma, 3, true, false); AttackModule::set_no_finish_camera(boma, 4, true, false); @@ -602,17 +562,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 80, 100, 124, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 82, 100, 70, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 106, 100, 122, 0, 2.4, 0.0, 7.6, -12.2, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 108, 100, 78, 0, 2.4, 0.0, 12.2, -12.2, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 94, 100, 114, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 92, 100, 68, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 80, 100, 124, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 82, 100, 70, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 106, 100, 122, 0, 2.4, 0.0, 7.6, -12.2, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 108, 100, 78, 0, 2.4, 0.0, 12.2, -12.2, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 94, 100, 114, 0, 2.4, 0.0, 7.6, -6.6, Some(0.0), Some(7.6), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 92, 100, 68, 0, 2.4, 0.0, 12.2, -6.6, Some(0.0), Some(12.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -622,17 +582,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 76, 100, 92, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 78, 100, 62, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 108, 100, 100, 0, 2.8, 0.0, 4.6, 14.6, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 106, 100, 72, 0, 2.8, 0.0, 10.0, 14.6, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 92, 100, 110, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 90, 100, 58, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 76, 100, 92, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 78, 100, 62, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 108, 100, 100, 0, 2.8, 0.0, 4.6, 14.6, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 106, 100, 72, 0, 2.8, 0.0, 10.0, 14.6, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 92, 100, 110, 0, 2.8, 0.0, 4.6, 6.4, Some(0.0), Some(4.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 90, 100, 58, 0, 2.8, 0.0, 10.0, 6.4, Some(0.0), Some(10.0), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -642,18 +602,18 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 88, 100, 92, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 84, 100, 46, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 102, 100, 88, 0, 2.4, 0.0, 8.8, -12.2, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 106, 100, 48, 0, 2.4, 0.0, 13.4, -12.2, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 92, 100, 90, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 90, 100, 48, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 88, 100, 92, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 84, 100, 46, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 102, 100, 88, 0, 2.4, 0.0, 8.8, -12.2, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 106, 100, 48, 0, 2.4, 0.0, 13.4, -12.2, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 92, 100, 90, 0, 2.4, 0.0, 8.8, -6.6, Some(0.0), Some(8.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 90, 100, 48, 0, 2.4, 0.0, 13.4, -6.6, Some(0.0), Some(13.4), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -663,17 +623,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 74, 100, 90, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 72, 100, 72, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 98, 100, 92, 0, 2.8, 0.0, 7.2, 14.6, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 96, 100, 72, 0, 2.8, 0.0, 12.6, 14.6, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 94, 100, 102, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 92, 100, 62, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 74, 100, 90, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 72, 100, 72, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(6.4), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 98, 100, 92, 0, 2.8, 0.0, 7.2, 14.6, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 96, 100, 72, 0, 2.8, 0.0, 12.6, 14.6, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 94, 100, 102, 0, 2.8, 0.0, 7.2, 6.4, Some(0.0), Some(7.2), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 92, 100, 62, 0, 2.8, 0.0, 12.6, 6.4, Some(0.0), Some(12.6), Some(14.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -683,17 +643,17 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.1, 125, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.1, 150, 100, 110, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.1, 130, 100, 150, 0, 2.4, 0.0, 8.2, -12.2, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.1, 150, 100, 150, 0, 2.4, 0.0, 12.8, -12.2, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.1, 130, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.1, 150, 100, 130, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 125, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 150, 100, 110, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-6.6), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.1, 130, 100, 150, 0, 2.4, 0.0, 8.2, -12.2, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.1, 150, 100, 150, 0, 2.4, 0.0, 12.8, -12.2, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.1, 130, 100, 130, 0, 2.4, 0.0, 8.2, -6.6, Some(0.0), Some(8.2), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.1, 150, 100, 130, 0, 2.4, 0.0, 12.8, -6.6, Some(0.0), Some(12.8), Some(-12.2), 0.3, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -703,123 +663,80 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 5.2, 0.0, 7.4, 8.4, Some(0.0), Some(9.6), Some(8.4), 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 4.8, 0.0, 12.6, 15.6, Some(0.0), Some(14.8), Some(15.6), 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 4.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.6, 62, 180, 0, 44, 3.6, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 5.2, 0.0, 7.4, 8.4, Some(0.0), Some(9.6), Some(8.4), 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.6, 62, 180, 0, 44, 4.8, 0.0, 12.6, 15.6, Some(0.0), Some(14.8), Some(15.6), 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); if VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_COMMAND_ACCEPT); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_HI_FLAG_COMMAND_ACCEPT); } frame(lua_state, 75.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 79.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::trail::status::UP_SPECIAL_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn game_trail_fire_fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let lr = PostureModule::lr(boma); - let offset = Vector2f {x: (14.0 * lr), y: 7.5}; // distance for article to be offset - PostureModule::add_pos_2d(boma, &offset); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.6, 361, 24, 0, 42, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.2, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.2, 361, 22, 0, 36, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.8, 361, 20, 0, 32, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); - ATK_SET_SHIELD_SETOFF_MUL2(fighter, 0, 1.05); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn3", game_specialn3); + agent.acmd("game_specialairn3", game_specialairn3); -unsafe extern "C" fn game_falllast(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, None, None, None, 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, Some(0.0), Some(10.0), Some(0.0), 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); -} + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specialairs2); + agent.acmd("sound_specials2", sound_specials2); + agent.acmd("sound_specialairs2", sound_specials2); + + agent.acmd("game_specials3", game_specials3); + agent.acmd("game_specialairs3", game_specialairs3); + agent.acmd("sound_specials3", sound_specials3); + agent.acmd("sound_specialairs3", sound_specials3); -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_specialn3", game_specialn3) - .acmd("game_specialairn3", game_specialairn3) - .acmd("game_specialn2", game_specialn2) - .acmd("game_specialairn2", game_specialn2) - .acmd("effect_specialn2", effect_specialn2) - .acmd("effect_specialairn2", effect_specialn2) - .acmd("sound_specialn2", sound_specialn2) - .acmd("sound_specialairn2", sound_specialn2) - .acmd("expression_specialn2", expression_specialn2) - .acmd("expression_specialairn2", expression_specialn2) - .acmd("game_specials1", game_specials1) - .acmd("game_specialairs1", game_specialairs1) - .acmd("game_specials2", game_specials2) - .acmd("game_specialairs2", game_specialairs2) - .acmd("sound_specials2", sound_specials2) - .acmd("sound_specialairs2", sound_specials2) - .acmd("game_specials3", game_specials3) - .acmd("game_specialairs3", game_specialairs3) - .acmd("sound_specials3", sound_specials3) - .acmd("sound_specialairs3", sound_specials3) - .acmd("effect_specialsstart2", effect_specialsstart2) - .acmd("effect_specialsup", effect_specialsup) - .acmd("effect_specialsdown", effect_specialsdown) - .acmd("effect_specialairsstart2", effect_specialairsstart2) - .acmd("effect_specialairsup", effect_specialairsup) - .acmd("effect_specialairsdown", effect_specialairsdown) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialhi) - .install(); - smashline::Agent::new("trail_fire") - .acmd("game_fly", game_trail_fire_fly) - .acmd("game_fly2", game_trail_fire_fly) - .install(); - smashline::Agent::new("trail_thunder") - .acmd("game_falllast", game_falllast) - .install(); + agent.acmd("effect_specialsstart2", effect_specialsstart2); + agent.acmd("effect_specialairsstart2", effect_specialsstart2); + agent.acmd("effect_specialsup", effect_specialsstart2); + agent.acmd("effect_specialairsup", effect_specialsstart2); + agent.acmd("effect_specialsdown", effect_specialsstart2); + agent.acmd("effect_specialairsdown", effect_specialsstart2); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); } diff --git a/fighters/trail/src/acmd/throws.rs b/fighters/trail/src/acmd/throws.rs index e6cfbfdd51..e067555b33 100644 --- a/fighters/trail/src/acmd/throws.rs +++ b/fighters/trail/src/acmd/throws.rs @@ -1,77 +1,77 @@ use super::*; -unsafe extern "C" fn trail_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 84, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 84, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 7.6, 48, 68, 0, 106, 4.0, 1.6, 0.0, 0.0, Some(7.2), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 7.6, 48, 68, 0, 106, 4.0, 1.6, 0.0, 0.0, Some(7.2), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 8); + CHECK_FINISH_CAMERA(agent, 13, 8); } frame(lua_state, 34.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn trail_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.8, 108, 65, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.8, 108, 65, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 18); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn trail_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 74, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 74, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 3, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 3, 1); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_throwb", trail_throw_b_game) - .acmd("game_throwhi", trail_throw_hi_game) - .acmd("game_throwlw", trail_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/trail/src/acmd/tilts.rs b/fighters/trail/src/acmd/tilts.rs index f47ec2252d..3bcc5141d6 100644 --- a/fighters/trail/src/acmd/tilts.rs +++ b/fighters/trail/src/acmd/tilts.rs @@ -1,88 +1,86 @@ - use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 0.3); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 0.3); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_S3_FLAG_CHECK_COMBO_BUTTON_ON); } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3) { // Jab 2 -> Ftilt cancel - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 80, 30, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 75, 30, 0, 40, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 80, 30, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } else { // Normal ftilt - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 9.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 4.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 110, 0, 48, 4.0, 0.0, 9.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } - } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 80, 20, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 80, 20, 0, 40, 3.5, 0.0, 9.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 0.84); + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 0.84); } else { - FT_MOTION_RATE(fighter, 0.84); + FT_MOTION_RATE(agent, 0.84); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 27.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ - FT_MOTION_RATE(fighter, 1.4); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::trail::instance::ATTACK_12_INTO_S3){ + FT_MOTION_RATE(agent, 1.4); } } } -unsafe extern "C" fn game_attacks3s2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 65, 12, 0, 50, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 80, 12, 0, 50, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 95, 12, 0, 50, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 25, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 23, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 180, 22, 0, 24, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 65, 12, 0, 50, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 80, 12, 0, 50, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 95, 12, 0, 50, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 25, 3.75, -0.6, 0.0, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 361, 15, 0, 23, 3.75, -0.6, 4.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 180, 22, 0, 24, 3.75, -0.6, 9.5, -1.2, None, None, None,1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_STAB, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame_revised(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 10.0, false); @@ -91,156 +89,155 @@ unsafe extern "C" fn game_attacks3s2(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 10.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_ATTACK_S3_FLAG_CHECK_COMBO_BUTTON_ON); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_attacks3s3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attacks3s3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 4.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 4.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 69, 120, 0, 55, 3.4, 0.0, 9.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - //ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.4, 42, 90, 0, 70, 3.4, 0.0, 9.2, -6.8, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 6.4, 42, 90, 0, 70, 3.6, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(14.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + //ATTACK(agent, 3, 0, Hash40::new("haver"), 6.4, 42, 90, 0, 70, 3.4, 0.0, 9.2, -6.8, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); + //ATTACK(agent, 4, 0, Hash40::new("top"), 6.4, 42, 90, 0, 70, 3.6, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(14.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (45.0-20.0)/(17.0)); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 90, 0, 0, 150, 4.0, 0.0, 6.0, -3.5, Some(0.0), Some(6.0), Some(3.5), 1.0, 0.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 90, 0, 0, 150, 4.0, 0.0, 6.0, -3.5, Some(0.0), Some(6.0), Some(3.5), 1.0, 0.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 354, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 186, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 354, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 186, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 18, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 162, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.2, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.4, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.4, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 18, 100, 36, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 162, 100, 40, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.4, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.2, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.6, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 76, 100, 22, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.2, 104, 100, 22, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 88, 0, 0, 62, 3.4, 0.0, 12.6, 0.0, Some(0.0), Some(7.6), Some(0.0), 0.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 4.2, 0.0, 21.4, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 366, 0, 0, 12, 3.6, 0.0, 20.6, 0.0, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 76, 100, 22, 0, 4.0, 0.0, 19.8, -8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.2, 104, 100, 22, 0, 4.0, 0.0, 19.8, 8.6, None, None, None, 0.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 4.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.5, 86, 132, 0, 52, 3.8, 0.0, 9.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_SLASH, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame_revised(boma, 0, 4, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 4, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 4, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 82, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 82, 70, 0, 70, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 82, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 82, 70, 0, 70, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 90, 70, 0, 70, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TRAIL_CLEAVE_SINGLE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 14.0/(33.0-13.0)); + FT_MOTION_RATE(agent, 14.0/(33.0-13.0)); } frame(lua_state, 32.0); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent){ + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("trail") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks32", game_attacks3s2) - .acmd("game_attacks33", game_attacks3s3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks32", game_attacks3s2); + agent.acmd("game_attacks33", game_attacks3s3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/trail/src/fire/acmd/mod.rs b/fighters/trail/src/fire/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/trail/src/fire/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/trail/src/fire/acmd/specials.rs b/fighters/trail/src/fire/acmd/specials.rs new file mode 100644 index 0000000000..19f8af20f2 --- /dev/null +++ b/fighters/trail/src/fire/acmd/specials.rs @@ -0,0 +1,32 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let lr = PostureModule::lr(boma); + let offset = Vector2f {x: (14.0 * lr), y: 7.5}; // distance for article to be offset + PostureModule::add_pos_2d(boma, &offset); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.6, 361, 24, 0, 42, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.2, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.2, 361, 22, 0, 36, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.8, 361, 20, 0, 32, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame_revised(boma, 0, 0.0, false); + ATK_SET_SHIELD_SETOFF_MUL2(agent, 0, 1.05); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_fly2", game_fly); +} diff --git a/fighters/trail/src/fire/mod.rs b/fighters/trail/src/fire/mod.rs new file mode 100644 index 0000000000..8cf8f0c75f --- /dev/null +++ b/fighters/trail/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("trail_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/trail/src/lib.rs b/fighters/trail/src/lib.rs index b1ae660435..16a4af1655 100644 --- a/fighters/trail/src/lib.rs +++ b/fighters/trail/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod fire; +mod thunder; + use smash::{ lib::{ L2CValue, @@ -37,11 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -// cycle magic to firaga at start of match +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("trail"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + fire::install(); + thunder::install(); } diff --git a/fighters/trail/src/opff.rs b/fighters/trail/src/opff.rs index 4ac66934a9..c3cd57fb05 100644 --- a/fighters/trail/src/opff.rs +++ b/fighters/trail/src/opff.rs @@ -379,8 +379,6 @@ pub unsafe fn trail_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("trail") - .on_line(Main, trail_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, trail_frame_wrapper); } diff --git a/fighters/trail/src/status.rs b/fighters/trail/src/status.rs index 65925f5618..ba7678e8a2 100644 --- a/fighters/trail/src/status.rs +++ b/fighters/trail/src/status.rs @@ -1,25 +1,16 @@ use super::*; use globals::*; -// status script import mod jump_aerial; - mod attack_lw4; - mod attack_air; - mod special_s; - mod special_n; -pub fn install() { - jump_aerial::install(); - - attack_lw4::install(); - - attack_air::install(); - - special_s::install(); - - special_n::install(); +pub fn install(agent: &mut Agent) { + jump_aerial::install(agent); + attack_lw4::install(agent); + attack_air::install(agent); + special_s::install(agent); + special_n::install(agent); } diff --git a/fighters/trail/src/status/attack_air.rs b/fighters/trail/src/status/attack_air.rs index e554ada5b7..38dcc530d4 100644 --- a/fighters/trail/src/status/attack_air.rs +++ b/fighters/trail/src/status/attack_air.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) } -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { let motion_kind = MotionModule::motion_kind(fighter.module_accessor); let frame = MotionModule::frame(fighter.module_accessor); @@ -79,7 +79,7 @@ pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::attack_air_main_status(fighter) } @@ -152,7 +152,7 @@ unsafe extern "C" fn sub_attack_air_n(fighter: &mut L2CFighterCommon) { return; } -pub unsafe extern "C" fn init_attack_air_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_air_n(fighter); // Momentum transfer stuff let ratio = VarModule::get_float(fighter.object(), vars::common::instance::JUMP_SPEED_RATIO); @@ -239,7 +239,7 @@ unsafe extern "C" fn sub_attack_air_f(fighter: &mut L2CFighterCommon) { return; } -pub unsafe extern "C" fn init_attack_air_f(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_f_init(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_air_f(fighter); // Momentum transfer stuff let ratio = VarModule::get_float(fighter.object(), vars::common::instance::JUMP_SPEED_RATIO); @@ -257,20 +257,10 @@ pub unsafe extern "C" fn init_attack_air_f(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status( - Init, - *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_N, - init_attack_air_n, - ) - .status( - Init, - *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_F, - init_attack_air_f, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); + agent.status(Init, *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_N, attack_air_n_init); + agent.status(Init, *FIGHTER_TRAIL_STATUS_KIND_ATTACK_AIR_F, attack_air_f_init); } diff --git a/fighters/trail/src/status/attack_lw4.rs b/fighters/trail/src/status/attack_lw4.rs index 65cc0cb7f4..5576f266d4 100644 --- a/fighters/trail/src/status/attack_lw4.rs +++ b/fighters/trail/src/status/attack_lw4.rs @@ -75,9 +75,7 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction,) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } diff --git a/fighters/trail/src/status/jump_aerial.rs b/fighters/trail/src/status/jump_aerial.rs index f2d866b3cb..ff50b3f7fd 100644 --- a/fighters/trail/src/status/jump_aerial.rs +++ b/fighters/trail/src/status/jump_aerial.rs @@ -13,8 +13,6 @@ unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValu original(fighter) } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } diff --git a/fighters/trail/src/status/special_n.rs b/fighters/trail/src/status/special_n.rs index 8be566003b..4e2ae77cb7 100644 --- a/fighters/trail/src/status/special_n.rs +++ b/fighters/trail/src/status/special_n.rs @@ -159,10 +159,8 @@ unsafe extern "C" fn special_n2_main(fighter: &mut L2CFighterCommon) -> L2CValue return fighter.main_shift(special_n2_main_loop); } -pub fn install() { - smashline::Agent::new("trail") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .status(Pre, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_pre) - .status(Main, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Pre, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_pre); + agent.status(Main, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2, special_n2_main); } diff --git a/fighters/trail/src/status/special_s.rs b/fighters/trail/src/status/special_s.rs index 5d992d4393..a2d3e0d744 100644 --- a/fighters/trail/src/status/special_s.rs +++ b/fighters/trail/src/status/special_s.rs @@ -1,15 +1,15 @@ use super::*; -unsafe extern "C" fn trail_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("special_s_start").into(), Hash40::new("special_air_s_start").into(), false.into()); fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_s").into()); WorkModule::set_int(fighter.module_accessor, 1, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); WorkModule::set_int(fighter.module_accessor, *BATTLE_OBJECT_ID_INVALID, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_SEARCH_TARGET_ID); - fighter.sub_shift_status_main(L2CValue::Ptr(trail_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn trail_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { trail_special_s_set_angle_guide(fighter); if MotionModule::is_end(fighter.module_accessor) { fighter.change_status(FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_ATTACK.into(), false.into()); @@ -95,7 +95,7 @@ unsafe extern "C" fn trail_special_s_get_guide_pos(fighter: &mut L2CFighterCommo Vector2f{x: x_pos, y: y_pos} } -unsafe extern "C" fn trail_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { let effect = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_SEARCH_GUIDE_EFFECT_HANDLE) as u32; if effect != 0 { EffectModule::kill(fighter.module_accessor, effect, true, true); @@ -106,19 +106,13 @@ unsafe extern "C" fn trail_special_s_end(fighter: &mut L2CFighterCommon) -> L2CV // FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END -pub unsafe extern "C" fn trail_special_s_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::trail::status::STOP_SIDE_SPECIAL); 0.into() } -pub fn install() { - smashline::Agent::new("trail") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, trail_special_s_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, trail_special_s_end) - .status( - End, - *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END, - trail_special_s_end_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + agent.status(End, *FIGHTER_TRAIL_STATUS_KIND_SPECIAL_S_END, special_s_end_end); } diff --git a/fighters/trail/src/thunder/acmd/mod.rs b/fighters/trail/src/thunder/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/trail/src/thunder/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/trail/src/thunder/acmd/specials.rs b/fighters/trail/src/thunder/acmd/specials.rs new file mode 100644 index 0000000000..7aaee7b318 --- /dev/null +++ b/fighters/trail/src/thunder/acmd/specials.rs @@ -0,0 +1,19 @@ +use super::*; + +unsafe extern "C" fn game_falllast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, None, None, None, 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 140, 0, 70, 3.6, 0.0, 0.4, 0.0, Some(0.0), Some(10.0), Some(0.0), 0.6, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_falllast", game_falllast); +} diff --git a/fighters/trail/src/thunder/mod.rs b/fighters/trail/src/thunder/mod.rs new file mode 100644 index 0000000000..4f8677bcb8 --- /dev/null +++ b/fighters/trail/src/thunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("trail_thunder"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wolf/src/acmd/other.rs b/fighters/wolf/src/acmd/other.rs index 63e275db01..00c884ad5e 100644 --- a/fighters/wolf/src/acmd/other.rs +++ b/fighters/wolf/src/acmd/other.rs @@ -207,23 +207,17 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("game_catch", game_catch); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); } From 9ae6b8e38e67e7a72279cb34b057e0e35c46e331 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 11:28:41 -0500 Subject: [PATCH 012/172] separate steve statuses --- fighters/pickel/src/status.rs | 349 +------------------ fighters/pickel/src/status/attack_air_lw.rs | 144 ++++++++ fighters/pickel/src/status/entry.rs | 47 +++ fighters/pickel/src/status/guard.rs | 33 ++ fighters/pickel/src/status/jump.rs | 50 +++ fighters/pickel/src/status/rebirth.rs | 42 +++ fighters/pickel/src/status/recreate_table.rs | 21 ++ fighters/pickel/src/status/special_s.rs | 48 +++ 8 files changed, 400 insertions(+), 334 deletions(-) create mode 100644 fighters/pickel/src/status/attack_air_lw.rs create mode 100644 fighters/pickel/src/status/entry.rs create mode 100644 fighters/pickel/src/status/guard.rs create mode 100644 fighters/pickel/src/status/jump.rs create mode 100644 fighters/pickel/src/status/rebirth.rs create mode 100644 fighters/pickel/src/status/recreate_table.rs create mode 100644 fighters/pickel/src/status/special_s.rs diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status.rs index 95e839d829..255bfa58dc 100644 --- a/fighters/pickel/src/status.rs +++ b/fighters/pickel/src/status.rs @@ -1,6 +1,14 @@ use super::*; use globals::*; +mod attack_air_lw; +mod entry; +mod guard; +mod jump; +mod rebirth; +mod recreate_table; +mod special_s; + // lets the "stuff" article generate in new statuses #[skyline::hook(offset = 0xf13d5c, inline)] unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { @@ -14,331 +22,6 @@ unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { } } -// prevent steve's shield from being locked in place after it is damaged (vanilla bug) -unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_GuardDamage() -} - -// keep shield article visible while shielding -pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !ArticleModule::is_exist(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF){ - ArticleModule::generate_article(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); - ArticleModule::set_rate(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, 0.0); - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_GUARD)(fighter) -} - -// handles the removal of steves resources when respawning -pub unsafe extern "C" fn rebirth_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); - let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); - let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); - let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); - let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); - let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); - let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); - let reduce_half: [[i32;2];4] = [ // these materials will be reduced by 50% on respawn - [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood], - [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], - [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron]]; - for material in reduce_half { - if material[1] > 1 { - let reduction = (material[1] / 2); - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), material[0], reduction); - } - } - if gold > 0 { // remove all gold - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_GOLD, gold); - } - if diamond > 0 { // remove all diamonds - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, diamond); - } - let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); - if redstone > init_rstn { // reduce redstone to starting value - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, (redstone - init_rstn)); - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) -} - -// handles materials when steve is entering the match, to account for salty runbacks -pub unsafe extern "C" fn entry_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); - let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); - let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); - let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); - let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); - let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); - let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); - let remove_mats: [[i32;2];4] = [ // these materials will be removed on entry - [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], - [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron], - [*FIGHTER_PICKEL_MATERIAL_KIND_GOLD, dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, wood]]; - for material in remove_mats { - let (kind, has) = (material[0], material[1]); - if has > 0 { - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, has); - } - } - let init_dirt = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_grade_1_num")); - let init_wood = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_wood_num")); - let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); - let init_mats: [[i32;3];3] = [ // these materials will be reverted to the initial amount defined in params - [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt, init_dirt], - [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood, init_wood], - [*FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, redstone, init_rstn]]; - for material in init_mats { - let (kind, has, init) = (material[0], material[1], material[2]); - if has > init { - FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, (has - init)); - } else if has < init { - FighterSpecializer_Pickel::add_material_num(fighter.boma(), kind, (init - has)); - } - } - - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ENTRY)(fighter) -} - -unsafe extern "C" fn attack_air_lw_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if pickel_attack_que(fighter).get_bool() { - return 0.into(); - } - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME); - let mut generate = false; - if ArticleModule::is_generatable(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { - if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME) <= 0 - || !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { - generate = true; - } - } - if !FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { - generate = false; - } - let mot = if generate { - KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - Hash40::new("attack_air_lw") - } - else { - Hash40::new("attack_air_lw_fail") - }; - MotionModule::change_motion( - fighter.module_accessor, - mot, - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - WorkModule::set_flag(fighter.module_accessor, generate, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_IS_GENERATE_FORGE); - if generate { - let jump_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - WorkModule::set_int(fighter.module_accessor, jump_count, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_COUNT_BACKUP); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_LAMDING_RECOVER); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_FORGE_LANDING); - fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_start_main_loop as *const () as _)) - } - else { - fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_fail_main_status_loop as *const () as _)) - } -} - -unsafe extern "C" fn attack_air_lw_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if MotionModule::is_end(fighter.module_accessor) { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_air_lw") { - fighter.change_status(FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_LOOP.into(), false.into()); - return 0.into(); - } - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - return 0.into(); - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); - if FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { - let attack_air_lw_interval = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), hash40("attack_air_lw_interval")); - WorkModule::set_int(fighter.module_accessor, attack_air_lw_interval, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME); - let anvil_iron_count = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), 0x188e0b0db2) + 2; - FighterSpecializer_Pickel::sub_material_num(fighter.module_accessor, *FIGHTER_PICKEL_MATERIAL_KIND_IRON, anvil_iron_count); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, false, -1); - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE) { - LinkModule::send_event_parents(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE, Hash40::new_raw(0x11d608f91f)); - } - } - } - if !StatusModule::is_changing(fighter.module_accessor) - && StatusModule::is_situation_changed(fighter.module_accessor) - && fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - } - pickel_attack_catch_item(fighter); - attack_air_lw_dead_area(fighter); - 0.into() -} - -pub unsafe extern "C" fn pickel_attack_que(fighter: &mut L2CFighterCommon) -> L2CValue { - let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); - if !FighterSpecializer_Pickel::is_status_kind_attack(prev_status) { - fighter.sub_GetLightItemImm(L2CValue::Void()); - if StatusModule::status_kind_que_from_script(fighter.module_accessor) as i32 != *STATUS_KIND_NONE { - return true.into(); - } - } - false.into() -} - -pub unsafe extern "C" fn pickel_attack_catch_item(fighter: &mut L2CFighterCommon) { - let catch_frame_param = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - hash40("item_catch_frame_attack_3") - } else { - hash40("item_air_catch_frame") - }; - let catch_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("common"), catch_frame_param); - if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME) <= catch_frame { - fighter.sub_GetLightItemImm(L2CValue::Void()); - } -} - -unsafe extern "C" fn attack_air_lw_dead_area(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; - ModelModule::joint_global_position( - fighter.module_accessor, - Hash40::new("hip"), - pos, - true - ); - let check_dead = GroundUtility::check_dead_area(pos); - if check_dead != *GROUND_DEAD_AREA_CHECK_RESULT_OUTSIDE_UP { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } - else { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } - } -} - -pub unsafe extern "C" fn attack_air_lw_fail_main_status_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_AttackAir_Main_common().get_bool() { - fighter.sub_air_check_superleaf_fall_slowly(); - if !fighter.global_table[IS_STOPPING].get_bool() { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec_fix_pos(); - } - 0.into() - } else { - 1.into() - } -} - -pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - let hasIron = WorkModule::get_int(fighter.module_accessor,*FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON) > 0; - let trolleyArticle = ArticleModule::is_exist(fighter.module_accessor,*FIGHTER_PICKEL_GENERATE_ARTICLE_TROLLEY); - let canCart = hasIron && !trolleyArticle; - if canCart { - VarModule::on_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); - } - - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) -} - -// Prevents side special from being used again if it has already been used once in the current airtime -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) - && VarModule::is_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -// Re-enables the ability to use side special when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - let still_SideSpecial = fighter.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_SPECIAL_S, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_RIDE, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE - ] - ); - - if (!fighter.is_situation(*SITUATION_KIND_AIR) && !still_SideSpecial) - || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); - } - - return true.into(); -} - -unsafe extern "C" fn pickel_jump_status_check(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_prev_status_one_of(&[ - *FIGHTER_PICKEL_STATUS_KIND_ATTACK_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_JUMP, - *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N3_JUMP]) { - return false.into(); - } else { - return true.into(); - } -} - -pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() - { - return 1.into(); - } else { - if pickel_jump_status_check(fighter).get_bool() { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(*KINETIC_TYPE_NONE), - L2CValue::I32( - *FS_SUCCEEDS_KEEP_EFFECT - | *FS_SUCCEEDS_KEEP_SOUND - | *FS_SUCCEEDS_KEEP_TRANSITION - | *FS_SUCCEEDS_KEEP_CANCEL, - ), - ); - } else { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0), - ); - } - return 0.into(); - } -} - -// prevent steve from spawning the crafting table through vanilla circumstances -unsafe extern "C" fn recreate_table_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) - || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { - VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); - StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry - - return 1.into(); - } - - smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) -} - unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); @@ -357,13 +40,11 @@ pub fn install(agent: &mut Agent) { ); agent.on_start(on_start); - agent.status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre); - agent.status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end); - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); - agent.status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_main); - agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); - agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, attack_air_lw_start_main); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); - agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, recreate_table_main); + attack_air_lw::install(agent); + entry::install(agent); + guard::install(agent); + jump::install(agent); + rebirth::install(agent); + recreate_table::install(agent); + special_s::install(agent); } diff --git a/fighters/pickel/src/status/attack_air_lw.rs b/fighters/pickel/src/status/attack_air_lw.rs new file mode 100644 index 0000000000..e1df34b175 --- /dev/null +++ b/fighters/pickel/src/status/attack_air_lw.rs @@ -0,0 +1,144 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR_LW_START + +unsafe extern "C" fn attack_air_lw_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if pickel_attack_que(fighter).get_bool() { + return 0.into(); + } + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME); + let mut generate = false; + if ArticleModule::is_generatable(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { + if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME) <= 0 + || !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE) { + generate = true; + } + } + if !FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { + generate = false; + } + let mot = if generate { + KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + Hash40::new("attack_air_lw") + } + else { + Hash40::new("attack_air_lw_fail") + }; + MotionModule::change_motion( + fighter.module_accessor, + mot, + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + WorkModule::set_flag(fighter.module_accessor, generate, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_IS_GENERATE_FORGE); + if generate { + let jump_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + WorkModule::set_int(fighter.module_accessor, jump_count, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_JUMP_COUNT_BACKUP); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_LAMDING_RECOVER); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_FLAG_FORGE_LANDING); + fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_start_main_loop as *const () as _)) + } + else { + fighter.sub_shift_status_main(L2CValue::Ptr(attack_air_lw_fail_main_status_loop as *const () as _)) + } +} + +unsafe extern "C" fn attack_air_lw_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if MotionModule::is_end(fighter.module_accessor) { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_air_lw") { + fighter.change_status(FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_LOOP.into(), false.into()); + return 0.into(); + } + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + return 0.into(); + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PICKEL_STATUS_ATTACK_FLAG_FORGE_GENERATE_ENABLE); + if FighterSpecializer_Pickel::check_material_attack_air_lw_generate(fighter.module_accessor) { + let attack_air_lw_interval = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), hash40("attack_air_lw_interval")); + WorkModule::set_int(fighter.module_accessor, attack_air_lw_interval, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_AIR_LW_FORBID_FRAME); + let anvil_iron_count = WorkModule::get_param_int(fighter.module_accessor, hash40("param_private"), 0x188e0b0db2) + 2; + FighterSpecializer_Pickel::sub_material_num(fighter.module_accessor, *FIGHTER_PICKEL_MATERIAL_KIND_IRON, anvil_iron_count); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PICKEL_GENERATE_ARTICLE_FORGE, false, -1); + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE) { + LinkModule::send_event_parents(fighter.module_accessor, *FIGHTER_PICKEL_LINK_NO_FORGE, Hash40::new_raw(0x11d608f91f)); + } + } + } + if !StatusModule::is_changing(fighter.module_accessor) + && StatusModule::is_situation_changed(fighter.module_accessor) + && fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + } + pickel_attack_catch_item(fighter); + attack_air_lw_dead_area(fighter); + 0.into() +} + +pub unsafe extern "C" fn pickel_attack_que(fighter: &mut L2CFighterCommon) -> L2CValue { + let prev_status = fighter.global_table[PREV_STATUS_KIND].get_i32(); + if !FighterSpecializer_Pickel::is_status_kind_attack(prev_status) { + fighter.sub_GetLightItemImm(L2CValue::Void()); + if StatusModule::status_kind_que_from_script(fighter.module_accessor) as i32 != *STATUS_KIND_NONE { + return true.into(); + } + } + false.into() +} + +pub unsafe extern "C" fn pickel_attack_catch_item(fighter: &mut L2CFighterCommon) { + let catch_frame_param = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + hash40("item_catch_frame_attack_3") + } else { + hash40("item_air_catch_frame") + }; + let catch_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("common"), catch_frame_param); + if WorkModule::get_int(fighter.module_accessor, *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_ATTACK_FRAME) <= catch_frame { + fighter.sub_GetLightItemImm(L2CValue::Void()); + } +} + +unsafe extern "C" fn attack_air_lw_dead_area(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; + ModelModule::joint_global_position( + fighter.module_accessor, + Hash40::new("hip"), + pos, + true + ); + let check_dead = GroundUtility::check_dead_area(pos); + if check_dead != *GROUND_DEAD_AREA_CHECK_RESULT_OUTSIDE_UP { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } + else { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } + } +} + +pub unsafe extern "C" fn attack_air_lw_fail_main_status_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_AttackAir_Main_common().get_bool() { + fighter.sub_air_check_superleaf_fall_slowly(); + if !fighter.global_table[IS_STOPPING].get_bool() { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec_fix_pos(); + } + 0.into() + } else { + 1.into() + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_ATTACK_AIR_LW_START, attack_air_lw_start_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/entry.rs b/fighters/pickel/src/status/entry.rs new file mode 100644 index 0000000000..f73fc92bde --- /dev/null +++ b/fighters/pickel/src/status/entry.rs @@ -0,0 +1,47 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ENTRY + +// handles materials when steve is entering the match, to account for salty runbacks +pub unsafe extern "C" fn entry_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); + let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); + let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); + let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); + let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); + let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); + let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); + let remove_mats: [[i32;2];4] = [ // these materials will be removed on entry + [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], + [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron], + [*FIGHTER_PICKEL_MATERIAL_KIND_GOLD, dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, wood]]; + for material in remove_mats { + let (kind, has) = (material[0], material[1]); + if has > 0 { + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, has); + } + } + let init_dirt = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_grade_1_num")); + let init_wood = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_wood_num")); + let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); + let init_mats: [[i32;3];3] = [ // these materials will be reverted to the initial amount defined in params + [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt, init_dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood, init_wood], + [*FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, redstone, init_rstn]]; + for material in init_mats { + let (kind, has, init) = (material[0], material[1], material[2]); + if has > init { + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), kind, (has - init)); + } else if has < init { + FighterSpecializer_Pickel::add_material_num(fighter.boma(), kind, (init - has)); + } + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ENTRY)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/guard.rs b/fighters/pickel/src/status/guard.rs new file mode 100644 index 0000000000..0747fcff2a --- /dev/null +++ b/fighters/pickel/src/status/guard.rs @@ -0,0 +1,33 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_GUARD + +// keep shield article visible while shielding +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !ArticleModule::is_exist(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF){ + ArticleModule::generate_article(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, false, -1); + ArticleModule::set_rate(fighter.boma(), *FIGHTER_PICKEL_GENERATE_ARTICLE_STUFF, 0.0); + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_GUARD)(fighter) +} + +// FIGHTER_STATUS_KIND_GUARD_DAMAGE + +// prevent steve's shield from being locked in place after it is damaged (vanilla bug) +unsafe extern "C" fn guarddamage_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.boma(), *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +unsafe extern "C" fn guarddamage_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_GuardDamage() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_pre); + agent.status(End, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guarddamage_end); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/jump.rs b/fighters/pickel/src/status/jump.rs new file mode 100644 index 0000000000..9c77ca6992 --- /dev/null +++ b/fighters/pickel/src/status/jump.rs @@ -0,0 +1,50 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_JUMP + +unsafe extern "C" fn pickel_jump_status_check(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_prev_status_one_of(&[ + *FIGHTER_PICKEL_STATUS_KIND_ATTACK_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N3_JUMP]) { + return false.into(); + } else { + return true.into(); + } +} + +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() + { + return 1.into(); + } else { + if pickel_jump_status_check(fighter).get_bool() { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(*KINETIC_TYPE_NONE), + L2CValue::I32( + *FS_SUCCEEDS_KEEP_EFFECT + | *FS_SUCCEEDS_KEEP_SOUND + | *FS_SUCCEEDS_KEEP_TRANSITION + | *FS_SUCCEEDS_KEEP_CANCEL, + ), + ); + } else { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0), + ); + } + return 0.into(); + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/rebirth.rs b/fighters/pickel/src/status/rebirth.rs new file mode 100644 index 0000000000..124a88ea19 --- /dev/null +++ b/fighters/pickel/src/status/rebirth.rs @@ -0,0 +1,42 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +// handles the removal of steves resources when respawning +pub unsafe extern "C" fn rebirth_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let dirt = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GRADE_1); + let wood = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_WOOD); + let stone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_STONE); + let iron = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON); + let gold = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_GOLD); + let diamond = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_DIAMOND); + let redstone = WorkModule::get_int(fighter.boma(), *FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_RED_STONE); + let reduce_half: [[i32;2];4] = [ // these materials will be reduced by 50% on respawn + [*FIGHTER_PICKEL_MATERIAL_KIND_GRADE_1, dirt], + [*FIGHTER_PICKEL_MATERIAL_KIND_WOOD, wood], + [*FIGHTER_PICKEL_MATERIAL_KIND_STONE, stone], + [*FIGHTER_PICKEL_MATERIAL_KIND_IRON, iron]]; + for material in reduce_half { + if material[1] > 1 { + let reduction = (material[1] / 2); + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), material[0], reduction); + } + } + if gold > 0 { // remove all gold + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_GOLD, gold); + } + if diamond > 0 { // remove all diamonds + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_DIAMOND, diamond); + } + let init_rstn = WorkModule::get_param_int(fighter.boma(), hash40("param_private"), hash40("start_material_red_stone_num")); + if redstone > init_rstn { // reduce redstone to starting value + FighterSpecializer_Pickel::sub_material_num(fighter.boma(), *FIGHTER_PICKEL_MATERIAL_KIND_RED_STONE, (redstone - init_rstn)); + } + + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/recreate_table.rs b/fighters/pickel/src/status/recreate_table.rs new file mode 100644 index 0000000000..87873126d0 --- /dev/null +++ b/fighters/pickel/src/status/recreate_table.rs @@ -0,0 +1,21 @@ +use super::*; +use globals::*; + +// FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE + +// prevent steve from spawning the crafting table through vanilla circumstances +unsafe extern "C" fn recreate_table_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_prev_status(*FIGHTER_PICKEL_STATUS_KIND_SPECIAL_N1_WAIT) + || !VarModule::is_flag(fighter.object(), vars::pickel::instance::CAN_RESPAWN_TABLE) { + VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF); + StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_GUARD_OFF, true); // steve will instead parry + + return 1.into(); + } + + smashline::original_status(Main, fighter, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE, recreate_table_main); +} \ No newline at end of file diff --git a/fighters/pickel/src/status/special_s.rs b/fighters/pickel/src/status/special_s.rs new file mode 100644 index 0000000000..010c612372 --- /dev/null +++ b/fighters/pickel/src/status/special_s.rs @@ -0,0 +1,48 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + let hasIron = WorkModule::get_int(fighter.module_accessor,*FIGHTER_PICKEL_INSTANCE_WORK_ID_INT_MATERIAL_NUM_IRON) > 0; + let trolleyArticle = ArticleModule::is_exist(fighter.module_accessor,*FIGHTER_PICKEL_GENERATE_ARTICLE_TROLLEY); + let canCart = hasIron && !trolleyArticle; + if canCart { + VarModule::on_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); + } + + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) +} + +// Prevents side special from being used again if it has already been used once in the current airtime +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) + && VarModule::is_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +// Re-enables the ability to use side special when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + let still_SideSpecial = fighter.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_SPECIAL_S, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_JUMP, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_RIDE, + *FIGHTER_PICKEL_STATUS_KIND_SPECIAL_S_DRIVE + ] + ); + + if (!fighter.is_situation(*SITUATION_KIND_AIR) && !still_SideSpecial) + || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::pickel::instance::DISABLE_SPECIAL_S); + } + + return true.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); +} \ No newline at end of file From e619d71a9921d9caaea4465e1d3f5a863e0d5ee1 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 11:34:57 -0500 Subject: [PATCH 013/172] fix side b callbacks --- fighters/pickel/src/status.rs | 2 -- fighters/pickel/src/status/special_s.rs | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status.rs index 255bfa58dc..112c29e98b 100644 --- a/fighters/pickel/src/status.rs +++ b/fighters/pickel/src/status.rs @@ -23,8 +23,6 @@ unsafe fn stuff_hook(ctx: &mut skyline::hooks::InlineCtx) { } unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); VarModule::on_flag(fighter.battle_object, vars::pickel::instance::SHOULD_CYCLE_MATERIAL); VarModule::off_flag(fighter.battle_object, vars::pickel::instance::SHOULD_RESET_ROT); VarModule::set_int(fighter.battle_object, vars::pickel::instance::MATERIAL_INDEX, 0); diff --git a/fighters/pickel/src/status/special_s.rs b/fighters/pickel/src/status/special_s.rs index 010c612372..07ba169ccb 100644 --- a/fighters/pickel/src/status/special_s.rs +++ b/fighters/pickel/src/status/special_s.rs @@ -43,6 +43,12 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L return true.into(); } +unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + pub fn install(agent: &mut Agent) { + agent.on_start(special_s_init); agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); } \ No newline at end of file From ebc028b4d4f79f9e07afc1ab84c00ea31aab21d2 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 12:35:39 -0500 Subject: [PATCH 014/172] pac man --- fighters/pacman/src/acmd/aerials.rs | 195 ++++++++++---------- fighters/pacman/src/acmd/ground.rs | 96 +++++----- fighters/pacman/src/acmd/mod.rs | 16 +- fighters/pacman/src/acmd/other.rs | 61 +++---- fighters/pacman/src/acmd/smashes.rs | 108 ++++++----- fighters/pacman/src/acmd/specials.rs | 163 +++++------------ fighters/pacman/src/acmd/throws.rs | 53 +++--- fighters/pacman/src/acmd/tilts.rs | 230 ++++++++++++------------ fighters/pacman/src/lib.rs | 9 +- fighters/pacman/src/opff.rs | 7 +- fighters/pacman/src/status/mod.rs | 4 +- fighters/pacman/src/status/special_s.rs | 10 +- 12 files changed, 427 insertions(+), 525 deletions(-) diff --git a/fighters/pacman/src/acmd/aerials.rs b/fighters/pacman/src/acmd/aerials.rs index b2be9af752..e16af0556a 100644 --- a/fighters/pacman/src/acmd/aerials.rs +++ b/fighters/pacman/src/acmd/aerials.rs @@ -1,210 +1,209 @@ - use super::*; -unsafe extern "C" fn pacman_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 10.0, 50, 70, 0, 45, 8.1, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 10.0, 50, 70, 0, 45, 8.1, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 8.5, 50, 70, 0, 45, 7.2, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 8.5, 50, 70, 0, 45, 7.2, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 6.0, 50, 70, 0, 45, 4.5, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 6.0, 50, 70, 0, 45, 4.5, 0.0, 0.5, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pacman_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pacman_change_start"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pacman_change_start"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.8, 0, 0, 90, 0.8, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.8, 0, 0, 90, 0.8, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.7, 0, 0, 90, 0.75, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5.9, 0.7, 0, 0, 90, 0.75, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pacman_change_end"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind"), true, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pacman_change_end"), Hash40::new("pizzapacman"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind"), true, true); } } -unsafe extern "C" fn pacman_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.5, 361, 29, 0, 70, 5.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 7.5, 361, 29, 0, 70, 5.0, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.5, 361, 29, 0, 70, 5.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 7.5, 361, 29, 0, 70, 5.0, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.25); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 49.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn pacman_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.769); } frame(lua_state, 8.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 115, 0, 30, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 115, 0, 30, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 115, 0, 30, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 115, 0, 30, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 25, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 7.0, 361, 80, 0, 25, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 80, 0, 25, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 7.0, 361, 80, 0, 25, 5.9, 1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pacman_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.662); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.662); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 70, 85, 0, 35, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 70, 85, 0, 35, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 70, 85, 0, 35, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 70, 85, 0, 35, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 15, 70, 0, 20, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 15, 70, 0, 20, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 15, 70, 0, 20, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 15, 70, 0, 20, 5.5, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pacman_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn pacman_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 245, 100, 5, 0, 4.5, 0.0, 1.8, 0.5, Some(0.0), Some(4.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 130, 100, 22, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 100, 100, 35, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 245, 100, 5, 0, 4.5, 0.0, 1.8, 0.5, Some(0.0), Some(4.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 130, 100, 22, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 100, 100, 35, 0, 6.2, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 14.0, false); AttackModule::set_add_reaction_frame(boma, 1, 9.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 5.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 69, 75, 0, 74, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 69, 75, 0, 74, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attackairn", pacman_attack_air_n_game) - .acmd("effect_attackairn", pacman_attack_air_n_effect) - .acmd("game_attackairf", pacman_attack_air_f_game) - .acmd("game_attackairb", pacman_attack_air_b_game) - .acmd("game_attackairhi", pacman_attack_air_hi_game) - .acmd("expression_attackairhi", pacman_attack_air_hi_expression) - .acmd("game_attackairlw", pacman_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pacman/src/acmd/ground.rs b/fighters/pacman/src/acmd/ground.rs index 737181d780..608f1cb8c6 100644 --- a/fighters/pacman/src/acmd/ground.rs +++ b/fighters/pacman/src/acmd/ground.rs @@ -1,104 +1,100 @@ use super::*; -unsafe extern "C" fn pacman_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.5, 0.0, 7.5, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 1.7, 0.0, 7.5, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.5, 0.0, 7.5, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 1.7, 0.0, 7.5, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.0, 0.0, 7.5, 11.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 4.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pacman_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 35, 0, 35, 2.5, 0.0, 7.5, 1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 35, 0, 30, 2.8, 0.0, 7.5, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 30, 3.0, 0.0, 7.5, 8.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 35, 0, 35, 2.5, 0.0, 7.5, 1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 35, 0, 30, 2.8, 0.0, 7.5, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 30, 3.0, 0.0, 7.5, 8.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn pacman_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 4.0, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 5.0, 0.0, 8.0, 13.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 4.0, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 106, 0, 45, 5.0, 0.0, 8.0, 13.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pacman_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("pizzapacman"), 0.0, 361, 100, 12, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("pizzapacman"), 0.0, 361, 100, 12, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 7.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("pizzapacman"), 2.0, 12, 15, 0, 40, 5.5, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 7.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("pizzapacman"), 4.0, 60, 65, 0, 100, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attack11", pacman_attack_11_game) - .acmd("game_attack12", pacman_attack_12_game) - .acmd("game_attackdash", pacman_attack_dash_game) - .install(); - smashline::Agent::new("pikmin") - .acmd("game_attack13", pacman_attack_13_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pacman/src/acmd/mod.rs b/fighters/pacman/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/pacman/src/acmd/mod.rs +++ b/fighters/pacman/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/other.rs b/fighters/pacman/src/acmd/other.rs index 0cfee9c9fb..5fb4ce1104 100644 --- a/fighters/pacman/src/acmd/other.rs +++ b/fighters/pacman/src/acmd/other.rs @@ -1,64 +1,59 @@ - use super::*; -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pacman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pacman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn pacman_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", pacman_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pacman/src/acmd/smashes.rs b/fighters/pacman/src/acmd/smashes.rs index 5fad360303..dc391f05a0 100644 --- a/fighters/pacman/src/acmd/smashes.rs +++ b/fighters/pacman/src/acmd/smashes.rs @@ -1,113 +1,109 @@ - use super::*; -unsafe extern "C" fn pacman_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 16.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 40, 3.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 16.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 40, 3.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 9.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 9.0, 361, 100, 0, 40, 5.4, 0.0, 5.4, 0.0, Some(0.0), Some(4.2), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 135, 100, 125, 0, 4.0, 0.0, 8.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 135, 100, 125, 0, 4.0, 0.0, 8.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 14.0, 83, 102, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 14.0, 83, 102, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 8.0, 83, 97, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 8.0, 83, 97, 0, 32, 7.0, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("ghost2"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("ghost2"), 13.0, 29, 91, 0, 30, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(5.3), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("ghost1"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("ghost2"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("ghost1"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("ghost2"), 7.0, 45, 97, 0, 40, 6.2, 0.0, 5.8, 0.0, Some(0.0), Some(4.8), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attacks4", pacman_attack_s4_s_game) - .acmd("game_attackhi4", pacman_attack_hi4_game) - .acmd("game_attacklw4", pacman_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pacman/src/acmd/specials.rs b/fighters/pacman/src/acmd/specials.rs index ffa7e463df..f9b75d0620 100644 --- a/fighters/pacman/src/acmd/specials.rs +++ b/fighters/pacman/src/acmd/specials.rs @@ -1,60 +1,10 @@ - use super::*; -unsafe extern "C" fn pacman_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - let charge_level = WorkModule::get_int(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_INT_SPECIAL_N_CHARGE_RANK); - if charge_level <= 0 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANCHERRY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 1 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANSTRAWBERRY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 3 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANORANGE), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 5 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANAPPLE), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 7 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANMELON), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 9 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANBOSS), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 11 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANBELL), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else if charge_level <= 12 { - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_PACMANKEY), 0, 0, false, false); - WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - //WorkModule::on_flag(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_FLAG_SPECIAL_N_REMOVE_ITEM); - } - else{ - WorkModule::on_flag(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_FLAG_THROW); - } - - } - -} - -unsafe extern "C" fn pacman_special_air_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ let charge_level = WorkModule::get_int(boma, *FIGHTER_PACMAN_INSTANCE_WORK_ID_INT_SPECIAL_N_CHARGE_RANK); if charge_level <= 0 { @@ -94,96 +44,71 @@ unsafe extern "C" fn pacman_special_air_n_shoot_game(fighter: &mut L2CAgentBase) else{ WorkModule::on_flag(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_FLAG_THROW); } - } - } -unsafe extern "C" fn expression_specialairsreturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); +unsafe extern "C" fn expression_specialairsreturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_none") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_normal") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn pacman_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } } -unsafe extern "C" fn pacman_special_lw_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.4); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.6, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.6, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_special_air_lw_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.4); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 270, 70, 0, 20, 10.0, 0.0, 3.5, 0.0, None, None, None, 1.6, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + + agent.acmd("expression_specialairsreturn", expression_specialairsreturn); + + agent.acmd("game_specialairhiend", game_specialairhiend); -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_specialnshoot", pacman_special_n_shoot_game) - .acmd("game_specialairnshoot", pacman_special_air_n_shoot_game) - .acmd("expression_specialairsreturn", expression_specialairsreturn) - .acmd("game_specialairhiend", pacman_special_air_hi_end_game) - .acmd("game_speciallwfailure", pacman_special_lw_failure_game) - .acmd("game_specialairlwfailure", pacman_special_air_lw_failure_game) - .install(); + agent.acmd("game_speciallwfailure", game_speciallwfailure); + agent.acmd("game_specialairlwfailure", game_speciallwfailure); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/throws.rs b/fighters/pacman/src/acmd/throws.rs index b38e46c702..63b8d09ec1 100644 --- a/fighters/pacman/src/acmd/throws.rs +++ b/fighters/pacman/src/acmd/throws.rs @@ -1,52 +1,51 @@ use super::*; -unsafe extern "C" fn pacman_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 82, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 82, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 3); + CHECK_FINISH_CAMERA(agent, 14, 3); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn pacman_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 80, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 80, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 22); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 22); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.842); + FT_MOTION_RATE(agent, 0.842); } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_throwb", pacman_throw_b_game) - .acmd("game_throwhi", pacman_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pacman/src/acmd/tilts.rs b/fighters/pacman/src/acmd/tilts.rs index 98de446a6e..5216468a12 100644 --- a/fighters/pacman/src/acmd/tilts.rs +++ b/fighters/pacman/src/acmd/tilts.rs @@ -1,198 +1,192 @@ - use super::*; -unsafe extern "C" fn pacman_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 5.0, 6.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 20, 4.0, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 7.5, 93, 75, 0, 55, 5.6, 2.4, -0.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.5, 93, 75, 0, 55, 4.0, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 7.0, -4.5, Some(0.0), Some(7.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handl"), 7.5, 93, 75, 0, 55, 5.6, 2.4, -0.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.5, 93, 75, 0, 55, 4.0, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 7.0, -4.5, Some(0.0), Some(7.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 10.0, -3.5, Some(0.0), Some(10.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 93, 75, 0, 55, 4.0, 0.0, 10.0, -3.5, Some(0.0), Some(10.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("rot"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("rot"), *HIT_STATUS_OFF); } - } -unsafe extern "C" fn pacman_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn pacman_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 4.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 4.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 50, 0, 65, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 5.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 5.0, 0.0, 3.6, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.5, 94, 50, 0, 70, 6.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pacman_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_none") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_normal") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_NORMAL); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); VisibilityModule::set_int64(boma, hash40("pizza") as i64, hash40("pizza_none") as i64); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("pizzapacman"), *HIT_STATUS_OFF); - } - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("pizzapacman"), *HIT_STATUS_OFF); + } + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -pub fn install() { - smashline::Agent::new("pacman") - .acmd("game_attacks3hi", pacman_attack_s3_hi_game) - .acmd("game_attacks3", pacman_attack_s3_s_game) - .acmd("game_attacks3lw", pacman_attack_s3_lw_game) - .acmd("game_attackhi3", pacman_attack_hi3_game) - .acmd("expression_attackhi3", pacman_attack_hi3_expression) - .acmd("game_attacklw3", pacman_attack_lw3_game) - .acmd("expression_attacklw3", pacman_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/pacman/src/lib.rs b/fighters/pacman/src/lib.rs index 5537dac979..7186f49847 100644 --- a/fighters/pacman/src/lib.rs +++ b/fighters/pacman/src/lib.rs @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pacman"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/pacman/src/opff.rs b/fighters/pacman/src/opff.rs index 6bae8edc7c..3ee08dc953 100644 --- a/fighters/pacman/src/opff.rs +++ b/fighters/pacman/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { //PM-like neutral-b canceling if status_kind == *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_N_CANCEL { @@ -110,8 +109,6 @@ pub unsafe fn pacman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("pacman") - .on_line(Main, pacman_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pacman_frame_wrapper); } \ No newline at end of file diff --git a/fighters/pacman/src/status/mod.rs b/fighters/pacman/src/status/mod.rs index e892d9885a..25c9d60b6b 100644 --- a/fighters/pacman/src/status/mod.rs +++ b/fighters/pacman/src/status/mod.rs @@ -3,6 +3,6 @@ use smashline::*; mod special_s; -pub fn install() { - special_s::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/pacman/src/status/special_s.rs b/fighters/pacman/src/status/special_s.rs index f9f940b06d..99cecb6e15 100644 --- a/fighters/pacman/src/status/special_s.rs +++ b/fighters/pacman/src/status/special_s.rs @@ -46,10 +46,8 @@ pub unsafe extern "C" fn fall_special_init(fighter: &mut L2CFighterCommon) -> L2 smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_FALL_SPECIAL)(fighter) } -pub fn install() { - smashline::Agent::new("pacman") - .status(Main, *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main) - .status( Main,*FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN, special_s_return_main) - .status(Init, *FIGHTER_STATUS_KIND_FALL_SPECIAL, fall_special_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main); + agent.status( Main,*FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_RETURN, special_s_return_main); + agent.status(Init, *FIGHTER_STATUS_KIND_FALL_SPECIAL, fall_special_init); } \ No newline at end of file From bb69631e74865c18ec67966a897c38177d7ee267 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 13:32:55 -0500 Subject: [PATCH 015/172] lonk also condenses some identical sound scripts on characters i already did --- fighters/fox/src/acmd/other.rs | 85 +- fighters/link/src/acmd/aerials.rs | 282 +++-- fighters/link/src/acmd/ground.rs | 160 ++- fighters/link/src/acmd/mod.rs | 16 +- fighters/link/src/acmd/other.rs | 246 ++--- fighters/link/src/acmd/smashes.rs | 151 ++- fighters/link/src/acmd/specials.rs | 333 +++--- fighters/link/src/acmd/throws.rs | 105 +- fighters/link/src/acmd/tilts.rs | 112 +- fighters/link/src/boomerang/acmd/mod.rs | 7 + fighters/link/src/boomerang/acmd/specials.rs | 31 + fighters/link/src/boomerang/mod.rs | 9 + fighters/link/src/lib.rs | 15 +- fighters/link/src/opff.rs | 9 +- fighters/link/src/status.rs | 1011 +----------------- fighters/link/src/status/special_hi.rs | 401 +++++++ fighters/link/src/status/special_n.rs | 612 +++++++++++ fighters/trail/src/acmd/other.rs | 85 +- fighters/wolf/src/acmd/other.rs | 85 +- 19 files changed, 1722 insertions(+), 2033 deletions(-) create mode 100644 fighters/link/src/boomerang/acmd/mod.rs create mode 100644 fighters/link/src/boomerang/acmd/specials.rs create mode 100644 fighters/link/src/boomerang/mod.rs create mode 100644 fighters/link/src/status/special_hi.rs create mode 100644 fighters/link/src/status/special_n.rs diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index 04719bc142..774709799c 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -185,11 +110,11 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); diff --git a/fighters/link/src/acmd/aerials.rs b/fighters/link/src/acmd/aerials.rs index f005c2e166..dec1ff4c2f 100644 --- a/fighters/link/src/acmd/aerials.rs +++ b/fighters/link/src/acmd/aerials.rs @@ -1,272 +1,266 @@ - use super::*; -unsafe extern "C" fn attack_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.574/(7.0-1.0)); + FT_MOTION_RATE(agent, 2.574/(7.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 15, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 15, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 15, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 15, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 10, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); frame(lua_state, 13.5); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 14.0, 361, 100, 0, 30, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 8.0/(20.0-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(20.0-15.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 120, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 120, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 361, 120, 0, 40, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 15.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter,Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent,Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("link_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 13); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 13); } frame(lua_state, 22.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn attack_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 10.0/(14.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 70, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 366, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0/(14.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 70, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 366, 100, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 70, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 5.0, 366, 100, 40, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.4/(10.0/1.0)); + FT_MOTION_RATE(agent, 5.4/(10.0/1.0)); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 15.0, 85, 92, 0, 25, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 15.0, 85, 92, 0, 25, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 13.0, 85, 85, 0, 22, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_POWER(fighter, 0, 13); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 13.0, 85, 85, 0, 22, 3.5, 10.0, 0.0, 0.0, Some(-4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_POWER(agent, 0, 13); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairhi (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } - } -unsafe extern "C" fn attack_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.0, 3.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 270, 38, 0, 30, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 65, 98, 0, 42, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 270, 38, 0, 30, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 65, 98, 0, 42, 3.5, 1.5, -2.5, 0.0, Some(1.5), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 34.0/(65.0-20.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 65, 100, 0, 41, 3.5, 1.0, -0.5, 0.0, Some(1.0), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 34.0/(65.0-20.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 65, 100, 0, 41, 3.5, 1.0, -0.5, 0.0, Some(1.0), Some(9.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairlw (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } - } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attackairn", attack_air_n) - .acmd("game_attackairf", attack_air_f) - .acmd("effect_attackairf", attack_air_f_effect) - .acmd("expression_attackairf", attack_air_f_expression) - .acmd("game_attackairb", attack_air_b) - .acmd("game_attackairhi", attack_air_hi) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", attack_air_lw) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/link/src/acmd/ground.rs b/fighters/link/src/acmd/ground.rs index ac423ef9a3..ff951107eb 100644 --- a/fighters/link/src/acmd/ground.rs +++ b/fighters/link/src/acmd/ground.rs @@ -1,101 +1,100 @@ - use super::*; -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 25, 0, 25, 2.5, 0.0, 3.0, 18.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 70, 25, 0, 30, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 25, 0, 25, 2.5, 0.0, 3.0, 18.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn attack_12 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 361, 25, 0, 25, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn attack_13 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 361, 70, 0, 70, 3.0, 11.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let nodes = ["head", "bust", "waist", "arml", "shoulderl", "armr", "shoulderr"]; // nodes that become intangible during the attack frame(lua_state, 7.0); - if is_excute(fighter) { - for node in nodes { HIT_NODE(fighter, Hash40::new(node), *HIT_STATUS_INVINCIBLE); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 55, 0, 80, 3.5, 0.0, 4.0, 6.0, Some(0.0), Some(12.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + for node in nodes { HIT_NODE(agent, Hash40::new(node), *HIT_STATUS_INVINCIBLE); } + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 55, 0, 80, 3.5, 0.0, 4.0, 6.0, Some(0.0), Some(12.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 65, 30, 0, 80, 6.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(5.75), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 65, 30, 0, 80, 6.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(5.75), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - for node in nodes { HIT_NODE(fighter, Hash40::new(node), *HIT_STATUS_NORMAL); } + for node in nodes { HIT_NODE(agent, Hash40::new(node), *HIT_STATUS_NORMAL); } } } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("shield"), 0, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("shield"), 0, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9, 2, 0, 180, 0, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9, 2, 0, 180, 0, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9.2, -1.0, 0, 0, 45, 0.85, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9.2, -1.0, 0, 0, 45, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); } frame(lua_state, 34.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } @@ -117,44 +116,43 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_walk_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attack11", attack_11) - .acmd("game_attack12", attack_12) - .acmd("game_attack13", attack_13) - .acmd("game_attackdash", game_attackdash) - .acmd("effect_attackdash", effect_attackdash) - .acmd("sound_attackdash", sound_attackdash) - .acmd("expression_attackdash", expression_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/link/src/acmd/mod.rs b/fighters/link/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/link/src/acmd/mod.rs +++ b/fighters/link/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/link/src/acmd/other.rs b/fighters/link/src/acmd/other.rs index 50bf0e202a..a3cae43b4a 100644 --- a/fighters/link/src/acmd/other.rs +++ b/fighters/link/src/acmd/other.rs @@ -1,250 +1,126 @@ - -use smash::app::sv_animcmd::THROW_ITEM_arg3; - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn appeal_hi_l(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn appeal_hi_r(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 0.5, 0, 20, 0, 10, 3.0, 7.4, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_link_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_link_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_link_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_link_step_left_l")); } } -unsafe extern "C" fn link_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn link_boomerang_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 29, 0, 91, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 37, 0, 74, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 44, 0, 55, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn link_boomerang_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_appealhil", appeal_hi_l) - .acmd("game_appealhir", appeal_hi_r) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", link_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("link_boomerang") - .acmd("game_fly", link_boomerang_fly_game) - .acmd("game_turn", link_boomerang_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", escape_air_slide_game); } diff --git a/fighters/link/src/acmd/smashes.rs b/fighters/link/src/acmd/smashes.rs index 14d6460656..ae5f487286 100644 --- a/fighters/link/src/acmd/smashes.rs +++ b/fighters/link/src/acmd/smashes.rs @@ -1,149 +1,144 @@ - use super::*; -unsafe extern "C" fn game_attacks4 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - FT_MOTION_RATE(fighter, 6.0/(14.0-10.0)); + FT_MOTION_RATE(agent, 6.0/(14.0-10.0)); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 60, 12, 0, 45, 3.0, 0.0, 8.5, 6.0, Some(0.0), Some(8.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 69, 12, 0, 45, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 60, 12, 0, 45, 3.0, 0.0, 8.5, 6.0, Some(0.0), Some(8.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if DamageModule::damage(boma, 0)==0.0 { ArticleModule::generate_article(boma,*FIGHTER_LINK_GENERATE_ARTICLE_SWORD_BEAM, false, 0); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn attack_s4_2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 50, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 50, 100, 0, 30, 3.0, 0.0, 9.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 50, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 50, 100, 0, 30, 3.0, 0.0, 9.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 18.0, 50, 100, 0, 30, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 4.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.0, 135, 100, 45, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.0, 135, 100, 45, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 3.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 3.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 3.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 3.0, 105, 100, 55, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 3.0, 115, 100, 38, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 3.0, 115, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 3.0, 107, 100, 28, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 3.0, 135, 100, 40, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 3.0, 135, 100, 40, 0, 3.0, 8.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 11.0, 80, 96, 0, 60, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 90, 96, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 90, 96, 0, 60, 4.5, 0.0, 11.0, -0.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 11.0, 80, 96, 0, 60, 4.0, 8.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 90, 96, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 90, 96, 0, 60, 4.5, 0.0, 11.0, -0.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_lw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 75, 88, 0, 40, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 14.0, 75, 88, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 16.0, 75, 88, 0, 40, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 75, 88, 0, 40, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 14.0, 75, 88, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 30, 60, 0, 80, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 30, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 30, 60, 0, 80, 3.5, 7.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 30, 60, 0, 80, 3.0, 1.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 30, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 12.0/(56.0-38.0)); + FT_MOTION_RATE(agent, 12.0/(56.0-38.0)); } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attacks4s2", attack_s4_2) - .acmd("game_attackhi4", attack_hi4) - .acmd("game_attacklw4", attack_lw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4s2", game_attacks4s2); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/link/src/acmd/specials.rs b/fighters/link/src/acmd/specials.rs index e9421e56d7..6fc96cb308 100644 --- a/fighters/link/src/acmd/specials.rs +++ b/fighters/link/src/acmd/specials.rs @@ -1,280 +1,275 @@ - use super::*; -unsafe extern "C" fn special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 7.0/(3.75-0.0)); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 7.0/(3.75-0.0)); frame(lua_state, 3.75); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 14.0, 40, 92, 0, 50, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 40, 92, 0, 52, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.0); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.0, 40, 100, 0, 40, 3.0, 8.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.0); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } - } -unsafe extern "C" fn special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.75, true); - FLASH(fighter, 1, 0.6, 0, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.75, true); + FLASH(agent, 1, 0.6, 0, 0.1); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 11, 0, -10, -120, 0, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 11, 0, -10, -120, 0, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 10, 180, 0, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 10, 180, 0, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, -250, 5, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, -250, 5, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, 0, 5, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, -10, 0, 5, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 0, -100, 10, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten"), Hash40::new("top"), 0, 10, 0, 0, -100, 10, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 44.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 5, 0, 0, 0, 0); - AFTER_IMAGE_OFF(fighter, 6); - EFFECT_OFF_KIND(fighter, Hash40::new("link_kaiten"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FLASH_FRM(agent, 5, 0, 0, 0, 0); + AFTER_IMAGE_OFF(agent, 6); + EFFECT_OFF_KIND(agent, Hash40::new("link_kaiten"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 47.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 52.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); - } -} - -unsafe extern "C" fn special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - FLASH(fighter, 1, 0.6, 0, 0.1); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 18, 0, 0, -90, 25, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, -20, -150, 30, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 17, 0, 0, -120, 20, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, 25, -170, 15, 0.75, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE_OFF(fighter, 4); - } - frame(lua_state, 53.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 5, 0, 0, 0, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("link_kaiten"), false, false); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("link_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); } } -unsafe extern "C" fn special_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 107, 0, 6.0, 0.0, 10.0, 14.5, Some(0.0), Some(10.0), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 107, 0, 6.0, 0.0, 10.0, 14.5, Some(0.0), Some(10.0), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.0, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.0, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 107, 0, 6.0, 0.0, 6.0, 15.0, Some(0.0), Some(7.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 107, 0, 6.0, 0.0, 6.0, 15.0, Some(0.0), Some(7.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.5, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 145, 100, 95, 0, 5.0, 0.0, 11.5, -12.5, Some(0.0), Some(11.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 83, 100, 71, 0, 6.0, 0.0, 10.0, 15.0, Some(0.0), Some(10.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 83, 100, 71, 0, 6.0, 0.0, 10.0, 15.0, Some(0.0), Some(10.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 150, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 150, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 69, 100, 62, 0, 7.0, 0.0, 14.0, 12.5, Some(0.0), Some(12.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 69, 100, 62, 0, 7.0, 0.0, 14.0, 12.5, Some(0.0), Some(12.5), Some(8.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 160, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 160, 100, 95, 0, 5.0, 2.0, 0.0, 0.0, Some(5.5), Some(0.0), Some(0.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); let hit1 = Vector2f { x: 10.0, y: 20.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 7.5, 14.0, Some(0.0), Some(9.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 7.5, 14.0, Some(0.0), Some(9.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 13.0, 15.5, Some(0.0), Some(12.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 13.0, 15.5, Some(0.0), Some(12.5), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 49.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 19.0, 12.5, Some(0.0), Some(14.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 210, 0, 30, 7.5, 0.0, 19.0, 12.5, Some(0.0), Some(14.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_specialhi", special_hi) - .acmd("effect_specialhi", special_hi_effect) - .acmd("effect_specialairhi", special_air_hi_effect) - .acmd("game_specialairhi", special_air_hi) - .install(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 4, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("link_sword_flare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + FLASH(agent, 1, 0.6, 0, 0.1); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 18, 0, 0, -90, 25, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, -20, -150, 30, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 17, 0, 0, -120, 20, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("link_kaiten_air"), Hash40::new("top"), 0, 16, 0, 25, -170, 15, 0.75, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + } + frame(lua_state, 42.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 44.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_link_sword1"), Hash40::new("tex_link_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 14.6, 0.2, -0.2, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + } + frame(lua_state, 49.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE_OFF(agent, 4); + } + frame(lua_state, 53.0); + if is_excute(agent) { + FLASH_FRM(agent, 5, 0, 0, 0, 0); + EFFECT_OFF_KIND(agent, Hash40::new("link_kaiten"), false, false); + } + frame(lua_state, 54.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("link_sword_flare"), false, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); } diff --git a/fighters/link/src/acmd/throws.rs b/fighters/link/src/acmd/throws.rs index e4b2a6f36e..2d5358db87 100644 --- a/fighters/link/src/acmd/throws.rs +++ b/fighters/link/src/acmd/throws.rs @@ -1,104 +1,99 @@ - use super::*; -unsafe extern "C" fn catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(8.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(8.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn catch_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 2.7, Some(0.0), Some(7.0), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 2.7, Some(0.0), Some(7.0), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn catch_turn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-14.85), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-14.85), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.5, 110, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.5, 110, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 361, 55, 0, 55, 3.5, 3.5, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -18.0, 12.0); + CHECK_FINISH_CAMERA(agent, -18.0, 12.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.25); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_catch", catch) - .acmd("game_catchdash", catch_dash) - .acmd("game_catchturn", catch_turn) - .acmd("game_throwb", game_throwb) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/link/src/acmd/tilts.rs b/fighters/link/src/acmd/tilts.rs index 8b37f9adc4..b092cd32a6 100644 --- a/fighters/link/src/acmd/tilts.rs +++ b/fighters/link/src/acmd/tilts.rs @@ -1,105 +1,101 @@ - use super::*; -unsafe extern "C" fn attack_s3_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 8.0/(13.0-3.0)); + FT_MOTION_RATE(agent, 8.0/(13.0-3.0)); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0/(16.0-15.0)); + FT_MOTION_RATE(agent, 2.0/(16.0-15.0)); frame(lua_state, 15.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 35, 90, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 14.0, 361, 86, 0, 55, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 35, 90, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 35, 90, 0, 35, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 14.0, 361, 86, 0, 55, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_hi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 85, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 4.25, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 95, 105, 0, 40, 3.5, 8.5, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 85, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 85, 105, 0, 40, 3.5, 4.25, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 95, 105, 0, 40, 3.5, 8.5, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn attack_lw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.69/(11.0-1.0)); + FT_MOTION_RATE(agent, 7.69/(11.0-1.0)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 80, 30, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 80, 30, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 4.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 80, 30, 0, 85, 3.5, 8.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 280, 43, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 280, 43, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 11.0, 280, 43, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn expression_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -pub fn install() { - smashline::Agent::new("link") - .acmd("game_attacks3", attack_s3_s) - .acmd("game_attackhi3", attack_hi3) - .acmd("game_attacklw3", attack_lw3) - .acmd("expression_attacklw3", expression_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/link/src/boomerang/acmd/mod.rs b/fighters/link/src/boomerang/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/link/src/boomerang/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/link/src/boomerang/acmd/specials.rs b/fighters/link/src/boomerang/acmd/specials.rs new file mode 100644 index 0000000000..20c856a879 --- /dev/null +++ b/fighters/link/src/boomerang/acmd/specials.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 29, 0, 91, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 37, 0, 74, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 44, 0, 55, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_turn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_turn", game_turn); +} diff --git a/fighters/link/src/boomerang/mod.rs b/fighters/link/src/boomerang/mod.rs new file mode 100644 index 0000000000..40fc9ca15a --- /dev/null +++ b/fighters/link/src/boomerang/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("link_boomerang"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/link/src/lib.rs b/fighters/link/src/lib.rs index 5537dac979..3ceda60b35 100644 --- a/fighters/link/src/lib.rs +++ b/fighters/link/src/lib.rs @@ -7,6 +7,10 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod boomerang: + use smash::{ lib::{ L2CValue, @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("link"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + boomerang::install(); } \ No newline at end of file diff --git a/fighters/link/src/opff.rs b/fighters/link/src/opff.rs index e220267689..b6ab0306e9 100644 --- a/fighters/link/src/opff.rs +++ b/fighters/link/src/opff.rs @@ -3,8 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - - unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { if situation_kind == *SITUATION_KIND_AIR { @@ -147,8 +145,7 @@ pub unsafe fn link_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("link") - .on_line(Main, link_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, link_frame_wrapper); } diff --git a/fighters/link/src/status.rs b/fighters/link/src/status.rs index 28934252d9..33a892d007 100644 --- a/fighters/link/src/status.rs +++ b/fighters/link/src/status.rs @@ -1,1011 +1,10 @@ use super::*; use globals::*; -// status script import -// FIGHTER_STATUS_KIND_SPECIAL_HI // +mod special_n; +mod special_hi; -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - } - let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 - } else { - 0 as u64 - }; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - 0, - 0, - 0, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - let rslash_landing_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_landing_frame")); - WorkModule::set_float(fighter.module_accessor, rslash_landing_frame as f32, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let rslash_charge_spd = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); - - MotionModule::set_rate(fighter.module_accessor, rslash_charge_spd); - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if !StatusModule::is_changing(fighter.module_accessor) { - if MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); - return 1.into(); - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { - if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), - L2CValue::Bool(true) - ); - return 1.into(); - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), - L2CValue::Bool(false) - ); - return 1.into(); - } - } - } - else if !link_situation_helper(fighter).get_bool() || fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if !link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { - return 0.into(); - } - } - else if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { - return 0.into(); - } - } - if StatusModule::is_changing(fighter.module_accessor) { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - } - return fighter.fastshift(L2CValue::Ptr(sub_specialhi_Main as *const () as _)); - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_GROUND)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_start"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); - } - 0.into() -} - -unsafe extern "C" fn sub_specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { - if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), - L2CValue::Bool(true) - ); - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - } - else { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X) { - if KineticModule::get_kinetic_type(fighter.module_accessor) == *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI { - let rslash_end_air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_accel_x_mul")); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI, rslash_end_air_accel_x_mul); - app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); - let rslash_air_max_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_air_max_x_mul")); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let rslash_end_air_max_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_max_x")); - let mul_x_speed_max = ((rslash_end_air_max_x / air_speed_x_stable) / rslash_air_max_x_mul); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, mul_x_speed_max); - app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); - return 0.into() - } - } - return 0.into() - } - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - } - } - 0.into() -} - -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD - -pub unsafe extern "C" fn special_hi_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_hold"), 0.0, 1.0, false, 0.0, false, false); - if !StopModule::is_stop(fighter.module_accessor) { - sub_special_hi_hold(fighter, L2CValue::Bool(false)); - } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_hold as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_hold_main_loop as *const () as _)) -} - -unsafe extern "C" fn sub_special_hi_hold(fighter: &mut L2CFighterCommon, arg2: L2CValue) -> L2CValue { - if !arg2.get_bool() { - return 0.into(); - } - let rslash_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); - WorkModule::add_float(fighter.module_accessor, 1.0 / rslash_charge_spd_div, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - let rslash_hold_frame_max = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_hold_frame")); - if !MotionModule::is_end(fighter.module_accessor) { - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - let frame = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); - if frame < rslash_hold_frame_max as f32 { - return 0.into(); - } - } - } - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, true); - 1.into() -} - -unsafe extern "C" fn special_hi_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); - return 1.into(); - } - 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - } - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.55; - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if !StatusModule::is_changing(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); - return 0.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - return 0.into() -} - -unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} - -// FIGHTER_STATUS_KIND_SPECIAL_N // - -pub unsafe extern "C" fn special_n(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); - WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_START, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_SHOOT_NUM); - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_DOUBLE_COUNT); - let max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); - if max_hold_frame < 0 { - WorkModule::set_int(fighter.module_accessor, -100, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); - } - else { - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); - } - if fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_KIRBY { - if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW) { - let copy_chara = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA); - if copy_chara == *FIGHTER_KIND_LINK { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, false, -1); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_status_exist(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, *WN_LINK_BOW_STATUS_KIND_HAVE); - } - } - } - if fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_LINK { - if ItemModule::is_have_item(fighter.module_accessor, 0) { - if ItemModule::get_have_item_kind(fighter.module_accessor, 0) == *ITEM_KIND_LINKARROW { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, false, -1); - } - } - } - fighter.sub_shift_status_main(L2CValue::Ptr(special_n_Main as *const () as _)) -} - -unsafe extern "C" fn special_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - let cat2 = fighter.global_table[0x21].get_int() as i32; - let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; - if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); - } - } - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if !StatusModule::is_changing(fighter.module_accessor) { - if !MotionModule::is_end(fighter.module_accessor) || (MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND) { - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL) { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING) { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING), - L2CValue::Bool(false) - ); - return 1.into() - } - } - //goto - else if !link_situation_helper(fighter).get_bool() || (link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND) { - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - sub_special_air_n_Main(fighter); - sub_special_n_Main_uniq(fighter); - return 0.into() - } - } - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - sub_special_n_Main(fighter); - } - } - sub_special_n_Main_uniq(fighter); - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - else { - if !link_situation_helper(fighter).get_bool() || (link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND) { - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - sub_special_air_n_Main(fighter); - sub_special_n_Main_uniq(fighter); - return 0.into() - } - } - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - sub_special_n_Main(fighter); - } - } - sub_special_n_Main_uniq(fighter); - return 0.into() - } - } - return 0.into() -} - -unsafe extern "C" fn sub_special_air_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - let cat2 = fighter.global_table[0x21].get_int() as i32; - let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; - if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); - } - } - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return L2CValue::I32(1) - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_START { - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { - return L2CValue::I32(0) - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_end"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_end"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); - special_n_helper(fighter); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_end"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); - } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); - } - fighter.fastshift(L2CValue::Ptr(sub_special_air_n_end as *const () as _)) - } - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); - } - fighter.fastshift(L2CValue::Ptr(sub_special_air_n as *const () as _)) - } - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_start"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_start"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_start"), 0.0, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_start"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); - } - fighter.fastshift(L2CValue::Ptr(sub_special_air_n_start as *const () as _)) - } - } - else { - return L2CValue::I32(0) - } -} - -unsafe extern "C" fn sub_special_air_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - let cat2 = fighter.global_table[0x21].get_int() as i32; - let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; - if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); - } - } - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - sub_special_n_end_uniq(fighter); - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } - else { - return 0.into() - } -} - -unsafe extern "C" fn sub_special_n_end_uniq(fighter: &mut L2CFighterCommon) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { - let mut second_bowarrow_interval_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("second_bowarrow_interval_frame")); - let mut bow_double_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_DOUBLE_COUNT); - if bow_double_count == second_bowarrow_interval_frame { - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), true); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); - ItemModule::remove_item(fighter.module_accessor, 0); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); - } - else { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); - } - } - } -} - -unsafe extern "C" fn sub_special_air_n(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - let cat2 = fighter.global_table[0x21].get_int() as i32; - let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; - if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); - } - } - let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); - let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) || max_hold_frame <= bow_max_hold_count { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { - return 0.into() - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - } - } - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } -} - -unsafe extern "C" fn sub_special_air_n_start(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - let cat2 = fighter.global_table[0x21].get_int() as i32; - let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; - if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); - } - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - } - else { - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } -} - -unsafe extern "C" fn sub_special_n_common(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - - if bow_step == *FIGHTER_LINK_STATUS_BOW_STEP_START { - if !ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - else if MotionModule::is_end(fighter.module_accessor) { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_HOLD, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - if fighter.global_table[FIGHTER_KIND].get_i32() != *FIGHTER_KIND_KIRBY { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new_raw(0x298585bf83)); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); - } - else { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new_raw(0x2ff4ab9a31)); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); - } - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE_MAX); - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - } - else if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) - } - else { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) - } - } - else { - let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); - let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - if max_hold_frame <= bow_max_hold_count { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - } - else { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) - } - } -} - -unsafe extern "C" fn sub_special_n_common_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { - sub_special_n_Main_uniq(fighter); - return 0.into() - } - else { - sub_special_air_n_Main(fighter); - } - } - else { - sub_special_n_Main(fighter); - } - sub_special_n_Main_uniq(fighter); - return 0.into() -} - -unsafe extern "C" fn sub_special_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return L2CValue::I32(1) - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_START { - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { - if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { - return L2CValue::I32(0) - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_end"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_end"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_end"), 0.0, 1.0, false, 0.0, false, false); - special_n_helper(fighter); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_end"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); - } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); - } - fighter.fastshift(L2CValue::Ptr(sub_special_n_end as *const () as _)) - } - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n"), 0.0, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); - } - fighter.fastshift(L2CValue::Ptr(sub_special_n as *const () as _)) - } - } - else { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_start"), -1.0, 1.0, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_start"), true, -1.0); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_start"), 0.0, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_start"), false, -1.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); - } - fighter.fastshift(L2CValue::Ptr(sub_special_n_start as *const () as _)) - } - } - else { - return L2CValue::I32(0) - } -} - -unsafe extern "C" fn sub_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - sub_special_n_end_uniq(fighter); - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } - else { - return 0.into() - } -} - -unsafe extern "C" fn sub_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); - let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) || max_hold_frame <= bow_max_hold_count { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_AIR { - return 0.into() - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - } - } - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } -} - -unsafe extern "C" fn sub_special_n_start(fighter: &mut L2CFighterCommon) -> L2CValue { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { - if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } - else { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - } - else { - if MotionModule::is_end(fighter.module_accessor) { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - if !link_situation_helper(fighter).get_bool() { - return 0.into() - } - else { - if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { - fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) - } - else { - return 0.into() - } - } - } - } -} - -unsafe extern "C" fn sub_special_n_Main_uniq(fighter: &mut L2CFighterCommon) { - let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); - if bow_step == *FIGHTER_LINK_STATUS_BOW_STEP_START { - let mut bow_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("bow_charge_spd_div")); - let mut bow_bend_rate = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("bow_bend_rate")); - MotionModule::set_rate(fighter.module_accessor, (bow_bend_rate / bow_charge_spd_div)); - } - if !fighter.global_table[IS_STOPPING].get_bool() { - if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - } - else { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_AIR_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - } - } -} - -unsafe extern "C" fn special_n_helper(fighter: &mut L2CFighterCommon) { - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_FIRST), true); -} - -pub fn install() { - smashline::Agent::new("link") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, specialhi) - .status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_main) - .status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end) - .status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, specialhi_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/link/src/status/special_hi.rs b/fighters/link/src/status/special_hi.rs new file mode 100644 index 0000000000..9f208f7e35 --- /dev/null +++ b/fighters/link/src/status/special_hi.rs @@ -0,0 +1,401 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + } + let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 + } else { + 0 as u64 + }; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + 0, + 0, + 0, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + let rslash_landing_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_landing_frame")); + WorkModule::set_float(fighter.module_accessor, rslash_landing_frame as f32, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let rslash_charge_spd = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); + + MotionModule::set_rate(fighter.module_accessor, rslash_charge_spd); + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if !StatusModule::is_changing(fighter.module_accessor) { + if MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); + return 1.into(); + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { + if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), + L2CValue::Bool(true) + ); + return 1.into(); + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), + L2CValue::Bool(false) + ); + return 1.into(); + } + } + } + else if !link_situation_helper(fighter).get_bool() || fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if !link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { + return 0.into(); + } + } + else if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_AIR { + return 0.into(); + } + } + if StatusModule::is_changing(fighter.module_accessor) { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END); + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + } + return fighter.fastshift(L2CValue::Ptr(sub_specialhi_Main as *const () as _)); + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_GROUND)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_start"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_GROUND); + } + 0.into() +} + +unsafe extern "C" fn sub_specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_HOLD) { + if MotionModule::is_end(fighter.module_accessor) && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD), + L2CValue::Bool(true) + ); + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_TRANSITION_TERM_ID_END) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + } + else { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X) { + if KineticModule::get_kinetic_type(fighter.module_accessor) == *FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI { + let rslash_end_air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_accel_x_mul")); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_TYPE_LINK_SPECIAL_AIR_HI, rslash_end_air_accel_x_mul); + app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); + let rslash_air_max_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_air_max_x_mul")); + let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let rslash_end_air_max_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_end_air_max_x")); + let mul_x_speed_max = ((rslash_end_air_max_x / air_speed_x_stable) / rslash_air_max_x_mul); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, mul_x_speed_max); + app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); + return 0.into() + } + } + return 0.into() + } + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + } + } + 0.into() +} + +unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD + +pub unsafe extern "C" fn special_hi_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_hold"), 0.0, 1.0, false, 0.0, false, false); + if !StopModule::is_stop(fighter.module_accessor) { + sub_special_hi_hold(fighter, L2CValue::Bool(false)); + } + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_hold as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_hold_main_loop as *const () as _)) +} + +unsafe extern "C" fn sub_special_hi_hold(fighter: &mut L2CFighterCommon, arg2: L2CValue) -> L2CValue { + if !arg2.get_bool() { + return 0.into(); + } + let rslash_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_charge_spd_div")); + WorkModule::add_float(fighter.module_accessor, 1.0 / rslash_charge_spd_div, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + let rslash_hold_frame_max = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("rslash_hold_frame")); + if !MotionModule::is_end(fighter.module_accessor) { + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + let frame = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_WORK_HOLD_FRAME); + if frame < rslash_hold_frame_max as f32 { + return 0.into(); + } + } + } + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, true); + 1.into() +} + +unsafe extern "C" fn special_hi_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + fighter.change_status_req(*FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, false); + return 1.into(); + } + 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // + +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.55; + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if !StatusModule::is_changing(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); + return 0.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_main); + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); +} \ No newline at end of file diff --git a/fighters/link/src/status/special_n.rs b/fighters/link/src/status/special_n.rs new file mode 100644 index 0000000000..21c807e10f --- /dev/null +++ b/fighters/link/src/status/special_n.rs @@ -0,0 +1,612 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N + +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_START, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_SHOOT_NUM); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_DOUBLE_COUNT); + let max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); + if max_hold_frame < 0 { + WorkModule::set_int(fighter.module_accessor, -100, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); + } + else { + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); + } + if fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_KIRBY { + if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW) { + let copy_chara = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA); + if copy_chara == *FIGHTER_KIND_LINK { + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, false, -1); + ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_status_exist(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, *WN_LINK_BOW_STATUS_KIND_HAVE); + } + } + } + if fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_LINK { + if ItemModule::is_have_item(fighter.module_accessor, 0) { + if ItemModule::get_have_item_kind(fighter.module_accessor, 0) == *ITEM_KIND_LINKARROW { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, false, -1); + } + } + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + let cat2 = fighter.global_table[0x21].get_int() as i32; + let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; + if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); + } + } + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if !StatusModule::is_changing(fighter.module_accessor) { + if !MotionModule::is_end(fighter.module_accessor) || (MotionModule::is_end(fighter.module_accessor) && fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND) { + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL) { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING) { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING), + L2CValue::Bool(false) + ); + return 1.into() + } + } + //goto + else if !link_situation_helper(fighter).get_bool() || (link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND) { + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + sub_special_air_n_Main(fighter); + sub_special_n_Main_uniq(fighter); + return 0.into() + } + } + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + sub_special_n_Main(fighter); + } + } + sub_special_n_Main_uniq(fighter); + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + else { + if !link_situation_helper(fighter).get_bool() || (link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND) { + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + sub_special_air_n_Main(fighter); + sub_special_n_Main_uniq(fighter); + return 0.into() + } + } + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + sub_special_n_Main(fighter); + } + } + sub_special_n_Main_uniq(fighter); + return 0.into() + } + } + return 0.into() +} + +unsafe extern "C" fn sub_special_air_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + let cat2 = fighter.global_table[0x21].get_int() as i32; + let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; + if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); + } + } + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return L2CValue::I32(1) + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_START { + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { + return L2CValue::I32(0) + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_end"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_end"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); + special_n_helper(fighter); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_end"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); + } + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); + } + fighter.fastshift(L2CValue::Ptr(sub_special_air_n_end as *const () as _)) + } + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); + } + fighter.fastshift(L2CValue::Ptr(sub_special_air_n as *const () as _)) + } + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_start"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_start"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_start"), 0.0, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_air_start"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); + } + fighter.fastshift(L2CValue::Ptr(sub_special_air_n_start as *const () as _)) + } + } + else { + return L2CValue::I32(0) + } +} + +unsafe extern "C" fn sub_special_air_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + let cat2 = fighter.global_table[0x21].get_int() as i32; + let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; + if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); + } + } + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + sub_special_n_end_uniq(fighter); + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } + else { + return 0.into() + } +} + +unsafe extern "C" fn sub_special_n_end_uniq(fighter: &mut L2CFighterCommon) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { + let mut second_bowarrow_interval_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("second_bowarrow_interval_frame")); + let mut bow_double_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_DOUBLE_COUNT); + if bow_double_count == second_bowarrow_interval_frame { + ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), true); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE); + ItemModule::remove_item(fighter.module_accessor, 0); + fighter.clear_lua_stack(); + lua_args!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); + } + else { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); + } + } + } +} + +unsafe extern "C" fn sub_special_air_n(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + let cat2 = fighter.global_table[0x21].get_int() as i32; + let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; + if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); + } + } + let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); + let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) || max_hold_frame <= bow_max_hold_count { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { + return 0.into() + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + } + } + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } +} + +unsafe extern "C" fn sub_special_air_n_start(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + let cat2 = fighter.global_table[0x21].get_int() as i32; + let is_not_fastfall = cat2 & *FIGHTER_PAD_CMD_CAT2_FLAG_FALL_JUMP != 0; + if is_not_fastfall && fighter.global_table[STICK_Y].get_f32() < -0.66 && KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + WorkModule::set_flag(fighter.module_accessor, true, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE); + } + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + } + else { + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } +} + +unsafe extern "C" fn sub_special_n_common(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + + if bow_step == *FIGHTER_LINK_STATUS_BOW_STEP_START { + if !ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + else if MotionModule::is_end(fighter.module_accessor) { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_HOLD, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + if fighter.global_table[FIGHTER_KIND].get_i32() != *FIGHTER_KIND_KIRBY { + fighter.clear_lua_stack(); + lua_args!(fighter, Hash40::new_raw(0x298585bf83)); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); + } + else { + fighter.clear_lua_stack(); + lua_args!(fighter, Hash40::new_raw(0x2ff4ab9a31)); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); + } + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE_MAX); + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + } + else if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { + fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + } + else { + fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + } + } + else { + let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); + let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if max_hold_frame <= bow_max_hold_count { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + } + else { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_STEP_END, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + fighter.fastshift(L2CValue::Ptr(sub_special_n_common_uniq as *const () as _)) + } + } +} + +unsafe extern "C" fn sub_special_n_common_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_GROUND { + sub_special_n_Main_uniq(fighter); + return 0.into() + } + else { + sub_special_air_n_Main(fighter); + } + } + else { + sub_special_n_Main(fighter); + } + sub_special_n_Main_uniq(fighter); + return 0.into() +} + +unsafe extern "C" fn sub_special_n_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return L2CValue::I32(1) + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_START { + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { + if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { + return L2CValue::I32(0) + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_end"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_end"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_end"), 0.0, 1.0, false, 0.0, false, false); + special_n_helper(fighter); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_end"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_END); + } + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_DOUBLE) { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); + } + fighter.fastshift(L2CValue::Ptr(sub_special_n_end as *const () as _)) + } + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n"), 0.0, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE); + } + fighter.fastshift(L2CValue::Ptr(sub_special_n as *const () as _)) + } + } + else { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_start"), -1.0, 1.0, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_start"), true, -1.0); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_start"), 0.0, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, Hash40::new("n_start"), false, -1.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CONTINUE_START); + } + fighter.fastshift(L2CValue::Ptr(sub_special_n_start as *const () as _)) + } + } + else { + return L2CValue::I32(0) + } +} + +unsafe extern "C" fn sub_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + sub_special_n_end_uniq(fighter); + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } + else { + return 0.into() + } +} + +unsafe extern "C" fn sub_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut bow_max_hold_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_MAX_HOLD_COUNT); + let mut max_hold_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_hold_frame")); + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) || max_hold_frame <= bow_max_hold_count { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] != *SITUATION_KIND_AIR { + return 0.into() + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + } + } + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } +} + +unsafe extern "C" fn sub_special_n_start(fighter: &mut L2CFighterCommon) -> L2CValue { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_FLAG_CHARGE) { + if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } + else { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + } + else { + if MotionModule::is_end(fighter.module_accessor) { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + if !link_situation_helper(fighter).get_bool() { + return 0.into() + } + else { + if fighter.global_table[SITUATION_KIND] == *SITUATION_KIND_AIR { + fighter.fastshift(L2CValue::Ptr(sub_special_n_common as *const () as _)) + } + else { + return 0.into() + } + } + } + } +} + +unsafe extern "C" fn sub_special_n_Main_uniq(fighter: &mut L2CFighterCommon) { + let mut bow_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LINK_STATUS_BOW_WORK_INT_STEP); + if bow_step == *FIGHTER_LINK_STATUS_BOW_STEP_START { + let mut bow_charge_spd_div = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("bow_charge_spd_div")); + let mut bow_bend_rate = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("bow_bend_rate")); + MotionModule::set_rate(fighter.module_accessor, (bow_bend_rate / bow_charge_spd_div)); + } + if !fighter.global_table[IS_STOPPING].get_bool() { + if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + } + else { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_AIR_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + } + } +} + +unsafe extern "C" fn special_n_helper(fighter: &mut L2CFighterCommon) { + ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_FIRST), true); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); +} \ No newline at end of file diff --git a/fighters/trail/src/acmd/other.rs b/fighters/trail/src/acmd/other.rs index c64f203d54..97244d3a42 100644 --- a/fighters/trail/src/acmd/other.rs +++ b/fighters/trail/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -209,11 +134,11 @@ unsafe extern "C" fn sound_run(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("game_catch", game_catch); diff --git a/fighters/wolf/src/acmd/other.rs b/fighters/wolf/src/acmd/other.rs index 00c884ad5e..672fe2f52a 100644 --- a/fighters/wolf/src/acmd/other.rs +++ b/fighters/wolf/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -206,11 +131,11 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("game_catch", game_catch); From f95d195f5799e0be195ada3c1d079da854cb02b1 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 13:36:57 -0500 Subject: [PATCH 016/172] i may not be smart --- fighters/link/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/link/src/lib.rs b/fighters/link/src/lib.rs index 3ceda60b35..eb3b99d89c 100644 --- a/fighters/link/src/lib.rs +++ b/fighters/link/src/lib.rs @@ -9,7 +9,7 @@ pub mod opff; // articles -mod boomerang: +mod boomerang; use smash::{ lib::{ From 49a8b41c9aba5598498e3fd35d8b9ea1d50db521 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 15 Mar 2024 13:45:49 -0500 Subject: [PATCH 017/172] more fixes --- fighters/link/src/acmd/other.rs | 2 +- fighters/link/src/status/special_n.rs | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/fighters/link/src/acmd/other.rs b/fighters/link/src/acmd/other.rs index a3cae43b4a..a236695946 100644 --- a/fighters/link/src/acmd/other.rs +++ b/fighters/link/src/acmd/other.rs @@ -122,5 +122,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/link/src/status/special_n.rs b/fighters/link/src/status/special_n.rs index 21c807e10f..655c069212 100644 --- a/fighters/link/src/status/special_n.rs +++ b/fighters/link/src/status/special_n.rs @@ -377,10 +377,10 @@ unsafe extern "C" fn sub_special_n_common(fighter: &mut L2CFighterCommon) -> L2C } else if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_HOLD { if bow_step != *FIGHTER_LINK_STATUS_BOW_STEP_END { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + fighter.fastshift(L2CValue::Ptr(special_n_main_loop as *const () as _)) } else { - fighter.fastshift(L2CValue::Ptr(special_n_Main as *const () as _)) + fighter.fastshift(L2CValue::Ptr(special_n_main_loop as *const () as _)) } } else { @@ -601,6 +601,21 @@ unsafe extern "C" fn sub_special_n_Main_uniq(fighter: &mut L2CFighterCommon) { } } +unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + unsafe extern "C" fn special_n_helper(fighter: &mut L2CFighterCommon) { ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); From ec60a0abb1dd57c39aeea70ac0a2e16416df91d2 Mon Sep 17 00:00:00 2001 From: SirTanknSpank <115139386+SirTanknSpank@users.noreply.github.com> Date: Sat, 16 Mar 2024 21:27:57 -0500 Subject: [PATCH 018/172] forgor acmd and statuses --- fighters/dedede/src/acmd/aerials.rs | 60 +++++----- fighters/dedede/src/acmd/ground.rs | 20 ++-- fighters/dedede/src/acmd/other.rs | 48 ++++---- fighters/dedede/src/acmd/smashes.rs | 12 +- fighters/dedede/src/acmd/specials.rs | 134 +++++++++++------------ fighters/dedede/src/acmd/tilts.rs | 24 ++-- fighters/dedede/src/status.rs | 23 +--- fighters/dedede/src/status/special_hi.rs | 14 +++ fighters/dedede/src/status/special_lw.rs | 14 +++ 9 files changed, 183 insertions(+), 166 deletions(-) create mode 100644 fighters/dedede/src/status/special_hi.rs create mode 100644 fighters/dedede/src/status/special_lw.rs diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index 4f92da6f16..d828d1c10a 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dedede_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -35,7 +35,7 @@ unsafe extern "C" fn dedede_attack_air_n_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_landing_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -49,7 +49,7 @@ unsafe extern "C" fn dedede_landing_air_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -79,7 +79,7 @@ unsafe extern "C" fn dedede_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -113,7 +113,7 @@ unsafe extern "C" fn dedede_attack_air_f_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -126,7 +126,7 @@ unsafe extern "C" fn dedede_attack_air_f_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_landing_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -140,7 +140,7 @@ unsafe extern "C" fn dedede_landing_air_f_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -174,7 +174,7 @@ unsafe extern "C" fn dedede_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -185,7 +185,7 @@ unsafe extern "C" fn dedede_attack_air_b_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_air_b_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -196,7 +196,7 @@ unsafe extern "C" fn dedede_attack_air_b_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_air_b_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -209,7 +209,7 @@ unsafe extern "C" fn dedede_attack_air_b_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_landing_air_b_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -223,7 +223,7 @@ unsafe extern "C" fn dedede_landing_air_b_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -265,7 +265,7 @@ unsafe extern "C" fn dedede_attack_air_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_landing_air_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -275,7 +275,7 @@ unsafe extern "C" fn dedede_landing_air_hi_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn dedede_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -319,7 +319,7 @@ unsafe extern "C" fn dedede_attack_air_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_landing_air_lw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -330,23 +330,23 @@ unsafe extern "C" fn dedede_landing_air_lw_expression(agent: &mut L2CAgentBase) } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", dedede_attack_air_n_game); - agent.acmd("expression_landingairn", dedede_landing_air_n_expression); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_landingairn", expression_landingairn); - agent.acmd("game_attackairf", dedede_attack_air_f_game); - agent.acmd("effect_attackairf", dedede_attack_air_f_effect); - agent.acmd("expression_attackairf", dedede_attack_air_f_expression); - agent.acmd("expression_landingairf", dedede_landing_air_f_expression); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("expression_landingairf", expression_landingairf); - agent.acmd("game_attackairb", dedede_attack_air_b_game); - agent.acmd("effect_attackairb", dedede_attack_air_b_effect); - agent.acmd("sound_attackairb", dedede_attack_air_b_sound); - agent.acmd("expression_attackairb", dedede_attack_air_b_expression); - agent.acmd("expression_landingairb", dedede_landing_air_b_expression); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("expression_landingairb", expression_landingairb); - agent.acmd("game_attackairhi", dedede_attack_air_hi_game); - agent.acmd("expression_landingairhi", dedede_landing_air_hi_expression); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_landingairhi", expression_landingairhi); - agent.acmd("game_attackairlw", dedede_attack_air_lw_game); - agent.acmd("expression_landingairlw", dedede_landing_air_lw_expression); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/dedede/src/acmd/ground.rs b/fighters/dedede/src/acmd/ground.rs index 8188c837a0..27cc48131f 100644 --- a/fighters/dedede/src/acmd/ground.rs +++ b/fighters/dedede/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dedede_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -35,7 +35,7 @@ unsafe extern "C" fn dedede_attack_11_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -70,7 +70,7 @@ unsafe extern "C" fn dedede_attack_12_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.86); @@ -97,7 +97,7 @@ unsafe extern "C" fn dedede_attack_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_100_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -111,7 +111,7 @@ unsafe extern "C" fn dedede_attack_100_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_100_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -136,12 +136,12 @@ unsafe extern "C" fn dedede_attack_100_end_effect(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", dedede_attack_11_game); + agent.acmd("game_attack11", game_attack11); - agent.acmd("game_attack12", dedede_attack_12_game); + agent.acmd("game_attack12", game_attack12); - agent.acmd("game_attackdash", dedede_attack_dash_game); + agent.acmd("game_attackdash", game_attackdash); - agent.acmd("game_attack100end", dedede_attack_100_end_game); - agent.acmd("effect_attack100end", dedede_attack_100_end_effect); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("effect_attack100end", effect_attack100end); } diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index 921038ecf9..fbc09563b9 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -128,7 +128,7 @@ unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -158,7 +158,7 @@ unsafe extern "C" fn dedede_catch_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -172,7 +172,7 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -186,7 +186,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -200,7 +200,7 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -218,7 +218,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -235,7 +235,7 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn landing_fall_special_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_landingfallspecial(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -244,28 +244,28 @@ unsafe extern "C" fn landing_fall_special_sound(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", damageflyhi_sound); + agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", damageflylw_sound); + agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", damageflyn_sound); + agent.acmd("sound_damageflyn", sound_damageflyn); - agent.acmd("sound_damageflyroll", damageflyroll_sound); + agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", damageflytop_sound); + agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("expression_landingheavy", expression_landingheavy); - agent.acmd("game_catch", dedede_catch_game); + agent.acmd("game_catch", game_catch); - agent.acmd("game_dash", dash_game); - agent.acmd("sound_dash", dash_sound); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", turn_dash_game); + agent.acmd("game_turndash", game_turndash); - agent.acmd("game_escapeair", escape_air_game); + agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("sound_landingfallspecial", landing_fall_special_sound); + agent.acmd("sound_landingfallspecial", sound_landingfallspecial); } diff --git a/fighters/dedede/src/acmd/smashes.rs b/fighters/dedede/src/acmd/smashes.rs index 6ecbb740b5..23f498e071 100644 --- a/fighters/dedede/src/acmd/smashes.rs +++ b/fighters/dedede/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dedede_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 34.0); @@ -38,7 +38,7 @@ unsafe extern "C" fn dedede_attack_s4_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -68,7 +68,7 @@ unsafe extern "C" fn dedede_attack_hi4_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -102,9 +102,9 @@ unsafe extern "C" fn dedede_attack_lw4_game(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", dedede_attack_s4_s_game); + agent.acmd("game_attacks4", game_attacks4); - agent.acmd("game_attackhi4", dedede_attack_hi4_game); + agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attacklw4", dedede_attack_lw4_game); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/dedede/src/acmd/specials.rs b/fighters/dedede/src/acmd/specials.rs index 58a2048de9..d08fce08ef 100644 --- a/fighters/dedede/src/acmd/specials.rs +++ b/fighters/dedede/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dedede_special_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -10,7 +10,7 @@ unsafe extern "C" fn dedede_special_n_start_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn dedede_special_n_loop_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -41,14 +41,14 @@ unsafe extern "C" fn dedede_special_n_loop_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_n_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); } -unsafe extern "C" fn dedede_special_air_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -58,7 +58,7 @@ unsafe extern "C" fn dedede_special_air_n_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_special_air_n_loop_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairnloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -89,14 +89,14 @@ unsafe extern "C" fn dedede_special_air_n_loop_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_n_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 25.0 / (19.0-1.0)); } -unsafe extern "C" fn dedede_special_s_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -114,7 +114,7 @@ unsafe extern "C" fn dedede_special_s_start_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 35.0 / (65.0-26.0)); } -unsafe extern "C" fn dedede_special_s_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -138,7 +138,7 @@ unsafe extern "C" fn dedede_special_s_start_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_s_start_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 17.0); @@ -147,7 +147,7 @@ unsafe extern "C" fn dedede_special_s_start_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_s_start_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -161,7 +161,7 @@ unsafe extern "C" fn dedede_special_s_start_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn dedede_special_air_s_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -185,7 +185,7 @@ unsafe extern "C" fn dedede_special_air_s_start_effect(agent: &mut L2CAgentBase) } -unsafe extern "C" fn dedede_special_air_s_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -204,7 +204,7 @@ unsafe extern "C" fn dedede_special_air_s_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_special_air_s_start_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 17.0); @@ -213,7 +213,7 @@ unsafe extern "C" fn dedede_special_air_s_start_sound(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn dedede_special_air_s_start_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -227,7 +227,7 @@ unsafe extern "C" fn dedede_special_air_s_start_expression(agent: &mut L2CAgentB } } -unsafe extern "C" fn dedede_special_s_miss_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsmiss(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -239,7 +239,7 @@ unsafe extern "C" fn dedede_special_s_miss_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_s_miss_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsmiss(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -251,7 +251,7 @@ unsafe extern "C" fn dedede_special_air_s_miss_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_s_get_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -264,7 +264,7 @@ unsafe extern "C" fn dedede_special_s_get_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_s_get_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -279,7 +279,7 @@ unsafe extern "C" fn dedede_special_s_get_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_s_get_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -292,7 +292,7 @@ unsafe extern "C" fn dedede_special_s_get_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_s_get_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -305,7 +305,7 @@ unsafe extern "C" fn dedede_special_air_s_get_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_s_get_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -320,7 +320,7 @@ unsafe extern "C" fn dedede_special_air_s_get_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_s_get_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialairsget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -333,7 +333,7 @@ unsafe extern "C" fn dedede_special_air_s_get_expression(agent: &mut L2CAgentBas } } -unsafe extern "C" fn dedede_special_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -343,7 +343,7 @@ unsafe extern "C" fn dedede_special_lw_start_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -353,7 +353,7 @@ unsafe extern "C" fn dedede_special_air_lw_start_game(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn dedede_special_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); @@ -384,7 +384,7 @@ unsafe extern "C" fn dedede_special_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_lw_max_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwmax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); @@ -414,7 +414,7 @@ unsafe extern "C" fn dedede_special_lw_max_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let rush_speed = 0.6 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); @@ -445,7 +445,7 @@ unsafe extern "C" fn dedede_special_air_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_air_lw_max_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwmax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let rush_speed = 0.9 + 0.01*WorkModule::get_float(boma, *FIGHTER_DEDEDE_STATUS_JET_HAMMER_WORK_FLOAT_HOLD_COUNT); @@ -475,13 +475,13 @@ unsafe extern "C" fn dedede_special_air_lw_max_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_lw_jump_squat_game(agent: &mut L2CAgentBase){ +unsafe extern "C" fn game_speciallwjumpsquat(agent: &mut L2CAgentBase){ let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 5.0 / (8.0-1.0)); } -unsafe extern "C" fn dedede_special_hi_jump_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -511,7 +511,7 @@ unsafe extern "C" fn dedede_special_hi_jump_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_special_hi_landing_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhilanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -548,7 +548,7 @@ unsafe extern "C" fn dedede_special_hi_landing_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_special_hi_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhiturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 13.0 / (20.0 - 1.0)); @@ -574,56 +574,56 @@ unsafe extern "C" fn dedede_special_hi_turn_game(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialnstart", dedede_special_n_start_game); - agent.acmd("game_specialnloop", dedede_special_n_loop_game); - agent.acmd("game_specialnend", dedede_special_n_end_game); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialnend", game_specialnend); - agent.acmd("game_specialairnstart", dedede_special_air_n_start_game); - agent.acmd("game_specialairnloop", dedede_special_air_n_loop_game); - agent.acmd("game_specialairnend", dedede_special_air_n_end_game); + agent.acmd("game_specialairnstart", game_specialairnstart); + agent.acmd("game_specialairnloop", game_specialairnloop); + agent.acmd("game_specialairnend", game_specialairnend); - agent.acmd("game_specialsstart", dedede_special_s_start_game); - agent.acmd("effect_specialsstart", dedede_special_s_start_effect); - agent.acmd("sound_specialsstart", dedede_special_s_start_sound); - agent.acmd("expression_specialsstart", dedede_special_s_start_expression); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("sound_specialsstart", sound_specialsstart); + agent.acmd("expression_specialsstart", expression_specialsstart); - agent.acmd("effect_specialairsstart", dedede_special_air_s_start_effect); - agent.acmd("game_specialairsstart", dedede_special_air_s_start_game); - agent.acmd("sound_specialairsstart", dedede_special_air_s_start_sound); - agent.acmd("expression_specialairsstart", dedede_special_air_s_start_expression); + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("sound_specialairsstart", sound_specialairsstart); + agent.acmd("expression_specialairsstart", expression_specialairsstart); - agent.acmd("game_specialsmiss", dedede_special_s_miss_game); + agent.acmd("game_specialsmiss", game_specialsmiss); - agent.acmd("game_specialairsmiss", dedede_special_air_s_miss_game); + agent.acmd("game_specialairsmiss", game_specialairsmiss); - agent.acmd("game_specialsget", dedede_special_s_get_game); - agent.acmd("effect_specialsget", dedede_special_s_get_effect); - agent.acmd("expression_specialsget", dedede_special_s_get_expression); + agent.acmd("game_specialsget", game_specialsget); + agent.acmd("effect_specialsget", effect_specialsget); + agent.acmd("expression_specialsget", expression_specialsget); - agent.acmd("game_specialairsget", dedede_special_air_s_get_game); - agent.acmd("effect_specialairsget", dedede_special_air_s_get_effect); - agent.acmd("expression_specialairsget", dedede_special_air_s_get_expression); + agent.acmd("game_specialairsget", game_specialairsget); + agent.acmd("effect_specialairsget", effect_specialairsget); + agent.acmd("expression_specialairsget", expression_specialairsget); - agent.acmd("game_speciallwstart", dedede_special_lw_start_game); - agent.acmd("game_specialairlwstart", dedede_special_lw_start_game); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); - agent.acmd("game_specialairlwstart", dedede_special_air_lw_start_game); + agent.acmd("game_specialairlwstart", game_specialairlwstart); - agent.acmd("game_speciallw", dedede_special_lw_game); + agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_speciallwmax", dedede_special_lw_max_game); + agent.acmd("game_speciallwmax", game_speciallwmax); - agent.acmd("game_specialairlw", dedede_special_air_lw_game); + agent.acmd("game_specialairlw", game_specialairlw); - agent.acmd("game_specialairlwmax", dedede_special_air_lw_max_game); + agent.acmd("game_specialairlwmax", game_specialairlwmax); - agent.acmd("game_speciallwjumpsquat", dedede_special_lw_jump_squat_game); + agent.acmd("game_speciallwjumpsquat", game_speciallwjumpsquat); - agent.acmd("game_specialhijump", dedede_special_hi_jump_game); + agent.acmd("game_specialhijump", game_specialhijump); - agent.acmd("game_specialhilandingr", dedede_special_hi_landing_game); - agent.acmd("game_specialhilandingl", dedede_special_hi_landing_game); + agent.acmd("game_specialhilandingr", game_specialhilanding); + agent.acmd("game_specialhilandingl", game_specialhilanding); - agent.acmd("game_specialairhiturnl", dedede_special_hi_turn_game); - agent.acmd("game_specialairhiturnr", dedede_special_hi_turn_game); + agent.acmd("game_specialairhiturnl", game_specialairhiturn); + agent.acmd("game_specialairhiturnr", game_specialairhiturn); } diff --git a/fighters/dedede/src/acmd/tilts.rs b/fighters/dedede/src/acmd/tilts.rs index 83d47c3522..f874435208 100644 --- a/fighters/dedede/src/acmd/tilts.rs +++ b/fighters/dedede/src/acmd/tilts.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dedede_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -34,7 +34,7 @@ unsafe extern "C" fn dedede_attack_s3_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -60,7 +60,7 @@ unsafe extern "C" fn dedede_attack_hi3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -72,7 +72,7 @@ unsafe extern "C" fn dedede_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dedede_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -94,7 +94,7 @@ unsafe extern "C" fn dedede_attack_lw3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -105,7 +105,7 @@ unsafe extern "C" fn dedede_attack_lw3_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dedede_attack_lw3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -123,12 +123,12 @@ unsafe extern "C" fn dedede_attack_lw3_expression(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", dedede_attack_s3_s_game); + agent.acmd("game_attacks3", game_attacks3); - agent.acmd("game_attackhi3", dedede_attack_hi3_game); - agent.acmd("effect_attackhi3", dedede_attack_hi3_effect); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); - agent.acmd("game_attacklw3", dedede_attack_lw3_game); - agent.acmd("effect_attacklw3", dedede_attack_lw3_effect); - agent.acmd("expression_attacklw3", dedede_attack_lw3_expression); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status.rs index 4750316072..4375f08ea8 100644 --- a/fighters/dedede/src/status.rs +++ b/fighters/dedede/src/status.rs @@ -1,21 +1,8 @@ use super::*; use globals::*; -// Prevent going into air jet hammer when Special is released during Jumpsquat - -unsafe extern "C" fn special_lw_jump_squat_exec(agent: &mut L2CFighterCommon) -> L2CValue{ - if ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ - StatusModule::change_status_force(agent.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); - } - return 0.into(); -} - -unsafe extern "C" fn dedede_special_hi_status_main(agent: &mut L2CFighterCommon) -> L2CValue{ - MotionModule::change_motion(agent.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); - StatusModule::change_status_force(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); - - return 0.into(); -} +mod special_hi; +mod special_lw; unsafe extern "C" fn on_start(agent: &mut L2CFighterCommon){ VarModule::set_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); @@ -23,6 +10,8 @@ unsafe extern "C" fn on_start(agent: &mut L2CFighterCommon){ pub fn install(agent: &mut Agent) { agent.on_start(on_start); - agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec); - agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, dedede_special_hi_status_main); + + special_hi::install(agent); + + special_lw::install(agent); } \ No newline at end of file diff --git a/fighters/dedede/src/status/special_hi.rs b/fighters/dedede/src/status/special_hi.rs new file mode 100644 index 0000000000..a61e4bbb9f --- /dev/null +++ b/fighters/dedede/src/status/special_hi.rs @@ -0,0 +1,14 @@ +use super::*; +use globals::*; + + +unsafe extern "C" fn specialhifailure_main(agent: &mut L2CFighterCommon) -> L2CValue{ + MotionModule::change_motion(agent.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); + StatusModule::change_status_force(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); + + return 0.into(); +} + +pub fn install(agent: &mut Agent){ + agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, specialhifailure_main); +} \ No newline at end of file diff --git a/fighters/dedede/src/status/special_lw.rs b/fighters/dedede/src/status/special_lw.rs new file mode 100644 index 0000000000..aa45d67aaf --- /dev/null +++ b/fighters/dedede/src/status/special_lw.rs @@ -0,0 +1,14 @@ +use super::*; +use globals::*; + + +unsafe extern "C" fn speciallwjumpsquat_exec(agent: &mut L2CFighterCommon) -> L2CValue{ + if ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ + StatusModule::change_status_force(agent.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, speciallwjumpsquat_exec); +} \ No newline at end of file From 44b39a90d9222b7143472d8aed8afccdbb6db687 Mon Sep 17 00:00:00 2001 From: ethangarsia517 Date: Sun, 17 Mar 2024 02:44:38 -0500 Subject: [PATCH 019/172] kirbo 70 percent same as tank hopefully i did it right. not complete rn --- fighters/kirby/src/acmd/aerials.rs | 204 +-- fighters/kirby/src/acmd/ground.rs | 146 +- fighters/kirby/src/acmd/mod.rs | 2 - fighters/kirby/src/acmd/other.rs | 190 +-- fighters/kirby/src/acmd/smashes.rs | 478 +++---- fighters/kirby/src/acmd/specials.rs | 653 +++++---- fighters/kirby/src/acmd/throws.rs | 182 +-- fighters/kirby/src/acmd/tilts.rs | 94 +- .../copyspecials.rs => copyability/acmd.rs} | 0 fighters/kirby/src/copyability/mod.rs | 9 + fighters/kirby/src/copyability/opff.rs | 1263 +++++++++++++++++ fighters/kirby/src/lib.rs | 3 + fighters/kirby/src/opff.rs | 1164 --------------- fighters/kirby/src/status.rs | 2 +- .../kirby/src/status/gaogaen_special_n.rs | 8 +- fighters/kirby/src/status/koopa_special_n.rs | 16 +- .../kirby/src/status/littlemac_special_n.rs | 16 +- .../status/{sonic.rs => sonic_special_nrs} | 8 +- 18 files changed, 2272 insertions(+), 2166 deletions(-) rename fighters/kirby/src/{acmd/copyspecials.rs => copyability/acmd.rs} (100%) create mode 100644 fighters/kirby/src/copyability/mod.rs create mode 100644 fighters/kirby/src/copyability/opff.rs rename fighters/kirby/src/status/{sonic.rs => sonic_special_nrs} (96%) diff --git a/fighters/kirby/src/acmd/aerials.rs b/fighters/kirby/src/acmd/aerials.rs index ac49c5a3ff..658b8af416 100644 --- a/fighters/kirby/src/acmd/aerials.rs +++ b/fighters/kirby/src/acmd/aerials.rs @@ -1,204 +1,204 @@ use super::*; -unsafe extern "C" fn kirby_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.375); + FT_MOTION_RATE(agent, 0.375); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("toer"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("toel"), 12.0, 45, 97, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("toer"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("toel"), 9.0, 55, 95, 0, 15, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 35.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn kirby_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.77778); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.77778); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 39, 0, 43, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 38, 0, 35, 4.5, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 39, 0, 43, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 38, 0, 35, 4.5, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 2.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 2.5, 12.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 4.2, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 3.0, 12.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 4.2, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 146, 0, 0, 4.75, 0.0, 3.0, 12.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn kirby_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 14.0, 361, 108, 0, 15, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn kirby_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 4.5, 0, 180, 0, 0, 0.85, true, *EF_FLIP_YZ); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -14, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -14, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn kirby_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.0, 0.0, -5.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.0, 0.0, -5.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 70, 90, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn kirby_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 17.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 12.0); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 48, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 275, 36, 0, 40, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 48, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 275, 36, 0, 40, 5.0, 0.0, -2.4, 3.0, Some(0.0), Some(2.3), Some(0.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn kirby_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } pub fn install() { smashline::Agent::new("kirby") - .acmd("game_attackairn", kirby_attack_air_n_game) - .acmd("game_attackairf", kirby_attack_air_f_game) - .acmd("game_attackairb", kirby_attack_air_b_game) - .acmd("effect_attackairb", kirby_attack_air_b_effect) - .acmd("game_attackairhi", kirby_attack_air_hi_game) - .acmd("game_attackairlw", kirby_attack_air_lw_game) - .acmd("game_landingairlw", kirby_landing_air_lw_game) + .acmd("game_attackairn", game_attackairn) + .acmd("game_attackairf", game_attackairf) + .acmd("game_attackairb", game_attackairb) + .acmd("effect_attackairb", effect_attackairb) + .acmd("game_attackairhi", game_attackairhi) + .acmd("game_attackairlw", game_attackairlw) + .acmd("game_landingairlw", game_landingairlw) .install(); } diff --git a/fighters/kirby/src/acmd/ground.rs b/fighters/kirby/src/acmd/ground.rs index 59f2cd39f5..6a317f8220 100644 --- a/fighters/kirby/src/acmd/ground.rs +++ b/fighters/kirby/src/acmd/ground.rs @@ -1,140 +1,140 @@ use super::*; -unsafe extern "C" fn kirby_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 10.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 5.5, 13.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 20, 3.0, 0.0, 5.5, 10.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 5.5, 13.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn kirby_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.0, 0.0, 5.2, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.5, 0.0, 5.2, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 3.3, 7.5, Some(0.0), Some(3.3), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.0, 0.0, 5.2, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 65, 15, 0, 25, 3.5, 0.0, 5.2, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 3.3, 7.5, Some(0.0), Some(3.3), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn kirby_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 4.0); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 66, 0, 77, 5.0, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 66, 0, 77, 5.0, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); - FT_MOTION_RATE_RANGE(fighter, 14.0, 31.0, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 70, 50, 0, 80, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); + FT_MOTION_RATE_RANGE(agent, 14.0, 31.0, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 70, 50, 0, 80, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - FT_MOTION_RATE_RANGE(fighter, 31.0, 65.0, 22.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + FT_MOTION_RATE_RANGE(agent, 31.0, 65.0, 22.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 65.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kirby_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("kirby_dash"), Hash40::new("top"), 0, 6, 5, -90, 0, 160, 0.7, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("kirby_dash"), Hash40::new("top"), 0, 6, 5, -90, 0, 160, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 2, 0.059, 0.008, 0); - BURN_COLOR_FRAME(fighter, 4, 2, 0.059, 0.008, 0.9); + if is_excute(agent) { + BURN_COLOR(agent, 2, 0.059, 0.008, 0); + BURN_COLOR_FRAME(agent, 4, 2, 0.059, 0.008, 0.9); } frame(lua_state, 30.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 2, 0.059, 0.008, 0.9); - BURN_COLOR_FRAME(fighter, 12, 2, 0.059, 0.008, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("kirby_dash"), false, true); + if is_excute(agent) { + BURN_COLOR(agent, 2, 0.059, 0.008, 0.9); + BURN_COLOR_FRAME(agent, 12, 2, 0.059, 0.008, 0); + EFFECT_OFF_KIND(agent, Hash40::new("kirby_dash"), false, true); } frame(lua_state, 42.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 44.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn kirby_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_kirby_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_kirby_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_kirby_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_kirby_attackdash")); } frame(lua_state, 44.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - PLAY_LANDING_SE(fighter, Hash40::new("se_kirby_landing02")); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + PLAY_LANDING_SE(agent, Hash40::new("se_kirby_landing02")); } } } pub fn install() { smashline::Agent::new("kirby") - .acmd("game_attack11", kirby_attack_11_game) - .acmd("game_attack12", kirby_attack_12_game) - .acmd("game_attackdash", kirby_attack_dash_game) - .acmd("effect_attackdash", kirby_attack_dash_effect) - .acmd("sound_attackdash", kirby_attack_dash_sound) + .acmd("game_attack11", game_attack11) + .acmd("game_attack12", game_attack12) + .acmd("game_attackdash", game_attackdash) + .acmd("effect_attackdash", effect_attackdash) + .acmd("sound_attackdash", sound_attackdash) .install(); } diff --git a/fighters/kirby/src/acmd/mod.rs b/fighters/kirby/src/acmd/mod.rs index 3a6a536578..636eb505dd 100644 --- a/fighters/kirby/src/acmd/mod.rs +++ b/fighters/kirby/src/acmd/mod.rs @@ -1,6 +1,5 @@ use super::*; mod aerials; -mod copyspecials; mod tilts; mod other; mod smashes; @@ -10,7 +9,6 @@ mod ground; pub fn install() { aerials::install(); - copyspecials::install(); tilts::install(); other::install(); smashes::install(); diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 41b61a02f1..750470b975 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -1,211 +1,211 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_kirby_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_kirby_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_kirby_step_left_m"), Hash40::new("se_kirby_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_kirby_step_left_m"), Hash40::new("se_kirby_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_kirby_step_right_m"), Hash40::new("se_kirby_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_kirby_step_right_m"), Hash40::new("se_kirby_step_left_m")); } } -unsafe extern "C" fn kirby_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); +unsafe extern "C" fn game_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); } } -unsafe extern "C" fn landingheavy_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("kirby_star"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("kirby_star"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } pub fn install() { smashline::Agent::new("kirby") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", kirby_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) + .acmd("sound_damageflyhi", sound_damageflyhi) + .acmd("sound_damageflylw", sound_damageflylw) + .acmd("sound_damageflyn", sound_damageflyn) + .acmd("sound_damageflyroll", sound_damageflyroll) + .acmd("sound_damageflytop", sound_damageflytop) + .acmd("sound_dash", sound_dash) + .acmd("game_turndash", game_turndash) + .acmd("game_escapeair", game_escapeair) + .acmd("game_escapeairslide", game_escapeairslide) .acmd("game_landingheavy", game_landingheavy) - .acmd("effect_landingheavy", landingheavy_effect) + .acmd("effect_landingheavy", effect_landingheavy) .install(); } diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index f1e1ef284b..d4a3fd7417 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -1,455 +1,455 @@ use super::*; -unsafe extern "C" fn kirby_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kirby_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kirby_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 60, 98, 0, 42, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 11.0, 60, 98, 0, 40, 3.5, 0.0, -5.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn kirby_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); } frame(lua_state, 8.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_s01")); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } } -unsafe extern "C" fn kirby_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 18.0, 75, 104, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 18.0, 75, 104, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 17.0, 75, 104, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 18.0, 75, 104, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 18.0, 75, 104, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 17.0, 75, 104, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 84, 101, 0, 26, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 16.0, 84, 101, 0, 26, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 15.0, 84, 101, 0, 26, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 84, 101, 0, 26, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 16.0, 84, 101, 0, 26, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 15.0, 84, 101, 0, 26, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 40, 78, 0, 21, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 15.0, 40, 78, 0, 21, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 14.0, 40, 78, 0, 21, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 40, 78, 0, 21, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 15.0, 40, 78, 0, 21, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 14.0, 40, 78, 0, 21, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } } else { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 14.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 14.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 75, 107, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 15.0, 75, 107, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 14.0, 75, 107, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 75, 107, 0, 36, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 15.0, 75, 107, 0, 36, 5.2, 1.5, -2.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 14.0, 75, 107, 0, 36, 5.2, 1.5, -6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 88, 102, 0, 20, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 88, 102, 0, 20, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 13.0, 88, 102, 0, 20, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 88, 102, 0, 20, 6.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 88, 102, 0, 20, 6.3, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 13.0, 88, 102, 0, 20, 6.3, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 50, 52, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 13.0, 50, 52, 0, 10, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 50, 52, 0, 10, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 50, 52, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 13.0, 50, 52, 0, 10, 5.0, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 50, 52, 0, 10, 5.0, 0.0, -5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } } } -unsafe extern "C" fn kirby_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); } frame(lua_state, 10.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack06")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_h01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } } -unsafe extern "C" fn kirby_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 70, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 70, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 16.0, 29, 89, 0, 28, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); - ATK_POWER(fighter, 0, 13); - ATK_POWER(fighter, 1, 13); - ATK_POWER(fighter, 3, 14); - ATK_POWER(fighter, 4, 14); + if is_excute(agent) { + HIT_RESET_ALL(agent); + ATK_POWER(agent, 0, 13); + ATK_POWER(agent, 1, 13); + ATK_POWER(agent, 3, 14); + ATK_POWER(agent, 4, 14); } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 40, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 40, 0, 80, 4.0, 0.0, 4.5, 1.0, Some(0.0), Some(4.5), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 14.0, 29, 92, 0, 25, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); - ATK_POWER(fighter, 0, 10); - ATK_POWER(fighter, 1, 10); - ATK_POWER(fighter, 3, 10); - ATK_POWER(fighter, 4, 10); + if is_excute(agent) { + HIT_RESET_ALL(agent); + ATK_POWER(agent, 0, 10); + ATK_POWER(agent, 1, 10); + ATK_POWER(agent, 3, 10); + ATK_POWER(agent, 4, 10); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn kirby_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 38.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn kirby_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack07")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_smash_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_l01")); } wait(lua_state, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } } pub fn install() { smashline::Agent::new("kirby") - .acmd("game_attacks4hi", kirby_attack_s4_hi_game) - .acmd("game_attacks4", kirby_attack_s4_game) - .acmd("game_attacks4lw", kirby_attack_s4_lw_game) - .acmd("sound_attacks4hi", kirby_attack_s4_sound) - .acmd("sound_attacks4", kirby_attack_s4_sound) - .acmd("sound_attacks4lw", kirby_attack_s4_sound) - .acmd("game_attackhi4", kirby_attack_hi4_game) - .acmd("sound_attackhi4", kirby_attack_hi4_sound) - .acmd("game_attacklw4", kirby_attack_lw4_game) - .acmd("expression_attacklw4", kirby_attack_lw4_expression) - .acmd("sound_attacklw4", kirby_attack_lw4_sound) + .acmd("game_attacks4hi", game_attacks4hi) + .acmd("game_attacks4", game_attacks4) + .acmd("game_attacks4lw", game_attacks4lw) + .acmd("sound_attacks4hi", sound_attacks4) + .acmd("sound_attacks4", sound_attacks4) + .acmd("sound_attacks4lw", sound_attacks4) + .acmd("game_attackhi4", game_attackhi4) + .acmd("sound_attackhi4", sound_attackhi4) + .acmd("game_attacklw4", game_attacklw4) + .acmd("expression_attacklw4", expression_attacklw4) + .acmd("sound_attacklw4", sound_attacklw4) .install(); } diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index 4bdd705e65..f893630e79 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -1,623 +1,620 @@ use super::*; -unsafe extern "C" fn kirby_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_INHALE); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 6.0, 5.0, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 6.0, 5.0, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn kirby_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_INHALE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 160, 100, 30, 0, 8.5, 0.0, 7.0, 15.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 160, 100, 25, 0, 7.8, 0.0, 7.0, 9.7, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - CATCH(fighter, 0, Hash40::new("top"), 5.3, 0.0, 6.4, 10.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 1, Hash40::new("top"), 5.8, 0.0, 6.4, 6.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 160, 100, 30, 0, 8.5, 0.0, 7.0, 15.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 160, 100, 25, 0, 7.8, 0.0, 7.0, 9.7, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + CATCH(agent, 0, Hash40::new("top"), 5.3, 0.0, 6.4, 10.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 1, Hash40::new("top"), 5.8, 0.0, 6.4, 6.2, None, None, None, *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_GA); + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 8.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn kirby_special_n_eat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialneat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 52.0, 24.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 52.0, 24.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_REMOVE); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_USE); } } -unsafe extern "C" fn kirby_special_n_drink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 0, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialndrink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 0, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_SPIT); } } -unsafe extern "C" fn kirby_special_n_large_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnlarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 86.0, 54.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 86.0, 54.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_REMOVE); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_SPECIAL_N_FLAG_ITEM_USE); } } -unsafe extern "C" fn kirby_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 15.0, 6.0); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 15.0, 6.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, false, -1); } } -unsafe extern "C" fn kirby_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_ss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 5.4, 0.0, 4.5, 11.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 48, 78, 0, 60, 3.5, 0.0, 4.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_s_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 5.8, 0.0, 4.2, 11.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 3.9, 0.0, 4.2, 5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 5.8, 0.0, 4.2, 11.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 35.0, 361, 78, 0, 60, 3.9, 0.0, 4.2, 5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HAMMER); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 54.0, 27.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 54.0, 27.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 18.0, 11.0); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 18.0, 11.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, false, -1); } } -unsafe extern "C" fn kirby_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_air_ss_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairss(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 106, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.05); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 5.4, 0.0, 4.3, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 93, 0, 67, 3.2, 0.0, 4.3, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.05); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi2"), false, -1.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 100, 117, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 93, 100, 117, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 100, 102, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 93, 100, 102, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 100, 117, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 93, 100, 117, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 100, 102, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 93, 100, 102, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 100, 60, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 93, 100, 60, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 100, 50, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 93, 100, 50, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 100, 60, 0, 3.0, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 93, 100, 60, 0, 3.0, 0.0, 3.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 100, 50, 0, 3.0, 0.0, 13.5, 7.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 93, 100, 50, 0, 3.0, 0.0, 13.5, 16.0, None, None, None, 1.0, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 275, 102, 0, 40, 6.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 275, 102, 0, 40, 6.0, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 361, 180, 0, 30, 5.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 361, 180, 0, 30, 5.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn kirby_special_air_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 3, 0.25, Hash40::new("haver"), 0, 20, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); - EFFECT_FOLLOW(fighter, Hash40::new("kirby_fcut_rise"), Hash40::new("haver"), 0, 3, 0.3, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 3, 0.25, Hash40::new("haver"), 0, 20, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + EFFECT_FOLLOW(agent, Hash40::new("kirby_fcut_rise"), Hash40::new("haver"), 0, 3, 0.3, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2.5, 0.5, Hash40::new("haver"), 0, 16, 0.3, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2.5, 0.5, Hash40::new("haver"), 0, 16, 0.3, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4, 16, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn kirby_special_hi_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 23.0, 7.0); // startup - if is_excute(fighter) { +unsafe extern "C" fn game_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 23.0, 7.0); // startup + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi1"), false, -1.0); } frame(lua_state, 22.0); // rush - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 72, 48, 0, 60, 5.5, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 7.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 7.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 72, 48, 0, 50, 5.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - FT_MOTION_RATE_RANGE(fighter, 42.0, 74.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 42.0, 74.0, 15.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kirby_special_hi_h_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 1, 6, 85, 120, -90, 1, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 1, 6, 85, 120, -90, 1, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 23.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 4, 6, -65, -100, -90, 1, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 4, 6, -65, -100, -90, 1, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 35.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 44.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn kirby_special_hi_h_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h02")); - match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - 0 => PLAY_SE(fighter, Hash40::new("vc_kirby_002")), - 1 => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), - _ => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); + match smash::app::sv_math::rand(smash::hash40("agent"), 2) { + 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), + 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), + _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), }; } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h04")); } } -unsafe extern "C" fn kirby_special_hi_h_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kirby_special_air_hi_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 18.0, 6.0); // startup - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 18.0, 6.0); // startup + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, Hash40::new("special_hi1"), false, -1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 78, 48, 0, 80, 5.0, 0.0, 10.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); // rush - FT_MOTION_RATE_RANGE(fighter, 18.0, 29.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 29.0, 7.0); frame(lua_state, 29.0); // flip - FT_MOTION_RATE_RANGE(fighter, 29.0, 48.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 29.0, 48.0, 12.0); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_FINALCUTTER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 52.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if is_excute(agent) { + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(fighter.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI); + VarModule::on_flag(agent.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI); StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } } frame(lua_state, 56.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 60.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + if is_excute(agent) { + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn kirby_special_air_hi_h_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 2, 0, 0, 90, -90, 1, false, *EF_FLIP_XY); - LAST_EFFECT_SET_SCALE_W(fighter, 0.65, 1.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.66); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("kirby_fcut_arc"), Hash40::new("kirby_fcut_arc"), Hash40::new("top"), 0, 2, 0, 0, 90, -90, 1, false, *EF_FLIP_XY); + LAST_EFFECT_SET_SCALE_W(agent, 0.65, 1.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.66); } frame(lua_state, 18.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_kirby_cutter"), Hash40::new("tex_kirby_cutter"), 12, Hash40::new("haver"), 0, 2, 0.25, Hash40::new("haver"), 0, 14, 0.5, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1); } frame(lua_state, 44.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); } } -unsafe extern "C" fn kirby_special_air_hi_h_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h02")); - match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - 0 => PLAY_SE(fighter, Hash40::new("vc_kirby_002")), - 1 => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), - _ => PLAY_SE(fighter, Hash40::new("vc_kirby_attack07")), + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); + match smash::app::sv_math::rand(smash::hash40("agent"), 2) { + 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), + 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), + _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), }; } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_special_h04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_special_h04")); } } -unsafe extern "C" fn kirby_special_air_hi_h_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairhih(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kirby_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw"), false, -1.0); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_WORK_ID_FLAG_STONE_BLINK_ONOFF); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw_to_ground"), false, -1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 25, 30, 0, 86, 6.0, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::init_attack_pos(boma, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kirby_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 30.0, 24.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 30.0, 24.0); + if is_excute(agent) { //KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_air_lw"), false, -1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 100); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 100); WorkModule::on_flag(boma, *FIGHTER_KIRBY_STATUS_WORK_ID_FLAG_STONE_BLINK_ONOFF); } frame(lua_state, 19.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 15.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 15.0); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { //KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); ArticleModule::change_motion(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_STONE, Hash40::new("special_lw_to_air"), false, -1.0); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 70, 76, 0, 69, 6.5, 0.0, 2.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 70, 76, 0, 69, 6.5, 0.0, 2.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::init_attack_pos(boma, 0); } } -unsafe extern "C" fn kirby_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 2, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 2, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("kirby_stone_s"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - FLASH(fighter, 0.706, 0.502, 0.392, 0.157); + if is_excute(agent) { + EFFECT(agent, Hash40::new("kirby_stone_s"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + FLASH(agent, 0.706, 0.502, 0.392, 0.157); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.235); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.235); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.314); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.314); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.392); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.392); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.471); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.471); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.549); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.549); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.706, 0.502, 0.392, 0.627); + if is_excute(agent) { + FLASH(agent, 0.706, 0.502, 0.392, 0.627); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH(fighter, 0.314, 0.235, 0.157, 0.706); + if is_excute(agent) { + FLASH(agent, 0.314, 0.235, 0.157, 0.706); } } pub fn install() { smashline::Agent::new("kirby") - .acmd("game_specialnstart", kirby_special_n_start_game) - .acmd("game_specialairnstart", kirby_special_n_start_game) - .acmd("game_specialnloop", kirby_special_n_loop_game) - .acmd("game_specialairnloop", kirby_special_n_loop_game) - .acmd("game_specialneat", kirby_special_n_eat_game) - .acmd("game_specialairneat", kirby_special_n_eat_game) - .acmd("game_specialndrink", kirby_special_n_drink_game) - .acmd("game_specialairndrink", kirby_special_n_drink_game) - .acmd("game_specialnlarge", kirby_special_n_large_game) - .acmd("game_specialairnlarge", kirby_special_n_large_game) - .acmd("game_specialsstart", kirby_special_s_start_game) - .acmd("game_specials", kirby_special_s_game) - .acmd("game_specialss", kirby_special_ss_game) - .acmd("game_specialsmax", kirby_special_s_max_game) - .acmd("game_specialairsstart", kirby_special_air_s_start_game) - .acmd("game_specialairs", kirby_special_air_s_game) - .acmd("game_specialairss", kirby_special_air_ss_game) - .acmd("game_specialairhi2", kirby_special_air_hi2_game) - .acmd("effect_specialairhi2", kirby_special_air_hi2_effect) - .acmd("game_specialhih", kirby_special_hi_h_game) - .acmd("effect_specialhih", kirby_special_hi_h_effect) - .acmd("sound_specialhih", kirby_special_hi_h_sound) - .acmd("expression_specialhih", kirby_special_hi_h_expression) - .acmd("game_specialairhih", kirby_special_air_hi_h_game) - .acmd("effect_specialairhih", kirby_special_air_hi_h_effect) - .acmd("sound_specialairhih", kirby_special_air_hi_h_sound) - .acmd( - "expression_specialairhih", - kirby_special_air_hi_h_expression, - ) - .acmd("game_speciallw", kirby_special_lw_game) - .acmd("game_specialairlw", kirby_special_air_lw_game) - .acmd("effect_specialairlw", kirby_special_air_lw_effect) + .acmd("game_specialnstart", game_specialnstart) + .acmd("game_specialairnstart", game_specialnstart) + .acmd("game_specialnloop", game_specialnloop) + .acmd("game_specialairnloop", game_specialnloop) + .acmd("game_specialneat", game_specialneat) + .acmd("game_specialairneat", game_specialneat) + .acmd("game_specialndrink", game_specialndrink) + .acmd("game_specialairndrink", game_specialndrink) + .acmd("game_specialnlarge", game_specialnlarge) + .acmd("game_specialairnlarge", game_specialnlarge) + .acmd("game_specialsstart", game_specialsstart) + .acmd("game_specials", game_specials) + .acmd("game_specialss", game_specialss) + .acmd("game_specialsmax", game_specialsmax) + .acmd("game_specialairsstart", game_specialairsstart) + .acmd("game_specialairs", game_specialairs) + .acmd("game_specialairss", game_specialairss) + .acmd("game_specialairhi2", game_specialairhi2) + .acmd("effect_specialairhi2", effect_specialairhi2) + .acmd("game_specialhih", game_specialhih) + .acmd("effect_specialhih", effect_specialhih) + .acmd("sound_specialhih", sound_specialhih) + .acmd("expression_specialhih", expression_specialhih) + .acmd("game_specialairhih", game_specialairhih) + .acmd("effect_specialairhih", effect_specialairhih) + .acmd("sound_specialairhih", sound_specialairhih) + .acmd("expression_specialairhih", expression_specialairhih) + .acmd("game_speciallw", game_speciallw) + .acmd("game_specialairlw", game_specialairlw) + .acmd("effect_specialairlw", effect_specialairlw) .install(); } diff --git a/fighters/kirby/src/acmd/throws.rs b/fighters/kirby/src/acmd/throws.rs index 2a76d126db..17bcc08eb9 100644 --- a/fighters/kirby/src/acmd/throws.rs +++ b/fighters/kirby/src/acmd/throws.rs @@ -1,207 +1,207 @@ use super::*; -unsafe extern "C" fn kirby_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn kirby_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(12.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(12.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn kirby_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(-17.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(-17.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn kirby_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 75, 125, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 75, 125, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 38.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { // reduce fthrow bounce height KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_BRAKE); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { // enable aerial drift before fthrow anim is over KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } -unsafe extern "C" fn kirby_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 115, 120, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 115, 120, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 31.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, -10, 0); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn kirby_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 78, 68, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 78, 68, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 95, 0, 85, 9.5, 0.0, 6.5, 2.0, Some(1.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 7.0, 65, 95, 0, 85, 9.5, 0.0, 6.5, 2.0, Some(1.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::set_float(boma, 5.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FINISH_CAMERA_THROW_RAY_LENGTH); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_RAY_CHECK_FINISH_CAMERA_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 7); + CHECK_FINISH_CAMERA(agent, 15, 7); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.8); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: 0.0, z: 0.0}); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn kirby_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); for _ in 0..9 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.8, 0.0, 4.0, 3.2, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.8, 0.0, 4.0, 3.2, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 90, 100, 0, 10, 5.8, 0.0, 4.0, 2.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 90, 100, 0, 10, 5.8, 0.0, 4.0, 2.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 4); + CHECK_FINISH_CAMERA(agent, 8, 4); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: 6.868900}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 68.0); { - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } @@ -209,12 +209,12 @@ unsafe extern "C" fn kirby_throw_lw_game(fighter: &mut L2CAgentBase) { pub fn install() { smashline::Agent::new("kirby") - .acmd("game_catch", kirby_catch_game) - .acmd("game_catchdash", kirby_catch_dash_game) - .acmd("game_catchturn", kirby_catch_turn_game) - .acmd("game_throwf", kirby_throw_f_game) - .acmd("game_throwb", kirby_throw_b_game) - .acmd("game_throwhi", kirby_throw_hi_game) - .acmd("game_throwlw", kirby_throw_lw_game) + .acmd("game_catch", game_catch) + .acmd("game_catchdash", game_catchdash) + .acmd("game_catchturn", game_catchturn) + .acmd("game_throwf", game_throwf) + .acmd("game_throwb", game_throwb) + .acmd("game_throwhi", game_throwhi) + .acmd("game_throwlw", game_throwlw) .install(); } diff --git a/fighters/kirby/src/acmd/tilts.rs b/fighters/kirby/src/acmd/tilts.rs index db0eb0a227..d2e192643e 100644 --- a/fighters/kirby/src/acmd/tilts.rs +++ b/fighters/kirby/src/acmd/tilts.rs @@ -1,95 +1,95 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 35, 35, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 8.0, 98, 80, 0, 55, 5.0, 0.5, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 6.0, 88, 80, 0, 55, 5.0, 0.5, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_RESET_ALL(fighter); + HIT_RESET_ALL(agent); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, 4.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, 4.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toer"), 8.0, 361, 50, 0, 35, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } diff --git a/fighters/kirby/src/acmd/copyspecials.rs b/fighters/kirby/src/copyability/acmd.rs similarity index 100% rename from fighters/kirby/src/acmd/copyspecials.rs rename to fighters/kirby/src/copyability/acmd.rs diff --git a/fighters/kirby/src/copyability/mod.rs b/fighters/kirby/src/copyability/mod.rs new file mode 100644 index 0000000000..e598851c2f --- /dev/null +++ b/fighters/kirby/src/copyability/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + acmd::install(); + opff::install(); +} \ No newline at end of file diff --git a/fighters/kirby/src/copyability/opff.rs b/fighters/kirby/src/copyability/opff.rs new file mode 100644 index 0000000000..39bc6c44ff --- /dev/null +++ b/fighters/kirby/src/copyability/opff.rs @@ -0,0 +1,1263 @@ +use super::*; +use globals::*; + +// symbol-based call for the pikachu/pichu characters' common opff +extern "Rust" { + fn gimmick_flash(boma: &mut BattleObjectModuleAccessor); +} + +// Common +// Magic Series +unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + if( (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_RYU) + || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KEN) + || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCARIO) + || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_DOLLY)){ + let cat1 = cat[0]; + let cat4 = cat[3]; + // Level 1: Jab and Dash Attack Cancels + if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for tilt attack inputs + if boma.is_cat_flag(Cat1::AttackS3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); + } + if boma.is_cat_flag(Cat1::AttackHi3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); + } + if boma.is_cat_flag(Cat1::AttackLw3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); + } + + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during dash attack (on hit) + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Level 2: Tilt Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S3, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during utilt + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Smash Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4, + *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + } + } + + // Aerial Cancels + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for jump inputs + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + } +} + +//Fastfall Specials +unsafe fn fastfall_copyspecials(fighter: &mut L2CFighterCommon) { + let copystatus = StatusModule::status_kind(fighter.module_accessor); + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_situation(*SITUATION_KIND_AIR) { + if fighter.is_status_one_of(&[ + // for some reason these two statuses aren't considered even if they are in the range, so the range does not include these two + *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N2, + *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3 + ]) + || ((0x206..0x377).contains(©status) + && !fighter.is_status_one_of(&[ + // to not list hundreds of statuses, range is given, but exceptions need to be listed seperately + *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL + ]) ) + { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + } + } + } + } +} + +// End of Common + +// BAYONETTA---------------------------------------------------------------------------------------------------------------------------- +unsafe fn bayo_nspecial_mechanics(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE) { //PM-like neutral-b canceling + if fighter.is_situation(*SITUATION_KIND_AIR) { + if fighter.is_cat_flag(Cat1::AirEscape) { + ControlModule::reset_trigger(boma); + StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_FALL, true); + ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + }//drift + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + sv_kinetic_energy!(controller_set_accel_x_mul, fighter, 0.04); + sv_kinetic_energy!(controller_set_accel_x_add, fighter, 0.005); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.4, 0.0); + } else { //platdrop + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + if fighter.global_table[STICK_Y].get_f32() <= WorkModule::get_param_float(boma, hash40("common"), hash40("pass_stick_y")) + && fighter.global_table[FLICK_Y].get_i32() < WorkModule::get_param_int(boma, hash40("common"), hash40("pass_flick_y")) + && GroundModule::is_passable_ground(boma) { + GroundModule::pass_floor(fighter.module_accessor); + ControlModule::clear_command; + } + } + } +} + + +// BRAVE---------------------------------------------------------------------------------------------------------------------------- +unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_motion(Hash40::new("brave_special_n1")) + && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF + && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) + { + if fighter.check_dash_cancel() { + let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; + FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); + EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) + && fighter.is_situation(*SITUATION_KIND_AIR) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR + { + WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } +} + + +// BUDDY---------------------------------------------------------------------------------------------------------------------------- +unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_prev_situation(*SITUATION_KIND_AIR) + { + // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame + let special_n_fire_cancel_frame_ground = 49.0; + // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag + let landing_lag = 12.0; + if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); + } + LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); + } +} + + +// CAPTAIN---------------------------------------------------------------------------------------------------------------------------- +unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + let frame = fighter.motion_frame(); + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) + && 22.0 < frame && frame < 41.0 + && fighter.is_stick_backward() + && fighter.stick_x().abs() > 0.1 + { + fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); + } +} + + +// CHROM---------------------------------------------------------------------------------------------------------------------------- +// CLOUD---------------------------------------------------------------------------------------------------------------------------- +// DAISY---------------------------------------------------------------------------------------------------------------------------- +// DEDEDE---------------------------------------------------------------------------------------------------------------------------- +// DEMON---------------------------------------------------------------------------------------------------------------------------- +// DIDDY---------------------------------------------------------------------------------------------------------------------------- +unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { + boma.check_airdodge_cancel(); + } +} + +unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + if fighter.is_cat_flag(Cat2::StickEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeF) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeB) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + if fighter.sub_check_command_guard().get_bool() { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + } + else { + if fighter.is_cat_flag(Cat1::AirEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) + && fighter.get_num_used_jumps() < fighter.get_jump_count_max() + { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); + } + } + } +} + + +// DOLLY---------------------------------------------------------------------------------------------------------------------------- +// DONKEY---------------------------------------------------------------------------------------------------------------------------- +unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + + +// DUCKHUNT---------------------------------------------------------------------------------------------------------------------------- +// EDGE---------------------------------------------------------------------------------------------------------------------------- +unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + + +// EFLAME---------------------------------------------------------------------------------------------------------------------------- +// ELIGHT---------------------------------------------------------------------------------------------------------------------------- +// FALCO---------------------------------------------------------------------------------------------------------------------------- +unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + + +// FOX---------------------------------------------------------------------------------------------------------------------------- +unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + + +// GAMEWATCH---------------------------------------------------------------------------------------------------------------------------- +unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if StatusModule::is_changing(boma) { + let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; + KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + + +// GANON---------------------------------------------------------------------------------------------------------------------------- +// unsafe fn repeated_warlock_punch_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { +// if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N_TURN { +// if frame > 30.0 && frame < 45.0 { +// if stick_x * facing < 0.0 { +// StatusModule::change_status_request_from_script(boma, *FIGHTER_GANON_STATUS_KIND_SPECIAL_N_TURN, true); +// } +// } +// } +// } + + +// GAOGAEN---------------------------------------------------------------------------------------------------------------------------- +unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); + fighter.sub_transition_group_check_air_cliff(); + } +} + + +// GEKKOUGA---------------------------------------------------------------------------------------------------------------------------- +unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { + if frame > 12.0 { + boma.check_dash_cancel(); + } + } +} + + +// IKE---------------------------------------------------------------------------------------------------------------------------- +// INKLING---------------------------------------------------------------------------------------------------------------------------- +// JACK---------------------------------------------------------------------------------------------------------------------------- +// KAMUI---------------------------------------------------------------------------------------------------------------------------- +// KEN---------------------------------------------------------------------------------------------------------------------------- +unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if !boma.is_status_one_of(&[ + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, + ]) { + return; + } + + // set VarModule flag on f12 - this flag changes hado properties + if frame == 12.0 && fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n"), + ]) { + VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + // after frame 13, disallow changing from aerial to grounded hadoken + // instead, we enter a landing animation + if (frame > 13.0 || fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n_empty"), + Hash40::new("ken_special_n_empty"), + ])) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) { + if frame < 70.0 { // the autocancel frame + WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + } else { + boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); + } + } +} + + +// KOOPA---------------------------------------------------------------------------------------------------------------------------- +unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + if frame < 23.0 && !cooleddown { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + MotionModule::set_frame(boma, 22.0, true); + } + } + } +} + +unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + /* //Ignore cooldown during respawn,death,entry and nspecial + if (&[ + *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, + *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, + *FIGHTER_STATUS_KIND_SPECIAL_N + ]).contains(&status_kind) { + return; + } */ + + if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); + //If cooling down, remove ready effect + if !cooleddown { + if charged_effect > 0 { + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); + if EffectModule::is_exist_effect(boma, charged_effect as u32) { + EffectModule::kill(boma, charged_effect as u32, false,false); + } + } + return; + } + //Otherwise, spawn effect if effect does not exist + else if (charged_effect <= 0 + || !EffectModule::is_exist_effect(boma, charged_effect as u32)) + { + if (charged_effect <= 0){ + gimmick_flash(boma); + } + let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; + let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; + let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); + } + } + // Kirby specific, resets gimmick if copy ability isn't enabled + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } +} + +// Wolf Drift and Laser Airdodge Cancel +unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { + if frame > 17.0 { + boma.check_airdodge_cancel(); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Sora Magic Cancels +unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + // Firaga Airdodge Cancel + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { + if frame > 2.0 { + boma.check_airdodge_cancel(); + } + } + // Thundaga Land Cancel + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) + { + let special_n_fire_cancel_frame_ground = 69.0; + let landing_lag = 12.0; + if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); + } + } +} + +// cycles Kirby to firaga after copying Sora +unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if fighter.is_motion(Hash40::new("special_n_drink")) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { + let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); + let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; + if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE + && frame > 3.0 { + WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); + FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder + } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER + && frame > 4.0 { + FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire + } + } +} + +// handles kirby's mining behavior when copying steve +unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { + if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { + VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); + } + + // wait 2 frames before letting the material table advance, preventing any jumps in entries + if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { + if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { + VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); + } else { + VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); + } + } + } +} + +// Bite Early Throw and Turnaround +unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { + if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { + boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { + if frame < 7.0 { + if facing * stick_x < 0.0 { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); + } + } + } +} + +// Nayru's Love Drift and Land Cancel +unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND { + if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { + //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); + } + } + else if situation_kind == *SITUATION_KIND_AIR { + if frame >= 31.0 { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } + } +} + +// Clown Cannon Shield Cancel +unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { + if frame > 16.0 { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { + if situation_kind == *SITUATION_KIND_GROUND { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); + } + } + } + } +} + +// Link's Bow Drift +unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Bonus Fruit Airdodge Cancel +unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { + if frame > 11.0 { + boma.check_airdodge_cancel(); + } + } +} + +// Colorless Attack Dash Cancel on Hit +// This is unique to Kirby due to only having access to colorless attack. +unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { + boma.check_dash_cancel(); + } + } +} + +// Dark Pit's Bow Land Cancel +unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ + if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + } + } + } +} + +// Flamethrower Land Cancel +unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + let prev_situation = StatusModule::prev_situation_kind(boma); + if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { + return; + } + if StatusModule::is_changing(boma) { + return; + } + if frame < 19.0 { + MotionModule::set_frame(boma, 18.0, true); + } +} + +// Metal Blade Airdodge Cancel +unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { + if boma.status_frame() > 16 { + boma.check_airdodge_cancel(); + } + } +} + +// Simon's Axe Drift +unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Toon Link's Bow Drift +unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Young Link's Bow Drift +unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// PM-like neutral-b canceling +// Samus & Dark Samus +unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + +// Robin +unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Sheik +unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Mewtwo +unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + if MotionModule::is_end(boma) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); + } + } + } +} + +// Squirtle +unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { + //PM-like neutral-b canceling + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { + if situation_kind == *SITUATION_KIND_AIR { + if boma.is_cat_flag(Cat1::AirEscape) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); + } + } + } +} + +// Lucario +unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { + if boma.is_cat_flag(Cat2::CommonGuard) { + if situation_kind == *SITUATION_KIND_AIR { + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + else { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + }***/ + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + } + } +} + +// WiiFit Trainer +unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Pac-Man +unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Mii Gunner +unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Byleth +unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Lucas +unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { + // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // + let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); + let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); + let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); + } + else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { + // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // + let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; + EffectModule::kill(fighter.module_accessor, handle, false, false); + let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; + EffectModule::kill(fighter.module_accessor, handle2, false, false); + let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; + EffectModule::kill(fighter.module_accessor, handle3, false, false); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); + } +} + +pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { + if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] + ) { + //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); + if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } + } + else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, + *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF + ) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + } +} + +// Piranha Plant Ptooie Stance +pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { + let opponent_boma = fighter.get_grabbed_opponent_boma(); + let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); + if grabbed_fighter == *FIGHTER_KIND_PACKUN { + let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); + if new_stance != old_stance { + // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); + VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); + } + } + } +} + +unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { + if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); + } + else { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); + } +} + +pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { + VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("bomb"); + } + else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { + VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("not bomb"); + } + let status_kind = StatusModule::status_kind(weapon.module_accessor); + let motion_kind = MotionModule::motion_kind(weapon.module_accessor); + if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { + if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { + /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { + println!("will bomb"); + } */ + if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + // println!("is bomb"); + } + } + } + } +} + +// Lucas Reset Gimmicks +unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } +} + +pub unsafe fn copymoveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + // Common + magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); + fastfall_copyspecials(fighter); + + + // Fox Drift and Laser Land Cancel + fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); + + // Falco Drift and Laser Land Cancel + falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); + + // Water Shuriken Max Dash Cancel + max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); + + // Sora Magic Cancels + magic_cancels(boma, status_kind, situation_kind, cat[0], frame); + + // Sora Magic Cycle Adjustment + trail_magic_cycle(fighter, boma, frame); + + // Steve Mining + pickel_mining(fighter, boma); + + // Bite Early Throw and Turnaround + bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); + + // Chef Drift and Land Cancel + chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); + + // Nayru's Love Drift and Fast Fall + nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); + + // Hero Dash Cancel Frizz + dash_cancel_frizz(fighter); + + // Wolf Drift and Laser Airdodge Cancel + wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); + + // Bullet Arts Mechanics + bayo_nspecial_mechanics(fighter, boma); + + // Falcon Punch Turnarounds + repeated_falcon_punch_turnaround(fighter); + + //Blue Eggs Land Cancel + blue_eggs_land_cancels(fighter); + + // Peanut Popgun Airdodge Cancel + peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); + + // Darkest Lariat Ledge Slipoff + lariat_ledge_slipoff(fighter); + + // Bowser Flame Land Cancel + koopa_flame_cancel(boma, status_kind, situation_kind, frame); + + //Bowser Fireball Cooldown + koopa_fireball_cooldown(boma, status_kind); + + // Clown Cannon Shield Cancel + clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); + + // Link's Bow Drift + bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); + + // Bonus Fruit Airdodge Cancel + bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); + + // Colorless Attack Dash Cancel on Hit + colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); + + // Dark Pit's Bow Land Cancel + pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); + + // Flamethower Land Cancel + plizardon_flame_cancel(boma, status_kind, situation_kind, frame); + + // Metal Blade Airdodge Cancel + blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); + + // Simon's Axe Drift + axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); + + // Toon Link's Bow Drift + heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); + + // Young Link's Bow Fastfall + fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); + + // Lucas Reset Gimmicks + reset_flags(fighter, boma, status_kind, situation_kind); + + // Lucas Offense Up + lucas_offense_charge(fighter, boma, situation_kind); + lucas_offense_effct_handler(fighter); + + // Piranha Plant Ptooie Stance + packun_ptooie_stance(fighter, boma, status_kind); + packun_ptooie_scale(boma); + + // PM-like Neutral B Cancels + donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); + samus_nspecial_cancels(boma, status_kind, situation_kind); + reflet_nspecial_cancels(boma, status_kind, situation_kind); + sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); + mewtwo_nspecial_cancels(boma, status_kind, situation_kind); + pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); + diddy_nspecial_cancels(fighter, boma, status_kind); + lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); + wiifit_nspecial_cancels(boma, status_kind, situation_kind); + pacman_nspecial_cancels(boma, status_kind, situation_kind); + brave_nspecial_cancels(fighter); + edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); + miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); + master_nspecial_cancels(boma, status_kind, situation_kind); + ken_air_hado_distinguish(fighter, boma, frame); +} + +pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(fighter) { + copymoveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); + } +} + +pub fn install() { + smashline::Agent::new("packun_spikeball") + .on_line(Main, spikeball_frame) + .install() +} diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index 4cb51e2a8b..bd4e570334 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod status; pub mod opff; +pub mod copyability; + use smash::{ lib::{ L2CValue, @@ -43,6 +45,7 @@ pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { acmd::install(); + copyability::install(); status::install(); opff::install(); } diff --git a/fighters/kirby/src/opff.rs b/fighters/kirby/src/opff.rs index aa0f300bb6..d5cd94361a 100644 --- a/fighters/kirby/src/opff.rs +++ b/fighters/kirby/src/opff.rs @@ -74,1053 +74,6 @@ pub extern "C" fn hammer_swing_drift_landcancel(fighter: &mut smash::lua2cpp::L2 } } -// Magic Series -unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - if( (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_RYU) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KEN) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCARIO) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_DOLLY)){ - let cat1 = cat[0]; - let cat4 = cat[3]; - // Level 1: Jab and Dash Attack Cancels - if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for tilt attack inputs - if boma.is_cat_flag(Cat1::AttackS3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); - } - if boma.is_cat_flag(Cat1::AttackHi3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); - } - if boma.is_cat_flag(Cat1::AttackLw3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); - } - - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during dash attack (on hit) - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Level 2: Tilt Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during utilt - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Smash Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - } - } - - // Aerial Cancels - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for jump inputs - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - } -} - -// Copy Abilities -// Fox Drift and Laser Land Cancel -unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Falco Drift and Laser Land Cancel -unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Wolf Drift and Laser Airdodge Cancel -unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { - if frame > 17.0 { - boma.check_airdodge_cancel(); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Water Shuriken Max Dash Cancel -unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { - if frame > 12.0 { - boma.check_dash_cancel(); - } - } -} - -// Sora Magic Cancels -unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - // Firaga Airdodge Cancel - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { - if frame > 2.0 { - boma.check_airdodge_cancel(); - } - } - // Thundaga Land Cancel - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) - { - let special_n_fire_cancel_frame_ground = 69.0; - let landing_lag = 12.0; - if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); - } - } -} - -// cycles Kirby to firaga after copying Sora -unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if fighter.is_motion(Hash40::new("special_n_drink")) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { - let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); - let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; - if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE - && frame > 3.0 { - WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); - FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder - } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER - && frame > 4.0 { - FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire - } - } -} - -// handles kirby's mining behavior when copying steve -unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { - if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { - VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); - } - - // wait 2 frames before letting the material table advance, preventing any jumps in entries - if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { - if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { - VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); - } else { - VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); - } - } - } -} - -// Bite Early Throw and Turnaround -unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { - if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { - boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { - if frame < 7.0 { - if facing * stick_x < 0.0 { - PostureModule::reverse_lr(boma); - PostureModule::update_rot_y_lr(boma); - } - } - } -} - -// Chef Drift and Land Cancel -unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if StatusModule::is_changing(boma) { - let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Nayru's Love Drift and Land Cancel -unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND { - if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { - //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); - MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); - } - } - else if situation_kind == *SITUATION_KIND_AIR { - if frame >= 31.0 { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - -// Hero Dash Cancel Frizz -unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_motion(Hash40::new("brave_special_n1")) - && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF - && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) - { - if fighter.check_dash_cancel() { - let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; - FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } -} - -// Bullet Climax Mechanics -unsafe fn bayo_nspecial_mechanics(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE) { //PM-like neutral-b canceling - if fighter.is_situation(*SITUATION_KIND_AIR) { - if fighter.is_cat_flag(Cat1::AirEscape) { - ControlModule::reset_trigger(boma); - StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_FALL, true); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - }//drift - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - sv_kinetic_energy!(controller_set_accel_x_mul, fighter, 0.04); - sv_kinetic_energy!(controller_set_accel_x_add, fighter, 0.005); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.4, 0.0); - } else { //platdrop - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - if fighter.global_table[STICK_Y].get_f32() <= WorkModule::get_param_float(boma, hash40("common"), hash40("pass_stick_y")) - && fighter.global_table[FLICK_Y].get_i32() < WorkModule::get_param_int(boma, hash40("common"), hash40("pass_flick_y")) - && GroundModule::is_passable_ground(boma) { - GroundModule::pass_floor(fighter.module_accessor); - ControlModule::clear_command; - } - } - } -} - -// Falcon Punch Turnarounds -unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - let frame = fighter.motion_frame(); - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) - && 22.0 < frame && frame < 41.0 - && fighter.is_stick_backward() - && fighter.stick_x().abs() > 0.1 - { - fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); - } -} - -// Blue Eggs Land Cancel -unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_prev_situation(*SITUATION_KIND_AIR) - { - // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame - let special_n_fire_cancel_frame_ground = 49.0; - // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag - let landing_lag = 12.0; - if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); - } - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); - } -} - -// Peanut Popgun Airdodge Cancel -unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { - boma.check_airdodge_cancel(); - } -} - -//Darkest Lariat Ledge Slipoff -unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); - fighter.sub_transition_group_check_air_cliff(); - } -} - -//Bowser Flame Land Cancel -unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - if frame < 23.0 && !cooleddown { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - MotionModule::set_frame(boma, 22.0, true); - } - } - } -} - -unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - /* //Ignore cooldown during respawn,death,entry and nspecial - if (&[ - *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, - *FIGHTER_STATUS_KIND_SPECIAL_N - ]).contains(&status_kind) { - return; - } */ - - if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); - //If cooling down, remove ready effect - if !cooleddown { - if charged_effect > 0 { - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); - if EffectModule::is_exist_effect(boma, charged_effect as u32) { - EffectModule::kill(boma, charged_effect as u32, false,false); - } - } - return; - } - //Otherwise, spawn effect if effect does not exist - else if (charged_effect <= 0 - || !EffectModule::is_exist_effect(boma, charged_effect as u32)) - { - if (charged_effect <= 0){ - gimmick_flash(boma); - } - let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; - let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; - let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); - } - } -} - -// Clown Cannon Shield Cancel -unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { - if frame > 16.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - if situation_kind == *SITUATION_KIND_GROUND { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); - } - } - } - } -} - -// Link's Bow Drift -unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Bonus Fruit Airdodge Cancel -unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { - if frame > 11.0 { - boma.check_airdodge_cancel(); - } - } -} - -// Colorless Attack Dash Cancel on Hit -// This is unique to Kirby due to only having access to colorless attack. -unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { - boma.check_dash_cancel(); - } - } -} - -// Dark Pit's Bow Land Cancel -unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ - if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - } - } - } -} - -// Flamethrower Land Cancel -unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - let prev_situation = StatusModule::prev_situation_kind(boma); - if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { - return; - } - if StatusModule::is_changing(boma) { - return; - } - if frame < 19.0 { - MotionModule::set_frame(boma, 18.0, true); - } -} - -// Metal Blade Airdodge Cancel -unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { - if boma.status_frame() > 16 { - boma.check_airdodge_cancel(); - } - } -} - -// Simon's Axe Drift -unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Toon Link's Bow Drift -unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Young Link's Bow Drift -unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// PM-like neutral-b canceling -// Donkey Kong -unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Samus & Dark Samus -unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Robin -unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Sheik -unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Mewtwo -unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - if MotionModule::is_end(boma) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); - } - } - } -} - -// Squirtle -unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { - //PM-like neutral-b canceling - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { - if situation_kind == *SITUATION_KIND_AIR { - if boma.is_cat_flag(Cat1::AirEscape) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); - } - } - } -} - -// Diddy Kong -unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - if fighter.is_cat_flag(Cat2::StickEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeF) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeB) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - if fighter.sub_check_command_guard().get_bool() { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - } - else { - if fighter.is_cat_flag(Cat1::AirEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) - && fighter.get_num_used_jumps() < fighter.get_jump_count_max() - { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); - } - } - } -} - -// Lucario -unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { - if boma.is_cat_flag(Cat2::CommonGuard) { - if situation_kind == *SITUATION_KIND_AIR { - if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - else { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - }***/ - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - } - } -} - -// WiiFit Trainer -unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Pac-Man -unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Hero -unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) - && fighter.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR - { - WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } -} - -// Sephiroth -unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Mii Gunner -unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Byleth -unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Ken -unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if !boma.is_status_one_of(&[ - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, - ]) { - return; - } - - // set VarModule flag on f12 - this flag changes hado properties - if frame == 12.0 && fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n"), - ]) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - // after frame 13, disallow changing from aerial to grounded hadoken - // instead, we enter a landing animation - if (frame > 13.0 || fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n_empty"), - Hash40::new("ken_special_n_empty"), - ])) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) { - if frame < 70.0 { // the autocancel frame - WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - } else { - boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); - } - } -} - -//Bowser & Lucas -unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} - -unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { - // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // - let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); - let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); - let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); - } - else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { - // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // - let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; - EffectModule::kill(fighter.module_accessor, handle, false, false); - let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; - EffectModule::kill(fighter.module_accessor, handle2, false, false); - let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; - EffectModule::kill(fighter.module_accessor, handle3, false, false); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); - } -} - -pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { - if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] - ) { - //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); - if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } - else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, - *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF - ) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - } -} - -// Piranha Plant Ptooie Stance -pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { - let opponent_boma = fighter.get_grabbed_opponent_boma(); - let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); - if grabbed_fighter == *FIGHTER_KIND_PACKUN { - let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); - if new_stance != old_stance { - // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); - VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); - } - } - } -} - -unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { - if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); - } - else { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - -// End of Copy Abilities - unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { let copystatus = StatusModule::status_kind(fighter.module_accessor); if !fighter.is_in_hitlag() @@ -1190,119 +143,6 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod //stone_control(fighter); fastfall_specials(fighter); cutter_size(boma, status_kind); - reset_flags(fighter, boma, status_kind, situation_kind); - - // Magic Series - magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); - - // Fox Drift and Laser Land Cancel - fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Falco Drift and Laser Land Cancel - falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Water Shuriken Max Dash Cancel - max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cancels - magic_cancels(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cycle Adjustment - trail_magic_cycle(fighter, boma, frame); - - // Steve Mining - pickel_mining(fighter, boma); - - // Bite Early Throw and Turnaround - bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); - - // Chef Drift and Land Cancel - chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Nayru's Love Drift and Fast Fall - nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); - - // Hero Dash Cancel Frizz - dash_cancel_frizz(fighter); - - // Wolf Drift and Laser Airdodge Cancel - wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Bullet Arts Mechanics - bayo_nspecial_mechanics(fighter, boma); - - // Falcon Punch Turnarounds - repeated_falcon_punch_turnaround(fighter); - - //Blue Eggs Land Cancel - blue_eggs_land_cancels(fighter); - - // Peanut Popgun Airdodge Cancel - peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); - - // Darkest Lariat Ledge Slipoff - lariat_ledge_slipoff(fighter); - - // Bowser Flame Land Cancel - koopa_flame_cancel(boma, status_kind, situation_kind, frame); - - //Bowser Fireball Cooldown - koopa_fireball_cooldown(boma, status_kind); - - // Clown Cannon Shield Cancel - clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); - - // Link's Bow Drift - bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Bonus Fruit Airdodge Cancel - bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Colorless Attack Dash Cancel on Hit - colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Dark Pit's Bow Land Cancel - pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); - - // Flamethower Land Cancel - plizardon_flame_cancel(boma, status_kind, situation_kind, frame); - - // Metal Blade Airdodge Cancel - blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Simon's Axe Drift - axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Toon Link's Bow Drift - heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Young Link's Bow Fastfall - fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); - - // Lucas Offense Up - lucas_offense_charge(fighter, boma, situation_kind); - lucas_offense_effct_handler(fighter); - - // Piranha Plant Ptooie Stance - packun_ptooie_stance(fighter, boma, status_kind); - packun_ptooie_scale(boma); - - // PM-like Neutral B Cancels - donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); - samus_nspecial_cancels(boma, status_kind, situation_kind); - reflet_nspecial_cancels(boma, status_kind, situation_kind); - sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); - mewtwo_nspecial_cancels(boma, status_kind, situation_kind); - pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); - diddy_nspecial_cancels(fighter, boma, status_kind); - lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - wiifit_nspecial_cancels(boma, status_kind, situation_kind); - pacman_nspecial_cancels(boma, status_kind, situation_kind); - brave_nspecial_cancels(fighter); - edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); - master_nspecial_cancels(boma, status_kind, situation_kind); - ken_air_hado_distinguish(fighter, boma, frame); } pub extern "C" fn kirby_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -1322,8 +162,4 @@ pub fn install() { .on_line(Main, kirby_frame_wrapper) .on_line(Main, hammer_swing_drift_landcancel) .install(); - - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install() } diff --git a/fighters/kirby/src/status.rs b/fighters/kirby/src/status.rs index d594032c47..e968188827 100644 --- a/fighters/kirby/src/status.rs +++ b/fighters/kirby/src/status.rs @@ -12,7 +12,7 @@ mod koopa_special_n; mod littlemac_special_n; mod diddy_special_n_cancel; mod lucas_special_n; -mod sonic; +mod sonic_special_n; mod edge_special_n; extern "C" fn kirby_init(fighter: &mut L2CFighterCommon) { diff --git a/fighters/kirby/src/status/gaogaen_special_n.rs b/fighters/kirby/src/status/gaogaen_special_n.rs index 996f7c3062..e7f5b7d0b8 100644 --- a/fighters/kirby/src/status/gaogaen_special_n.rs +++ b/fighters/kirby/src/status/gaogaen_special_n.rs @@ -3,7 +3,7 @@ use globals::*; // FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N -pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_N | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 @@ -39,7 +39,7 @@ pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) - } -pub unsafe extern "C" fn exec_gaogaen_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); @@ -53,12 +53,12 @@ pub fn install() { .status( Pre, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - gaogaen_special_n_pre, + special_n_pre, ) .status( Exec, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - exec_gaogaen_special_n, + special_n_exec, ) .install(); } diff --git a/fighters/kirby/src/status/koopa_special_n.rs b/fighters/kirby/src/status/koopa_special_n.rs index 49a517f8e9..4be0b073d2 100644 --- a/fighters/kirby/src/status/koopa_special_n.rs +++ b/fighters/kirby/src/status/koopa_special_n.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn koopa_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if !can_fireball { return smashline::original_status(Main, fighter, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N)(fighter); @@ -16,11 +16,11 @@ unsafe extern "C" fn koopa_special_n_main(fighter: &mut L2CFighterCommon) -> L2C GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } - fighter.sub_shift_status_main(L2CValue::Ptr(koopa_specialnmax_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_max_main_loop as *const () as _)) } } -unsafe extern "C" fn koopa_specialnmax_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_situation_changed(fighter.module_accessor) { fighter.sub_change_motion_by_situation(Hash40::new("koopa_special_n_max").into(), Hash40::new("koopa_special_air_n_max").into(), true.into()); @@ -54,7 +54,7 @@ unsafe extern "C" fn koopa_specialnmax_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn koopa_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if (!can_fireball){ if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_CONTINUE_START) @@ -71,7 +71,7 @@ unsafe extern "C" fn koopa_special_n_exec(fighter: &mut L2CFighterCommon) -> L2C } } -unsafe extern "C" fn koopa_special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if (!can_fireball){ return smashline::original_status(ExecStop, fighter, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N)(fighter); @@ -86,17 +86,17 @@ pub fn install() { .status( Main, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_main, + special_n_main, ) .status( Exec, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_exec, + special_n_exec, ) .status( ExecStop, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - koopa_special_n_execstop, + special_n_execstop, ) .install(); } diff --git a/fighters/kirby/src/status/littlemac_special_n.rs b/fighters/kirby/src/status/littlemac_special_n.rs index 92dfa3098e..4a4559abe8 100644 --- a/fighters/kirby/src/status/littlemac_special_n.rs +++ b/fighters/kirby/src/status/littlemac_special_n.rs @@ -4,7 +4,7 @@ use globals::*; #[skyline::from_offset(0xb96770)] fn copy_ability_reset(fighter: *mut Fighter, some_miifighter_bool: bool); -unsafe extern "C" fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -33,7 +33,7 @@ unsafe extern "C" fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> 0.into() } -unsafe extern "C" fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_UNIQ, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB); let sum_spd_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); if fighter.is_situation(*SITUATION_KIND_GROUND) { @@ -61,10 +61,10 @@ unsafe extern "C" fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, (*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_02) + -1); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x3a40337e2c), (*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_02) + -1); - fighter.main_shift(littlemac_special_n_main_loop) + fighter.main_shift(special_n_main_loop) } -unsafe extern "C" fn littlemac_special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -129,7 +129,7 @@ unsafe extern "C" fn littlemac_special_n_main_loop(fighter: &mut L2CFighterCommo return 0.into() } -unsafe extern "C" fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_NONE, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB); EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); let kirb = fighter.battle_object.cast::(); @@ -141,8 +141,8 @@ unsafe extern "C" fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> pub fn install() { smashline::Agent::new("kirby") - .status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_pre) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_main) - .status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_end) + .status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_pre) + .status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_main) + .status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_end) .install(); } \ No newline at end of file diff --git a/fighters/kirby/src/status/sonic.rs b/fighters/kirby/src/status/sonic_special_nrs similarity index 96% rename from fighters/kirby/src/status/sonic.rs rename to fighters/kirby/src/status/sonic_special_nrs index e62972b1d3..6b0911abe5 100644 --- a/fighters/kirby/src/status/sonic.rs +++ b/fighters/kirby/src/status/sonic_special_nrs @@ -2,7 +2,7 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn main_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { hash40("special_n_start") } @@ -94,7 +94,7 @@ unsafe extern "C" fn special_n_main_loop2(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub unsafe extern "C" fn pre_special_n_homing_start(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let blast_attack = VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK); let ret = smashline::original_status(Pre, fighter, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N)(fighter); @@ -107,12 +107,12 @@ pub fn install() { .status( Main, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, - main_special_n, + special_n_main, ) .status( Pre, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, - pre_special_n_homing_start, + special_n_homing_start_pre, ) .install(); } From cffd9d3c7cfc18cdcfddb032fa42fab381ddcebe Mon Sep 17 00:00:00 2001 From: SirTanknSpank <115139386+SirTanknSpank@users.noreply.github.com> Date: Mon, 18 Mar 2024 08:11:21 -0500 Subject: [PATCH 020/172] Ganondorf --- fighters/ganon/src/acmd/aerials.rs | 274 +++++----- fighters/ganon/src/acmd/ground.rs | 99 ++-- fighters/ganon/src/acmd/mod.rs | 16 +- fighters/ganon/src/acmd/other.rs | 266 +++++----- fighters/ganon/src/acmd/smashes.rs | 104 ++-- fighters/ganon/src/acmd/specials.rs | 492 +++++++++--------- fighters/ganon/src/acmd/throws.rs | 36 +- fighters/ganon/src/acmd/tilts.rs | 441 ++++++++-------- fighters/ganon/src/lib.rs | 9 +- fighters/ganon/src/opff.rs | 58 +-- fighters/ganon/src/status.rs | 45 +- fighters/ganon/src/status/attack_lw3.rs | 74 ++- .../ganon/src/status/special_air_s_catch.rs | 48 +- fighters/ganon/src/status/special_lw.rs | 32 +- fighters/ganon/src/status/special_n.rs | 124 +++-- fighters/ganon/src/status/special_n_float.rs | 78 ++- fighters/ganon/src/status/special_s.rs | 18 +- 17 files changed, 1105 insertions(+), 1109 deletions(-) diff --git a/fighters/ganon/src/acmd/aerials.rs b/fighters/ganon/src/acmd/aerials.rs index 31a0b2727f..47b9d0c04b 100644 --- a/fighters/ganon/src/acmd/aerials.rs +++ b/fighters/ganon/src/acmd/aerials.rs @@ -1,264 +1,266 @@ use super::*; -unsafe extern "C" fn ganon_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 65, 46, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 367, 50, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 65, 46, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 367, 50, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 6.0, 75, 51, 0, 58, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 6.0, 367, 50, 0, 30, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 6.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 5.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 361, 106, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 6.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 106, 0, 35, 5.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 361, 106, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 5.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 5.0, 6.5, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 80, 0, 45, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ganon_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11, 17, 0, 0, 0, 1.5, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11, 17, 0, 0, 0, 1.5, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 7.0, 0, -2.5, 0, 0, 0, 1.75, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 7.0, 0, -2.5, 0, 0, 0, 1.75, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } } -unsafe extern "C" fn ganon_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 18.0, 361, 97, 0, 20, 5.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 361, 97, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 18.0, 361, 97, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 18.0, 361, 97, 0, 20, 5.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 361, 97, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 18.0, 361, 97, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ganon_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_engokua_flash"), Hash40::new("haver"), -1, 0, 0.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_engokua_flash"), Hash40::new("haver"), -1, 0, 0.5, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua_flash"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua_flash"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 12, 6, 180, -180, 100, 1.2, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 12, 6, 180, -180, 100, 1.2, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn ganon_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.5, 361, 93, 0, 40, 5.0, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 93, 0, 40, 4.5, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.5, 361, 93, 0, 40, 5.0, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.5, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 12.6, -5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.0, 0.0, 10.4, -10.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 45, 90, 0, 30, 4.5, 0.0, 9.1, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ganon_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2.5, 14.7, -4.3, 35, 140, 50, 1.3, false); - // EFFECT_FOLLOW(fighter, Hash40::new("ganon_engokua"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2.5, 14.7, -4.3, 35, 140, 50, 1.3, false); + // EFFECT_FOLLOW(agent, Hash40::new("ganon_engokua"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, -17, 0, 0, 0, 1.5, true, 0.9); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, -17, 0, 0, 0, 1.5, true, 0.9); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.3, false); } // frame(lua_state, 13.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua"), false, true); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua"), false, true); // } } -unsafe extern "C" fn ganon_landing_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_engokua"), false, true); +unsafe extern "C" fn effect_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_engokua"), false, true); } } -unsafe extern "C" fn ganon_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 4.0/(7.5 - 3.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(7.5 - 3.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 13.0/(21.0 - 7.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 361, 100, 0, 35, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 35, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 13.0/(21.0 - 7.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 361, 100, 0, 35, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 35, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 30, 85, 0, 30, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 30, 85, 0, 30, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 30, 85, 0, 30, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 30, 85, 0, 30, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 0, 80, 0, 20, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 0, 80, 0, 20, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 0, 80, 0, 20, 4.8, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 0, 80, 0, 20, 5.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 14.0/(31.0 - 19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 14.0/(31.0 - 19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ganon_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 4.5, 12.5, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 270, 100, 0, 50, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 100, 0, 50, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 270, 100, 0, 50, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 100, 0, 50, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 19.0, 270, 52, 0, 20, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 361, 100, 0, 20, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 19.0, 270, 52, 0, 20, 7.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 361, 100, 0, 20, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 4.5, 12.5, 11); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attackairn", ganon_attack_air_n_game) - .acmd("effect_attackairn", ganon_attack_air_n_effect) - .acmd("game_attackairf", ganon_attack_air_f_game) - .acmd("effect_attackairf", ganon_attack_air_f_effect) - .acmd("game_attackairb", ganon_attack_air_b_game) - .acmd("effect_attackairb", ganon_attack_air_b_effect) - .acmd("effect_landingairb", ganon_landing_air_b_effect) - .acmd("game_attackairhi", ganon_attack_air_hi_game) - .acmd("expression_attackairhi", ganon_attack_air_hi_expression) - .acmd("game_attackairlw", ganon_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("effect_landingairb", effect_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ganon/src/acmd/ground.rs b/fighters/ganon/src/acmd/ground.rs index efb137d5db..62bcf531c5 100644 --- a/fighters/ganon/src/acmd/ground.rs +++ b/fighters/ganon/src/acmd/ground.rs @@ -1,88 +1,87 @@ use super::*; -unsafe extern "C" fn ganon_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0 / 4.0); + FT_MOTION_RATE(agent, 3.0 / 4.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 5.0, 0.0, 12.0, 7.0, Some(0.0), Some(15.0), Some(7.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 3.5, 0.0, 12.0, 11.0, Some(0.0), Some(15.0), Some(11.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 2.0, 0.0, 12.0, 14.0, Some(0.0), Some(15.0), Some(14.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 5.0, 0.0, 12.0, 7.0, Some(0.0), Some(15.0), Some(7.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 3.5, 0.0, 12.0, 11.0, Some(0.0), Some(15.0), Some(11.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 40, 0, 95, 2.0, 0.0, 12.0, 14.0, Some(0.0), Some(15.0), Some(14.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 18, 4, 0, 25, 40, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 18, 4, 0, 25, 40, 1.0, true); } } -unsafe extern "C" fn ganon_attack_11_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_swing_s")); } } -unsafe extern "C" fn ganon_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.89); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.89); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 70, 85, 0, 50, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 70, 85, 0, 50, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 60, 0, 47, 4.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 60, 0, 47, 4.0, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.3); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attack11", ganon_attack_11_game) - .acmd("effect_attack11", ganon_attack_11_effect) - .acmd("sound_attack11", ganon_attack_11_sound) - .acmd("expression_attack11", ganon_attack_11_expression) - .acmd("game_attackdash", ganon_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("sound_attack11", sound_attack11); + agent.acmd("expression_attack11", expression_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ganon/src/acmd/mod.rs b/fighters/ganon/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/ganon/src/acmd/mod.rs +++ b/fighters/ganon/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index 8b38221fae..9d3de07106 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -1,279 +1,283 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ganon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ganon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 16.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ganon_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ganon_step_right_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ganon_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ganon_step_left_m")); } } -unsafe extern "C" fn ganon_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn ganon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.875); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.875); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ganon_appeal_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 65.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn ganon_appeal_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 65.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn ganon_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn ganon_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", ganon_turn_dash_game) - .acmd("game_catch", ganon_catch_game) - .acmd("game_appealhir", ganon_appeal_hi_r_game) - .acmd("game_appealhil", ganon_appeal_hi_l_game) - .acmd("game_appeallwr", ganon_appeal_lw_r_game) - .acmd("game_appeallwl", ganon_appeal_lw_l_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhil); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ganon/src/acmd/smashes.rs b/fighters/ganon/src/acmd/smashes.rs index 0db7426165..d1c93b1801 100644 --- a/fighters/ganon/src/acmd/smashes.rs +++ b/fighters/ganon/src/acmd/smashes.rs @@ -1,140 +1,140 @@ use super::*; -unsafe extern "C" fn ganon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 22.0, 40, 96, 0, 45, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 22.0, 85, 85, 0, 40, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 22.0, 78, 85, 0, 40, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 19.0, 75, 93, 0, 40, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 22.0, 85, 85, 0, 40, 5.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 22.0, 78, 85, 0, 40, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 19.0, 75, 93, 0, 40, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(0)); ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD) { ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 160, 90, 90, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 175, 92, 95, 0, 3.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 147, 90, 90, 0, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 150, 92, 95, 0, 4.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 160, 90, 90, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 175, 92, 95, 0, 3.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 147, 90, 90, 0, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 150, 92, 95, 0, 4.0, 0.0, 4.0, 19.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 35, 88, 0, 61, 5.0, 0.0, 4.8, -21.0, Some(0.0), Some(4.8), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 35, 88, 0, 61, 5.0, 0.0, 4.8, -21.0, Some(0.0), Some(4.8), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_attacks4", ganon_attack_s4_s_game) - .acmd("game_attackhi4", ganon_attack_hi4_game) - .acmd("game_attacklw4", ganon_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index 3e6683eedc..5756ed93c1 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -1,187 +1,187 @@ use super::*; -unsafe extern "C" fn ganon_float_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ganon_float_start_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_start_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_start_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_floatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } } -unsafe extern "C" fn ganon_float_air_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0 / 10.0); +unsafe extern "C" fn game_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0 / 10.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + FT_MOTION_RATE(agent, 1.0); + KineticModule::unable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); frame(lua_state, 14.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if is_excute(agent) { + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } -unsafe extern "C" fn ganon_float_air_start_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 2.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_air_start_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_air_start_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_floatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } } -unsafe extern "C" fn ganon_float_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); } frame(lua_state, 60.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn ganon_float_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_final_hand_triforce"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_entry_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); } } -unsafe extern "C" fn ganon_float_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_float(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 9.0, 1.0, Some(0.0), Some(9.0), Some(6.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 9.0, 1.0, Some(0.0), Some(9.0), Some(6.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 5.25, 0.0, 10.75, 7.25, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 5.25, 0.0, 10.75, 7.25, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, *COLLISION_SITUATION_MASK_GA); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_EXPLOSION_GRAVITY_ONOFF); } frame(lua_state, 32.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn ganon_special_air_s_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairscatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let lr = PostureModule::lr(boma); let stick_x = ControlModule::get_stick_x(boma) * lr; let speed_x = 0.5 * stick_x; @@ -189,178 +189,178 @@ unsafe extern "C" fn ganon_special_air_s_catch_game(fighter: &mut L2CAgentBase) WorkModule::set_float(boma, 2.0, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_GANON_EXPLOSION_FALL_SETTING_CATCH, *FIGHTER_GANON_STATUS_WORK_ID_INT_EXPLOSION_FALL_SETTING); } } -unsafe extern "C" fn ganon_special_air_s_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairsfall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let speed_x = WorkModule::get_float(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); - SET_SPEED_EX(fighter, speed_x, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, speed_x, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_GANON_EXPLOSION_FALL_SETTING_FALL, *FIGHTER_GANON_STATUS_WORK_ID_INT_EXPLOSION_FALL_SETTING); } } -unsafe extern "C" fn ganon_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 15.0, 361, 82, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 15.0, 361, 82, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ganon_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 6.0, 8.5, 9.5); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 6.0, 8.5, 10.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.5, 6.0, 0.0, 12.5, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 16.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.5, 6.0, 0.0, 12.5, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 16.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_GANON_KICK_WALL_CHECK); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 42, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 42, 70, 0, 65, 4.0, 1.0, 0.0, 0.0, Some(-2.7), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 42, 70, 0, 65, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 8.0, 8.0, 8.0, 4.0); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 30.0/(61.0 - 36.0)); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + FT_MOTION_RATE(agent, 30.0/(61.0 - 36.0)); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn ganon_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GANON_STATUS_WORK_ID_FLAG_GANON_KICK_WALL_CHECK); JostleModule::set_status(boma, false); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 15.0, 290, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 15.0, 290, 36, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 80, 100, 0, 50, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn ganon_special_air_lw_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.790); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.5, 0.0, 3.2, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.5, 0.0, 3.2, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 80, 35, 0, 80, 4.8, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 19.0); - if is_excute(fighter) { } + if is_excute(agent) { } } -unsafe extern "C" fn ganon_special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } - frame(fighter.lua_state_agent, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + frame(agent.lua_state_agent, 12.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - frame(fighter.lua_state_agent, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.5, 0.0, 16.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.0, 0.0, 6.75, 7.75, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + frame(agent.lua_state_agent, 14.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.5, 0.0, 16.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.0, 0.0, 6.75, 7.75, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - CATCH(fighter, 0, Hash40::new("bust"), 5.25, 0.0, 0.0, 2.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + CATCH(agent, 0, Hash40::new("bust"), 5.25, 0.0, 0.0, 2.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + frame(agent.lua_state_agent, 18.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - frame(fighter.lua_state_agent, 29.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - AttackModule::clear_all(fighter.module_accessor); + frame(agent.lua_state_agent, 29.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + AttackModule::clear_all(agent.module_accessor); } - frame(fighter.lua_state_agent, 34.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 9.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - //ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + frame(agent.lua_state_agent, 34.0); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 9.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + wait(agent.lua_state_agent, 3.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 41.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -369,89 +369,97 @@ unsafe extern "C" fn ganon_special_hi(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let air_accel_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("air_accel_x_mul"), 0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let air_accel_x_mul = WorkModule::get_param_float(agent.module_accessor, hash40("air_accel_x_mul"), 0); let special_hi_speed_x_mul = WorkModule::get_param_float( - fighter.module_accessor, + agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_speed_x_mul") ); sv_kinetic_energy!( controller_set_accel_x_mul, - fighter, + agent, air_accel_x_mul * special_hi_speed_x_mul ); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); let special_hi_speed_max_x_mul = WorkModule::get_param_float( - fighter.module_accessor, + agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_speed_max_x_mul") ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * special_hi_speed_max_x_mul, 0.0 ); } - frame(fighter.lua_state_agent, 46.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + frame(agent.lua_state_agent, 46.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); } } -unsafe extern "C" fn ganon_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } - frame(fighter.lua_state_agent, 31.0); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(agent.lua_state_agent, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(agent.lua_state_agent, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); + } + frame(agent.lua_state_agent, 31.0); /* vanilla electric effects for _ in 0..4 { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("ganon_attack_elec"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("ganon_attack_elec"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - wait(fighter.lua_state_agent, 2.0); + wait(agent.lua_state_agent, 2.0); } - frame(fighter.lua_state_agent, 42.0); + frame(agent.lua_state_agent, 42.0); */ - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_raijin_hold"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_raijin_hold"), false, true); } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_floatstart", ganon_float_start_game) - .acmd("effect_floatstart", ganon_float_start_eff) - .acmd("expression_floatstart", ganon_float_start_exp) - .acmd("sound_floatstart", ganon_float_start_snd) - .acmd("game_floatairstart", ganon_float_air_start_game) - .acmd("effect_floatairstart", ganon_float_air_start_eff) - .acmd("expression_floatairstart", ganon_float_air_start_exp) - .acmd("sound_floatairstart", ganon_float_air_start_snd) - .acmd("game_float", ganon_float_game) - .acmd("effect_float", ganon_float_eff) - .acmd("expression_float", ganon_float_exp) - .acmd("game_specialairsstart", ganon_special_air_s_start_game) - .acmd("game_specialairscatch", ganon_special_air_s_catch_game) - .acmd("game_specialairsfall", ganon_special_air_s_fall_game) - .acmd("game_specialairs", ganon_special_air_s_game) - .acmd("game_speciallw", ganon_special_lw_game) - .acmd("game_specialairlw", ganon_special_air_lw_game) - .acmd("game_specialairlwend", ganon_special_air_lw_end_game) - .acmd("game_specialhi", ganon_special_hi) - .acmd("game_specialairhi", ganon_special_hi) - .acmd("effect_specialhi", ganon_special_hi_effect) - .acmd("effect_specialairhi", ganon_special_hi_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_floatstart", game_floatstart); + agent.acmd("effect_floatstart", effect_floatstart); + agent.acmd("expression_floatstart", expression_floatstart); + agent.acmd("sound_floatstart", sound_floatstart); + + agent.acmd("game_floatairstart", game_floatairstart); + agent.acmd("effect_floatairstart", effect_floatairstart); + agent.acmd("expression_floatairstart", expression_floatairstart); + agent.acmd("sound_floatairstart", sound_floatairstart); + + agent.acmd("game_float", game_float); + agent.acmd("effect_float", effect_float); + agent.acmd("expression_float", expression_float); + + agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialairscatch", game_specialairscatch); + + agent.acmd("game_specialairsfall", game_specialairsfall); + + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_speciallw", game_speciallw); + + agent.acmd("game_specialairlw", game_specialairlw); + + agent.acmd("game_specialairlwend", game_specialairlwend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); } diff --git a/fighters/ganon/src/acmd/throws.rs b/fighters/ganon/src/acmd/throws.rs index 63669aa143..9a15a60d1b 100644 --- a/fighters/ganon/src/acmd/throws.rs +++ b/fighters/ganon/src/acmd/throws.rs @@ -1,26 +1,26 @@ use super::*; -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 43, 100, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 43, 100, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 100, 0, 30, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, -0.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 100, 0, 30, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 5.0, 80, 100, 0, 30, 2.4, -0.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 17, 9); + CHECK_FINISH_CAMERA(agent, 17, 9); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } @@ -45,9 +45,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ganon") - .acmd("game_throwf", game_throwf) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwlw", game_throwlw); + } diff --git a/fighters/ganon/src/acmd/tilts.rs b/fighters/ganon/src/acmd/tilts.rs index e0b6de7ad6..21a46b6fe5 100644 --- a/fighters/ganon/src/acmd/tilts.rs +++ b/fighters/ganon/src/acmd/tilts.rs @@ -1,400 +1,403 @@ use super::*; -unsafe extern "C" fn ganon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0 - 1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0 - 1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0/(10.1 - 10.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 22, 81, 0, 32, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 22, 81, 0, 32, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 22, 81, 0, 32, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0/(10.1 - 10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 22, 81, 0, 32, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 22, 81, 0, 32, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 22, 81, 0, 32, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 10.1); - FT_MOTION_RATE(fighter, 1.0/(12.0 - 10.1)); + FT_MOTION_RATE(agent, 1.0/(12.0 - 10.1)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn ganon_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 22, 72, 0, 25, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 15.0, 22, 72, 0, 25, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 22, 72, 0, 25, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 22, 72, 0, 25, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 15.0, 22, 72, 0, 25, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 22, 72, 0, 25, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn ganon_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(8.0 - 1.0)); + FT_MOTION_RATE(agent, 4.0/(8.0 - 1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0/(10.1 - 10.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 22, 95, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 22, 95, 0, 35, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 22, 95, 0, 35, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0/(10.1 - 10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 22, 95, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 22, 95, 0, 35, 5.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 22, 95, 0, 35, 5.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 10.1); - FT_MOTION_RATE(fighter, 1.0/(12.0 - 10.1)); + FT_MOTION_RATE(agent, 1.0/(12.0 - 10.1)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 20.0/(35.0 - 14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(35.0 - 14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn ganon_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5, -11, -35, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 5, -11, -35, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 22.0, 13.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 22.0, 13.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); } } -unsafe extern "C" fn ganon_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 16.0, -10, 27, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 16.0, -10, 27, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2.0, 17.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2.0, 17.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.8); } } -unsafe extern "C" fn ganon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 14.0, 78, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 78, 75, 0, 50, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 14.0, 78, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 78, 75, 0, 50, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 41.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ganon_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -10, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } - EFFECT_FOLLOW(fighter, Hash40::new("ganon_sword_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ganon_sword_flare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -8, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -6, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -4, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } - FOOT_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, 120, 1.0, 0, 0, 0, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), -2, 0, 3.0, 0, 0, -120, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, 0, 0, -80, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, 0, 0, -80, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_sword_flare"), false, false); } frame(lua_state, 41.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ganon_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appeal_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appeal_l01")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ganon_attack06")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ganon_attack06")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_m")); } } -unsafe extern "C" fn ganon_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_TOP); } frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 3); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ganon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 8.0 / 10.0); + FT_MOTION_RATE(agent, 8.0 / 10.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 40, 10, 40, 3.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 40, 10, 40, 3.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } // frame(lua_state, 30.0); - // if is_excute(fighter) { - // WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + // if is_excute(agent) { + // WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // } } -unsafe extern "C" fn ganon_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ganon_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_ganon_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_l")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_ganon_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_l")); } } -unsafe extern "C" fn ganon_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -unsafe extern "C" fn ganon_attack_lw32_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 100, 0, 85, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 100, 0, 85, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } } -unsafe extern "C" fn ganon_attack_lw32_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ganon_attack_lw32_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_ganon_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_ganon_swing_l")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_ganon_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_ganon_swing_l")); } } -unsafe extern "C" fn ganon_attack_lw32_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("ganon") - .acmd("game_attacks3", ganon_attack_s3_s_game) - .acmd("game_attacks3hi", ganon_attack_s3_hi_game) - .acmd("game_attacks3lw", ganon_attack_s3_lw_game) - .acmd("effect_attacks3hi", ganon_attack_s3_hi_effect) - .acmd("effect_attacks3lw", ganon_attack_s3_lw_effect) - .acmd("game_attackhi3", ganon_attack_hi3_game) - .acmd("effect_attackhi3", ganon_attack_hi3_effect) - .acmd("sound_attackhi3", ganon_attack_hi3_sound) - .acmd("expression_attackhi3", ganon_attack_hi3_expression) - .acmd("game_attacklw3", ganon_attack_lw3_game) - .acmd("effect_attacklw3", ganon_attack_lw3_effect) - .acmd("sound_attacklw3", ganon_attack_lw3_sound) - .acmd("expression_attacklw3", ganon_attack_lw3_expression) - .acmd("game_attacklw32", ganon_attack_lw32_game) - .acmd("effect_attacklw32", ganon_attack_lw32_effect) - .acmd("sound_attacklw32", ganon_attack_lw32_sound) - .acmd("expression_attacklw32", ganon_attack_lw32_expression) + .acmd("game_attacks3", game_attacks3) + .acmd("game_attacks3hi", game_attacks3hi) + .acmd("game_attacks3lw", game_attacks3lw) + .acmd("effect_attacks3hi", effect_attacks3hi) + .acmd("effect_attacks3lw", effect_attacks3lw) + + .acmd("game_attackhi3", game_attackhi3) + .acmd("effect_attackhi3", effect_attackhi3) + .acmd("sound_attackhi3", sound_attackhi3) + .acmd("expression_attackhi3", expression_attackhi3) + + .acmd("game_attacklw3", game_attacklw3) + .acmd("effect_attacklw3", effect_attacklw3) + .acmd("sound_attacklw3", sound_attacklw3) + .acmd("expression_attacklw3", expression_attacklw3) + + .acmd("game_attacklw32", game_attacklw32) + .acmd("effect_attacklw32", effect_attacklw32) + .acmd("sound_attacklw32", sound_attacklw32) + .acmd("expression_attacklw32", expression_attacklw32) .install(); } diff --git a/fighters/ganon/src/lib.rs b/fighters/ganon/src/lib.rs index 7bb0378152..19a0ae8c2e 100644 --- a/fighters/ganon/src/lib.rs +++ b/fighters/ganon/src/lib.rs @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("ganon"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/ganon/src/opff.rs b/fighters/ganon/src/opff.rs index 1add933db3..5dded46bc5 100644 --- a/fighters/ganon/src/opff.rs +++ b/fighters/ganon/src/opff.rs @@ -28,10 +28,10 @@ use globals::*; // } // } -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ +unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { + if !agent.is_in_hitlag() + && !StatusModule::is_changing(agent.module_accessor) + && agent.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_HI, @@ -39,48 +39,46 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { *FIGHTER_GANON_STATUS_KIND_SPECIAL_HI_THROW, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_WALL_END ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + && agent.is_situation(*SITUATION_KIND_AIR) { + agent.sub_air_check_dive(); + if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(agent.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); } } } } -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { +pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { // dtaunt_counter(boma, motion_kind, frame); // repeated_warlock_punch_turnaround(boma, status_kind, stick_x, facing, frame); - fastfall_specials(fighter); + fastfall_specials(agent); } -pub extern "C" fn ganon_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn ganon_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(fighter); - ganon_frame(fighter) + common::opff::fighter_common_opff(agent); + ganon_frame(agent) } } -pub unsafe fn ganon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn ganon_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(agent) { + moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ganon") - .on_line(Main, ganon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ganon_frame_wrapper); } diff --git a/fighters/ganon/src/status.rs b/fighters/ganon/src/status.rs index b141ab904f..a6968a7fe1 100644 --- a/fighters/ganon/src/status.rs +++ b/fighters/ganon/src/status.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; mod attack_lw3; @@ -9,8 +10,8 @@ mod special_s; mod special_air_s_catch; /// Prevents side b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_n_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N) { +unsafe extern "C" fn should_use_special_n_callback(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N) { false.into() } else { true.into() @@ -18,35 +19,33 @@ unsafe extern "C" fn should_use_special_n_callback(fighter: &mut L2CFighterCommo } /// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); +unsafe extern "C" fn change_status_callback(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.is_situation(*SITUATION_KIND_GROUND) || agent.is_situation(*SITUATION_KIND_CLIFF) + || agent.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); } true.into() } -extern "C" fn ganon_init(fighter: &mut L2CFighterCommon) { +extern "C" fn on_start(agent: &mut L2CFighterCommon) { unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_GANON { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } + // set the callbacks on agent init + agent.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); + agent.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } } -pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { - fighter.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); +pub unsafe fn ganon_set_air(agent: &mut L2CFighterCommon) { + agent.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } -pub fn install() { - smashline::Agent::new("ganon").on_start(ganon_init).install(); - attack_lw3::install(); - special_n::install(); - special_n_float::install(); - special_lw::install(); - special_s::install(); - special_air_s_catch::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + attack_lw3::install(agent); + special_n::install(agent); + special_n_float::install(agent); + special_lw::install(agent); + special_s::install(agent); + special_air_s_catch::install(agent); } diff --git a/fighters/ganon/src/status/attack_lw3.rs b/fighters/ganon/src/status/attack_lw3.rs index 4c78af956b..614f414275 100644 --- a/fighters/ganon/src/status/attack_lw3.rs +++ b/fighters/ganon/src/status/attack_lw3.rs @@ -1,17 +1,17 @@ use super::*; -unsafe extern "C" fn attack_lw3_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_AttackLw3_common(); - fighter.main_shift(attack_lw3_main_loop) +unsafe extern "C" fn attack_lw3_main(agent: &mut L2CFighterCommon) -> L2CValue { + agent.status_AttackLw3_common(); + agent.main_shift(attack_lw3_main_loop) } -unsafe extern "C" fn attack_lw3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) - && fighter.global_table[globals::CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 != 0 { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); +unsafe extern "C" fn attack_lw3_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(agent.module_accessor) { + if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) + && agent.global_table[globals::CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 != 0 { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); MotionModule::change_motion( - fighter.module_accessor, + agent.module_accessor, Hash40::new("attack_lw3_2"), 0.0, 1.0, @@ -20,67 +20,65 @@ unsafe extern "C" fn attack_lw3_main_loop(fighter: &mut L2CFighterCommon) -> L2C false, false ); - fighter.clear_lua_stack(); - sv_kinetic_energy::set_motion_energy_update_flag(fighter.lua_state_agent); + agent.clear_lua_stack(); + sv_kinetic_energy::set_motion_energy_update_flag(agent.lua_state_agent); return 0.into(); } } - if CancelModule::is_enable_cancel(fighter.module_accessor) - && fighter.sub_wait_ground_check_common(false.into()).get_bool() { + if CancelModule::is_enable_cancel(agent.module_accessor) + && agent.sub_wait_ground_check_common(false.into()).get_bool() { return 0.into(); } - if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return 0.into(); } - let jump_attack_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME); + let jump_attack_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME); if 0 < jump_attack_frame { - if !StopModule::is_stop(fighter.module_accessor) - && fighter.sub_check_button_jump().get_bool() { - let log = fighter.status_attack(); + if !StopModule::is_stop(agent.module_accessor) + && agent.sub_check_button_jump().get_bool() { + let log = agent.status_attack(); let info = log[0x10f40d7b92u64].get_i64(); - let mot = MotionModule::motion_kind(fighter.module_accessor); + let mot = MotionModule::motion_kind(agent.module_accessor); MotionAnimcmdModule::call_script_single( - fighter.module_accessor, + agent.module_accessor, *FIGHTER_ANIMCMD_EXPRESSION, Hash40::new_raw(mot), -1 ); - WorkModule::set_int64(fighter.module_accessor, info, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); - fighter.change_status_jump_mini_attack(true.into()); + WorkModule::set_int64(agent.module_accessor, info, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + agent.change_status_jump_mini_attack(true.into()); return 1.into(); } } if 1 == jump_attack_frame { - if !fighter.global_table[globals::IS_STOPPING].get_bool() - && WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND) > 0 { - let log = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); - FighterStatusModuleImpl::reset_log_action_info(fighter.module_accessor, log); - WorkModule::set_int64(fighter.module_accessor, 0, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + if !agent.global_table[globals::IS_STOPPING].get_bool() + && WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND) > 0 { + let log = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + FighterStatusModuleImpl::reset_log_action_info(agent.module_accessor, log); + WorkModule::set_int64(agent.module_accessor, 0, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); } } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_SQUAT_WAIT.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_STATUS_KIND_SQUAT_WAIT.into(), false.into()); } 0.into() } -unsafe extern "C" fn attack_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_lw3_end(agent: &mut L2CFighterCommon) -> L2CValue { sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0 ); - fighter.status_end_AttackLw3() + agent.status_end_AttackLw3() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_main) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_main); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_LW3, attack_lw3_end); } diff --git a/fighters/ganon/src/status/special_air_s_catch.rs b/fighters/ganon/src/status/special_air_s_catch.rs index 89ef73d114..88719e52d7 100644 --- a/fighters/ganon/src/status/special_air_s_catch.rs +++ b/fighters/ganon/src/status/special_air_s_catch.rs @@ -1,15 +1,15 @@ use super::*; use globals::*; -unsafe extern "C" fn special_air_s_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::set_rate(fighter.module_accessor, 0.0); - fighter.main_shift(special_air_s_catch_main_loop) +unsafe extern "C" fn special_air_s_catch_main(agent: &mut L2CFighterCommon) -> L2CValue { + MotionModule::set_rate(agent.module_accessor, 0.0); + agent.main_shift(special_air_s_catch_main_loop) } -unsafe extern "C" fn special_air_s_catch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[globals::CURRENT_FRAME].get_f32() == 1.0 { +unsafe extern "C" fn special_air_s_catch_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.global_table[globals::CURRENT_FRAME].get_f32() == 1.0 { MotionModule::change_motion( - fighter.module_accessor, + agent.module_accessor, Hash40::new("special_air_s_catch"), 0.0, 1.0, @@ -18,45 +18,39 @@ unsafe extern "C" fn special_air_s_catch_main_loop(fighter: &mut L2CFighterCommo false, false ); - ganon_set_air(fighter); - let speed_x = WorkModule::get_float(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); - let speed_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); - KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ganon_set_air(agent); + let speed_x = WorkModule::get_float(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); + let speed_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); + KineticModule::clear_speed_attr(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y ); - let lr = PostureModule::lr(fighter.module_accessor); + let lr = PostureModule::lr(agent.module_accessor); sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_x * lr, 0.0 ); - KineticModule::suspend_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::suspend_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - if fighter.global_table[globals::CURRENT_FRAME].get_f32() > 1.0 { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_FALL.into(), false.into()); + if agent.global_table[globals::CURRENT_FRAME].get_f32() > 1.0 { + if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_FALL.into(), false.into()); return 1.into(); } - if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_END.into(), false.into()); + if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_END.into(), false.into()); return 1.into(); } } 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status( - Main, - *FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH, - special_air_s_catch_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status( Main,*FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH,special_air_s_catch_main); } diff --git a/fighters/ganon/src/status/special_lw.rs b/fighters/ganon/src/status/special_lw.rs index 5bc9ec05f1..1d6c9f5c4c 100644 --- a/fighters/ganon/src/status/special_lw.rs +++ b/fighters/ganon/src/status/special_lw.rs @@ -1,9 +1,9 @@ use super::*; use globals::*; -unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - fighter.module_accessor, + agent.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_KEEP as u32, @@ -16,7 +16,7 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -31,34 +31,28 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); +unsafe extern "C" fn special_lw_end_main(agent: &mut L2CFighterCommon) -> L2CValue { + let x_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let ret = smashline::original_status(Main, fighter, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END)(fighter); + let ret = smashline::original_status(Main, agent, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END)(agent); - let start_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); - let end_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_END_SITUATION); + let start_situation = WorkModule::get_int(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); + let end_situation = WorkModule::get_int(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_END_SITUATION); if start_situation == *SITUATION_KIND_AIR && end_situation == *FIGHTER_GANON_KICK_END_SITUATION_AG { // Allows you to slide when landing early into Wizard Kick's animation - KineticModule::add_speed(fighter.module_accessor, &Vector3f{x: x_speed.abs(), y: 0.0, z: 0.0}); + KineticModule::add_speed(agent.module_accessor, &Vector3f{x: x_speed.abs(), y: 0.0, z: 0.0}); } else if start_situation == *SITUATION_KIND_AIR && end_situation == *FIGHTER_GANON_KICK_END_SITUATION_AA { // Allows you to slide when landing late into Wizard Kick's animation - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); + WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); } ret } -pub fn install() { - smashline::Agent::new("ganon") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status( - Main, - *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END, - special_lw_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main,*FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END,special_lw_end_main); } diff --git a/fighters/ganon/src/status/special_n.rs b/fighters/ganon/src/status/special_n.rs index c35beca4d6..8e6cf81681 100644 --- a/fighters/ganon/src/status/special_n.rs +++ b/fighters/ganon/src/status/special_n.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_pre_SpecialNCommon(); +unsafe extern "C" fn special_n_pre(agent: &mut L2CFighterCommon) -> L2CValue { + agent.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( - fighter.module_accessor, + agent.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_AIR as u32, @@ -16,7 +16,7 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -31,148 +31,146 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(agent: &mut L2CFighterCommon) -> L2CValue { // Motion Kind change depending on situation. - VarModule::on_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); - fighter.sub_change_motion_by_situation(L2CValue::Hash40s("float_start"), L2CValue::Hash40s("float_air_start"), false.into()); - if fighter.global_table[globals::SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + VarModule::on_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); + agent.sub_change_motion_by_situation(L2CValue::Hash40s("float_start"), L2CValue::Hash40s("float_air_start"), false.into()); + if agent.global_table[globals::SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); let speed_y = { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy::get_speed_y(agent.lua_state_agent) }; sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y.clamp(-0.05, 0.5) ); sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); } else { - StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR); + StatusModule::set_situation_kind(agent.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR); } - fighter.main_shift(special_n_main_loop) + agent.main_shift(special_n_main_loop) } -unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { // Decided which direction Ganon should float. - if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); - let stick_x = fighter.global_table[globals::STICK_X].get_f32(); + if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); + let stick_x = agent.global_table[globals::STICK_X].get_f32(); let angle = (45.0 * -stick_x).to_radians(); sv_kinetic_energy!( set_angle, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, angle ); if angle != 0.0 { sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.2 ); } - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); } // Increases Ganon's fall speed when this flag is enabled. - if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); let speed_y = { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy::get_speed_y(agent.lua_state_agent) }; sv_kinetic_energy!( set_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y.clamp(-0.05, 0.1) ); sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); } // Make sure if you touch the ground you actually land. - if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_MOTION_AIR - && fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); + if KineticModule::get_kinetic_type(agent.module_accessor) != *FIGHTER_KINETIC_TYPE_MOTION_AIR + && agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); return 0.into(); } // Only perform these actions if vars::ganon::status::FLOAT_ENABLE_ACTIONS is true. - if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { + if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { // if the proper transition terms are enabled, these functions will check for // if Ganon performs an aerial, a double jump, or airdodge. - if fighter.sub_transition_group_check_air_cliff().get_bool() - || fighter.sub_transition_group_check_air_attack().get_bool() - || fighter.sub_transition_group_check_air_jump_aerial().get_bool() - || fighter.sub_transition_group_check_air_escape().get_bool() { + if agent.sub_transition_group_check_air_cliff().get_bool() + || agent.sub_transition_group_check_air_attack().get_bool() + || agent.sub_transition_group_check_air_jump_aerial().get_bool() + || agent.sub_transition_group_check_air_escape().get_bool() { return 1.into(); } // If Special is pressed, enable a flag and transition into the next status. - if fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 - || fighter.global_table[globals::STICK_Y].get_f32() <= -0.7 { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); + if agent.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 + || agent.global_table[globals::STICK_Y].get_f32() <= -0.7 { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); // Clear the buffer here so you don't accidentally buffer a side special on cancel. - fighter.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), true.into()); + agent.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), true.into()); return 0.into(); } } // When the animation ends, transition to the next status. - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) { + agent.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), false.into()); } 0.into() } -unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_init(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_init(_agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_exec(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(_agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); } diff --git a/fighters/ganon/src/status/special_n_float.rs b/fighters/ganon/src/status/special_n_float.rs index 75dee844e5..5c2a70b982 100644 --- a/fighters/ganon/src/status/special_n_float.rs +++ b/fighters/ganon/src/status/special_n_float.rs @@ -1,8 +1,8 @@ use super::*; -unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_pre(agent: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - fighter.module_accessor, + agent.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), *FIGHTER_KINETIC_TYPE_FALL, *GROUND_CORRECT_KIND_AIR as u32, @@ -15,7 +15,7 @@ unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CV ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -30,8 +30,8 @@ unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn special_n_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let cancel = VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); +unsafe extern "C" fn special_n_float_main(agent: &mut L2CFighterCommon) -> L2CValue { + let cancel = VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); let frame = if cancel { 59.0 @@ -40,7 +40,7 @@ unsafe extern "C" fn special_n_float_main(fighter: &mut L2CFighterCommon) -> L2C 0.0 }; MotionModule::change_motion( - fighter.module_accessor, + agent.module_accessor, Hash40::new("float"), frame, 1.0, @@ -50,63 +50,63 @@ unsafe extern "C" fn special_n_float_main(fighter: &mut L2CFighterCommon) -> L2C false ); if !cancel { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); sv_kinetic_energy!( set_accel, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); } - fighter.main_shift(special_n_float_main_loop) + agent.main_shift(special_n_float_main_loop) } -unsafe extern "C" fn special_n_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { // Increases Ganon's fall speed when this flag is enabled. - if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE) { + if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE) { sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.25 // hardcoded value for now ); - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } // Make sure if you touch the ground you actually land. - if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); + if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); return 0.into(); } // Only perform these actions if vars::ganon::status::FLOAT_ENABLE_ACTIONS is true. - if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { + if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { // if the proper transition terms are enabled, these functions will check for // if Ganon performs an aerial, airdodge, or a double jump. - if fighter.sub_transition_group_check_air_cliff().get_bool() - || fighter.sub_transition_group_check_air_attack().get_bool() - || fighter.sub_transition_group_check_air_jump_aerial().get_bool() - || fighter.sub_transition_group_check_air_escape().get_bool() { + if agent.sub_transition_group_check_air_cliff().get_bool() + || agent.sub_transition_group_check_air_attack().get_bool() + || agent.sub_transition_group_check_air_jump_aerial().get_bool() + || agent.sub_transition_group_check_air_escape().get_bool() { return 1.into(); } // If Special is pressed, enable a flag and transition into the next status. - if fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 - || fighter.global_table[globals::STICK_Y].get_f32() <= -0.7 { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); + if agent.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 + || agent.global_table[globals::STICK_Y].get_f32() <= -0.7 { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); MotionModule::change_motion( - fighter.module_accessor, + agent.module_accessor, Hash40::new("float"), 59.0, 1.0, @@ -115,26 +115,24 @@ unsafe extern "C" fn special_n_float_main_loop(fighter: &mut L2CFighterCommon) - false, false ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); return 0.into(); } } // Transition to Fall when the animation ends. - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } 0.into() } -unsafe extern "C" fn special_n_float_end(_fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_end(_agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - Agent::new("ganon") - .status(Pre, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_pre) - .status(Main, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_main) - .status(End, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_pre); + agent.status(Main, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_main); + agent.status(End, statuses::ganon::SPECIAL_N_FLOAT, special_n_float_end); } diff --git a/fighters/ganon/src/status/special_s.rs b/fighters/ganon/src/status/special_s.rs index 3881fcab20..3649f4029e 100644 --- a/fighters/ganon/src/status/special_s.rs +++ b/fighters/ganon/src/status/special_s.rs @@ -1,26 +1,24 @@ use super::*; use globals::*; -unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { +unsafe extern "C" fn special_s_exit(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { return 0.into(); } - if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_S_CATCH { + if agent.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_S_CATCH { sv_kinetic_energy!( clear_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION ); } else { - let landing_lag = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("explosion_landing_frame_faile")); - WorkModule::set_float(fighter.module_accessor, landing_lag, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + let landing_lag = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_s"), hash40("explosion_landing_frame_faile")); + WorkModule::set_float(agent.module_accessor, landing_lag, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); } 0.into() } -pub fn install() { - smashline::Agent::new("ganon") - .status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit); } From bf23e84e053d02760ec56a4152b4a46479da3f20 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 19 Mar 2024 08:41:20 -0500 Subject: [PATCH 021/172] cleanup --- fighters/dedede/src/acmd/other.rs | 91 +----------------- fighters/dedede/src/opff.rs | 117 ++++++++++++----------- fighters/dedede/src/status.rs | 4 +- fighters/dedede/src/status/special_hi.rs | 6 +- fighters/dedede/src/status/special_lw.rs | 6 +- fighters/pickel/src/forge/opff.rs | 6 +- fighters/pickel/src/trolley/opff.rs | 6 +- 7 files changed, 78 insertions(+), 158 deletions(-) diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index fbc09563b9..1c87143f44 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02"));} - } -} - unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -244,27 +169,21 @@ unsafe extern "C" fn sound_landingfallspecial(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - - agent.acmd("sound_damageflylw", sound_damageflylw); - - agent.acmd("sound_damageflyn", sound_damageflyn); - + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); - agent.acmd("expression_landingheavy", expression_landingheavy); agent.acmd("game_catch", game_catch); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); agent.acmd("sound_landingfallspecial", sound_landingfallspecial); diff --git a/fighters/dedede/src/opff.rs b/fighters/dedede/src/opff.rs index 0978d71bee..087c763f1d 100644 --- a/fighters/dedede/src/opff.rs +++ b/fighters/dedede/src/opff.rs @@ -23,8 +23,8 @@ unsafe fn rotate_bone(boma: &mut BattleObjectModuleAccessor, max_angle: f32, min angle = max_angle } let mut rotation = Vector3f{x: 0.0, y: 0.0, z: ((angle * -1.0 * strength) - 2.5)}; - let agent = utils::util::get_fighter_common_from_accessor(boma); - agent.set_joint_rotate("bust", rotation); + let fighter = utils::util::get_fighter_common_from_accessor(boma); + fighter.set_joint_rotate("bust", rotation); } unsafe fn bust_lean(boma: &mut BattleObjectModuleAccessor, lean_frame: f32, return_frame: f32, max_angle: f32, min_angle: f32) { @@ -46,16 +46,16 @@ unsafe fn bust_lean(boma: &mut BattleObjectModuleAccessor, lean_frame: f32, retu } } -unsafe fn angled_inhale_shot(agent: &mut L2CFighterCommon) { - if ArticleModule::is_exist(agent.boma(), *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ - if agent.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_N_SHOT_OBJECT_HIT){ - bust_lean(agent.boma(), 6.0, 12.0, 20.0, -20.0); +unsafe fn angled_inhale_shot(fighter: &mut L2CFighterCommon) { + if ArticleModule::is_exist(fighter.boma(), *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ + if fighter.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_N_SHOT_OBJECT_HIT){ + bust_lean(fighter.boma(), 6.0, 12.0, 20.0, -20.0); } } } //Gordo recatch and waddledash -unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, agent: &mut L2CFighterCommon){ +unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, fighter: &mut L2CFighterCommon){ if ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO){ let article = ArticleModule::get_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO); let object_id = smash::app::lua_bind::Article::get_battle_object_id(article) as u32; @@ -69,35 +69,35 @@ unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, agent if ((gordo_pos.x - (char_pos.x + offset.x)).abs() < 19.0 && (gordo_pos.y - (char_pos.y + offset.y)).abs() < 15.0){ if ((StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_ESCAPE_AIR) || ((StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_LANDING) && StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_ESCAPE_AIR)) - && VarModule::is_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG){ - if agent.status_frame() > 1 - && agent.status_frame() < 4 { //We don't want to go into recatch if we are in the middle of airdodge/landing + && VarModule::is_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG){ + if fighter.status_frame() > 1 + && fighter.status_frame() < 4 { //We don't want to go into recatch if we are in the middle of airdodge/landing if StatusModule::status_kind(article_boma) != *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD{ - VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); - VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO, true); - VarModule::inc_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER); + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, false); + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO, true); + VarModule::inc_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER); - VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, true); + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, true); ArticleModule::remove(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO, smash::app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_SPECIAL_S, false); if StatusModule::situation_kind(boma) == *SITUATION_KIND_AIR { - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 1.5, y: 0.0, z:1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_s_get"), 0.0, 1.0, false, 0.0, false, false); + KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 1.5, y: 0.0, z:1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_get"), 0.0, 1.0, false, 0.0, false, false); } else{ StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_SPECIAL_S, false); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_s_get"), 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_get"), 0.0, 1.0, false, 0.0, false, false); } //Prevents turnarounds - if ControlModule::get_stick_x(agent.module_accessor) * char_lr < 0.0{ + if ControlModule::get_stick_x(fighter.module_accessor) * char_lr < 0.0{ PostureModule::reverse_lr(boma); PostureModule::reverse_rot_y_lr(boma); let new_char_lr = PostureModule::lr(boma); - if (char_lr != new_char_lr) && (ControlModule::get_stick_x(agent.module_accessor) * new_char_lr < 0.0){ + if (char_lr != new_char_lr) && (ControlModule::get_stick_x(fighter.module_accessor) * new_char_lr < 0.0){ PostureModule::reverse_lr(boma); PostureModule::reverse_rot_y_lr(boma); } @@ -111,27 +111,27 @@ unsafe fn gordo_recatch(boma: &mut BattleObjectModuleAccessor, frame: f32, agent || StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_LANDING || StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_JUMP_SQUAT || WorkModule::is_flag(boma, *FIGHTER_STATUS_GUARD_ON_WORK_FLAG_JUST_SHIELD){ - VarModule::set_flag(agent.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::CAN_WADDLE_DASH_FLAG, true); } //Prevents B reversing when we are in the dash if StatusModule::status_kind(boma) == *FIGHTER_STATUS_KIND_SPECIAL_S - && VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO){ - if agent.status_frame() > 1 && agent.status_frame() < 4{ + && VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO){ + if fighter.status_frame() > 1 && fighter.status_frame() < 4{ ControlModule::reset_main_stick(boma); } } - VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, false); + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG, false); } //checking if gordo does not exist, but is not removed by this function - else if !ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO) && !VarModule::is_flag(agent.battle_object, vars::dedede::instance::IS_REMOVED_FLAG){ - VarModule::set_flag(agent.battle_object, vars::dedede::instance::IS_DASH_GORDO, false); - VarModule::set_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); + else if !ArticleModule::is_exist(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_GORDO) && !VarModule::is_flag(fighter.battle_object, vars::dedede::instance::IS_REMOVED_FLAG){ + VarModule::set_flag(fighter.battle_object, vars::dedede::instance::IS_DASH_GORDO, false); + VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); } } -unsafe fn super_jump_fail_edge_cancel(agent: &mut L2CFighterCommon){ - if agent.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE) && agent.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - StatusModule::change_status_force(agent.boma(), *FIGHTER_STATUS_KIND_FALL, false); +unsafe fn super_jump_fail_edge_cancel(fighter: &mut L2CFighterCommon){ + if fighter.is_status(*FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + StatusModule::change_status_force(fighter.boma(), *FIGHTER_STATUS_KIND_FALL, false); } } @@ -206,10 +206,10 @@ unsafe fn bair_foot_rotation_scaling(boma: &mut BattleObjectModuleAccessor) { } } -unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { - if !agent.is_in_hitlag() - && !StatusModule::is_changing(agent.module_accessor) - && agent.is_status_one_of(&[ +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_LW, @@ -232,49 +232,50 @@ unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_FALL, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_PASS ]) - && agent.is_situation(*SITUATION_KIND_AIR) { - agent.sub_air_check_dive(); - if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); } } } } -pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { +pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { //bair_foot_rotation_scaling(boma); super_dedede_jump_quickfall(boma, frame); - gordo_recatch(boma, frame, agent); - angled_inhale_shot(agent); - super_jump_fail_edge_cancel(agent); - fastfall_specials(agent); + gordo_recatch(boma, frame, fighter); + angled_inhale_shot(fighter); + super_jump_fail_edge_cancel(fighter); + fastfall_specials(fighter); } -pub extern "C" fn dedede_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn dedede_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(agent); - dedede_frame(agent) + common::opff::fighter_common_opff(fighter); + dedede_frame(fighter) } } -pub unsafe fn dedede_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(agent) { - moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn dedede_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(fighter) { + moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, dedede_frame_wrapper); } diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status.rs index 4375f08ea8..a6868f101c 100644 --- a/fighters/dedede/src/status.rs +++ b/fighters/dedede/src/status.rs @@ -4,8 +4,8 @@ use globals::*; mod special_hi; mod special_lw; -unsafe extern "C" fn on_start(agent: &mut L2CFighterCommon){ - VarModule::set_int(agent.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon){ + VarModule::set_int(fighter.battle_object, vars::dedede::instance::RECATCH_COUNTER, 0); } pub fn install(agent: &mut Agent) { diff --git a/fighters/dedede/src/status/special_hi.rs b/fighters/dedede/src/status/special_hi.rs index a61e4bbb9f..220e091b89 100644 --- a/fighters/dedede/src/status/special_hi.rs +++ b/fighters/dedede/src/status/special_hi.rs @@ -2,9 +2,9 @@ use super::*; use globals::*; -unsafe extern "C" fn specialhifailure_main(agent: &mut L2CFighterCommon) -> L2CValue{ - MotionModule::change_motion(agent.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); - StatusModule::change_status_force(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); +unsafe extern "C" fn specialhifailure_main(fighter: &mut L2CFighterCommon) -> L2CValue{ + MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); return 0.into(); } diff --git a/fighters/dedede/src/status/special_lw.rs b/fighters/dedede/src/status/special_lw.rs index aa45d67aaf..e44e8b10b8 100644 --- a/fighters/dedede/src/status/special_lw.rs +++ b/fighters/dedede/src/status/special_lw.rs @@ -2,9 +2,9 @@ use super::*; use globals::*; -unsafe extern "C" fn speciallwjumpsquat_exec(agent: &mut L2CFighterCommon) -> L2CValue{ - if ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ - StatusModule::change_status_force(agent.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); +unsafe extern "C" fn speciallwjumpsquat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ + if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); } return 0.into(); } diff --git a/fighters/pickel/src/forge/opff.rs b/fighters/pickel/src/forge/opff.rs index 4dbc1552f9..3641ef7388 100644 --- a/fighters/pickel/src/forge/opff.rs +++ b/fighters/pickel/src/forge/opff.rs @@ -3,9 +3,9 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -pub unsafe extern "C" fn pickel_forge_frame(agent: &mut smash::lua2cpp::L2CFighterBase){ - let boma = agent.boma(); - let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; +pub unsafe extern "C" fn pickel_forge_frame(weapon: &mut smash::lua2cpp::L2CFighterBase){ + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { let pickel = utils::util::get_battle_object_from_id(owner_id); let pickel_boma = &mut *(*pickel).module_accessor; diff --git a/fighters/pickel/src/trolley/opff.rs b/fighters/pickel/src/trolley/opff.rs index d8bc39ed55..140868ac32 100644 --- a/fighters/pickel/src/trolley/opff.rs +++ b/fighters/pickel/src/trolley/opff.rs @@ -3,9 +3,9 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -pub unsafe extern "C" fn pickel_trolley_frame(agent: &mut smash::lua2cpp::L2CFighterBase) { - let boma = agent.boma(); - let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; +pub unsafe extern "C" fn pickel_trolley_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_PICKEL { let pickel = utils::util::get_battle_object_from_id(owner_id); let pickel_boma = &mut *(*pickel).module_accessor; From fd98d36697cd28895a012ab33ecc10e653ccf8db Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 19 Mar 2024 10:37:16 -0500 Subject: [PATCH 022/172] toon lonk --- fighters/toonlink/src/acmd/aerials.rs | 279 ++++++++++---------- fighters/toonlink/src/acmd/ground.rs | 97 ++++--- fighters/toonlink/src/acmd/mod.rs | 16 +- fighters/toonlink/src/acmd/other.rs | 288 ++++++++------------- fighters/toonlink/src/acmd/smashes.rs | 104 ++++---- fighters/toonlink/src/acmd/specials.rs | 84 +++--- fighters/toonlink/src/acmd/throws.rs | 26 +- fighters/toonlink/src/acmd/tilts.rs | 75 +++--- fighters/toonlink/src/lib.rs | 9 +- fighters/toonlink/src/opff.rs | 6 +- fighters/toonlink/src/status.rs | 233 +---------------- fighters/toonlink/src/status/special_hi.rs | 224 ++++++++++++++++ 12 files changed, 671 insertions(+), 770 deletions(-) create mode 100644 fighters/toonlink/src/status/special_hi.rs diff --git a/fighters/toonlink/src/acmd/aerials.rs b/fighters/toonlink/src/acmd/aerials.rs index a1f8f89f27..4028d0cbe6 100644 --- a/fighters/toonlink/src/acmd/aerials.rs +++ b/fighters/toonlink/src/acmd/aerials.rs @@ -1,297 +1,294 @@ use super::*; use crate::vars::*; -unsafe extern "C" fn toonlink_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.5, 50, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 10.5, 50, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.5, 50, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.5, 50, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 10.5, 50, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 35, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 9.0, 35, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 35, 100, 0, 20, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 35, 100, 0, 20, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 9.0, 35, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.833); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.833); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 361, 95, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 361, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 1.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 6.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 361, 95, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 361, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 1.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 13.0, 361, 98, 0, 35, 5.0, 6.0, -1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn toonlink_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 5.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 67, 105, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 67, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 67, 105, 0, 25, 5.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 67, 105, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 67, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.667); + FT_MOTION_RATE(agent, 1.667); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn toonlink_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state,4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn toonlink_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 6.25, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 5.25, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 1.5, 367, 100, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 6.25, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.5, 367, 100, 0, 35, 5.25, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 1.5, 367, 100, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 6.75, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 126, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 6.75, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 80, 126, 0, 40, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 126, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn toonlink_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("toonlink_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("toonlink_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_club_tornado"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 90, 90, 0, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 90, 90, 0, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("toonlink_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("toonlink_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, true); } - } -unsafe extern "C" fn toonlink_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("shield") as i64, hash40("shield_back") as i64); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 33.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercem"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_piercem"), 0); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("shield") as i64, hash40("shield_normal") as i64); } } -unsafe extern "C" fn toonlink_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 1.6, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1.6, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } //get_value_int(*SO_VAR_INT_PREV_STATUS); //0x120e80(0, *FIGHTER_STATUS_KIND_DAMAGE_FLY); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); WorkModule::on_flag(boma,*FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 268, 80, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 268, 80, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 268, 34, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 268, 34, 0, 40, 5.5, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 98, 0, 40, 5.0, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 98, 0, 40, 5.0, 1.0, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 71.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn toonlink_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attackairn", toonlink_attack_air_n_game) - .acmd("game_attackairf", toonlink_attack_air_f_game) - .acmd("expression_attackairf", toonlink_attack_air_f_expression) - .acmd("game_attackairb", toonlink_attack_air_b_game) - .acmd("expression_attackairb", toonlink_attack_air_b_expression) - .acmd("game_attackairhi", toonlink_attack_air_hi_game) - .acmd("effect_attackairhi", toonlink_attack_air_hi_effect) - .acmd("expression_attackairhi", toonlink_attack_air_hi_expression) - .acmd("game_attackairlw", toonlink_attack_air_lw_game) - .acmd("game_aircatchlanding", toonlink_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/toonlink/src/acmd/ground.rs b/fighters/toonlink/src/acmd/ground.rs index fe982d25bf..8d16ad42ef 100644 --- a/fighters/toonlink/src/acmd/ground.rs +++ b/fighters/toonlink/src/acmd/ground.rs @@ -1,93 +1,92 @@ use super::*; -unsafe extern "C" fn toonlink_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 1.8, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 1.8, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn toonlink_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.2, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.2, 0.0, 6.0, 11.0, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.2, 0.0, 6.0, 14.5, Some(0.0), Some(6.0), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn toonlink_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 30, 70, 0, 75, 3.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 30, 70, 0, 70, 4.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 30, 70, 0, 75, 3.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 30, 70, 0, 70, 4.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(8.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn toonlink_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.2, 5.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 65, 70, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 65, 70, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.2, 5.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.0, 65, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 65, 70, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 65, 70, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attack11", toonlink_attack_11_game) - .acmd("game_attack12", toonlink_attack_12_game) - .acmd("game_attack13", toonlink_attack_13_game) - .acmd("game_attackdash", toonlink_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/toonlink/src/acmd/mod.rs b/fighters/toonlink/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/toonlink/src/acmd/mod.rs +++ b/fighters/toonlink/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/toonlink/src/acmd/other.rs b/fighters/toonlink/src/acmd/other.rs index 7639fb77ee..b7a66fa662 100644 --- a/fighters/toonlink/src/acmd/other.rs +++ b/fighters/toonlink/src/acmd/other.rs @@ -1,292 +1,212 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_toonlink_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_toonlink_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_toonlink_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_toonlink_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_toonlink_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_toonlink_step_right_m")); } } -unsafe extern "C" fn toonlink_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn toonlink_jump_aerial_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); +unsafe extern "C" fn effect_jumpaerialfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } - } -unsafe extern "C" fn toonlink_jump_aerial_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); +unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 5.0, -2.0, 0.0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_chicken_feather"), Hash40::new("top"), 0.0, 4.0, 1.5, 0.0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } - } -unsafe extern "C" fn toonlink_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, false, 0); ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); ArticleModule::change_status(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("shoot"), false, 0.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("back"), false, 0.0); WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 53.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 68.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn toonlink_air_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", toonlink_turn_dash_game) - .acmd("effect_jumpaerialfront", toonlink_jump_aerial_f_effect) - .acmd("effect_jumpaerialback", toonlink_jump_aerial_b_effect) - .acmd("game_aircatch", toonlink_air_catch_game) - .acmd("effect_aircatch", toonlink_air_catch_effect) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("effect_jumpaerialfront", effect_jumpaerialfront); + agent.acmd("effect_jumpaerialback", effect_jumpaerialback); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("effect_aircatch", effect_aircatch); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/toonlink/src/acmd/smashes.rs b/fighters/toonlink/src/acmd/smashes.rs index 2867161a69..62e4cc63fa 100644 --- a/fighters/toonlink/src/acmd/smashes.rs +++ b/fighters/toonlink/src/acmd/smashes.rs @@ -1,101 +1,97 @@ - use super::*; -unsafe extern "C" fn toonlink_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 16.0, 40, 105, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("clavicler"), 16.0, 40, 105, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 16.0, 40, 105, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 16.0, 40, 105, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("clavicler"), 16.0, 40, 105, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - } - + } } -unsafe extern "C" fn toonlink_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 100, 100, 0, 43, 6.0, 0.0, 6.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 43, 4.0, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 96, 100, 0, 43, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 96, 100, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 100, 100, 0, 43, 6.0, 0.0, 6.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 43, 4.0, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 96, 100, 0, 43, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 96, 100, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 30, 4.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 14.0, 96, 100, 0, 30, 4.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 11); - ATK_POWER(fighter, 1, 11); - ATK_POWER(fighter, 2, 11); - ATK_POWER(fighter, 3, 11); + if is_excute(agent) { + ATK_POWER(agent, 0, 11); + ATK_POWER(agent, 1, 11); + ATK_POWER(agent, 2, 11); + ATK_POWER(agent, 3, 11); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn toonlink_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 30, 89, 0, 55, 4.0, 0.0, 2.2, 16.0, Some(0.0), Some(2.9), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 30, 89, 0, 55, 4.0, 0.0, 2.2, 16.0, Some(0.0), Some(2.9), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 30, 89, 0, 55, 4.3, 0.0, 4.2, -16.0, Some(0.0), Some(4.2), Some(-5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 13.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 30, 89, 0, 55, 4.3, 0.0, 4.2, -16.0, Some(0.0), Some(4.2), Some(-5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 13.0, 30, 89, 0, 55, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.880); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.880); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attacks4", toonlink_attack_s4_s_game) - .acmd("game_attackhi4", toonlink_attack_hi4_game) - .acmd("game_attacklw4", toonlink_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/toonlink/src/acmd/specials.rs b/fighters/toonlink/src/acmd/specials.rs index 12b2c64eb0..aaded0375a 100644 --- a/fighters/toonlink/src/acmd/specials.rs +++ b/fighters/toonlink/src/acmd/specials.rs @@ -1,107 +1,103 @@ - use super::*; -unsafe extern "C" fn toonlink_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 90, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 74, 100, 83, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.5, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 90, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 74, 100, 83, 0, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.5, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 90, 0, 5.5, 3.0, 2.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 90, 0, 5.5, 3.0, 2.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 88, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 88, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 88, 0, 5.5, 2.5, 1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 88, 0, 5.5, 2.5, 1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 77, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 77, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.0, 0.0, 8.5, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 80, 0, 5.5, 3.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 120, 100, 80, 0, 5.5, 3.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 83, 100, 74, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 83, 100, 74, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 100, 65, 0, 6.5, 0.0, 9.0, 13.5, Some(0.0), Some(7.5), Some(7.5), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 140, 100, 80, 0, 5.5, 4.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 140, 100, 80, 0, 5.5, 4.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 186, 0, 40, 8.5, 0.0, 7.5, 13.0, Some(0.0), Some(7.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 186, 0, 40, 8.5, 0.0, 7.5, 13.0, Some(0.0), Some(7.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_specialairhi", toonlink_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/toonlink/src/acmd/throws.rs b/fighters/toonlink/src/acmd/throws.rs index d58fa3595e..facc07a396 100644 --- a/fighters/toonlink/src/acmd/throws.rs +++ b/fighters/toonlink/src/acmd/throws.rs @@ -1,28 +1,26 @@ use super::*; -unsafe extern "C" fn toonlink_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 130, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 130, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -16, 1); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -16, 1); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_throwb", toonlink_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/toonlink/src/acmd/tilts.rs b/fighters/toonlink/src/acmd/tilts.rs index 3f63db0118..9cd2c532a1 100644 --- a/fighters/toonlink/src/acmd/tilts.rs +++ b/fighters/toonlink/src/acmd/tilts.rs @@ -1,68 +1,65 @@ - use super::*; -unsafe extern "C" fn toonlink_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 38, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 20, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 38, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 11.0, 361, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword2"), 11.0, 361, 100, 0, 25, 4.5, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 20, 100, 0, 25, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn toonlink_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 9.0, 95, 86, 0, 46, 3.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.0, 85, 86, 0, 46, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 9.0, 95, 86, 0, 46, 3.8, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.0, 85, 86, 0, 46, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 100, 86, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn toonlink_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 75, 65, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 9.0, 28, 34, 0, 70, 3.5, 8.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 75, 65, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 9.0, 75, 65, 0, 65, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 9.0, 28, 34, 0, 70, 3.5, 8.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TOONLINK_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("toonlink") - .acmd("game_attacks3", toonlink_attack_s3_s_game) - .acmd("game_attackhi3", toonlink_attack_hi3_game) - .acmd("game_attacklw3", toonlink_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/toonlink/src/lib.rs b/fighters/toonlink/src/lib.rs index 8e2ddcc726..0f3c10662d 100644 --- a/fighters/toonlink/src/lib.rs +++ b/fighters/toonlink/src/lib.rs @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("toonlink"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/toonlink/src/opff.rs b/fighters/toonlink/src/opff.rs index 734a43467a..7d81f47172 100644 --- a/fighters/toonlink/src/opff.rs +++ b/fighters/toonlink/src/opff.rs @@ -110,8 +110,6 @@ pub unsafe fn toonlink_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("toonlink") - .on_line(Main, toonlink_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, toonlink_frame_wrapper); } diff --git a/fighters/toonlink/src/status.rs b/fighters/toonlink/src/status.rs index 476c669639..098ec67405 100644 --- a/fighters/toonlink/src/status.rs +++ b/fighters/toonlink/src/status.rs @@ -1,235 +1,8 @@ use super::*; use globals::*; +mod special_hi; -// FIGHTER_STATUS_KIND_SPECIAL_HI // - -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - } - let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 - } else { - 0 as u64 - }; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - 0, - 0, - 0, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // - -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - } - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.55; - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if !StatusModule::is_changing(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); - return 0.into() - } - } - if frame < 46.0 { - if stick_x != 0.0 { - KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - return 0.into() -} - -unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} -pub fn install() { - smashline::Agent::new("toonlink") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status( - Pre, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - pre_specialhi_end, - ) - .status( - Main, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - specialhi_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + special_hi::install(agent); } diff --git a/fighters/toonlink/src/status/special_hi.rs b/fighters/toonlink/src/status/special_hi.rs new file mode 100644 index 0000000000..912f4ae941 --- /dev/null +++ b/fighters/toonlink/src/status/special_hi.rs @@ -0,0 +1,224 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI // + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + } + let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 + } else { + 0 as u64 + }; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + 0, + 0, + 0, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // + +unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + } + fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) +} + +unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.55; + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if !StatusModule::is_changing(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); + return 0.into() + } + } + if frame < 46.0 { + if stick_x != 0.0 { + KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); +} From b28f86509526388ea2d6bfca48904643de1f4d67 Mon Sep 17 00:00:00 2001 From: SirTanknSpank <115139386+SirTanknSpank@users.noreply.github.com> Date: Wed, 20 Mar 2024 06:59:49 -0500 Subject: [PATCH 023/172] The opff/status/rand fixes in question I completely forgot how to read --- fighters/ganon/src/opff.rs | 52 ++++----- fighters/ganon/src/status.rs | 24 ++-- fighters/ganon/src/status/attack_lw3.rs | 66 +++++------ .../ganon/src/status/special_air_s_catch.rs | 38 +++--- fighters/ganon/src/status/special_lw.rs | 20 ++-- fighters/ganon/src/status/special_n.rs | 110 +++++++++--------- fighters/ganon/src/status/special_n_float.rs | 68 +++++------ fighters/ganon/src/status/special_s.rs | 12 +- 8 files changed, 195 insertions(+), 195 deletions(-) diff --git a/fighters/ganon/src/opff.rs b/fighters/ganon/src/opff.rs index 5dded46bc5..ed0a2d08a7 100644 --- a/fighters/ganon/src/opff.rs +++ b/fighters/ganon/src/opff.rs @@ -28,10 +28,10 @@ use globals::*; // } // } -unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { - if !agent.is_in_hitlag() - && !StatusModule::is_changing(agent.module_accessor) - && agent.is_status_one_of(&[ +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_HI, @@ -39,44 +39,44 @@ unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { *FIGHTER_GANON_STATUS_KIND_SPECIAL_HI_THROW, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_WALL_END ]) - && agent.is_situation(*SITUATION_KIND_AIR) { - agent.sub_air_check_dive(); - if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); } } } } -pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { +pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { // dtaunt_counter(boma, motion_kind, frame); // repeated_warlock_punch_turnaround(boma, status_kind, stick_x, facing, frame); - fastfall_specials(agent); + fastfall_specials(fighter); } -pub extern "C" fn ganon_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn ganon_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(agent); - ganon_frame(agent) + common::opff::fighter_common_opff(fighter); + ganon_frame(fighter) } } -pub unsafe fn ganon_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(agent) { - moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn ganon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(fighter) { + moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } pub fn install(agent: &mut Agent) { diff --git a/fighters/ganon/src/status.rs b/fighters/ganon/src/status.rs index a6968a7fe1..bd6c806a54 100644 --- a/fighters/ganon/src/status.rs +++ b/fighters/ganon/src/status.rs @@ -10,8 +10,8 @@ mod special_s; mod special_air_s_catch; /// Prevents side b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_n_callback(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N) { +unsafe extern "C" fn should_use_special_n_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N) { false.into() } else { true.into() @@ -19,25 +19,25 @@ unsafe extern "C" fn should_use_special_n_callback(agent: &mut L2CFighterCommon) } /// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.is_situation(*SITUATION_KIND_GROUND) || agent.is_situation(*SITUATION_KIND_CLIFF) - || agent.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); } true.into() } -extern "C" fn on_start(agent: &mut L2CFighterCommon) { +extern "C" fn on_start(fighter: &mut L2CFighterCommon) { unsafe { // set the callbacks on agent init - agent.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); - agent.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } } -pub unsafe fn ganon_set_air(agent: &mut L2CFighterCommon) { - agent.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); +pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { + fighter.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } pub fn install(agent: &mut Agent) { diff --git a/fighters/ganon/src/status/attack_lw3.rs b/fighters/ganon/src/status/attack_lw3.rs index 614f414275..9aea330e90 100644 --- a/fighters/ganon/src/status/attack_lw3.rs +++ b/fighters/ganon/src/status/attack_lw3.rs @@ -1,17 +1,17 @@ use super::*; -unsafe extern "C" fn attack_lw3_main(agent: &mut L2CFighterCommon) -> L2CValue { - agent.status_AttackLw3_common(); - agent.main_shift(attack_lw3_main_loop) +unsafe extern "C" fn attack_lw3_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_AttackLw3_common(); + fighter.main_shift(attack_lw3_main_loop) } -unsafe extern "C" fn attack_lw3_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(agent.module_accessor) { - if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) - && agent.global_table[globals::CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 != 0 { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); +unsafe extern "C" fn attack_lw3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) + && fighter.global_table[globals::CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 != 0 { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); MotionModule::change_motion( - agent.module_accessor, + fighter.module_accessor, Hash40::new("attack_lw3_2"), 0.0, 1.0, @@ -20,62 +20,62 @@ unsafe extern "C" fn attack_lw3_main_loop(agent: &mut L2CFighterCommon) -> L2CVa false, false ); - agent.clear_lua_stack(); - sv_kinetic_energy::set_motion_energy_update_flag(agent.lua_state_agent); + fighter.clear_lua_stack(); + sv_kinetic_energy::set_motion_energy_update_flag(fighter.lua_state_agent); return 0.into(); } } - if CancelModule::is_enable_cancel(agent.module_accessor) - && agent.sub_wait_ground_check_common(false.into()).get_bool() { + if CancelModule::is_enable_cancel(fighter.module_accessor) + && fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 0.into(); } - if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return 0.into(); } - let jump_attack_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME); + let jump_attack_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME); if 0 < jump_attack_frame { - if !StopModule::is_stop(agent.module_accessor) - && agent.sub_check_button_jump().get_bool() { - let log = agent.status_attack(); + if !StopModule::is_stop(fighter.module_accessor) + && fighter.sub_check_button_jump().get_bool() { + let log = fighter.status_attack(); let info = log[0x10f40d7b92u64].get_i64(); - let mot = MotionModule::motion_kind(agent.module_accessor); + let mot = MotionModule::motion_kind(fighter.module_accessor); MotionAnimcmdModule::call_script_single( - agent.module_accessor, + fighter.module_accessor, *FIGHTER_ANIMCMD_EXPRESSION, Hash40::new_raw(mot), -1 ); - WorkModule::set_int64(agent.module_accessor, info, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); - agent.change_status_jump_mini_attack(true.into()); + WorkModule::set_int64(fighter.module_accessor, info, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + fighter.change_status_jump_mini_attack(true.into()); return 1.into(); } } if 1 == jump_attack_frame { - if !agent.global_table[globals::IS_STOPPING].get_bool() - && WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND) > 0 { - let log = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); - FighterStatusModuleImpl::reset_log_action_info(agent.module_accessor, log); - WorkModule::set_int64(agent.module_accessor, 0, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + if !fighter.global_table[globals::IS_STOPPING].get_bool() + && WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND) > 0 { + let log = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); + FighterStatusModuleImpl::reset_log_action_info(fighter.module_accessor, log); + WorkModule::set_int64(fighter.module_accessor, 0, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_LOG_ATTACK_KIND); } } - if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_STATUS_KIND_SQUAT_WAIT.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_SQUAT_WAIT.into(), false.into()); } 0.into() } -unsafe extern "C" fn attack_lw3_end(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { sv_kinetic_energy!( set_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0 ); - agent.status_end_AttackLw3() + fighter.status_end_AttackLw3() } pub fn install(agent: &mut Agent) { diff --git a/fighters/ganon/src/status/special_air_s_catch.rs b/fighters/ganon/src/status/special_air_s_catch.rs index 88719e52d7..d265f16711 100644 --- a/fighters/ganon/src/status/special_air_s_catch.rs +++ b/fighters/ganon/src/status/special_air_s_catch.rs @@ -1,15 +1,15 @@ use super::*; use globals::*; -unsafe extern "C" fn special_air_s_catch_main(agent: &mut L2CFighterCommon) -> L2CValue { - MotionModule::set_rate(agent.module_accessor, 0.0); - agent.main_shift(special_air_s_catch_main_loop) +unsafe extern "C" fn special_air_s_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::set_rate(fighter.module_accessor, 0.0); + fighter.main_shift(special_air_s_catch_main_loop) } -unsafe extern "C" fn special_air_s_catch_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.global_table[globals::CURRENT_FRAME].get_f32() == 1.0 { +unsafe extern "C" fn special_air_s_catch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[globals::CURRENT_FRAME].get_f32() == 1.0 { MotionModule::change_motion( - agent.module_accessor, + fighter.module_accessor, Hash40::new("special_air_s_catch"), 0.0, 1.0, @@ -18,33 +18,33 @@ unsafe extern "C" fn special_air_s_catch_main_loop(agent: &mut L2CFighterCommon) false, false ); - ganon_set_air(agent); - let speed_x = WorkModule::get_float(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); - let speed_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); - KineticModule::clear_speed_attr(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ganon_set_air(fighter); + let speed_x = WorkModule::get_float(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_X); + let speed_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_FLOAT_EXPLOSION_AIR_SPEED_Y); + KineticModule::clear_speed_attr(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); sv_kinetic_energy!( set_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y ); - let lr = PostureModule::lr(agent.module_accessor); + let lr = PostureModule::lr(fighter.module_accessor); sv_kinetic_energy!( set_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_x * lr, 0.0 ); - KineticModule::suspend_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::suspend_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - if agent.global_table[globals::CURRENT_FRAME].get_f32() > 1.0 { - if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_FALL.into(), false.into()); + if fighter.global_table[globals::CURRENT_FRAME].get_f32() > 1.0 { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_FALL.into(), false.into()); return 1.into(); } - if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_END.into(), false.into()); + if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_END.into(), false.into()); return 1.into(); } } diff --git a/fighters/ganon/src/status/special_lw.rs b/fighters/ganon/src/status/special_lw.rs index 1d6c9f5c4c..558b2a2496 100644 --- a/fighters/ganon/src/status/special_lw.rs +++ b/fighters/ganon/src/status/special_lw.rs @@ -1,9 +1,9 @@ use super::*; use globals::*; -unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - agent.module_accessor, + fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_KEEP as u32, @@ -16,7 +16,7 @@ unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -31,22 +31,22 @@ unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_lw_end_main(agent: &mut L2CFighterCommon) -> L2CValue { - let x_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); +unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let ret = smashline::original_status(Main, agent, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END)(agent); + let ret = smashline::original_status(Main, fighter, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END)(fighter); - let start_situation = WorkModule::get_int(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); - let end_situation = WorkModule::get_int(agent.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_END_SITUATION); + let start_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); + let end_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_END_SITUATION); if start_situation == *SITUATION_KIND_AIR && end_situation == *FIGHTER_GANON_KICK_END_SITUATION_AG { // Allows you to slide when landing early into Wizard Kick's animation - KineticModule::add_speed(agent.module_accessor, &Vector3f{x: x_speed.abs(), y: 0.0, z: 0.0}); + KineticModule::add_speed(fighter.module_accessor, &Vector3f{x: x_speed.abs(), y: 0.0, z: 0.0}); } else if start_situation == *SITUATION_KIND_AIR && end_situation == *FIGHTER_GANON_KICK_END_SITUATION_AA { // Allows you to slide when landing late into Wizard Kick's animation - WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_GANON_STATUS_WORK_ID_INT_GANON_KICK_START_SITUATION); } ret diff --git a/fighters/ganon/src/status/special_n.rs b/fighters/ganon/src/status/special_n.rs index 8e6cf81681..f40235a237 100644 --- a/fighters/ganon/src/status/special_n.rs +++ b/fighters/ganon/src/status/special_n.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn special_n_pre(agent: &mut L2CFighterCommon) -> L2CValue { - agent.sub_status_pre_SpecialNCommon(); +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( - agent.module_accessor, + fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_AIR as u32, @@ -16,7 +16,7 @@ unsafe extern "C" fn special_n_pre(agent: &mut L2CFighterCommon) -> L2CValue { ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -31,139 +31,139 @@ unsafe extern "C" fn special_n_pre(agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_main(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { // Motion Kind change depending on situation. - VarModule::on_flag(agent.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); - agent.sub_change_motion_by_situation(L2CValue::Hash40s("float_start"), L2CValue::Hash40s("float_air_start"), false.into()); - if agent.global_table[globals::SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + VarModule::on_flag(fighter.battle_object, vars::ganon::instance::DISABLE_SPECIAL_N); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); + fighter.sub_change_motion_by_situation(L2CValue::Hash40s("float_start"), L2CValue::Hash40s("float_air_start"), false.into()); + if fighter.global_table[globals::SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); let speed_y = { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - sv_kinetic_energy::get_speed_y(agent.lua_state_agent) + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) }; sv_kinetic_energy!( set_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y.clamp(-0.05, 0.5) ); sv_kinetic_energy!( set_accel, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); } else { - StatusModule::set_situation_kind(agent.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR); + StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR); } - agent.main_shift(special_n_main_loop) + fighter.main_shift(special_n_main_loop) } -unsafe extern "C" fn special_n_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // Decided which direction Ganon should float. - if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); - let stick_x = agent.global_table[globals::STICK_X].get_f32(); + if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); + let stick_x = fighter.global_table[globals::STICK_X].get_f32(); let angle = (45.0 * -stick_x).to_radians(); sv_kinetic_energy!( set_angle, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, angle ); if angle != 0.0 { sv_kinetic_energy!( set_speed_mul, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.2 ); } - VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); } // Increases Ganon's fall speed when this flag is enabled. - if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); let speed_y = { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - sv_kinetic_energy::get_speed_y(agent.lua_state_agent) + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) }; sv_kinetic_energy!( set_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y.clamp(-0.05, 0.1) ); sv_kinetic_energy!( set_accel, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); - VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); } // Make sure if you touch the ground you actually land. - if KineticModule::get_kinetic_type(agent.module_accessor) != *FIGHTER_KINETIC_TYPE_MOTION_AIR - && agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); + if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_MOTION_AIR + && fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); return 0.into(); } // Only perform these actions if vars::ganon::status::FLOAT_ENABLE_ACTIONS is true. - if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { + if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { // if the proper transition terms are enabled, these functions will check for // if Ganon performs an aerial, a double jump, or airdodge. - if agent.sub_transition_group_check_air_cliff().get_bool() - || agent.sub_transition_group_check_air_attack().get_bool() - || agent.sub_transition_group_check_air_jump_aerial().get_bool() - || agent.sub_transition_group_check_air_escape().get_bool() { + if fighter.sub_transition_group_check_air_cliff().get_bool() + || fighter.sub_transition_group_check_air_attack().get_bool() + || fighter.sub_transition_group_check_air_jump_aerial().get_bool() + || fighter.sub_transition_group_check_air_escape().get_bool() { return 1.into(); } // If Special is pressed, enable a flag and transition into the next status. - if agent.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 - || agent.global_table[globals::STICK_Y].get_f32() <= -0.7 { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); + if fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 + || fighter.global_table[globals::STICK_Y].get_f32() <= -0.7 { + VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); // Clear the buffer here so you don't accidentally buffer a side special on cancel. - agent.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), true.into()); + fighter.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), true.into()); return 0.into(); } } // When the animation ends, transition to the next status. - if MotionModule::is_end(agent.module_accessor) { - agent.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(statuses::ganon::SPECIAL_N_FLOAT.into(), false.into()); } 0.into() } -unsafe extern "C" fn special_n_end(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_init(_agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_n_exec(_agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } diff --git a/fighters/ganon/src/status/special_n_float.rs b/fighters/ganon/src/status/special_n_float.rs index 5c2a70b982..553fe8d762 100644 --- a/fighters/ganon/src/status/special_n_float.rs +++ b/fighters/ganon/src/status/special_n_float.rs @@ -1,8 +1,8 @@ use super::*; -unsafe extern "C" fn special_n_float_pre(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - agent.module_accessor, + fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), *FIGHTER_KINETIC_TYPE_FALL, *GROUND_CORRECT_KIND_AIR as u32, @@ -15,7 +15,7 @@ unsafe extern "C" fn special_n_float_pre(agent: &mut L2CFighterCommon) -> L2CVal ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -30,8 +30,8 @@ unsafe extern "C" fn special_n_float_pre(agent: &mut L2CFighterCommon) -> L2CVal 0.into() } -unsafe extern "C" fn special_n_float_main(agent: &mut L2CFighterCommon) -> L2CValue { - let cancel = VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); +unsafe extern "C" fn special_n_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let cancel = VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); let frame = if cancel { 59.0 @@ -40,7 +40,7 @@ unsafe extern "C" fn special_n_float_main(agent: &mut L2CFighterCommon) -> L2CVa 0.0 }; MotionModule::change_motion( - agent.module_accessor, + fighter.module_accessor, Hash40::new("float"), frame, 1.0, @@ -50,63 +50,63 @@ unsafe extern "C" fn special_n_float_main(agent: &mut L2CFighterCommon) -> L2CVa false ); if !cancel { - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE_AIR); sv_kinetic_energy!( set_accel, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.015 // hardcoded value for now ); sv_kinetic_energy!( set_stable_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.05 // hardcoded value for now ); } - agent.main_shift(special_n_float_main_loop) + fighter.main_shift(special_n_float_main_loop) } -unsafe extern "C" fn special_n_float_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // Increases Ganon's fall speed when this flag is enabled. - if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE) { + if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE) { sv_kinetic_energy!( set_stable_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -0.25 // hardcoded value for now ); - VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); } - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } // Make sure if you touch the ground you actually land. - if agent.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); + if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_LANDING_LIGHT.into(), false.into()); return 0.into(); } // Only perform these actions if vars::ganon::status::FLOAT_ENABLE_ACTIONS is true. - if VarModule::is_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { + if VarModule::is_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS) { // if the proper transition terms are enabled, these functions will check for // if Ganon performs an aerial, airdodge, or a double jump. - if agent.sub_transition_group_check_air_cliff().get_bool() - || agent.sub_transition_group_check_air_attack().get_bool() - || agent.sub_transition_group_check_air_jump_aerial().get_bool() - || agent.sub_transition_group_check_air_escape().get_bool() { + if fighter.sub_transition_group_check_air_cliff().get_bool() + || fighter.sub_transition_group_check_air_attack().get_bool() + || fighter.sub_transition_group_check_air_jump_aerial().get_bool() + || fighter.sub_transition_group_check_air_escape().get_bool() { return 1.into(); } // If Special is pressed, enable a flag and transition into the next status. - if agent.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 - || agent.global_table[globals::STICK_Y].get_f32() <= -0.7 { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_CANCEL); + if fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 + || fighter.global_table[globals::STICK_Y].get_f32() <= -0.7 { + VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_CANCEL); MotionModule::change_motion( - agent.module_accessor, + fighter.module_accessor, Hash40::new("float"), 59.0, 1.0, @@ -115,19 +115,19 @@ unsafe extern "C" fn special_n_float_main_loop(agent: &mut L2CFighterCommon) -> false, false ); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); return 0.into(); } } // Transition to Fall when the animation ends. - if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } 0.into() } -unsafe extern "C" fn special_n_float_end(_agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_float_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } diff --git a/fighters/ganon/src/status/special_s.rs b/fighters/ganon/src/status/special_s.rs index 3649f4029e..7eae73ab4a 100644 --- a/fighters/ganon/src/status/special_s.rs +++ b/fighters/ganon/src/status/special_s.rs @@ -1,20 +1,20 @@ use super::*; use globals::*; -unsafe extern "C" fn special_s_exit(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { +unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { return 0.into(); } - if agent.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_S_CATCH { + if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_S_CATCH { sv_kinetic_energy!( clear_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION ); } else { - let landing_lag = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_s"), hash40("explosion_landing_frame_faile")); - WorkModule::set_float(agent.module_accessor, landing_lag, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + let landing_lag = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("explosion_landing_frame_faile")); + WorkModule::set_float(fighter.module_accessor, landing_lag, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); } 0.into() } From 98c8b382ecb6f3f29a372e9f973f26d0a1803ef5 Mon Sep 17 00:00:00 2001 From: SirTanknSpank <115139386+SirTanknSpank@users.noreply.github.com> Date: Wed, 20 Mar 2024 07:04:27 -0500 Subject: [PATCH 024/172] other.rs I still cant read --- fighters/ganon/src/acmd/other.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index 9d3de07106..02a7b44ac7 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -33,7 +33,7 @@ unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -43,7 +43,7 @@ unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -68,7 +68,7 @@ unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -98,7 +98,7 @@ unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -108,7 +108,7 @@ unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; From 537beeb86ec37a6cce051cc7a4331bd6d7c838fb Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 08:30:21 -0500 Subject: [PATCH 025/172] conflicts and cleanup --- fighters/dedede/src/acmd/aerials.rs | 20 ++--- fighters/dedede/src/gordo/acmd/specials.rs | 6 +- fighters/ganon/src/acmd/other.rs | 85 ++------------------ fighters/link/src/boomerang/acmd/specials.rs | 2 +- fighters/pickel/src/fire/acmd/tilts.rs | 4 +- 5 files changed, 21 insertions(+), 96 deletions(-) diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index b76f42caa0..6bdfba83e4 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -294,19 +294,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 0, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("hammer1"), 10.0, 270, 90, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("hammer1"), 15.0, 270, 90, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 4, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 5, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 6, 0, Hash40::new("hammer1"), 10.0, 120, 77, 0, 25, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + ATTACK(agent, 7, 0, Hash40::new("hammer1"), 15.0, 270, 64, 0, 20, 6.0, 17.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 22.0); - if is_excute(fighter) { - //ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); + if is_excute(agent) { + //ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 90, 0, 20, 6.0, 0.0, -7.5, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_dedede_hammer"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_HAMMER); } frame(lua_state, 27.0); if is_excute(agent) { diff --git a/fighters/dedede/src/gordo/acmd/specials.rs b/fighters/dedede/src/gordo/acmd/specials.rs index 3d743bfa90..f2a62943fa 100644 --- a/fighters/dedede/src/gordo/acmd/specials.rs +++ b/fighters/dedede/src/gordo/acmd/specials.rs @@ -62,9 +62,9 @@ unsafe extern "C" fn game_specialsshot(agent: &mut L2CAgentBase) { GroundModule::update_force(boma); /* Reduces damage on every bounce, by 12.5% of its last damage in this case */ let bounce_dmg_multiplier = ((WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) as f32 + 5.0) * 0.125); - ATTACK(agent, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(agent, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, 3.8, 0.0, Some(-3.8), Some(-3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 0.9, 3.8, -3.8, 0.0, Some(-3.8), Some(3.8), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.8 * bounce_dmg_multiplier, 60, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -8.4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } } wait(lua_state, 1.0); diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index 02a7b44ac7..d79b0f9250 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -260,11 +185,11 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); agent.acmd("sound_dash", sound_dash); diff --git a/fighters/link/src/boomerang/acmd/specials.rs b/fighters/link/src/boomerang/acmd/specials.rs index 20c856a879..16533cbf0d 100644 --- a/fighters/link/src/boomerang/acmd/specials.rs +++ b/fighters/link/src/boomerang/acmd/specials.rs @@ -21,7 +21,7 @@ unsafe extern "C" fn game_turn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 40, 0, 50, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } diff --git a/fighters/pickel/src/fire/acmd/tilts.rs b/fighters/pickel/src/fire/acmd/tilts.rs index f177ece1a3..95c7dfa2d9 100644 --- a/fighters/pickel/src/fire/acmd/tilts.rs +++ b/fighters/pickel/src/fire/acmd/tilts.rs @@ -19,8 +19,8 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 366, 100, 40, 0, 3.2, 0.0, 2.8, -2.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } else { FT_MOTION_RATE(agent, 0.75); - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, 2.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 70, 60, 0, 75, 3.2, 0.0, 2.8, -2.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } AttackModule::enable_safe_pos(boma); } From 4b681a64b5898286214bf80cda195cfbe97fc30d Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 08:48:39 -0500 Subject: [PATCH 026/172] Update ground.rs --- fighters/dedede/src/acmd/ground.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/dedede/src/acmd/ground.rs b/fighters/dedede/src/acmd/ground.rs index adda574f07..85fdb2ea75 100644 --- a/fighters/dedede/src/acmd/ground.rs +++ b/fighters/dedede/src/acmd/ground.rs @@ -79,8 +79,8 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 20.0/(25.0-1.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 35, 92, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); ATTACK(agent, 1, 0, Hash40::new("waist"), 14.0, 35, 92, 0, 40, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_DEDEDE, *ATTACK_REGION_BODY); } From 81e88f5a72f879de07ac8f465fcae1c9802e1a3c Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 13:22:41 -0500 Subject: [PATCH 027/172] sheik also fixes rumble on her up smash --- fighters/sheik/src/acmd/aerials.rs | 275 +++++++++++---------- fighters/sheik/src/acmd/ground.rs | 136 +++++----- fighters/sheik/src/acmd/mod.rs | 16 +- fighters/sheik/src/acmd/other.rs | 243 ++++++------------ fighters/sheik/src/acmd/smashes.rs | 193 +++++++-------- fighters/sheik/src/acmd/specials.rs | 155 ++++-------- fighters/sheik/src/acmd/throws.rs | 3 +- fighters/sheik/src/acmd/tilts.rs | 158 ++++++------ fighters/sheik/src/fusin/acmd/mod.rs | 7 + fighters/sheik/src/fusin/acmd/specials.rs | 21 ++ fighters/sheik/src/fusin/mod.rs | 9 + fighters/sheik/src/lib.rs | 15 +- fighters/sheik/src/needle/acmd/mod.rs | 7 + fighters/sheik/src/needle/acmd/specials.rs | 13 + fighters/sheik/src/needle/mod.rs | 9 + fighters/sheik/src/opff.rs | 8 +- 16 files changed, 585 insertions(+), 683 deletions(-) create mode 100644 fighters/sheik/src/fusin/acmd/mod.rs create mode 100644 fighters/sheik/src/fusin/acmd/specials.rs create mode 100644 fighters/sheik/src/fusin/mod.rs create mode 100644 fighters/sheik/src/needle/acmd/mod.rs create mode 100644 fighters/sheik/src/needle/acmd/specials.rs create mode 100644 fighters/sheik/src/needle/mod.rs diff --git a/fighters/sheik/src/acmd/aerials.rs b/fighters/sheik/src/acmd/aerials.rs index 90e5827dac..356f22b468 100644 --- a/fighters/sheik/src/acmd/aerials.rs +++ b/fighters/sheik/src/acmd/aerials.rs @@ -1,133 +1,130 @@ use super::*; -unsafe extern "C" fn sheik_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 3.5, 4.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 100, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 3.5, 4.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 100, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 3.5, 3.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 361, 105, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 361, 105, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 3.5, 3.0, -0.1, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 105, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 361, 105, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 361, 105, 0, 30, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(7.7-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(7.7-5.0)); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 5.5, 50, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.5, 50, 100, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 5.5, 50, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.5, 50, 100, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.7); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.7)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.7)); } frame(lua_state, 8.4); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(9.0-8.4)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(9.0-8.4)); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn sheik_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sheik_attack_cut"), Hash40::new("top"), -1.5, 6.3, 9.7, 180, 200, 67, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sheik_attack_cut"), Hash40::new("top"), -1.5, 6.3, 9.7, 180, 200, 67, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } } -unsafe extern "C" fn sheik_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 35, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 35, 2.75, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 361, 100, 0, 35, 4.5, 3.8, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 35, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 35, 2.75, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 361, 100, 0, 35, 4.5, 3.8, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 95, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 95, 0, 25, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 361, 95, 0, 25, 3.2, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 361, 95, 0, 25, 3.7, 3.0, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 95, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 95, 0, 25, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 361, 95, 0, 25, 3.2, -0.75, 0.0, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 361, 95, 0, 25, 3.7, 3.0, -0.2, 0.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 1.5, 367, 80, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 367, 80, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 1.5, 367, 80, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legl"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneel"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legl"), 6.0, 80, 135, 0, 45, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -145,105 +142,111 @@ unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sheik_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 80, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 80, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 275, 100, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 275, 100, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 280, 76, 0, 10, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 280, 76, 0, 10, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 80, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 85, 0, 35, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 80, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 85, 0, 35, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 2, false); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.735); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.735); AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sheik_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 5.0, 10.0, -4.0, 70, 0, 0, 0.8, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.1, true, 0.95); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.1, true, 0.95); } - } -unsafe extern "C" fn sheik_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_sheik_landing02")); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent){ + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent){ + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sheik_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); - } +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); +} + +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_sheik_landing02")); } } -unsafe extern "C" fn sheik_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 13.0); - if is_excute(fighter){ - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } - - frame(lua_state, 13.0); - if is_excute(fighter){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 21.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attackairn", sheik_attack_air_n_game) - .acmd("game_attackairf", sheik_attack_air_f_game) - .acmd("effect_attackairf", sheik_attack_air_f_effect) - .acmd("game_attackairb", sheik_attack_air_b_game) - .acmd("game_attackairhi", sheik_attack_air_hi_game) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", sheik_attack_air_lw_game) - .acmd("effect_attackairlw", sheik_attack_air_lw_effect) - .acmd("sound_landingairlw", sheik_landing_air_lw_sound) - .acmd("expression_landingairlw", sheik_landing_air_lw_expression) - .acmd("expression_attackairlw", sheik_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/sheik/src/acmd/ground.rs b/fighters/sheik/src/acmd/ground.rs index 927ae8e745..3b9a0ac7ec 100644 --- a/fighters/sheik/src/acmd/ground.rs +++ b/fighters/sheik/src/acmd/ground.rs @@ -1,123 +1,117 @@ - use super::*; -unsafe extern "C" fn sheik_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 70, 80, 0, 10, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 80, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 70, 80, 0, 10, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sheik_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sheik_attack_cut"), Hash40::new("top"), 2, 10.0, 5.0, 0, -20, -18, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sheik_attack_cut"), Hash40::new("top"), 2, 10.0, 5.0, 0, -20, -18, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sheik_attack_cut"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sheik_attack_cut"), -1); } } -unsafe extern "C" fn sheik_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 70, 50, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 70, 50, 0, 35, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 70, 50, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(7.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 15, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(7.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sheik_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -1.0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -1.0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line_b"), true, true); } } -unsafe extern "C" fn sheik_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.0, -3.8, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, -1.1, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, 2.3, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.0, -3.8, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, -1.1, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 82, 0, 40, 4.2, 2.3, 0.0, -1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 60, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 60, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 75, 85, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 361, 100, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 361, 100, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 34, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attack11", sheik_attack_11_game) - .acmd("effect_attack11", sheik_attack_11_effect) - .acmd("game_attack12", sheik_attack_12_game) - .acmd("effect_attack12", sheik_attack_12_effect) - .acmd("game_attack100end", sheik_attack_100_end_game) - .acmd("game_attackdash", sheik_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/sheik/src/acmd/mod.rs b/fighters/sheik/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/sheik/src/acmd/mod.rs +++ b/fighters/sheik/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/sheik/src/acmd/other.rs b/fighters/sheik/src/acmd/other.rs index 853b1bc008..fd839b1fc3 100644 --- a/fighters/sheik/src/acmd/other.rs +++ b/fighters/sheik/src/acmd/other.rs @@ -1,246 +1,147 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sheik_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sheik_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.050); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.050); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_sheik_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_sheik_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sheik_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sheik_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sheik_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sheik_step_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn sheik_needle_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 65, 80, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("sheik_needle") - .acmd("game_move", sheik_needle_move_game) - .install(); - smashline::Agent::new("sheik") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_landingairlw", sheik_landing_air_lw_game) - .acmd("game_catch", sheik_catch_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/sheik/src/acmd/smashes.rs b/fighters/sheik/src/acmd/smashes.rs index 4b2744bc76..3123d9b795 100644 --- a/fighters/sheik/src/acmd/smashes.rs +++ b/fighters/sheik/src/acmd/smashes.rs @@ -1,181 +1,178 @@ use super::*; -unsafe extern "C" fn sheik_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 26, 100, 62, 0, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 45, 100, 47, 0, 3.5, -0.7, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 5.0, 80, 100, 45, 0, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 26, 100, 62, 0, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 45, 100, 47, 0, 3.5, -0.7, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 5.0, 80, 100, 45, 0, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.8, -1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 55, 110, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.6, 5.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.8, -1.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 55, 110, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 55, 110, 0, 60, 4.6, 5.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 10.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 8.0, 10.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 90, 95, 0, 52, 4.5, 2.9, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 90, 95, 0, 52, 4.5, 2.9, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 0.0, 0, 0, 0, 0, 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 78, 100, 0, 38, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn sheik_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 21, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 21, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 24, 2, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 24, 2, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sheik_smash_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sheik_smash_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_smash_flash"), true, true); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_smash_flash"), true, true); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } } -unsafe extern "C" fn sheik_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); sv_animcmd::execute(lua_state, 7.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn sheik_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 45, 86, 0, 41, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 45, 86, 0, 41, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 45, 86, 0, 41, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 45, 86, 0, 41, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 45, 86, 0, 41, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 18.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 18.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 45, 86, 0, 41, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 45, 86, 0, 41, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 45, 86, 0, 41, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 8.0, 45, 86, 0, 41, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 45, 86, 0, 41, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attacks4", sheik_attack_s4_s_game) - .acmd("game_attackhi4", sheik_attack_hi4_game) - .acmd("effect_attackhi4", sheik_attack_hi4_effect) - .acmd("expression_attackairhi", sheik_attack_hi4_expression) - .acmd("game_attacklw4", sheik_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } \ No newline at end of file diff --git a/fighters/sheik/src/acmd/specials.rs b/fighters/sheik/src/acmd/specials.rs index ce9fbba53d..9369e7449a 100644 --- a/fighters/sheik/src/acmd/specials.rs +++ b/fighters/sheik/src/acmd/specials.rs @@ -1,74 +1,39 @@ - use super::*; -unsafe extern "C" fn sheik_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SHEIK_STATUS_SPECIAL_S_FLAG_THROW); - } - -} - -unsafe extern "C" fn sheik_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHEIK_STATUS_SPECIAL_S_FLAG_THROW); } - } -unsafe extern "C" fn sheik_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - //ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 80, 0, 70, 9.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 11.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FT_SHEIK_STATUS_SPECIAL_HI_FLAG_FALL); } - -} - -unsafe extern "C" fn sheik_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), -5.5, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_start"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5.5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 7, 2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } } unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { @@ -92,79 +57,55 @@ unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sheik_special_air_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 5, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_start_air"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.77, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn fusin_game_explosion(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhistart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 27.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 60, 0, 80, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 5, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } - wait(lua_state, 3.0); + frame(lua_state, 36.0); if is_excute(agent) { - AttackModule::clear_all(boma); + EFFECT(agent, Hash40::new("sheik_fushin_start_air"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.77, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } - wait(lua_state, 1.0); + frame(lua_state, 55.0); if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + EFFECT(agent, Hash40::new("sheik_fushin_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn sheik_special_lw_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 361, 92, 0, 26, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 361, 92, 0, 26, 3.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 361, 92, 0, 26, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 361, 92, 0, 26, 3.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_keep_rumble(boma, 0, true); AttackModule::set_attack_keep_rumble(boma, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.75); + FT_MOTION_RATE(agent, 1.75); } - } -pub fn install() { - smashline::Agent::new("sheik_fusin") - .acmd("game_explosion", fusin_game_explosion) - .install(); - smashline::Agent::new("sheik") - .acmd("game_specials", sheik_special_s_game) - .acmd("game_specialairs", sheik_special_air_s_game) - .acmd("game_specialhi", sheik_special_hi_game) - .acmd("game_specialairhi", sheik_special_air_hi_game) - .acmd("effect_specialhistart", sheik_special_hi_start_effect) - .acmd("effect_specialhistart", effect_specialhistart) - .acmd( - "effect_specialairhistart", - sheik_special_air_hi_start_effect, - ) - .acmd("game_speciallwattack", sheik_special_lw_attack_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("effect_specialairhistart", effect_specialairhistart); + + agent.acmd("game_speciallwattack", game_speciallwattack); } diff --git a/fighters/sheik/src/acmd/throws.rs b/fighters/sheik/src/acmd/throws.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/sheik/src/acmd/throws.rs +++ b/fighters/sheik/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/sheik/src/acmd/tilts.rs b/fighters/sheik/src/acmd/tilts.rs index cc1c2c3bb7..0d00ca9225 100644 --- a/fighters/sheik/src/acmd/tilts.rs +++ b/fighters/sheik/src/acmd/tilts.rs @@ -1,141 +1,133 @@ - use super::*; -unsafe extern "C" fn sheik_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 72, 100, 0, 58, 4.0, -0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 75, 100, 0, 58, 3.5, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 80, 100, 0, 58, 4.0, 4.3, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 72, 100, 0, 58, 4.0, -0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 75, 100, 0, 58, 3.5, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 80, 100, 0, 58, 4.0, 4.3, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 3.0); } - } -unsafe extern "C" fn sheik_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.5, 0, 10, 50, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.5, 0, 10, 50, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn sheik_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 0, 80, 30, 0, 3.5, 4.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 330, 80, 28, 0, 4.5, 2.5, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 75, 80, 40, 0, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 0, 80, 30, 0, 3.5, 4.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 330, 80, 28, 0, 4.5, 2.5, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 75, 80, 40, 0, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 4.5, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.5, 100, 80, 0, 60, 5.0, 5.0, -0.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 5.0, 60, 130, 0, 30, 4.0, 4.5, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.5, 100, 80, 0, 60, 5.0, 5.0, -0.2, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn sheik_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.5, -2, -90, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.5, -2, -90, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11.0, 7.0, 0, -45, -90, 1, true); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 1.0, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11.0, 7.0, 0, -45, -90, 1, true); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 1.0, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 17, 0, -1, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 17, 0, -1, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_d"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_d"), false, false); } } -unsafe extern "C" fn sheik_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 70, 70, 0, 65, 3.7, 0.0, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 70, 0, 65, 3.7, 3.5, -0.6, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 90, 58, 0, 65, 4.3, 5.0, -0.2, -1.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 70, 70, 0, 65, 3.7, 0.0, 0.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 70, 0, 65, 3.7, 3.5, -0.6, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 90, 58, 0, 65, 4.3, 5.0, -0.2, -1.0, None, None, None, 1.0, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sheik_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.5, 4, 6.0, 0, 15, 20, 0.925, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.5, 4, 6.0, 0, 15, 20, 0.925, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -pub fn install() { - smashline::Agent::new("sheik") - .acmd("game_attacks3", sheik_attack_s3_s_game) - .acmd("effect_attacks3", sheik_attack_s3_s_effect) - .acmd("game_attackhi3", sheik_attack_hi3_game) - .acmd("effect_attackhi3", sheik_attack_hi3_effect) - .acmd("game_attacklw3", sheik_attack_lw3_game) - .acmd("effect_attacklw3", sheik_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/sheik/src/fusin/acmd/mod.rs b/fighters/sheik/src/fusin/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/sheik/src/fusin/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/sheik/src/fusin/acmd/specials.rs b/fighters/sheik/src/fusin/acmd/specials.rs new file mode 100644 index 0000000000..02163e8fb0 --- /dev/null +++ b/fighters/sheik/src/fusin/acmd/specials.rs @@ -0,0 +1,21 @@ +use super::*; + +unsafe extern "C" fn game_explosion(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 60, 0, 80, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explosion", game_explosion); +} diff --git a/fighters/sheik/src/fusin/mod.rs b/fighters/sheik/src/fusin/mod.rs new file mode 100644 index 0000000000..72fd3f916a --- /dev/null +++ b/fighters/sheik/src/fusin/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sheik_fusin"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sheik/src/lib.rs b/fighters/sheik/src/lib.rs index f69fbfee0e..dbbb73cd32 100644 --- a/fighters/sheik/src/lib.rs +++ b/fighters/sheik/src/lib.rs @@ -6,6 +6,11 @@ pub mod acmd; pub mod opff; +// articles + +mod fusin; +mod needle; + use smash::{ lib::{ L2CValue, @@ -36,8 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("sheik";) + acmd::install(agent); + opff::install(agent); + agent.install(); + + fusin::install(); + needle::install(); } diff --git a/fighters/sheik/src/needle/acmd/mod.rs b/fighters/sheik/src/needle/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/sheik/src/needle/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/sheik/src/needle/acmd/specials.rs b/fighters/sheik/src/needle/acmd/specials.rs new file mode 100644 index 0000000000..46338e4d6d --- /dev/null +++ b/fighters/sheik/src/needle/acmd/specials.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 65, 80, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/sheik/src/needle/mod.rs b/fighters/sheik/src/needle/mod.rs new file mode 100644 index 0000000000..8b5f1e982f --- /dev/null +++ b/fighters/sheik/src/needle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sheik_needle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sheik/src/opff.rs b/fighters/sheik/src/opff.rs index 8165557866..41ecee5cf0 100644 --- a/fighters/sheik/src/opff.rs +++ b/fighters/sheik/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bouncing_fish_return_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_SHEIK_STATUS_KIND_SPECIAL_LW_RETURN && boma.status_frame() > 14 { if situation_kind == *SITUATION_KIND_AIR { @@ -109,8 +108,7 @@ pub unsafe fn sheik_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("sheik") - .on_line(Main, sheik_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, sheik_frame_wrapper); } From d3031de848761c5b36e2a392c8a10e8b82e82a93 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 13:33:17 -0500 Subject: [PATCH 028/172] wow he does it again --- fighters/sheik/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/sheik/src/lib.rs b/fighters/sheik/src/lib.rs index dbbb73cd32..8fad20c773 100644 --- a/fighters/sheik/src/lib.rs +++ b/fighters/sheik/src/lib.rs @@ -44,7 +44,7 @@ use smashline::*; #[macro_use] extern crate smash_script; pub fn install() { - let agent = &mut Agent::new("sheik";) + let agent = &mut Agent::new("sheik"); acmd::install(agent); opff::install(agent); agent.install(); From e2a8a2552e80b575964629fdeaf9536814cc417b Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 14:35:08 -0500 Subject: [PATCH 029/172] zelda can't wait for this one to fail --- fighters/zelda/src/acmd/aerials.rs | 295 +++--- fighters/zelda/src/acmd/ground.rs | 130 ++- fighters/zelda/src/acmd/mod.rs | 16 +- fighters/zelda/src/acmd/other.rs | 903 ++---------------- fighters/zelda/src/acmd/smashes.rs | 153 ++- fighters/zelda/src/acmd/specials.rs | 297 +++--- fighters/zelda/src/acmd/throws.rs | 84 +- fighters/zelda/src/acmd/tilts.rs | 361 +++---- fighters/zelda/src/dein/acmd/mod.rs | 7 + fighters/zelda/src/dein/acmd/specials.rs | 64 ++ fighters/zelda/src/dein/mod.rs | 11 + fighters/zelda/src/dein/status/mod.rs | 7 + .../{status/dein.rs => dein/status/move.rs} | 6 +- fighters/zelda/src/dein_s/acmd/mod.rs | 7 + fighters/zelda/src/dein_s/acmd/specials.rs | 22 + fighters/zelda/src/dein_s/mod.rs | 9 + fighters/zelda/src/lib.rs | 21 +- fighters/zelda/src/opff.rs | 85 +- fighters/zelda/src/phantom/acmd/mod.rs | 7 + fighters/zelda/src/phantom/acmd/specials.rs | 617 ++++++++++++ fighters/zelda/src/phantom/mod.rs | 13 + fighters/zelda/src/phantom/opff.rs | 80 ++ .../phantom.rs => phantom/status/build.rs} | 6 +- fighters/zelda/src/phantom/status/mod.rs | 7 + fighters/zelda/src/status.rs | 19 +- 25 files changed, 1589 insertions(+), 1638 deletions(-) create mode 100644 fighters/zelda/src/dein/acmd/mod.rs create mode 100644 fighters/zelda/src/dein/acmd/specials.rs create mode 100644 fighters/zelda/src/dein/mod.rs create mode 100644 fighters/zelda/src/dein/status/mod.rs rename fighters/zelda/src/{status/dein.rs => dein/status/move.rs} (77%) create mode 100644 fighters/zelda/src/dein_s/acmd/mod.rs create mode 100644 fighters/zelda/src/dein_s/acmd/specials.rs create mode 100644 fighters/zelda/src/dein_s/mod.rs create mode 100644 fighters/zelda/src/phantom/acmd/mod.rs create mode 100644 fighters/zelda/src/phantom/acmd/specials.rs create mode 100644 fighters/zelda/src/phantom/mod.rs create mode 100644 fighters/zelda/src/phantom/opff.rs rename fighters/zelda/src/{status/phantom.rs => phantom/status/build.rs} (79%) create mode 100644 fighters/zelda/src/phantom/status/mod.rs diff --git a/fighters/zelda/src/acmd/aerials.rs b/fighters/zelda/src/acmd/aerials.rs index 4450ca76ae..88f1e5419b 100644 --- a/fighters/zelda/src/acmd/aerials.rs +++ b/fighters/zelda/src/acmd/aerials.rs @@ -1,26 +1,25 @@ - use super::*; -unsafe extern "C" fn zelda_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); for _ in 0..4 { - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("waist"), 2.0, 366, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("head"), 2.0, 366, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 366, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("waist"), 2.0, 366, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("head"), 2.0, 366, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("armr"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 0, Hash40::new("waist"), 2.0, 80, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 7, 0, Hash40::new("head"), 2.0, 80, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("armr"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("arml"), 2.0, 100, 50, 0, 26, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 0, Hash40::new("waist"), 2.0, 80, 50, 0, 26, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 7, 0, Hash40::new("head"), 2.0, 80, 50, 0, 26, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); @@ -31,267 +30,265 @@ unsafe extern "C" fn zelda_attack_air_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 7, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 9.0, 8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 13.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("head"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 9.0, 8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 4.5, 0.0, 13.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("head"), 5.0, 50, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 89, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 89, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("toel"), 18.0, 361, 111, 0, 30, 1.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 9.0, 361, 89, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 89, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 89, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("toel"), 18.0, 361, 111, 0, 30, 1.8, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("toel"), 9.0, 361, 89, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new_raw(0x148397b09f)); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 38, 100, 0, 25, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 38, 100, 0, 25, 3.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("toel"), 8.0, 38, 100, 0, 25, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 38, 100, 0, 25, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 38, 100, 0, 25, 3.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("toel"), 8.0, 38, 100, 0, 25, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 37.0, 22.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 37.0, 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 4, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_flash"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 4, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_flash"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_status_defense_up"), Hash40::new("toel"), 0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("toel"), 0.0, 0.0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("toel"), 0.0, 0.0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn zelda_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 17.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 103, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 10, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 15.0, 361, 103, 0, 24, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 17.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 103, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 10, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toer"), 15.0, 361, 103, 0, 24, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new_raw(0x1484fa7486)); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.5, 55, 50, 0, 65, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.5, 55, 50, 0, 65, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toer"), 7.5, 55, 50, 0, 65, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.5, 55, 50, 0, 65, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.5, 55, 50, 0, 65, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toer"), 7.5, 55, 50, 0, 65, 4.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 39.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 39.0, 14.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); //let mut handle: u32 = 0; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("toer"), 0.0, 0.0, -2.0, 0, 0, 0, 1.15, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("toer"), 0.0, 0.0, -2.0, 0, 0, 0, 1.15, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 5.7, -1, 0, 180, 180, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_flash"), Hash40::new("toer"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_line"), Hash40::new("top"), 0, 5.7, -1, 0, 180, 180, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_flash"), Hash40::new("toer"), 0, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn zelda_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackll") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_1); //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackm") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_2); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 0); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 1); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackll"), 0, 2); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackll"), 0, 2); sv_animcmd::RUMBLE_HIT(lua_state); } wait(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn zelda_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 3.0, 90, 30, 0, 85, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 3.0, 90, 30, 0, 85, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 90, 70, 0, 55, 5.0, 0.0, 23.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 90, 68, 0, 55, 9.0, 0.0, 26.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 90, 70, 0, 55, 5.0, 0.0, 23.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 90, 68, 0, 55, 9.0, 0.0, 26.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn zelda_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("footl"), 16.0, 270, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 275, 85, 0, 10, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 275, 80, 0, 0, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 275, 85, 0, 10, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 275, 80, 0, 0, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE_RANGE(fighter, 25.0, 45.0, 15.0); + FT_MOTION_RATE_RANGE(agent, 25.0, 45.0, 15.0); frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn zelda_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -1, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -1, 0, 0, 0, 0, 0.8, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, 90, 0, 1, true); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_atk_air_lw"), Hash40::new("top"), 0, 17, 0, 0, -90, 0, 1, true); } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("footl"), 3.0, 1.0, -1.0, 0, 0, 0, 1.2, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("footl"), 3.0, 1.0, -1.0, 0, 0, 0, 1.2, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_air_lw_line"), Hash40::new("top"), -0.5, 15.0, 0, 90, 0, 0, 1.1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_air_lw_line"), Hash40::new("top"), -0.5, 15.0, 0, 90, 0, 0, 1.1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attackairn", zelda_attack_air_n_game) - .acmd("game_attackairf", zelda_attack_air_f_game) - .acmd("effect_attackairf", zelda_attack_air_f_effect) - .acmd("game_attackairb", zelda_attack_air_b_game) - .acmd("effect_attackairb", zelda_attack_air_b_effect) - .acmd("expression_attackairb", zelda_attack_air_b_expression) - .acmd("game_attackairhi", zelda_attack_air_hi_game) - .acmd("game_attackairlw", zelda_attack_air_lw_game) - .acmd("effect_attackairlw", zelda_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/zelda/src/acmd/ground.rs b/fighters/zelda/src/acmd/ground.rs index 65f600f852..2d1559b554 100644 --- a/fighters/zelda/src/acmd/ground.rs +++ b/fighters/zelda/src/acmd/ground.rs @@ -1,127 +1,123 @@ - use super::*; -unsafe extern "C" fn zelda_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 35, 0, 25, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 30, 0, 25, 3.0, 0.0, 12.0, 8.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 361, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 35, 0, 25, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 30, 0, 25, 3.0, 0.0, 12.0, 8.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 361, 20, 0, 25, 4.0, 0.0, 11.8, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 25, 2.5, 0.0, 5.5, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 25, 2.5, 0.0, 5.5, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 5.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 5.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 3.0, 0.0, 11.8, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 180, 20, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 361, 25, 0, 25, 4.0, 0.0, 11.5, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 25, 0, 40, 2.5, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(8.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 25, 0, 40, 2.5, 0.0, 5.5, 5.0, Some(0.0), Some(5.5), Some(8.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 6.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 180, 40, 0, 20, 4.0, 0.0, 11.5, 14.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 6.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 36, 0, 28, 3.0, 0.0, 11.8, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 180, 40, 0, 20, 4.0, 0.0, 11.5, 14.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 2.2); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 2.2); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn zelda_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 5.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 5.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 8.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, 8.5, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 15, 11.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 15, 11.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn zelda_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 13.0, 80, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 13.0, 80, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 72, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 83, 72, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 83, 72, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 83, 72, 0, 62, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 10, 8, 0, 0, 0, 0.6, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 10, 8, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1.2, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attack11", zelda_attack_11_game) - .acmd("effect_attack11", zelda_attack_11_effect) - .acmd("game_attackdash", zelda_attack_dash_game) - .acmd("effect_attackdash", zelda_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/zelda/src/acmd/mod.rs b/fighters/zelda/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/zelda/src/acmd/mod.rs +++ b/fighters/zelda/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/zelda/src/acmd/other.rs b/fighters/zelda/src/acmd/other.rs index 3c3dd409d1..366c05ef53 100644 --- a/fighters/zelda/src/acmd/other.rs +++ b/fighters/zelda/src/acmd/other.rs @@ -1,908 +1,153 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_zelda_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_zelda_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_zelda_step_left_l"), Hash40::new("se_zelda_step_right_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_zelda_step_left_l"), Hash40::new("se_zelda_step_right_l")); } } -unsafe extern "C" fn zelda_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn zelda_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn zelda_dein_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); +unsafe extern "C" fn zelda_dein_move_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn zelda_dein_tame_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_bullet_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - // Generate and store effects - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.6, false, 0, 0, 0, 0, 0, false, false); - let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle); - } - } - for h in 21..=146 { - if is_excute(fighter) { - let start_color = Vector3f { x: 1.0, y: 1.0, z: 1.0 }; - let end_color = Vector3f { x: 0.885, y: 0.051, z: 0.051 }; - // Smoothly interpolate from starting to ending color - let blend_vector = Vector3f { - x: start_color.x + ((end_color.x - start_color.x) * ((h as f32) / 146.0)), - y: start_color.y + ((end_color.y - start_color.y) * ((h as f32) / 146.0)), - z: start_color.z + ((end_color.z - start_color.z) * ((h as f32) / 146.0)) - }; - //println!("blend: {}, {}, {}", blend_vector.x, blend_vector.y, blend_vector.z); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH); - let fire_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE); - // Spawn (and store) new effects at certain frame intervals - if [50, 80, 112, 146].contains(&h) { - //println!("aha! h is {}", h); - let tame_size = fighter.get_float(*WEAPON_ZELDA_DEIN_STATUS_WORK_FLOAT_COUNT); - let flash_size = if h == 50 { 1.0 + 0.003 * tame_size } else if h == 80 { 1.0 + 0.0135 * tame_size } else if h == 112 { 1.0 + 0.0165 * tame_size } else { 1.0 + 0.021 * tame_size }; - let fire_size = if h == 146 { 0.8 + 0.0037 * tame_size } else { 0.8 + 0.024 * tame_size }; - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), flash_size, false, 0, 0, 0, 0, 0, false, false); - let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), fire_size, false, 0, 0, 0, 0, 0, false, false); - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle as u64); - VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle as u64); - } - else { - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - } - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn zelda_phantom_build_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let pos = Vector3f { x: pos_x + 35.2 * (1.0*PostureModule::lr(boma)) , y: pos_y, z: 0.0 }; - PostureModule::set_pos(boma, &pos); - VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - } - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } - frame(lua_state, 180.0); - if is_excute(fighter) { - WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); - } -} - -unsafe extern "C" fn zelda_phantom_build_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = EffectModule::req_follow(boma, Hash40::new("zelda_entry"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::new(0.0, 150.0, 0.0), 0.75, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER, handle); - } - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 1.0); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), -2, -1, 0, 0, 0, 90, 1.8, true); - } -} - -unsafe extern "C" fn zelda_phantom_attack_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 4.5; - frame(lua_state, 0.0); - FT_MOTION_RATE(fighter, 6.0/(5.0-0.0)); - if is_excute(fighter) { - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 50, 5.5, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn zelda_phantom_attack_kick_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 33.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 12, 0, 180, 0, 0.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - } - frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 7, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - } -} - -unsafe extern "C" fn zelda_phantom_attack_punch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 5.0; - frame(lua_state, 0.0); - FT_MOTION_RATE(fighter, 2.0/(0.5-0.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 60, 0, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 6.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 0.5); - FT_MOTION_RATE(fighter, 1.0/(1.0-0.5)); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 5.5, 0.0, 10.0, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 4.5, 0.0, 9.5, 19.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn zelda_phantom_attack_punch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 57.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 4, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - } -} - -unsafe extern "C" fn zelda_phantom_attack_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 5.5; - frame(lua_state, 0.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 5.0/(3.0-0.0)); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 5.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 87, 40, 0, 100, 6.5, 0.0, 8.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.885, 0.051, 0.051); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - //EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_build"), false, true); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); - } - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 6, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); - - //EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - } - frame(lua_state, 55.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 4, -3, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - } -} - -unsafe extern "C" fn zelda_phantom_attack_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 6.0; - frame(lua_state, 0.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 20.0/3.0); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 110, 0, 5.5, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - // Air-only - ATTACK(fighter, 0, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 57, 0, 60, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 270, 40, 0, 120, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_l_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.0, 50.0); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1, true); - - /* - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - */ - - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); - } - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_entry"), false, false); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { - let zelda = utils::util::get_battle_object_from_id(owner_id); - let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); - EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 16, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("null"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.7); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 1.0); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_sword_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_sword"), true, true); - } - frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_body_aura"), false, true); - } - frame(lua_state, 74.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn zelda_phantom_attack_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rush_speed = 7.0; - frame(lua_state, 0.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(3.0-0.0)); - KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 130, 0, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 6, 100, 85, 0, 8.5, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); - fighter.clear_lua_stack(); - lua_args!(fighter, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 0.0, 1.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 1.0, 9.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 2.0, 16.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 11.0, 46, 90, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn zelda_phantom_attack_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.50); - EFFECT(fighter, Hash40::new("zelda_atk_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), 0, 0, 0, 0, 0, 90, 2, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_phantom_start"), Hash40::new("trans"), 0, 3, 0, -90, 0, 0, 1, true); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -7, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -7, 0, 0, 0, 1, true); - } - - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_hi_flash"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 2.0, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 9, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 7, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - } - } - frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("zelda_phantom_line"), false, false); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 8); - } - frame(lua_state, 119.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("zelda_phantom_body_aura"), 32); - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn zelda_phantom_cancel_game(fighter: &mut L2CAgentBase) { - let owner_id = WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - frame(fighter.lua_state_agent, 1.0); - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 99.0); - } - frame(fighter.lua_state_agent, 30.0);//100 - if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { - FT_MOTION_RATE_RANGE(fighter, 30.0, 90.0, 320.0); //8 seconds - VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - } -} - -unsafe extern "C" fn zelda_phantom_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("zelda_phantom_hit"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, false); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_phantom_end2"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.3, false); - } - frame(lua_state, 89.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 2, 0, 0, 0, 0, 1.18, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - EFFECT(fighter, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 1.5, 0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - fighter.on_flag(*WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_FLAG_END); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("zelda_phantom") - .acmd("game_build", zelda_phantom_build_game) - .acmd("effect_build", zelda_phantom_build_effect) - .acmd("game_attackkick", zelda_phantom_attack_kick_game) - .acmd("effect_attackkick", zelda_phantom_attack_kick_effect) - .acmd("game_attackpunch", zelda_phantom_attack_punch_game) - .acmd("effect_attackpunch", zelda_phantom_attack_punch_effect) - .acmd("game_attacks", zelda_phantom_attack_s_game) - .acmd("effect_attacks", zelda_phantom_attack_s_effect) - .acmd("game_attackl", zelda_phantom_attack_l_game) - .acmd("effect_attackl", zelda_phantom_attack_l_effect) - .acmd("game_attackmax", zelda_phantom_attack_max_game) - .acmd("effect_attackmax", zelda_phantom_attack_max_effect) - .acmd("game_cancel", zelda_phantom_cancel_game) - .acmd("effect_cancel", zelda_phantom_cancel_effect) - .install(); - smashline::Agent::new("zelda_dein_s") - .acmd("game_move", zelda_dein_move_game) - .install(); - smashline::Agent::new("zelda_dein") - .acmd("effect_tame", zelda_dein_tame_effect) - .install(); - smashline::Agent::new("zelda") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", zelda_turn_dash_game) - .acmd("game_catch", zelda_catch_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/zelda/src/acmd/smashes.rs b/fighters/zelda/src/acmd/smashes.rs index 292ffd40d6..27d7e00805 100644 --- a/fighters/zelda/src/acmd/smashes.rs +++ b/fighters/zelda/src/acmd/smashes.rs @@ -1,156 +1,153 @@ - use super::*; -unsafe extern "C" fn zelda_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 5.333); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 5.333); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 350, 100, 40, 0, 4.2, 0.0, 9.1, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 185, 100, 50, 0, 4.5, 0.0, 9.1, 17.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 350, 100, 40, 0, 4.2, 0.0, 9.1, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 185, 100, 50, 0, 4.5, 0.0, 9.1, 17.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 5.5, 0.0, 9.1, 10.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 6.0, 0.0, 9.1, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 5.5, 0.0, 9.1, 10.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 124, 0, 37, 6.0, 0.0, 9.1, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 0.8, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 90, 100, 40, 0, 5.5, 0.0, 12.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, -5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.8, 160, 100, 20, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 0.8, 100, 100, 60, 0, 6.0, 0.0, 19.5, 5.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 0.8, 367, 100, 20, 0, 6.5, 0.0, 20.5, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 7.0, 0.0, 22.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 8.0, 0.0, 15.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 7.0, 0.0, 22.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, -6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 6.5, 0.0, 18.5, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 88, 220, 0, 24, 8.0, 0.0, 15.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -4.3, 21, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_trace_l"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_trace_l"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_trace_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_trace_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_smash_hi_flash"), Hash40::new("havel"), 0, 0, 0, -0.0, 0.0, 0.0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_smash_hi_flash"), Hash40::new("havel"), 0, 0, 0, -0.0, 0.0, 0.0, 1, true); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 19.5, -2.5, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0, 19.5, -2.5, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn zelda_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 20, 96, 0, 20, 4.2, 0.0, 3.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 96, 0, 20, 3.0, 0.0, 3.0, 11.0, Some(0.0), Some(5.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 20, 96, 0, 20, 4.2, 0.0, 3.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 96, 0, 20, 3.0, 0.0, 3.0, 11.0, Some(0.0), Some(5.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 20, 104, 0, 20, 4.2, 0.0, 3.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 20, 3.0, 0.0, 3.0, -9.0, Some(0.0), Some(7.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 20, 104, 0, 20, 4.2, 0.0, 3.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 20, 3.0, 0.0, 3.0, -9.0, Some(0.0), Some(7.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attacks4", zelda_attack_s4_s_game) - .acmd("game_attackhi4", zelda_attack_hi4_game) - .acmd("effect_attackhi4", zelda_attack_hi4_effect) - .acmd("game_attacklw4", zelda_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/zelda/src/acmd/specials.rs b/fighters/zelda/src/acmd/specials.rs index 859012be90..fa986aa3a3 100644 --- a/fighters/zelda/src/acmd/specials.rs +++ b/fighters/zelda/src/acmd/specials.rs @@ -1,272 +1,271 @@ - use super::*; -unsafe extern "C" fn zelda_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.444); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); + FT_MOTION_RATE(agent, 0.444); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 160, 40, 0, 12, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 160, 40, 0, 12, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 160, 40, 0, 12, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 160, 40, 0, 12, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 50, 7.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(4.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 50, 7.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(4.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); } } -unsafe extern "C" fn zelda_special_n_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.444); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); + FT_MOTION_RATE(agent, 0.444); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_START); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 77, 80, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 77, 80, 0, 40, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 77, 80, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 77, 80, 0, 40, 4.0, 0.0, 8.0, -10.0, Some(0.0), Some(8.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 60, 100, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 100, 0, 50, 9.5, 0.0, 7.0, -0.5, Some(0.0), Some(7.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 100, 0, 40, 4.0, 0.0, 8.0, -11.0, Some(0.0), Some(8.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); } } -unsafe extern "C" fn zelda_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_S_FLAG_1); - //VarModule::on_flag(fighter.battle_object, vars::zelda::instance::DEIN_ACTIVE); + //VarModule::on_flag(agent.battle_object, vars::zelda::instance::DEIN_ACTIVE); } } -unsafe extern "C" fn zelda_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("zelda_appeal_s_fire"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn zelda_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 30, 0, 125, 9.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 30, 0, 125, 9.5, 0.0, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 85, 0, 60, 10.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 85, 0, 60, 10.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } } -unsafe extern "C" fn zelda_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 13.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 13.0); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 10.0, 361, 89, 0, 80, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 7.0, 361, 87, 0, 60, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.75); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 10.0, 361, 89, 0, 80, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 361, 87, 0, 60, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.75); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); //f4 - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 29.0/(34.0 - 11.0)); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 29.0/(34.0 - 11.0)); } } -unsafe extern "C" fn zelda_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 2.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 12.0, 55, 93, 0, 80, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 8.0, 55, 85, 0, 60, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.75); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 12.0, 55, 93, 0, 80, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("rot"), 8.0, 55, 85, 0, 60, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.75); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_1); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_DIVE); WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_HI_FLAG_CONTROL); } - } -unsafe extern "C" fn zelda_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_teleport"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 0.0, 10.0, -5.0, 0, 0, 0, 1.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 3.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_teleport"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 0.0, 10.0, -5.0, 0, 0, 0, 1.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 3.0, 1.0); } else { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.5, false); } } EffectModule::set_disable_render_offset_last(boma); EffectModule::enable_sync_init_pos_last(boma); - FLASH(fighter, 0.62, 0.94, 0.9, 0.6); + FLASH(agent, 0.62, 0.94, 0.9, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 0.33, 0.83, 0.9, 0.2); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if is_excute(agent) { + FLASH(agent, 0.33, 0.83, 0.9, 0.2); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_l"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("zelda_flor_end_r"), Hash40::new("top"), 0, 11, -1, 0, 0, 0, 0.7, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.6, 1, 1, 0.5); + if is_excute(agent) { + FLASH(agent, 0.6, 1, 1, 0.5); } wait(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0.33, 0.83, 0.9, 0.2); + if is_excute(agent) { + FLASH(agent, 0.33, 0.83, 0.9, 0.2); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new_raw(0x109837f34d), false, false); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new_raw(0x109837f34d), false, false); } } -unsafe extern "C" fn zelda_special_hi_land_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.5); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_specialn", zelda_special_n_game) - .acmd("game_specialairn", zelda_special_n_air_game) - .acmd("game_specialsstart", zelda_special_s_start_game) - .acmd("game_specialairsstart", zelda_special_s_start_game) - .acmd("effect_specialsend", zelda_special_s_end_effect) - .acmd("effect_specialairsend", zelda_special_s_end_effect) - .acmd("game_specialhistart", zelda_special_hi_start_game) - .acmd("game_specialairhistart", zelda_special_air_hi_start_game) - .acmd("game_specialhi", zelda_special_hi_game) - .acmd("game_specialairhi", zelda_special_air_hi_game) - .acmd("effect_specialhi", zelda_special_air_hi_effect) - .acmd("effect_specialairhi", zelda_special_air_hi_effect) - .acmd("game_landingfallspecial", zelda_special_hi_land_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + + agent.acmd("game_landingfallspecial", game_landingfallspecial); } diff --git a/fighters/zelda/src/acmd/throws.rs b/fighters/zelda/src/acmd/throws.rs index ba26cb7ad4..134c7596e3 100644 --- a/fighters/zelda/src/acmd/throws.rs +++ b/fighters/zelda/src/acmd/throws.rs @@ -1,26 +1,26 @@ use super::*; -unsafe extern "C" fn zelda_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 4); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 4); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn zelda_throw_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -40,56 +40,56 @@ unsafe extern "C" fn zelda_throw_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn zelda_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 26.0, 29.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 95, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 26.0, 29.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 95, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 7); + CHECK_FINISH_CAMERA(agent, 11, 7); } frame(lua_state, 27.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn zelda_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 87, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 87, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 25); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 25); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_throwf", zelda_throw_f_game) - .acmd("effect_throwf", zelda_throw_f_effect) - .acmd("game_throwb", zelda_throw_b_game) - .acmd("game_throwhi", zelda_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/zelda/src/acmd/tilts.rs b/fighters/zelda/src/acmd/tilts.rs index 508b6851af..ce4478f93f 100644 --- a/fighters/zelda/src/acmd/tilts.rs +++ b/fighters/zelda/src/acmd/tilts.rs @@ -1,299 +1,244 @@ - use super::*; -unsafe extern "C" fn zelda_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 145, 42, 0, 75, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 110, 52, 0, 80, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 12, 0, -20, 0, 8, 1.05, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 11.3, 0, 3, 0, 5, 1.05, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 110, 52, 0, 80, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 110, 52, 0, 80, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - } - wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { - AttackModule::clear_all(boma); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } -} - -unsafe extern "C" fn zelda_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 11.3, 0, 3, 0, 5, 1.05, true, *EF_FLIP_YZ); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn zelda_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn zelda_attack_s3_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 145, 42, 0, 75, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 145, 42, 0, 75, 3.5, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + wait(lua_state, 4.0); + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { + AttackModule::clear_all(boma); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 12, 0, -20, 0, 8, 1.05, true, *EF_FLIP_YZ); } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(lua_state, 14.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.5, 130, 52, 0, 60, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 4.0, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 361, 75, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, -2.0, 0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 75, 0, 60, 2.5, 0.7, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.5, 130, 52, 0, 60, 2.5, 3.2, 0.4, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 3.0, 3.5, 0.0, 0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("handl"), 9.5, 130, 52, 0, 60, 4.0, 6.2, 0.0, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.880); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.880); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn zelda_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 9, 0, 22, 0, 3, 1.05, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("zelda_atk_arc"), Hash40::new("zelda_atk_arc"), Hash40::new("top"), 0, 9, 0, 22, 0, 3, 1.05, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn zelda_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.5, 100, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.5, 100, 65, 0, 80, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.5, 100, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn zelda_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_hi_flash"), Hash40::new("armr"), 4.5, 0, 0, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn zelda_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk_hi_flash"), Hash40::new("armr"), 4.5, 0, 0, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn zelda_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 90, 60, 0, 60, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 270, 65, 0, 80, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 80, 85, 0, 47, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 90, 60, 0, 60, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 270, 65, 0, 80, 3.8, 6.0, 0.0, 2.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn zelda_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -1, 4.6, -6, 14, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -1, 4.6, -6, 14, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("zelda_atk"), Hash40::new("top"), 2.0, 3.0, 12.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk"), Hash40::new("top"), 2.0, 3.0, 12.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -pub fn install() { - smashline::Agent::new("zelda") - .acmd("game_attacks3hi", zelda_attack_s3_hi_game) - .acmd("effect_attacks3hi", zelda_attack_s3_hi_effect) - .acmd("game_attacks3", zelda_attack_s3_s_game) - .acmd("effect_attacks3", zelda_attack_s3_s_effect) - .acmd("expression_attacks3", zelda_attack_s3_s_expression) - .acmd("expression_attacks3hi", zelda_attack_s3_hi_expression) - .acmd("expression_attacks3lw", zelda_attack_s3_lw_expression) - .acmd("game_attacks3lw", zelda_attack_s3_lw_game) - .acmd("effect_attacks3lw", zelda_attack_s3_lw_effect) - .acmd("game_attackhi3", zelda_attack_hi3_game) - .acmd("expression_attackhi3", zelda_attack_hi3_expression) - .acmd("effect_attackhi3", zelda_attack_hi3_effect) - .acmd("game_attacklw3", zelda_attack_lw3_game) - .acmd("effect_attacklw3", zelda_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/zelda/src/dein/acmd/mod.rs b/fighters/zelda/src/dein/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/zelda/src/dein/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/dein/acmd/specials.rs b/fighters/zelda/src/dein/acmd/specials.rs new file mode 100644 index 0000000000..433fc0a812 --- /dev/null +++ b/fighters/zelda/src/dein/acmd/specials.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn effect_tame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_bullet_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + frame(lua_state, 20.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + // Generate and store effects + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.6, false, 0, 0, 0, 0, 0, false, false); + let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle); + } + } + for h in 21..=146 { + if is_excute(agent) { + let start_color = Vector3f { x: 1.0, y: 1.0, z: 1.0 }; + let end_color = Vector3f { x: 0.885, y: 0.051, z: 0.051 }; + // Smoothly interpolate from starting to ending color + let blend_vector = Vector3f { + x: start_color.x + ((end_color.x - start_color.x) * ((h as f32) / 146.0)), + y: start_color.y + ((end_color.y - start_color.y) * ((h as f32) / 146.0)), + z: start_color.z + ((end_color.z - start_color.z) * ((h as f32) / 146.0)) + }; + //println!("blend: {}, {}, {}", blend_vector.x, blend_vector.y, blend_vector.z); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH); + let fire_handle = VarModule::get_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE); + // Spawn (and store) new effects at certain frame intervals + if [50, 80, 112, 146].contains(&h) { + //println!("aha! h is {}", h); + let tame_size = agent.get_float(*WEAPON_ZELDA_DEIN_STATUS_WORK_FLOAT_COUNT); + let flash_size = if h == 50 { 1.0 + 0.003 * tame_size } else if h == 80 { 1.0 + 0.0135 * tame_size } else if h == 112 { 1.0 + 0.0165 * tame_size } else { 1.0 + 0.021 * tame_size }; + let fire_size = if h == 146 { 0.8 + 0.0037 * tame_size } else { 0.8 + 0.024 * tame_size }; + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), flash_size, false, 0, 0, 0, 0, 0, false, false); + let fire_handle = EffectModule::req_follow(boma, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), &Vector3f::new(2.0, 0.0, 0.0), &Vector3f::zero(), fire_size, false, 0, 0, 0, 0, 0, false, false); + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FLASH, flash_handle as u64); + VarModule::set_int64(zelda, vars::zelda::instance::DEIN_EFF_HANDLER_FIRE, fire_handle as u64); + } + else { + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + EffectModule::set_rgb(boma, fire_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + } + } + } + wait(lua_state, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_tame", effect_tame); +} diff --git a/fighters/zelda/src/dein/mod.rs b/fighters/zelda/src/dein/mod.rs new file mode 100644 index 0000000000..649c301c1e --- /dev/null +++ b/fighters/zelda/src/dein/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("zelda_dein"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/dein/status/mod.rs b/fighters/zelda/src/dein/status/mod.rs new file mode 100644 index 0000000000..73acb3a84b --- /dev/null +++ b/fighters/zelda/src/dein/status/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod move; + +pub fn install(agent: &mut Agent) { + move::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/status/dein.rs b/fighters/zelda/src/dein/status/move.rs similarity index 77% rename from fighters/zelda/src/status/dein.rs rename to fighters/zelda/src/dein/status/move.rs index 3da394b541..dc34a7097a 100644 --- a/fighters/zelda/src/status/dein.rs +++ b/fighters/zelda/src/dein/status/move.rs @@ -9,8 +9,6 @@ unsafe extern "C" fn move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { smashline::original_status(Main, weapon, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE)(weapon) } -pub fn install() { - smashline::Agent::new("zelda_dein") - .status(Main, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE, move_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_ZELDA_DEIN_STATUS_KIND_MOVE, move_main); } diff --git a/fighters/zelda/src/dein_s/acmd/mod.rs b/fighters/zelda/src/dein_s/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/zelda/src/dein_s/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/dein_s/acmd/specials.rs b/fighters/zelda/src/dein_s/acmd/specials.rs new file mode 100644 index 0000000000..58e4fdb5e6 --- /dev/null +++ b/fighters/zelda/src/dein_s/acmd/specials.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/zelda/src/dein_s/mod.rs b/fighters/zelda/src/dein_s/mod.rs new file mode 100644 index 0000000000..523b13aff2 --- /dev/null +++ b/fighters/zelda/src/dein_s/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("zelda_dein_s"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/lib.rs b/fighters/zelda/src/lib.rs index 8e2ddcc726..a883107ff6 100644 --- a/fighters/zelda/src/lib.rs +++ b/fighters/zelda/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod dein; +mod dein_s; +mod phantom; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("zelda"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + dein::install(); + dein_s::install(); + phantom::install(); } diff --git a/fighters/zelda/src/opff.rs b/fighters/zelda/src/opff.rs index d36a2608a2..c0ecaf5e0c 100644 --- a/fighters/zelda/src/opff.rs +++ b/fighters/zelda/src/opff.rs @@ -144,8 +144,7 @@ pub unsafe fn phantom_platdrop_effect(fighter:&mut smash::lua2cpp::L2CFighterCom VarModule::set_int(fighter.battle_object, vars::zelda::instance::EFF_COOLDOWN_HANDLER, -1); } //reapply } - - } +} unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() @@ -205,84 +204,6 @@ pub unsafe fn zelda_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub unsafe extern "C" fn phantom_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - GroundModule::correct(weapon.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let zelda = utils::util::get_battle_object_from_id(owner_id); - let zelda_boma = &mut *(*zelda).module_accessor; - //hitcheck - if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(zelda, vars::zelda::instance::PHANTOM_HIT); - } - if StopModule::is_stop(weapon.module_accessor) && !VarModule::is_flag(zelda, vars::zelda::instance::PHANTOM_HIT) { - VarModule::on_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); - }//misc mechanics - if weapon.is_status(*WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD) { - let remaining_hitstun = WorkModule::get_float(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLOAT_DAMAGE_REACTION_FRAME); - if weapon.is_situation(*SITUATION_KIND_AIR) { - let through_passable_ground_stick_y= WorkModule::get_param_float(zelda_boma, hash40("common"), hash40("through_passable_ground_stick_y")) * -1.0; - if zelda_boma.stick_y() < through_passable_ground_stick_y { - GroundModule::set_passable_check(weapon.module_accessor, true); - } - else { - GroundModule::set_passable_check(weapon.module_accessor, false); - } - } - if zelda_boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_GUARD, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE, - *FIGHTER_STATUS_KIND_ESCAPE_F, - *FIGHTER_STATUS_KIND_ESCAPE_B, - *FIGHTER_STATUS_KIND_ESCAPE_AIR, - *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, - *FIGHTER_STATUS_KIND_CATCH, - *FIGHTER_STATUS_KIND_CATCH_DASH, - *FIGHTER_STATUS_KIND_CATCH_TURN, - *FIGHTER_STATUS_KIND_CATCH_PULL, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - *FIGHTER_STATUS_KIND_CATCH_ATTACK, - *FIGHTER_STATUS_KIND_CATCH_CUT, - *FIGHTER_STATUS_KIND_SHOULDERED_DONKEY, - *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, - *FIGHTER_STATUS_KIND_CATCHED_REFLET, - *FIGHTER_STATUS_KIND_CATCHED_GANON, - *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, - *FIGHTER_STATUS_KIND_CATCHED_CUT_GANON, - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FALL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FALL, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_CHARGE, - *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_END, - *FIGHTER_STATUS_KIND_THROW - ]) - || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_AIR) - || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_GROUND) - || remaining_hitstun > 0.0 - { - return - } - - if AttackModule::is_infliction_status(zelda_boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) - && zelda_boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_force(weapon.module_accessor, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_ATTACK, false); - } - } -} - -pub fn install() { - smashline::Agent::new("zelda") - .on_line(Main, zelda_frame_wrapper) - .install(); - - smashline::Agent::new("zelda_phantom") - .on_line(Main, phantom_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, zelda_frame_wrapper); } diff --git a/fighters/zelda/src/phantom/acmd/mod.rs b/fighters/zelda/src/phantom/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/zelda/src/phantom/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/phantom/acmd/specials.rs b/fighters/zelda/src/phantom/acmd/specials.rs new file mode 100644 index 0000000000..df7bf3bc30 --- /dev/null +++ b/fighters/zelda/src/phantom/acmd/specials.rs @@ -0,0 +1,617 @@ +use super::*; + +unsafe extern "C" fn game_build(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let pos = Vector3f { x: pos_x + 35.2 * (1.0*PostureModule::lr(boma)) , y: pos_y, z: 0.0 }; + PostureModule::set_pos(boma, &pos); + VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + } + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 19.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 29.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 31.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 37.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 44.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } + frame(lua_state, 180.0); + if is_excute(agent) { + WorkModule::inc_int(boma, *WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_INT_BUILD_NEXT); + } +} + +unsafe extern "C" fn effect_build(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = EffectModule::req_follow(boma, Hash40::new("zelda_entry"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::new(0.0, 150.0, 0.0), 0.75, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER, handle); + } + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 1.0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), -2, -1, 0, 0, 0, 90, 1.8, true); + } +} + +unsafe extern "C" fn game_attackkick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 4.5; + frame(lua_state, 0.0); + FT_MOTION_RATE(agent, 6.0/(5.0-0.0)); + if is_excute(agent) { + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 50, 5.5, 0.0, 6.0, 14.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackkick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 33.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 12, 0, 180, 0, 0.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 7, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + } +} + +unsafe extern "C" fn game_attackpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 5.0; + frame(lua_state, 0.0); + FT_MOTION_RATE(agent, 2.0/(0.5-0.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 60, 0, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 6.0, 0.0, 7.0, 11.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 0.5); + FT_MOTION_RATE(agent, 1.0/(1.0-0.5)); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 5.5, 0.0, 10.0, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 65, 0, 70, 4.5, 0.0, 9.5, 19.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if boma.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 57.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 4.5, 4, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + } +} + +unsafe extern "C" fn game_attacks(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 5.5; + frame(lua_state, 0.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 5.0/(3.0-0.0)); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 50, 0, 5.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 40, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 6.0, 87, 40, 0, 100, 5.8, 0.0, 0.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 87, 40, 0, 100, 6.5, 0.0, 8.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacks(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.885, 0.051, 0.051); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + //EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_build"), false, true); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); + } + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 6, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); + + //EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + frame(lua_state, 7.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 30.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + } + frame(lua_state, 55.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 4, -3, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } +} + +unsafe extern "C" fn game_attackl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 6.0; + frame(lua_state, 0.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 20.0/3.0); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 110, 0, 5.5, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 7.0, 0.0, 8.0, 10.0, Some(0.0), Some(8.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + // Air-only + ATTACK(agent, 0, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 8.0, 361, 60, 0, 60, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 57, 0, 60, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + // Ground-only + ATTACK(agent, 3, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.0, 2.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("handr"), 8.0, 262, 60, 0, 90, 5.6, 2.0, 0.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 270, 40, 0, 120, 5.0, 0.0, 8.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_appeal_s_fire"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.0, 50.0); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1, true); + + /* + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + */ + + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -5, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -5, 0, 0, 0, 1, true); + } + EFFECT_OFF_KIND(agent, Hash40::new("zelda_entry"), false, false); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_ZELDA { + let zelda = utils::util::get_battle_object_from_id(owner_id); + let handle = VarModule::get_int64(zelda, vars::zelda::instance::PHANTOM_EFF_HANDLER); + EffectModule::set_scale(boma, handle as u32, &Vector3f::zero()); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 16, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("null"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.7); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 1.0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 8.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_din_start"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 1.0); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_sword_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 12.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_sword"), true, true); + } + frame(lua_state, 64.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_body_aura"), false, true); + } + frame(lua_state, 74.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn game_attackmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rush_speed = 7.0; + frame(lua_state, 0.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(3.0-0.0)); + KineticModule::unable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + } + frame(lua_state, 3.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 130, 0, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 6, 100, 85, 0, 8.5, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, true, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); + agent.clear_lua_stack(); + lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 0.0, 1.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 1.0, 9.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 11.0, 46, 90, 0, 60, 6.0, 2.0, 2.0, 16.5, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 11.0, 46, 90, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.50); + EFFECT(agent, Hash40::new("zelda_atk_flash"), Hash40::new("top"), 1.0, 20.0, -10.0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toel"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("toer"), 0, 0, 0, 180, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("footr"), 0, 0, 0, 0, 0, 90, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 90, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("kneer"), 0, 0, 0, 0, 0, 90, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_body_aura"), Hash40::new("hip"), 0, 0, 0, 0, 0, 90, 2, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_phantom_start"), Hash40::new("trans"), 0, 3, 0, -90, 0, 0, 1, true); + } + frame(lua_state, 2.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), -5, 10, -7, 0, 0, 0, 1, true); + } + else{ + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_line"), Hash40::new("top"), 5, 10, -7, 0, 0, 0, 1, true); + } + + EFFECT_FOLLOW(agent, Hash40::new("zelda_atk_hi_flash"), Hash40::new("handr"), 0, 0, 16.0, 0, 0, 0, 2.0, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_zelda_phantomsword1"), Hash40::new("tex_zelda_phantomsword2"), 9, Hash40::new("handr"), 1.5, 0.4, -1.0, Hash40::new("handr"), 1.5, 0.4, 24.4, true, Hash40::new("zelda_phantom_sword"), Hash40::new("handr"), 1.85, 0.35, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.5); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 7, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + } + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("zelda_phantom_line"), false, false); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 8); + } + frame(lua_state, 119.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("zelda_phantom_body_aura"), 32); + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 3, 0, 0, -90, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn game_cancel(agent: &mut L2CAgentBase) { + let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + frame(agent.lua_state_agent, 1.0); + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 99.0); + } + frame(agent.lua_state_agent, 30.0);//100 + if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { + FT_MOTION_RATE_RANGE(agent, 30.0, 90.0, 320.0); //8 seconds + VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + } +} + +unsafe extern "C" fn effect_cancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("zelda_phantom_hit"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("zelda_phantom_end2"), Hash40::new("top"), 0, 8, 0, 0, 0, 0, 1.3, false); + } + frame(lua_state, 89.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("zelda_phantom_end"), Hash40::new("trans"), 0, 2, 0, 0, 0, 0, 1.18, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + EFFECT(agent, Hash40::new("zelda_phantom_build"), Hash40::new("trans"), 0, 1.5, 0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + agent.on_flag(*WEAPON_ZELDA_PHANTOM_INSTANCE_WORK_ID_FLAG_END); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_build", game_build); + agent.acmd("effect_build", effect_build); + + agent.acmd("game_attackkick", game_attackkick); + agent.acmd("effect_attackkick", effect_attackkick); + + agent.acmd("game_attackpunch", game_attackpunch); + agent.acmd("effect_attackpunch", effect_attackpunch); + + agent.acmd("game_attacks", game_attacks); + agent.acmd("effect_attacks", effect_attacks); + + agent.acmd("game_attackl", game_attackl); + agent.acmd("effect_attackl", effect_attackl); + + agent.acmd("game_attackmax", game_attackmax); + agent.acmd("effect_attackmax", effect_attackmax); + + agent.acmd("game_cancel", game_cancel); + agent.acmd("effect_cancel", effect_cancel); +} diff --git a/fighters/zelda/src/phantom/mod.rs b/fighters/zelda/src/phantom/mod.rs new file mode 100644 index 0000000000..9da040a927 --- /dev/null +++ b/fighters/zelda/src/phantom/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("zelda_phantom"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/zelda/src/phantom/opff.rs b/fighters/zelda/src/phantom/opff.rs new file mode 100644 index 0000000000..c34cb0eba6 --- /dev/null +++ b/fighters/zelda/src/phantom/opff.rs @@ -0,0 +1,80 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn phantom_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + GroundModule::correct(weapon.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let zelda = utils::util::get_battle_object_from_id(owner_id); + let zelda_boma = &mut *(*zelda).module_accessor; + //hitcheck + if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { + VarModule::on_flag(zelda, vars::zelda::instance::PHANTOM_HIT); + } + if StopModule::is_stop(weapon.module_accessor) && !VarModule::is_flag(zelda, vars::zelda::instance::PHANTOM_HIT) { + VarModule::on_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); + }//misc mechanics + if weapon.is_status(*WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD) { + let remaining_hitstun = WorkModule::get_float(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLOAT_DAMAGE_REACTION_FRAME); + if weapon.is_situation(*SITUATION_KIND_AIR) { + let through_passable_ground_stick_y= WorkModule::get_param_float(zelda_boma, hash40("common"), hash40("through_passable_ground_stick_y")) * -1.0; + if zelda_boma.stick_y() < through_passable_ground_stick_y { + GroundModule::set_passable_check(weapon.module_accessor, true); + } + else { + GroundModule::set_passable_check(weapon.module_accessor, false); + } + } + if zelda_boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_GUARD, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE, + *FIGHTER_STATUS_KIND_ESCAPE_F, + *FIGHTER_STATUS_KIND_ESCAPE_B, + *FIGHTER_STATUS_KIND_ESCAPE_AIR, + *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE, + *FIGHTER_STATUS_KIND_CATCH, + *FIGHTER_STATUS_KIND_CATCH_DASH, + *FIGHTER_STATUS_KIND_CATCH_TURN, + *FIGHTER_STATUS_KIND_CATCH_PULL, + *FIGHTER_STATUS_KIND_CATCH_WAIT, + *FIGHTER_STATUS_KIND_CATCH_ATTACK, + *FIGHTER_STATUS_KIND_CATCH_CUT, + *FIGHTER_STATUS_KIND_SHOULDERED_DONKEY, + *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, + *FIGHTER_STATUS_KIND_CATCHED_REFLET, + *FIGHTER_STATUS_KIND_CATCHED_GANON, + *FIGHTER_STATUS_KIND_CATCHED_AIR_GANON, + *FIGHTER_STATUS_KIND_CATCHED_CUT_GANON, + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FALL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FALL, + *FIGHTER_STATUS_KIND_SPECIAL_LW, + *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_CHARGE, + *FIGHTER_ZELDA_STATUS_KIND_SPECIAL_LW_END, + *FIGHTER_STATUS_KIND_THROW + ]) + || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_AIR) + || WorkModule::is_flag(zelda_boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_GANON_SPECIAL_S_DAMAGE_FALL_GROUND) + || remaining_hitstun > 0.0 + { + return + } + + if AttackModule::is_infliction_status(zelda_boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) + && zelda_boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_force(weapon.module_accessor, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_ATTACK, false); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, phantom_callback); +} diff --git a/fighters/zelda/src/status/phantom.rs b/fighters/zelda/src/phantom/status/build.rs similarity index 79% rename from fighters/zelda/src/status/phantom.rs rename to fighters/zelda/src/phantom/status/build.rs index 873b477e6f..86c44bccde 100644 --- a/fighters/zelda/src/status/phantom.rs +++ b/fighters/zelda/src/phantom/status/build.rs @@ -11,8 +11,6 @@ unsafe extern "C" fn build_main(weapon: &mut L2CWeaponCommon) -> L2CValue { ret } -pub fn install() { - smashline::Agent::new("zelda_phantom") - .status(Main, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD, build_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_ZELDA_PHANTOM_STATUS_KIND_BUILD, build_main); } diff --git a/fighters/zelda/src/phantom/status/mod.rs b/fighters/zelda/src/phantom/status/mod.rs new file mode 100644 index 0000000000..a13b6dade4 --- /dev/null +++ b/fighters/zelda/src/phantom/status/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod build; + +pub fn install(agent: &mut Agent) { + build::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/status.rs b/fighters/zelda/src/status.rs index a91fdf3dae..ab6200a623 100644 --- a/fighters/zelda/src/status.rs +++ b/fighters/zelda/src/status.rs @@ -2,9 +2,6 @@ use smash::app::sv_battle_object::module_accessor; use super::*; -mod dein; -mod phantom; - // Prevents side special from being used if a Din's Fire is present unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { let dein_object_id = VarModule::get_int(fighter.battle_object, vars::zelda::instance::DEIN_OBJECT_ID) as u32; @@ -35,17 +32,11 @@ unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommo } } -extern "C" fn zelda_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ZELDA { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("zelda").on_start(zelda_init).install(); - dein::install(); - phantom::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); } From 556506aa40ad539cf54ece337ae261d49f1453ae Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 20 Mar 2024 14:42:26 -0500 Subject: [PATCH 030/172] rename dein move status --- fighters/zelda/src/dein/status/{move.rs => dein_move.rs} | 0 fighters/zelda/src/dein/status/mod.rs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename fighters/zelda/src/dein/status/{move.rs => dein_move.rs} (100%) diff --git a/fighters/zelda/src/dein/status/move.rs b/fighters/zelda/src/dein/status/dein_move.rs similarity index 100% rename from fighters/zelda/src/dein/status/move.rs rename to fighters/zelda/src/dein/status/dein_move.rs diff --git a/fighters/zelda/src/dein/status/mod.rs b/fighters/zelda/src/dein/status/mod.rs index 73acb3a84b..f5466d9fb3 100644 --- a/fighters/zelda/src/dein/status/mod.rs +++ b/fighters/zelda/src/dein/status/mod.rs @@ -1,7 +1,7 @@ use super::*; -mod move; +mod dein_move; pub fn install(agent: &mut Agent) { - move::install(agent); + dein_move::install(agent); } \ No newline at end of file From 23d9696aaf79a46a9dd7739fc3ac7c187f23b518 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 08:07:16 -0500 Subject: [PATCH 031/172] josh --- fighters/pickel/src/lib.rs | 8 +- fighters/yoshi/src/acmd/aerials.rs | 269 +++++++++--------- fighters/yoshi/src/acmd/ground.rs | 117 ++++---- fighters/yoshi/src/acmd/mod.rs | 16 +- fighters/yoshi/src/acmd/other.rs | 242 +++++----------- fighters/yoshi/src/acmd/smashes.rs | 193 +++++++------ fighters/yoshi/src/acmd/specials.rs | 101 +++---- fighters/yoshi/src/acmd/throws.rs | 40 ++- fighters/yoshi/src/acmd/tilts.rs | 242 ++++++++-------- fighters/yoshi/src/lib.rs | 17 +- fighters/yoshi/src/opff.rs | 8 +- fighters/yoshi/src/status.rs | 313 +-------------------- fighters/yoshi/src/status/attack_air.rs | 30 ++ fighters/yoshi/src/status/guard_damage.rs | 44 +++ fighters/yoshi/src/status/guard_off.rs | 111 ++++++++ fighters/yoshi/src/status/guard_on.rs | 48 ++++ fighters/yoshi/src/status/jump_aerial.rs | 89 ++++++ fighters/yoshi/src/tamago/acmd/mod.rs | 7 + fighters/yoshi/src/tamago/acmd/specials.rs | 27 ++ fighters/yoshi/src/tamago/mod.rs | 9 + 20 files changed, 931 insertions(+), 1000 deletions(-) create mode 100644 fighters/yoshi/src/status/attack_air.rs create mode 100644 fighters/yoshi/src/status/guard_damage.rs create mode 100644 fighters/yoshi/src/status/guard_off.rs create mode 100644 fighters/yoshi/src/status/guard_on.rs create mode 100644 fighters/yoshi/src/status/jump_aerial.rs create mode 100644 fighters/yoshi/src/tamago/acmd/mod.rs create mode 100644 fighters/yoshi/src/tamago/acmd/specials.rs create mode 100644 fighters/yoshi/src/tamago/mod.rs diff --git a/fighters/pickel/src/lib.rs b/fighters/pickel/src/lib.rs index 498497e9c0..32efc6c7be 100644 --- a/fighters/pickel/src/lib.rs +++ b/fighters/pickel/src/lib.rs @@ -9,10 +9,10 @@ pub mod opff; // articles -pub mod fire; -pub mod forge; -pub mod melt; -pub mod trolley; +mod fire; +mod forge; +mod melt; +mod trolley; // material table hook diff --git a/fighters/yoshi/src/acmd/aerials.rs b/fighters/yoshi/src/acmd/aerials.rs index 1dc7996189..155df00ac3 100644 --- a/fighters/yoshi/src/acmd/aerials.rs +++ b/fighters/yoshi/src/acmd/aerials.rs @@ -1,280 +1,277 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 4.3, 7.5, Some(0.0), Some(3.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 4.3, 7.5, Some(0.0), Some(3.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 12.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 4.5, 5.0, Some(0.0), Some(3.7), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 4.5, 5.0, Some(0.0), Some(3.7), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 10.0, 361, 100, 0, 0, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn yoshi_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 15.0, 361, 96, 0, 15, 5.0, 0.5, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 15.0, 361, 96, 0, 15, 5.0, 0.5, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("head"), 14.0, 270, 90, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 14.0, 270, 90, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 14.0, 270, 79, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 14.0, 270, 79, 0, 0, 5.5, 7.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 67.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn yoshi_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_c"), Hash40::new("top"), 4, 9, 4.5, 0, -50, -90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_c"), Hash40::new("top"), 4, 9, 4.5, 0, -50, -90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } } -unsafe extern "C" fn yoshi_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); MotionModule::set_rate(boma, 0.5); frame(lua_state, 10.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 12.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.5, 366, 45, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.5, 60, 100, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.5, 60, 100, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 5.5, 60, 100, 0, 48, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 19.5); MotionModule::set_rate(boma, (50.0 - 29.0) / 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn yoshi_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 3, -4, 175.671, -17.429, 82.039, 1, true, 0.3); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 3, -4, 175.671, -17.429, 82.039, 1, true, 0.3); + LAST_EFFECT_SET_RATE(agent, 2.5); } frame(lua_state, 13.5); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 4, -1.5, 184, -16, -105, 1, true, 0.3); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 4, -1.5, 184, -16, -105, 1, true, 0.3); + LAST_EFFECT_SET_RATE(agent, 2.5); } - frame(fighter.lua_state_agent, 17.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 4, -4.5, -175.777, 8.688, 80.371, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); + frame(agent.lua_state_agent, 17.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 4, -4.5, -175.777, 8.688, 80.371, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn yoshi_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } frame(lua_state, 11.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } frame(lua_state, 15.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); MotionModule::set_rate(boma, (4.2 - 0.0) / 5.0); frame(lua_state, 4.2); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 5.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 5.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 13.0, 90, 100, 0, 25, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); MotionModule::set_rate(boma, 1.11); frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn yoshi_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.2); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 12, -2, 111, -66.6, -211, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 12, -2, 111, -66.6, -211, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn yoshi_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.2); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.2); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } for _ in 0..6 { wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.3, 367, 80, 0, 5, 5.0, 0.0, 1.0, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.3, 367, 80, 0, 5, 5.0, 0.0, 1.0, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 367, 80, 0, 5, 4.5, 0.0, 2.0, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } for _ in 0..7 { wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.9, 367, 100, 0, 5, 5.0, 0.0, 0.5, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.9, 367, 100, 0, 5, 5.0, 0.0, 0.5, 2.0, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, 6.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 367, 100, 0, 5, 4.5, 0.0, 1.5, -2.5, None, None, None, 0.75, 1.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.8, 80, 179, 0, 55, 6.5, 0.0, 0.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, -2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.8, 80, 179, 0, 55, 6.5, 0.0, 0.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.8, 40, 179, 0, 55, 5.5, 0.0, 1.5, -2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attackairn", yoshi_attack_air_n_game) - .acmd("game_attackairf", yoshi_attack_air_f_game) - .acmd("effect_attackairf", yoshi_attack_air_f_effect) - .acmd("game_attackairb", yoshi_attack_air_b_game) - .acmd("effect_attackairb", yoshi_attack_air_b_effect) - .acmd("expression_attackairb", yoshi_attack_air_b_expression) - .acmd("game_attackairhi", yoshi_attack_air_hi_game) - .acmd("effect_attackairhi", yoshi_attack_air_hi_effect) - .acmd("expression_attackairhi", yoshi_attack_air_hi_expression) - .acmd("game_attackairlw", yoshi_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/yoshi/src/acmd/ground.rs b/fighters/yoshi/src/acmd/ground.rs index 54120ed416..ce8879773c 100644 --- a/fighters/yoshi/src/acmd/ground.rs +++ b/fighters/yoshi/src/acmd/ground.rs @@ -1,110 +1,107 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 50, 38, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 55, 38, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 4.0, 60, 38, 0, 8, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 50, 38, 0, 8, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 55, 38, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 4.0, 60, 38, 0, 8, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Jab-Lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 20, 0, 10, 2.5, 0.0, 3.0, -2.0, Some(0.0), Some(3.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 20, 0, 10, 2.5, 0.0, 3.0, -2.0, Some(0.0), Some(3.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn yoshi_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 361, 100, 0, 25, 5.0, 1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 100, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 361, 100, 0, 25, 5.0, 1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn yoshi_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1, 9, 3, -9.678, -9.226, 18.31, 0.9, true, *EF_FLIP_YZ, 1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1, 9, 3, -9.678, -9.226, 18.31, 0.9, true, *EF_FLIP_YZ, 1); } } -unsafe extern "C" fn yoshi_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn yoshi_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.79); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.79); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 5.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 65, 45, 0, 90, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 5.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 11.0, 65, 45, 0, 90, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 65, 45, 0, 90, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 4.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 4.0, 6.1, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 65, 55, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attack11", yoshi_attack_11_game) - .acmd("game_attack12", yoshi_attack_12_game) - .acmd("effect_attack12", yoshi_attack_12_effect) - .acmd("expression_attack12", yoshi_attack_12_expression) - .acmd("game_attackdash", yoshi_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/yoshi/src/acmd/mod.rs b/fighters/yoshi/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/yoshi/src/acmd/mod.rs +++ b/fighters/yoshi/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/yoshi/src/acmd/other.rs b/fighters/yoshi/src/acmd/other.rs index 0c3f89c104..afe6e35c04 100644 --- a/fighters/yoshi/src/acmd/other.rs +++ b/fighters/yoshi/src/acmd/other.rs @@ -1,242 +1,138 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_yoshi_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_yoshi_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_yoshi_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_yoshi_step_right_l")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_yoshi_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_yoshi_step_left_l")); } } -unsafe extern "C" fn yoshi_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn yoshi_tamago_throwed_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 54, 0, 54, 4.5, 0.0, -1.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_YOSHI_EGG_HIT, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn yoshi_tamago_burst_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 54, 0, 54, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_YOSHI_EGG_HIT, *ATTACK_REGION_OBJECT); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sound_guardoff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_guardoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { - PLAY_SE(fighter, Hash40::new("se_yoshi_guardoff")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { + PLAY_SE(agent, Hash40::new("se_yoshi_guardoff")); } } } -unsafe extern "C" fn expression_justshieldoff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); if !boma.is_status(*FIGHTER_STATUS_KIND_GUARD_OFF) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", yoshi_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_guardoff", sound_guardoff) - .acmd("expression_justshieldoff", expression_justshieldoff) - .install(); - smashline::Agent::new("yoshi_tamago") - .acmd("game_throwed", yoshi_tamago_throwed_game) - .acmd("game_burst", yoshi_tamago_burst_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("sound_guardoff", sound_guardoff); + agent.acmd("expression_justshieldoff", expression_justshieldoff); } diff --git a/fighters/yoshi/src/acmd/smashes.rs b/fighters/yoshi/src/acmd/smashes.rs index f85ba05bc1..4c96430b77 100644 --- a/fighters/yoshi/src/acmd/smashes.rs +++ b/fighters/yoshi/src/acmd/smashes.rs @@ -1,183 +1,178 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 107, 0, 30, 4.5, 0.0, 11.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 105, 0, 30, 5.0, 0.0, 11.5, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 6.5, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 6.5, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 107, 0, 30, 4.5, 0.0, 11.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 105, 0, 30, 5.0, 0.0, 11.5, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 4.2, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 4.2, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 109, 0, 30, 4.5, 0.0, 4.2, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 106, 0, 30, 4.8, 0.0, 4.2, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 14.0, 75, 104, 0, 38, 5.0, 0.0, -2.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 75, 104, 0, 38, 4.5, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 14.0, 75, 104, 0, 38, 5.0, 0.0, -2.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 75, 104, 0, 38, 4.5, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("toel"), *HIT_STATUS_NORMAL); - ATK_POWER(fighter, 0, 12); - ATK_POWER(fighter, 1, 12); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("toel"), *HIT_STATUS_NORMAL); + ATK_POWER(agent, 0, 12); + ATK_POWER(agent, 1, 12); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn yoshi_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 46, 2.5, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(19.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 46, 2.5, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(19.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 44, 2.5, 0.0, 2.0, -3.0, Some(0.0), Some(2.0), Some(-18.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 26, 86, 0, 51, 3.5, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 26, 82, 0, 44, 2.5, 0.0, 2.0, -3.0, Some(0.0), Some(2.0), Some(-18.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn yoshi_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 3, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -2.5, 4.0, 6, -4.564, 0.576, -162.823, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.198, 0.754, 1.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -2.5, 4.0, 6, -4.564, 0.576, -162.823, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.198, 0.754, 1.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 3.5, 20, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 3.5, 20, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, -5, 172.748, -44.731, 5.118, 1.3, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.198, 0.754, 1.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, -5, 172.748, -44.731, 5.118, 1.3, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.198, 0.754, 1.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -20, 3, -15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -20, 3, -15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attacks4hi", yoshi_attack_s4_hi_game) - .acmd("game_attacks4", yoshi_attack_s4_s_game) - .acmd("game_attacks4lw", yoshi_attack_s4_lw_game) - .acmd("game_attackhi4", yoshi_attack_hi4_game) - .acmd("game_attacklw4", yoshi_attack_lw4_game) - .acmd("effect_attacklw4", yoshi_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/yoshi/src/acmd/specials.rs b/fighters/yoshi/src/acmd/specials.rs index 8a7106a36b..9617ac057c 100644 --- a/fighters/yoshi/src/acmd/specials.rs +++ b/fighters/yoshi/src/acmd/specials.rs @@ -1,102 +1,75 @@ - use super::*; -unsafe extern "C" fn yoshi_special_s_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - JostleModule::set_status(fighter.module_accessor, false); - } -} - -unsafe extern "C" fn yoshi_special_air_s_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - JostleModule::set_status(fighter.module_accessor, false); +unsafe extern "C" fn game_specialsloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + JostleModule::set_status(agent.module_accessor, false); } } -unsafe extern "C" fn yoshi_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_S_FLAG_HIDE_EGG); } } -unsafe extern "C" fn yoshi_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_S_FLAG_HIDE_EGG); - } -} - -unsafe extern "C" fn yoshi_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 7.0, 0.0, 7.0, 10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 7.0, 0.0, 7.0, 10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_LW_FLAG_LANDING_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 80, 0, 60, 6.8, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 80, 0, 60, 6.8, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } - } -unsafe extern "C" fn yoshi_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_YOSHI_STATUS_SPECIAL_LW_FLAG_LANDING_ENABLE); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 85, 0, 70, 6.4, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_specialsloop", yoshi_special_s_loop_game) - .acmd("game_specialairsloop", yoshi_special_air_s_loop_game) - .acmd("game_specialsend", yoshi_special_s_end_game) - .acmd("game_specialairsend", yoshi_special_air_s_end_game) - .acmd("game_speciallw", yoshi_special_lw_game) - .acmd("game_specialairlw", yoshi_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsloop", game_specialsloop); + agent.acmd("game_specialairsloop", game_specialsloop); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/yoshi/src/acmd/throws.rs b/fighters/yoshi/src/acmd/throws.rs index 252889a8ee..8076f5d9ca 100644 --- a/fighters/yoshi/src/acmd/throws.rs +++ b/fighters/yoshi/src/acmd/throws.rs @@ -1,42 +1,38 @@ - use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.857); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.857); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("mouth2"), 3.5, -2.0, -0.5, 0.0, Some(1.2), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 7.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("mouth2"), 3.5, -2.0, -0.5, 0.0, Some(1.2), Some(-0.5), Some(0.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.5, 0.0, 6.0, 7.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED_YOSHI, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); } frame(lua_state, 22.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_catch", game_catch) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); } diff --git a/fighters/yoshi/src/acmd/tilts.rs b/fighters/yoshi/src/acmd/tilts.rs index 5c949b67b5..0610cefb69 100644 --- a/fighters/yoshi/src/acmd/tilts.rs +++ b/fighters/yoshi/src/acmd/tilts.rs @@ -1,205 +1,199 @@ - use super::*; -unsafe extern "C" fn yoshi_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn yoshi_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 11, 6, 18, -27, 156, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 9, 4, 173, -156, 2, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 12.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 13.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn yoshi_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 9, 4, 173, -156, 2, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 11, 6, 18, -27, 156, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 5.0, 6.0); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 5.0, 6.0); frame(lua_state, 5.0); - FT_DESIRED_RATE(fighter, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + FT_DESIRED_RATE(agent, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 4.4, 6.56, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 11.0, 70, 80, 0, 40, 3.3, 13.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } - -unsafe extern "C" fn yoshi_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 6, 4, 166, -162, 9, 1.15, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 6, 4, 166, -162, 9, 1.15, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn yoshi_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail1"), 9.0, 90, 112, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 9.0, 90, 112, 0, 50, 4.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail1"), 9.0, 90, 112, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } - + } } -unsafe extern "C" fn yoshi_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 16, -1, 0, 52, 88, 1.15, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 16, -1, 0, 52, 88, 1.15, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn yoshi_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn yoshi_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 9.0, 361, 30, 0, 67, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 9.0, 361, 30, 0, 67, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 10.0, 28, 40, 0, 67, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 9.0, 361, 30, 0, 67, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 9.0, 361, 30, 0, 67, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 10.0, 28, 40, 0, 67, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 0.900); + FT_MOTION_RATE(agent, 0.900); } - } -unsafe extern "C" fn yoshi_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 10, 0, 35, 180, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 10, 0, 35, 180, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, -2.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, -2.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } - } -pub fn install() { - smashline::Agent::new("yoshi") - .acmd("game_attacks3hi", yoshi_attack_s3_hi_game) - .acmd("effect_attacks3hi", yoshi_attack_s3_hi_effect) - .acmd("game_attacks3", yoshi_attack_s3_s_game) - .acmd("effect_attacks3", yoshi_attack_s3_s_effect) - .acmd("game_attacks3lw", yoshi_attack_s3_lw_game) - .acmd("effect_attacks3lw", yoshi_attack_s3_lw_effect) - .acmd("game_attackhi3", yoshi_attack_hi3_game) - .acmd("effect_attackhi3", yoshi_attack_hi3_effect) - .acmd("expression_attackhi3", yoshi_attack_hi3_expression) - .acmd("game_attacklw3", yoshi_attack_lw3_game) - .acmd("effect_attacklw3", yoshi_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/yoshi/src/lib.rs b/fighters/yoshi/src/lib.rs index 8e2ddcc726..faab10c1bc 100644 --- a/fighters/yoshi/src/lib.rs +++ b/fighters/yoshi/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles; + +mod tamago; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("yoshi"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + tamago::install(); } diff --git a/fighters/yoshi/src/opff.rs b/fighters/yoshi/src/opff.rs index 101ea124e4..192ce96d1c 100644 --- a/fighters/yoshi/src/opff.rs +++ b/fighters/yoshi/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - /*unsafe fn egg_roll_jc_waveland(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, stick_x: f32, facing: f32) { if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_YOSHI_STATUS_KIND_SPECIAL_S_LOOP, @@ -67,8 +66,7 @@ pub unsafe fn yoshi_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("yoshi") - .on_line(Main, yoshi_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, yoshi_frame_wrapper); } diff --git a/fighters/yoshi/src/status.rs b/fighters/yoshi/src/status.rs index 60f6b845d8..ffea087cff 100644 --- a/fighters/yoshi/src/status.rs +++ b/fighters/yoshi/src/status.rs @@ -1,306 +1,17 @@ use super::*; use globals::*; utils::import!(common::djc::attack_air_main_status); -// status script import -// FIGHTER_STATUS_KIND_GUARD_ON - -pub unsafe extern "C" fn guard_on(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - fighter.sub_status_guard_on_common(); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); - init_guard_damage_uniq(fighter); - fighter.main_shift(guard_on_main) -} - -unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_status_guard_on_main_air_common().get_bool() { - return 0.into(); - } - - fighter.sub_guard_cont(); - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND - && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD, false); - return 1.into(); - } - else { - let guard_shield = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_GUARD_SHIELD); - let min_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_GUARD_ON_WORK_INT_MIN_FRAME); - - if guard_shield > 0.0 - && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_GUARD) - && min_frame <= 0 - && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::off_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ); - fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD_OFF, true); - return 1.into(); - } - } - - 0.into() -} - -// FIGHTER_STATUS_KIND_GUARD_DAMAGE // - -pub unsafe extern "C" fn init_guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_ftStatusUniqProcessGuardDamage_initStatus_Inner(); - smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { - let shield_radius = - WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let throw_scale: Vector3f = Vector3f { - x: shield_radius, - y: shield_radius, - z: shield_radius, - }; - - ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); - - fighter.clear_lua_stack(); - lua_args!(fighter, 0x2dc1210b69i64); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); -} - -pub unsafe extern "C" fn exit_guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_ftStatusUniqProcessGuardDamage_exitStatus_common(); - smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) -} - -pub unsafe extern "C" fn guard_damage(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardDamage_common(L2CValue::Bool(false)); - fighter.sub_shift_status_main(L2CValue::Ptr( - L2CFighterCommon_status_GuardDamage_Main as *const () as _, - )) -} - -// FIGHTER_STATUS_KIND_GUARD_OFF // - -pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("just_shield_off"), - 0.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_yoshi_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - }; - fighter.sub_shift_status_main(L2CValue::Ptr(guard_off_main as *const () as _)) -} - -unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_GuardOff_Main_common().get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false), - ); - return 1.into(); - } - if fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_JUMP_TRIGGER != 0 { - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE, - ) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_ESCAPE), - L2CValue::Bool(false), - ); - return 1.into(); - } - } - } - } - return 0.into(); -} - -// FIGHTER_STATUS_KIND_JUMP_AERIAL - -pub unsafe extern "C" fn pre_jump_aerial(fighter: &mut L2CFighterCommon) -> L2CValue { - let is_0 = fighter.status_pre_JumpAerial_sub().get_i32() == 0; - let should_end = is_0 as i32 & 1 == 0; - if !should_end { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_AIR), - *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION, - *GROUND_CORRECT_KIND_AIR as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0, - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_ENABLE, - true, - false, - true, - 0, - *FIGHTER_STATUS_ATTR_INTO_DOOR as u32, - 0, - 0, - ); - } - return (should_end as i32).into(); -} - -pub unsafe extern "C" fn jump_aerial(fighter: &mut L2CFighterCommon) -> L2CValue { - let aerial_damage_reaction = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLOAT_AERIAL_DAMAGE_REACTION, - ); - DamageModule::set_no_reaction_mode_status( - fighter.module_accessor, - DamageNoReactionMode { - _address: *DAMAGE_NO_REACTION_MODE_REACTION_VALUE as u8, - }, - aerial_damage_reaction, - -1.0, - -1, - ); - WorkModule::on_flag( - fighter.module_accessor, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLAG_JUMP_AERIAL_ARMOR, - ); - let turn_cont_value = WorkModule::get_param_float( - fighter.module_accessor, - hash40("jump_aerial"), - hash40("turn_cont_value"), - ); - if fighter.global_table[STICK_X].get_f32() * -1.0 * PostureModule::lr(fighter.module_accessor) - > turn_cont_value - { - let turn_count = WorkModule::get_param_int( - fighter.module_accessor, - hash40("jump_aerial"), - hash40("turn_count"), - ); - WorkModule::set_int( - fighter.module_accessor, - turn_count, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, - ); - } else { - WorkModule::set_int( - fighter.module_accessor, - 0, - *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, - ); - } - MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); - fighter.status_JumpAerial(); - 0.into() -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); - 0.into() -} - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -pub unsafe extern "C" fn exec_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(); - 0.into() -} - -pub unsafe extern "C" fn exit_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exit(); - 0.into() -} - -pub fn install() { - smashline::Agent::new("yoshi") - .status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on) - .status(Init, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, init_guard_damage) - .status(Exit, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, exit_guard_damage) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, pre_jump_aerial) - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, exec_attack_air) - .status(Exit, *FIGHTER_STATUS_KIND_ATTACK_AIR, exit_attack_air) - .install(); +mod guard_on; +mod guard_off; +mod guard_damage; +mod jump_aerial; +mod attack_air; + +pub fn install(agent: &mut Agent) { + guard_on::install(agent); + guard_off::install(agent); + guard_damage::install(agent); + jump_aerial::install(agent); + attack_air::install(agent); } diff --git a/fighters/yoshi/src/status/attack_air.rs b/fighters/yoshi/src/status/attack_air.rs new file mode 100644 index 0000000000..d5026952fd --- /dev/null +++ b/fighters/yoshi/src/status/attack_air.rs @@ -0,0 +1,30 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR // + +pub unsafe extern "C" attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); + 0.into() +} + +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(); + 0.into() +} + +pub unsafe extern "C" fn attack_air_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_exit(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exit); +} diff --git a/fighters/yoshi/src/status/guard_damage.rs b/fighters/yoshi/src/status/guard_damage.rs new file mode 100644 index 0000000000..276af84df1 --- /dev/null +++ b/fighters/yoshi/src/status/guard_damage.rs @@ -0,0 +1,44 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_GUARD_DAMAGE // + +pub unsafe extern "C" fn guard_damage_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_ftStatusUniqProcessGuardDamage_initStatus_Inner(); + smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { + let shield_radius = + WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let throw_scale: Vector3f = Vector3f { + x: shield_radius, + y: shield_radius, + z: shield_radius, + }; + + ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); + + fighter.clear_lua_stack(); + lua_args!(fighter, 0x2dc1210b69i64); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); +} + +pub unsafe extern "C" fn guard_damage_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_ftStatusUniqProcessGuardDamage_exitStatus_common(); + smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) +} + +pub unsafe extern "C" fn guard_damage_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardDamage_common(L2CValue::Bool(false)); + fighter.sub_shift_status_main(L2CValue::Ptr( + L2CFighterCommon_status_GuardDamage_Main as *const () as _, + )) +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_init); + agent.status(Exit, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_exit); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_DAMAGE, guard_damage_main); +} diff --git a/fighters/yoshi/src/status/guard_off.rs b/fighters/yoshi/src/status/guard_off.rs new file mode 100644 index 0000000000..a9b37ff502 --- /dev/null +++ b/fighters/yoshi/src/status/guard_off.rs @@ -0,0 +1,111 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_GUARD_OFF // + +pub unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("just_shield_off"), + 0.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_yoshi_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + }; + fighter.sub_shift_status_main(L2CValue::Ptr(guard_off_main_loop as *const () as _)) +} + +unsafe extern "C" fn guard_off_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_GuardOff_Main_common().get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false), + ); + return 1.into(); + } + if fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_JUMP_TRIGGER != 0 { + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ESCAPE, + ) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_ESCAPE), + L2CValue::Bool(false), + ); + return 1.into(); + } + } + } + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off_main); +} diff --git a/fighters/yoshi/src/status/guard_on.rs b/fighters/yoshi/src/status/guard_on.rs new file mode 100644 index 0000000000..535f244eb8 --- /dev/null +++ b/fighters/yoshi/src/status/guard_on.rs @@ -0,0 +1,48 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_GUARD_ON + +pub unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + fighter.sub_status_guard_on_common(); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); + init_guard_damage_uniq(fighter); + fighter.main_shift(guard_on_main_loop) +} + +unsafe extern "C" fn guard_on_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_status_guard_on_main_air_common().get_bool() { + return 0.into(); + } + + fighter.sub_guard_cont(); + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND + && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD, false); + return 1.into(); + } + else { + let guard_shield = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_GUARD_SHIELD); + let min_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_GUARD_ON_WORK_INT_MIN_FRAME); + + if guard_shield > 0.0 + && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_GUARD) + && min_frame <= 0 + && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::off_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ); + fighter.change_status_req(*FIGHTER_STATUS_KIND_GUARD_OFF, true); + return 1.into(); + } + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on_main); +} diff --git a/fighters/yoshi/src/status/jump_aerial.rs b/fighters/yoshi/src/status/jump_aerial.rs new file mode 100644 index 0000000000..a146d00ef5 --- /dev/null +++ b/fighters/yoshi/src/status/jump_aerial.rs @@ -0,0 +1,89 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_JUMP_AERIAL + +pub unsafe extern "C" fn jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let is_0 = fighter.status_pre_JumpAerial_sub().get_i32() == 0; + let should_end = is_0 as i32 & 1 == 0; + if !should_end { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_AIR), + *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION, + *GROUND_CORRECT_KIND_AIR as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0, + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_ENABLE, + true, + false, + true, + 0, + *FIGHTER_STATUS_ATTR_INTO_DOOR as u32, + 0, + 0, + ); + } + return (should_end as i32).into(); +} + +pub unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let aerial_damage_reaction = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLOAT_AERIAL_DAMAGE_REACTION, + ); + DamageModule::set_no_reaction_mode_status( + fighter.module_accessor, + DamageNoReactionMode { + _address: *DAMAGE_NO_REACTION_MODE_REACTION_VALUE as u8, + }, + aerial_damage_reaction, + -1.0, + -1, + ); + WorkModule::on_flag( + fighter.module_accessor, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_FLAG_JUMP_AERIAL_ARMOR, + ); + let turn_cont_value = WorkModule::get_param_float( + fighter.module_accessor, + hash40("jump_aerial"), + hash40("turn_cont_value"), + ); + if fighter.global_table[STICK_X].get_f32() * -1.0 * PostureModule::lr(fighter.module_accessor) + > turn_cont_value + { + let turn_count = WorkModule::get_param_int( + fighter.module_accessor, + hash40("jump_aerial"), + hash40("turn_count"), + ); + WorkModule::set_int( + fighter.module_accessor, + turn_count, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, + ); + } else { + WorkModule::set_int( + fighter.module_accessor, + 0, + *FIGHTER_YOSHI_INSTANCE_WORK_ID_INT_AERIAL_TURN_COUNT, + ); + } + MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); + fighter.status_JumpAerial(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); +} diff --git a/fighters/yoshi/src/tamago/acmd/mod.rs b/fighters/yoshi/src/tamago/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/yoshi/src/tamago/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/yoshi/src/tamago/acmd/specials.rs b/fighters/yoshi/src/tamago/acmd/specials.rs new file mode 100644 index 0000000000..53de5e5266 --- /dev/null +++ b/fighters/yoshi/src/tamago/acmd/specials.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 54, 0, 54, 4.5, 0.0, -1.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_YOSHI_EGG_HIT, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_burst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 54, 0, 54, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_YOSHI_EGG_HIT, *ATTACK_REGION_OBJECT); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwed", game_throwed); + agent.acmd("game_burst", game_burst); +} diff --git a/fighters/yoshi/src/tamago/mod.rs b/fighters/yoshi/src/tamago/mod.rs new file mode 100644 index 0000000000..b38bf8b608 --- /dev/null +++ b/fighters/yoshi/src/tamago/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("yoshi_tamago"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From d071a85796f39a4019bb7d34c62f4ef4407307f6 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 08:16:32 -0500 Subject: [PATCH 032/172] josh 2 --- fighters/yoshi/src/status/guard_damage.rs | 17 ----------------- fighters/yoshi/src/status/guard_on.rs | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fighters/yoshi/src/status/guard_damage.rs b/fighters/yoshi/src/status/guard_damage.rs index 276af84df1..0a66d5d9ba 100644 --- a/fighters/yoshi/src/status/guard_damage.rs +++ b/fighters/yoshi/src/status/guard_damage.rs @@ -8,23 +8,6 @@ pub unsafe extern "C" fn guard_damage_init(fighter: &mut L2CFighterCommon) -> L2 smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) } -unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { - let shield_radius = - WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let throw_scale: Vector3f = Vector3f { - x: shield_radius, - y: shield_radius, - z: shield_radius, - }; - - ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); - - fighter.clear_lua_stack(); - lua_args!(fighter, 0x2dc1210b69i64); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(0); -} - pub unsafe extern "C" fn guard_damage_exit(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_ftStatusUniqProcessGuardDamage_exitStatus_common(); smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_GUARD_DAMAGE)(fighter) diff --git a/fighters/yoshi/src/status/guard_on.rs b/fighters/yoshi/src/status/guard_on.rs index 535f244eb8..592789832b 100644 --- a/fighters/yoshi/src/status/guard_on.rs +++ b/fighters/yoshi/src/status/guard_on.rs @@ -3,6 +3,23 @@ use globals::*; // FIGHTER_STATUS_KIND_GUARD_ON +unsafe extern "C" fn init_guard_damage_uniq(fighter: &mut L2CFighterCommon) { + let shield_radius = + WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let throw_scale: Vector3f = Vector3f { + x: shield_radius, + y: shield_radius, + z: shield_radius, + }; + + ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("throw"), &throw_scale); + + fighter.clear_lua_stack(); + lua_args!(fighter, 0x2dc1210b69i64); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(0); +} + pub unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION); fighter.sub_status_guard_on_common(); From 5ffdce4df04e927e1cd5eca3577a57c7e609b4f1 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 08:58:13 -0500 Subject: [PATCH 033/172] wii fit + fix josh (real) --- fighters/wiifit/src/acmd/aerials.rs | 230 +++++++++--------- fighters/wiifit/src/acmd/ground.rs | 124 +++++----- fighters/wiifit/src/acmd/mod.rs | 16 +- fighters/wiifit/src/acmd/other.rs | 228 +++++------------ fighters/wiifit/src/acmd/smashes.rs | 154 ++++++------ fighters/wiifit/src/acmd/specials.rs | 38 ++- fighters/wiifit/src/acmd/throws.rs | 30 ++- fighters/wiifit/src/acmd/tilts.rs | 151 ++++++------ fighters/wiifit/src/lib.rs | 17 +- fighters/wiifit/src/opff.rs | 8 +- .../wiifit/src/{status/mod.rs => status.rs} | 17 +- fighters/wiifit/src/status/special_s.rs | 20 +- fighters/wiifit/src/sunbullet/acmd/mod.rs | 7 + .../wiifit/src/sunbullet/acmd/specials.rs | 18 ++ fighters/wiifit/src/sunbullet/mod.rs | 9 + fighters/yoshi/src/status/attack_air.rs | 2 +- 16 files changed, 494 insertions(+), 575 deletions(-) rename fighters/wiifit/src/{status/mod.rs => status.rs} (56%) create mode 100644 fighters/wiifit/src/sunbullet/acmd/mod.rs create mode 100644 fighters/wiifit/src/sunbullet/acmd/specials.rs create mode 100644 fighters/wiifit/src/sunbullet/mod.rs diff --git a/fighters/wiifit/src/acmd/aerials.rs b/fighters/wiifit/src/acmd/aerials.rs index 935d63f19f..886c58a534 100644 --- a/fighters/wiifit/src/acmd/aerials.rs +++ b/fighters/wiifit/src/acmd/aerials.rs @@ -1,228 +1,230 @@ use super::*; -unsafe extern "C" fn wiifit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 5.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("head"), 5.0, 110, 72, 0, 50, 4.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 90, 72, 0, 50, 4.0, 0.0, 0.0, -0.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("head"), 5.0, 110, 72, 0, 50, 4.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 90, 72, 0, 50, 4.0, 0.0, 0.0, -0.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 5.0, 110, 72, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 8.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 45, 8.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 12.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 2.0, Hash40::new("top"), Vector3f::new(0.0, 9.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 2.0, Hash40::new("top"), Vector3f::new(0.0, 9.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 50, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 50, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 50, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 10.0, 300, 68, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 45, 102, 0, 20, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.5, 55, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.5, 55, 102, 0, 20, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 45, 102, 0, 20, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.5, 55, 102, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 0.640); - //FT_MOTION_RATE_RANGE(fighter, 19.0, 46.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.640); + //FT_MOTION_RATE_RANGE(agent, 19.0, 46.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wiifit_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 9.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 17.0, 0.75, 1.0, Hash40::new("handr"), Vector3f::new(0.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 17.0, 0.75, 1.0, Hash40::new("handr"), Vector3f::new(0.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 102, 0, 40, 3.5, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 4.0, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 102, 0, 40, 4.5, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 102, 0, 40, 3.5, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 4.0, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 102, 0, 40, 4.5, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.0, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.5, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 4.0, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.0, 0.0, 4.3, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 3.5, 0.0, 4.3, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 102, 0, 25, 4.0, 0.0, 4.3, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 5.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("top"), Vector3f::new(0.0, 4.0, -8.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("top"), Vector3f::new(0.0, 4.0, -8.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 72, 82, 0, 60, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 6.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("head"), Vector3f::new(3.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 10.0, 1.0, 1.25, Hash40::new("head"), Vector3f::new(3.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -unsafe extern "C" fn wiifit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 13.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 270, 100, 0, 40, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 14.0, 270, 54, 0, 20, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 102, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wiifit_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 20.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { - // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 27.0, 1.25, 1.75, Hash40::new("kneer"), Vector3f::new(1.5, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); + // crate::opff::start_ring(utils::util::get_agent_common_from_accessor(boma), 27.0, 1.25, 1.75, Hash40::new("kneer"), Vector3f::new(1.5, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attackairn", wiifit_attack_air_n_game) - .acmd("effect_attackairn", wiifit_attack_air_n_effect) - .acmd("game_attackairf", wiifit_attack_air_f_game) - .acmd("effect_attackairf", wiifit_attack_air_f_effect) - .acmd("game_attackairb", wiifit_attack_air_b_game) - .acmd("effect_attackairb", wiifit_attack_air_b_effect) - .acmd("game_attackairhi", wiifit_attack_air_hi_game) - .acmd("effect_attackairhi", wiifit_attack_air_hi_effect) - .acmd("game_attackairlw", wiifit_attack_air_lw_game) - .acmd("effect_attackairlw", wiifit_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/wiifit/src/acmd/ground.rs b/fighters/wiifit/src/acmd/ground.rs index 520b4a7cee..0aa58fd812 100644 --- a/fighters/wiifit/src/acmd/ground.rs +++ b/fighters/wiifit/src/acmd/ground.rs @@ -1,125 +1,123 @@ use super::*; -unsafe extern "C" fn wiifit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 3.0, 361, 25, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 20, 2.75, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 5.0, 361, 130, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("handl"), 3.0, 361, 25, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 20, 2.75, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("footr"), 5.0, 361, 130, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn wiifit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.8, 5.2); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 3.2, 0.0, 9.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 24, 0, 45, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 8, 24, 0, 25, 4.5, 0.0, 9.3, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.2, 2.2); } } -unsafe extern "C" fn wiifit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.5, 5.2); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 10, 1.8, 0.0, 1.5, 4.7, Some(0.0), Some(1.5), Some(6.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 45, 95, 0, 50, 6.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 50, 0, 10, 1.8, 0.0, 1.5, 4.7, Some(0.0), Some(1.5), Some(6.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 45, 95, 0, 50, 6.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.2, 2.2); } } -unsafe extern "C" fn wiifit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 3.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(2.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 3.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 50, 71, 0, 75, 2.5, 0.0, 3.0, 4.0, Some(0.0), Some(2.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 4.5, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 3.0, 4.0, Some(0.0), Some(1.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 4.5, 0.0, 7.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 9.0, 3.0, Some(0.0), Some(10.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 65, 80, 0, 75, 2.0, 0.0, 3.0, 4.0, Some(0.0), Some(1.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.4); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wiifit_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.6, Hash40::new("top"), Vector3f::new(0.0, 7.0, 6.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attack11", wiifit_attack_11_game) - .acmd("game_attack12", wiifit_attack_12_game) - .acmd("game_attack13", wiifit_attack_13_game) - .acmd("game_attackdash", wiifit_attack_dash_game) - .acmd("effect_attackdash", wiifit_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/wiifit/src/acmd/mod.rs b/fighters/wiifit/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/wiifit/src/acmd/mod.rs +++ b/fighters/wiifit/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/wiifit/src/acmd/other.rs b/fighters/wiifit/src/acmd/other.rs index 49801c1c23..d513266c7a 100644 --- a/fighters/wiifit/src/acmd/other.rs +++ b/fighters/wiifit/src/acmd/other.rs @@ -1,235 +1,141 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_wiifit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_wiifit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 19.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wiifit_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wiifit_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wiifit_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wiifit_step_left_m")); } } -unsafe extern "C" fn wiifit_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn wiifit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.6, 0.0, Some(0.0), Some(8.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.6, 0.0, Some(0.0), Some(8.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn wiifit_sunbullet_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_catch", game_catch); -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", wiifit_turn_dash_game) - .acmd("game_catch", wiifit_catch_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("wiifit_sunbullet") - .acmd("game_hold", wiifit_sunbullet_hold_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", escape_air_slide_game); } diff --git a/fighters/wiifit/src/acmd/smashes.rs b/fighters/wiifit/src/acmd/smashes.rs index 24efd1ef6c..6225bf4138 100644 --- a/fighters/wiifit/src/acmd/smashes.rs +++ b/fighters/wiifit/src/acmd/smashes.rs @@ -1,149 +1,143 @@ use super::*; -unsafe extern "C" fn wiifit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 110, 0, 26, 3.5, 2.5, 0.0, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 361, 110, 0, 26, 3.25, -1.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.75); - + FT_MOTION_RATE(agent, 0.75); } -unsafe extern "C" fn wiifit_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 1.75, 2.4, Hash40::new("bust"), Vector3f::new(-1.0, 0.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -unsafe extern "C" fn wiifit_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 90, 97, 0, 31, 2.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.6, 0.0, 24.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 90, 97, 0, 31, 2.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.6, 0.0, 24.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 5.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 90, 102, 0, 31, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 90, 112, 0, 30, 1.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 2.8, 0.0, 18.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 3.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 90, 112, 0, 30, 1.8, 0.0, 24.0, -0.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 2.8, 0.0, 18.0, -0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 3.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 70, 107, 0, 30, 4.0, 0.0, 4.0, -3.0, Some(0.0), Some(4.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 20, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 20, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } // frame(lua_state, 14.0); - // if is_excute(fighter) { + // if is_excute(agent) { // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 0.75, 1.25, Hash40::new("top"), Vector3f::new(0.0, 24.5, -0.3), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } // } - } -unsafe extern "C" fn wiifit_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 18.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 18.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 20, 115, 0, 20, 4.0, 0.0, 5.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 20, 115, 0, 20, 3.0, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 26.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 26.0, 7.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wiifit_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // if WorkModule::get_int(boma, *FIGHTER_WIIFIT_INSTANCE_WORK_ID_INT_SPECIAL_LW_WAZA_EFFECTIVE_FRAME) > 0 { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 24.0, 1.75, 2.4, Hash40::new("top"), Vector3f::new(0.0, 4.0, 1.5), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), true); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attacks4", wiifit_attack_s4_s_game) - .acmd("effect_attacks4", wiifit_attack_s4_effect) - .acmd("game_attackhi4", wiifit_attack_hi4_game) - .acmd("game_attackhi4l", wiifit_attack_hi4_game) - .acmd("effect_attackhi4", wiifit_attack_hi4_effect) - .acmd("effect_attackhi4l", wiifit_attack_hi4_effect) - .acmd("game_attacklw4", wiifit_attack_lw4_game) - .acmd("effect_attacklw4", wiifit_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4l", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("effect_attackhi4l", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/wiifit/src/acmd/specials.rs b/fighters/wiifit/src/acmd/specials.rs index 3e0d9fd315..8887003101 100644 --- a/fighters/wiifit/src/acmd/specials.rs +++ b/fighters/wiifit/src/acmd/specials.rs @@ -1,40 +1,38 @@ use super::*; -unsafe extern "C" fn wiifit_special_s_heading_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsheading(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 7.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 7.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 295, 87, 0, 26, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 12.0, 295, 60, 0, 27, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 12.0, 295, 60, 0, 27, 5.7, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 5.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 5.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 295, 71, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("head"), 10.0, 295, 64, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 10.0, 295, 64, 0, 30, 4.0, 2.0, 1.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_specialsheading", wiifit_special_s_heading_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsheading", game_specialsheading); } diff --git a/fighters/wiifit/src/acmd/throws.rs b/fighters/wiifit/src/acmd/throws.rs index a6e91fb763..e579250a25 100644 --- a/fighters/wiifit/src/acmd/throws.rs +++ b/fighters/wiifit/src/acmd/throws.rs @@ -1,33 +1,31 @@ use super::*; -unsafe extern "C" fn wiifit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 100, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 100, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 361, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 361, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 37.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 23); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 23); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_throwf", wiifit_throw_f_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); } diff --git a/fighters/wiifit/src/acmd/tilts.rs b/fighters/wiifit/src/acmd/tilts.rs index b22d2d34db..86893ede98 100644 --- a/fighters/wiifit/src/acmd/tilts.rs +++ b/fighters/wiifit/src/acmd/tilts.rs @@ -1,145 +1,140 @@ use super::*; -unsafe extern "C" fn wiifit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("kneel"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 361, 85, 0, 50, 3.5, 3.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 11.0, 361, 85, 0, 50, 3.5, 1.5, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 361, 85, 0, 50, 3.5, 3.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 11.0, 361, 85, 0, 50, 3.5, 1.5, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 105, 65, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - // if is_excute(fighter) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { + // if is_excute(agent) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.5, Hash40::new("kneel"), Vector3f::new(1.5, 2.5, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } - } -unsafe extern "C" fn wiifit_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn wiifit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 75, 70, 0, 80, 3.0, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 90, 70, 0, 80, 2.5, 0.0, 11.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 10.0, 75, 70, 0, 80, 3.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 75, 70, 0, 80, 3.0, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 90, 70, 0, 80, 4.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 90, 70, 0, 80, 2.5, 0.0, 11.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("footl"), 10.0, 75, 70, 0, 80, 3.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn wiifit_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, -1.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } // frame(lua_state, 5.0); - // if is_excute(fighter) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { + // if is_excute(agent) && WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 0.75, 1.5, Hash40::new("handr"), Vector3f::new(-0.25, -1.0, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } } -unsafe extern "C" fn wiifit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 5.3); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 35, 86, 0, 30, 4.0, 0.0, 3.0, 10.5, Some(0.0), Some(4.8), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 35, 86, 0, 30, 3.5, 0.0, 3.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 35, 86, 0, 30, 4.0, 0.0, 3.0, 10.5, Some(0.0), Some(4.8), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 35, 86, 0, 30, 3.5, 0.0, 3.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.8, 5.8); } - } -unsafe extern "C" fn wiifit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("wiifit_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("wiifit_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); // if WorkModule::is_flag(boma, vars::wiifit::instance::IS_ZEN_MODE) { // crate::opff::start_ring(utils::util::get_fighter_common_from_accessor(boma), 14.0, 1.0, 1.5, Hash40::new("top"), Vector3f::new(11.0, 4.5, 0.0), Vector3f::new(3000.0, 0.7, 0.7), Vector3f::new(0.7, 1000.0, 0.7), false); // } } - } -pub fn install() { - smashline::Agent::new("wiifit") - .acmd("game_attacks3", wiifit_attack_s3_s_game) - .acmd("effect_attacks3", wiifit_attack_s3_effect) - .acmd("expression_attacks3", wiifit_attack_s3_expression) - .acmd("game_attackhi3", wiifit_attack_hi3_game) - .acmd("effect_attackhi3", wiifit_attack_hi3_effect) - .acmd("game_attacklw3", wiifit_attack_lw3_game) - .acmd("effect_attacklw3", wiifit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/wiifit/src/lib.rs b/fighters/wiifit/src/lib.rs index 8e2ddcc726..2416456e0a 100644 --- a/fighters/wiifit/src/lib.rs +++ b/fighters/wiifit/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod sunbullet; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wiifit"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + sunbullet::install(); } diff --git a/fighters/wiifit/src/opff.rs b/fighters/wiifit/src/opff.rs index 1b86919096..5332d431b6 100644 --- a/fighters/wiifit/src/opff.rs +++ b/fighters/wiifit/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn header_cancel(boma: &mut BattleObjectModuleAccessor) { let status_kind_prev = StatusModule::prev_status_kind(boma, 0); @@ -220,8 +219,7 @@ pub unsafe fn wiifit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wiifit") - .on_line(Main, wiifit_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wiifit_frame_wrapper); } diff --git a/fighters/wiifit/src/status/mod.rs b/fighters/wiifit/src/status.rs similarity index 56% rename from fighters/wiifit/src/status/mod.rs rename to fighters/wiifit/src/status.rs index e77e8d79bf..ed098d1eee 100644 --- a/fighters/wiifit/src/status/mod.rs +++ b/fighters/wiifit/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; + mod special_s; unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -11,16 +12,12 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn wiifit_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_WIIFIT { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("wiifit") - .on_start(wiifit_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); } diff --git a/fighters/wiifit/src/status/special_s.rs b/fighters/wiifit/src/status/special_s.rs index 33e8134c4c..54aeaccd59 100644 --- a/fighters/wiifit/src/status/special_s.rs +++ b/fighters/wiifit/src/status/special_s.rs @@ -95,19 +95,9 @@ unsafe extern "C" fn special_s_jump_end(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("wiifit") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end) - .status( - Init, - *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_init, - ) - .status( - End, - *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + agent.status(Init, *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init); + agent.status(End, *FIGHTER_WIIFIT_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_end); } diff --git a/fighters/wiifit/src/sunbullet/acmd/mod.rs b/fighters/wiifit/src/sunbullet/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/wiifit/src/sunbullet/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/wiifit/src/sunbullet/acmd/specials.rs b/fighters/wiifit/src/sunbullet/acmd/specials.rs new file mode 100644 index 0000000000..f28a7781b7 --- /dev/null +++ b/fighters/wiifit/src/sunbullet/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 50, 130, 0, 10, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hold", game_hold); +} diff --git a/fighters/wiifit/src/sunbullet/mod.rs b/fighters/wiifit/src/sunbullet/mod.rs new file mode 100644 index 0000000000..13be9fa2ab --- /dev/null +++ b/fighters/wiifit/src/sunbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("wiifit_sunbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/yoshi/src/status/attack_air.rs b/fighters/yoshi/src/status/attack_air.rs index d5026952fd..613197811d 100644 --- a/fighters/yoshi/src/status/attack_air.rs +++ b/fighters/yoshi/src/status/attack_air.rs @@ -3,7 +3,7 @@ use globals::*; // FIGHTER_STATUS_KIND_ATTACK_AIR // -pub unsafe extern "C" attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); 0.into() } From d1e5a1b058f9333d63365b131f939a4039bb378e Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 09:57:08 -0500 Subject: [PATCH 034/172] marth + fix wii fit (real) i don't like dancing blade --- fighters/marth/src/acmd/aerials.rs | 235 +++---- fighters/marth/src/acmd/ground.rs | 105 ++- fighters/marth/src/acmd/mod.rs | 16 +- fighters/marth/src/acmd/other.rs | 220 ++---- fighters/marth/src/acmd/smashes.rs | 366 ++-------- fighters/marth/src/acmd/specials.rs | 937 +++++++++---------------- fighters/marth/src/acmd/throws.rs | 76 +- fighters/marth/src/acmd/tilts.rs | 111 ++- fighters/marth/src/lib.rs | 11 +- fighters/marth/src/opff.rs | 7 +- fighters/marth/src/status.rs | 90 +-- fighters/marth/src/status/special_s.rs | 87 +++ fighters/wiifit/src/acmd/other.rs | 2 +- 13 files changed, 845 insertions(+), 1418 deletions(-) create mode 100644 fighters/marth/src/status/special_s.rs diff --git a/fighters/marth/src/acmd/aerials.rs b/fighters/marth/src/acmd/aerials.rs index d6b29ba797..96c57f8f86 100644 --- a/fighters/marth/src/acmd/aerials.rs +++ b/fighters/marth/src/acmd/aerials.rs @@ -1,229 +1,224 @@ - use super::*; -unsafe extern "C" fn marth_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air-only hitboxes - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 40, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.1); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 0.1); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 4.0, 90, 50, 0, 40, 4.0, 1.0, -1.3, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 40, 4.0, 1.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("shoulderr"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.1); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 0.1); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 1.2, -1.1, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 0.8, -1.1, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 10.0, 361, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 1.2, -1.1, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 361, 80, 0, 50, 4.0, 0.8, -1.1, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 4.0, -2.0, 1.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("hip"), 10.0, 361, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); // f5 ingame - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 67, 70, 0, 45, 4.0, 0.0, 0.0, 8.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 67, 70, 0, 45, 4.0, 0.0, 0.0, 8.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); // f9 ingame - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_DESIRED_RATE(fighter, (44.0 - 24.0), 10.0); + FT_DESIRED_RATE(agent, (44.0 - 24.0), 10.0); frame(lua_state, 42.0); // f32 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 25, 4.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 10, 4.0, -1.0, 0.0, -1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 100, 0, 40, 4.5, 0.0, 0.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 70, 0, 30, 4.0, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 25, 4.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 70, 0, 10, 4.0, -1.0, 0.0, -1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 100, 0, 40, 4.5, 0.0, 0.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 23.0); // f31 ingame - FT_DESIRED_RATE(fighter, (39.0 - 23.0), 10.0); + FT_DESIRED_RATE(agent, (39.0 - 23.0), 10.0); frame(lua_state, 23.625); // f32 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 90, 70, 0, 45, 4.0, 0.0, 0.0, 7.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 30, 4.0, 0.0, 0.0, 3.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 80, 70, 0, 20, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("claviclel"), 9.0, 80, 70, 0, 18, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 90, 70, 0, 45, 4.0, 0.0, 0.0, 7.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 30, 4.0, 0.0, 0.0, 3.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 80, 70, 0, 20, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("claviclel"), 9.0, 80, 70, 0, 18, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn marth_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn marth_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 40, 3.5, 0.0, 0.0, 3.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 9.0, 361, 70, 0, 20, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 40, 3.5, 0.0, 0.0, 3.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 9.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 9.0, 361, 70, 0, 20, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 290, 65, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 290, 65, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 13.0, 290, 46, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 13.0, 290, 46, 0, 35, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } - } -unsafe extern "C" fn marth_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 0.0, Hash40::new("sword1"), 0.0, 0.0, 12.0, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), -0.1, 0.0, 0.0, -11.0, 0.0, 1.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.39999998, 0.200000003); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 0.0, Hash40::new("sword1"), 0.0, 0.0, 12.0, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), -0.1, 0.0, 0.0, -11.0, 0.0, 1.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.39999998, 0.200000003); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6.0); } - } -unsafe extern "C" fn marth_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attackairn", marth_attack_air_n_game) - .acmd("game_attackairf", marth_attack_air_f_game) - .acmd("game_attackairb", marth_attack_air_b_game) - .acmd("game_attackairhi", marth_attack_air_hi_game) - .acmd("effect_attackairhi", marth_attack_air_hi_effect) - .acmd("game_attackairlw", marth_attack_air_lw_game) - .acmd("effect_attackairlw", marth_attack_air_lw_effect) - .acmd("expression_attackairlw", marth_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/marth/src/acmd/ground.rs b/fighters/marth/src/acmd/ground.rs index d710398953..f28e331a68 100644 --- a/fighters/marth/src/acmd/ground.rs +++ b/fighters/marth/src/acmd/ground.rs @@ -1,98 +1,93 @@ - use super::*; -unsafe extern "C" fn marth_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 78, 30, 0, 55, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 65, 30, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 65, 30, 0, 55, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 5.0, 90, 30, 0, 55, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 78, 30, 0, 55, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 65, 30, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 65, 30, 0, 55, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 5.0, 90, 30, 0, 55, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("armr"), 3.0, 361, 20, 0, 20, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 5.0, 180, 20, 0, 20, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 0.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("armr"), 3.0, 361, 20, 0, 20, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 5.0, 180, 20, 0, 20, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); //AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn marth_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn marth_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 45, 75, 0, 62, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 6.0, 45, 75, 0, 62, 4.0, 2.5, -1.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 45, 75, 0, 62, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 6.0, 45, 75, 0, 62, 4.0, 2.5, -1.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 7.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 9.0, 361, 60, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 0.0, 0.0, 7.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 7.5, Some(12.0), Some(1.5), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 110, 55, 0, 70, 4.0, 1.0, 0.0, 7.5, Some(12.0), Some(1.5), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attack11", marth_attack_11_game) - .acmd("expression_attack11", marth_attack_11_expression) - .acmd("game_attack12", marth_attack_12_game) - .acmd("game_attackdash", marth_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/marth/src/acmd/mod.rs b/fighters/marth/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/marth/src/acmd/mod.rs +++ b/fighters/marth/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/marth/src/acmd/other.rs b/fighters/marth/src/acmd/other.rs index 45d2f71887..b624e2f9ab 100644 --- a/fighters/marth/src/acmd/other.rs +++ b/fighters/marth/src/acmd/other.rs @@ -1,226 +1,148 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn marth_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn marth_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_marth_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_marth_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_marth_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_marth_step_right_l")); } } -unsafe extern "C" fn marth_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("marth") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_catch", marth_catch_game) - .acmd("game_dash", marth_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", marth_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/marth/src/acmd/smashes.rs b/fighters/marth/src/acmd/smashes.rs index 1683592ccc..156e069282 100644 --- a/fighters/marth/src/acmd/smashes.rs +++ b/fighters/marth/src/acmd/smashes.rs @@ -1,360 +1,132 @@ - use super::*; -unsafe extern "C" fn marth_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 5.0 / (9.75 - 4.0)); + FT_MOTION_RATE(agent, 5.0 / (9.75 - 4.0)); frame(lua_state, 9.75); - FT_MOTION_RATE(fighter, 1.0 / (10.25 - 9.75)); + FT_MOTION_RATE(agent, 1.0 / (10.25 - 9.75)); frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0 / (11.0 - 10.25)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 2.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 38, 72, 0, 52, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 20.0, 361, 81, 0, 65, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0 / (11.0 - 10.25)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 2.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 38, 72, 0, 52, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("bust"), 14.0, 38, 72, 0, 52, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 20.0, 361, 81, 0, 65, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - FT_DESIRED_RATE(fighter, (26.0 - 13.0), 22.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (26.0 - 13.0), 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); // f36 ingame - FT_DESIRED_RATE(fighter, (49.0 - 26.0), 13.0); - + FT_DESIRED_RATE(agent, (49.0 - 26.0), 13.0); } -unsafe extern "C" fn marth_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.25); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 6, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_marth_sword1"), Hash40::new("tex_marth_sword2"), 6, Hash40::new("sword1"), 0.0, 0.0, 0.5, Hash40::new("sword1"), -0.0, -0.0, 12.6, true, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 11, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 11, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn marth_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 89, 85, 0, 40, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 89, 80, 0, 60, 4.6, 0.0, 0.0, 8.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 90, 85, 0, 40, 5.8, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 125, 100, 155, 0, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(-5.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 89, 85, 0, 40, 5.8, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 89, 80, 0, 60, 4.6, 0.0, 0.0, 8.3, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 90, 85, 0, 40, 5.8, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 125, 100, 155, 0, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(-5.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 75, 93, 0, 60, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 80, 93, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 75, 93, 0, 60, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 361, 93, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 80, 93, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 75, 93, 0, 40, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 16.0, 80, 89, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 75, 93, 0, 40, 3.75, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("hip"), 11.0, 361, 93, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 16.0, 80, 89, 0, 50, 3.75, 0.5, 0.0, 8.3, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_DESIRED_RATE(fighter, (70.0 - 43.0), 23.0); - -} - -unsafe extern "C" fn marth_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - + FT_DESIRED_RATE(agent, (70.0 - 43.0), 23.0); } -unsafe extern "C" fn marth_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); -unsafe extern "C" fn marth_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - COL_NORMAL(fighter); - } - -} + agent.acmd("game_attackhi4", game_attackhi4); -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attacks4", marth_attack_s4_s_game) - .acmd("effect_attacks4", marth_attack_s4_s_effect) - .acmd("game_attackhi4", marth_attack_hi4_game) - .acmd("game_attacklw4", marth_attack_lw4_game) - .acmd("effect_specials4hi", marth_special_s4_hi_effect) - .acmd("effect_specialairs4hi", marth_special_air_s4_hi_effect) - .acmd("effect_specials4s", marth_special_s4_s_effect) - .acmd("effect_specialairs4s", marth_special_air_s4_s_effect) - .acmd("effect_specials4lw", marth_special_s4_lw_effect) - .acmd("effect_specialairs4lw", marth_special_air_s4_lw_effect) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/marth/src/acmd/specials.rs b/fighters/marth/src/acmd/specials.rs index 8bbe880130..804eb86a76 100644 --- a/fighters/marth/src/acmd/specials.rs +++ b/fighters/marth/src/acmd/specials.rs @@ -1,735 +1,501 @@ - use super::*; -unsafe extern "C" fn marth_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 9.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 9.0, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn marth_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); } - frame(lua_state, 30.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn marth_special_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 6.0); - if is_excute(fighter) { - /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - -} - -unsafe extern "C" fn marth_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - } -unsafe extern "C" fn marth_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_red"), false, true); + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - -} - -unsafe extern "C" fn marth_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("marth_sword_green"), false, true); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } - + if is_excute(agent) { + COL_NORMAL(agent); + } } -unsafe extern "C" fn marth_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } - frame(lua_state, 20.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); + COL_NORMAL(agent); } - } -unsafe extern "C" fn marth_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } } -unsafe extern "C" fn marth_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -742,69 +508,50 @@ unsafe extern "C" fn marth_special_lw_hit_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_special_air_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - AttackModule::set_force_reaction(boma, 3, true, false); - if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); - } - } - frame(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("expression_specials1", expression_specials1); + + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); -} - -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_specials1", marth_special_s1_game) - .acmd("expression_specials1", marth_special_s1_expression) - .acmd("game_specialairs1", marth_special_air_s1_game) - .acmd("game_specials2hi", marth_special_s2_hi_game) - .acmd("game_specialairs2hi", marth_special_air_s2_hi_game) - .acmd("game_specialairs2lw", marth_special_s2_lw_game) - .acmd("game_specialairs2lw", marth_special_air_s2_lw_game) - .acmd("game_specials3hi", marth_special_s3_hi_game) - .acmd("game_specialairs3hi", marth_special_air_s3_hi_game) - .acmd("game_specials3s", marth_special_s3_s_game) - .acmd("game_specialairs3s", marth_special_air_s3_s_game) - .acmd("game_specials3lw", marth_special_s3_lw_game) - .acmd("game_specialairs3lw", marth_special_air_s3_lw_game) - .acmd("effect_specials1", marth_special_s1_effect) - .acmd("effect_specialairs1", marth_special_air_s1_effect) - .acmd("effect_specials2hi", marth_special_s2_hi_effect) - .acmd("effect_specialairs2hi", marth_special_air_s2_hi_effect) - .acmd("effect_specials2lw", marth_special_s2_lw_effect) - .acmd("effect_specialairs2lw", marth_special_air_s2_lw_effect) - .acmd("effect_specials3hi", marth_special_s3_hi_effect) - .acmd("effect_specialairs3hi", marth_special_air_s3_hi_effect) - .acmd("effect_specials3s", marth_special_s3_s_effect) - .acmd("effect_specialairs3s", marth_special_air_s3_s_effect) - .acmd("effect_specials3lw", marth_special_s3_lw_effect) - .acmd("effect_specialairs3lw", marth_special_air_s3_lw_effect) - .acmd("game_specialhi", marth_special_hi_game) - .acmd("game_specialairhi", marth_special_air_hi_game) - .acmd("game_speciallwhit", marth_special_lw_hit_game) - .acmd("game_specialairlwhit", marth_special_air_lw_hit_game) - .install(); + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } diff --git a/fighters/marth/src/acmd/throws.rs b/fighters/marth/src/acmd/throws.rs index 87358bf4f6..ef917a5645 100644 --- a/fighters/marth/src/acmd/throws.rs +++ b/fighters/marth/src/acmd/throws.rs @@ -1,66 +1,62 @@ - use super::*; -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 2); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:1.0, y: -3.0, z: 14.75 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 117, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 117, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -6, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -6, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 130, 50, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 130, 50, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/marth/src/acmd/tilts.rs b/fighters/marth/src/acmd/tilts.rs index c967754622..e4fbcd819a 100644 --- a/fighters/marth/src/acmd/tilts.rs +++ b/fighters/marth/src/acmd/tilts.rs @@ -1,97 +1,94 @@ - use super::*; -unsafe extern "C" fn marth_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 361, 75, 0, 40, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.5, 361, 80, 0, 70, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 75, 0, 40, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.5, 361, 80, 0, 70, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn marth_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/5.75); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/5.75); } frame(lua_state, 5.75); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 110, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 110, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 110, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 110, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(13.0 - 6.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(13.0 - 6.5)); } frame(lua_state,8.75); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 85, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 80, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 85, 120, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 118, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 361, 116, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 80, 100, 0, 50, 4.0, 0.0, 0.0, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); } wait(lua_state, 5.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn marth_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn marth_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 25, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 8.0, 30, 40, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 30, 40, 0, 50, 4.0, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 40, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 25, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 8.0, 30, 40, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 30, 40, 0, 50, 4.0, 0.0, 0.0, 8.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("marth") - .acmd("game_attacks3", marth_attack_s3_s_game) - .acmd("game_attackhi3", marth_attack_hi3_game) - .acmd("expression_attackhi3", marth_attack_hi3_expression) - .acmd("game_attacklw3", marth_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/marth/src/lib.rs b/fighters/marth/src/lib.rs index 7bb0378152..82a713fd63 100644 --- a/fighters/marth/src/lib.rs +++ b/fighters/marth/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("marth"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/marth/src/opff.rs b/fighters/marth/src/opff.rs index 7336b68310..4ed9a8c16e 100644 --- a/fighters/marth/src/opff.rs +++ b/fighters/marth/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - pub unsafe fn dancing_blade_vertical_momentum(boma: &mut BattleObjectModuleAccessor){ let fighter_gravity = KineticModule::get_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; if boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2]) && boma.is_situation(*SITUATION_KIND_AIR) { @@ -122,8 +121,6 @@ pub unsafe fn marth_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("marth") - .on_line(Main, marth_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, marth_frame_wrapper); } diff --git a/fighters/marth/src/status.rs b/fighters/marth/src/status.rs index 353b900c3d..3c515ac4e7 100644 --- a/fighters/marth/src/status.rs +++ b/fighters/marth/src/status.rs @@ -1,92 +1,8 @@ use super::*; use globals::*; -// status script import - -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } +mod special_s; -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { - let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); - let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); - let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); - let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); - let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; - let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; - let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; - - let mut aerial_y_speed = 0.0; - let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; - - // [v] Disable motion energy - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - - let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - // Check for the side B status you're currently in - let current_status_kind = StatusModule::status_kind(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - - // alStack192 = gravity energy - // alStack176 = stop energy - // alStack208 = motion energy - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); - aerial_y_speed = air_spd_y; - } - else{ - aerial_y_speed = 0.0; - } - let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; - let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - } - if [*FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - } - } - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - 0.into() -} - -pub fn install() { - smashline::Agent::new("marth") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); } diff --git a/fighters/marth/src/status/special_s.rs b/fighters/marth/src/status/special_s.rs new file mode 100644 index 0000000000..4c21abf866 --- /dev/null +++ b/fighters/marth/src/status/special_s.rs @@ -0,0 +1,87 @@ +use super::*; + +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } + } + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); + let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); + let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); + let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); + let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; + let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; + let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; + + let mut aerial_y_speed = 0.0; + let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; + + // [v] Disable motion energy + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + + let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + // Check for the side B status you're currently in + let current_status_kind = StatusModule::status_kind(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + + // alStack192 = gravity energy + // alStack176 = stop energy + // alStack208 = motion energy + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + aerial_y_speed = air_spd_y; + } + else{ + aerial_y_speed = 0.0; + } + let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; + let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + } + if [*FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + } + } + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); +} diff --git a/fighters/wiifit/src/acmd/other.rs b/fighters/wiifit/src/acmd/other.rs index d513266c7a..e035fbd4d8 100644 --- a/fighters/wiifit/src/acmd/other.rs +++ b/fighters/wiifit/src/acmd/other.rs @@ -137,5 +137,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_escapeairslide", game_escapeairslide); } From 6560e912aa82d249f4117d9863856e2928cb61fb Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 12:39:53 -0500 Subject: [PATCH 035/172] roberto --- fighters/robot/src/acmd/aerials.rs | 625 +++++++++++----------- fighters/robot/src/acmd/ground.rs | 76 ++- fighters/robot/src/acmd/mod.rs | 16 +- fighters/robot/src/acmd/other.rs | 235 +++------ fighters/robot/src/acmd/smashes.rs | 134 +++-- fighters/robot/src/acmd/specials.rs | 624 ++++++++++------------ fighters/robot/src/acmd/throws.rs | 46 +- fighters/robot/src/acmd/tilts.rs | 130 +++-- fighters/robot/src/beam/acmd/mod.rs | 7 + fighters/robot/src/beam/acmd/specials.rs | 13 + fighters/robot/src/beam/mod.rs | 9 + fighters/robot/src/lib.rs | 17 +- fighters/robot/src/opff.rs | 9 +- fighters/robot/src/status.rs | 642 +---------------------- fighters/robot/src/status/special_hi.rs | 430 +++++++++++++++ fighters/robot/src/status/special_s.rs | 164 ++++++ 16 files changed, 1504 insertions(+), 1673 deletions(-) create mode 100644 fighters/robot/src/beam/acmd/mod.rs create mode 100644 fighters/robot/src/beam/acmd/specials.rs create mode 100644 fighters/robot/src/beam/mod.rs create mode 100644 fighters/robot/src/status/special_hi.rs create mode 100644 fighters/robot/src/status/special_s.rs diff --git a/fighters/robot/src/acmd/aerials.rs b/fighters/robot/src/acmd/aerials.rs index 720e1a74e1..d80e7a7c35 100644 --- a/fighters/robot/src/acmd/aerials.rs +++ b/fighters/robot/src/acmd/aerials.rs @@ -1,122 +1,119 @@ use super::*; -unsafe extern "C" fn robot_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 11.0, 75, 100, 0, 50, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 75, 100, 0, 50, 5.0, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("hip"), 11.0, 75, 100, 0, 50, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, 2.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -5.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, 2.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("hip"), 8.5, 55, 100, 0, 40, 5.0, -5.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); - LAST_EFFECT_SET_ALPHA(fighter, 0.45); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.1, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_n_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.75); + LAST_EFFECT_SET_ALPHA(agent, 0.45); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.1, 0.1); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); } - } -unsafe extern "C" fn robot_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(6.1-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("handl2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(6.1-6.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 50, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("handl2"), 9.0, 50, 90, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(7.2-6.1)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("handl2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(7.2-6.1)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 361, 60, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("handl2"), 6.0, 361, 60, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(9.0-7.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(9.0-7.2)); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(13.0-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(13.0-9.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(35.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(35.0-13.0)); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 8, 180, -130, 90, 1.0, true, *EF_FLIP_ZX); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 8, 180, -130, 90, 1.0, true, *EF_FLIP_ZX); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -129,364 +126,361 @@ unsafe extern "C" fn robot_attack_air_f_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 1.4, 1.4); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 1.4, 1.4); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handr2"), 1.0, 0, 2.0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("handr2"), 1.0, 0, 2.0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.4); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_d"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_d"), false, false); } } -unsafe extern "C" fn robot_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); - VarModule::off_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::set_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 0.0); - FT_MOTION_RATE(fighter, 2.0); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + VarModule::off_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::set_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 0.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } else { - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } for _ in 0..5 { wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) - && !VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED) + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) + && !VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED) && WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) > 10.0 { // If holding down the button, increment the charge and continue the slowed animation if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED); - VarModule::add_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 1.0); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED); + VarModule::add_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL, 1.0); let current_fuel = WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - let current_fuel_depletion = (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0); + let current_fuel_depletion = (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0); if (current_fuel_depletion > current_fuel) { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); WorkModule::set_float(boma, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - MeterModule::drain_direct(fighter.battle_object, 200.0); - FT_MOTION_RATE(fighter, 1.0); + MeterModule::drain_direct(agent.battle_object, 200.0); + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } // If no longer holding the button, play out the rest of the animation as normal else { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED); - FT_MOTION_RATE(fighter, 1.0); + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED); + FT_MOTION_RATE(agent, 1.0); } } } } } - if !VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_FINISHED) { - WorkModule::set_float(boma, WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) - (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - MeterModule::drain_direct(fighter.battle_object, (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0)); - FT_MOTION_RATE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_FINISHED) { + WorkModule::set_float(boma, WorkModule::get_float(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE) - (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + MeterModule::drain_direct(agent.battle_object, (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 13.0)); + FT_MOTION_RATE(agent, 1.0); - if VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { - VarModule::on_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX); + if VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { + VarModule::on_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX); } } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_BAIR) { - if VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { - SET_SPEED_EX(fighter, 1.75, 0.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) >= 5.0 { + SET_SPEED_EX(agent, 1.75, 0.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } else { - let boost_speed_x = 1.1 + (0.13 * VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); - let boost_speed_y = 0.0 + (0.04 * VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); - SET_SPEED_EX(fighter, boost_speed_x, boost_speed_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let boost_speed_x = 1.1 + (0.13 * VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); + let boost_speed_y = 0.0 + (0.04 * VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL)); + SET_SPEED_EX(agent, boost_speed_x, boost_speed_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - let charge_attack_damage_mul = 1.0 + (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); - ATTACK(fighter, 0, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 7.5, 3.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 0.0, 0.0, 0.0, Some(16.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + let charge_attack_damage_mul = 1.0 + (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); + ATTACK(agent, 0, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 7.5, 3.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 12.0 * charge_attack_damage_mul, 35, 85, 0, 30, 4.0, 0.0, 0.0, 0.0, Some(16.0), Some(0.0), Some(0.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } else { - ATTACK(fighter, 0, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0, 35, 70, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0, 35, 70, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 12.0, 35, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); WorkModule::off_flag(boma, vars::robot::instance::AIRTIME_BAIR); } frame(lua_state, 24.0); - if is_excute(fighter) { - let charge_attack_damage_mul = 1.0 + (VarModule::get_float(fighter.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); - ATTACK(fighter, 0, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + let charge_attack_damage_mul = 1.0 + (VarModule::get_float(agent.battle_object, vars::robot::status::CHARGE_ATTACK_LEVEL) * 0.07); + ATTACK(agent, 0, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 6.0, 0.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), 8.0 * charge_attack_damage_mul, 361, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 2.0, 0, 0, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_magicball_aura"), Hash40::new("hip"), -5.0, 0, 0, 0, 0, 0, 4.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); EffectModule::set_scale_last(boma, &Vector3f::new(0.9, 0.55, 1.0)); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee"), 0, 0, 0, 90, -90, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 2.5); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 2.5); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } else { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.35); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_ab_jet"), Hash40::new("knee1"), 1.5, 0, 0, 0, 0, -90, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 1.0); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 1.0)); } } - } -unsafe extern "C" fn robot_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { - PLAY_SE(fighter, Hash40::new("vc_robot_attack05")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + PLAY_SE(agent, Hash40::new("vc_robot_attack05")); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_MAX) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_MAX) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); wait(lua_state, 3.0); - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - } else if VarModule::is_flag(fighter.battle_object, vars::robot::status::IS_CHARGE_STARTED) { + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + } else if VarModule::is_flag(agent.battle_object, vars::robot::status::IS_CHARGE_STARTED) { wait(lua_state, 3.0); - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_robot_attackair_b01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_robot_attackair_b01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_robot_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_robot_attackair_b01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_robot_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_robot_attackair_b01")); } } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_jet")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_jet")); } } -unsafe extern "C" fn robot_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame_normal = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_lw"), 0); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame_normal = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_boost = landing_frame_normal + 3.0; - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, landing_frame_boost/landing_frame_normal); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, landing_frame_boost/landing_frame_normal); } } } -unsafe extern "C" fn robot_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 85, 80, 0, 35, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 7.5, 0.0, 15.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 367, 80, 0, 45, 9.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 8.0, 0.0, 16.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 10.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 8.0, 0.0, 16.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 70, 105, 0, 65, 10.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn robot_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 2.0, -4.0, Some(0.0), Some(2.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 80, 100, 40, 0, 2.0, 0.0, -3.0, -4.0, Some(0.0), Some(-3.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 365, 100, 40, 0, 3.0, 0.0, 2.0, -4.0, Some(0.0), Some(2.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 80, 100, 40, 0, 2.0, 0.0, -3.0, -4.0, Some(0.0), Some(-3.0), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 85, 0, 45, 6.0, 0.0, 2.5, 0.0, Some(0.0), Some(2.5), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 85, 0, 45, 6.0, 0.0, 2.5, 0.0, Some(0.0), Some(2.5), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn robot_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut effectX = 48.0; frame(lua_state, 6.0); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); @@ -502,90 +496,91 @@ unsafe extern "C" fn robot_attack_air_lw_effect(fighter: &mut L2CAgentBase) { _ => Vector3f::new(0.196, 0.196, 0.216) }; for _ in 0..6 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 3, 10, 1.5, effectX, 30, 0, 1.2, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 3, 10, 1.5, effectX, 30, 0, 1.2, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 3.0); effectX += 8.0; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } wait(lua_state, 3.0); } - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3.0, 2.0, 8.0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3.0, 2.0, 8.0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn robot_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_robot_attack07")); - PLAY_SE(fighter, Hash40::new("se_common_swing_07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_robot_attack07")); + PLAY_SE(agent, Hash40::new("se_common_swing_07")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_swing_m")); } } -unsafe extern "C" fn robot_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attackairn", robot_attack_air_n_game) - .acmd("effect_attackairn", robot_attack_air_n_effect) - .acmd("game_attackairf", robot_attack_air_f_game) - .acmd("effect_attackairf", robot_attack_air_f_effect) - .acmd("game_attackairb", robot_attack_air_b_game) - .acmd("effect_attackairb", robot_attack_air_b_effect) - .acmd("sound_attackairb", robot_attack_air_b_sound) - .acmd("game_landingairb", robot_landing_air_b_game) - .acmd("game_attackairhi", robot_attack_air_hi_game) - .acmd("game_attackairlw", robot_attack_air_lw_game) - .acmd("effect_attackairlw", robot_attack_air_lw_effect) - .acmd("sound_attackairlw", robot_attack_air_lw_sound) - .acmd("expression_attackairlw", robot_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/robot/src/acmd/ground.rs b/fighters/robot/src/acmd/ground.rs index 0208a5e670..3a4eef627f 100644 --- a/fighters/robot/src/acmd/ground.rs +++ b/fighters/robot/src/acmd/ground.rs @@ -1,78 +1,76 @@ - use super::*; -unsafe extern "C" fn robot_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 9.0, 10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 180, 15, 0, 23, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.5, 0.0, 9.0, 10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 180, 15, 0, 23, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 18, 2.8, 0.0, 8.4, 14.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn robot_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 9.5, 6.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 8.6, 10.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.6, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(15.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 9.5, 6.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.4, 0.0, 8.6, 10.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 120, 0, 40, 3.6, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(15.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 6.0, 0.0, 6.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 4.0, 0.0, 7.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 6.0, 0.0, 6.0, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 5.0, 0.0, 5.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 70, 0, 70, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(9.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 70, 0, 70, 5.0, 0.0, 5.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(8.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 5.0, 0.0, 6.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 3.5, 0.0, 6.0, 11.0, Some(0.0), Some(8.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 35, 5.0, 0.0, 6.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attack11", robot_attack_11_game) - .acmd("game_attack12", robot_attack_12_game) - .acmd("game_attackdash", robot_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/robot/src/acmd/mod.rs b/fighters/robot/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/robot/src/acmd/mod.rs +++ b/fighters/robot/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/robot/src/acmd/other.rs b/fighters/robot/src/acmd/other.rs index 6e5a05caf9..07d532cb27 100644 --- a/fighters/robot/src/acmd/other.rs +++ b/fighters/robot/src/acmd/other.rs @@ -1,238 +1,147 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn robot_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.300); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.300); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_robot_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_robot_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_landing01")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn robot_beam_fly_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_robobeam_l"), Hash40::new("top"), 0, 0, 2.5, 0, 0, 0, 0.65, true); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("robot_beam") - .acmd("effect_flymax", robot_beam_fly_max_effect) - .install(); - smashline::Agent::new("robot") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_catch", robot_catch_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_catch", game_catch); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/robot/src/acmd/smashes.rs b/fighters/robot/src/acmd/smashes.rs index a5e5ab3cb1..333bc5ecbf 100644 --- a/fighters/robot/src/acmd/smashes.rs +++ b/fighters/robot/src/acmd/smashes.rs @@ -1,137 +1,131 @@ - use super::*; -unsafe extern "C" fn robot_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 12.7, 13.3, Some(0.0), Some(10.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 15.9, 23.200001, Some(0.0), Some(10.6), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 18.799999, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 10.3, 14.0, Some(0.0), Some(10.3), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 10.3, 24.0, Some(0.0), Some(10.3), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 10.3, 34.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 10.3, 14.0, Some(0.0), Some(10.3), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 10.3, 24.0, Some(0.0), Some(10.3), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 10.3, 34.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 12.7, 13.3, Some(0.0), Some(10.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 15.9, 23.200001, Some(0.0), Some(10.6), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 18.799999, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 7.9, 13.3, Some(0.0), Some(9.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 4.7, 23.200001, Some(0.0), Some(10.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 1.8, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 5.3, 0.0, 7.9, 13.3, Some(0.0), Some(9.8), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 4.0, 0.0, 4.7, 23.200001, Some(0.0), Some(10.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 41, 101, 0, 32, 2.8, 0.0, 1.8, 33.0, Some(0.0), Some(10.3), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 100, 100, 135, 0, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 100, 100, 135, 0, 4.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 106, 0, 40, 8.7, 0.0, 25.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 85, 106, 0, 40, 6.2, 0.0, 34.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 106, 0, 40, 8.7, 0.0, 25.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 85, 106, 0, 40, 6.2, 0.0, 34.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - } - + } } -unsafe extern "C" fn robot_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 170, 20, 0, 20, 4.5, 0.0, 5.5, -3.0, Some(0.0), Some(5.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 20, 0, 20, 4.5, 0.0, 5.5, -13.0, Some(0.0), Some(5.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("body"), 5.0, 33, 180, 0, 37, 5.5, -1.5, 0.0, 13.0, Some(-1.5), Some(0.0), Some(-13.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("body"), 5.0, 33, 180, 0, 37, 5.5, -1.5, 0.0, 13.0, Some(-1.5), Some(0.0), Some(-13.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attacks4hi", robot_attack_s4_hi_game) - .acmd("game_attacks4", robot_attack_s4_s_game) - .acmd("game_attacks4lw", robot_attack_s4_lw_game) - .acmd("game_attackhi4", robot_attack_hi4_game) - .acmd("game_attacklw4", robot_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/robot/src/acmd/specials.rs b/fighters/robot/src/acmd/specials.rs index 1dd1dcdfb2..f5a247c49b 100644 --- a/fighters/robot/src/acmd/specials.rs +++ b/fighters/robot/src/acmd/specials.rs @@ -1,69 +1,39 @@ use super::*; -unsafe extern "C" fn robot_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); - ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(37.0-10.0)); - } -} - -unsafe extern "C" fn robot_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); - ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(37.0-10.0)); - } -} - -unsafe extern "C" fn robot_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 9.0, 361, 95, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 361, 95, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 9.0, 361, 95, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 361, 95, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -76,26 +46,26 @@ unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 3, 0, -15, 0, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 3, 0, -15, 0, 1.5, true, *EF_FLIP_YZ); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -108,45 +78,92 @@ unsafe extern "C" fn robot_special_s_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + } +} + +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s01")); + } + + frame(lua_state, 22.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s04")); + } +} + +unsafe extern "C" fn sound_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_robot_special_s01")); } +} + +unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_spinattacks"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 4); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 21.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } } -unsafe extern "C" fn robot_special_s_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialshi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 7.0, 105, 85, 0, 55, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 105, 85, 0, 55, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 7.0, 105, 85, 0, 55, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 105, 85, 0, 55, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialshi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -159,27 +176,27 @@ unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, 45, 0, -225, 1.5, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, 45, 0, -225, 1.5, true, *EF_FLIP_NONE); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, -45, 0, 45, 1.5, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 15.5, 4, -45, 0, 45, 1.5, true, *EF_FLIP_NONE); } let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { @@ -193,46 +210,45 @@ unsafe extern "C" fn robot_special_s_hi_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 1.5, 1.5); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 1.5, 1.5); } - } -unsafe extern "C" fn robot_special_s_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialslw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -3.0, Some(0.0), Some(10.5), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 40, 0, 2.5, 0.0, 10.5, -13.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(fighter.module_accessor)); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr1"), 5.0, 25, 35, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 25, 35, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr1"), 5.0, 25, 35, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 25, 35, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialslw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin_wind"), Hash40::new("body"), 1, 0, 0, 0, -100, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("robot_armspin"), Hash40::new("body"), 1, 0, 0, 0, 60, 90, 1, true); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -245,20 +261,20 @@ unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 2.0); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("robot_armspin_wind"), 5); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("robot_armspin_wind"), 5); EffectModule::kill_kind(boma, Hash40::new("robot_armspin"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10.5, 5, 30, -15, -20, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10.5, 5, 30, -15, -20, 1.5, true, *EF_FLIP_YZ); let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_vec = match color { 0 => if WorkModule::is_flag(boma, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLAG_REGION_JP) { Vector3f::new(0.1, 0.01, 0.0) } else { Vector3f::new(0.196, 0.196, 0.216) }, @@ -271,293 +287,221 @@ unsafe extern "C" fn robot_special_s_lw_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(0.118, 0.039, 0.051), _ => Vector3f::new(0.196, 0.196, 0.216) }; - LAST_EFFECT_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 23.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } - } -unsafe extern "C" fn robot_special_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - ItemModule::set_have_item_visibility(boma, false, 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_spinattacks"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 4); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); +} + +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } - frame(lua_state, 21.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); +} + +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_s_damage")); } } -unsafe extern "C" fn robot_special_hi_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn robot_special_hi_rise_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); +unsafe extern "C" fn game_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, vars::robot::status::HELD_BUTTON); let mut workingDamage = robotFrames/3.5; - if robotFrames <= 10.0 { - MeterModule::drain_direct(fighter.object(), 20.0); + MeterModule::drain_direct(agent.object(), 20.0); } else { - MeterModule::drain_direct(fighter.object(), (robotFrames * 2.0)); + MeterModule::drain_direct(agent.object(), (robotFrames * 2.0)); } - if (workingDamage < 4.0) { workingDamage = 0.0; } - if workingDamage != 0.0 { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("knee"), workingDamage, 280, 80, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 4, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 5, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, -4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 4, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 7.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 5, 0, Hash40::new("knee"), workingDamage, 280, 50, 0, 15, 5.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } - frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB) { - FT_MOTION_RATE(fighter, 9.0/(22.0-4.0)); + if VarModule::is_flag(agent.battle_object, vars::robot::instance::GROUNDED_UPB) { + FT_MOTION_RATE(agent, 9.0/(22.0-4.0)); } } - /*frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB) { - VarModule::on_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::robot::instance::GROUNDED_UPB) { + VarModule::on_flag(agent.battle_object, vars::robot::instance::UPB_CANCEL); } }*/ - frame(lua_state, 22.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::robot::instance::UPB_CANCEL); } - } -unsafe extern "C" fn robot_special_hi_rise_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.55, 2.25); +unsafe extern "C" fn effect_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.55, 2.25); } if (robotFrames/3.5) > 4.0 { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 8.55); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 8.55); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); - EFFECT_FOLLOW(fighter, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 3.15, 0.55, 0.55); + EFFECT_FOLLOW(agent, Hash40::new("robot_atk_lw_jet"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 3.15, 0.55, 0.55); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("robot_nozzle_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("robot_nozzle_flare"), false, false); } } else { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("knee"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.55, 0.1, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("knee1"), 0, 0, 0, -90, -90, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.55, 0.1, 0.1); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.75, 1.0)); } } } -unsafe extern "C" fn robot_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - } -} - -unsafe extern "C" fn robot_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("robot_nozzle_flare"), Hash40::new("knee1"), 1.5, 0, 0, 90, -90, 0, 1, true); - } -} - -unsafe extern "C" fn robot_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_s_damage")); - } -} - -unsafe extern "C" fn robot_special_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_s_damage")); - } -} - -unsafe extern "C" fn robot_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn robot_special_air_s_start_sound(fighter: &mut L2CAgentBase) { -} - - -unsafe extern "C" fn robot_special_air_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s01")); - } -} - -unsafe extern "C" fn robot_special_air_s_end_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_s_start_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s01")); - } - - frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } -} - -unsafe extern "C" fn robot_special_s_end_sound(fighter: &mut L2CAgentBase) { -} - -unsafe extern "C" fn robot_special_hi_rise_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); +unsafe extern "C" fn expression_specialhirise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let robotFrames = VarModule::get_float(agent.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if (robotFrames/4.0) >= 12.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); } else if (robotFrames/4.0) >= 8.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else if (robotFrames/4.0) >= 4.0 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } - - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_speciallw", robot_special_lw_game) - .acmd("game_specialairlw", robot_special_air_lw_game) - .acmd("game_specials", robot_special_s_game) - .acmd("game_specialairs", robot_special_s_game) - .acmd("effect_specials", robot_special_s_effect) - .acmd("effect_specialairs", robot_special_s_effect) - .acmd("game_specialshi", robot_special_s_hi_game) - .acmd("game_specialairshi", robot_special_s_hi_game) - .acmd("effect_specialshi", robot_special_s_hi_effect) - .acmd("effect_specialairshi", robot_special_s_hi_effect) - .acmd("game_specialslw", robot_special_s_lw_game) - .acmd("game_specialairslw", robot_special_s_lw_game) - .acmd("effect_specialslw", robot_special_s_lw_effect) - .acmd("effect_specialairslw", robot_special_s_lw_effect) - .acmd("expression_specials", robot_special_s_expression) - .acmd("expression_specialairs", robot_special_s_expression) - .acmd("expression_specialshi", robot_special_s_expression) - .acmd("expression_specialairshi", robot_special_s_expression) - .acmd("expression_specialslw", robot_special_s_expression) - .acmd("expression_specialairslw", robot_special_s_expression) - .acmd("game_specialhi", robot_special_hi_game) - .acmd("game_specialairhi", robot_special_hi_game) - .acmd("game_specialhirise", robot_special_hi_rise_game) - .acmd("effect_specialhirise", robot_special_hi_rise_effect) - .acmd("effect_specialhi", robot_special_hi_effect) - .acmd("effect_specialairhi", robot_special_air_hi_effect) - .acmd("sound_specialhi", robot_special_hi_sound) - .acmd("sound_specialairhi", robot_special_air_hi_sound) - .acmd("expression_specialhi", robot_special_hi_expression) - .acmd("expression_specialairhi", robot_special_hi_expression) - .acmd("sound_specialairsstart", robot_special_air_s_start_sound) - .acmd("sound_specialairs", robot_special_air_s_sound) - .acmd("sound_specialairsend", robot_special_air_s_end_sound) - .acmd("sound_specialsstart", robot_special_s_start_sound) - .acmd("sound_specials", robot_special_s_sound) - .acmd("sound_specialsend", robot_special_s_end_sound) - .acmd("expression_specialhirise", robot_special_hi_rise_expression) - .install(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROBOT_STATUS_GYRO_FLAG_SHOOT); + ArticleModule::set_visibility_whole(boma, *FIGHTER_ROBOT_GENERATE_ARTICLE_GYRO, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 21.0/(37.0-10.0)); + } +} + +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specialairs); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); + + agent.acmd("game_specialshi", game_specialshi); + agent.acmd("game_specialairshi", game_specialshi); + agent.acmd("effect_specialshi", effect_specialshi); + agent.acmd("effect_specialairshi", effect_specialshi); + agent.acmd("expression_specialshi", expression_specials); + agent.acmd("expression_specialairshi", expression_specials); + + agent.acmd("game_specialslw", game_specialslw); + agent.acmd("game_specialairslw", game_specialslw); + agent.acmd("effect_specialslw", effect_specialslw); + agent.acmd("effect_specialairslw", effect_specialslw); + agent.acmd("expression_specialslw", expression_specials); + agent.acmd("expression_specialairslw", expression_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("sound_specialairhi", sound_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("expression_specialairhi", expression_specialhi); + + agent.acmd("game_specialhirise", game_specialhirise); + agent.acmd("effect_specialhirise", effect_specialhirise); + agent.acmd("expression_specialhirise", expression_specialhirise); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + + agent.acmd("sound_specialsstart", null); + agent.acmd("sound_specialairsstart", null); + agent.acmd("sound_specialsend", null); + agent.acmd("sound_specialairsend", null); } diff --git a/fighters/robot/src/acmd/throws.rs b/fighters/robot/src/acmd/throws.rs index 4456b1c849..a45b7878cd 100644 --- a/fighters/robot/src/acmd/throws.rs +++ b/fighters/robot/src/acmd/throws.rs @@ -1,40 +1,38 @@ use super::*; -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 63, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 63, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 50.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 114, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 3); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 90, 114, 0, 56, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 58.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/robot/src/acmd/tilts.rs b/fighters/robot/src/acmd/tilts.rs index 1c836a22a0..20f544132a 100644 --- a/fighters/robot/src/acmd/tilts.rs +++ b/fighters/robot/src/acmd/tilts.rs @@ -1,112 +1,106 @@ - use super::*; -unsafe extern "C" fn robot_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml1"), 8.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl1"), 10.0, 361, 77, 0, 54, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("fingerl1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("fingerr1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("fingerl1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("fingerr1"), 8.0, 90, 80, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 13.0, 6.0, Some(0.0), Some(13.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 90, 80, 0, 55, 2.5, 0.0, 13.0, 6.0, Some(0.0), Some(13.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 90, 80, 0, 55, 4.5, 27.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 4.0, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 90, 80, 0, 55, 4.5, 27.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 4.0, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 90, 80, 0, 55, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn robot_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 35, 80, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 361, 20, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 65, 55, 0, 65, 4.0, 0.0, 5.0, 10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 35, 80, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 361, 20, 0, 15, 4.5, 0.0, 4.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("robot") - .acmd("game_attacks3hi", robot_attack_s3_hi_game) - .acmd("game_attacks3", robot_attack_s3_s_game) - .acmd("game_attacks3lw", robot_attack_s3_lw_game) - .acmd("game_attackhi3", robot_attack_hi3_game) - .acmd("game_attacklw3", robot_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/robot/src/beam/acmd/mod.rs b/fighters/robot/src/beam/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/robot/src/beam/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/robot/src/beam/acmd/specials.rs b/fighters/robot/src/beam/acmd/specials.rs new file mode 100644 index 0000000000..2e340484b0 --- /dev/null +++ b/fighters/robot/src/beam/acmd/specials.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn effect_flymax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("robot_robobeam_l"), Hash40::new("top"), 0, 0, 2.5, 0, 0, 0, 0.65, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_flymax", effect_flymax); +} diff --git a/fighters/robot/src/beam/mod.rs b/fighters/robot/src/beam/mod.rs new file mode 100644 index 0000000000..094609e935 --- /dev/null +++ b/fighters/robot/src/beam/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("robot_beam"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/robot/src/lib.rs b/fighters/robot/src/lib.rs index 8e2ddcc726..cbcf485cb0 100644 --- a/fighters/robot/src/lib.rs +++ b/fighters/robot/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod beam; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("robot"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + beam::install(); } diff --git a/fighters/robot/src/opff.rs b/fighters/robot/src/opff.rs index aea6e97b20..023eaffa72 100644 --- a/fighters/robot/src/opff.rs +++ b/fighters/robot/src/opff.rs @@ -229,9 +229,8 @@ pub unsafe fn robot_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("robot") - .on_line(Main, robot_frame_wrapper) - .on_line(Main, robot_meter) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, robot_frame_wrapper); + agent.on_line(Main, robot_meter); } diff --git a/fighters/robot/src/status.rs b/fighters/robot/src/status.rs index 5b653e301a..7e48213d5d 100644 --- a/fighters/robot/src/status.rs +++ b/fighters/robot/src/status.rs @@ -1,642 +1,10 @@ use super::*; use globals::*; -unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { +mod special_s; +mod special_hi; - let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FALL]; - - let prev_status_kind = StatusModule::prev_status_kind(fighter.module_accessor, 0); - let prev_status_kind_2 = StatusModule::prev_status_kind(fighter.module_accessor, 1); - - VarModule::set_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB, 0.0); - VarModule::set_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE, 0.0); - - if damage_statuses.contains(&prev_status_kind) || damage_statuses.contains(&prev_status_kind_2) { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - - //KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - let air_speed_y_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_y_stable"), 0); - sv_kinetic_energy!( - set_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - sv_kinetic_energy!( - set_stable_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - air_speed_y_stable * 0.2 - ); - - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_MOTION, - 0.0 - ); - sv_kinetic_energy!( - set_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_MOTION, - 0.0 - ); - - } else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - - VarModule::on_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB); - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); - PostureModule::add_pos(fighter.module_accessor, &Vector3f{x: 0.00, y: 3.0, z: 0.0}); - - //KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - let air_speed_y_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_y_stable"), 0); - sv_kinetic_energy!( - set_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_MOTION, - 0.0 - ); - sv_kinetic_energy!( - set_stable_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - air_speed_y_stable * 0.2 - ); - } - } else { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let air_brake = sv_fighter_util::get_default_fighter_param_air_brake_x(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - air_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - - } else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - VarModule::on_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB); - - fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); - PostureModule::add_pos(fighter.module_accessor, &Vector3f{x: 0.00, y: 3.0, z: 0.0}); - - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let air_brake = sv_fighter_util::get_default_fighter_param_air_brake_x(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - air_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - } - - fighter.main_shift(special_hi_main_loop) -} - -unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); - let current_fuel = WorkModule::get_float(fighter.module_accessor, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - let lr = PostureModule::lr(fighter.module_accessor); - let stickX = ControlModule::get_stick_x(fighter.module_accessor); - let mut rotX = PostureModule::rot_x(fighter.module_accessor, 0); - let mut rotation = Vector3f{x: 0.0, y: 0.0, z: 0.0}; - - VarModule::add_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB, 1.0); - - //caps angle of rotation - if (rotX > 86.0) { - rotX = 86.0; - } else if (rotX < 0.0) { - rotX = 0.0; - } - - //changes direction if rotation crosses threshhold - if (rotX == 0.0) { - if (lr == 1.0) && - (stickX < -0.1) { - PostureModule::set_lr(fighter.module_accessor, (lr*-1.0)); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } else if (lr == -1.0) && - (stickX > 0.1) { - PostureModule::set_lr(fighter.module_accessor, (lr*-1.0)); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - } - - //rotates model based off stick direction - - /*if fighter.is_situation(*SITUATION_KIND_GROUND) { - if lr == 1.0 { - if stickX > 0.1 { - VarModule::add_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); - let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); - rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; - ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); - } else if stickX < -0.1 { - VarModule::sub_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); - let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); - rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; - ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); - } - } else { - if stickX > 0.1 { - VarModule::sub_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); - let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); - rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; - ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); - } else if stickX < -0.1 { - VarModule::add_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); - let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); - rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; - ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); - } - } - } else { */ - if lr == 1.0 { - if stickX > 0.1 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX+1.5, 0.0, 0.0), - 0 - ); - } else if stickX < -0.1 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX-1.5, 0.0, 0.0), - 0 - ); - } - } else { - if stickX > 0.1 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX-1.5, 0.0, 0.0), - 0 - ); - } else if stickX < -0.1 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX+1.5, 0.0, 0.0), - 0 - ); - } - } - /*} - - if rotX == 0.0 { - rotX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); - }*/ - - //determines strength of upb release - if (current_fuel <= (robotFrames * 2.0)) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: (0.05*rotX.abs()), y: ((0.05*robotFrames)-(0.025*rotX.abs())), z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - - PLAY_SE(fighter, Hash40::new("se_common_bomb_m")); - - fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); - - } else if (current_fuel <= 0.0) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); - } - - if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - if (current_fuel <= (robotFrames * 2.0)) { - let vec = Vector3f{x: (0.05*rotX.abs()), y: ((0.05*robotFrames)-(0.025*rotX.abs())), z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - - PLAY_SE(fighter, Hash40::new("se_common_bomb_s")); - - fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); - - } else if robotFrames < 10.0 { - let vec = Vector3f{x: (0.05*rotX.abs()), y: 0.5-(0.025*rotX.abs()), z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - if (current_fuel - 20.0) > 0.0 { - WorkModule::set_float(fighter.module_accessor, (current_fuel) - (20.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } else { - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } - - PLAY_SE(fighter, Hash40::new("se_common_bomb_m")); - - } else { - let vec = Vector3f{x: (0.05*rotX.abs()), y: (1.5 + (0.05*robotFrames))-(0.025*rotX.abs()), z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - if ((current_fuel) - (robotFrames * 2.0) > 0.0) { - WorkModule::set_float(fighter.module_accessor, (current_fuel) - (robotFrames * 2.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } else { - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } - - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - } - - fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); - - } else if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) - && MotionModule::is_end(fighter.module_accessor) { - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: (0.05*rotX.abs()), y: 3.75-(0.025*rotX.abs()), z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - - if ((current_fuel) - (100.0) > 0.0) { - WorkModule::set_float(fighter.module_accessor, (current_fuel) - (100.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } else { - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); - } - - PLAY_SE(fighter, Hash40::new("se_common_bomb_ll")); - - fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); - - } else { - - } - - 0.into() -} - -unsafe extern "C" fn special_hi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROBOT_STATUS_BURNER_FLAG_TRANSFORM_COMP); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - 0.into() -} - -unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_keep_main(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_rise"), 0.0, 1.0, false, 0.0, false, false); - - fighter.main_shift(special_hi_keep_main_loop) -} - -unsafe extern "C" fn special_hi_keep_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::add_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE, 1.0); - let robotKeepFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE); - - /*if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - }*/ - - //return to upright - let rotX = PostureModule::rot_x(fighter.module_accessor, 0); - let lr = PostureModule::lr(fighter.module_accessor); - let diff = (rotX/8.0); - - if (robotKeepFrames > 12.0) { - if lr == 1.0 { - if rotX > 0.0 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX-diff, 0.0, 0.0), - 0 - ); - } else if rotX < 0.0 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX+diff, 0.0, 0.0), - 0 - ); - } - } else { - if rotX > 0.0 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX-diff, 0.0, 0.0), - 0 - ); - } else if rotX < 0.0 { - PostureModule::set_rot( - fighter.module_accessor, - &Vector3f::new(rotX+diff, 0.0, 0.0), - 0 - ); - } - } - } - - /*Cancels status transition if button is being held - if robotKeepFrames == 17.0 { - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) || - ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { - WorkModule::off_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON); - } - } - - if (robotKeepFrames > 18.0) && - WorkModule::is_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON) { - if fighter.is_button_on(Buttons::Attack) || fighter.is_button_on(Buttons::Special) || fighter.is_button_on(Buttons::Guard) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), true.into()); - } - } */ - - if VarModule::is_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - VarModule::off_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); - } - - if fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); - } - - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - - 0.into() -} - -unsafe extern "C" fn special_hi_keep_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_keep_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_hi_keep_end(fighter: &mut L2CFighterCommon) -> L2CValue { - - PostureModule::set_rot(fighter.module_accessor, &Vector3f::zero(), 0); - //KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - 0.into() -} - -unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s"), 0.0, 1.0, false, 0.0, false, false); - //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR); - } else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); - } - - fighter.main_shift(special_s_main_loop) -} - -unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - let boma = fighter.module_accessor; - - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - } - - //momentum hop code - /*if frame == 3.0 { - if current_situation_kind == *SITUATION_KIND_AIR && - WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { - - let velocity = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::clear_speed_all(fighter.module_accessor); - - if velocity >= 0.0 { - let vec = Vector3f{x: 0.05, y: 0.25, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } else { - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - ground_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: 0.35, y: 1.55, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } - } else if current_situation_kind == *SITUATION_KIND_GROUND { - KineticModule::clear_speed_all(fighter.module_accessor); - KineticModule::suspend_energy_all(fighter.module_accessor); - KineticModule::unable_energy_all(fighter.module_accessor); - let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - ground_brake, - 0.0 - ); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::resume_energy_all(fighter.module_accessor); - - let vec = Vector3f{x: 0.45, y: 0.0, z: 0.0}; - KineticModule::add_speed(fighter.module_accessor, &vec); - } - }*/ - - if frame >= 12.0 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - /*} else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP);*/ - } - } - - if frame > 15.0 - && frame <= 18.0 { - let stick_y = ControlModule::get_stick_y(fighter.module_accessor); - if stick_y > 0.3 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_hi"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_hi"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); - } - } else if stick_y < -0.3 { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_lw"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_lw"), -1.0, 1.0, 0.0, false, false); - PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); - } - } else { - PLAY_SE(fighter, Hash40::new("se_robot_special_s02")); - } - } - - if frame == 18.0 && - current_situation_kind == *SITUATION_KIND_AIR && - WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, FIGHTER_KINETIC_ENERGY_ID_MOTION); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } - - if frame == 19.0 { - WorkModule::off_flag(fighter.module_accessor, vars::robot::instance::AIRTIME_SIDEB); - } - - if StatusModule::is_situation_changed(fighter.module_accessor) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), -1.0, 1.0, 0.0, false, false); - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s"), -1.0, 1.0, 0.0, false, false); - } - } - - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); - } - - 0.into() - -} - -unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exec_stop(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn special_s_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -pub fn install() { - smashline::Agent::new("robot") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_init) - .status( - Main, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_main, - ) - .status( - Init, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_init, - ) - .status( - Exec, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_exec, - ) - .status( - End, - *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, - special_hi_keep_end, - ) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .status( - ExecStop, - *FIGHTER_STATUS_KIND_SPECIAL_S, - special_s_exec_stop, - ) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end) - .status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exit) - .status( - Main, - *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, - special_s_attack_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); } diff --git a/fighters/robot/src/status/special_hi.rs b/fighters/robot/src/status/special_hi.rs new file mode 100644 index 0000000000..e0efa5d850 --- /dev/null +++ b/fighters/robot/src/status/special_hi.rs @@ -0,0 +1,430 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { + + let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FALL]; + + let prev_status_kind = StatusModule::prev_status_kind(fighter.module_accessor, 0); + let prev_status_kind_2 = StatusModule::prev_status_kind(fighter.module_accessor, 1); + + VarModule::set_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB, 0.0); + VarModule::set_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE, 0.0); + + if damage_statuses.contains(&prev_status_kind) || damage_statuses.contains(&prev_status_kind_2) { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + + //KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + let air_speed_y_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_y_stable"), 0); + sv_kinetic_energy!( + set_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + 0.0 + ); + sv_kinetic_energy!( + set_stable_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + air_speed_y_stable * 0.2 + ); + + sv_kinetic_energy!( + set_accel, + fighter, + FIGHTER_KINETIC_ENERGY_ID_MOTION, + 0.0 + ); + sv_kinetic_energy!( + set_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_MOTION, + 0.0 + ); + + } else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + + VarModule::on_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB); + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); + PostureModule::add_pos(fighter.module_accessor, &Vector3f{x: 0.00, y: 3.0, z: 0.0}); + + //KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + let air_speed_y_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_y_stable"), 0); + sv_kinetic_energy!( + set_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + 0.0 + ); + sv_kinetic_energy!( + set_accel, + fighter, + FIGHTER_KINETIC_ENERGY_ID_MOTION, + 0.0 + ); + sv_kinetic_energy!( + set_stable_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + air_speed_y_stable * 0.2 + ); + } + } else { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let air_brake = sv_fighter_util::get_default_fighter_param_air_brake_x(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + air_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + + } else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + VarModule::on_flag(fighter.battle_object, vars::robot::instance::GROUNDED_UPB); + + fighter.set_situation(L2CValue::I32(*SITUATION_KIND_AIR)); + PostureModule::add_pos(fighter.module_accessor, &Vector3f{x: 0.00, y: 3.0, z: 0.0}); + + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let air_brake = sv_fighter_util::get_default_fighter_param_air_brake_x(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + air_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } + } + + fighter.main_shift(special_hi_main_loop) +} + +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + let robotFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB); + let current_fuel = WorkModule::get_float(fighter.module_accessor, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + let lr = PostureModule::lr(fighter.module_accessor); + let stickX = ControlModule::get_stick_x(fighter.module_accessor); + let mut rotX = PostureModule::rot_x(fighter.module_accessor, 0); + let mut rotation = Vector3f{x: 0.0, y: 0.0, z: 0.0}; + + VarModule::add_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB, 1.0); + + //caps angle of rotation + if (rotX > 86.0) { + rotX = 86.0; + } else if (rotX < 0.0) { + rotX = 0.0; + } + + //changes direction if rotation crosses threshhold + if (rotX == 0.0) { + if (lr == 1.0) && + (stickX < -0.1) { + PostureModule::set_lr(fighter.module_accessor, (lr*-1.0)); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } else if (lr == -1.0) && + (stickX > 0.1) { + PostureModule::set_lr(fighter.module_accessor, (lr*-1.0)); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } + } + + //rotates model based off stick direction + + /*if fighter.is_situation(*SITUATION_KIND_GROUND) { + if lr == 1.0 { + if stickX > 0.1 { + VarModule::add_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); + let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); + rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; + ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); + } else if stickX < -0.1 { + VarModule::sub_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); + let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); + rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; + ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); + } + } else { + if stickX > 0.1 { + VarModule::sub_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); + let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); + rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; + ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); + } else if stickX < -0.1 { + VarModule::add_float(fighter.battle_object, vars::robot::instance::JOINT_ROT, 1.5); + let jointX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); + rotation = Vector3f{x: 0.0, y: 0.0, z: jointX}; + ModelModule::set_joint_rotate(fighter.module_accessor, Hash40::new("waist1"), &rotation, MotionNodeRotateCompose{_address: *MOTION_NODE_ROTATE_COMPOSE_AFTER as u8}, MotionNodeRotateOrder{_address: *MOTION_NODE_ROTATE_ORDER_XYZ as u8}); + } + } + } else { */ + if lr == 1.0 { + if stickX > 0.1 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX+1.5, 0.0, 0.0), + 0 + ); + } else if stickX < -0.1 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX-1.5, 0.0, 0.0), + 0 + ); + } + } else { + if stickX > 0.1 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX-1.5, 0.0, 0.0), + 0 + ); + } else if stickX < -0.1 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX+1.5, 0.0, 0.0), + 0 + ); + } + } + /*} + + if rotX == 0.0 { + rotX = VarModule::get_float(fighter.battle_object, vars::robot::instance::JOINT_ROT); + }*/ + + //determines strength of upb release + if (current_fuel <= (robotFrames * 2.0)) { + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: (0.05*rotX.abs()), y: ((0.05*robotFrames)-(0.025*rotX.abs())), z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + + PLAY_SE(fighter, Hash40::new("se_common_bomb_m")); + + fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); + + } else if (current_fuel <= 0.0) { + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); + } + + if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + if (current_fuel <= (robotFrames * 2.0)) { + let vec = Vector3f{x: (0.05*rotX.abs()), y: ((0.05*robotFrames)-(0.025*rotX.abs())), z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + + PLAY_SE(fighter, Hash40::new("se_common_bomb_s")); + + fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); + + } else if robotFrames < 10.0 { + let vec = Vector3f{x: (0.05*rotX.abs()), y: 0.5-(0.025*rotX.abs()), z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + if (current_fuel - 20.0) > 0.0 { + WorkModule::set_float(fighter.module_accessor, (current_fuel) - (20.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } else { + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } + + PLAY_SE(fighter, Hash40::new("se_common_bomb_m")); + + } else { + let vec = Vector3f{x: (0.05*rotX.abs()), y: (1.5 + (0.05*robotFrames))-(0.025*rotX.abs()), z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + if ((current_fuel) - (robotFrames * 2.0) > 0.0) { + WorkModule::set_float(fighter.module_accessor, (current_fuel) - (robotFrames * 2.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } else { + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } + + PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); + } + + fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); + + } else if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) + && MotionModule::is_end(fighter.module_accessor) { + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: (0.05*rotX.abs()), y: 3.75-(0.025*rotX.abs()), z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + + if ((current_fuel) - (100.0) > 0.0) { + WorkModule::set_float(fighter.module_accessor, (current_fuel) - (100.0), *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } else { + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_ROBOT_INSTANCE_WORK_ID_FLOAT_BURNER_ENERGY_VALUE); + } + + PLAY_SE(fighter, Hash40::new("se_common_bomb_ll")); + + fighter.change_status(FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP.into(), true.into()); + + } else { + + } + + 0.into() +} + +unsafe extern "C" fn special_hi_end(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROBOT_STATUS_BURNER_FLAG_TRANSFORM_COMP); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + 0.into() +} + +unsafe extern "C" fn special_hi_keep_main(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_rise"), 0.0, 1.0, false, 0.0, false, false); + + fighter.main_shift(special_hi_keep_main_loop) +} + +unsafe extern "C" fn special_hi_keep_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::add_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE, 1.0); + let robotKeepFrames = VarModule::get_float(fighter.battle_object, vars::robot::instance::FRAMES_SINCE_UPB_RISE); + + /*if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + }*/ + + //return to upright + let rotX = PostureModule::rot_x(fighter.module_accessor, 0); + let lr = PostureModule::lr(fighter.module_accessor); + let diff = (rotX/8.0); + + if (robotKeepFrames > 12.0) { + if lr == 1.0 { + if rotX > 0.0 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX-diff, 0.0, 0.0), + 0 + ); + } else if rotX < 0.0 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX+diff, 0.0, 0.0), + 0 + ); + } + } else { + if rotX > 0.0 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX-diff, 0.0, 0.0), + 0 + ); + } else if rotX < 0.0 { + PostureModule::set_rot( + fighter.module_accessor, + &Vector3f::new(rotX+diff, 0.0, 0.0), + 0 + ); + } + } + } + + /*Cancels status transition if button is being held + if robotKeepFrames == 17.0 { + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) || + ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { + WorkModule::off_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON); + } + } + + if (robotKeepFrames > 18.0) && + WorkModule::is_flag(fighter.module_accessor, vars::robot::status::HELD_BUTTON) { + if fighter.is_button_on(Buttons::Attack) || fighter.is_button_on(Buttons::Special) || fighter.is_button_on(Buttons::Guard) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), true.into()); + } + } */ + + if VarModule::is_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + VarModule::off_flag(fighter.battle_object, vars::robot::instance::UPB_CANCEL); + } + + if fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); + } + + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + + 0.into() +} + +unsafe extern "C" fn special_hi_keep_end(fighter: &mut L2CFighterCommon) -> L2CValue { + + PostureModule::set_rot(fighter.module_accessor, &Vector3f::zero(), 0); + //KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + 0.into() +} + +unsafe extern "C" fn null_status(fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_init); + agent.status(Main, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_main); + agent.status(End, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_end); + + agent.status(Init, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); + agent.status(Exec, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); +} \ No newline at end of file diff --git a/fighters/robot/src/status/special_s.rs b/fighters/robot/src/status/special_s.rs new file mode 100644 index 0000000000..e53f383395 --- /dev/null +++ b/fighters/robot/src/status/special_s.rs @@ -0,0 +1,164 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s"), 0.0, 1.0, false, 0.0, false, false); + //KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR); + } else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); + } + + fighter.main_shift(special_s_main_loop) +} + +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + let boma = fighter.module_accessor; + + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + } + + //momentum hop code + /*if frame == 3.0 { + if current_situation_kind == *SITUATION_KIND_AIR && + WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { + + let velocity = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::clear_speed_all(fighter.module_accessor); + + if velocity >= 0.0 { + let vec = Vector3f{x: 0.05, y: 0.25, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } else { + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + ground_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: 0.35, y: 1.55, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } + } else if current_situation_kind == *SITUATION_KIND_GROUND { + KineticModule::clear_speed_all(fighter.module_accessor); + KineticModule::suspend_energy_all(fighter.module_accessor); + KineticModule::unable_energy_all(fighter.module_accessor); + let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + ground_brake, + 0.0 + ); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::resume_energy_all(fighter.module_accessor); + + let vec = Vector3f{x: 0.45, y: 0.0, z: 0.0}; + KineticModule::add_speed(fighter.module_accessor, &vec); + } + }*/ + + if frame >= 12.0 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + /*} else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP);*/ + } + } + + if frame > 15.0 + && frame <= 18.0 { + let stick_y = ControlModule::get_stick_y(fighter.module_accessor); + if stick_y > 0.3 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_hi"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_hi"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s03")); + } + } else if stick_y < -0.3 { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s_lw"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s_lw"), -1.0, 1.0, 0.0, false, false); + PLAY_SE(fighter, Hash40::new("se_robot_special_s04")); + } + } else { + PLAY_SE(fighter, Hash40::new("se_robot_special_s02")); + } + } + + if frame == 18.0 && + current_situation_kind == *SITUATION_KIND_AIR && + WorkModule::is_flag(boma, vars::robot::instance::AIRTIME_SIDEB) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, FIGHTER_KINETIC_ENERGY_ID_MOTION); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + } + + if frame == 19.0 { + WorkModule::off_flag(fighter.module_accessor, vars::robot::instance::AIRTIME_SIDEB); + } + + if StatusModule::is_situation_changed(fighter.module_accessor) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), -1.0, 1.0, 0.0, false, false); + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s"), -1.0, 1.0, 0.0, false, false); + } + } + + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); + } + + 0.into() +} + +unsafe extern "C" fn null_status(fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); + agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); + agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); + agent.status(Main, *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, null_status); +} \ No newline at end of file From 6f7de162f5cb1bfc1bf24a1a466ff7a27b7ed8f0 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 12:46:58 -0500 Subject: [PATCH 036/172] null additional statuses --- fighters/robot/src/status/special_hi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/robot/src/status/special_hi.rs b/fighters/robot/src/status/special_hi.rs index e0efa5d850..630dbb1bdd 100644 --- a/fighters/robot/src/status/special_hi.rs +++ b/fighters/robot/src/status/special_hi.rs @@ -420,11 +420,11 @@ unsafe extern "C" fn null_status(fighter: &mut L2CFighterCommon) -> L2CValue { pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_init); agent.status(Main, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_main); agent.status(End, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, null_status); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, null_status); agent.status(Init, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); agent.status(Exec, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); } \ No newline at end of file From 8e627b4a1b0dac529372c8e12882d5aa7cfe6a89 Mon Sep 17 00:00:00 2001 From: ethangarsia517 Date: Thu, 21 Mar 2024 13:41:13 -0500 Subject: [PATCH 037/172] finished didnt test but im praying --- fighters/kirby/src/acmd/aerials.rs | 18 +- fighters/kirby/src/acmd/ground.rs | 14 +- fighters/kirby/src/acmd/mod.rs | 16 +- fighters/kirby/src/acmd/other.rs | 26 +- fighters/kirby/src/acmd/smashes.rs | 26 +- fighters/kirby/src/acmd/specials.rs | 64 +- fighters/kirby/src/acmd/throws.rs | 18 +- fighters/kirby/src/acmd/tilts.rs | 14 +- fighters/kirby/src/copyability/acmd.rs | 2277 +++++++++-------- fighters/kirby/src/copyability/mod.rs | 4 +- fighters/kirby/src/copyability/opff.rs | 883 ++++--- fighters/kirby/src/lib.rs | 8 +- fighters/kirby/src/status.rs | 30 +- .../src/status/diddy_special_n_cancel.rs | 52 +- fighters/kirby/src/status/edge_special_n.rs | 6 +- fighters/kirby/src/status/ganon_special_n.rs | 34 +- .../kirby/src/status/ganon_special_n_float.rs | 22 +- .../kirby/src/status/gaogaen_special_n.rs | 16 +- fighters/kirby/src/status/koopa_special_n.rs | 22 +- .../kirby/src/status/littlemac_special_n.rs | 10 +- fighters/kirby/src/status/lucas_special_n.rs | 16 +- fighters/kirby/src/status/luigi_special_n.rs | 10 +- fighters/kirby/src/status/mario_special_n.rs | 10 +- fighters/kirby/src/status/mariod_special_n.rs | 10 +- fighters/kirby/src/status/ridley_special_n.rs | 18 +- .../{sonic_special_nrs => sonic_special_n.rs} | 16 +- fighters/kirby/src/status/special_hi_h.rs | 10 +- 27 files changed, 1877 insertions(+), 1773 deletions(-) rename fighters/kirby/src/status/{sonic_special_nrs => sonic_special_n.rs} (93%) diff --git a/fighters/kirby/src/acmd/aerials.rs b/fighters/kirby/src/acmd/aerials.rs index 658b8af416..372d8e3108 100644 --- a/fighters/kirby/src/acmd/aerials.rs +++ b/fighters/kirby/src/acmd/aerials.rs @@ -191,14 +191,12 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_landingairlw", game_landingairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/kirby/src/acmd/ground.rs b/fighters/kirby/src/acmd/ground.rs index 6a317f8220..a71092d20a 100644 --- a/fighters/kirby/src/acmd/ground.rs +++ b/fighters/kirby/src/acmd/ground.rs @@ -129,12 +129,10 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .acmd("effect_attackdash", effect_attackdash) - .acmd("sound_attackdash", sound_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/kirby/src/acmd/mod.rs b/fighters/kirby/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/kirby/src/acmd/mod.rs +++ b/fighters/kirby/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 750470b975..53ca89f3a7 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -194,18 +194,16 @@ unsafe extern "C" fn effect_landingheavy(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("sound_damageflyhi", sound_damageflyhi) - .acmd("sound_damageflylw", sound_damageflylw) - .acmd("sound_damageflyn", sound_damageflyn) - .acmd("sound_damageflyroll", sound_damageflyroll) - .acmd("sound_damageflytop", sound_damageflytop) - .acmd("sound_dash", sound_dash) - .acmd("game_turndash", game_turndash) - .acmd("game_escapeair", game_escapeair) - .acmd("game_escapeairslide", game_escapeairslide) - .acmd("game_landingheavy", game_landingheavy) - .acmd("effect_landingheavy", effect_landingheavy) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_landingheavy", game_landingheavy); + agent.acmd("effect_landingheavy", effect_landingheavy); } diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index d4a3fd7417..8548354f3a 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -438,18 +438,16 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attacks4hi", game_attacks4hi) - .acmd("game_attacks4", game_attacks4) - .acmd("game_attacks4lw", game_attacks4lw) - .acmd("sound_attacks4hi", sound_attacks4) - .acmd("sound_attacks4", sound_attacks4) - .acmd("sound_attacks4lw", sound_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("sound_attackhi4", sound_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("expression_attacklw4", expression_attacklw4) - .acmd("sound_attacklw4", sound_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("sound_attacks4hi", sound_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("sound_attacks4lw", sound_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); } diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index f893630e79..c8c86a619a 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -584,37 +584,35 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_specialnstart", game_specialnstart) - .acmd("game_specialairnstart", game_specialnstart) - .acmd("game_specialnloop", game_specialnloop) - .acmd("game_specialairnloop", game_specialnloop) - .acmd("game_specialneat", game_specialneat) - .acmd("game_specialairneat", game_specialneat) - .acmd("game_specialndrink", game_specialndrink) - .acmd("game_specialairndrink", game_specialndrink) - .acmd("game_specialnlarge", game_specialnlarge) - .acmd("game_specialairnlarge", game_specialnlarge) - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialss", game_specialss) - .acmd("game_specialsmax", game_specialsmax) - .acmd("game_specialairsstart", game_specialairsstart) - .acmd("game_specialairs", game_specialairs) - .acmd("game_specialairss", game_specialairss) - .acmd("game_specialairhi2", game_specialairhi2) - .acmd("effect_specialairhi2", effect_specialairhi2) - .acmd("game_specialhih", game_specialhih) - .acmd("effect_specialhih", effect_specialhih) - .acmd("sound_specialhih", sound_specialhih) - .acmd("expression_specialhih", expression_specialhih) - .acmd("game_specialairhih", game_specialairhih) - .acmd("effect_specialairhih", effect_specialairhih) - .acmd("sound_specialairhih", sound_specialairhih) - .acmd("expression_specialairhih", expression_specialairhih) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("effect_specialairlw", effect_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnloop", game_specialnloop); + agent.acmd("game_specialneat", game_specialneat); + agent.acmd("game_specialairneat", game_specialneat); + agent.acmd("game_specialndrink", game_specialndrink); + agent.acmd("game_specialairndrink", game_specialndrink); + agent.acmd("game_specialnlarge", game_specialnlarge); + agent.acmd("game_specialairnlarge", game_specialnlarge); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialss", game_specialss); + agent.acmd("game_specialsmax", game_specialsmax); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairss", game_specialairss); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("game_specialhih", game_specialhih); + agent.acmd("effect_specialhih", effect_specialhih); + agent.acmd("sound_specialhih", sound_specialhih); + agent.acmd("expression_specialhih", expression_specialhih); + agent.acmd("game_specialairhih", game_specialairhih); + agent.acmd("effect_specialairhih", effect_specialairhih); + agent.acmd("sound_specialairhih", sound_specialairhih); + agent.acmd("expression_specialairhih", expression_specialairhih); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/kirby/src/acmd/throws.rs b/fighters/kirby/src/acmd/throws.rs index 17bcc08eb9..72f3716df5 100644 --- a/fighters/kirby/src/acmd/throws.rs +++ b/fighters/kirby/src/acmd/throws.rs @@ -207,14 +207,12 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/kirby/src/acmd/tilts.rs b/fighters/kirby/src/acmd/tilts.rs index d2e192643e..f9de6a55a2 100644 --- a/fighters/kirby/src/acmd/tilts.rs +++ b/fighters/kirby/src/acmd/tilts.rs @@ -95,12 +95,10 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("kirby") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/kirby/src/copyability/acmd.rs b/fighters/kirby/src/copyability/acmd.rs index 18e165ee09..d80beae5f3 100644 --- a/fighters/kirby/src/copyability/acmd.rs +++ b/fighters/kirby/src/copyability/acmd.rs @@ -1,875 +1,912 @@ use super::*; -unsafe extern "C" fn diddy_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// BAYONETTA +// BRAVE +// BUDDY +// CAPTAIN +// CHROM +// CLOUD +// DAISY +// DEDEDE +// DEMON +// DIDDY +unsafe extern "C" fn game_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(fighter, 8.0/(31.0 - 1.0)); + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn diddy_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(fighter, 8.0/(35.0 - 1.0)); + FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn diddy_special_air_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn edge_special_n_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// DOLLY +// DONKEY +// DUCKHUNT +// EDGE +unsafe extern "C" fn game_edgespecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 79.0, 51.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 79.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 99.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 100.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 105.0); - FT_MOTION_RATE(fighter, 1.6); + FT_MOTION_RATE(agent, 1.6); frame(lua_state, 115.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 120.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); } frame(lua_state, 140.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } } -unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_edgespecialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } } -unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_edgespecialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 0.4); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.4); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn ganon_float_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// EFLAME +// ELIGHT +// FALCO +// FOX +// GAMEWATCH +// GANON +unsafe extern "C" fn game_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); } frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ganon_float_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_kirby_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_jump01")); } } -unsafe extern "C" fn ganon_float_air_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0 / 10.0); +unsafe extern "C" fn game_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0 / 10.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ganon_float_air_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } frame(lua_state, 2.0); for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } } -unsafe extern "C" fn ganon_float_air_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn ganon_float_air_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ganon_appear01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); } } -unsafe extern "C" fn ganon_float_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); } frame(lua_state, 60.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn ganon_float_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_final_hand_triforce"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ganon_entry_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); } } -unsafe extern "C" fn ganon_float_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn koopa_special_n_start_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); + +// GAOGAEN +// GEKKOUGA +// IKE +// INKLING +// JACK +// KAMUI +// KEN +// KOOPA +unsafe extern "C" fn effect_koopaspecialnstart(agent: &mut L2CAgentBase) { + if is_excute(agent) { + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } - wait(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + wait(agent.lua_state_agent, 20.0); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn koopa_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_koopaspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); } wait(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_copy_koopa_01")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_copy_koopa_01")); } } -unsafe extern "C" fn koopa_special_n_end_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - FT_MOTION_RATE_RANGE(fighter,1.0,31.0,16.0); +unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + FT_MOTION_RATE_RANGE(agent,1.0,31.0,16.0); } -unsafe extern "C" fn koopa_special_n_max_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); +unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); } } -unsafe extern "C" fn koopa_special_n_max_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter,1.5); +unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent,1.5); - if fighter.is_motion(Hash40::new("koopa_special_n_max")){ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("sys_explosion_sign"),false,false); + frame(agent.lua_state_agent, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"),false,false); } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("koopa_breath_m_fire"),false,false); + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("koopa_breath_m_fire"),false,false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } - frame(fighter.lua_state_agent, 42.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + frame(agent.lua_state_agent, 42.0); + if is_excute(agent) { + COL_NORMAL(agent); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter,2.0,0.5,0); + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); } } -unsafe extern "C" fn koopa_special_n_max_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); +unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); } - wait(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - if fighter.is_motion(Hash40::new("koopa_special_n_max")){ - PLAY_SE_REMAIN(fighter, Hash40::new("se_koopa_step_left_m")); + wait(agent.lua_state_agent, 19.0); + if is_excute(agent) { + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); } } - frame(fighter.lua_state_agent, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_m_damage")); + frame(agent.lua_state_agent, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } } -unsafe extern "C" fn koopa_special_n_max_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_koopaspecialnmax(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(agent.lua_state_agent, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn koopajr_special_n_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { + +// KOOPAJR +unsafe extern "C" fn effect_koopajrspecialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { - EFFECT(fighter, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } else { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } } } -unsafe extern "C" fn krool_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// KROOL +unsafe extern "C" fn effect_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 31.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT(fighter, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn krool_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n08")); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n07")); + PLAY_SE(agent, Hash40::new("se_krool_special_n07")); } - else if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n01")); + else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + PLAY_SE(agent, Hash40::new("se_krool_special_n01")); } } frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n09")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n09")); } } -unsafe extern "C" fn krool_special_n_fire_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); } - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 89.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn krool_special_n_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); +unsafe extern "C" fn effect_kroolspecialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 2.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.9); + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.9); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); } } wait(lua_state, 10.0); } -unsafe extern "C" fn littlemac_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// LINK +// LITTLEMAC +unsafe extern "C" fn game_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - let damage = 22.0 * if fighter.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; - let angle = if fighter.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; - let bkb = if fighter.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; - let shield_damage = if fighter.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let damage = 22.0 * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; + let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; + let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; + let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_damage_shake_scale(boma, 0.67); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::kirby::status::KO_PUNCH_GRAVITY); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::kirby::status::KO_PUNCH_GRAVITY); } } -unsafe extern "C" fn littlemac_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let size = 1.0; - EFFECT_FLW_POS(fighter, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); + EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("littlemac_ko_uppercut_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); } } frame(lua_state, 8.0); let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(45.0, 135.0, 45.0), 0.3, false, 0, 0, 0, 0, 0, false, false); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, handle as u32, 1.5); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); let facing = PostureModule::lr(boma); EffectModule::set_rot(boma, handle as u32, &Vector3f::new(45.0 * facing, 135.0, 45.0 * facing)); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_ko_uppercut"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); } } -unsafe extern "C" fn littlemac_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_special_n03")); - PLAY_SE(fighter, Hash40::new("vc_kirby_hammermax")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); + PLAY_SE(agent, Hash40::new("vc_kirby_hammermax")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); } } -unsafe extern "C" fn littlemac_special_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_elecattack"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -// SPECIAL N START // - -unsafe extern "C" fn lucas_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// LUCARIO +// LUCAS +unsafe extern "C" fn game_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_010")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_010")); } } -// SPECIAL N HOLD // - -unsafe extern "C" fn lucas_special_n_hold_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { // INTENTIONALLY LEFT BLANK - /* if fighter.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); } */ } -unsafe extern "C" fn lucas_special_n_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(fighter, 0.01, 0.5, 1, 0.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); } for i in 1..=50 { - if is_excute(fighter) { + if is_excute(agent) { if i%2==0 { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); } if i%4==0 { - EFFECT_FLW_POS(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); } - FLASH(fighter, 1, 1, 1, 0.6); + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); + if is_excute(agent){ + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); + if is_excute(agent){ + COL_NORMAL(agent); } wait(lua_state, 1.0); } } -unsafe extern "C" fn lucas_special_n_hold_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_lucas_pk_charge")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); } } -// SPECIAL N FIRE // - -unsafe extern "C" fn lucas_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { +unsafe extern "C" fn game_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); } } } -unsafe extern "C" fn lucas_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } for _ in 1..=5 { - if is_excute(fighter) { - FLASH(fighter, 0.01, 0.5, 1, 0.4); + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 3.0) } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_kirby_attack04")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_attack04")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } -unsafe extern "C" fn luigi_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// LUCINA +// LUIGI +unsafe extern "C" fn game_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); } } -unsafe extern "C" fn luigi_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); - FLASH(fighter, 0, 1, 0, 0.353); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); + FLASH(agent, 0, 1, 0, 0.353); } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("luigi_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); } } -unsafe extern "C" fn luigi_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); } } -unsafe extern "C" fn luigi_special_n_thunder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let mut rand = &Vector3f::new( app::sv_math::rand(hash40("fighter"), 50) as f32, app::sv_math::rand(hash40("stage"), 50) as f32, @@ -880,404 +917,423 @@ unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.25, 1.0, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FLASH(agent, 0, 0.25, 1.0, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn luigi_special_n_thunder_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_attack02")); - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); + PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); } } -unsafe extern "C" fn luigi_special_n_thunder_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// MARIO +unsafe extern "C" fn game_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 14.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 49.0, 23.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mario_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.353); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.353); } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 27.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); } } -unsafe extern "C" fn mario_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - KineticModule::add_speed(fighter.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); } } frame(lua_state, 14.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); + LAST_EFFECT_SET_RATE(agent, 1.2); EffectModule::enable_sync_init_pos_last(boma); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 18.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.75); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_bomb_a"), false, false); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.75); + EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); } frame(lua_state, 24.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_flame"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); } } -unsafe extern "C" fn mario_special_n_fire_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mariod_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// MARIOD +unsafe extern "C" fn game_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 15.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); } } -unsafe extern "C" fn mariod_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn mariod_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mariod_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); } } -unsafe extern "C" fn mariod_special_n_chill_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 43.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_n_chill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.25, 1, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + FLASH(agent, 0.5, 0.25, 1, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn mariod_special_n_chill_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_frieze_l")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_frieze_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack03")); } } -unsafe extern "C" fn mariod_special_n_chill_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn miigunner_special_n1_fire_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// MARTH +// MASTER +// METAKNIGHT +// MEWTWO +// MIIFIGHTER +// MIIGUNNER +unsafe extern "C" fn effect_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); } } frame(lua_state, 2.6); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_sb_tama"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); } frame(lua_state, 2.8); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); } } else { - EFFECT(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } } } -unsafe extern "C" fn miigunner_special_n1_fire_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("se_miigunner_final01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(fighter, Hash40::new("se_miigunner_final01")); - PLAY_SE(fighter, Hash40::new("se_miigunner_final04")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); } } } -unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { + +// MIISWORDSMAN +// MURABITO +// NANA +// NESS +// PACKUN +// PACMAN +// PALUTENA +unsafe extern "C" fn effect_palutenaspecialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -1298,7 +1354,7 @@ unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_palutenaspecialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -1311,7 +1367,7 @@ unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_palutenaspecialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1328,501 +1384,630 @@ unsafe extern "C" fn palutena_special_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ridley_special_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); + +// PEACH +// PFUSHIGISOU +// PICHU +// PICKEL +// PIKACHU +// PIKMIN +// PIT +// PITB +// PLIZARDON +// POPO +// PURIN +// PZENIGAME +// REFLET +// RICHTER +// RIDLEY +unsafe extern "C" fn game_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); } } -unsafe extern "C" fn ridley_special_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } -unsafe extern "C" fn ridley_special_air_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_air_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_kirby_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); } } -unsafe extern "C" fn ridley_special_air_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } -unsafe extern "C" fn roy_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.25); - //AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); +// ROBOT +// ROCKMAN +// ROSETTA +// ROY +unsafe extern "C" fn effect_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); + + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + //AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); } frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); } } -unsafe extern "C" fn roy_special_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_kirby_copy_roy_02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_roy_02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); } } -unsafe extern "C" fn shizue_special_n_failure_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// RYU +// SAMUS +// SAMUSD +// SHEIK +// SHIZUE +unsafe extern "C" fn effect_shizuespecialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn shizue_special_n_failure_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_shizuespecialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } } -unsafe extern "C" fn sonic_special_n_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + +// SHULK +// SIMON +// SNAKE +// SONIC +unsafe extern "C" fn game_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; KineticModule::add_speed(boma, &temp); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } -unsafe extern "C" fn sonic_special_n_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn sonic_special_n_hit_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("vc_kirby_copy_sonic_01")); +unsafe extern "C" fn sound_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("vc_kirby_copy_sonic_01")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_kirby_appeal01")); - } -} - -pub fn install() { - smashline::Agent::new("roy") - .acmd("sound_royspecialnend", roy_special_n_end_sound) - .acmd("sound_royspecialairnend", roy_special_n_end_sound) - .install(); - smashline::Agent::new("kirby") - .acmd("game_diddyspecialncancel", diddy_special_n_cancel_game) - .acmd("effect_diddyspecialncancel", diddy_special_n_cancel_effect) - .acmd("sound_diddyspecialncancel", diddy_special_n_cancel_sound) - .acmd( + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_appeal01")); + } +} + + +// SZEROSUIT +// TANTAN +// TOONLINK +// TRAIL +// WARIO +// WIIFIT +// WOLF +// YOSHI +// YOUNGLINK +// ZELDA + +pub fn install(agent: &mut Agent) { + // BAYONETTA + // BRAVE + // CAPTAIN + // CHROM + // CLOUD + // DAISY + // DEDEDE + // DEMON + // DIDDY + agent.acmd("game_diddyspecialncancel", game_diddyspecialncancel); + agent.acmd("effect_diddyspecialncancel", effect_diddyspecialncancel); + agent.acmd("sound_diddyspecialncancel", sound_diddyspecialncancel); + agent.acmd( "expression_diddyspecialncancel", - diddy_special_n_cancel_expression, - ) - .acmd( + expression_diddyspecialncancel, + ); + agent.acmd( "game_diddyspecialairncancel", - diddy_special_air_n_cancel_game, - ) - .acmd( + game_diddyspecialairncancel, + ); + agent.acmd( "effect_diddyspecialairncancel", - diddy_special_air_n_cancel_effect, - ) - .acmd( + effect_diddyspecialairncancel, + ); + agent.acmd( "sound_diddyspecialairncancel", - diddy_special_air_n_cancel_sound, - ) - .acmd( + sound_diddyspecialairncancel, + ); + agent.acmd( "expression_diddyspecialairncancel", - diddy_special_air_n_cancel_expression, - ) - .acmd("game_edgespecialnstart", edge_special_n_start) - .acmd("game_edgespecialairnstart", edge_special_n_start) - .acmd("game_edgespecialn1", edge_special_n1_game) - .acmd("game_edgespecialairn1", edge_special_n1_game) - .acmd("game_edgespecialn2", edge_special_n2_game) - .acmd("game_edgespecialairn2", edge_special_n2_game) - .acmd("game_ganonfloatstart", ganon_float_start_game) - .acmd("effect_ganonfloatstart", ganon_float_start_effect) - .acmd("expression_ganonfloatstart", ganon_float_start_expression) - .acmd("sound_ganonfloatstart", ganon_float_start_sound) - .acmd("game_ganonfloatairstart", ganon_float_air_start_game) - .acmd("effect_ganonfloatairstart", ganon_float_air_start_effect) - .acmd( + expression_diddyspecialairncancel, + ); + // DOLLY + // DONKEY + // DUCKHUNT + // EDGE + agent.acmd("game_edgespecialnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialairnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialn1", game_edgespecialn1); + agent.acmd("game_edgespecialairn1", game_edgespecialn1); + agent.acmd("game_edgespecialn2", game_edgespecialn2); + agent.acmd("game_edgespecialairn2", game_edgespecialn2); + // EFLAME + // ELIGHT + // FOX + // FALCO + // FOX + // GAMEWATCH + // GANON + agent.acmd("game_ganonfloatstart", game_ganonfloatstart); + agent.acmd("effect_ganonfloatstart", effect_ganonfloatstart); + agent.acmd("expression_ganonfloatstart", expression_ganonfloatstart); + agent.acmd("sound_ganonfloatstart", sound_ganonfloatstart); + agent.acmd("game_ganonfloatairstart", game_ganonfloatairstart); + agent.acmd("effect_ganonfloatairstart", effect_ganonfloatairstart); + agent.acmd( "expression_ganonfloatairstart", - ganon_float_air_start_expression, - ) - .acmd("sound_ganonfloatairstart", ganon_float_air_start_sound) - .acmd("game_ganonfloat", ganon_float_game) - .acmd("effect_ganonfloat", ganon_float_effect) - .acmd("expression_ganonfloat", ganon_float_expression) - .acmd("effect_koopaspecialnstart", koopa_special_n_start_effect) - .acmd("effect_koopaspecialairnstart", koopa_special_n_start_effect) - .acmd("sound_koopaspecialnstart", koopa_special_n_start_sound) - .acmd("game_koopaspecialnend", koopa_special_n_end_game) - .acmd("game_koopaspecialairnend", koopa_special_n_end_game) - .acmd("game_koopaspecialnmax", koopa_special_n_max_game) - .acmd("game_koopaspecialairnmax", koopa_special_n_max_game) - .acmd("effect_koopaspecialnmax", koopa_special_n_max_effect) - .acmd("effect_koopaspecialairnmax", koopa_special_n_max_effect) - .acmd("sound_koopaspecialnmax", koopa_special_n_max_sound) - .acmd("sound_koopaspecialairnmax", koopa_special_n_max_sound) - .acmd( + expression_ganonfloatairstart, + ); + agent.acmd("sound_ganonfloatairstart", sound_ganonfloatairstart); + agent.acmd("game_ganonfloat", game_ganonfloat); + agent.acmd("effect_ganonfloat", effect_ganonfloat); + agent.acmd("expression_ganonfloat", expression_ganonfloat); + // GAOGAEN + // GEKKOUGA + // IKE + // INKLING + // JACK + // KAMUI + // KEN + // KOOPA + agent.acmd("effect_koopaspecialnstart", effect_koopaspecialnstart); + agent.acmd("effect_koopaspecialairnstart", effect_koopaspecialnstart); + agent.acmd("sound_koopaspecialnstart", sound_koopaspecialnstart); + agent.acmd("game_koopaspecialnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialairnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialnmax", game_koopaspecialnmax); + agent.acmd("game_koopaspecialairnmax", game_koopaspecialnmax); + agent.acmd("effect_koopaspecialnmax", effect_koopaspecialnmax); + agent.acmd("effect_koopaspecialairnmax", effect_koopaspecialnmax); + agent.acmd("sound_koopaspecialnmax", sound_koopaspecialnmax); + agent.acmd("sound_koopaspecialairnmax", sound_koopaspecialnmax); + agent.acmd( "expression_koopaspecialnmax", - koopa_special_n_max_expression, - ) - .acmd( + expression_koopaspecialnmax, + ); + agent.acmd( "expression_koopaspecialairnmax", - koopa_special_n_max_expression, - ) - .acmd( + expression_koopaspecialnmax, + ); + // KOOPAJR + agent.acmd( "effect_koopajrspecialnshoot", - koopajr_special_n_shoot_effect, - ) - .acmd("effect_kroolspecialnfire", krool_special_n_fire_effect) - .acmd("effect_kroolspecialairnfire", krool_special_n_fire_effect) - .acmd("sound_kroolspecialnfire", krool_special_n_fire_sound) - .acmd("sound_kroolspecialairnfire", krool_special_n_fire_sound) - .acmd( + effect_koopajrspecialnshoot, + ); + // KROOL + agent.acmd("effect_kroolspecialnfire", effect_kroolspecialnfire); + agent.acmd("effect_kroolspecialairnfire", effect_kroolspecialnfire); + agent.acmd("sound_kroolspecialnfire", sound_kroolspecialnfire); + agent.acmd("sound_kroolspecialairnfire", sound_kroolspecialnfire); + agent.acmd( "expression_kroolspecialnfire", - krool_special_n_fire_expression, - ) - .acmd( + expression_kroolspecialnfire, + ); + agent.acmd( "expression_kroolspecialairnfire", - krool_special_n_fire_expression, - ) - .acmd("effect_kroolspecialnloop", krool_special_n_loop_effect) - .acmd("effect_kroolspecialairnloop", krool_special_n_loop_effect) - .acmd("game_littlemacspecialn", littlemac_special_n_game) - .acmd("game_littlemacspecialairn", littlemac_special_n_game) - .acmd("effect_littlemacspecialn", littlemac_special_n_effect) - .acmd("effect_littlemacspecialairn", littlemac_special_n_effect) - .acmd("sound_littlemacspecialn", littlemac_special_n_sound) - .acmd("sound_littlemacspecialairn", littlemac_special_n_sound) - .acmd("expression_littlemacspecialn", littlemac_special_n_expression) - .acmd("expression_littlemacspecialairn", littlemac_special_n_expression) - .acmd("game_lucasspecialnstart", lucas_special_n_start_game) - .acmd("game_lucasspecialairnstart", lucas_special_n_start_game) - .acmd("sound_lucasspecialnstart", lucas_special_n_start_sound) - .acmd("sound_lucasspecialairnstart", lucas_special_n_start_sound) - .acmd("game_lucasspecialnhold", lucas_special_n_hold_game) - .acmd("game_lucasspecialairnhold", lucas_special_n_hold_game) - .acmd("effect_lucasspecialnhold", lucas_special_n_hold_effect) - .acmd("effect_lucasspecialairnhold", lucas_special_n_hold_effect) - .acmd("sound_lucasspecialairnhold", lucas_special_n_hold_sound) - .acmd("sound_lucasspecialnhold", lucas_special_n_hold_sound) - .acmd("game_lucasspecialnfire", lucas_special_n_fire_game) - .acmd("game_lucasspecialairnfire", lucas_special_n_fire_game) - .acmd("effect_lucasspecialnfire", lucas_special_n_fire_effect) - .acmd("effect_lucasspecialairnfire", lucas_special_n_fire_effect) - .acmd("sound_lucasspecialairnfire", lucas_special_n_fire_sound) - .acmd("sound_lucasspecialnfire", lucas_special_n_fire_sound) - .acmd("game_luigispecialn", luigi_special_n_game) - .acmd("game_luigispecialairn", luigi_special_n_game) - .acmd("effect_luigispecialn", luigi_special_n_effect) - .acmd("effect_luigispecialairn", luigi_special_n_effect) - .acmd("sound_luigispecialn", luigi_special_n_sound) - .acmd("sound_luigispecialairn", luigi_special_n_sound) - .acmd("game_luigispecialnthunder", luigi_special_n_thunder_game) - .acmd("game_luigispecialairnthunder", luigi_special_n_thunder_game) - .acmd( + expression_kroolspecialnfire, + ); + agent.acmd("effect_kroolspecialnloop", effect_kroolspecialnloop); + agent.acmd("effect_kroolspecialairnloop", effect_kroolspecialnloop); + // LINK + // LITTLEMAC + agent.acmd("game_littlemacspecialn", game_littlemacspecialn); + agent.acmd("game_littlemacspecialairn", game_littlemacspecialn); + agent.acmd("effect_littlemacspecialn", effect_littlemacspecialn); + agent.acmd("effect_littlemacspecialairn", effect_littlemacspecialn); + agent.acmd("sound_littlemacspecialn", sound_littlemacspecialn); + agent.acmd("sound_littlemacspecialairn", sound_littlemacspecialn); + agent.acmd("expression_littlemacspecialn", expression_littlemacspecialn); + agent.acmd("expression_littlemacspecialairn", expression_littlemacspecialn); + // LUCARIO + // LUCAS + agent.acmd("game_lucasspecialnstart", game_lucasspecialnstart); + agent.acmd("game_lucasspecialairnstart", game_lucasspecialnstart); + agent.acmd("sound_lucasspecialnstart", sound_lucasspecialnstart); + agent.acmd("sound_lucasspecialairnstart", sound_lucasspecialnstart); + agent.acmd("game_lucasspecialnhold", game_lucasspecialnhold); + agent.acmd("game_lucasspecialairnhold", game_lucasspecialnhold); + agent.acmd("effect_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("effect_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("game_lucasspecialnfire", game_lucasspecialnfire); + agent.acmd("game_lucasspecialairnfire", game_lucasspecialnfire); + agent.acmd("effect_lucasspecialnfire", effect_lucasspecialnfire); + agent.acmd("effect_lucasspecialairnfire", effect_lucasspecialnfire); + agent.acmd("sound_lucasspecialairnfire", sound_lucasspecialnfire); + agent.acmd("sound_lucasspecialnfire", sound_lucasspecialnfire); + // LUCINA + // LUIGI + agent.acmd("game_luigispecialn", game_luigispecialn); + agent.acmd("game_luigispecialairn", game_luigispecialn); + agent.acmd("effect_luigispecialn", effect_luigispecialn); + agent.acmd("effect_luigispecialairn", effect_luigispecialn); + agent.acmd("sound_luigispecialn", sound_luigispecialn); + agent.acmd("sound_luigispecialairn", sound_luigispecialn); + agent.acmd("game_luigispecialnthunder", game_luigispecialnthunder); + agent.acmd("game_luigispecialairnthunder", game_luigispecialnthunder); + agent.acmd( "effect_luigispecialnthunder", - luigi_special_n_thunder_effect, - ) - .acmd( + effect_luigispecialnthunder, + ); + agent.acmd( "effect_luigispecialairnthunder", - luigi_special_n_thunder_effect, - ) - .acmd("sound_luigispecialnthunder", luigi_special_n_thunder_sound) - .acmd( + effect_luigispecialnthunder, + ); + agent.acmd("sound_luigispecialnthunder", sound_luigispecialnthunder); + agent.acmd( "sound_luigispecialairnthunder", - luigi_special_n_thunder_sound, - ) - .acmd( + sound_luigispecialnthunder, + ); + agent.acmd( "expression_luigispecialnthunder", - luigi_special_n_thunder_expression, - ) - .acmd( + expression_luigispecialnthunder, + ); + agent.acmd( "expression_luigispecialairnthunder", - luigi_special_n_thunder_expression, - ) - .acmd("game_mariospecialn", mario_special_n_game) - .acmd("game_mariospecialairn", mario_special_n_game) - .acmd("effect_mariospecialn", mario_special_n_effect) - .acmd("effect_mariospecialairn", mario_special_n_effect) - .acmd("sound_mariospecialn", mario_special_n_sound) - .acmd("sound_mariospecialairn", mario_special_n_sound) - .acmd("game_mariospecialnfire", mario_special_n_fire_game) - .acmd("game_mariospecialairnfire", mario_special_n_fire_game) - .acmd("effect_mariospecialnfire", mario_special_n_fire_effect) - .acmd("effect_mariospecialairnfire", mario_special_n_fire_effect) - .acmd("sound_mariospecialnfire", mario_special_n_fire_sound) - .acmd("sound_mariospecialairnfire", mario_special_n_fire_sound) - .acmd( + expression_luigispecialnthunder, + ); + // MARIO + agent.acmd("game_mariospecialn", game_mariospecialn); + agent.acmd("game_mariospecialairn", game_mariospecialn); + agent.acmd("effect_mariospecialn", effect_mariospecialn); + agent.acmd("effect_mariospecialairn", effect_mariospecialn); + agent.acmd("sound_mariospecialn", sound_mariospecialn); + agent.acmd("sound_mariospecialairn", sound_mariospecialn); + agent.acmd("game_mariospecialnfire", game_mariospecialnfire); + agent.acmd("game_mariospecialairnfire", game_mariospecialnfire); + agent.acmd("effect_mariospecialnfire", effect_mariospecialnfire); + agent.acmd("effect_mariospecialairnfire", effect_mariospecialnfire); + agent.acmd("sound_mariospecialnfire", sound_mariospecialnfire); + agent.acmd("sound_mariospecialairnfire", sound_mariospecialnfire); + agent.acmd( "expression_mariospecialnfire", - mario_special_n_fire_expression, - ) - .acmd( + expression_mariospecialnfire, + ); + agent.acmd( "expression_mariospecialairnfire", - mario_special_n_fire_expression, - ) - .acmd("game_mariodspecialn", mariod_special_n_game) - .acmd("game_mariodspecialairn", mariod_special_n_game) - .acmd("effect_mariospecialn", mariod_special_n_effect) - .acmd("effect_mariospecialairn", mariod_special_n_effect) - .acmd("sound_mariodspecialn", mariod_special_n_sound) - .acmd("sound_mariodspecialairn", mariod_special_n_sound) - .acmd("game_mariodspecialnchill", mariod_special_n_chill_game) - .acmd("game_mariodspecialairnchill", mariod_special_n_chill_game) - .acmd("effect_mariodspecialnchill", mariod_special_n_chill_effect) - .acmd( + expression_mariospecialnfire, + ); + // MARIOD + agent.acmd("game_mariodspecialn", game_mariodspecialn); + agent.acmd("game_mariodspecialairn", game_mariodspecialn); + agent.acmd("effect_mariodspecialn", effect_mariodspecialn); + agent.acmd("effect_mariodspecialairn", effect_mariodspecialn); + agent.acmd("sound_mariodspecialn", sound_mariodspecialn); + agent.acmd("sound_mariodspecialairn", sound_mariodspecialn); + agent.acmd("game_mariodspecialnchill", game_mariodspecialnchill); + agent.acmd("game_mariodspecialairnchill", game_mariodspecialnchill); + agent.acmd("effect_mariodspecialnchill", effect_mariodspecialnchill); + agent.acmd( "effect_mariodspecialairnchill", - mariod_special_n_chill_effect, - ) - .acmd("sound_mariodspecialnchill", mariod_special_n_chill_sound) - .acmd("sound_mariodspecialairnchill", mariod_special_n_chill_sound) - .acmd( + effect_mariodspecialnchill, + ); + agent.acmd("sound_mariodspecialnchill", sound_mariodspecialnchill); + agent.acmd("sound_mariodspecialairnchill", sound_mariodspecialnchill); + agent.acmd( "expression_mariodspecialnchill", - mariod_special_n_chill_expression, - ) - .acmd( + expression_mariodspecialnchill, + ); + agent.acmd( "expression_mariodspecialairnchill", - mariod_special_n_chill_expression, - ) - .acmd( + expression_mariodspecialnchill, + ); + // MARTH + // MASTER + // METAKNIGHT + // MEWTWO + // MIIFIGHTER + // MIIGUNNER + agent.acmd( "effect_miigunnerspecialn1firemax", - miigunner_special_n1_fire_max_effect, - ) - .acmd( + effect_miigunnerspecialn1firemax, + ); + agent.acmd( "effect_miigunnerspecialairn1firemax", - miigunner_special_n1_fire_max_effect, - ) - .acmd( + effect_miigunnerspecialn1firemax, + ); + agent.acmd( "sound_miigunnerspecialn1firemax", - miigunner_special_n1_fire_max_sound, - ) - .acmd( + sound_miigunnerspecialn1firemax, + ); + agent.acmd( "sound_miigunnerspecialairn1firemax", - miigunner_special_n1_fire_max_sound, - ) - .acmd("effect_palutenaspecialn", palutena_special_n_effect) - .acmd("effect_palutenaspecialairn", palutena_special_n_effect) - .acmd("sound_palutenaspecialn", palutena_special_n_sound) - .acmd("sound_palutenaspecialairn", palutena_special_n_sound) - .acmd("expression_palutenaspecialn", palutena_special_n_expression) - .acmd( + sound_miigunnerspecialn1firemax, + ); + // MIISWORDSMAN + // MURABITO + // NANA + // NESS + // PACKUN + // PACMAN + // PALUTENA + agent.acmd("effect_palutenaspecialn", effect_palutenaspecialn); + agent.acmd("effect_palutenaspecialairn", effect_palutenaspecialn); + agent.acmd("sound_palutenaspecialn", sound_palutenaspecialn); + agent.acmd("sound_palutenaspecialairn", sound_palutenaspecialn); + agent.acmd("expression_palutenaspecialn", expression_palutenaspecialn); + agent.acmd( "expression_palutenaspecialairn", - palutena_special_n_expression, - ) - .acmd("game_ridleyspecialnexplode", ridley_special_n_explode_game) - .acmd( + expression_palutenaspecialn, + ); + // PEACH + // PFUSHIGISOU + // PICHU + // PICKEL + // PIKACHU + // PIKMIN + // PIT + // PITB + // PLIZARDON + // POPO + // PURIN + // PZENIGAME + // REFLET + // RICHTER + // RIDLEY + agent.acmd("game_ridleyspecialnexplode", game_ridleyspecialnexplode); + agent.acmd( "effect_ridleyspecialnexplode", - ridley_special_n_explode_effect, - ) - .acmd( + effect_ridleyspecialnexplode, + ); + agent.acmd( "sound_ridleyspecialnexplode", - ridley_special_n_explode_sound, - ) - .acmd( + sound_ridleyspecialnexplode, + ); + agent.acmd( "expression_ridleyspecialnexplode", - ridley_special_n_explode_expression, - ) - .acmd( + expression_ridleyspecialnexplode, + ); + agent.acmd( "game_ridleyspecialairnexplode", - ridley_special_air_n_explode_game, - ) - .acmd( + game_ridleyspecialairnexplode, + ); + agent.acmd( "effect_ridleyspecialairnexplode", - ridley_special_air_n_explode_effect, - ) - .acmd( + effect_ridleyspecialairnexplode, + ); + agent.acmd( "sound_ridleyspecialairnexplode", - ridley_special_air_n_explode_sound, - ) - .acmd( + sound_ridleyspecialairnexplode, + ); + agent.acmd( "expression_ridleyspecialairnexplode", - ridley_special_air_n_explode_expression, - ) - .acmd("effect_royspecialnend", roy_special_n_end_effect) - .acmd("effect_royspecialairnend", roy_special_n_end_effect) - .acmd( + expression_ridleyspecialairnexplode, + ); + // ROBOT + // ROCKMAN + // ROSETTA + // ROY + agent.acmd("sound_royspecialnend", sound_royspecialnend); + agent.acmd("sound_royspecialairnend", sound_royspecialnend); + agent.acmd("effect_royspecialnend", effect_royspecialnend); + agent.acmd("effect_royspecialairnend", effect_royspecialnend); + // RYU + // SAMUS + // SAMUSD + // SHEIK + // SHIZUE + agent.acmd( "effect_shizuespecialnfailure", - shizue_special_n_failure_effect, - ) - .acmd( + effect_shizuespecialnfailure, + ); + agent.acmd( "effect_shizuespecialairnfailure", - shizue_special_n_failure_effect, - ) - .acmd( + effect_shizuespecialnfailure, + ); + agent.acmd( "expression_shizuespecialnfailure", - shizue_special_n_failure_expression, - ) - .acmd( + expression_shizuespecialnfailure, + ); + agent.acmd( "expression_shizuespecialairnfailure", - shizue_special_n_failure_expression, - ) - .acmd("game_sonicspecialnhit", sonic_special_n_hit_game) - .acmd("effect_sonicspecialnhit", sonic_special_n_hit_effect) - .acmd("sound_sonicspecialnhit", sonic_special_n_hit_sound) - .install(); + expression_shizuespecialnfailure, + ); + // SHULK + // SIMON + // SNAKE + // SONIC + agent.acmd("game_sonicspecialnhit", game_sonicspecialnhit); + agent.acmd("effect_sonicspecialnhit", effect_sonicspecialnhit); + agent.acmd("sound_sonicspecialnhit", sound_sonicspecialnhit); + // SZEROSUIT + // TANTAN + // TOONLINK + // TRAIL + // WARIO + // WIIFIT + // WOLF + // YOSHI + // YOUNGLINK + // ZELDA } diff --git a/fighters/kirby/src/copyability/mod.rs b/fighters/kirby/src/copyability/mod.rs index e598851c2f..a9595c506f 100644 --- a/fighters/kirby/src/copyability/mod.rs +++ b/fighters/kirby/src/copyability/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; mod opff; -pub fn install() { - acmd::install(); +pub fn install(agent: &mut Agent) { + acmd::install(agent); opff::install(); } \ No newline at end of file diff --git a/fighters/kirby/src/copyability/opff.rs b/fighters/kirby/src/copyability/opff.rs index 39bc6c44ff..d07174a998 100644 --- a/fighters/kirby/src/copyability/opff.rs +++ b/fighters/kirby/src/copyability/opff.rs @@ -647,12 +647,25 @@ unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_ } } -// Wolf Drift and Laser Airdodge Cancel -unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { - if frame > 17.0 { - boma.check_airdodge_cancel(); + +// KOOPAJR---------------------------------------------------------------------------------------------------------------------------- +unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { + if frame > 16.0 { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { + if situation_kind == *SITUATION_KIND_GROUND { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); + } + } } + } +} + + +// KROOL---------------------------------------------------------------------------------------------------------------------------- +// LINK---------------------------------------------------------------------------------------------------------------------------- +unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { if situation_kind == *SITUATION_KIND_AIR { if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -661,127 +674,200 @@ unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, stat } } -// Sora Magic Cancels -unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - // Firaga Airdodge Cancel - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { - if frame > 2.0 { - boma.check_airdodge_cancel(); + +// LITTLEMAC---------------------------------------------------------------------------------------------------------------------------- +// LUCARIO---------------------------------------------------------------------------------------------------------------------------- +unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { + if boma.is_cat_flag(Cat2::CommonGuard) { + if situation_kind == *SITUATION_KIND_AIR { + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + else { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } } - } - // Thundaga Land Cancel - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) - { - let special_n_fire_cancel_frame_ground = 69.0; - let landing_lag = 12.0; - if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); + }***/ + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } } } } -// cycles Kirby to firaga after copying Sora -unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if fighter.is_motion(Hash40::new("special_n_drink")) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { - let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); - let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; - if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE - && frame > 3.0 { - WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); - FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder - } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER - && frame > 4.0 { - FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire - } + +// LUCAS---------------------------------------------------------------------------------------------------------------------------- +unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { + // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // + let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); + let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); + let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); + } + else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { + // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // + let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; + EffectModule::kill(fighter.module_accessor, handle, false, false); + let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; + EffectModule::kill(fighter.module_accessor, handle2, false, false); + let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; + EffectModule::kill(fighter.module_accessor, handle3, false, false); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); } } -// handles kirby's mining behavior when copying steve -unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { - if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { - VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); - } - - // wait 2 frames before letting the material table advance, preventing any jumps in entries - if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { - if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { - VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); - } else { - VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); +pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32, status_kind: i32) { + if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] + ) { + //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); + if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } } + else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, + *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF + ) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + } + // Kirby specific, resets gimmick if copy ability isn't enabled + if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } + } -// Bite Early Throw and Turnaround -unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { - if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { - boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { - if frame < 7.0 { - if facing * stick_x < 0.0 { - PostureModule::reverse_lr(boma); - PostureModule::update_rot_y_lr(boma); + +// LUCINA---------------------------------------------------------------------------------------------------------------------------- +// LUIGI---------------------------------------------------------------------------------------------------------------------------- +// MARIO---------------------------------------------------------------------------------------------------------------------------- +// MARIOD---------------------------------------------------------------------------------------------------------------------------- +// MARTH---------------------------------------------------------------------------------------------------------------------------- +// MASTER---------------------------------------------------------------------------------------------------------------------------- +unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); } } } } -// Nayru's Love Drift and Land Cancel -unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND { - if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { - //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); - MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); + +// METAKNIGHT---------------------------------------------------------------------------------------------------------------------------- +// MEWTWO---------------------------------------------------------------------------------------------------------------------------- +unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + if MotionModule::is_end(boma) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); } } - else if situation_kind == *SITUATION_KIND_AIR { - if frame >= 31.0 { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } + } +} + + +// MIIFIGHTER---------------------------------------------------------------------------------------------------------------------------- +// MIIGUNNER---------------------------------------------------------------------------------------------------------------------------- +unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); } } } } -// Clown Cannon Shield Cancel -unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { - if frame > 16.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - if situation_kind == *SITUATION_KIND_GROUND { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); - } +// MIISWORDSMAN---------------------------------------------------------------------------------------------------------------------------- +// MURABITO---------------------------------------------------------------------------------------------------------------------------- +// NANA---------------------------------------------------------------------------------------------------------------------------- +// NESS---------------------------------------------------------------------------------------------------------------------------- +// PACKUN---------------------------------------------------------------------------------------------------------------------------- +pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { + let opponent_boma = fighter.get_grabbed_opponent_boma(); + let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); + if grabbed_fighter == *FIGHTER_KIND_PACKUN { + let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); + if new_stance != old_stance { + // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); + VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); } } } } -// Link's Bow Drift -unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); +unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { + if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); + } + else { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); + } +} + +pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { + VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("bomb"); + } + else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { + VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("not bomb"); + } + let status_kind = StatusModule::status_kind(weapon.module_accessor); + let motion_kind = MotionModule::motion_kind(weapon.module_accessor); + if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { + if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { + /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { + println!("will bomb"); + } */ + if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + // println!("is bomb"); + } } } } } -// Bonus Fruit Airdodge Cancel + +// PACMAN---------------------------------------------------------------------------------------------------------------------------- unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -793,7 +879,19 @@ unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind } } -// Colorless Attack Dash Cancel on Hit +unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + + +// PALUTENA---------------------------------------------------------------------------------------------------------------------------- // This is unique to Kirby due to only having access to colorless attack. unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { @@ -803,14 +901,40 @@ unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, st } } -// Dark Pit's Bow Land Cancel -unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ - if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { +// PEACH---------------------------------------------------------------------------------------------------------------------------- +// PFUSHIGISOU---------------------------------------------------------------------------------------------------------------------------- +// PICHU---------------------------------------------------------------------------------------------------------------------------- +// PICKEL---------------------------------------------------------------------------------------------------------------------------- +// handles kirby's mining behavior when copying steve +unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { + if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { + VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); + } + + // wait 2 frames before letting the material table advance, preventing any jumps in entries + if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { + if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { + VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); + } else { + VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); + } + } + } +} + + +// PIKACHU---------------------------------------------------------------------------------------------------------------------------- +// PIKMIN---------------------------------------------------------------------------------------------------------------------------- +// PIT---------------------------------------------------------------------------------------------------------------------------- +// PITB---------------------------------------------------------------------------------------------------------------------------- +unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ + if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); } @@ -819,7 +943,8 @@ unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, s } } -// Flamethrower Land Cancel + +// PLIZARDON---------------------------------------------------------------------------------------------------------------------------- unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { let prev_situation = StatusModule::prev_situation_kind(boma); if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { @@ -833,50 +958,60 @@ unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_k } } -// Metal Blade Airdodge Cancel -unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { - if boma.status_frame() > 16 { - boma.check_airdodge_cancel(); + +// POPO---------------------------------------------------------------------------------------------------------------------------- +// PURIN---------------------------------------------------------------------------------------------------------------------------- +// PZENIGAME---------------------------------------------------------------------------------------------------------------------------- +unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { + //PM-like neutral-b canceling + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); } } -} - -// Simon's Axe Drift -unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + if boma.is_cat_flag(Cat1::AirEscape) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } } } } -// Toon Link's Bow Drift -unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { + +// REFLET---------------------------------------------------------------------------------------------------------------------------- +unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); } } } } -// Young Link's Bow Drift -unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } + +// RICHTER---------------------------------------------------------------------------------------------------------------------------- +// RIDLEY---------------------------------------------------------------------------------------------------------------------------- +// ROBOT---------------------------------------------------------------------------------------------------------------------------- +// ROCKMAN---------------------------------------------------------------------------------------------------------------------------- +unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { + if boma.status_frame() > 16 { + boma.check_airdodge_cancel(); } } } -// PM-like neutral-b canceling -// Samus & Dark Samus + +// ROSETTA---------------------------------------------------------------------------------------------------------------------------- +// ROY---------------------------------------------------------------------------------------------------------------------------- +// RYU---------------------------------------------------------------------------------------------------------------------------- +// SAMUS & SAMUSD---------------------------------------------------------------------------------------------------------------------------- unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { if situation_kind == *SITUATION_KIND_AIR { @@ -887,19 +1022,8 @@ unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_k } } -// Robin -unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} -// Sheik +// SHEIK---------------------------------------------------------------------------------------------------------------------------- unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { if situation_kind == *SITUATION_KIND_AIR { @@ -910,344 +1034,299 @@ unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut Batt } } -// Mewtwo -unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { + +// SHULK---------------------------------------------------------------------------------------------------------------------------- +// SIMON---------------------------------------------------------------------------------------------------------------------------- +unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - if MotionModule::is_end(boma) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } } -// Squirtle -unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { - //PM-like neutral-b canceling - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { + +// SNAKE---------------------------------------------------------------------------------------------------------------------------- +// SONIC---------------------------------------------------------------------------------------------------------------------------- +// SZEROSUIT---------------------------------------------------------------------------------------------------------------------------- +// TANTAN---------------------------------------------------------------------------------------------------------------------------- +// TOONLINK---------------------------------------------------------------------------------------------------------------------------- +unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { if situation_kind == *SITUATION_KIND_AIR { - if boma.is_cat_flag(Cat1::AirEscape) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } } -// Lucario -unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { - if boma.is_cat_flag(Cat2::CommonGuard) { - if situation_kind == *SITUATION_KIND_AIR { - if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - else { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } + +// TRAIL---------------------------------------------------------------------------------------------------------------------------- +unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + // Firaga Airdodge Cancel + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { + if frame > 2.0 { + boma.check_airdodge_cancel(); } - }***/ - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } + } + // Thundaga Land Cancel + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) + { + let special_n_fire_cancel_frame_ground = 69.0; + let landing_lag = 12.0; + if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); } } } -// WiiFit Trainer -unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } +// cycles Kirby to firaga after copying Sora +unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if fighter.is_motion(Hash40::new("special_n_drink")) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { + let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); + let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; + if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE + && frame > 3.0 { + WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); + FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder + } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER + && frame > 4.0 { + FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire } } } -// Pac-Man -unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } + +// WARIO---------------------------------------------------------------------------------------------------------------------------- +unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { + if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { + boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); } } -} - -// Mii Gunner -unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { + if frame < 7.0 { + if facing * stick_x < 0.0 { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } } } } -// Byleth -unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { + +// WIIFIT---------------------------------------------------------------------------------------------------------------------------- +unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); } } } } -// Lucas -unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { - // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // - let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); - let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); - let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); - } - else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { - // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // - let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; - EffectModule::kill(fighter.module_accessor, handle, false, false); - let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; - EffectModule::kill(fighter.module_accessor, handle2, false, false); - let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; - EffectModule::kill(fighter.module_accessor, handle3, false, false); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); - } -} -pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { - if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] - ) { - //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); - if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } +// WOLF---------------------------------------------------------------------------------------------------------------------------- +unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { + if frame > 17.0 { + boma.check_airdodge_cancel(); } - else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, - *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF - ) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } } - } + } } -// Piranha Plant Ptooie Stance -pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { - let opponent_boma = fighter.get_grabbed_opponent_boma(); - let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); - if grabbed_fighter == *FIGHTER_KIND_PACKUN { - let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); - if new_stance != old_stance { - // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); - VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); + +// YOSHI---------------------------------------------------------------------------------------------------------------------------- +// YOUNGLINK---------------------------------------------------------------------------------------------------------------------------- +unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } } -unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { - if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); - } - else { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); - } -} -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); + +// ZELDA---------------------------------------------------------------------------------------------------------------------------- +unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND { + if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { + //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); + } } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); + else if situation_kind == *SITUATION_KIND_AIR { + if frame >= 31.0 { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } } } -// Lucas Reset Gimmicks -unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} pub unsafe fn copymoveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { // Common magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); fastfall_copyspecials(fighter); - - // Fox Drift and Laser Land Cancel - fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Falco Drift and Laser Land Cancel - falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Water Shuriken Max Dash Cancel - max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cancels - magic_cancels(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cycle Adjustment - trail_magic_cycle(fighter, boma, frame); - - // Steve Mining - pickel_mining(fighter, boma); - - // Bite Early Throw and Turnaround - bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); - - // Chef Drift and Land Cancel - chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Nayru's Love Drift and Fast Fall - nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); - - // Hero Dash Cancel Frizz - dash_cancel_frizz(fighter); - - // Wolf Drift and Laser Airdodge Cancel - wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Bullet Arts Mechanics + // BAYONETTA bayo_nspecial_mechanics(fighter, boma); - - // Falcon Punch Turnarounds - repeated_falcon_punch_turnaround(fighter); - - //Blue Eggs Land Cancel + // BRAVE + dash_cancel_frizz(fighter); + brave_nspecial_cancels(fighter); + // BUDDY blue_eggs_land_cancels(fighter); - - // Peanut Popgun Airdodge Cancel + // CAPTAIN + repeated_falcon_punch_turnaround(fighter); + // CHROM + // CLOUD + // DAISY + // DEDEDE + // DEMON + // DIDDY peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); - - // Darkest Lariat Ledge Slipoff + diddy_nspecial_cancels(fighter, boma, status_kind); + // DOLLY + // DONKEY + donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); + // DUCKHUNT + // EDGE + edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); + // EFLAME + // ELIGHT + // FALCO + falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); + // FOX + fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); + // GAMEWATCH + chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); + // GANON + // GAOGAEN lariat_ledge_slipoff(fighter); - - // Bowser Flame Land Cancel + // GEKKOUGA + max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); + // IKE + // INKLING + // JACK + // KAMUI + // KEN + ken_air_hado_distinguish(fighter, boma, frame); + // KOOPA koopa_flame_cancel(boma, status_kind, situation_kind, frame); - - //Bowser Fireball Cooldown koopa_fireball_cooldown(boma, status_kind); - - // Clown Cannon Shield Cancel + // KOOPAJR clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); - - // Link's Bow Drift + // KROOL + // LINK bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Bonus Fruit Airdodge Cancel + // LITTLEMAC + // LUCARIO + lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); + // LUCAS + lucas_offense_charge(fighter, boma, situation_kind, status_kind); + lucas_offense_effct_handler(fighter); + // LUCINA + // LUIGI + // MARIO + // MARIOD + // MARTH + // MASTER + master_nspecial_cancels(boma, status_kind, situation_kind); + // METAKINGHT + // MEWTWO + mewtwo_nspecial_cancels(boma, status_kind, situation_kind); + // MIIFIGHTER + // MIIGUNNER + miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); + // MIISWORDSMAN + // MURABITO + // NANA + // NESS + // PACKUN + packun_ptooie_stance(fighter, boma, status_kind); + packun_ptooie_scale(boma); + // PACMAN + pacman_nspecial_cancels(boma, status_kind, situation_kind); bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Colorless Attack Dash Cancel on Hit + // PALUTENA colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Dark Pit's Bow Land Cancel + // PEACH + // PFUSHIGISOU + // PICHU + // PICKEL + pickel_mining(fighter, boma); + // PIKACHU + // PIKMIN + // PIT + // PITB pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); - - // Flamethower Land Cancel + // PLIZARDON plizardon_flame_cancel(boma, status_kind, situation_kind, frame); - - // Metal Blade Airdodge Cancel + // POPO + // PURIN + // PZENIGAME + pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); + // REFLET + reflet_nspecial_cancels(boma, status_kind, situation_kind); + // RICHTER + // RIDLEY + // ROBOT + // ROCKMAN blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Simon's Axe Drift - axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Toon Link's Bow Drift - heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Young Link's Bow Fastfall - fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); - - // Lucas Reset Gimmicks - reset_flags(fighter, boma, status_kind, situation_kind); - - // Lucas Offense Up - lucas_offense_charge(fighter, boma, situation_kind); - lucas_offense_effct_handler(fighter); - - // Piranha Plant Ptooie Stance - packun_ptooie_stance(fighter, boma, status_kind); - packun_ptooie_scale(boma); - - // PM-like Neutral B Cancels - donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); + // ROSETTA + // ROY + // RYU + // SAMUS & SAMUSD samus_nspecial_cancels(boma, status_kind, situation_kind); - reflet_nspecial_cancels(boma, status_kind, situation_kind); + // SHEIK sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); - mewtwo_nspecial_cancels(boma, status_kind, situation_kind); - pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); - diddy_nspecial_cancels(fighter, boma, status_kind); - lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); + // SHIZUE + // SHULK + // SIMON + axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); + // SNAKE + // SONIC + // SZEROSUIT + // TANTAN + // TOONLINK + heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); + // TRAIL + magic_cancels(boma, status_kind, situation_kind, cat[0], frame); + trail_magic_cycle(fighter, boma, frame); + // WARIO + bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); + // WIIFIT wiifit_nspecial_cancels(boma, status_kind, situation_kind); - pacman_nspecial_cancels(boma, status_kind, situation_kind); - brave_nspecial_cancels(fighter); - edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); - master_nspecial_cancels(boma, status_kind, situation_kind); - ken_air_hado_distinguish(fighter, boma, frame); + // WOLF + wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); + // YOSHI + // YOUNGLINK + fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); + // ZELDA + nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); } pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index bd4e570334..e4982205d0 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -44,8 +44,10 @@ pub const KOOPA_MAX_COOLDOWN : i32 = 900; pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { - acmd::install(); - copyability::install(); - status::install(); + let agent = &mut Agent::new("kirby"); + acmd::install(agent); + copyability::install(agent); + status::install(agent); opff::install(); + agent.install(); } diff --git a/fighters/kirby/src/status.rs b/fighters/kirby/src/status.rs index e968188827..6c893a2460 100644 --- a/fighters/kirby/src/status.rs +++ b/fighters/kirby/src/status.rs @@ -245,21 +245,21 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { } } -pub fn install() { - special_hi_h::install(); - gaogaen_special_n::install(); - luigi_special_n::install(); - mario_special_n::install(); - mariod_special_n::install(); - ridley_special_n::install(); - ganon_special_n::install(); - ganon_special_n_float::install(); - koopa_special_n::install(); - littlemac_special_n::install(); - diddy_special_n_cancel::install(); - lucas_special_n::install(); - sonic::install(); - edge_special_n::install(); +pub fn install(agent: &mut Agent) { + special_hi_h::install(agent); + gaogaen_special_n::install(agent); + luigi_special_n::install(agent); + mario_special_n::install(agent); + mariod_special_n::install(agent); + ridley_special_n::install(agent); + ganon_special_n::install(agent); + ganon_special_n_float::install(agent); + koopa_special_n::install(agent); + littlemac_special_n::install(agent); + diddy_special_n_cancel::install(agent); + lucas_special_n::install(agent); + sonic_special_n::install(agent); + edge_special_n::install(agent); smashline::Agent::new("kirby") .on_start(kirby_init) diff --git a/fighters/kirby/src/status/diddy_special_n_cancel.rs b/fighters/kirby/src/status/diddy_special_n_cancel.rs index 5a8e81534a..a4e95dc149 100644 --- a/fighters/kirby/src/status/diddy_special_n_cancel.rs +++ b/fighters/kirby/src/status/diddy_special_n_cancel.rs @@ -180,47 +180,13 @@ unsafe extern "C" fn special_n_jump_cancel_end(fighter: &mut L2CFighterCommon) - return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, - special_n_main, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Pre, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_pre, - ) - .status( - Main, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_main, - ) - .status( - End, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL, - special_n_cancel_end, - ) - .status( - Pre, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_pre, - ) - .status( - Main, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_main, - ) - .status( - End, - statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, - special_n_jump_cancel_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, special_n_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, special_n_charge_main,); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_pre,); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_main,); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_end,); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre,); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main,); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end,); } diff --git a/fighters/kirby/src/status/edge_special_n.rs b/fighters/kirby/src/status/edge_special_n.rs index 4e256cb514..bc0e3b06e3 100644 --- a/fighters/kirby/src/status/edge_special_n.rs +++ b/fighters/kirby/src/status/edge_special_n.rs @@ -101,8 +101,6 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par } } -pub fn install() { - smashline::Agent::new("kirby") - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/kirby/src/status/ganon_special_n.rs b/fighters/kirby/src/status/ganon_special_n.rs index cab36e4722..5847337b5d 100644 --- a/fighters/kirby/src/status/ganon_special_n.rs +++ b/fighters/kirby/src/status/ganon_special_n.rs @@ -169,32 +169,10 @@ unsafe extern "C" fn special_n_exec(_fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_pre, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_main, - ) - .status( - End, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_end, - ) - .status( - Init, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_init, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, - special_n_exec, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_pre,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_main,); + agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_end,); + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_init,); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_exec,); } diff --git a/fighters/kirby/src/status/ganon_special_n_float.rs b/fighters/kirby/src/status/ganon_special_n_float.rs index 2e80fc93e3..9bc2b63ce4 100644 --- a/fighters/kirby/src/status/ganon_special_n_float.rs +++ b/fighters/kirby/src/status/ganon_special_n_float.rs @@ -133,22 +133,8 @@ unsafe extern "C" fn special_n_float_end(_fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_pre, - ) - .status( - Main, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_main, - ) - .status( - End, - statuses::kirby::GANON_SPECIAL_N_FLOAT, - special_n_float_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_pre,); + agent.status(Main, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_main,); + agent.status(End, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_end,); } diff --git a/fighters/kirby/src/status/gaogaen_special_n.rs b/fighters/kirby/src/status/gaogaen_special_n.rs index e7f5b7d0b8..a9d4982277 100644 --- a/fighters/kirby/src/status/gaogaen_special_n.rs +++ b/fighters/kirby/src/status/gaogaen_special_n.rs @@ -48,17 +48,7 @@ pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CVa return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - special_n_pre, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, - special_n_exec, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_pre,); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_exec,); } diff --git a/fighters/kirby/src/status/koopa_special_n.rs b/fighters/kirby/src/status/koopa_special_n.rs index 4be0b073d2..4adb4e6aec 100644 --- a/fighters/kirby/src/status/koopa_special_n.rs +++ b/fighters/kirby/src/status/koopa_special_n.rs @@ -81,22 +81,8 @@ unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CVa } } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - special_n_main, - ) - .status( - Exec, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - special_n_exec, - ) - .status( - ExecStop, - *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, - special_n_execstop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_main,); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_exec,); + agent.status(ExecStop, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_execstop,); } diff --git a/fighters/kirby/src/status/littlemac_special_n.rs b/fighters/kirby/src/status/littlemac_special_n.rs index 4a4559abe8..41bded8181 100644 --- a/fighters/kirby/src/status/littlemac_special_n.rs +++ b/fighters/kirby/src/status/littlemac_special_n.rs @@ -139,10 +139,8 @@ unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_pre) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_main) - .status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_main); + agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, special_n_end); } \ No newline at end of file diff --git a/fighters/kirby/src/status/lucas_special_n.rs b/fighters/kirby/src/status/lucas_special_n.rs index a1b25e0889..2051e2bfd8 100644 --- a/fighters/kirby/src/status/lucas_special_n.rs +++ b/fighters/kirby/src/status/lucas_special_n.rs @@ -185,17 +185,7 @@ unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( fighter.on_flag(flag_work_id); } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, - lucas_special_n_pre, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, - lucas_special_n_hold_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, lucas_special_n_pre,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, lucas_special_n_hold_main,); } diff --git a/fighters/kirby/src/status/luigi_special_n.rs b/fighters/kirby/src/status/luigi_special_n.rs index 7ef435a619..30f6a1bf9a 100644 --- a/fighters/kirby/src/status/luigi_special_n.rs +++ b/fighters/kirby/src/status/luigi_special_n.rs @@ -56,12 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, special_n_main,); } diff --git a/fighters/kirby/src/status/mario_special_n.rs b/fighters/kirby/src/status/mario_special_n.rs index 90ca697826..21dcb57efa 100644 --- a/fighters/kirby/src/status/mario_special_n.rs +++ b/fighters/kirby/src/status/mario_special_n.rs @@ -56,12 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, special_n_main,); } diff --git a/fighters/kirby/src/status/mariod_special_n.rs b/fighters/kirby/src/status/mariod_special_n.rs index 6282018850..30ae8016fc 100644 --- a/fighters/kirby/src/status/mariod_special_n.rs +++ b/fighters/kirby/src/status/mariod_special_n.rs @@ -56,12 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, - special_n_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, special_n_main,); } diff --git a/fighters/kirby/src/status/ridley_special_n.rs b/fighters/kirby/src/status/ridley_special_n.rs index 7a6e68de3e..66478acafe 100644 --- a/fighters/kirby/src/status/ridley_special_n.rs +++ b/fighters/kirby/src/status/ridley_special_n.rs @@ -132,17 +132,7 @@ unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) } } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, - special_n_shoot_status_main, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, special_n_charge_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, special_n_shoot_status_main,); + } diff --git a/fighters/kirby/src/status/sonic_special_nrs b/fighters/kirby/src/status/sonic_special_n.rs similarity index 93% rename from fighters/kirby/src/status/sonic_special_nrs rename to fighters/kirby/src/status/sonic_special_n.rs index 6b0911abe5..18967dcbec 100644 --- a/fighters/kirby/src/status/sonic_special_nrs +++ b/fighters/kirby/src/status/sonic_special_n.rs @@ -102,17 +102,7 @@ pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterComm ret } -pub fn install() { - smashline::Agent::new("kirby") - .status( - Main, - *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, - special_n_main, - ) - .status( - Pre, - *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, - special_n_homing_start_pre, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, special_n_main,); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, special_n_homing_start_pre,); } diff --git a/fighters/kirby/src/status/special_hi_h.rs b/fighters/kirby/src/status/special_hi_h.rs index 50382ce11c..16b7bdf083 100644 --- a/fighters/kirby/src/status/special_hi_h.rs +++ b/fighters/kirby/src/status/special_hi_h.rs @@ -67,10 +67,8 @@ unsafe extern "C" fn special_hi_h_end(fighter: &mut L2CFighterCommon) -> L2CValu return 0.into() } -pub fn install() { - Agent::new("kirby") - .status(Pre, statuses::kirby::SPECIAL_HI_H, special_hi_h_pre) - .status(Main, statuses::kirby::SPECIAL_HI_H, special_hi_h_main) - .status(End, statuses::kirby::SPECIAL_HI_H, special_hi_h_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::kirby::SPECIAL_HI_H, special_hi_h_pre); + agent.status(Main, statuses::kirby::SPECIAL_HI_H, special_hi_h_main); + agent.status(End, statuses::kirby::SPECIAL_HI_H, special_hi_h_end); } From f52aac9277f497c76cd3b768ecd0b9f629942b67 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 14:14:42 -0500 Subject: [PATCH 038/172] isabelle --- fighters/shizue/src/acmd/aerials.rs | 209 ++++---- fighters/shizue/src/acmd/ground.rs | 3 +- fighters/shizue/src/acmd/mod.rs | 16 +- fighters/shizue/src/acmd/other.rs | 215 ++++----- fighters/shizue/src/acmd/smashes.rs | 189 +++----- fighters/shizue/src/acmd/specials.rs | 452 ++++++++---------- fighters/shizue/src/acmd/throws.rs | 93 ++-- fighters/shizue/src/acmd/tilts.rs | 117 +++-- fighters/shizue/src/bullet/acmd/aerials.rs | 22 + fighters/shizue/src/bullet/acmd/mod.rs | 7 + fighters/shizue/src/bullet/mod.rs | 9 + fighters/shizue/src/clayrocket/acmd/mod.rs | 7 + .../shizue/src/clayrocket/acmd/specials.rs | 47 ++ fighters/shizue/src/clayrocket/mod.rs | 13 + fighters/shizue/src/clayrocket/opff.rs | 56 +++ fighters/shizue/src/clayrocket/status/mod.rs | 8 + .../status/ready.rs} | 16 +- fighters/shizue/src/fishingrod/acmd/mod.rs | 7 + .../shizue/src/fishingrod/acmd/specials.rs | 18 + fighters/shizue/src/fishingrod/mod.rs | 11 + fighters/shizue/src/fishingrod/opff.rs | 23 + fighters/shizue/src/lib.rs | 32 +- fighters/shizue/src/opff.rs | 84 +--- fighters/shizue/src/status.rs | 9 +- fighters/shizue/src/status/special_hi.rs | 14 +- fighters/shizue/src/trafficsign/acmd/mod.rs | 7 + .../shizue/src/trafficsign/acmd/smashes.rs | 33 ++ fighters/shizue/src/trafficsign/mod.rs | 9 + 28 files changed, 886 insertions(+), 840 deletions(-) create mode 100644 fighters/shizue/src/bullet/acmd/aerials.rs create mode 100644 fighters/shizue/src/bullet/acmd/mod.rs create mode 100644 fighters/shizue/src/bullet/mod.rs create mode 100644 fighters/shizue/src/clayrocket/acmd/mod.rs create mode 100644 fighters/shizue/src/clayrocket/acmd/specials.rs create mode 100644 fighters/shizue/src/clayrocket/mod.rs create mode 100644 fighters/shizue/src/clayrocket/opff.rs create mode 100644 fighters/shizue/src/clayrocket/status/mod.rs rename fighters/shizue/src/{status/clayrocket.rs => clayrocket/status/ready.rs} (86%) create mode 100644 fighters/shizue/src/fishingrod/acmd/mod.rs create mode 100644 fighters/shizue/src/fishingrod/acmd/specials.rs create mode 100644 fighters/shizue/src/fishingrod/mod.rs create mode 100644 fighters/shizue/src/fishingrod/opff.rs create mode 100644 fighters/shizue/src/trafficsign/acmd/mod.rs create mode 100644 fighters/shizue/src/trafficsign/acmd/smashes.rs create mode 100644 fighters/shizue/src/trafficsign/mod.rs diff --git a/fighters/shizue/src/acmd/aerials.rs b/fighters/shizue/src/acmd/aerials.rs index 51a1791f60..17435bfaff 100644 --- a/fighters/shizue/src/acmd/aerials.rs +++ b/fighters/shizue/src/acmd/aerials.rs @@ -1,211 +1,208 @@ - use super::*; -unsafe extern "C" fn shizue_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_INSTANCE_WORK_ID_FLAG_POMPON_LEFT); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, false, 0); WorkModule::on_flag(boma, *FIGHTER_SHIZUE_INSTANCE_WORK_ID_FLAG_POMPON_RIGHT); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, smash::phx::Hash40::new("attack"), false, 0.0); - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 11.0, 50, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 85, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_POMPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn shizue_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 9.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 19.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 16.0, 19.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handl"), 8.0, 74, 54, 0, 73, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 30.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 30.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn shizue_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 6.5, 6.5, 3, 0, -20, 90, 0.65, false); - LAST_EFFECT_SET_COLOR(fighter, 0.4, 10.0, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 6.5, 6.5, 3, 0, -20, 90, 0.65, false); + LAST_EFFECT_SET_COLOR(agent, 0.4, 10.0, 0.4); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("shizue_grass"), Hash40::new("top"), 1, 0.4, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("shizue_grass"), Hash40::new("top"), 1, 0.4, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } } -unsafe extern "C" fn shizue_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_shizue_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_shizue_attackhard_l01")); } } -unsafe extern "C" fn shizue_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn shizue_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_SLINGSHOT, true, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn shizue_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 85, 85, 0, 54, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 3.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 4.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 70, 54, 0, 60, 3.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn shizue_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.769); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 270, 80, 0, 25, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 270, 80, 0, 25, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 270, 50, 0, 10, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 270, 50, 0, 10, 6.5, 0.0, -5.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 30, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 30, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 4.5, 0.0, -4.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 4.5, 0.0, -4.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 60, 75, 0, 60, 3.0, 0.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attackairn", shizue_attack_air_n_game) - .acmd("game_attackairf", shizue_attack_air_f_game) - .acmd("effect_attackairf", shizue_attack_air_f_effect) - .acmd("sound_attackairf", shizue_attack_air_f_sound) - .acmd("expression_attackairf", shizue_attack_air_f_expression) - .acmd("game_attackairb", shizue_attack_air_b_game) - .acmd("game_attackairhi", shizue_attack_air_hi_game) - .acmd("game_attackairlw", shizue_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/shizue/src/acmd/ground.rs b/fighters/shizue/src/acmd/ground.rs index 51d08b427d..3370df1a53 100644 --- a/fighters/shizue/src/acmd/ground.rs +++ b/fighters/shizue/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/shizue/src/acmd/mod.rs b/fighters/shizue/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/shizue/src/acmd/mod.rs +++ b/fighters/shizue/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/shizue/src/acmd/other.rs b/fighters/shizue/src/acmd/other.rs index e79fffb271..661f963414 100644 --- a/fighters/shizue/src/acmd/other.rs +++ b/fighters/shizue/src/acmd/other.rs @@ -1,214 +1,173 @@ - use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_shizue_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_shizue_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn shizue_fishingrod_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 13.0/(21.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(14.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(14.0 - 1.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 2.5, 0.0, 5.5, 1.5, Some(0.0), Some(5.5), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 2.5, 0.0, 5.5, 1.5, Some(0.0), Some(5.5), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BUTTERFLYNET, app::ArticleOperationTarget(0)); } } -unsafe extern "C" fn catchturn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(17.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(17.0 - 1.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 2.0, 0.0, 5.5, -2.5, Some(0.0), Some(5.5), Some(-16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 2.0, 0.0, 5.5, -2.5, Some(0.0), Some(5.5), Some(-16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_TURN); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_TURN); } } -unsafe extern "C" fn catchdash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(16.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(16.0 - 1.0)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 2.0, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 2.0, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_A); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_DASH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH_DASH); } } -unsafe extern "C" fn shootb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(fighter.module_accessor); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 78, 0, 14, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 72, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -pub fn install() { - smashline::Agent::new("shizue_fishingrod") - .acmd("game_start", shizue_fishingrod_start_game) - .install(); - smashline::Agent::new("shizue_bullet") - .acmd("game_shootb", shootb_game) - .install(); - smashline::Agent::new("shizue") - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_catch", catch_game) - .acmd("game_catchturn", catchturn_game) - .acmd("game_catchdash", catchdash_game) - .install(); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_catchdash", game_catchdash); } diff --git a/fighters/shizue/src/acmd/smashes.rs b/fighters/shizue/src/acmd/smashes.rs index 1195a297dd..27d10804e2 100644 --- a/fighters/shizue/src/acmd/smashes.rs +++ b/fighters/shizue/src/acmd/smashes.rs @@ -1,173 +1,138 @@ - use super::*; -unsafe extern "C" fn shizue_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, smash::phx::Hash40::new("fire"), false, 13.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 108, 0, 25, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 5.5, 0.0, 5.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 113, 0, 40, 7.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_CRACKER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - -} - -unsafe extern "C" fn shizue_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 0.0); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); - } - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 5.0); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 5.0, 0.0, 3.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 4.5, 0.0, 3.6, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 5.0, 0.0, 3.6, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 4.5, 0.0, 3.6, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 56.0); - if is_excute(fighter) { - ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } -unsafe extern "C" fn shizue_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_TRAFFICSIGN, true, 0); ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_TRAFFICSIGN, Hash40::new("attack"), true, 0.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 5.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 100, 100, 70, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 5.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 100, 100, 70, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 100, 100, 60, 0, 4.5, 0.0, 4.0, 6.5, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 10.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 10.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } wait(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 18.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 4.5, 0.0, 4.0, 6.5, 0.0, 18.0, 6.5, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 20.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } } -unsafe extern "C" fn shizue_trafficsign_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.458); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 0.0); } - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.85); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME) ); + } + } + frame(lua_state, 5.0); + if is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, smash::phx::Hash40::new("attack"), false, 5.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("trafficsign"), 14.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 5.0, 0.0, 3.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 99, 0, 35, 4.5, 0.0, 3.6, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("trafficsign"), 12.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 5.0, 0.0, 3.6, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 28, 114, 0, 40, 4.5, 0.0, 3.6, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.9); + if is_excute(agent) { AttackModule::clear_all(boma); } + frame(lua_state, 56.0); + if is_excute(agent) { + ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BUCKET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } - -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attacks4", shizue_attack_s4_s_game) - .acmd("game_attacklw4", shizue_attack_lw4_game) - .acmd("game_attackhi4", shizue_attack_hi4_game) - .install(); - smashline::Agent::new("shizue_trafficsign") - .acmd("game_attack", shizue_trafficsign_attack_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/shizue/src/acmd/specials.rs b/fighters/shizue/src/acmd/specials.rs index f0c0762422..b4faa446bb 100644 --- a/fighters/shizue/src/acmd/specials.rs +++ b/fighters/shizue/src/acmd/specials.rs @@ -1,445 +1,373 @@ - use super::*; -unsafe extern "C" fn shizue_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_N_FLAG_SEARCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::inc_int(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_N_INT_TAKEOUT_REQUEST); } } -unsafe extern "C" fn shizue_special_n_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } - -} - -unsafe extern "C" fn shizue_special_n_failure_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } } -unsafe extern "C" fn shizue_special_air_n_failure_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 3.5, 0.0, 6.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 69, 90, 0, 70, 2.0, 0.0, 6.0, 6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); - } + if is_excute(agent) { + EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } - } -unsafe extern "C" fn shizue_special_n_failure_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - } -} - -unsafe extern "C" fn shizue_special_air_hi_detach_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::common::instance::UP_SPECIAL_CANCEL); - StatusModule::change_status_request_from_script(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL, true); - if VarModule::is_flag(fighter.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE) { - VarModule::off_flag(fighter.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE); - WorkModule::set_float(fighter.module_accessor, VarModule::get_float(fighter.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); - } - } -} - -unsafe extern "C" fn shizue_special_lw_set_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 0.9); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_LW_FLAG_SET); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } - } -unsafe extern "C" fn shizue_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 11.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_FISHINGROD, false, 0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); JostleModule::set_push_speed_x(boma, 0.8, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x_overlap_rate(boma, 10.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 4.0); JostleModule::set_push_speed_x(boma, 1.6, true); JostleModule::set_push_speed_x_overlap_rate(boma, 20.0); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 13.0, 4.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_S_FLAG_SHOOT); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 16.0, 3.0); JostleModule::set_push_speed_x(boma, 0.01, true); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x(boma, 0.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); } - } -unsafe extern "C" fn shizue_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 13.0/(21.0 - 1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 13.0/(21.0 - 1.0)); } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_FISHINGROD, false, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 4.0); JostleModule::set_push_speed_x(boma, 12.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 12.0); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 16.0, 4.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_S_FLAG_SHOOT); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); JostleModule::set_push_speed_x(boma, 0.0, true); JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); } } -unsafe extern "C" fn shizue_special_s_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 0.65); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 0.65); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_special_air_s_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(-1.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 0.65); + FT_MOTION_RATE(agent, 0.65); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_special_s_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn shizue_special_air_s_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 25, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(1.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn shizue_special_s_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn shizue_special_air_s_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsthrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, 0.5, 0.0)); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 45, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.75, 0.0)); } } -unsafe extern "C" fn shizue_special_s_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //Adjust angle/knockback of throw slightly based on direction held after down throw is determined - let lr = PostureModule::lr(fighter.boma()); - let x_pos= fighter.stick_x(); + let lr = PostureModule::lr(agent.boma()); + let x_pos= agent.stick_x(); let lim = 0.4; if lr == 1.0 { if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } else if lr == -1.0 { if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 30, 0, 140, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 20, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 1.75); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.75); } } -unsafe extern "C" fn shizue_special_air_s_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 100, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 40, 80, 0, 34, 4.0, 0.0, 4.0, 6.0, Some(0.0), Some(4.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { //Adjust angle/knockback of throw slightly based on direction held after down throw is determined - let lr = PostureModule::lr(fighter.boma()); - let x_pos= fighter.stick_x(); + let lr = PostureModule::lr(agent.boma()); + let x_pos= agent.stick_x(); let lim = 0.4; if lr == 1.0 { if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } else if lr == -1.0 { if x_pos < -lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 0, 120, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else if x_pos > lim { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 35, 0, 80, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.75, 0.0)); - FT_MOTION_RATE(fighter, 1.75); + FT_MOTION_RATE(agent, 1.75); } } -unsafe extern "C" fn shizue_clayrocket_ready_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - wait(lua_state, 20.0); - if is_excute(fighter) { - //Should never automatically activate - //SEARCH(fighter, 0, 0, Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); - } - FT_MOTION_RATE(fighter, 0.1); -} - -unsafe extern "C" fn shizue_clayrocket_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.1); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 96, 100, 70, 0, 6.0, 0.0, 0.5, 0.0, Some(0.0), Some(-5.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - FT_MOTION_RATE(fighter, 1.0); - wait(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.9, 89, 10, 0, 70, 6.0, 0.0, 0.5, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn game_specialairhidetach(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::common::instance::UP_SPECIAL_CANCEL); + StatusModule::change_status_request_from_script(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL, true); + if VarModule::is_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE) { + VarModule::off_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE); + WorkModule::set_float(agent.module_accessor, VarModule::get_float(agent.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); + } } } -unsafe extern "C" fn shizue_clayrocket_burst_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwset(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 70, 0, 50, 17.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + JostleModule::set_status(boma, false); + FT_MOTION_RATE(agent, 0.9); } - wait(lua_state, 2.0); + frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_SHIZUE_STATUS_WORK_ID_SPECIAL_LW_FLAG_SET); + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_specialn", shizue_special_n_game) - .acmd("game_specialairn", shizue_special_n_game) - .acmd("game_specialnfailure", shizue_special_n_failure_game) - .acmd("effect_specialnfailure", shizue_special_n_failure_effect) - .acmd("effect_specialairnfailure", shizue_special_n_failure_effect) - .acmd("game_specialairnfailure", shizue_special_air_n_failure_game) - .acmd( - "expression_specialnfailure", - shizue_special_n_failure_expression, - ) - .acmd( - "expression_specialairnfailure", - shizue_special_n_failure_expression, - ) - .acmd("game_specialairhidetach", shizue_special_air_hi_detach_game) - .acmd("game_speciallwset", shizue_special_lw_set_game) - .acmd("game_specialsstart", shizue_special_s_start_game) - .acmd("game_specialairsstart", shizue_special_air_s_start_game) - .acmd("game_specialsthrowb", shizue_special_s_throw_b_game) - .acmd("game_specialairsthrowb", shizue_special_air_s_throw_b_game) - .acmd("game_specialsthrowf", shizue_special_s_throw_f_game) - .acmd("game_specialairsthrowf", shizue_special_air_s_throw_f_game) - .acmd("game_specialsthrowhi", shizue_special_s_throw_hi_game) - .acmd( - "game_specialairsthrowhi", - shizue_special_air_s_throw_hi_game, - ) - .acmd("game_specialsthrowlw", shizue_special_s_throw_lw_game) - .acmd( - "game_specialairsthrowlw", - shizue_special_air_s_throw_lw_game, - ) - .install(); - smashline::Agent::new("shizue_clayrocket") - .acmd("game_ready", shizue_clayrocket_ready_game) - .acmd("game_fly", shizue_clayrocket_fly_game) - .acmd("game_burst", shizue_clayrocket_burst_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialnfailure", game_specialnfailure); + agent.acmd("game_specialairnfailure", game_specialnfailure); + agent.acmd("effect_specialnfailure", effect_specialnfailure); + agent.acmd("effect_specialairnfailure", effect_specialnfailure); + agent acmd("expression_specialnfailure", expression_specialnfailure); + agent.acmd("expression_specialairnfailure", expression_specialnfailure); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialsthrowb", game_specialsthrowb); + agent.acmd("game_specialairsthrowb", game_specialairsthrowb); + + agent.acmd("game_specialsthrowf", game_specialsthrowf); + agent.acmd("game_specialairsthrowf", game_specialairsthrowf); + + agent.acmd("game_specialsthrowhi", game_specialsthrowhi); + agent.acmd("game_specialairsthrowhi", game_specialairsthrowhi); + + agent.acmd("game_specialsthrowlw", game_specialsthrowlw); + agent.acmd("game_specialairsthrowlw", game_specialairsthrowlw); + + agent.acmd("game_specialairhidetach", game_specialairhidetach); + + agent.acmd("game_speciallwset", game_speciallwset); } diff --git a/fighters/shizue/src/acmd/throws.rs b/fighters/shizue/src/acmd/throws.rs index b303ab3302..f4e49b6cfd 100644 --- a/fighters/shizue/src/acmd/throws.rs +++ b/fighters/shizue/src/acmd/throws.rs @@ -1,81 +1,82 @@ use super::*; -unsafe extern "C" fn shizue_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 8); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn shizue_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn shizue_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 94, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 94, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } -unsafe extern "C" fn shizue_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 74, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 74, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_throwf", shizue_throw_f_game) - .acmd("game_throwb", shizue_throw_b_game) - .acmd("game_throwhi", shizue_throw_hi_game) - .acmd("game_throwlw", shizue_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/shizue/src/acmd/tilts.rs b/fighters/shizue/src/acmd/tilts.rs index 63a8a69763..a65c200fa8 100644 --- a/fighters/shizue/src/acmd/tilts.rs +++ b/fighters/shizue/src/acmd/tilts.rs @@ -1,95 +1,92 @@ - use super::*; -unsafe extern "C" fn shizue_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_UMBRELLA, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 4.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 4.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.5, 361, 78, 0, 56, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_UMBRELLA, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn shizue_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, true, 0); + ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, Hash40::new("attack_hi3"), true, 0.0); + } + FT_MOTION_RATE(agent, 0.833); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + FT_MOTION_RATE(agent, 1); + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + FT_MOTION_RATE(agent, 0.842); + frame(lua_state, 54.0); + if is_excute(agent) { + ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_WEEDS, true, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_WEEDS, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 92, 0, 45, 5.0, 0.0, 3.0, 3.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.5, 275, 52, 0, 77, 3.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 92, 0, 45, 5.0, 0.0, 3.0, 3.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.5, 275, 52, 0, 77, 3.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } - } -unsafe extern "C" fn shizue_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, true, 0); - ArticleModule::change_motion(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, Hash40::new("attack_hi3"), true, 0.0); - } - FT_MOTION_RATE(fighter, 0.833); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 82, 86, 0, 62, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - FT_MOTION_RATE(fighter, 1); - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - FT_MOTION_RATE(fighter, 0.842); - frame(lua_state, 54.0); - if is_excute(fighter) { - ArticleModule::remove(boma, *FIGHTER_SHIZUE_GENERATE_ARTICLE_BROOM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); -pub fn install() { - smashline::Agent::new("shizue") - .acmd("game_attacks3", shizue_attack_s3_s_game) - .acmd("game_attacklw3", shizue_attack_lw3_game) - .acmd("game_attackhi3", shizue_attack_hi3_game) - .install(); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/shizue/src/bullet/acmd/aerials.rs b/fighters/shizue/src/bullet/acmd/aerials.rs new file mode 100644 index 0000000000..6d9d63a8cb --- /dev/null +++ b/fighters/shizue/src/bullet/acmd/aerials.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_shootb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(agent.module_accessor); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 78, 0, 14, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 72, 0, 15, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shootb", game_shootb); +} diff --git a/fighters/shizue/src/bullet/acmd/mod.rs b/fighters/shizue/src/bullet/acmd/mod.rs new file mode 100644 index 0000000000..d952ff14d4 --- /dev/null +++ b/fighters/shizue/src/bullet/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod aerials; + +pub fn install(agent: &mut Agent) { + aerials::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/bullet/mod.rs b/fighters/shizue/src/bullet/mod.rs new file mode 100644 index 0000000000..7b20a2e3fa --- /dev/null +++ b/fighters/shizue/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("shizue_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/acmd/mod.rs b/fighters/shizue/src/clayrocket/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/shizue/src/clayrocket/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/acmd/specials.rs b/fighters/shizue/src/clayrocket/acmd/specials.rs new file mode 100644 index 0000000000..e21b77b6ca --- /dev/null +++ b/fighters/shizue/src/clayrocket/acmd/specials.rs @@ -0,0 +1,47 @@ +use super::*; + +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + wait(lua_state, 20.0); + if is_excute(agent) { + //Should never automatically activate + //SEARCH(agent, 0, 0, Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false); + } + FT_MOTION_RATE(agent, 0.1); +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.1); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 96, 100, 70, 0, 6.0, 0.0, 0.5, 0.0, Some(0.0), Some(-5.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + FT_MOTION_RATE(agent, 1.0); + wait(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 89, 10, 0, 70, 6.0, 0.0, 0.5, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_burst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 70, 0, 50, 17.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + + agent.acmd("game_fly", game_fly); + + agent.acmd("game_burst", game_burst); +} diff --git a/fighters/shizue/src/clayrocket/mod.rs b/fighters/shizue/src/clayrocket/mod.rs new file mode 100644 index 0000000000..43449449d0 --- /dev/null +++ b/fighters/shizue/src/clayrocket/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod acmd; +mod opff; +mod status; + +pub fn install() { + let agent = &mut Agent::new("shizue_clayrocket"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/opff.rs b/fighters/shizue/src/clayrocket/opff.rs new file mode 100644 index 0000000000..b8625eb0ce --- /dev/null +++ b/fighters/shizue/src/clayrocket/opff.rs @@ -0,0 +1,56 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +//Lloid explode on hit +unsafe extern "C" fn lloid_callback(weapon : &mut L2CFighterBase) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); + let shizue = utils::util::get_battle_object_from_id(owner_id as u32); + let shizue_boma = &mut *(*shizue).module_accessor; + let status = StatusModule::status_kind(weapon.module_accessor); + if [*WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, + *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_DISAPPEAR].contains(&status) { + VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 0); + } + if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY { + if shizue_boma.is_cat_flag(Cat1::SpecialLw) + && !VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) + && !shizue_boma.is_status(*FIGHTER_SHIZUE_STATUS_KIND_SPECIAL_LW_SET) + && !CancelModule::is_enable_cancel(shizue_boma) + && !shizue_boma.is_status_one_of(&[ + *FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FALL]) { + VarModule::on_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 10); + EFFECT(&mut weapon.agent_base, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } + if VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) { + if VarModule::get_int(shizue, vars::shizue::instance::LLOID_TIMER) > 0 { + VarModule::dec_int(shizue, vars::shizue::instance::LLOID_TIMER); + } + else { + VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); + StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY, true); + } + } + if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY + && (AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) + || AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_SHIELD)) + { + StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lloid_callback); +} diff --git a/fighters/shizue/src/clayrocket/status/mod.rs b/fighters/shizue/src/clayrocket/status/mod.rs new file mode 100644 index 0000000000..8291cb5d30 --- /dev/null +++ b/fighters/shizue/src/clayrocket/status/mod.rs @@ -0,0 +1,8 @@ +use super::*; +use crate::globals::*; + +mod ready; + +pub fn install(agent: &mut Agent) { + ready::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/status/clayrocket.rs b/fighters/shizue/src/clayrocket/status/ready.rs similarity index 86% rename from fighters/shizue/src/status/clayrocket.rs rename to fighters/shizue/src/clayrocket/status/ready.rs index 51565078f0..185f1b4070 100644 --- a/fighters/shizue/src/status/clayrocket.rs +++ b/fighters/shizue/src/clayrocket/status/ready.rs @@ -1,7 +1,9 @@ use super::*; use crate::globals::*; -unsafe extern "C" fn clayrocket_ready_main(weapon: &mut L2CWeaponCommon) -> L2CValue { +// WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY + +unsafe extern "C" fn ready_main(weapon: &mut L2CWeaponCommon) -> L2CValue { MotionModule::change_motion(weapon.module_accessor, Hash40::new("ready"), 0.0, 1.0, false, 0.0, false, false); VisibilityModule::set_int64(weapon.module_accessor, hash40("body") as i64, hash40("body_off") as i64); HitModule::set_status(weapon.module_accessor, 0, app::HitStatus(*HIT_STATUS_NORMAL), 0); @@ -9,7 +11,7 @@ unsafe extern "C" fn clayrocket_ready_main(weapon: &mut L2CWeaponCommon) -> L2CV weapon.fastshift(L2CValue::Ptr(clayrocket_ready_main_loop as *const () as _)) } -unsafe extern "C" fn clayrocket_ready_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { +unsafe extern "C" fn ready_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { let touch_normal = GroundModule::get_touch_normal(weapon.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); let mut ground_angle = (touch_normal.y/touch_normal.x).atan().to_degrees(); ground_angle -= 90.0; @@ -43,12 +45,6 @@ unsafe extern "C" fn clayrocket_ready_main_loop(weapon: &mut L2CWeaponCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("shizue_clayrocket") - .status( - Main, - *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY, - clayrocket_ready_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY, ready_main); } diff --git a/fighters/shizue/src/fishingrod/acmd/mod.rs b/fighters/shizue/src/fishingrod/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/shizue/src/fishingrod/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/fishingrod/acmd/specials.rs b/fighters/shizue/src/fishingrod/acmd/specials.rs new file mode 100644 index 0000000000..94e76f3530 --- /dev/null +++ b/fighters/shizue/src/fishingrod/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 13.0/(21.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); +} diff --git a/fighters/shizue/src/fishingrod/mod.rs b/fighters/shizue/src/fishingrod/mod.rs new file mode 100644 index 0000000000..bfb1feb8dc --- /dev/null +++ b/fighters/shizue/src/fishingrod/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("shizue_fishingrod"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/shizue/src/fishingrod/opff.rs b/fighters/shizue/src/fishingrod/opff.rs new file mode 100644 index 0000000000..d6eb8f3411 --- /dev/null +++ b/fighters/shizue/src/fishingrod/opff.rs @@ -0,0 +1,23 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +//Disable grab on fishingrod when pullingback +unsafe extern "C" fn fishingrod_callback(weapon : &mut L2CFighterBase) { + let object_id = (*weapon.battle_object).battle_object_id; + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); + let activate_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let serial_id = WorkModule::get_int(weapon.module_accessor, 0x10000002); + let kind = utility::get_kind(&mut (*weapon.module_accessor)); + if kind == *WEAPON_KIND_SHIZUE_FISHINGROD { + let status = StatusModule::status_kind(weapon.module_accessor); + if status == *WEAPON_SHIZUE_FISHINGROD_STATUS_KIND_REEL { + WeaponSpecializer_ShizueFishingrod::enable_search(weapon.module_accessor, false); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, fishingrod_callback); +} diff --git a/fighters/shizue/src/lib.rs b/fighters/shizue/src/lib.rs index 6a8505fd1d..dd7a2d6a28 100644 --- a/fighters/shizue/src/lib.rs +++ b/fighters/shizue/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bullet; +mod clayrocket; +mod fishingrod; +mod trafficsign; use smash::{ lib::{ @@ -37,20 +44,17 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn shizue_init(fighter: &mut L2CFighterCommon) { - unsafe { - VarModule::off_flag(fighter.object(), vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(fighter.object(), vars::shizue::instance::LLOID_TIMER, 0); - } -} +#[macro_use] extern crate smash_script; pub fn install() { - smashline::Agent::new("shizue") - .on_start(shizue_init) - .install(); + let agent = &mut Agent::new("shizue"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); - acmd::install(); - status::install(); - opff::install(); + bullet::install(); + clayrocket::install(); + fishingrod::install(); + trafficsign::install(); } diff --git a/fighters/shizue/src/opff.rs b/fighters/shizue/src/opff.rs index 1d7301ad3c..f3de04682d 100644 --- a/fighters/shizue/src/opff.rs +++ b/fighters/shizue/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn fishing_rod_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { @@ -55,58 +54,7 @@ unsafe fn fuel_indicators(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -//Lloid explode on hit -unsafe extern "C" fn lloid_callback(weapon : &mut L2CFighterBase) { - unsafe { - if weapon.kind() != *WEAPON_KIND_SHIZUE_CLAYROCKET { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); - let shizue = utils::util::get_battle_object_from_id(owner_id as u32); - let shizue_boma = &mut *(*shizue).module_accessor; - let status = StatusModule::status_kind(weapon.module_accessor); - if [*WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, - *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_DISAPPEAR].contains(&status) { - VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 0); - } - if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_READY { - if shizue_boma.is_cat_flag(Cat1::SpecialLw) - && !VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) - && !shizue_boma.is_status(*FIGHTER_SHIZUE_STATUS_KIND_SPECIAL_LW_SET) - && !CancelModule::is_enable_cancel(shizue_boma) - && !shizue_boma.is_status_one_of(&[ - *FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FALL]) { - VarModule::on_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - VarModule::set_int(shizue, vars::shizue::instance::LLOID_TIMER, 10); - EFFECT(&mut weapon.agent_base, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } - if VarModule::is_flag(shizue, vars::shizue::instance::LLOID_ASYNC) { - if VarModule::get_int(shizue, vars::shizue::instance::LLOID_TIMER) > 0 { - VarModule::dec_int(shizue, vars::shizue::instance::LLOID_TIMER); - } - else { - VarModule::off_flag(shizue, vars::shizue::instance::LLOID_ASYNC); - StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY, true); - } - } - if status == *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_FLY - && (AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) - || AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_SHIELD)) - { - StatusModule::change_status_request_from_script(weapon.boma(), *WEAPON_SHIZUE_CLAYROCKET_STATUS_KIND_BURST, true); - } - } -} + //Cancel aerials on hit into Balloon Trip unsafe fn balloon_special_cancel(fighter: &mut L2CFighterCommon) { @@ -148,23 +96,6 @@ unsafe fn reel_in(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situa } } } - -//Disable grab on fishingrod when pullingback -unsafe extern "C" fn fishingrod_callback(weapon : &mut L2CFighterBase) { - unsafe { - let object_id = (*weapon.battle_object).battle_object_id; - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER); - let activate_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let serial_id = WorkModule::get_int(weapon.module_accessor, 0x10000002); - let kind = utility::get_kind(&mut (*weapon.module_accessor)); - if kind == *WEAPON_KIND_SHIZUE_FISHINGROD { - let status = StatusModule::status_kind(weapon.module_accessor); - if status == *WEAPON_SHIZUE_FISHINGROD_STATUS_KIND_REEL { - WeaponSpecializer_ShizueFishingrod::enable_search(weapon.module_accessor, false); - } - } - } -} //Lloid Trap Fire Jump Cancel unsafe fn lloid_trap_fire_jc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, stick_x: f32, facing: f32, frame: f32) { @@ -290,16 +221,7 @@ pub unsafe fn shizue_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("shizue") - .on_line(Main, shizue_frame_wrapper) - .install(); - - smashline::Agent::new("shizue_fishingrod") - .on_line(Main, fishingrod_callback) - .install(); - smashline::Agent::new("shizue_clayrocket") - .on_line(Main, lloid_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shizue_frame_wrapper); } diff --git a/fighters/shizue/src/status.rs b/fighters/shizue/src/status.rs index d9ce303ed0..9416853ad9 100644 --- a/fighters/shizue/src/status.rs +++ b/fighters/shizue/src/status.rs @@ -1,9 +1,14 @@ use super::*; mod special_hi; -mod clayrocket; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::off_flag(fighter.object(), vars::shizue::instance::LLOID_ASYNC); + VarModule::set_int(fighter.object(), vars::shizue::instance::LLOID_TIMER, 0); +} pub fn install() { + agent.on_start(on_start); + special_hi::install(); - clayrocket::install(); } diff --git a/fighters/shizue/src/status/special_hi.rs b/fighters/shizue/src/status/special_hi.rs index 9b6292c353..6075bcf4e6 100644 --- a/fighters/shizue/src/status/special_hi.rs +++ b/fighters/shizue/src/status/special_hi.rs @@ -1,18 +1,14 @@ use super::*; -unsafe extern "C" fn shizue_special_hi_detach_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH + +unsafe extern "C" fn special_hi_detach_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let boost = VarModule::is_flag(fighter.object(), vars::shizue::status::IS_DETACH_BOOST); let ret = smashline::original_status(Pre, fighter, *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH)(fighter); VarModule::set_flag(fighter.object(), vars::shizue::status::IS_DETACH_BOOST, boost); ret } -pub fn install() { - smashline::Agent::new("shizue") - .status( - Pre, - *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH, - shizue_special_hi_detach_pre, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MURABITO_STATUS_KIND_SPECIAL_HI_DETACH, special_hi_detach_pre); } diff --git a/fighters/shizue/src/trafficsign/acmd/mod.rs b/fighters/shizue/src/trafficsign/acmd/mod.rs new file mode 100644 index 0000000000..a085c6ce52 --- /dev/null +++ b/fighters/shizue/src/trafficsign/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod smashes; + +pub fn install(agent: &mut Agent) { + smashes::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/trafficsign/acmd/smashes.rs b/fighters/shizue/src/trafficsign/acmd/smashes.rs new file mode 100644 index 0000000000..abec0d6a55 --- /dev/null +++ b/fighters/shizue/src/trafficsign/acmd/smashes.rs @@ -0,0 +1,33 @@ +use super::*; + +unsafe extern "C" fn game_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.458); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.85); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("trafficsign"), 14.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 88, 145, 0, 55, 3.0, 0.0, 3.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("trafficsign"), 12.0, 88, 145, 0, 55, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.9); + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack", game_attack); +} diff --git a/fighters/shizue/src/trafficsign/mod.rs b/fighters/shizue/src/trafficsign/mod.rs new file mode 100644 index 0000000000..3874b2a0bd --- /dev/null +++ b/fighters/shizue/src/trafficsign/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("shizue_trafficsign"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From eddb9556b89e6f1cb532f16a1df7cba6bfe3ae8a Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 21 Mar 2024 14:20:23 -0500 Subject: [PATCH 039/172] isabelle fixes --- fighters/shizue/src/acmd/specials.rs | 2 +- fighters/shizue/src/clayrocket/status/ready.rs | 2 +- fighters/shizue/src/status.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fighters/shizue/src/acmd/specials.rs b/fighters/shizue/src/acmd/specials.rs index b4faa446bb..55b572073d 100644 --- a/fighters/shizue/src/acmd/specials.rs +++ b/fighters/shizue/src/acmd/specials.rs @@ -349,7 +349,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnfailure", game_specialnfailure); agent.acmd("effect_specialnfailure", effect_specialnfailure); agent.acmd("effect_specialairnfailure", effect_specialnfailure); - agent acmd("expression_specialnfailure", expression_specialnfailure); + agent.acmd("expression_specialnfailure", expression_specialnfailure); agent.acmd("expression_specialairnfailure", expression_specialnfailure); agent.acmd("game_specialsstart", game_specialsstart); diff --git a/fighters/shizue/src/clayrocket/status/ready.rs b/fighters/shizue/src/clayrocket/status/ready.rs index 185f1b4070..b9902788c8 100644 --- a/fighters/shizue/src/clayrocket/status/ready.rs +++ b/fighters/shizue/src/clayrocket/status/ready.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn ready_main(weapon: &mut L2CWeaponCommon) -> L2CValue { VisibilityModule::set_int64(weapon.module_accessor, hash40("body") as i64, hash40("body_off") as i64); HitModule::set_status(weapon.module_accessor, 0, app::HitStatus(*HIT_STATUS_NORMAL), 0); HitModule::set_status(weapon.module_accessor, 1, app::HitStatus(*HIT_STATUS_OFF), 0); - weapon.fastshift(L2CValue::Ptr(clayrocket_ready_main_loop as *const () as _)) + weapon.fastshift(L2CValue::Ptr(ready_main_loop as *const () as _)) } unsafe extern "C" fn ready_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { diff --git a/fighters/shizue/src/status.rs b/fighters/shizue/src/status.rs index 9416853ad9..f92bf42a35 100644 --- a/fighters/shizue/src/status.rs +++ b/fighters/shizue/src/status.rs @@ -7,8 +7,8 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.object(), vars::shizue::instance::LLOID_TIMER, 0); } -pub fn install() { +pub fn install(agent: &mut Agent) { agent.on_start(on_start); - special_hi::install(); + special_hi::install(agent); } From ad52bb66da5dd90165d39cb9d65e318787d82e48 Mon Sep 17 00:00:00 2001 From: ethangarsia517 Date: Thu, 21 Mar 2024 15:40:33 -0500 Subject: [PATCH 040/172] latest commits --- fighters/kirby/src/copyability/acmd.rs | 95 +++++++++++++++++++ fighters/kirby/src/copyability/mod.rs | 2 + fighters/kirby/src/copyability/opff.rs | 38 +++----- .../src/status/bayonetta_special_n_cancel.rs | 18 ++-- 4 files changed, 117 insertions(+), 36 deletions(-) diff --git a/fighters/kirby/src/copyability/acmd.rs b/fighters/kirby/src/copyability/acmd.rs index d80beae5f3..0d5a72c7a2 100644 --- a/fighters/kirby/src/copyability/acmd.rs +++ b/fighters/kirby/src/copyability/acmd.rs @@ -1399,6 +1399,95 @@ unsafe extern "C" fn expression_palutenaspecialn(agent: &mut L2CAgentBase) { // PZENIGAME // REFLET // RICHTER +unsafe extern "C" fn effect_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn effect_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + + // RIDLEY unsafe extern "C" fn game_ridleyspecialnexplode(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; @@ -1934,6 +2023,12 @@ pub fn install(agent: &mut Agent) { // PZENIGAME // REFLET // RICHTER + agent.acmd("effect_richterspecialn", effect_richterspecialn); + agent.acmd("sound_richterspecialn", sound_richterspecialn); + agent.acmd("expression_richterspecialn", expression_richterspecialn); + agent.acmd("effect_richterspecialairn", effect_richterspecialairn); + agent.acmd("sound_richterspecialairn", sound_richterspecialairn); + agent.acmd("expression_richterspecialairn", expression_richterspecialairn); // RIDLEY agent.acmd("game_ridleyspecialnexplode", game_ridleyspecialnexplode); agent.acmd( diff --git a/fighters/kirby/src/copyability/mod.rs b/fighters/kirby/src/copyability/mod.rs index a9595c506f..6ca163ba2b 100644 --- a/fighters/kirby/src/copyability/mod.rs +++ b/fighters/kirby/src/copyability/mod.rs @@ -4,6 +4,8 @@ mod acmd; mod opff; pub fn install(agent: &mut Agent) { + let agent = &mut Agent::new("kirby"); acmd::install(agent); opff::install(); + agent.install(); } \ No newline at end of file diff --git a/fighters/kirby/src/copyability/opff.rs b/fighters/kirby/src/copyability/opff.rs index d07174a998..a521da1bfa 100644 --- a/fighters/kirby/src/copyability/opff.rs +++ b/fighters/kirby/src/copyability/opff.rs @@ -295,31 +295,6 @@ unsafe fn fastfall_copyspecials(fighter: &mut L2CFighterCommon) { // End of Common // BAYONETTA---------------------------------------------------------------------------------------------------------------------------- -unsafe fn bayo_nspecial_mechanics(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE) { //PM-like neutral-b canceling - if fighter.is_situation(*SITUATION_KIND_AIR) { - if fighter.is_cat_flag(Cat1::AirEscape) { - ControlModule::reset_trigger(boma); - StatusModule::change_status_force(boma, *FIGHTER_STATUS_KIND_FALL, true); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - }//drift - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - sv_kinetic_energy!(controller_set_accel_x_mul, fighter, 0.04); - sv_kinetic_energy!(controller_set_accel_x_add, fighter, 0.005); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.4, 0.0); - } else { //platdrop - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - if fighter.global_table[STICK_Y].get_f32() <= WorkModule::get_param_float(boma, hash40("common"), hash40("pass_stick_y")) - && fighter.global_table[FLICK_Y].get_i32() < WorkModule::get_param_int(boma, hash40("common"), hash40("pass_flick_y")) - && GroundModule::is_passable_ground(boma) { - GroundModule::pass_floor(fighter.module_accessor); - ControlModule::clear_command; - } - } - } -} - - // BRAVE---------------------------------------------------------------------------------------------------------------------------- unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) @@ -996,6 +971,17 @@ unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_ // RICHTER---------------------------------------------------------------------------------------------------------------------------- +unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + + // RIDLEY---------------------------------------------------------------------------------------------------------------------------- // ROBOT---------------------------------------------------------------------------------------------------------------------------- // ROCKMAN---------------------------------------------------------------------------------------------------------------------------- @@ -1193,7 +1179,6 @@ pub unsafe fn copymoveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjec fastfall_copyspecials(fighter); // BAYONETTA - bayo_nspecial_mechanics(fighter, boma); // BRAVE dash_cancel_frizz(fighter); brave_nspecial_cancels(fighter); @@ -1292,6 +1277,7 @@ pub unsafe fn copymoveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjec // REFLET reflet_nspecial_cancels(boma, status_kind, situation_kind); // RICHTER + knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); // RIDLEY // ROBOT // ROCKMAN diff --git a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs index 42b65af928..a6ed57520f 100644 --- a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs +++ b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs @@ -195,14 +195,12 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -pub fn install() { - smashline::Agent::new("kirby") - .status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_init) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_main) - .status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_init) - .status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Pre, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_init); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N, special_n_main); + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_init); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::kirby::BAYONETTA_SPECIAL_N_CANCEL, special_n_cancel_end); } \ No newline at end of file From 281c994e2bc87c1bdc8c915fce7730b19c5740e7 Mon Sep 17 00:00:00 2001 From: Askew Date: Thu, 21 Mar 2024 19:24:20 -0400 Subject: [PATCH 041/172] Merge conflicts --- fighters/dedede/src/acmd/other.rs | 12 +++++------- fighters/marth/src/acmd/throws.rs | 6 +++--- fighters/pickel/src/acmd/throws.rs | 6 +++--- fighters/robot/src/acmd/throws.rs | 6 +++--- fighters/rockman/src/acmd/throws.rs | 6 +++--- fighters/shizue/src/acmd/throws.rs | 6 +++--- fighters/trail/src/acmd/throws.rs | 6 +++--- 7 files changed, 23 insertions(+), 25 deletions(-) diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index ad393ed3e5..db7f3f7622 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -53,15 +53,13 @@ unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 11.0); // Effectively F13 + FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } diff --git a/fighters/marth/src/acmd/throws.rs b/fighters/marth/src/acmd/throws.rs index 8ef0445301..5880842bb7 100644 --- a/fighters/marth/src/acmd/throws.rs +++ b/fighters/marth/src/acmd/throws.rs @@ -118,9 +118,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", marth_catch_game); - agent.acmd("game_catchdash", marth_catch_dash_game); - agent.acmd("game_catchturn", marth_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwf", game_throwf); agent.acmd("game_throwb", game_throwb); diff --git a/fighters/pickel/src/acmd/throws.rs b/fighters/pickel/src/acmd/throws.rs index 1eeb110897..df382b115b 100644 --- a/fighters/pickel/src/acmd/throws.rs +++ b/fighters/pickel/src/acmd/throws.rs @@ -221,9 +221,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", pickel_catch_game); - agent.acmd("game_catchdash", pickel_catch_dash_game); - agent.acmd("game_catchturn", pickel_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwf", game_throwf); agent.acmd("game_throwlw", game_throwlw); diff --git a/fighters/robot/src/acmd/throws.rs b/fighters/robot/src/acmd/throws.rs index 0c1768af1f..ee5ddd73cd 100644 --- a/fighters/robot/src/acmd/throws.rs +++ b/fighters/robot/src/acmd/throws.rs @@ -98,9 +98,9 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", robot_catch_game); - agent.acmd("game_catchdash", robot_catch_dash_game); - agent.acmd("game_catchturn", robot_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwlw", game_throwlw); agent.acmd("game_throwhi", game_throwhi); diff --git a/fighters/rockman/src/acmd/throws.rs b/fighters/rockman/src/acmd/throws.rs index 2cabf90992..e852fd2b19 100644 --- a/fighters/rockman/src/acmd/throws.rs +++ b/fighters/rockman/src/acmd/throws.rs @@ -140,9 +140,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", rockman_catch_game); - agent.acmd("game_catchdash", rockman_catch_dash_game); - agent.acmd("game_catchturn", rockman_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwb", game_throwb); agent.acmd("game_throwhi", game_throwhi); diff --git a/fighters/shizue/src/acmd/throws.rs b/fighters/shizue/src/acmd/throws.rs index f86a5d386f..95220a57ec 100644 --- a/fighters/shizue/src/acmd/throws.rs +++ b/fighters/shizue/src/acmd/throws.rs @@ -157,9 +157,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", shizue_catch_game); - agent.acmd("game_catchdash", shizue_catch_dash_game); - agent.acmd("game_catchturn", shizue_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwf", game_throwf); agent.acmd("game_throwb", game_throwb); diff --git a/fighters/trail/src/acmd/throws.rs b/fighters/trail/src/acmd/throws.rs index 62b788ee96..68b13a708a 100644 --- a/fighters/trail/src/acmd/throws.rs +++ b/fighters/trail/src/acmd/throws.rs @@ -141,9 +141,9 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", trail_catch_game); - agent.acmd("game_catchdash", trail_catch_dash_game); - agent.acmd("game_catchturn", trail_catch_turn_game); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwb", game_throwb); agent.acmd("game_throwhi", game_throwhi); From 4669d283c7c4be21f0a8a8df5fe93f48d0a39db2 Mon Sep 17 00:00:00 2001 From: Askew Date: Thu, 21 Mar 2024 19:49:37 -0400 Subject: [PATCH 042/172] Gnw --- fighters/gamewatch/src/acmd/aerials.rs | 298 ++++++------- fighters/gamewatch/src/acmd/ground.rs | 70 ++- fighters/gamewatch/src/acmd/mod.rs | 16 +- fighters/gamewatch/src/acmd/other.rs | 130 +++--- fighters/gamewatch/src/acmd/smashes.rs | 92 ++-- fighters/gamewatch/src/acmd/specials.rs | 408 ++++++++---------- fighters/gamewatch/src/acmd/throws.rs | 214 +++++---- fighters/gamewatch/src/acmd/tilts.rs | 114 +++-- fighters/gamewatch/src/breath/aerials.rs | 9 + fighters/gamewatch/src/breath/mod.rs | 7 + fighters/gamewatch/src/lib.rs | 16 +- fighters/gamewatch/src/opff.rs | 2 +- fighters/gamewatch/src/parachute/mod.rs | 7 + fighters/gamewatch/src/parachute/specials.rs | 14 + fighters/gamewatch/src/rescue/mod.rs | 7 + fighters/gamewatch/src/rescue/specials.rs | 44 ++ fighters/gamewatch/src/status.rs | 6 +- fighters/gamewatch/src/status/special_hi.rs | 76 ++-- .../gamewatch/src/status/special_hi_open.rs | 52 ++- 19 files changed, 790 insertions(+), 792 deletions(-) create mode 100644 fighters/gamewatch/src/breath/aerials.rs create mode 100644 fighters/gamewatch/src/breath/mod.rs create mode 100644 fighters/gamewatch/src/parachute/mod.rs create mode 100644 fighters/gamewatch/src/parachute/specials.rs create mode 100644 fighters/gamewatch/src/rescue/mod.rs create mode 100644 fighters/gamewatch/src/rescue/specials.rs diff --git a/fighters/gamewatch/src/acmd/aerials.rs b/fighters/gamewatch/src/acmd/aerials.rs index 74df7018c2..866f5bec6a 100644 --- a/fighters/gamewatch/src/acmd/aerials.rs +++ b/fighters/gamewatch/src/acmd/aerials.rs @@ -1,349 +1,335 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_TROPICALFISH, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_n"), false, 0.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 19.4, 4.4, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 18.6, -2.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 19.4, 4.4, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 235, 100, 35, 0, 4.0, 0.0, 18.6, -2.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.0, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 225, 100, 35, 0, 4.5, 0.0, 20.799999, 10.8, Some(0.0), Some(21.0), Some(9.6), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 215, 100, 35, 0, 4.5, 0.0, 17.9, -8.8, Some(0.0), Some(18.299999), Some(-7.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 225, 100, 35, 0, 4.5, 0.0, 20.799999, 10.8, Some(0.0), Some(21.0), Some(9.6), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 215, 100, 35, 0, 4.5, 0.0, 17.9, -8.8, Some(0.0), Some(18.299999), Some(-7.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.25, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 160, 100, 35, 0, 4.75, 0.0, 12.4, 13.3, Some(0.0), Some(13.6), Some(13.1), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 155, 100, 35, 0, 4.75, 0.0, 11.0, -9.9, Some(0.0), Some(12.0), Some(-9.7), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 160, 100, 35, 0, 4.75, 0.0, 12.4, 13.3, Some(0.0), Some(13.6), Some(13.1), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 155, 100, 35, 0, 4.75, 0.0, 11.0, -9.9, Some(0.0), Some(12.0), Some(-9.7), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 13.0, -1.0, Some(0.0), Some(13.0), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 367, 22, 0, 26, 4.75, 0.0, 9.5, -1.0, Some(0.0), Some(9.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 2.0, 0.0, 11.0, 3.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 8.5, 0.0, 9.0, 1.8, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, 12.8, Some(0.0), Some(1.5), Some(12.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, -9.0, Some(0.0), Some(1.5), Some(-9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 2.0, 0.0, 11.0, 3.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 125, 0, 50, 8.5, 0.0, 9.0, 1.8, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, 12.8, Some(0.0), Some(1.5), Some(12.8), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.2, 40, 190, 0, 35, 5.0, 0.0, 2.9, -9.0, Some(0.0), Some(1.5), Some(-9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gamewatch_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_f"), false, -1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 6.0, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 5.2, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 6.0, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 50, 96, 0, 14, 5.2, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 96, 0, 14, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 6.0, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 5.2, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn gamewatch_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landing_air_f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn gamewatch_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack_air_f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gamewatch_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_TURTLE, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_air_b"), false, 1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.2, 0.0, 3.5, -14.3, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 1.8, -8.0, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.2, 0.0, 3.5, -14.3, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 40, 0, 35, 4.5, 0.0, 1.8, -8.0, None, None, None, 0.5, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 6.0, 0.0, 3.5, -14.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 4.5, 0.0, 1.8, -8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 6.0, 0.0, 3.5, -14.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 70, 0, 75, 4.5, 0.0, 1.8, -8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn gamewatch_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landing_air_b(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("landing_air_b"), false, 1.0); } } -unsafe extern "C" fn gamewatch_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_BREATH, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 6.0, 2.0, 20.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 5.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 6.0, 2.0, 20.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 82, 70, 0, 55, 5.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 42.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 42.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_BREATH, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn gamewatch_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_wave08_mi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_wave08_mi")); } } -unsafe extern "C" fn gamewatch_breath_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn gamewatch_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("head") as i64, hash40("head_sparky") as i64); VisibilityModule::set_int64(boma, hash40("hand") as i64, hash40("hand_hold_lr") as i64); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gamewatch_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 86, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 48, 0, 20, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 108, 0, 22, 4.0, 0.0, -2.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.0, 0.0, -2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.5, 0.0, -7.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 20, 4.0, 0.0, -2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gamewatch_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landing_air_lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn gamewatch_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landing_air_lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("head").hash as i64, Hash40::new("head_close").hash as i64); VisibilityModule::set_int64(boma, Hash40::new("hand").hash as i64, Hash40::new("hand_hold_lr").hash as i64); VisibilityModule::set_int64(boma, Hash40::new("lhand").hash as i64, Hash40::new("lhand_key").hash as i64); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *DAMAGE_NO_REACTION_MODE_NORMAL, *WEAPON_INKLING_ROLLER_INSTANCE_WORK_ID_FLOAT_B); + slope!(agent, *DAMAGE_NO_REACTION_MODE_NORMAL, *WEAPON_INKLING_ROLLER_INSTANCE_WORK_ID_FLOAT_B); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, 0 as u32); } } -pub fn install() { - smashline::Agent::new("gamewatch_breath") - .acmd("game_attackairhi", gamewatch_breath_attack_air_hi_game) - .install(); - smashline::Agent::new("gamewatch") - .acmd("game_attackairn", gamewatch_attack_air_n_game) - .acmd("game_attackairf", gamewatch_attack_air_f_game) - .acmd("game_landingairf", gamewatch_landing_air_f_game) - .acmd("expression_attackairf", gamewatch_attack_air_f_expression) - .acmd("game_attackairb", gamewatch_attack_air_b_game) - .acmd("game_landingairb", gamewatch_landing_air_b_game) - .acmd("game_attackairhi", gamewatch_attack_air_hi_game) - .acmd("sound_attackairhi", gamewatch_attack_air_hi_sound) - .acmd("expression_attackairhi", gamewatch_attack_air_hi_expression) - .acmd("game_attackairlw", gamewatch_attack_air_lw_game) - .acmd("game_landingairlw", gamewatch_landing_air_lw_game) - .acmd( - "expression_landingairlw", - gamewatch_landing_air_lw_expression, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attack_air_n); + agent.acmd("game_attackairf", game_attack_air_f); + agent.acmd("game_landingairf", game_landing_air_f); + agent.acmd("expression_attackairf", expression_attack_air_f); + agent.acmd("game_attackairb", game_attack_air_b); + agent.acmd("game_landingairb", game_landing_air_b); + agent.acmd("game_attackairhi", game_attack_air_hi); + agent.acmd("sound_attackairhi", sound_attack_air_hi); + agent.acmd("expression_attackairhi", expression_attack_air_hi); + agent.acmd("game_attackairlw", game_attack_air_lw); + agent.acmd("game_landingairlw", game_landing_air_lw); + agent.acmd("expression_landingairlw", expression_landing_air_lw); } diff --git a/fighters/gamewatch/src/acmd/ground.rs b/fighters/gamewatch/src/acmd/ground.rs index 11700a7ed1..53cb6e51bb 100644 --- a/fighters/gamewatch/src/acmd/ground.rs +++ b/fighters/gamewatch/src/acmd/ground.rs @@ -1,83 +1,81 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_SPRAY, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_11"), false, -1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 3.8, 0.0, 5.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 4.3, 0.0, 5.2, 13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 3.8, 0.0, 5.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 22, 0, 25, 4.3, 0.0, 5.2, 13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn gamewatch_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_100_end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_100_end"), false, -1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 6.0, 0.0, 9.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 4.0, 0.0, 1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 6.0, 0.0, 9.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.5, 50, 160, 0, 60, 4.0, 0.0, 1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.6); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.6); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 4.0); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 70, 0, 50, 6.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 70, 0, 50, 6.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 120, 60, 0, 65, 5.5, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 120, 60, 0, 65, 5.5, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attack11", gamewatch_attack_11_game) - .acmd("game_attack100end", gamewatch_attack_100_end_game) - .acmd("game_attackdash", gamewatch_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack_11); + agent.acmd("game_attack100end", game_attack_100_end); + agent.acmd("game_attackdash", game_attack_dash); } diff --git a/fighters/gamewatch/src/acmd/mod.rs b/fighters/gamewatch/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/gamewatch/src/acmd/mod.rs +++ b/fighters/gamewatch/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/gamewatch/src/acmd/other.rs b/fighters/gamewatch/src/acmd/other.rs index 312906ac34..4d51254039 100644 --- a/fighters/gamewatch/src/acmd/other.rs +++ b/fighters/gamewatch/src/acmd/other.rs @@ -1,128 +1,126 @@ use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_gamewatch_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gamewatch_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_step_right_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_step_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_appealhil(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_special_s01")); +unsafe extern "C" fn sound_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_special_s01")); } } -unsafe extern "C" fn sound_appealhir(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_special_s01")); +unsafe extern "C" fn sound_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_special_s01")); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_down(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_down(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); frame(lua_state, end_frame); - if is_excute(fighter) { - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0); + if is_excute(agent) { + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0); } } -unsafe extern "C" fn game_passive(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 41.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appealhil", sound_appealhil) - .acmd("sound_appealhir", sound_appealhir) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_downforwardd", game_down) - .acmd("game_downforwardu", game_down) - .acmd("game_downbackd", game_down) - .acmd("game_downbacku", game_down) - .acmd("game_passivestandf", game_passive) - .acmd("game_passivestandb", game_passive) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appealhil", sound_appealhil); + agent.acmd("sound_appealhir", sound_appealhir); + agent.acmd("game_escapeair", escape_air_game); + agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_downforwardd", game_down); + agent.acmd("game_downforwardu", game_down); + agent.acmd("game_downbackd", game_down); + agent.acmd("game_downbacku", game_down); + agent.acmd("game_passivestandf", game_passive); + agent.acmd("game_passivestandb", game_passive); } diff --git a/fighters/gamewatch/src/acmd/smashes.rs b/fighters/gamewatch/src/acmd/smashes.rs index 389f24715b..4622dd6fc3 100644 --- a/fighters/gamewatch/src/acmd/smashes.rs +++ b/fighters/gamewatch/src/acmd/smashes.rs @@ -1,90 +1,88 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_s4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 5.3, 0.0, 7.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 48, 100, 0, 46, 5.3, 0.0, 7.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 4.3, 0.0, 7.8, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.6, 0.0, 5.3, 7.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 2.9, 0.0, 6.8, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 48, 105, 0, 42, 4.3, 0.0, 7.8, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 43.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 32.0, 43.0, 21.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 21.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, Some(0.0), Some(8.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 83, 100, 0, 42, 5.5, 0.0, 9.5, -6.0, Some(0.0), Some(8.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 13.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 20, 80, 0, 30, 4.5, 0.0, 3.6, -5.0, Some(0.0), Some(3.6), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, -14.2, Some(0.0), Some(3.6), Some(-12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, 14.2, Some(0.0), Some(3.6), Some(12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 20, 80, 0, 30, 4.5, 0.0, 3.6, -5.0, Some(0.0), Some(3.6), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, -14.2, Some(0.0), Some(3.6), Some(-12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 15.0, 80, 91, 0, 60, 4.5, 0.0, 3.6, 14.2, Some(0.0), Some(3.6), Some(12.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 36.0, 24.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 36.0, 24.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attacks4", gamewatch_attack_s4_game) - .acmd("game_attackhi4", gamewatch_attack_hi4_game) - .acmd("game_attackhi4r", gamewatch_attack_hi4_game) - .acmd("game_attacklw4", gamewatch_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attack_s4); + agent.acmd("game_attackhi4", game_attack_hi4); + agent.acmd("game_attackhi4r", game_attack_hi4); + agent.acmd("game_attacklw4", game_attack_lw4); } diff --git a/fighters/gamewatch/src/acmd/specials.rs b/fighters/gamewatch/src/acmd/specials.rs index 94319a2b26..b5efd3cb23 100644 --- a/fighters/gamewatch/src/acmd/specials.rs +++ b/fighters/gamewatch/src/acmd/specials.rs @@ -1,437 +1,375 @@ use super::*; -unsafe extern "C" fn gamewatch_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_n(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 9.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_SHOOT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 4.2, 0.0, 8.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 3.2, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 4.2, 0.0, 8.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 10, 30, 0, 60, 3.2, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute (fighter) { + if is_excute (agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_COUNT_ENABLE); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_RAPID_CHECK); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_LOOP_CHECK); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_N_FLAG_COUNT_CHECK); } } -unsafe extern "C" fn gamewatch_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 270, 10, 0, 90, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_OBJECT); WorkModule::set_float(boma, 9.0, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_WORK_FLOAT_DAMAGE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 40, 0, 10, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 140, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 69, 40, 0, 50, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s5_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 60, 0, 15, 6.0, 0.0, 10.6, 8.9, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 70, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 60, 0, 15, 6.0, 0.0, 10.6, 8.9, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 70, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if(is_excute(fighter)) { + if(is_excute(agent)) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 80, 0, 60, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s6_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s6(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 20, 66, 0, 32, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s7_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s7(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - FT_ADD_DAMAGE(fighter, -9.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_ADD_DAMAGE(agent, -9.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s8_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 80, 100, 60, 0, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_s9_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s9(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_S_FLAG_FIX_PANEL); VisibilityModule::set_default_int64(boma, hash40("panel") as i64); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 6.0, 0.0, 10.6, 8.9, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 361, 80, 0, 100, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gamewatch_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 5.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 23, 0, 134, 5.0, 0.0, 5.5, 6.0, Some(0.0), Some(5.5), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 23, 0, 134, 5.0, 0.0, 5.5, 6.0, Some(0.0), Some(5.5), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 6.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("waist"), 6.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_DECIDE_DIRECTION); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); } frame(lua_state, 14.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 4.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("waist"), 4.0, 80, 80, 0, 60, 5.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 33.0); - FT_MOTION_RATE_RANGE(fighter, 33.0, 43.0, 12.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 33.0, 43.0, 12.0); + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gamewatch_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_special_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_attach_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_bounce"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("head") as i64, hash40("head_close") as i64); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn gamewatch_special_hi_open_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, Hash40::new("special_hi_open"), false, -1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 104, 0, 20, 11.22, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 104, 0, 20, 11.22, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - FT_MOTION_RATE_RANGE(fighter, 30.0, 45.0, 10.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 10.0); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gamewatch_special_hi_open_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_special_hi_open(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_gamewatch_wave10_hi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_gamewatch_wave10_hi")); } frame(lua_state, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_gamewatch_wave10_hi")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_gamewatch_wave10_hi")); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = SoundModule::play_se(boma, Hash40::new("se_gamewatch_wave03_mi"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 1.25, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_gamewatch_wave03_mi")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_gamewatch_wave03_mi")); } } -unsafe extern "C" fn gamewatch_special_hi_open_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_special_hi_open(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn gamewatch_parachute_special_hi_open_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("para3") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("para4") as i64, hash40("on") as i64); - } -} - -unsafe extern "C" fn gamewatch_rescue_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 11.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } -} - -unsafe extern "C" fn gamewatch_rescue_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 9.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); - VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); - } -} - -pub fn install() { - smashline::Agent::new("gamewatch_rescue") - .acmd("game_specialhi", gamewatch_rescue_special_hi_game) - .acmd("game_specialairhi", gamewatch_rescue_special_air_hi_game) - .install(); - smashline::Agent::new("gamewatch") - .acmd("game_specialn", gamewatch_special_n_game) - .acmd("game_specialairn", gamewatch_special_n_game) - .acmd("game_specials1", gamewatch_special_s1_game) - .acmd("game_specialairs1", gamewatch_special_s1_game) - .acmd("game_specials2", gamewatch_special_s2_game) - .acmd("game_specialairs2", gamewatch_special_s2_game) - .acmd("game_specials3", gamewatch_special_s3_game) - .acmd("game_specialairs3", gamewatch_special_s3_game) - .acmd("game_specials4", gamewatch_special_s4_game) - .acmd("game_specialairs4", gamewatch_special_s4_game) - .acmd("game_specials5", gamewatch_special_s5_game) - .acmd("game_specialairs5", gamewatch_special_s5_game) - .acmd("game_specials6", gamewatch_special_s6_game) - .acmd("game_specialairs6", gamewatch_special_s6_game) - .acmd("game_specials7", gamewatch_special_s7_game) - .acmd("game_specialairs7", gamewatch_special_s7_game) - .acmd("game_specials8", gamewatch_special_s8_game) - .acmd("game_specialairs8", gamewatch_special_s8_game) - .acmd("game_specials9", gamewatch_special_s9_game) - .acmd("game_specialairs9", gamewatch_special_s9_game) - .acmd("game_specialhi", gamewatch_special_hi_game) - .acmd("game_specialairhi", gamewatch_special_hi_game) - .acmd("expression_specialhi", gamewatch_special_hi_expression) - .acmd("expression_specialairhi", gamewatch_special_hi_expression) - .acmd("game_specialhiopen", gamewatch_special_hi_open_game) - .acmd("sound_specialhiopen", gamewatch_special_hi_open_sound) - .acmd( - "expression_specialhiopen", - gamewatch_special_hi_open_expression, - ) - .install(); - smashline::Agent::new("gamewatch_parachute") - .acmd( - "game_specialhiopen", - gamewatch_parachute_special_hi_open_game, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_special_n); + agent.acmd("game_specialairn", game_special_n); + agent.acmd("game_specials1", game_special_s1); + agent.acmd("game_specialairs1", game_special_s1); + agent.acmd("game_specials2", game_special_s2); + agent.acmd("game_specialairs2", game_special_s2); + agent.acmd("game_specials3", game_special_s3); + agent.acmd("game_specialairs3", game_special_s3); + agent.acmd("game_specials4", game_special_s4); + agent.acmd("game_specialairs4", game_special_s4); + agent.acmd("game_specials5", game_special_s5); + agent.acmd("game_specialairs5", game_special_s5); + agent.acmd("game_specials6", game_special_s6); + agent.acmd("game_specialairs6", game_special_s6); + agent.acmd("game_specials7", game_special_s7); + agent.acmd("game_specialairs7", game_special_s7); + agent.acmd("game_specials8", game_special_s8); + agent.acmd("game_specialairs8", game_special_s8); + agent.acmd("game_specials9", game_special_s9); + agent.acmd("game_specialairs9", game_special_s9); + agent.acmd("game_specialhi", game_special_hi); + agent.acmd("game_specialairhi", game_special_hi); + agent.acmd("expression_specialhi", expression_special_hi); + agent.acmd("expression_specialairhi", expression_special_hi); + agent.acmd("game_specialhiopen", game_special_hi_open); + agent.acmd("sound_specialhiopen", sound_special_hi_open); + agent.acmd("expression_specialhiopen", expression_special_hi_open); } diff --git a/fighters/gamewatch/src/acmd/throws.rs b/fighters/gamewatch/src/acmd/throws.rs index 7ea9489c89..1ac2aaec2a 100644 --- a/fighters/gamewatch/src/acmd/throws.rs +++ b/fighters/gamewatch/src/acmd/throws.rs @@ -1,258 +1,254 @@ use super::*; -unsafe extern "C" fn gamewatch_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(9.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.22); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.22); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gamewatch_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.06); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.06); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gamewatch_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-15.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-15.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.037); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.037); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, 50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 6); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 12, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 12, 3); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 110, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 110, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 15); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 15); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 36.0); - if(is_excute(fighter)) { - FT_MOTION_RATE(fighter, 2.000); - } + FT_MOTION_RATE(agent, 2.0); } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); WorkModule::set_float(boma, -50.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 110.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, -120.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 30.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 135.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_float(boma, 70.0, *FIGHTER_GAMEWATCH_STATUS_THROW_WORK_FLOAT_STOCK_ICON_ROTATE); } frame(lua_state, 34.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: -9.912}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_catch", gamewatch_catch_game) - .acmd("game_catchdash", gamewatch_catch_dash_game) - .acmd("game_catchturn", gamewatch_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gamewatch/src/acmd/tilts.rs b/fighters/gamewatch/src/acmd/tilts.rs index e8d0ca1f8a..dd2c084e00 100644 --- a/fighters/gamewatch/src/acmd/tilts.rs +++ b/fighters/gamewatch/src/acmd/tilts.rs @@ -1,118 +1,116 @@ use super::*; -unsafe extern "C" fn gamewatch_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_s3_s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_CHAIR, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_s3"), false, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 35, 99, 0, 35, 4.0, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 35, 103, 0, 35, 3.5, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 35, 99, 0, 35, 4.0, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 35, 103, 0, 35, 3.5, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 3.3, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 2.8, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 3.3, 0.0, 4.5, 15.0, Some(0.0), Some(6.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 108, 0, 40, 2.8, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn gamewatch_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_hi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 16.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, 8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, 6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 10.0, 16.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, 8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, 6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 20.0, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE_RANGE(agent, 16.0, 20.0, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 21.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, -8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, -6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE_RANGE(agent, 20.0, 21.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 4.5, 0.0, 14.0, -8.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 75, 76, 0, 60, 3.7, 0.0, 9.1, -6.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_default_int64(boma, Hash40::new("lhand").hash as i64); } } -unsafe extern "C" fn gamewatch_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_lw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, *WEAPON_GAMEWATCH_NORMAL_WEAPON_KIND_MANHOLE, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_INT_NORMAL_WEAPON_KIND); ArticleModule::generate_article(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, false, 0); ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("attack_lw3"), false, 1.0); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 11.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 11.0, 4.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, (11.0 - 6.0)/4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 90, 109, 0, 46, 3.5, 0.0, 4.2, 6.7, Some(0.0), Some(2.1), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 90, 109, 0, 46, 3.5, 0.0, 4.2, 6.7, Some(0.0), Some(2.1), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 16.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 11.0, 16.0, 4.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, (16.0 - 11.0)/4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 90, 100, 0, 36, 3.0, 0.0, 2.0, 8.7, Some(0.0), Some(4.3), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 90, 100, 0, 36, 3.0, 0.0, 2.0, 8.7, Some(0.0), Some(4.3), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("gamewatch") - .acmd("game_attacks3", gamewatch_attack_s3_s_game) - .acmd("game_attackhi3", gamewatch_attack_hi3_game) - .acmd("game_attacklw3", gamewatch_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attack_s3_s); + agent.acmd("game_attackhi3", game_attack_hi3); + agent.acmd("game_attacklw3", game_attack_lw3); } diff --git a/fighters/gamewatch/src/breath/aerials.rs b/fighters/gamewatch/src/breath/aerials.rs new file mode 100644 index 0000000000..56aad41060 --- /dev/null +++ b/fighters/gamewatch/src/breath/aerials.rs @@ -0,0 +1,9 @@ +use super::*; + +unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairhi", game_attack_air_hi); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/breath/mod.rs b/fighters/gamewatch/src/breath/mod.rs new file mode 100644 index 0000000000..d952ff14d4 --- /dev/null +++ b/fighters/gamewatch/src/breath/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod aerials; + +pub fn install(agent: &mut Agent) { + aerials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/lib.rs b/fighters/gamewatch/src/lib.rs index 8e2ddcc726..4b7ee784fc 100644 --- a/fighters/gamewatch/src/lib.rs +++ b/fighters/gamewatch/src/lib.rs @@ -7,6 +7,12 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod breath; +mod parachute; +mod rescue; + use smash::{ lib::{ L2CValue, @@ -39,7 +45,11 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("gamewatch"); + acmd::install(agent); + breath::install(agent); + parachute::install(agent); + rescue::install(agent); + opff::install(agent); + status::install(agent); } diff --git a/fighters/gamewatch/src/opff.rs b/fighters/gamewatch/src/opff.rs index 56b602f466..4bfdba832f 100644 --- a/fighters/gamewatch/src/opff.rs +++ b/fighters/gamewatch/src/opff.rs @@ -149,7 +149,7 @@ unsafe extern "C" fn box_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("gamewatch") .on_line(Main, gamewatch_frame_wrapper) .install(); diff --git a/fighters/gamewatch/src/parachute/mod.rs b/fighters/gamewatch/src/parachute/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/gamewatch/src/parachute/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/parachute/specials.rs b/fighters/gamewatch/src/parachute/specials.rs new file mode 100644 index 0000000000..3d1d5de0d6 --- /dev/null +++ b/fighters/gamewatch/src/parachute/specials.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("para3") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("para4") as i64, hash40("on") as i64); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhiopen", game_special_hi_open); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/mod.rs b/fighters/gamewatch/src/rescue/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/gamewatch/src/rescue/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/specials.rs b/fighters/gamewatch/src/rescue/specials.rs new file mode 100644 index 0000000000..140767f817 --- /dev/null +++ b/fighters/gamewatch/src/rescue/specials.rs @@ -0,0 +1,44 @@ +use super::*; + +unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 11.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } +} + +unsafe extern "C" fn game_special_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("off") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 9.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("on") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("up") as i64, hash40("on") as i64); + VisibilityModule::set_int64(boma, hash40("down") as i64, hash40("off") as i64); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_special_hi); + agent.acmd("game_specialairhi", game_special_air_hi); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/status.rs b/fighters/gamewatch/src/status.rs index ae46aab00c..43cff53337 100644 --- a/fighters/gamewatch/src/status.rs +++ b/fighters/gamewatch/src/status.rs @@ -58,10 +58,10 @@ extern "C" fn gamewatch_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("gamewatch") .on_start(gamewatch_init) .install(); - special_hi::install(); - special_hi_open::install(); + special_hi::install(agent); + special_hi_open::install(agent); } diff --git a/fighters/gamewatch/src/status/special_hi.rs b/fighters/gamewatch/src/status/special_hi.rs index f44115b4c2..0f4111f090 100644 --- a/fighters/gamewatch/src/status/special_hi.rs +++ b/fighters/gamewatch/src/status/special_hi.rs @@ -1,68 +1,58 @@ use super::*; use globals::*; -unsafe extern "C" fn gamewatch_special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { - let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; +unsafe extern "C" fn special_hi_main(agent: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { + let cancel_module = *(agent.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false } - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_FLAG_SPECIAL_HI); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, false, -1); - let motion = if fighter.is_situation(*SITUATION_KIND_GROUND) { Hash40::new("special_hi") } else { Hash40::new("special_air_hi") }; - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, motion, false, -1.0); - MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_FLAG_SPECIAL_HI); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, false, -1); + let motion = if agent.is_situation(*SITUATION_KIND_GROUND) { Hash40::new("special_hi") } else { Hash40::new("special_air_hi") }; + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, motion, false, -1.0); + MotionModule::change_motion(agent.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + agent.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } - fighter.sub_shift_status_main(L2CValue::Ptr(gamewatch_special_hi_main_loop as *const () as _)) + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe fn gamewatch_special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_transition_group_check_air_cliff(); - if MotionModule::is_end(fighter.module_accessor) { - let control = ControlModule::get_attack_air_kind(fighter.module_accessor); - WorkModule::set_int(fighter.module_accessor, control, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_WORK_INT_ATTACK_AIR_KIND); - if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); +unsafe fn special_hi_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + agent.sub_transition_group_check_air_cliff(); + if MotionModule::is_end(agent.module_accessor) { + let control = ControlModule::get_attack_air_kind(agent.module_accessor); + WorkModule::set_int(agent.module_accessor, control, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_WORK_INT_ATTACK_AIR_KIND); + if VarModule::is_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { + agent.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); } else { - VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return 1.into() } - if fighter.status_frame() > 31 && fighter.is_cat_flag(Cat1::SpecialAny) { - VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - fighter.change_status(statuses::gamewatch::SPECIAL_HI_OPEN.into(), true.into()); + if agent.status_frame() > 31 && agent.is_cat_flag(Cat1::SpecialAny) { + VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + agent.change_status(statuses::gamewatch::SPECIAL_HI_OPEN.into(), true.into()); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) { - let status = if WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("landing_frame")) > 0.0 + if agent.is_situation(*SITUATION_KIND_GROUND) { + if WorkModule::is_flag(agent.module_accessor, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) { + let status = if WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("landing_frame")) > 0.0 { FIGHTER_STATUS_KIND_LANDING } else { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL }; - fighter.change_status(status.into(), true.into()); + agent.change_status(status.into(), true.into()); return 1.into() } } return 0.into() } -unsafe extern "C" fn gamewatch_special_hi_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL); +unsafe extern "C" fn special_hi_exit(agent: &mut L2CFighterCommon) -> L2CValue { + VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL); 0.into() } -pub fn install() { - smashline::Agent::new("gamewatch") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_HI, - gamewatch_special_hi_main, - ) - .status( - Exit, - *FIGHTER_STATUS_KIND_SPECIAL_HI, - gamewatch_special_hi_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status( Exit, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exit); } diff --git a/fighters/gamewatch/src/status/special_hi_open.rs b/fighters/gamewatch/src/status/special_hi_open.rs index 148459c8ab..7b80220d97 100644 --- a/fighters/gamewatch/src/status/special_hi_open.rs +++ b/fighters/gamewatch/src/status/special_hi_open.rs @@ -1,9 +1,9 @@ use super::*; use globals::*; -unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_open_pre(agent: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - fighter.module_accessor, + agent.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), *FIGHTER_KINETIC_TYPE_MOTION_FALL, *GROUND_CORRECT_KIND_KEEP as u32, @@ -15,7 +15,7 @@ unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CV 0 ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -30,43 +30,41 @@ unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn special_hi_open_main(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, Hash40::new("special_hi_open"), false, -1.0); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_open"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_open_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_open_main(agent: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, Hash40::new("special_hi_open"), false, -1.0); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_hi_open"), 0.0, 1.0, false, 0.0, false, false); + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_open_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_open_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - let status = if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) +unsafe extern "C" fn special_hi_open_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.is_situation(*SITUATION_KIND_GROUND) { + let status = if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL } else { FIGHTER_STATUS_KIND_LANDING }; - fighter.change_status(status.into(), true.into()); + agent.change_status(status.into(), true.into()); return 1.into() } - fighter.sub_air_check_dive(); - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { + agent.sub_air_check_dive(); + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } - if MotionModule::is_end(fighter.module_accessor) || fighter.status_frame() > 45 { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) || agent.status_frame() > 45 { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return 0.into() } -unsafe extern "C" fn special_hi_open_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); +unsafe extern "C" fn special_hi_open_exit(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); 0.into() } -pub fn install() { - smashline::Agent::new("gamewatch") - .status(Pre, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_pre) - .status(Main, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_main) - .status(End, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_exit) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_pre); + agent.status(Main, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_main); + agent.status(End, statuses::gamewatch::SPECIAL_HI_OPEN, special_hi_open_exit); } From 66758f46a74ffdc72dcb4b8fdfbc4a60bf0b76a2 Mon Sep 17 00:00:00 2001 From: Askew Date: Thu, 21 Mar 2024 20:56:51 -0400 Subject: [PATCH 043/172] Gnw, Hero --- fighters/brave/src/acmd/aerials.rs | 292 +++++---- fighters/brave/src/acmd/ground.rs | 174 +++--- fighters/brave/src/acmd/mod.rs | 16 +- fighters/brave/src/acmd/other.rs | 571 +++--------------- fighters/brave/src/acmd/smashes.rs | 430 +++++++------ fighters/brave/src/acmd/specials.rs | 472 +++++++-------- fighters/brave/src/acmd/throws.rs | 152 +++-- fighters/brave/src/acmd/tilts.rs | 212 ++++--- fighters/brave/src/crash/acmd/mod.rs | 7 + fighters/brave/src/crash/acmd/specials.rs | 106 ++++ fighters/brave/src/crash/mod.rs | 9 + fighters/brave/src/deathball/acmd/mod.rs | 7 + fighters/brave/src/deathball/acmd/specials.rs | 31 + fighters/brave/src/deathball/mod.rs | 9 + fighters/brave/src/explosion/acmd/mod.rs | 7 + fighters/brave/src/explosion/acmd/specials.rs | 44 ++ fighters/brave/src/explosion/mod.rs | 9 + fighters/brave/src/fireball/acmd/mod.rs | 7 + fighters/brave/src/fireball/acmd/specials.rs | 29 + fighters/brave/src/fireball/mod.rs | 9 + fighters/brave/src/lib.rs | 21 +- fighters/brave/src/opff.rs | 2 +- fighters/brave/src/spark/acmd/mod.rs | 7 + fighters/brave/src/spark/acmd/specials.rs | 16 + fighters/brave/src/spark/mod.rs | 9 + fighters/brave/src/tornado/acmd/mod.rs | 7 + fighters/brave/src/tornado/acmd/specials.rs | 86 +++ fighters/brave/src/tornado/mod.rs | 9 + .../src/breath/{ => acmd}/aerials.rs | 0 fighters/gamewatch/src/breath/acmd/mod.rs | 7 + fighters/gamewatch/src/breath/mod.rs | 8 +- fighters/gamewatch/src/lib.rs | 9 +- fighters/gamewatch/src/parachute/acmd/mod.rs | 7 + .../src/parachute/{ => acmd}/specials.rs | 0 fighters/gamewatch/src/parachute/mod.rs | 8 +- fighters/gamewatch/src/rescue/acmd/mod.rs | 7 + .../src/rescue/{ => acmd}/specials.rs | 0 fighters/gamewatch/src/rescue/mod.rs | 8 +- 38 files changed, 1433 insertions(+), 1371 deletions(-) create mode 100644 fighters/brave/src/crash/acmd/mod.rs create mode 100644 fighters/brave/src/crash/acmd/specials.rs create mode 100644 fighters/brave/src/crash/mod.rs create mode 100644 fighters/brave/src/deathball/acmd/mod.rs create mode 100644 fighters/brave/src/deathball/acmd/specials.rs create mode 100644 fighters/brave/src/deathball/mod.rs create mode 100644 fighters/brave/src/explosion/acmd/mod.rs create mode 100644 fighters/brave/src/explosion/acmd/specials.rs create mode 100644 fighters/brave/src/explosion/mod.rs create mode 100644 fighters/brave/src/fireball/acmd/mod.rs create mode 100644 fighters/brave/src/fireball/acmd/specials.rs create mode 100644 fighters/brave/src/fireball/mod.rs create mode 100644 fighters/brave/src/spark/acmd/mod.rs create mode 100644 fighters/brave/src/spark/acmd/specials.rs create mode 100644 fighters/brave/src/spark/mod.rs create mode 100644 fighters/brave/src/tornado/acmd/mod.rs create mode 100644 fighters/brave/src/tornado/acmd/specials.rs create mode 100644 fighters/brave/src/tornado/mod.rs rename fighters/gamewatch/src/breath/{ => acmd}/aerials.rs (100%) create mode 100644 fighters/gamewatch/src/breath/acmd/mod.rs create mode 100644 fighters/gamewatch/src/parachute/acmd/mod.rs rename fighters/gamewatch/src/parachute/{ => acmd}/specials.rs (100%) create mode 100644 fighters/gamewatch/src/rescue/acmd/mod.rs rename fighters/gamewatch/src/rescue/{ => acmd}/specials.rs (100%) diff --git a/fighters/brave/src/acmd/aerials.rs b/fighters/brave/src/acmd/aerials.rs index 6282c5d4fb..953e6aed42 100644 --- a/fighters/brave/src/acmd/aerials.rs +++ b/fighters/brave/src/acmd/aerials.rs @@ -1,257 +1,257 @@ use super::*; -unsafe extern "C" fn brave_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 60, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 13.0, 60, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 50, 60, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 10.0, 60, 60, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 14.0/(42.0 - 25.0)); + FT_MOTION_RATE_RANGE(agent, 25.0, 42.0, 14.0); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 4.0/(17.2 - 14.0)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.2, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 361, 89, 0, 36, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 50, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 361, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 17.2); - FT_MOTION_RATE(fighter, 1.0/(19.0 - 17.2)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.2, 19.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn brave_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 3.0/(17.5 - 14.0)); + FT_MOTION_RATE_RANGE(agent, 14.0, 17.5, 3.0); frame(lua_state, 17.5); - FT_MOTION_RATE(fighter, 4.0/(21.0 - 17.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 17.5, 21.0, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 17.0, 45, 95, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 17.0, 45, 95, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 45, 100, 0, 35, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 40, 97, 0, 35, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn brave_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack_air_b(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn brave_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 3.0, 3.0, 5.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0/(5.5 - 5.0)); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0/(6.0 - 5.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 75, 86, 0, 53, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 75, 86, 0, 53, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 5.5, 6.0, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 75, 86, 0, 53, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 75, 86, 0, 53, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 75, 86, 0, 53, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 15.0/(29.0 - 8.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 70, 72, 0, 53, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 7.0, 70, 72, 0, 53, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 29.0, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 70, 72, 0, 53, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 70, 72, 0, 53, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 7.0, 70, 72, 0, 53, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 10.0/(35.0 - 29.0)); + FT_MOTION_RATE_RANGE(agent, 29.0, 35.0, 10.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn brave_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 18.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 18.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 270, 60, 0, 30, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 18.0, 270, 61, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 18.0, 270, 61, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 18.0, 270, 61, 0, 15, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 270, 60, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 270, 60, 0, 30, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("armr"), 13.0, 270, 64, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 13.0, 270, 64, 0, 15, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 15.0, 270, 64, 0, 15, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 10.0/(33.0 - 18.0)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 18.0, 33.0, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 35, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); @@ -259,25 +259,23 @@ unsafe extern "C" fn brave_attack_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::clear(boma, 7, false); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attackairn", brave_attack_air_n_game) - .acmd("game_attackairf", brave_attack_air_f_game) - .acmd("game_attackairb", brave_attack_air_b_game) - .acmd("expression_attackairb", brave_attack_air_b_expression) - .acmd("game_attackairhi", brave_attack_air_hi_game) - .acmd("expression_attackairhi", brave_attack_air_hi_expression) - .acmd("game_attackairlw", brave_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attack_air_n); + agent.acmd("game_attackairf", game_attack_air_f); + agent.acmd("game_attackairb", game_attack_air_b); + agent.acmd("expression_attackairb", expression_attack_air_b); + agent.acmd("game_attackairhi", game_attack_air_hi); + agent.acmd("expression_attackairhi", expression_attack_air_hi); + agent.acmd("game_attackairlw", game_attack_air_lw); } diff --git a/fighters/brave/src/acmd/ground.rs b/fighters/brave/src/acmd/ground.rs index 9e7905381f..9afd92f359 100644 --- a/fighters/brave/src/acmd/ground.rs +++ b/fighters/brave/src/acmd/ground.rs @@ -1,174 +1,172 @@ use super::*; -unsafe extern "C" fn brave_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 90, 25, 0, 25, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 90, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 90, 25, 0, 25, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 16.5, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); AttackModule::set_add_reaction_frame(boma, 3, 3.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn brave_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack_11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn brave_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 6.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 270, 25, 0, 25, 2.5, 10.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 18.0, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 15, 2.5, 0.0, 6.0, 18.0, Some(0.0), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn brave_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack_13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 2.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 361, 73, 0, 60, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 361, 73, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 73, 0, 60, 2.5, 0.0, 4.5, 11.5, Some(0.0), Some(4.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 17.0 / (19.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 19.0, 17.0); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 18.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 18.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 361, 70, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 1.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 4.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 15.0, 361, 80, 0, 50, 3.5, 9.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attack11", brave_attack_11_game) - .acmd("expression_attack11", brave_attack_11_expression) - .acmd("game_attack12", brave_attack_12_game) - .acmd("game_attack13", brave_attack_13_game) - .acmd("game_attackdash", brave_attack_dash_game) - .acmd("expression_attackdash", brave_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack_11); + agent.acmd("expression_attack11", expression_attack_11); + agent.acmd("game_attack12", game_attack_12); + agent.acmd("game_attack13", game_attack_13); + agent.acmd("game_attackdash", game_attack_dash); + agent.acmd("expression_attackdash", expression_attack_dash); } diff --git a/fighters/brave/src/acmd/mod.rs b/fighters/brave/src/acmd/mod.rs index 5528b4b735..2bf41a9158 100644 --- a/fighters/brave/src/acmd/mod.rs +++ b/fighters/brave/src/acmd/mod.rs @@ -8,12 +8,12 @@ mod ground; mod specials; mod throws; -pub fn install() { - aerials::install(); - tilts::install(); - smashes::install(); - other::install(); - ground::install(); - specials::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + smashes::install(agent); + other::install(agent); + ground::install(agent); + specials::install(agent); + throws::install(agent); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index 05e65a3408..0a5bfae38f 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -1,557 +1,178 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_brave_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_brave_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn brave_spark_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 82, 76, 0, 80, 8.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 82, 76, 0, 80, 15.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 90, 40, 0, 100, 6.0, 0.0, 22.0, 0.0, Some(0.0), Some(75.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_fireball_burst_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 115, 100, 50, 0, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 56, 70, 0, 60, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, true, 0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 345, 0, 15, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_tornado_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tornado1"), 7.0, 108, 100, 160, 0, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado1"), 7.0, 108, 55, 0, 85, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_tornado_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado1"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn brave_tornado_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado1"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn brave_tornado_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado2"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); - } -} - -unsafe extern "C" fn brave_tornado_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - for _ in 0..i32::MAX { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("tornado2"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("tornado1"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("tornado2"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("tornado1"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("tornado2"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - if WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) <= 2 { - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 1, Hash40::new("top"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 5.0, 0.0, Some(0.0), Some(18.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - } - wait(lua_state, 1.0); - } - -} - -unsafe extern "C" fn brave_tornado_special_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado3"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("brave_tornado3"), Hash40::new("tornado2"), 0, 0, 0, 0, 180, 0, 0.75, true); - } -} - -unsafe extern "C" fn brave_special_lw8_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); +unsafe extern "C" fn effect_special_lw8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - FLASH(fighter, 0.8, 0.8, 2, 0.1); - BURN_COLOR(fighter, 4, 1.6, 8, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + FLASH(agent, 0.8, 0.8, 2, 0.1); + BURN_COLOR(agent, 4, 1.6, 8, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 1, 1, 1, 0); - BURN_COLOR_FRAME(fighter, 4, 1, 1, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 4, 1, 1, 1, 0); + BURN_COLOR_FRAME(agent, 4, 1, 1, 1, 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); + BURN_COLOR_NORMAL(agent); } } -unsafe extern "C" fn brave_special_air_lw8_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); +unsafe extern "C" fn effect_special_air_lw8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_chant_finish"), Hash40::new("top"), 0, 9, 0, 0, -60, 0, 1, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - FLASH(fighter, 0.8, 0.8, 2, 0.1); - BURN_COLOR(fighter, 4, 1.6, 8, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + FLASH(agent, 0.8, 0.8, 2, 0.1); + BURN_COLOR(agent, 4, 1.6, 8, 0.8); } frame(lua_state, 32.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 1, 1, 1, 0); - BURN_COLOR_FRAME(fighter, 4, 1, 1, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 4, 1, 1, 1, 0); + BURN_COLOR_FRAME(agent, 4, 1, 1, 1, 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - BURN_COLOR_NORMAL(fighter); - } -} - -unsafe extern "C" fn brave_crash_crash1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 366, 5, 0, 10, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 115, 5, 0, 10, 12.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 105, 5, 0, 10, 14.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 100, 5, 0, 10, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 18.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 53.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 20.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 22.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 73.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 24.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - } - frame(lua_state, 81.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 63, 135, 0, 80, 26.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 93.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn brave_crash_crash1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.6, true); - } - } - else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.6, true); - } - } - frame(lua_state, 80.0); - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.5, true); - } - } - else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.5, true); - } - } - frame(lua_state, 82.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("brave_fullburst_finish"), -1); - } -} - -unsafe extern "C" fn brave_crash_crash_end1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_fullburst_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, false); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("brave_fullburst_end"), -1); - } -} - -unsafe extern "C" fn brave_explosion_explode2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 366, 100, 100, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.0, 366, 100, 50, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AREA_WIND_2ND_RAD(fighter, 0, 0.5, 0.01, 1000, 1, 0, 0, 40); - ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 14, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - AttackModule::clear(boma, 2, false); - AttackModule::clear(boma, 3, false); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ATTACK(fighter, 0, 0, Hash40::new("top"), 26.0, 65, 50, 0, 80, 13.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -13, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 60, 50, 0, 80, 18.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 18.0); - AttackModule::set_size(boma, 1, 23.0); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 0, 23.0); - AttackModule::set_size(boma, 1, 28.0); - AREA_WIND_2ND_RAD(fighter, 0, 1, 0.1, 1000, 1, 0, 0, 40); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn brave_deathball_deathball2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 16.0, 0.0, 0.0, -5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 1.0, 0.0, -5.0, -24.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn brave_deathball_deathball2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("brave_deathball_hit2"), Hash40::new("top"), 0, 0, -5, 0, 90, 0, 1.65, 0, 0, 0, 0, 0, 0, true); - } -} - -pub fn install() { - smashline::Agent::new("brave_tornado") - .acmd("game_specialhi1", brave_tornado_special_hi1_game) - .acmd("effect_specialhi1", brave_tornado_special_hi1_effect) - .acmd("game_specialhi2", brave_tornado_special_hi2_game) - .acmd("effect_specialhi2", brave_tornado_special_hi2_effect) - .acmd("game_specialhi3", brave_tornado_special_hi3_game) - .acmd("effect_specialhi3", brave_tornado_special_hi3_effect) - .install(); - smashline::Agent::new("brave") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_speciallw8", brave_special_lw8_effect) - .acmd("effect_specialairlw8", brave_special_air_lw8_effect) - .install(); - smashline::Agent::new("brave_spark") - .acmd("game_specials1", brave_spark_special_s1_game) - .install(); - smashline::Agent::new("brave_crash") - .acmd("game_crash1", brave_crash_crash1_game) - .acmd("effect_crash1", brave_crash_crash1_effect) - .acmd("effect_crashend1", brave_crash_crash_end1_effect) - .install(); - smashline::Agent::new("brave_fireball") - .acmd("game_burstl", brave_fireball_burst_l_game) - .install(); - smashline::Agent::new("brave_explosion") - .acmd("game_explode2", brave_explosion_explode2_game) - .install(); - smashline::Agent::new("brave_deathball") - .acmd("game_deathball2", brave_deathball_deathball2_game) - .acmd("effect_deathball2", brave_deathball_deathball2_effect) - .install(); + if is_excute(agent) { + COL_NORMAL(agent); + BURN_COLOR_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_speciallw8", effect_special_lw8); + agent.acmd("effect_specialairlw8", effect_special_air_lw8); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/smashes.rs b/fighters/brave/src/acmd/smashes.rs index 96378c8a7d..83a70b17be 100644 --- a/fighters/brave/src/acmd/smashes.rs +++ b/fighters/brave/src/acmd/smashes.rs @@ -1,111 +1,111 @@ use super::*; -unsafe extern "C" fn brave_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_s4_s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0 / (16.5 - 15.0)); + FT_MOTION_RATE_RANGE(agent, 15.0, 16.5, 2.0); frame(lua_state, 16.5); - FT_MOTION_RATE(fighter, 5.0 / (21.0 - 16.5)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.5, 21.0, 5.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 24.0, 361, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 24.0, 361, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 24.0, 361, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 42, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 42, 76, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 42, 76, 0, 62, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } } -unsafe extern "C" fn brave_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack_s4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_devil_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.1, 5.0); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.1, 4.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_devil_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.1, 5.0); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.1, 4.0); } } frame(lua_state, 16.0); - let psyche_up = VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + let psyche_up = VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); if psyche_up { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 5, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if psyche_up { 1.2 } else { 1.0 }; - EFFECT(fighter, Hash40::new("brave_smash_ground"), Hash40::new("top"), 15, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("brave_smash_ground"), Hash40::new("top"), 15, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, false); if psyche_up { - LAST_EFFECT_SET_RATE(fighter, 0.5); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + LAST_EFFECT_SET_RATE(agent, 0.5); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_devil_sword"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + EFFECT_OFF_KIND(agent, Hash40::new("brave_devil_sword"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } } -unsafe extern "C" fn brave_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack_s4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_smash")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_smash")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_s01")); } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { @@ -113,313 +113,311 @@ unsafe extern "C" fn brave_attack_s4_sound(fighter: &mut L2CAgentBase) { WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l21_04")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l21_04")); } } frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_s02")); } } -unsafe extern "C" fn brave_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack_s4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 14.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn brave_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 90, 82, 0, 50, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 23.0, 90, 82, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 23.0, 90, 82, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 90, 82, 0, 50, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 23.0, 90, 82, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 23.0, 90, 82, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 23.0, 90, 82, 0, 50, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 90, 82, 0, 60, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 90, 82, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 90, 82, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 90, 82, 0, 60, 4.0, 0.0, 6.0, -5.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 90, 82, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 90, 82, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 18.0, 90, 82, 0, 60, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack_hi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h01")); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_attack09")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_attack09")); } frame(lua_state, 13.0); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { frame(lua_state, 17.0); WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - PLAY_SE(fighter, Hash40::new("se_brave_special_s05")); + PLAY_SE(agent, Hash40::new("se_brave_special_s05")); } frame(lua_state, 43.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h02")); } } -unsafe extern "C" fn brave_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack_hi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_lightning3_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW(agent, Hash40::new("brave_lightning3_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 16, 0, -90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.4, 0.6, 1); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT(fighter, Hash40::new("brave_lightning3_hit"), Hash40::new("sword1"), 3, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("brave_lightning3_hit2"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 16, 0, -90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.4, 0.6, 1); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT(agent, Hash40::new("brave_lightning3_hit"), Hash40::new("sword1"), 3, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("brave_lightning3_hit2"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 11, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 11, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("brave_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_lightning3_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_lightning3_sword"), false, true); } } -unsafe extern "C" fn brave_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 22.0, 60, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 60, 95, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 22.0, 60, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 60, 95, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 22.0, 60, 95, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 89, 0, 47, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 60, 89, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 89, 0, 47, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 60, 89, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 60, 89, 0, 47, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE){ WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 22.0, 46, 90, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 46, 90, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 22.0, 46, 90, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 46, 90, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -11, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 22.0, 46, 90, 0, 25, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -13, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 46, 100, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 46, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 46, 100, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 46, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 15.0, 46, 100, 0, 45, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack_lw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.7, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.7, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 9.0); - let psyche_up = VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + let psyche_up = VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 1); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 1); + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if psyche_up { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.6, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 0.6, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); if psyche_up { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 6, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); - EFFECT_OFF_KIND(fighter, Hash40::new("brave_ice_sword"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + EFFECT_OFF_KIND(agent, Hash40::new("brave_ice_sword"), false, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } } -unsafe extern "C" fn brave_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack_lw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_brave_attack08")); - PLAY_SE(fighter, Hash40::new("se_brave_smash_l01")); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_attack08")); + PLAY_SE(agent, Hash40::new("se_brave_smash_l01")); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l02")); } } frame(lua_state, 9.0); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_l02")); } } frame(lua_state, 22.0); WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_brave_smash_l02")); - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { - PLAY_SE(fighter, Hash40::new("se_brave_special_l19")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_l02")); + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + PLAY_SE(agent, Hash40::new("se_brave_special_l19")); } } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attacks4", brave_attack_s4_s_game) - .acmd("effect_attacks4", brave_attack_s4_effect) - .acmd("sound_attacks4", brave_attack_s4_sound) - .acmd("expression_attacks4", brave_attack_s4_expression) - .acmd("game_attackhi4", brave_attack_hi4_game) - .acmd("sound_attackhi4", brave_attack_hi4_sound) - .acmd("effect_attackhi4", brave_attack_hi4_effect) - .acmd("game_attacklw4", brave_attack_lw4_game) - .acmd("effect_attacklw4", brave_attack_lw4_effect) - .acmd("sound_attacklw4", brave_attack_lw4_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attack_s4_s); + agent.acmd("effect_attacks4", effect_attack_s4); + agent.acmd("sound_attacks4", sound_attack_s4); + agent.acmd("expression_attacks4", expression_attack_s4); + agent.acmd("game_attackhi4", game_attack_hi4); + agent.acmd("sound_attackhi4", sound_attack_hi4); + agent.acmd("effect_attackhi4", effect_attack_hi4); + agent.acmd("game_attacklw4", game_attack_lw4); + agent.acmd("effect_attacklw4", effect_attack_lw4); + agent.acmd("sound_attacklw4", sound_attack_lw4); } diff --git a/fighters/brave/src/acmd/specials.rs b/fighters/brave/src/acmd/specials.rs index 946898ef19..8556ed9f96 100644 --- a/fighters/brave/src/acmd/specials.rs +++ b/fighters/brave/src/acmd/specials.rs @@ -1,85 +1,85 @@ use super::*; -unsafe extern "C" fn brave_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_special_n1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 14.0/(44.0 - 20.0)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 44.0, 14.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_special_n2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 6.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_HOP); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 52.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 26.0, 52.0, 16.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_n3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_n3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 19.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 9.0, 6.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_SUCCESS_SP) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_FIREBALL, false, 0); } } frame(lua_state, 38.0); - FT_MOTION_RATE_RANGE(fighter, 38.0, 68.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 38.0, 68.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL_ENERGY); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 9.0); + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); @@ -87,412 +87,410 @@ unsafe extern "C" fn brave_special_s1_game(fighter: &mut L2CAgentBase) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 11.0, 6.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_ENABLE_SPARK); } if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_SUCCESS_SP) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 100, 0, 35, 8.0, 0.0, 8.0, 11.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 100, 0, 35, 8.0, 0.0, 8.0, 11.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 17.0, Some(0.0), Some(10.5), Some(17.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 17.0, Some(0.0), Some(10.5), Some(17.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 22.0, Some(0.0), Some(10.5), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 22.0, Some(0.0), Some(10.5), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 26.5, Some(0.0), Some(10.5), Some(26.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 6.0, 0.0, 10.5, 26.5, Some(0.0), Some(10.5), Some(26.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 5.5, 0.0, 10.5, 29.0, Some(0.0), Some(10.5), Some(29.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 100, 0, 35, 5.5, 0.0, 10.5, 29.0, Some(0.0), Some(10.5), Some(29.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } else { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 45, 100, 0, 30, 7.0, 0.0, 9.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 45, 100, 0, 30, 7.0, 0.0, 9.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 6.0); } } -unsafe extern "C" fn brave_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 13.0); + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_ENABLE_SPARK); if WorkModule::is_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_S_FLAG_SUCCESS_SP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 90, 0, 25, 4.5, 0.0, 11.5, 12.0, Some(0.0), Some(11.5), Some(50.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 90, 0, 25, 4.5, 0.0, 11.5, 12.0, Some(0.0), Some(11.5), Some(50.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_no_finish_camera(boma, 0, true, false); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 10, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 10, 4); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(4.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 7.0); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 11.0/(41.0 - 20.0)); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 41.0, 11.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0/(6.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 11.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } } -unsafe extern "C" fn brave_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 14.0/(8.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 14.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_TORNADO, false, 0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_JUMP_START); } frame(lua_state, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } } -unsafe extern "C" fn brave_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 17.0); frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_8_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_8(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_CRASH, false, -1); WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_FULLBURST_INTERRUPT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 8.0, 0.0, 16.0, 0.0, -3.0, 8.0, 0.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 8.0, 0.0, 16.0, 0.0, -3.0, 8.0, 0.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 116.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_FULLBURST_INTERRUPT); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 136.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_START_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn brave_special_air_lw10_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_air_lw10(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 270, 30, 0, 80, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 270, 40, 0, 38, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 270, 30, 0, 80, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 270, 40, 0, 38, 7.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); } -unsafe extern "C" fn brave_special_lw_14_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_14(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 8.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BRAVE_GENERATE_ARTICLE_SLEEP, false, -1); WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_LW_FLAG_ENABLE_CONTROL_ENERGY); } } -unsafe extern "C" fn brave_special_lw_17_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 46, 67, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 15.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 22.0, 46, 67, 0, 68, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 46, 67, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 15.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 22.0, 46, 67, 0, 68, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 6.0, 31.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 22.0, 46, 67, 0, 68, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 17.0, 50, 62, 0, 68, 7.5, 0.0, 6.0, 31.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_17_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_special_lw_17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_fire_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.2, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 7, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_firesword1"), Hash40::new("tex_brave_sword2"), 7, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_fire_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_fire_sword"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_LIGHTNING_SWORD_FLARE, false, true); } } -unsafe extern "C" fn brave_special_lw_18_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 17.0, 50, 7, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 15.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 9.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 17.0, 50, 7, 0, 70, 4.5, 4.0, 0.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 17.0, 50, 7, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 15.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); AttackModule::set_ice_frame_mul(boma, 0, 2.0, false); AttackModule::set_ice_frame_mul(boma, 1, 2.0, false); AttackModule::set_ice_frame_mul(boma, 2, 2.0, false); AttackModule::set_ice_frame_mul(boma, 4, 2.0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 50, 7, 0, 70, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 6.0, 31.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 50, 7, 0, 70, 8.5, 0.0, 7.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 60, 7, 0, 70, 7.5, 0.0, 6.0, 31.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); AttackModule::set_ice_frame_mul(boma, 3, 2.0, false); AttackModule::set_ice_frame_mul(boma, 4, 2.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_special_lw_18_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_special_lw_18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 8, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_brave_sword1"), Hash40::new("tex_brave_sword2"), 8, Hash40::new("sword1"), 1.5, 0.0, 0.0, Hash40::new("sword1"), 14.4, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.3, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("brave_ice_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1.3, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("brave_ice_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("brave_ice_sword"), false, true); } } -unsafe extern "C" fn brave_special_lw_19_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw_19(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.3, 8.8, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.8, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 1.0, 361, 220, 10, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.3, 8.8, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 1.0, 361, 220, 10, 10, 3.8, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 1.0, 361, 220, 10, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup_metal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_special_lw20_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_special_lw20(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 35.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 35.0, 29.0); frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 35.0, 55, 89, 0, 36, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 35.0, 55, 89, 0, 36, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 35.0, 55, 89, 0, 36, 3.5, 9.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_specialn1", brave_special_n1_game) - .acmd("game_specialairn1", brave_special_n1_game) - .acmd("game_specialn2", brave_special_n2_game) - .acmd("game_specialair2", brave_special_n2_game) - .acmd("game_specialn3", brave_special_n3_game) - .acmd("game_specialairn3", brave_special_n3_game) - .acmd("game_specials1", brave_special_s1_game) - .acmd("game_specialairs1", brave_special_s1_game) - .acmd("game_specials2", brave_special_s2_game) - .acmd("game_specialairs2", brave_special_s2_game) - .acmd("game_specialhi1", brave_special_hi1_game) - .acmd("game_specialairhi1", brave_special_hi1_game) - .acmd("game_specialhi2", brave_special_hi2_game) - .acmd("game_specialairhi2", brave_special_hi2_game) - .acmd("game_specialhi3", brave_special_hi3_game) - .acmd("game_specialairhi3", brave_special_hi3_game) - .acmd("game_speciallwstart", brave_special_lw_start_game) - .acmd("game_specialairlwstart", brave_special_lw_start_game) - .acmd("game_speciallw8", brave_special_lw_8_game) - .acmd("game_specialairlw8", brave_special_lw_8_game) - .acmd("game_specialairlw10", brave_special_air_lw10_game) - .acmd("game_speciallw14", brave_special_lw_14_game) - .acmd("game_specialairlw14", brave_special_lw_14_game) - .acmd("game_speciallw17", brave_special_lw_17_game) - .acmd("game_specialairlw17", brave_special_lw_17_game) - .acmd("effect_speciallw17", brave_special_lw_17_effect) - .acmd("game_specialairlw17", brave_special_lw_17_effect) - .acmd("game_speciallw18", brave_special_lw_18_game) - .acmd("game_specialairlw18", brave_special_lw_18_game) - .acmd("effect_speciallw18", brave_special_lw_18_effect) - .acmd("effect_specialairlw18", brave_special_lw_18_effect) - .acmd("game_speciallw19", brave_special_lw_19_game) - .acmd("game_specialairlw19", brave_special_lw_19_game) - .acmd("game_speciallw20", brave_special_lw20_game) - .acmd("game_specialairlw20", brave_special_lw20_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_special_n1); + agent.acmd("game_specialairn1", game_special_n1); + agent.acmd("game_specialn2", game_special_n2); + agent.acmd("game_specialair2", game_special_n2); + agent.acmd("game_specialn3", game_special_n3); + agent.acmd("game_specialairn3", game_special_n3); + agent.acmd("game_specials1", game_special_s1); + agent.acmd("game_specialairs1", game_special_s1); + agent.acmd("game_specials2", game_special_s2); + agent.acmd("game_specialairs2", game_special_s2); + agent.acmd("game_specialhi1", game_special_hi1); + agent.acmd("game_specialairhi1", game_special_hi1); + agent.acmd("game_specialhi2", game_special_hi2); + agent.acmd("game_specialairhi2", game_special_hi2); + agent.acmd("game_specialhi3", game_special_hi3); + agent.acmd("game_specialairhi3", game_special_hi3); + agent.acmd("game_speciallwstart", game_special_lw_start); + agent.acmd("game_specialairlwstart", game_special_lw_start); + agent.acmd("game_speciallw8", game_special_lw_8); + agent.acmd("game_specialairlw8", game_special_lw_8); + agent.acmd("game_specialairlw10", game_special_air_lw10); + agent.acmd("game_speciallw14", game_special_lw_14); + agent.acmd("game_specialairlw14", game_special_lw_14); + agent.acmd("game_speciallw17", game_special_lw_17); + agent.acmd("game_specialairlw17", game_special_lw_17); + agent.acmd("effect_speciallw17", effect_special_lw_17); + agent.acmd("game_specialairlw17", effect_special_lw_17); + agent.acmd("game_speciallw18", game_special_lw_18); + agent.acmd("game_specialairlw18", game_special_lw_18); + agent.acmd("effect_speciallw18", effect_special_lw_18); + agent.acmd("effect_specialairlw18", effect_special_lw_18); + agent.acmd("game_speciallw19", game_special_lw_19); + agent.acmd("game_specialairlw19", game_special_lw_19); + agent.acmd("game_speciallw20", game_special_lw20); + agent.acmd("game_specialairlw20", game_special_lw20); } diff --git a/fighters/brave/src/acmd/throws.rs b/fighters/brave/src/acmd/throws.rs index 07ac07a29a..bf0c8420b2 100644 --- a/fighters/brave/src/acmd/throws.rs +++ b/fighters/brave/src/acmd/throws.rs @@ -1,50 +1,50 @@ use super::*; -unsafe extern "C" fn brave_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(7.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(7.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn brave_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn brave_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,104 +64,102 @@ unsafe extern "C" fn brave_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn brave_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 35, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 35, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 44.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 23.0, 44.0, 11.0); frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 47, 57, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 47, 57, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 11, 6); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 42.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 26.0, 42.0, 12.0); frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn brave_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 85, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 85, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 31); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 31); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn brave_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 76, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 76, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 9, 1); - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 9, 1); + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_catch", brave_catch_game) - .acmd("game_catchdash", brave_catch_dash_game) - .acmd("game_catchturn", brave_catch_turn_game) - .acmd("game_throwf", brave_throw_f_game) - .acmd("game_throwb", brave_throw_b_game) - .acmd("game_throwhi", brave_throw_hi_game) - .acmd("game_throwlw", brave_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catch_dash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/brave/src/acmd/tilts.rs b/fighters/brave/src/acmd/tilts.rs index 281c21dae2..71caf0cbc6 100644 --- a/fighters/brave/src/acmd/tilts.rs +++ b/fighters/brave/src/acmd/tilts.rs @@ -1,197 +1,195 @@ use super::*; -unsafe extern "C" fn brave_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shield"), 6.0, 60, 100, 35, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shield"), 6.0, 55, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 55, 100, 50, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 35, 100, 40, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shield"), 6.0, 60, 100, 35, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shield"), 6.0, 55, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 55, 100, 50, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 35, 100, 40, 0, 6.0, 0.0, 7.0, 7.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 3, 4.0, false); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn brave_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); AttackModule::clear_inflict_kind_status(boma); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.5, 1.0); frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 7.5, 8.0, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 9.0, 40, 110, 0, 35, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 40, 110, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_s3_s2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3s2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); } frame(lua_state, 5.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn brave_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.5, 1.0); frame(lua_state, 7.5); - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + FT_MOTION_RATE_RANGE(agent, 7.5, 8.0, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 94, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 94, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 94, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 94, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 8.0, 94, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 94, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 8.0, 94, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 94, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-8.0)); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 6.0); frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 86, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 86, 70, 0, 80, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 86, 70, 0, 80, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BRAVE_CRITICALHIT, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 86, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 8.0, 86, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 86, 95, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 8.0, 86, 95, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 1.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 4.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 86, 95, 0, 70, 4.5, 8.5, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn brave_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 5.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn brave_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 83, 60, 0, 75, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 88, 60, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 93, 60, 0, 75, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 83, 60, 0, 75, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 88, 60, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 93, 60, 0, 75, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("brave") - .acmd("game_attacks3", brave_attack_s3_s_game) - .acmd("game_attacks3s2", brave_attack_s3_s2_game) - .acmd("expression_attacks3s2", brave_attack_s3_s2_expression) - .acmd("game_attackhi3", brave_attack_hi3_game) - .acmd("expression_attackhi3", brave_attack_hi3_expression) - .acmd("game_attacklw3", brave_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3s); + agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("expression_attacks3s2", expression_attacks3s2); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/brave/src/crash/acmd/mod.rs b/fighters/brave/src/crash/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/crash/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/crash/acmd/specials.rs b/fighters/brave/src/crash/acmd/specials.rs new file mode 100644 index 0000000000..8510566a15 --- /dev/null +++ b/fighters/brave/src/crash/acmd/specials.rs @@ -0,0 +1,106 @@ +use super::*; + +unsafe extern "C" fn game_crash1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 366, 5, 0, 10, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 115, 5, 0, 10, 12.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 105, 5, 0, 10, 14.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 33.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 100, 5, 0, 10, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -2, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 18.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 53.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 20.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 22.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 73.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 95, 5, 0, 10, 24.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, 0.0, 9, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + } + frame(lua_state, 81.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 63, 135, 0, 80, 26.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 93.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_crash1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.6, true); + } + } + else { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.6, true); + } + } + frame(lua_state, 80.0); + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, 90, 0, 0.5, true); + } + } + else { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_finish"), Hash40::new("top"), 0, 0, 0, 0, -90, 0, 0.5, true); + } + } + frame(lua_state, 82.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("brave_fullburst_finish"), -1); + } +} + +unsafe extern "C" fn effect_crash_end1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_fullburst_end"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, false); + } + frame(lua_state, 29.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("brave_fullburst_end"), -1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_crash1", game_crash1); + agent.acmd("effect_crash1", effect_crash1); + agent.acmd("effect_crashend1", effect_crash_end1); +} \ No newline at end of file diff --git a/fighters/brave/src/crash/mod.rs b/fighters/brave/src/crash/mod.rs new file mode 100644 index 0000000000..24229d64fc --- /dev/null +++ b/fighters/brave/src/crash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_crash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/deathball/acmd/mod.rs b/fighters/brave/src/deathball/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/deathball/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/deathball/acmd/specials.rs b/fighters/brave/src/deathball/acmd/specials.rs new file mode 100644 index 0000000000..90f3dce5ab --- /dev/null +++ b/fighters/brave/src/deathball/acmd/specials.rs @@ -0,0 +1,31 @@ +use super::*; + +unsafe extern "C" fn game_deathball2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 16.0, 0.0, 0.0, -5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 150, 0, 0, 1.0, 0.0, -5.0, -24.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_deathball"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_deathball2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("brave_deathball_hit2"), Hash40::new("top"), 0, 0, -5, 0, 90, 0, 1.65, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_deathball2", game_deathball2); + agent.acmd("effect_deathball2", effect_deathball2); +} \ No newline at end of file diff --git a/fighters/brave/src/deathball/mod.rs b/fighters/brave/src/deathball/mod.rs new file mode 100644 index 0000000000..2047508f0d --- /dev/null +++ b/fighters/brave/src/deathball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_deathball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/explosion/acmd/mod.rs b/fighters/brave/src/explosion/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/explosion/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/explosion/acmd/specials.rs b/fighters/brave/src/explosion/acmd/specials.rs new file mode 100644 index 0000000000..bfbc5bbebb --- /dev/null +++ b/fighters/brave/src/explosion/acmd/specials.rs @@ -0,0 +1,44 @@ +use super::*; + +unsafe extern "C" fn game_explode2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 100, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.0, 366, 100, 50, 0, 25.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + AREA_WIND_2ND_RAD(agent, 0, 0.5, 0.01, 1000, 1, 0, 0, 40); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 14, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ATTACK(agent, 0, 0, Hash40::new("top"), 26.0, 65, 50, 0, 80, 13.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -13, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 60, 50, 0, 80, 18.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 18.0); + AttackModule::set_size(boma, 1, 23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 23.0); + AttackModule::set_size(boma, 1, 28.0); + AREA_WIND_2ND_RAD(agent, 0, 1, 0.1, 1000, 1, 0, 0, 40); + } + frame(lua_state, 40.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode2", game_explode2); +} \ No newline at end of file diff --git a/fighters/brave/src/explosion/mod.rs b/fighters/brave/src/explosion/mod.rs new file mode 100644 index 0000000000..01e7fd24d1 --- /dev/null +++ b/fighters/brave/src/explosion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_explosion"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/fireball/acmd/mod.rs b/fighters/brave/src/fireball/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/fireball/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/fireball/acmd/specials.rs b/fighters/brave/src/fireball/acmd/specials.rs new file mode 100644 index 0000000000..fdb74994e1 --- /dev/null +++ b/fighters/brave/src/fireball/acmd/specials.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn game_burst_l(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 115, 100, 50, 0, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 56, 70, 0, 60, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, true, 0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 345, 0, 15, 13.0, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 17.5, 0.0, 0.0, 0.0, None, None, None, 3.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_burstl", game_burst_l); +} \ No newline at end of file diff --git a/fighters/brave/src/fireball/mod.rs b/fighters/brave/src/fireball/mod.rs new file mode 100644 index 0000000000..69fe227721 --- /dev/null +++ b/fighters/brave/src/fireball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_fireball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/lib.rs b/fighters/brave/src/lib.rs index 6c0b91218d..aff5b89aa6 100644 --- a/fighters/brave/src/lib.rs +++ b/fighters/brave/src/lib.rs @@ -38,6 +38,14 @@ pub mod menu; pub mod opff; pub use menu::hero_rng_hook_impl; +// articles +mod crash; +mod deathball; +mod explosion; +mod fireball; +mod spark; +mod tornado; + extern "C" fn brave_init(fighter: &mut L2CFighterCommon) { unsafe { // init roll history @@ -61,7 +69,16 @@ extern "C" fn brave_init(fighter: &mut L2CFighterCommon) { } pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("brave"); + acmd::install(agent); + opff::install(agent); smashline::Agent::new("brave").on_start(brave_init).install(); + agent.install(); + + crash::install(); + deathball::install(); + explosion::install(); + fireball::install(); + spark::install(); + tornado::install(); } \ No newline at end of file diff --git a/fighters/brave/src/opff.rs b/fighters/brave/src/opff.rs index 0bd701c1c4..c93c1c98d0 100644 --- a/fighters/brave/src/opff.rs +++ b/fighters/brave/src/opff.rs @@ -174,7 +174,7 @@ pub unsafe extern "C" fn brave_frame_wrapper(fighter: &mut L2CFighterCommon) { ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("sword1"), &Vector3f::new(1.1, 1.05, 1.045)); } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("brave") .on_line(Main, brave_frame_wrapper) .install(); diff --git a/fighters/brave/src/spark/acmd/mod.rs b/fighters/brave/src/spark/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/spark/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/spark/acmd/specials.rs b/fighters/brave/src/spark/acmd/specials.rs new file mode 100644 index 0000000000..ac35dc952a --- /dev/null +++ b/fighters/brave/src/spark/acmd/specials.rs @@ -0,0 +1,16 @@ +use super::*; + +unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 82, 76, 0, 80, 8.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 82, 76, 0, 80, 15.0, 0.0, 10.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 90, 40, 0, 100, 6.0, 0.0, 22.0, 0.0, Some(0.0), Some(75.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_special_s1); +} \ No newline at end of file diff --git a/fighters/brave/src/spark/mod.rs b/fighters/brave/src/spark/mod.rs new file mode 100644 index 0000000000..37e95fe81a --- /dev/null +++ b/fighters/brave/src/spark/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_spark"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/brave/src/tornado/acmd/mod.rs b/fighters/brave/src/tornado/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/brave/src/tornado/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/brave/src/tornado/acmd/specials.rs b/fighters/brave/src/tornado/acmd/specials.rs new file mode 100644 index 0000000000..191525e9e5 --- /dev/null +++ b/fighters/brave/src/tornado/acmd/specials.rs @@ -0,0 +1,86 @@ +use super::*; + +unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 7.0, 108, 100, 160, 0, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado1"), 7.0, 108, 55, 0, 85, 6.0, 0.0, 2.5, 4.0, Some(0.0), Some(2.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn effect_special_hi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado1"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + } +} + +unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado1"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.0, 0.0, 4.0, 2.3, Some(0.0), Some(4.0), Some(-2.3), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("tornado1"), 4.0, 120, 120, 0, 85, 6.5, 0.0, 13.0, 2.5, Some(0.0), Some(13.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn effect_special_hi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado2"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + } +} + +unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..i32::MAX { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tornado1"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("tornado2"), 3.0, 130, 100, 60, 0, 6.0, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("tornado1"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("tornado2"), 3.0, 140, 100, 45, 0, 6.0, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("tornado1"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("tornado2"), 3.0, 175, 100, 35, 0, 6.0, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 10, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + if WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) <= 2 { + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 3.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 11.5, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 1, Hash40::new("tornado1"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 1, Hash40::new("tornado2"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 19.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 1, Hash40::new("top"), 4.0, 120, 125, 0, 85, 6.5, 0.0, 5.0, 0.0, Some(0.0), Some(18.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + } + wait(lua_state, 1.0); + } + +} + +unsafe extern "C" fn effect_special_hi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado3"), Hash40::new("tornado1"), 0, 0, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("brave_tornado3"), Hash40::new("tornado2"), 0, 0, 0, 0, 180, 0, 0.75, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_special_hi1); + agent.acmd("effect_specialhi1", effect_special_hi1); + agent.acmd("game_specialhi2", game_special_hi2); + agent.acmd("effect_specialhi2", effect_special_hi2); + agent.acmd("game_specialhi3", game_special_hi3); + agent.acmd("effect_specialhi3", effect_special_hi3); +} \ No newline at end of file diff --git a/fighters/brave/src/tornado/mod.rs b/fighters/brave/src/tornado/mod.rs new file mode 100644 index 0000000000..bef84a3c5d --- /dev/null +++ b/fighters/brave/src/tornado/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("brave_tornado"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/breath/aerials.rs b/fighters/gamewatch/src/breath/acmd/aerials.rs similarity index 100% rename from fighters/gamewatch/src/breath/aerials.rs rename to fighters/gamewatch/src/breath/acmd/aerials.rs diff --git a/fighters/gamewatch/src/breath/acmd/mod.rs b/fighters/gamewatch/src/breath/acmd/mod.rs new file mode 100644 index 0000000000..d952ff14d4 --- /dev/null +++ b/fighters/gamewatch/src/breath/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod aerials; + +pub fn install(agent: &mut Agent) { + aerials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/breath/mod.rs b/fighters/gamewatch/src/breath/mod.rs index d952ff14d4..e2c254c997 100644 --- a/fighters/gamewatch/src/breath/mod.rs +++ b/fighters/gamewatch/src/breath/mod.rs @@ -1,7 +1,9 @@ use super::*; -mod aerials; +mod acmd; -pub fn install(agent: &mut Agent) { - aerials::install(agent); +pub fn install() { + let agent = &mut Agent::new("gamewatch_breath"); + acmd::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/gamewatch/src/lib.rs b/fighters/gamewatch/src/lib.rs index 4b7ee784fc..85d12321ec 100644 --- a/fighters/gamewatch/src/lib.rs +++ b/fighters/gamewatch/src/lib.rs @@ -8,7 +8,6 @@ pub mod status; pub mod opff; // articles - mod breath; mod parachute; mod rescue; @@ -47,9 +46,11 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("gamewatch"); acmd::install(agent); - breath::install(agent); - parachute::install(agent); - rescue::install(agent); opff::install(agent); status::install(agent); + agent.install(); + + breath::install(); + parachute::install(); + rescue::install(); } diff --git a/fighters/gamewatch/src/parachute/acmd/mod.rs b/fighters/gamewatch/src/parachute/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/gamewatch/src/parachute/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/parachute/specials.rs b/fighters/gamewatch/src/parachute/acmd/specials.rs similarity index 100% rename from fighters/gamewatch/src/parachute/specials.rs rename to fighters/gamewatch/src/parachute/acmd/specials.rs diff --git a/fighters/gamewatch/src/parachute/mod.rs b/fighters/gamewatch/src/parachute/mod.rs index 3878f50b33..9d3148af12 100644 --- a/fighters/gamewatch/src/parachute/mod.rs +++ b/fighters/gamewatch/src/parachute/mod.rs @@ -1,7 +1,9 @@ use super::*; -mod specials; +mod acmd; -pub fn install(agent: &mut Agent) { - specials::install(agent); +pub fn install() { + let agent = &mut Agent::new("gamewatch_parachute"); + acmd::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/acmd/mod.rs b/fighters/gamewatch/src/rescue/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/gamewatch/src/rescue/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/specials.rs b/fighters/gamewatch/src/rescue/acmd/specials.rs similarity index 100% rename from fighters/gamewatch/src/rescue/specials.rs rename to fighters/gamewatch/src/rescue/acmd/specials.rs diff --git a/fighters/gamewatch/src/rescue/mod.rs b/fighters/gamewatch/src/rescue/mod.rs index 3878f50b33..d04b13dac2 100644 --- a/fighters/gamewatch/src/rescue/mod.rs +++ b/fighters/gamewatch/src/rescue/mod.rs @@ -1,7 +1,9 @@ use super::*; -mod specials; +mod acmd; -pub fn install(agent: &mut Agent) { - specials::install(agent); +pub fn install() { + let agent = &mut Agent::new("gamewatch_rescue"); + acmd::install(agent); + agent.install(); } \ No newline at end of file From 20034e4ab164159adc1ca008893e1de75dc1ce57 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 21 Mar 2024 21:48:38 -0400 Subject: [PATCH 044/172] Kirby OPFF refactor --- fighters/kirby/src/opff.rs | 1173 +------------------------------ fighters/kirby/src/opff/copy.rs | 1120 +++++++++++++++++++++++++++++ fighters/packun/src/opff.rs | 2 +- 3 files changed, 1134 insertions(+), 1161 deletions(-) create mode 100644 fighters/kirby/src/opff/copy.rs diff --git a/fighters/kirby/src/opff.rs b/fighters/kirby/src/opff.rs index 4bd23c3c4f..11f81c64ff 100644 --- a/fighters/kirby/src/opff.rs +++ b/fighters/kirby/src/opff.rs @@ -3,6 +3,8 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; +mod copy; + // symbol-based call for the pikachu/pichu characters' common opff extern "Rust" { fn gimmick_flash(boma: &mut BattleObjectModuleAccessor); @@ -57,1056 +59,21 @@ unsafe fn dash_attack_jump_cancels(boma: &mut BattleObjectModuleAccessor) { // } // } -pub extern "C" fn hammer_swing_drift_landcancel(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_ATTACK) { - if fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR) { - AttackModule::clear_all(fighter.module_accessor); - MotionModule::change_motion_force_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), 33.0, 1.0, 1.0); - MotionModule::set_rate(fighter.module_accessor, (55.0 - 33.0)/25.0); // equates to 17F landing lag - } - if fighter.is_situation(*SITUATION_KIND_AIR) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - -// Magic Series -unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - if( (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_RYU) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KEN) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCARIO) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_DOLLY)){ - let cat1 = cat[0]; - let cat4 = cat[3]; - // Level 1: Jab and Dash Attack Cancels - if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for tilt attack inputs - if boma.is_cat_flag(Cat1::AttackS3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); - } - if boma.is_cat_flag(Cat1::AttackHi3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); - } - if boma.is_cat_flag(Cat1::AttackLw3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); - } - - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during dash attack (on hit) - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Level 2: Tilt Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during utilt - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Smash Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - } - } - - // Aerial Cancels - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for jump inputs - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - } -} - -// Copy Abilities -// Fox Drift and Laser Land Cancel -unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Falco Drift and Laser Land Cancel -unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Wolf Drift and Laser Airdodge Cancel -unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { - if frame > 17.0 { - boma.check_airdodge_cancel(); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Water Shuriken Max Dash Cancel -unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { - if frame > 12.0 { - boma.check_dash_cancel(); - } - } -} - -// Sora Magic Cancels -unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - // Firaga Airdodge Cancel - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { - if frame > 2.0 { - boma.check_airdodge_cancel(); - } - } - // Thundaga Land Cancel - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) - { - let special_n_fire_cancel_frame_ground = 69.0; - let landing_lag = 12.0; - if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); - } - } -} - -// cycles Kirby to firaga after copying Sora -unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if fighter.is_motion(Hash40::new("special_n_drink")) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { - let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); - let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; - if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE - && frame > 3.0 { - WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); - FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder - } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER - && frame > 4.0 { - FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire - } - } -} - -// handles kirby's mining behavior when copying steve -unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { - if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { - VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); - } - - // wait 2 frames before letting the material table advance, preventing any jumps in entries - if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { - if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { - VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); - } else { - VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); - } - } - } -} - -// Bite Early Throw and Turnaround -unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { - if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { - boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { - if frame < 7.0 { - if facing * stick_x < 0.0 { - PostureModule::reverse_lr(boma); - PostureModule::update_rot_y_lr(boma); - } - } - } -} - -// Chef Drift and Land Cancel -unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if StatusModule::is_changing(boma) { - let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Nayru's Love Drift and Land Cancel -unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND { - if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { - //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); - MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); - } - } - else if situation_kind == *SITUATION_KIND_AIR { - if frame >= 31.0 { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - -// Hero Dash Cancel Frizz -unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_motion(Hash40::new("brave_special_n1")) - && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF - && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) - { - if fighter.check_dash_cancel() { - let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; - FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } -} - -// Falcon Punch Turnarounds -unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - let frame = fighter.motion_frame(); - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) - && 22.0 < frame && frame < 41.0 - && fighter.is_stick_backward() - && fighter.stick_x().abs() > 0.1 - { - fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); - } -} - -// Blue Eggs Land Cancel -unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_prev_situation(*SITUATION_KIND_AIR) - { - // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame - let special_n_fire_cancel_frame_ground = 49.0; - // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag - let landing_lag = 12.0; - if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); - } - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); - } -} - -// Peanut Popgun Airdodge Cancel -unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { - boma.check_airdodge_cancel(); - } -} - -//Darkest Lariat Ledge Slipoff -unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); - fighter.sub_transition_group_check_air_cliff(); - } -} - -//Bowser Flame Land Cancel -unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - if frame < 23.0 && !cooleddown { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - MotionModule::set_frame(boma, 22.0, true); - } - } - } -} - -unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - /* //Ignore cooldown during respawn,death,entry and nspecial - if (&[ - *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, - *FIGHTER_STATUS_KIND_SPECIAL_N - ]).contains(&status_kind) { - return; - } */ - - if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); - //If cooling down, remove ready effect - if !cooleddown { - if charged_effect > 0 { - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); - if EffectModule::is_exist_effect(boma, charged_effect as u32) { - EffectModule::kill(boma, charged_effect as u32, false,false); - } - } - return; - } - //Otherwise, spawn effect if effect does not exist - else if (charged_effect <= 0 - || !EffectModule::is_exist_effect(boma, charged_effect as u32)) - { - if (charged_effect <= 0){ - gimmick_flash(boma); - } - let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; - let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; - let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); - } - } -} - -// Clown Cannon Shield Cancel -unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { - if frame > 16.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - if situation_kind == *SITUATION_KIND_GROUND { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); - } - } - } - } -} - -// Link's Bow Drift -unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Bonus Fruit Airdodge Cancel -unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { - if frame > 11.0 { - boma.check_airdodge_cancel(); - } - } -} - -// Colorless Attack Dash Cancel on Hit -// This is unique to Kirby due to only having access to colorless attack. -unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { - boma.check_dash_cancel(); +unsafe fn hammer_swing_drift_landcancel(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_ATTACK) { + if fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR) { + AttackModule::clear_all(fighter.module_accessor); + MotionModule::change_motion_force_inherit_frame(fighter.module_accessor, Hash40::new("special_s"), 33.0, 1.0, 1.0); + MotionModule::set_rate(fighter.module_accessor, (55.0 - 33.0)/25.0); // equates to 17F landing lag } - } -} - -// Dark Pit's Bow Land Cancel -unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ - if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } + if fighter.is_situation(*SITUATION_KIND_AIR) { + if KineticModule::get_sum_speed_y(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) <= 0.0 { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } } } -// Flamethrower Land Cancel -unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - let prev_situation = StatusModule::prev_situation_kind(boma); - if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { - return; - } - if StatusModule::is_changing(boma) { - return; - } - if frame < 19.0 { - MotionModule::set_frame(boma, 18.0, true); - } -} - -// Metal Blade Airdodge Cancel -unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { - if boma.status_frame() > 16 { - boma.check_airdodge_cancel(); - } - } -} - -// Simon's Axe Drift -unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Richter's Knife Drift -unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Toon Link's Bow Drift -unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// Young Link's Bow Drift -unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - -// PM-like neutral-b canceling -// Donkey Kong -unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Samus & Dark Samus -unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - -// Robin -unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Sheik -unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Mewtwo -unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - if MotionModule::is_end(boma) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); - } - } - } -} - -// Squirtle -unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { - //PM-like neutral-b canceling - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { - if situation_kind == *SITUATION_KIND_AIR { - if boma.is_cat_flag(Cat1::AirEscape) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); - } - } - } -} - -// Diddy Kong -unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - if fighter.is_cat_flag(Cat2::StickEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeF) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeB) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - if fighter.sub_check_command_guard().get_bool() { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - } - else { - if fighter.is_cat_flag(Cat1::AirEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) - && fighter.get_num_used_jumps() < fighter.get_jump_count_max() - { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); - } - } - } -} - -// Lucario -unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { - if boma.is_cat_flag(Cat2::CommonGuard) { - if situation_kind == *SITUATION_KIND_AIR { - if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - else { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - }***/ - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - } - } -} - -// WiiFit Trainer -unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Pac-Man -unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Hero -unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) - && fighter.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR - { - WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } -} - -// Sephiroth -unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Mii Gunner -unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// Byleth -unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - -// Ken -unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if !boma.is_status_one_of(&[ - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, - ]) { - return; - } - - // set VarModule flag on f12 - this flag changes hado properties - if frame == 12.0 && fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n"), - ]) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - // after frame 13, disallow changing from aerial to grounded hadoken - // instead, we enter a landing animation - if (frame > 13.0 || fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n_empty"), - Hash40::new("ken_special_n_empty"), - ])) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) { - if frame < 70.0 { // the autocancel frame - WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - } else { - boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); - } - } -} - -//Bowser & Lucas -unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} - -unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { - // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // - let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); - let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); - let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); - } - else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { - // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // - let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; - EffectModule::kill(fighter.module_accessor, handle, false, false); - let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; - EffectModule::kill(fighter.module_accessor, handle2, false, false); - let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; - EffectModule::kill(fighter.module_accessor, handle3, false, false); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); - } -} - -pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { - if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] - ) { - //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); - if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } - else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, - *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF - ) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - } -} - -// Piranha Plant Ptooie Stance -pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { - let opponent_boma = fighter.get_grabbed_opponent_boma(); - let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); - if grabbed_fighter == *FIGHTER_KIND_PACKUN { - let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); - if new_stance != old_stance { - // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); - VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); - } - } - } -} - -unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { - if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); - } - else { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - -// End of Copy Abilities - unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { let copystatus = StatusModule::status_kind(fighter.module_accessor); if !fighter.is_in_hitlag() @@ -1174,121 +141,11 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod dash_attack_jump_cancels(boma); //disable_dash_attack_slideoff(fighter); //stone_control(fighter); + hammer_swing_drift_landcancel(fighter); fastfall_specials(fighter); cutter_size(boma, status_kind); - reset_flags(fighter, boma, status_kind, situation_kind); - - // Magic Series - magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); - - // Fox Drift and Laser Land Cancel - fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Falco Drift and Laser Land Cancel - falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Water Shuriken Max Dash Cancel - max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cancels - magic_cancels(boma, status_kind, situation_kind, cat[0], frame); - - // Sora Magic Cycle Adjustment - trail_magic_cycle(fighter, boma, frame); - - // Steve Mining - pickel_mining(fighter, boma); - - // Bite Early Throw and Turnaround - bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); - - // Chef Drift and Land Cancel - chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); - - // Nayru's Love Drift and Fast Fall - nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); - - // Hero Dash Cancel Frizz - dash_cancel_frizz(fighter); - - // Wolf Drift and Laser Airdodge Cancel - wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Falcon Punch Turnarounds - repeated_falcon_punch_turnaround(fighter); - - //Blue Eggs Land Cancel - blue_eggs_land_cancels(fighter); - - // Peanut Popgun Airdodge Cancel - peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); - - // Darkest Lariat Ledge Slipoff - lariat_ledge_slipoff(fighter); - - // Bowser Flame Land Cancel - koopa_flame_cancel(boma, status_kind, situation_kind, frame); - - //Bowser Fireball Cooldown - koopa_fireball_cooldown(boma, status_kind); - - // Clown Cannon Shield Cancel - clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); - - // Link's Bow Drift - bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Bonus Fruit Airdodge Cancel - bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Colorless Attack Dash Cancel on Hit - colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); - - // Dark Pit's Bow Land Cancel - pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); - - // Flamethower Land Cancel - plizardon_flame_cancel(boma, status_kind, situation_kind, frame); - - // Metal Blade Airdodge Cancel - blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - - // Simon's Axe Drift - axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Richter's Knife Drift - knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Toon Link's Bow Drift - heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - - // Young Link's Bow Fastfall - fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); - - // Lucas Offense Up - lucas_offense_charge(fighter, boma, situation_kind); - lucas_offense_effct_handler(fighter); - - // Piranha Plant Ptooie Stance - packun_ptooie_stance(fighter, boma, status_kind); - packun_ptooie_scale(boma); - // PM-like Neutral B Cancels - donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); - samus_nspecial_cancels(boma, status_kind, situation_kind); - reflet_nspecial_cancels(boma, status_kind, situation_kind); - sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); - mewtwo_nspecial_cancels(boma, status_kind, situation_kind); - pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); - diddy_nspecial_cancels(fighter, boma, status_kind); - lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - wiifit_nspecial_cancels(boma, status_kind, situation_kind); - pacman_nspecial_cancels(boma, status_kind, situation_kind); - brave_nspecial_cancels(fighter); - edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); - master_nspecial_cancels(boma, status_kind, situation_kind); - ken_air_hado_distinguish(fighter, boma, frame); + copy::kirby_copy_handler(fighter, boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); } pub extern "C" fn kirby_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { @@ -1306,10 +163,6 @@ pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { pub fn install() { smashline::Agent::new("kirby") .on_line(Main, kirby_frame_wrapper) - .on_line(Main, hammer_swing_drift_landcancel) .install(); - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install() } diff --git a/fighters/kirby/src/opff/copy.rs b/fighters/kirby/src/opff/copy.rs new file mode 100644 index 0000000000..f8c61ca5be --- /dev/null +++ b/fighters/kirby/src/opff/copy.rs @@ -0,0 +1,1120 @@ +use super::*; + +// Magic Series +unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + let cat1 = cat[0]; + let cat4 = cat[3]; + // Level 1: Jab and Dash Attack Cancels + if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for tilt attack inputs + if boma.is_cat_flag(Cat1::AttackS3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); + } + if boma.is_cat_flag(Cat1::AttackHi3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); + } + if boma.is_cat_flag(Cat1::AttackLw3) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); + } + + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during dash attack (on hit) + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Level 2: Tilt Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S3, + *FIGHTER_STATUS_KIND_ATTACK_HI3, + *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for smash attack inputs + if boma.is_cat_flag(Cat1::AttackS4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); + } + if boma.is_cat_flag(Cat1::AttackHi4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); + } + if boma.is_cat_flag(Cat1::AttackLw4) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); + } + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs during utilt + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } + + // Smash Cancels + if [*FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4, + *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + // Check for jump inputs + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 + && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) + && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + } + } + + // Aerial Cancels + if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) + || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { + // Check for jump inputs + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { + boma.check_jump_cancel(false, false); + } + // Check for special attack inputs + if boma.is_cat_flag(Cat1::SpecialN) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); + } + if boma.is_cat_flag(Cat1::SpecialS) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); + } + if boma.is_cat_flag(Cat1::SpecialHi) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); + } + if boma.is_cat_flag(Cat1::SpecialLw) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); + } + + //---------------------------------------------------------------------------------------------------------------------- + // Check for command inputs + // Ryu + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); + if boma.is_cat_flag( Cat4::SpecialNCommand) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); + } + if boma.is_cat_flag( Cat4::SpecialN2Command) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); + } + } + // Ken + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); + if boma.is_cat_flag( Cat4::AttackCommand1) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); + } + } + //---------------------------------------------------------------------------------------------------------------------- + + } + } +} + +// Copy Abilities +// Fox Drift and Laser Land Cancel +unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Falco Drift and Laser Land Cancel +unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Wolf Drift and Laser Airdodge Cancel +unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { + if frame > 17.0 { + boma.check_airdodge_cancel(); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Water Shuriken Max Dash Cancel +unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { + if frame > 12.0 { + boma.check_dash_cancel(); + } + } +} + +// Sora Magic Cancels +unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + // Firaga Airdodge Cancel + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { + if frame > 2.0 { + boma.check_airdodge_cancel(); + } + } + // Thundaga Land Cancel + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) + { + let special_n_fire_cancel_frame_ground = 69.0; + let landing_lag = 12.0; + if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); + } + } +} + +// cycles Kirby to firaga after copying Sora +unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if fighter.is_motion(Hash40::new("special_n_drink")) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { + let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); + let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; + if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE + && frame > 3.0 { + WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); + FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder + } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER + && frame > 4.0 { + FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire + } + } +} + +// handles kirby's mining behavior when copying steve +unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { + if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { + VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); + } + + // wait 2 frames before letting the material table advance, preventing any jumps in entries + if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { + if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { + VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); + } else { + VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); + } + } + } +} + +// Bite Early Throw and Turnaround +unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { + if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { + boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { + if frame < 7.0 { + if facing * stick_x < 0.0 { + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); + } + } + } +} + +// Chef Drift and Land Cancel +unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + if StatusModule::is_changing(boma) { + let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; + KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Nayru's Love Drift and Land Cancel +unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { + if situation_kind == *SITUATION_KIND_GROUND { + if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { + //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); + MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); + } + } + else if situation_kind == *SITUATION_KIND_AIR { + if frame >= 31.0 { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } + } +} + +// Hero Dash Cancel Frizz +unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_motion(Hash40::new("brave_special_n1")) + && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF + && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) + { + if fighter.check_dash_cancel() { + let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; + FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); + EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } +} + +// Falcon Punch Turnarounds +unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + let frame = fighter.motion_frame(); + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) + && 22.0 < frame && frame < 41.0 + && fighter.is_stick_backward() + && fighter.stick_x().abs() > 0.1 + { + fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); + } +} + +// Blue Eggs Land Cancel +unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { + if StatusModule::is_changing(fighter.module_accessor) { + return; + } + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && fighter.is_prev_situation(*SITUATION_KIND_AIR) + { + // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame + let special_n_fire_cancel_frame_ground = 49.0; + // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag + let landing_lag = 12.0; + if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); + } + LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); + } +} + +// Peanut Popgun Airdodge Cancel +unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { + boma.check_airdodge_cancel(); + } +} + +//Darkest Lariat Ledge Slipoff +unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); + fighter.sub_transition_group_check_air_cliff(); + } +} + +//Bowser Flame Land Cancel +unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + if frame < 23.0 && !cooleddown { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + MotionModule::set_frame(boma, 22.0, true); + } + } + } +} + +unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + /* //Ignore cooldown during respawn,death,entry and nspecial + if (&[ + *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, + *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, + *FIGHTER_STATUS_KIND_SPECIAL_N + ]).contains(&status_kind) { + return; + } */ + + if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { + let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); + let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); + //If cooling down, remove ready effect + if !cooleddown { + if charged_effect > 0 { + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); + if EffectModule::is_exist_effect(boma, charged_effect as u32) { + EffectModule::kill(boma, charged_effect as u32, false,false); + } + } + return; + } + //Otherwise, spawn effect if effect does not exist + else if (charged_effect <= 0 + || !EffectModule::is_exist_effect(boma, charged_effect as u32)) + { + if (charged_effect <= 0){ + gimmick_flash(boma); + } + let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; + let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; + let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; + VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); + } + } +} + +// Clown Cannon Shield Cancel +unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { + if frame > 16.0 { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { + if situation_kind == *SITUATION_KIND_GROUND { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); + } + } + } + } +} + +// Link's Bow Drift +unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Bonus Fruit Airdodge Cancel +unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if StatusModule::is_changing(boma) { + return; + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { + if frame > 11.0 { + boma.check_airdodge_cancel(); + } + } +} + +// Colorless Attack Dash Cancel on Hit +// This is unique to Kirby due to only having access to colorless attack. +unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { + if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { + boma.check_dash_cancel(); + } + } +} + +// Dark Pit's Bow Land Cancel +unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ + if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, + *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { + if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); + } + } + } + } +} + +// Flamethrower Land Cancel +unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { + let prev_situation = StatusModule::prev_situation_kind(boma); + if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { + return; + } + if StatusModule::is_changing(boma) { + return; + } + if frame < 19.0 { + MotionModule::set_frame(boma, 18.0, true); + } +} + +// Metal Blade Airdodge Cancel +unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { + if boma.status_frame() > 16 { + boma.check_airdodge_cancel(); + } + } +} + +// Simon's Axe Drift +unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Richter's Knife Drift +unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Toon Link's Bow Drift +unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// Young Link's Bow Drift +unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + } + } +} + +// PM-like neutral-b canceling +// Donkey Kong +unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + +// Samus & Dark Samus +unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + } + } + } +} + +// Robin +unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Sheik +unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Mewtwo +unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + if MotionModule::is_end(boma) { + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); + } + } + } +} + +// Squirtle +unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { + //PM-like neutral-b canceling + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { + if situation_kind == *SITUATION_KIND_AIR { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { + if situation_kind == *SITUATION_KIND_AIR { + if boma.is_cat_flag(Cat1::AirEscape) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); + } + } + } +} + +// Diddy Kong +unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + if fighter.is_cat_flag(Cat2::StickEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeF) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if fighter.is_cat_flag(Cat2::StickEscapeB) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + if fighter.sub_check_command_guard().get_bool() { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + } + else { + if fighter.is_cat_flag(Cat1::AirEscape) { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); + } + else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) + && fighter.get_num_used_jumps() < fighter.get_jump_count_max() + { + VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); + fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); + } + } + } +} + +// Lucario +unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { + if boma.is_cat_flag(Cat2::CommonGuard) { + if situation_kind == *SITUATION_KIND_AIR { + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + else { + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); + WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); + StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); + } + } + }***/ + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); + } + } + } +} + +// WiiFit Trainer +unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Pac-Man +unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Hero +unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) + && fighter.is_situation(*SITUATION_KIND_AIR) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR + { + WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); + ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } +} + +// Sephiroth +unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); + ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Mii Gunner +unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { + WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); + } + } + } +} + +// Byleth +unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { + if situation_kind == *SITUATION_KIND_AIR { + if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { + WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); + //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); + } + } + } +} + +// Ken +unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { + if !boma.is_status_one_of(&[ + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, + *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, + ]) { + return; + } + + // set VarModule flag on f12 - this flag changes hado properties + if frame == 12.0 && fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n"), + ]) { + VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + // after frame 13, disallow changing from aerial to grounded hadoken + // instead, we enter a landing animation + if (frame > 13.0 || fighter.is_motion_one_of(&[ + Hash40::new("ken_special_air_n_empty"), + Hash40::new("ken_special_n_empty"), + ])) + && boma.is_situation(*SITUATION_KIND_GROUND) + && boma.is_prev_situation(*SITUATION_KIND_AIR) { + if frame < 70.0 { // the autocancel frame + WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + } else { + boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); + } + } +} + +//Bowser & Lucas +unsafe fn reset_flags(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } +} + +unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { + // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // + let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); + let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); + let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); + } + else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) + && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { + // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // + let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; + EffectModule::kill(fighter.module_accessor, handle, false, false); + let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; + EffectModule::kill(fighter.module_accessor, handle2, false, false); + let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; + EffectModule::kill(fighter.module_accessor, handle3, false, false); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); + } +} + +unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32) { + if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { + if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] + ) { + //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); + if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + } + } + else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, + *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, + *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, + *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF + ) { + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + } +} + +// Piranha Plant Ptooie Stance +unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { + if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { + let opponent_boma = fighter.get_grabbed_opponent_boma(); + let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); + if grabbed_fighter == *FIGHTER_KIND_PACKUN { + let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); + if new_stance != old_stance { + // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); + VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); + } + } + } +} + +unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { + if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); + } + else { + VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); + } +} + +pub unsafe fn kirby_copy_handler(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + if !WorkModule::is_flag(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_FLAG_COPY) { + reset_flags(fighter, boma, status_kind, situation_kind); + return; + } + + let copy = WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA); + + match copy { + // Ryu + 0x3C => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Ken + 0x3D => { + magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); + ken_air_hado_distinguish(fighter, boma, frame); + }, + // Lucario + 0x2C => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Terry + 0x55 => magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame), + // Fox + 0x7 => fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Falco + 0x14 => falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Wolf + 0x2F => wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[1], frame), + // Greninja + 0x35 => max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame), + // Sora + 0x5D => { + magic_cancels(boma, status_kind, situation_kind, cat[0], frame); + trail_magic_cycle(fighter, boma, frame); + }, + // Steve + 0x58 => pickel_mining(fighter, boma), + // Wario + 0x21 => bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame), + // Mr. Game & Watch + 0x1C => chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y), + // Zelda + 0x11 => nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame), + // Hero + 0x53 => { + dash_cancel_frizz(fighter); + brave_nspecial_cancels(fighter); + }, + // Captain Falcon + 0xB => repeated_falcon_punch_turnaround(fighter), + // Banjo & Kazooie + 0x54 => blue_eggs_land_cancels(fighter), + // Diddy Kong + 0x27 => { + peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); + diddy_nspecial_cancels(fighter, boma, status_kind); + }, + // Incineroar + 0x47 => lariat_ledge_slipoff(fighter), + // Bowser + 0xF => { + koopa_flame_cancel(boma, status_kind, situation_kind, frame); + koopa_fireball_cooldown(boma, status_kind); + }, + // Bowser Jr. + 0x3A => clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame), + // Link + 0x2 => bow_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Pac Man + 0x37 => { + bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); + pacman_nspecial_cancels(boma, status_kind, situation_kind); + }, + // Palutena + 0x36 => colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame), + // Dark Pit + 0x1F => pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y), + // Charizard + 0x26 => plizardon_flame_cancel(boma, status_kind, situation_kind, frame), + // Mega Man + 0x31 => blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame), + // Simon + 0x43 => axe_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Richter + 0x44 => knife_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Toon Link + 0x2E => heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y), + // Young Link + 0x17 => fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y), + // Lucas + 0x28 => { + lucas_offense_charge(fighter, boma, situation_kind); + lucas_offense_effct_handler(fighter); + }, + // Piranha Plant + 0x51 => { + packun_ptooie_stance(fighter, boma, status_kind); + packun_ptooie_scale(boma); + }, + // Donkey Kong + 0x1 => donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind), + // Samus + 0x3 => samus_nspecial_cancels(fighter, status_kind, situation_kind), + // Robin + 0x38 => reflet_nspecial_cancels(fighter, status_kind, situation_kind), + // Sheik + 0x10 => sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind), + // Mewtwo + 0x19 => mewtwo_nspecial_cancels(boma, status_kind, situation_kind), + // Squirtle + 0x24 => pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]), + // Lucario + 0x2C => lucario_nspecial_cancels(fighter, status_kind, situation_kind, cat[2]), + // Wii Fit Trainer + 0x32 => wiifit_nspecial_cancels(fighter, status_kind, situation_kind), + // Sephiroth + 0x59 => edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]), + // Mii Gunner + 0x4A => miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]), + // Byleth + 0x56 => master_nspecial_cancels(boma, status_kind, situation_kind), + _ => {} + } +} \ No newline at end of file diff --git a/fighters/packun/src/opff.rs b/fighters/packun/src/opff.rs index 007efe3844..41b54a98cc 100644 --- a/fighters/packun/src/opff.rs +++ b/fighters/packun/src/opff.rs @@ -359,7 +359,7 @@ pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { } let status_kind = StatusModule::status_kind(weapon.module_accessor); let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { + if [*FIGHTER_KIND_PACKUN, *FIGHTER_KIND_KIRBY].contains(&owner_module_accessor.kind()) { if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { println!("will bomb"); From 4a58122d5c5b82302037efd6a8b981b1c229b822 Mon Sep 17 00:00:00 2001 From: Askew Date: Thu, 21 Mar 2024 21:56:55 -0400 Subject: [PATCH 045/172] Krool --- fighters/krool/src/acmd/aerials.rs | 222 ++++--- fighters/krool/src/acmd/ground.rs | 144 +++-- fighters/krool/src/acmd/mod.rs | 16 +- fighters/krool/src/acmd/other.rs | 255 +++----- fighters/krool/src/acmd/smashes.rs | 200 ++++--- fighters/krool/src/acmd/specials.rs | 488 +++++++--------- fighters/krool/src/acmd/throws.rs | 218 ++++--- fighters/krool/src/acmd/tilts.rs | 354 ++++++------ fighters/krool/src/backpack/acmd/mod.rs | 7 + fighters/krool/src/backpack/acmd/specials.rs | 56 ++ fighters/krool/src/backpack/mod.rs | 9 + fighters/krool/src/ironball/acmd/mod.rs | 7 + fighters/krool/src/ironball/acmd/specials.rs | 24 + fighters/krool/src/ironball/mod.rs | 9 + fighters/krool/src/lib.rs | 17 +- fighters/krool/src/opff.rs | 6 +- fighters/krool/src/status.rs | 84 ++- fighters/krool/src/status/special_hi.rs | 576 +++++++++---------- fighters/krool/src/status/special_lw.rs | 104 ++-- 19 files changed, 1371 insertions(+), 1425 deletions(-) create mode 100644 fighters/krool/src/backpack/acmd/mod.rs create mode 100644 fighters/krool/src/backpack/acmd/specials.rs create mode 100644 fighters/krool/src/backpack/mod.rs create mode 100644 fighters/krool/src/ironball/acmd/mod.rs create mode 100644 fighters/krool/src/ironball/acmd/specials.rs create mode 100644 fighters/krool/src/ironball/mod.rs diff --git a/fighters/krool/src/acmd/aerials.rs b/fighters/krool/src/acmd/aerials.rs index ff57b697c4..518c72fd45 100644 --- a/fighters/krool/src/acmd/aerials.rs +++ b/fighters/krool/src/acmd/aerials.rs @@ -1,235 +1,233 @@ use super::*; -unsafe extern "C" fn krool_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 93, 0, 40, 9.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 93, 0, 40, 9.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 120, 0, 13, 8.5, 0.8, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 120, 0, 13, 8.5, 0.8, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn krool_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 6.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 8.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 6.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 11.5, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 10.5, 12.0, Some(0.0), Some(7.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 94, 0, 36, 6.5, 0.0, 11.5, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 97, 0, 36, 7.0, 0.0, 10.5, 12.0, Some(0.0), Some(7.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 30, 4.7, 0.0, 15.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 85, 0, 30, 6.0, 0.0, 11.0, 6.0, Some(0.0), Some(8.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 30, 4.7, 0.0, 15.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 85, 0, 30, 6.0, 0.0, 11.0, 6.0, Some(0.0), Some(8.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn krool_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.867); + FT_MOTION_RATE(agent, 0.867); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 17.0, 361, 87, 0, 45, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 16.0, 361, 87, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("armr"), 19.0, 270, 80, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 19.0, 270, 80, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 19.0, 270, 58, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 19.0, 270, 58, 0, 15, 7.4, 7.7, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn krool_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn krool_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 13, -1, 180, 0, 239, 1.8, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 13, -1, 180, 0, 239, 1.8, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn krool_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - SET_SPEED_EX(fighter, 0, 2.1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 85, 60, 0, 84, 8.6, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + SET_SPEED_EX(agent, 0, 2.1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 85, 60, 0, 84, 8.6, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 52, 0, 85, 6.2, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 52, 0, 85, 6.2, 0.0, 22.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 95.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn krool_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 54, 0, 40, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 8.5, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 7.0, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 15.0, 270, 74, 0, 13, 6.5, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 7.0, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.5, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.0, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 7.0, 0.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.5, 0.0, 1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 85, 0, 23, 6.0, 0.0, 6.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn krool_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -2, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -2, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 18, 0, 90, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_COLOR(fighter, 3, 0.4, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 21.5, 0, 90, 0, 0, 1.8, true, *EF_FLIP_YZ, 1); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 18, 0, 90, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_COLOR(agent, 3, 0.4, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 21.5, 0, 90, 0, 0, 1.8, true, *EF_FLIP_YZ, 1); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -6, 0, 0, 0, 0, 2.3, false, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -6, 0, 0, 0, 0, 2.3, false, 1); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attackairn", krool_attack_air_n_game) - .acmd("game_attackairf", krool_attack_air_f_game) - .acmd("game_attackairb", krool_attack_air_b_game) - .acmd("expression_attackairb", krool_attack_air_b_expression) - .acmd("effect_attackairb", krool_attack_air_b_effect) - .acmd("game_attackairhi", krool_attack_air_hi_game) - .acmd("game_attackairlw", krool_attack_air_lw_game) - .acmd("effect_attackairlw", krool_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/krool/src/acmd/ground.rs b/fighters/krool/src/acmd/ground.rs index 24394a6532..01f97c61f6 100644 --- a/fighters/krool/src/acmd/ground.rs +++ b/fighters/krool/src/acmd/ground.rs @@ -1,22 +1,22 @@ use super::*; -unsafe extern "C" fn krool_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 7.0, 8.5, 8.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.8, 0.0, 10.2, 18.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.5, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.0, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 68, 30, 0, 35, 4.8, 0.0, 10.2, 18.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); // Jab lock Hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 30, 0, 20 , 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 30, 0, 20 , 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } @@ -24,67 +24,67 @@ unsafe extern "C" fn krool_attack_11_game(fighter: &mut L2CAgentBase) { //WorkModule::on_flag(FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART) } -unsafe extern "C" fn krool_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 8.0, 8.0, 8.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 9.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 11.5, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 9.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 8.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 5.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 5.5, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 8.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.5, 361, 30, 0, 25, 4.0, 0.0, 5.5, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("top"), 3.5, 361, 15, 0, 20, 4.4, 0.0, 5.5, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn krool_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("krool_scratch"), Hash40::new("krool_scratch"), Hash40::new("top"), 0, 13, 13, -8, 60, -127, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP_ALPHA(agent, Hash40::new("krool_scratch"), Hash40::new("krool_scratch"), Hash40::new("top"), 0, 13, 13, -8, 60, -127, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.3); } } -unsafe extern "C" fn krool_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 10.0, 10.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 6.0, 0.0, 11.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 4.0, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 80, 0, 59, 6.0, 0.0, 11.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_13_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -104,63 +104,61 @@ unsafe extern "C" fn krool_attack_13_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 45, 70, 0, 60, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 45, 70, 0, 60, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } wait(lua_state, 2.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.88); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 45, 48, 0, 80, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 45, 48, 0, 80, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); JostleModule::set_status(boma, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 52, 0, 92, 5.0, 0.0, 4.0, -8.0, Some(0.0), Some(4.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attack11", krool_attack_11_game) - .acmd("game_attack12", krool_attack_12_game) - .acmd("effect_attack12", krool_attack_12_effect) - .acmd("game_attack13", krool_attack_13_game) - .acmd("effect_attack13", krool_attack_13_effect) - .acmd("game_attackdash", krool_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/krool/src/acmd/mod.rs b/fighters/krool/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/krool/src/acmd/mod.rs +++ b/fighters/krool/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/other.rs b/fighters/krool/src/acmd/other.rs index c87c0e3ec6..62641dec24 100644 --- a/fighters/krool/src/acmd/other.rs +++ b/fighters/krool/src/acmd/other.rs @@ -1,263 +1,164 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) - && !fighter.is_status(*FIGHTER_STATUS_KIND_JUMP_SQUAT) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) + && !agent.is_status(*FIGHTER_STATUS_KIND_JUMP_SQUAT) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_krool_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_krool_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn krool_ironball_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 60, 92, 0, 18, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn krool_ironball_spit_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 60, 87, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn krool_appeal_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); } } -unsafe extern "C" fn krool_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 43, 30, 0, 3.5, 0.0, 3.5, -8.5, Some(0.0), Some(3.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 43, 30, 0, 3.5, 0.0, 3.5, -8.5, Some(0.0), Some(3.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("krool_ironball") - .acmd("game_shoot", krool_ironball_shoot_game) - .acmd("game_spitshoot", krool_ironball_spit_shoot_game) - .install(); - smashline::Agent::new("krool") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("expression_landingheavy", expression_landingheavy) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealsl", krool_appeal_s_game) - .acmd("game_appealsr", krool_appeal_s_game) - .acmd("game_appeallwr", krool_appeal_lw_game) - .acmd("game_appeallwl", krool_appeal_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("game_appeallwl", game_appeallw); } diff --git a/fighters/krool/src/acmd/smashes.rs b/fighters/krool/src/acmd/smashes.rs index d25cc5fdbf..08244c3058 100644 --- a/fighters/krool/src/acmd/smashes.rs +++ b/fighters/krool/src/acmd/smashes.rs @@ -1,167 +1,167 @@ use super::*; -unsafe extern "C" fn krool_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_sttacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.476); + FT_MOTION_RATE(agent, 0.476); frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } - ATTACK(fighter, 1, 1, Hash40::new("bust"), 17.0, 83, 90, 0, 31, 8.0, 7.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 1, Hash40::new("bust"), 17.0, 83, 90, 0, 31, 8.0, 7.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("bust"), 8.0, 83, 84, 0, 32, 6.5, 7.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("bust"), 8.0, 83, 84, 0, 32, 6.5, 7.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 8.0, 361, 45, 0, 60, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 8.0, 361, 45, 0, 60, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 3.0, 290, 5, 0, 80, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 3.0, 290, 5, 0, 80, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("bust"), 3.0, 361, 20, 0, 30, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("bust"), 3.0, 361, 20, 0, 30, 4.0, 7.0, 1.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 5.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 2.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 5.0, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 50, 0, 70, 2.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let top_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; ModelModule::joint_global_position(boma, Hash40::new("top"), top_pos, false); let hip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; @@ -174,70 +174,68 @@ unsafe extern "C" fn krool_attack_lw4_game(fighter: &mut L2CAgentBase) { &Vector2f::zero(), ground, true).is_null() { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, -1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 4.5, -2.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 11.0, -6.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, -1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 4.5, -2.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 15.0, 270, 100, 200, 0, 6.0, 11.0, -6.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 18.0, 361, 80, 0, 65, 6.0, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 7.5, 10.5, Some(0.0), Some(7.5), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 7.5, 10.5, Some(0.0), Some(7.5), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 80, 0, 65, 6.0, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 85, 30, 0, 80, 6.0, 0.0, 5.0, 15.5, Some(0.0), Some(5.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 85, 30, 0, 80, 6.0, 0.0, 5.0, 15.5, Some(0.0), Some(5.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 35, 3, 90, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 35, 3, 90, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true, 0.4); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attacks4hi", krool_attack_s4_hi_game) - .acmd("game_attacks4", krool_attack_s4_s_game) - .acmd("game_attacks4lw", krool_attack_s4_lw_game) - .acmd("game_attackhi4", krool_attack_hi4_game) - .acmd("game_attacklw4", krool_attack_lw4_game) - .acmd("effect_attacklw4", krool_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_sttacks4s); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/krool/src/acmd/specials.rs b/fighters/krool/src/acmd/specials.rs index 0882c86db0..ad4e0ce7ed 100644 --- a/fighters/krool/src/acmd/specials.rs +++ b/fighters/krool/src/acmd/specials.rs @@ -1,229 +1,229 @@ use super::*; use std::convert::TryInto; -unsafe extern "C" fn krool_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 25.0, 16.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); + FT_MOTION_RATE_RANGE(agent, 1.0, 25.0, 16.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if boma.is_button_on(Buttons::AttackRaw) || boma.is_button_on(Buttons::Guard) { - VarModule::on_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); + VarModule::on_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB); } } frame(lua_state, 26.0); - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - FT_MOTION_RATE_RANGE(fighter, 26.0, 37.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + FT_MOTION_RATE_RANGE(agent, 26.0, 37.0, 1.0); } else { - FT_MOTION_RATE_RANGE(fighter, 26.0, 30.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 26.0, 30.0, 5.0); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } } frame(lua_state, 37.0); - FT_MOTION_RATE_RANGE(fighter, 37.0, 70.0, 30.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 37.0, 70.0, 30.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } } -unsafe extern "C" fn krool_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 30.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 31.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT(fighter, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn krool_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n08")); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n07")); + PLAY_SE(agent, Hash40::new("se_krool_special_n07")); } - else if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n01")); + else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + PLAY_SE(agent, Hash40::new("se_krool_special_n01")); } } frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_n09")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n09")); } } -unsafe extern "C" fn krool_special_n_fire_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); } - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 89.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn krool_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - CATCH(fighter, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(18.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 9.5, 10.7, Some(0.0), Some(9.5), Some(20.5), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 160, 100, 50, 0, 9.0, 0.0, 9.0, 22.0, Some(0.0), Some(9.0), Some(27.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + CATCH(agent, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(18.0), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 9.5, 10.7, Some(0.0), Some(9.5), Some(20.5), *FIGHTER_STATUS_KIND_SWALLOWED, *COLLISION_SITUATION_MASK_A); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 160, 100, 50, 0, 9.0, 0.0, 9.0, 22.0, Some(0.0), Some(9.0), Some(27.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } else { - SEARCH(fighter, 0, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(60.0), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true); + SEARCH(agent, 0, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(60.0), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true); } } } -unsafe extern "C" fn krool_special_n_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); +unsafe extern "C" fn effect_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 2.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.75); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); } } wait(lua_state, 10.0); } -unsafe extern "C" fn krool_special_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 180); + if is_excute(agent) { + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 180); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 0.0, 361, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 0.0, 361, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_CROWN, false, 0); VisibilityModule::set_int64(boma, Hash40::new("crown").hash as i64, Hash40::new("crown_hide").hash as i64); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn krool_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); for _ in 0..50 { wait(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn krool_special_hi_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_h02")); } } -unsafe extern "C" fn krool_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK) { - if fighter.is_motion(Hash40::new("special_air_hi")) { + if agent.is_motion(Hash40::new("special_air_hi")) { ArticleModule::change_motion(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, Hash40::new("fly_air"), false, 0.0); } else { ArticleModule::change_motion(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, Hash40::new("fly"), false, 0.0); @@ -232,246 +232,190 @@ unsafe extern "C" fn krool_special_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn krool_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_krool_special_h01")); - PLAY_SE(fighter, Hash40::new("se_common_swing_08")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_krool_special_h01")); + PLAY_SE(agent, Hash40::new("se_common_swing_08")); } } -unsafe extern "C" fn krool_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_jet"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let charge = (VarModule::get_int(boma.object(), vars::krool::instance::SPECIAL_HI_FUEL)); if charge >= 35 { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } else { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn krool_backpack_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack_start"), Hash40::new("backpack"), 0, 5, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - -} - -unsafe extern "C" fn krool_backpack_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let krool = utils::util::get_battle_object_from_accessor(owner_boma); - let damage = 3.0 + (VarModule::get_int(krool, vars::krool::instance::SPECIAL_HI_FUEL) as f32 * 0.158).clamp(0.0, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("wingl1"), damage, 80, 30, 0, 90, 4.5, 2.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn krool_backpack_effect_fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - -} - -unsafe extern "C" fn krool_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); } frame(lua_state, 7.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 - && ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 + && ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { - let damage = VarModule::get_float(fighter.battle_object, vars::krool::instance::STORED_DAMAGE) / 5.0; - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0 + damage, 50, 90, 0, 50, 10.5, 0.0, 10.75, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + let damage = VarModule::get_float(agent.battle_object, vars::krool::instance::STORED_DAMAGE) / 5.0; + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0 + damage, 50, 90, 0, 50, 10.5, 0.0, 10.75, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 69, 90, 0, 70, 9.0, 0.0, 10.0, 4.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 69, 90, 0, 70, 9.0, 0.0, 10.0, 4.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { AttackModule::clear_all(boma); } } frame(lua_state, 33.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn krool_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_success_body"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_success_body_l"), true, true); - EFFECT(fighter, Hash40::new("krool_counter_success"), Hash40::new("top"), 0, 3.25, 0.75, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_success_body"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_success_body_l"), true, true); + EFFECT(agent, Hash40::new("krool_counter_success"), Hash40::new("top"), 0, 3.25, 0.75, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - let charged = VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + if is_excute(agent) { + let charged = VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 12, 6, 0, 0, 0, 0.9, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 12, 6, 0, 0, 0, 0.9, false); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack_body_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack"), Hash40::new("top"), 6, 12, 15, -90, 30, 0, 0.4, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack_body_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack"), Hash40::new("top"), 6, 12, 15, -90, 30, 0, 0.4, false); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack2"), Hash40::new("top"), 6, 12, 4, 0, 25, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack2"), Hash40::new("top"), 6, 12, 4, 0, 25, 0, 1, false); } } else { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack_body"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack"), Hash40::new("top"), -6, 12, 15, -90, -30, 0, 0.4, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack_body"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack"), Hash40::new("top"), -6, 12, 15, -90, -30, 0, 0.4, false); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("krool_counter_attack2"), Hash40::new("top"), -6, 12, 4, 0, -25, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("krool_counter_attack2"), Hash40::new("top"), -6, 12, 4, 0, -25, 0, 1, false); } } } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("krool_counter_attack2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("krool_counter_attack2"), false, true); } } -unsafe extern "C" fn krool_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l01")); - PLAY_SE(fighter, Hash40::new("vc_krool_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_l01")); + PLAY_SE(agent, Hash40::new("vc_krool_special_l01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_smash_h01")); - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l02")); - PLAY_SE(fighter, Hash40::new("se_krool_special_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_smash_h01")); + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) { + PLAY_SE(agent, Hash40::new("se_krool_special_l02")); + PLAY_SE(agent, Hash40::new("se_krool_special_l05")); } } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_l03")); } } -unsafe extern "C" fn krool_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -pub fn install() { - smashline::Agent::new("krool_backpack") - .acmd("effect_start", krool_backpack_start_effect) - .acmd("game_fly", krool_backpack_fly_game) - .acmd("game_flywind", krool_backpack_fly_game) - .acmd("effect_fly", krool_backpack_effect_fly) - .install(); - smashline::Agent::new("krool") - .acmd("game_specialnfire", krool_special_n_fire_game) - .acmd("game_specialairnfire", krool_special_n_fire_game) - .acmd("effect_specialnfire", krool_special_n_fire_effect) - .acmd("effect_specialairnfire", krool_special_n_fire_effect) - .acmd("sound_specialnfire", krool_special_n_fire_sound) - .acmd("sound_specialairnfire", krool_special_n_fire_sound) - .acmd("expression_specialnfire", krool_special_n_fire_expression) - .acmd("expression_specialairnfire", krool_special_n_fire_expression) - .acmd("game_specialnloop", krool_special_n_loop_game) - .acmd("game_specialairnloop", krool_special_n_loop_game) - .acmd("effect_specialnloop", krool_special_n_loop_effect) - .acmd("effect_specialairnloop", krool_special_n_loop_effect) - .acmd("game_specialsthrow", krool_special_special_s_game) - .acmd("game_specialairsthrow", krool_special_special_s_game) - .acmd("effect_specialhistart", krool_special_hi_start_effect) - .acmd("sound_specialhistart", krool_special_hi_start_sound) - .acmd("sound_specialairhistart", krool_special_hi_start_sound) - .acmd("game_specialhi", krool_special_hi_game) - .acmd("effect_specialhi", krool_special_hi_effect) - .acmd("sound_specialhi", krool_special_hi_sound) - .acmd("expression_specialhi", krool_special_hi_expression) - .acmd("game_speciallw", krool_special_lw_game) - .acmd("game_specialairlw", krool_special_lw_game) - .acmd("effect_speciallw", krool_special_lw_effect) - .acmd("effect_specialairlw", krool_special_lw_effect) - .acmd("sound_speciallw", krool_special_lw_sound) - .acmd("sound_specialairlw", krool_special_lw_sound) - .acmd("expression_speciallw", krool_special_lw_expression) - .acmd("expression_specialairlw", krool_special_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialnfire", sound_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialnfire); + agent.acmd("expression_specialnfire", expression_specialnfire); + agent.acmd("expression_specialairnfire", expression_specialnfire); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnloop", game_specialnloop); + agent.acmd("effect_specialnloop", effect_specialnloop); + agent.acmd("effect_specialairnloop", effect_specialnloop); + agent.acmd("game_specialsthrow", game_specials); + agent.acmd("game_specialairsthrow", game_specials); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("sound_specialhistart", sound_specialhistart); + agent.acmd("sound_specialairhistart", sound_specialhistart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/throws.rs b/fighters/krool/src/acmd/throws.rs index 37db3c4b14..a76275d229 100644 --- a/fighters/krool/src/acmd/throws.rs +++ b/fighters/krool/src/acmd/throws.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn krool_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.4, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(15.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.4, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(15.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn krool_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn krool_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -64,205 +64,203 @@ unsafe extern "C" fn krool_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn krool_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 60, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 1.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 1.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 6.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 50, 0, 70, 6.0, 0.0, 3.0, 21.0, Some(0.0), Some(3.0), Some(23.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("arml"), 7.0, 361, 50, 0, 70, 6.0, 4.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 7.0, 361, 50, 0, 70, 6.0, 0.0, 3.0, 21.0, Some(0.0), Some(3.0), Some(23.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 24, 0); + CHECK_FINISH_CAMERA(agent, 24, 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn krool_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 35, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 35, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 31, 2); + CHECK_FINISH_CAMERA(agent, 31, 2); } frame(lua_state, 32.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn krool_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 90, 50, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 90, 50, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - CHECK_FINISH_CAMERA(fighter, 3, 10); + CHECK_FINISH_CAMERA(agent, 3, 10); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO));; + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO));; } frame(lua_state, 55.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_GROUND); - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_GROUND); + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND); } } -unsafe extern "C" fn krool_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 270, 30, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 270, 30, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 0.0, y: -5.0, z: 6.868900}, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); //WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KROOL_STATUS_THROW_LW_FLAG_BURY); } frame(lua_state, 54.0); { - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } } -unsafe extern "C" fn krool_special_n_spit_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnspitf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT_TYPE_DECIDE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 38.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 38.0, 16.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); } } -unsafe extern "C" fn krool_special_n_spit_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_specialnspitb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 0, 1.0, 1.0, *ATTACK_LR_CHECK_POS, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 16.0, 42, 54, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 50.0, 23.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 50.0, 23.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SPIT); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); WorkModule::on_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_IRONBALL); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_catch", krool_catch_game) - .acmd("game_catchdash", krool_catch_dash_game) - .acmd("game_catchturn", krool_catch_turn_game) - .acmd("game_throwf", krool_throw_f_game) - .acmd("game_throwb", krool_throw_b_game) - .acmd("game_throwhi", krool_throw_hi_game) - .acmd("game_throwlw", krool_throw_lw_game) - .acmd("game_specialnspitf", krool_special_n_spit_f_game) - .acmd("game_specialairnspitf", krool_special_n_spit_f_game) - .acmd("game_specialnspitb", krool_special_n_spit_b_game) - .acmd("game_specialairnspitb", krool_special_n_spit_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_specialnspitf", game_specialnspitf); + agent.acmd("game_specialairnspitf", game_specialnspitf); + agent.acmd("game_specialnspitb", game_specialnspitb); + agent.acmd("game_specialairnspitb", game_specialnspitb); } diff --git a/fighters/krool/src/acmd/tilts.rs b/fighters/krool/src/acmd/tilts.rs index 6cddbcd10e..56707e6054 100644 --- a/fighters/krool/src/acmd/tilts.rs +++ b/fighters/krool/src/acmd/tilts.rs @@ -1,340 +1,338 @@ use super::*; -unsafe extern "C" fn krool_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 7.0, 14.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 7.0, 14.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 11, 5, 30, -49, -19, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 10, 5, -15, -48, -124, 1.4, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 11, 5, 30, -49, -19, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 10, 5, -15, -48, -124, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 6, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 6, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn krool_attack_s3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s01")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s02")); - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s02")); + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } wait(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_attackhard_s02")); - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_s03")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_attackhard_s02")); + PLAY_SE(agent, Hash40::new("se_krool_attackhard_s03")); } } -unsafe extern "C" fn krool_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 2.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 2.0, 5.0); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 4.0, 2.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + FT_MOTION_RATE_RANGE(agent, 2.0, 4.0, 2.0); + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 4.0, 2.2, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0 + damage, 84, 63, 0, 76, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 5.0, 7.5, 2.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 4.0, 2.2, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0 + damage, 84, 63, 0, 76, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0 + damage, 84, 63, 0, 76, 5.0, 7.5, 2.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } wait(lua_state, 3.0); - if is_excute(fighter) { - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.05 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, 2.2, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0 + damage, 84, 49, 0, 60, 5.0, 7.0, 2.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, shieldstun); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, 2.2, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0 + damage, 84, 49, 0, 60, 4.0, -1.0, 0.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0 + damage, 84, 49, 0, 60, 5.0, 7.0, 2.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 38.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 38.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn krool_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_h01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } wait(lua_state, 1.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_krool_attackhard_h01")); - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_h02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_krool_attackhard_h01")); + PLAY_SE(agent, Hash40::new("se_krool_attackhard_h02")); } } -unsafe extern "C" fn krool_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - if WorkModule::get_float(fighter.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if is_excute(agent) { + if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.15 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); // ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0 + damage, 270, 35, 0, 100, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0 + damage, 270, 35, 0, 100, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // air-only - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0 + damage, 361, 85, 0, 40, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, shieldstun); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0 + damage, 361, 85, 0, 40, 5.0, 2.5, -1.5, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, shieldstun); } frame(lua_state, 14.0); - if is_excute(fighter) { - let charge = VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE); let damage = 0.05 * (charge as f32); let hitlag = 1.0 + 0.025 * (charge as f32); let shieldstun = 1.0 + 0.02 * (charge as f32); // ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 100, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0 + damage, 85, 25, 0, 100, 5.0, 0.0, 3.5, 10.0, Some(0.0), Some(3.5), Some(23.0), hitlag * 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 100, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0 + damage, 85, 25, 0, 100, 5.0, 0.0, 3.5, 10.0, Some(0.0), Some(3.5), Some(23.0), hitlag * 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 30, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0 + damage, 270, 35, 0, 30, 5.0, 0.0, 3.5, 16.5, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 2, shieldstun); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 2, shieldstun); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn krool_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -3, 24, 12, 70, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.6); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("krool_smash_lw_ground"), Hash40::new("krool_smash_lw_ground"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 20, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn krool_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_l01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_krool_rnd_attack")); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::krool::status::CURRENT_CHARGE) == 0 { + PLAY_SEQUENCE(agent, Hash40::new("seq_krool_rnd_attack")); } } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_krool_attackhard_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_attackhard_l02")); } } -pub fn install() { - smashline::Agent::new("krool") - .acmd("game_attacks3hi", krool_attack_s3_hi_game) - .acmd("effect_attacks3hi", krool_attack_s3_hi_effect) - .acmd("game_attacks3", krool_attack_s3_s_game) - .acmd("effect_attacks3", krool_attack_s3_effect) - .acmd("game_attacks3lw", krool_attack_s3_lw_game) - .acmd("effect_attacks3lw", krool_attack_s3_lw_effect) - .acmd("sound_attacks3hi", krool_attack_s3_sound) - .acmd("sound_attacks3", krool_attack_s3_sound) - .acmd("sound_attacks3lw", krool_attack_s3_sound) - .acmd("game_attackhi3", krool_attack_hi3_game) - .acmd("sound_attackhi3", krool_attack_hi3_sound) - .acmd("game_attacklw3", krool_attack_lw3_game) - .acmd("effect_attacklw3", krool_attack_lw3_effect) - .acmd("sound_attacklw3", krool_attack_lw3_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3s); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("sound_attacks3hi", sound_attacks3); + agent.acmd("sound_attacks3", sound_attacks3); + agent.acmd("sound_attacks3lw", sound_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); } diff --git a/fighters/krool/src/backpack/acmd/mod.rs b/fighters/krool/src/backpack/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/krool/src/backpack/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/krool/src/backpack/acmd/specials.rs b/fighters/krool/src/backpack/acmd/specials.rs new file mode 100644 index 0000000000..ad07212a85 --- /dev/null +++ b/fighters/krool/src/backpack/acmd/specials.rs @@ -0,0 +1,56 @@ +use super::*; + +unsafe extern "C" fn effect_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack_start"), Hash40::new("backpack"), 0, 5, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let krool = utils::util::get_battle_object_from_accessor(owner_boma); + let damage = 3.0 + (VarModule::get_int(krool, vars::krool::instance::SPECIAL_HI_FUEL) as f32 * 0.158).clamp(0.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("wingl1"), damage, 80, 30, 0, 90, 4.5, 2.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("krool_propeller"), Hash40::new("propeller"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_start", effect_start); + agent.acmd("game_fly", game_fly); + agent.acmd("game_flywind", game_fly); + agent.acmd("effect_fly", effect_fly); +} \ No newline at end of file diff --git a/fighters/krool/src/backpack/mod.rs b/fighters/krool/src/backpack/mod.rs new file mode 100644 index 0000000000..1f86844df9 --- /dev/null +++ b/fighters/krool/src/backpack/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("krool_backpack"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/krool/src/ironball/acmd/mod.rs b/fighters/krool/src/ironball/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/krool/src/ironball/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/krool/src/ironball/acmd/specials.rs b/fighters/krool/src/ironball/acmd/specials.rs new file mode 100644 index 0000000000..9a02f76aef --- /dev/null +++ b/fighters/krool/src/ironball/acmd/specials.rs @@ -0,0 +1,24 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 60, 92, 0, 18, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_spitshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 87, 0, 55, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_spitshoot", game_spitshoot); +} \ No newline at end of file diff --git a/fighters/krool/src/ironball/mod.rs b/fighters/krool/src/ironball/mod.rs new file mode 100644 index 0000000000..24b84d67ab --- /dev/null +++ b/fighters/krool/src/ironball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("krool_ironball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/krool/src/lib.rs b/fighters/krool/src/lib.rs index 443a84d310..04c94d0a0a 100644 --- a/fighters/krool/src/lib.rs +++ b/fighters/krool/src/lib.rs @@ -39,12 +39,21 @@ pub mod opff; pub mod vtable_hook; pub use status::krool_belly_damage_hook_impl; +// articles +mod backpack; +mod ironball; + pub fn install() { - acmd::install(); - status::install(); - opff::install(); - use opff::*; + let agent = &mut Agent::new("krool"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + backpack::install(); + ironball::install(); // prevents shield break on belly + use opff::*; skyline::patching::Patch::in_text(0xc04f00).data(0x1400001Eu32); } \ No newline at end of file diff --git a/fighters/krool/src/opff.rs b/fighters/krool/src/opff.rs index 74f34eca88..baa1954f04 100644 --- a/fighters/krool/src/opff.rs +++ b/fighters/krool/src/opff.rs @@ -117,8 +117,6 @@ pub unsafe fn krool_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("krool") - .on_line(Main, krool_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, krool_frame_wrapper); } \ No newline at end of file diff --git a/fighters/krool/src/status.rs b/fighters/krool/src/status.rs index 93d85f9547..233c4d0940 100644 --- a/fighters/krool/src/status.rs +++ b/fighters/krool/src/status.rs @@ -6,30 +6,30 @@ mod special_lw; // FIGHTER_STATUS_KIND_ATTACK_LW4 // -pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); - fighter.attack_lw4_mtrans(); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.status_ThrowKirby_Uniq(L2CValue::Bool(false)); +pub unsafe extern "C" fn attack_lw4_main(agent: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); + agent.attack_lw4_mtrans(); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + if !StopModule::is_stop(agent.module_accessor) { + agent.status_ThrowKirby_Uniq(L2CValue::Bool(false)); } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(krool_attack_lw4_main_loop as *const () as _)) + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); + agent.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) } -pub unsafe extern "C" fn krool_attack_lw4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(fighter.module_accessor) - && !WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) - && !MotionModule::is_end(fighter.module_accessor) { - fighter.sub_status_uniq_process_ThrowKirby_execFixPos(); +pub unsafe extern "C" fn attack_lw4_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(agent.module_accessor) + && !WorkModule::is_enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) + && !MotionModule::is_end(agent.module_accessor) { + agent.sub_status_uniq_process_ThrowKirby_execFixPos(); return 0.into() } - fighter.status_AttackLw4_Main() + agent.status_AttackLw4_Main() } -pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let prev_frame = MotionModule::prev_frame(fighter.module_accessor); +pub unsafe extern "C" fn attack_lw4_map_correction(agent: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(agent.module_accessor); + let prev_frame = MotionModule::prev_frame(agent.module_accessor); let start_air_frame = 2.0; let fall_start_frame = 19.0; let fall_stop_frame = 20.0; @@ -39,31 +39,31 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo return 0.into() } if prev_frame < start_air_frame && frame >= start_air_frame { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if agent.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { if prev_frame < fall_stop_frame && frame >= fall_stop_frame { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_add(fighter.lua_state_agent); - MotionModule::set_frame(fighter.module_accessor, fall_stop_frame, true); - MotionModule::set_rate(fighter.module_accessor, 0.0); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_mul(agent.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_add(agent.lua_state_agent); + MotionModule::set_frame(agent.module_accessor, fall_stop_frame, true); + MotionModule::set_rate(agent.module_accessor, 0.0); } } else { if frame < landing_frame { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - MotionModule::set_frame(fighter.module_accessor, landing_frame, true); - MotionModule::set_rate(fighter.module_accessor, 1.0); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + MotionModule::set_frame(agent.module_accessor, landing_frame, true); + MotionModule::set_rate(agent.module_accessor, 1.0); } } 0.into() @@ -114,11 +114,9 @@ pub unsafe extern "C" fn krool_belly_damage_hook_impl(damage: f32, fighter: *mut // // ...as_mut() &= logic // } -pub fn install() { - special_hi::install(); - special_lw::install(); - smashline::Agent::new("krool") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction) - .install(); +pub fn install(agent: &mut Agent) { + special_hi::install(agent); + special_lw::install(agent); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } \ No newline at end of file diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index 9aaaccb7d6..7398d35495 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -1,55 +1,55 @@ use super::*; use std::convert::TryInto; -unsafe extern "C" fn special_hi_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); - ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(fighter, Hash40::new("special_hi_start"), true, false); +unsafe extern "C" fn special_hi_start_main(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); + ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if agent.is_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(agent, Hash40::new("special_hi_start"), true, false); } else { - special_hi_change_motion(fighter, Hash40::new("special_air_hi_start"), false, false); + special_hi_change_motion(agent, Hash40::new("special_air_hi_start"), false, false); } - VarModule::set_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL, 0); - special_hi_set_physics(fighter); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_start_helper as *const () as _)); + VarModule::set_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL, 0); + special_hi_set_physics(agent); + if !StopModule::is_stop(agent.module_accessor) { + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_start_helper as *const () as _)); } - GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_start_main_loop as *const () as _)) + GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_start_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || !fighter.sub_air_check_fall_common().get_bool() { +unsafe extern "C" fn special_hi_start_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || !agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } - let rise_min_frame = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "param_special_hi.rise_min_frame"); - if MotionModule::is_end(fighter.module_accessor) || - ((rise_min_frame..MotionModule::end_frame(fighter.module_accessor) as i32).contains(&fighter.status_frame()) - && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL)) { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI.into(), false.into()); + let rise_min_frame = ParamModule::get_int(agent.battle_object, ParamType::Agent, "param_special_hi.rise_min_frame"); + if MotionModule::is_end(agent.module_accessor) || + ((rise_min_frame..MotionModule::end_frame(agent.module_accessor) as i32).contains(&agent.status_frame()) + && ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL)) { + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI.into(), false.into()); } else { - if fighter.status_frame() > rise_min_frame { - if fighter.is_situation(*SITUATION_KIND_GROUND) && (fighter.status_frame() + rise_min_frame) % 15 == 0 { - EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_ZX); + if agent.status_frame() > rise_min_frame { + if agent.is_situation(*SITUATION_KIND_GROUND) && (agent.status_frame() + rise_min_frame) % 15 == 0 { + EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_ZX); } - if fighter.status_frame() <= 50 { - VarModule::inc_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL); + if agent.status_frame() <= 50 { + VarModule::inc_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL); } } - if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - special_hi_change_motion(fighter, Hash40::new("special_air_hi_start"), false, true); + if agent.is_prev_situation(*SITUATION_KIND_GROUND) { + if agent.is_situation(*SITUATION_KIND_AIR) { + special_hi_change_motion(agent, Hash40::new("special_air_hi_start"), false, true); } } else { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(fighter, Hash40::new("special_hi_start"), true, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(agent, Hash40::new("special_hi_start"), true, true); } } } @@ -57,84 +57,84 @@ unsafe extern "C" fn special_hi_start_main_loop(fighter: &mut L2CFighterCommon) return 0.into() } -unsafe extern "C" fn special_hi_start_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_krool_special_h02"), 0); +unsafe extern "C" fn special_hi_start_exit(agent: &mut L2CFighterCommon) -> L2CValue { + SoundModule::stop_se(agent.module_accessor, Hash40::new("se_krool_special_h02"), 0); return 0.into() } -unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FLY, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(fighter, Hash40::new("special_hi"), false, false); +unsafe extern "C" fn special_hi_main(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FLY, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if agent.is_prev_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(agent, Hash40::new("special_hi"), false, false); } else { - special_hi_change_motion(fighter, Hash40::new("special_air_hi"), false, false); + special_hi_change_motion(agent, Hash40::new("special_air_hi"), false, false); } - fighter.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_UNIQ); - special_hi_set_physics(fighter); - WorkModule::set_float(fighter.module_accessor, 0.5, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + agent.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_UNIQ); + special_hi_set_physics(agent); + WorkModule::set_float(agent.module_accessor, 0.5, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); + if !StopModule::is_stop(agent.module_accessor) { + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); } - GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) + GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || !fighter.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || !agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } - let param_brake_after_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_after_frame")); - let brake_after_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + let param_brake_after_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_after_frame")); + let brake_after_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); if brake_after_frame > param_brake_after_frame { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END.into(), false.into()); + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END.into(), false.into()); return 0.into() } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - let start_air_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_air_frame")); - if fighter.global_table[CURRENT_FRAME].get_i32() > start_air_frame { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if agent.is_situation(*SITUATION_KIND_GROUND) { + let start_air_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_air_frame")); + if agent.global_table[CURRENT_FRAME].get_i32() > start_air_frame { + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } } return 0.into() } -unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_TOP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_air_end"), 0.0, 1.0, false, 0.0, false, false); - special_hi_lerp_motion(fighter, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); - special_hi_set_physics(fighter); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); - GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_end_main(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_TOP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_hi_air_end"), 0.0, 1.0, false, 0.0, false, false); + special_hi_lerp_motion(agent, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); + special_hi_set_physics(agent); + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_end_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if !CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } else { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL.into(), false.into()); } } - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || !fighter.sub_air_check_fall_common().get_bool() { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || !agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } @@ -142,23 +142,23 @@ unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> return 0.into() } -unsafe extern "C" fn special_hi_fall_main(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FALL, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - special_hi_change_motion(fighter, Hash40::new("special_hi_fall"), false, true); - special_hi_lerp_motion(fighter, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); - special_hi_set_physics(fighter); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); - GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_fall_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_fall_main(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FALL, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + special_hi_change_motion(agent, Hash40::new("special_hi_fall"), false, true); + special_hi_lerp_motion(agent, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); + special_hi_set_physics(agent); + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + agent.sub_shift_status_main(L2CValue::Ptr(special_hi_fall_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_fall_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_fall_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if !CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } // else { // let fall_special_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_special_spd_y"); @@ -169,8 +169,8 @@ unsafe extern "C" fn special_hi_fall_main_loop(fighter: &mut L2CFighterCommon) - // fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); // } // } - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || !fighter.sub_air_check_fall_common().get_bool() { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || !agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } @@ -179,19 +179,19 @@ unsafe extern "C" fn special_hi_fall_main_loop(fighter: &mut L2CFighterCommon) - } //FUN_7100023a20 -unsafe extern "C" fn special_hi_start_helper(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_start_helper(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - fighter.clear_lua_stack(); - lua_args!(fighter, *FIGHTER_KINETIC_ENERGY_ID_STOP); - let mut speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, *FIGHTER_KINETIC_ENERGY_ID_STOP); + let mut speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); let square_y = speed_y * speed_y; if square_y < 0.0 { - let move_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - WorkModule::set_float(fighter.module_accessor, -(move_y.abs()), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let move_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + WorkModule::set_float(agent.module_accessor, -(move_y.abs()), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); } else { - let move_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - WorkModule::set_float(fighter.module_accessor, move_y.abs(), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let move_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + WorkModule::set_float(agent.module_accessor, move_y.abs(), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); } } @@ -199,155 +199,155 @@ unsafe extern "C" fn special_hi_start_helper(fighter: &mut L2CFighterCommon, par } // FUN_710001dba0 -unsafe extern "C" fn special_hi_change_motion(fighter: &mut L2CFighterCommon, motion: Hash40, ground: bool, inherit: bool) { +unsafe extern "C" fn special_hi_change_motion(agent: &mut L2CFighterCommon, motion: Hash40, ground: bool, inherit: bool) { if ground { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); } else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } if inherit { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, motion, -1.0, 1.0, 0.0, false, false); + MotionModule::change_motion_inherit_frame(agent.module_accessor, motion, -1.0, 1.0, 0.0, false, false); } else { - MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(agent.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } } // FUN_710001ea30 -unsafe extern "C" fn special_hi_set_physics(fighter: &mut L2CFighterCommon) { - let mut speed_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let mut speed_y = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START) { - let start_mul_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_mul_spd_x")); - let start_air_mul_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_x")); - let start_brake_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_brake_x"); - let start_limit_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_limit_spd_x"); - let start_air_mul_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_y")); - let start_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_max_spd_y")); - let start_stable_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_stable_spd_y"); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); +unsafe extern "C" fn special_hi_set_physics(agent: &mut L2CFighterCommon) { + let mut speed_x = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let mut speed_y = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START) { + let start_mul_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_mul_spd_x")); + let start_air_mul_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_x")); + let start_brake_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_brake_x"); + let start_limit_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_limit_spd_x"); + let start_air_mul_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_y")); + let start_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_max_spd_y")); + let start_stable_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_stable_spd_y"); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); speed_y *= start_air_mul_spd_y; speed_y = speed_y.clamp(-start_max_spd_y, start_max_spd_y); let start_acl_y = if speed_y <= 0.0 { 1.0 } else { -1.0 }; - speed_x *= if fighter.is_situation(*SITUATION_KIND_GROUND) { start_mul_spd_x } else { start_air_mul_spd_x }; - - sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_acl_y); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_max_spd_y); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_stable_spd_y); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); - - sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, start_brake_x, 0.0); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, start_limit_spd_x, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { - let fly_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); - let fly_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_y")); - let charge_frames = VarModule::get_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL) as f32; - let fly_charge_min_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_x"); - let fly_charge_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_x_mul"); - let mut fly_limit_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_limit_spd_x"); - fly_limit_spd_x *= PostureModule::lr(fighter.module_accessor); - let fly_charge_min_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_y"); - let fly_charge_y_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_y_mul"); + speed_x *= if agent.is_situation(*SITUATION_KIND_GROUND) { start_mul_spd_x } else { start_air_mul_spd_x }; + + sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_acl_y); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_max_spd_y); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_stable_spd_y); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); + + sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, start_brake_x, 0.0); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, start_limit_spd_x, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { + let fly_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); + let fly_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_y")); + let charge_frames = VarModule::get_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL) as f32; + let fly_charge_min_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_x"); + let fly_charge_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_x_mul"); + let mut fly_limit_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_limit_spd_x"); + fly_limit_spd_x *= PostureModule::lr(agent.module_accessor); + let fly_charge_min_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_y"); + let fly_charge_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_y_mul"); // accounts for 50 max charge frames (this ended up being 38 in practice, oops) - let calc_charge_x = (fly_charge_min_spd_x + (charge_frames * fly_charge_x_mul)) * PostureModule::lr(fighter.module_accessor); + let calc_charge_x = (fly_charge_min_spd_x + (charge_frames * fly_charge_x_mul)) * PostureModule::lr(agent.module_accessor); let calc_charge_y = fly_charge_min_spd_y + (charge_frames * fly_charge_y_mul); // max x: 0.97, max y: 3.0 - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, calc_charge_y); - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_acl_y); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fly_max_spd_y); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); - - sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fly_limit_spd_x, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { - let max_sum_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_max_sum_spd_y")); - let fall_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); - let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); - let fall_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); - let fall_stick_mul_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //unused - let fall_brake_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_brake_x"); - let mut fall_stable_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_stable_spd_x"); - fall_stable_spd_x *= PostureModule::lr(fighter.module_accessor); - let fall_limit_speed_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_limit_spd_x"); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, calc_charge_y); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_acl_y); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fly_max_spd_y); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); + + sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fly_limit_spd_x, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { + let max_sum_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_max_sum_spd_y")); + let fall_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); + let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); + let fall_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); + let fall_stick_mul_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //unused + let fall_brake_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_brake_x"); + let mut fall_stable_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_stable_spd_x"); + fall_stable_spd_x *= PostureModule::lr(agent.module_accessor); + let fall_limit_speed_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_limit_spd_x"); if speed_y >= max_sum_spd_y { speed_y = max_sum_spd_y; } speed_x = speed_x.clamp(-fall_max_spd_x, fall_max_spd_x); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_max_spd_y); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); - - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_brake_x, 0.0); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_limit_speed_x, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_stable_spd_x, 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { - let fall_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); - let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); - - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); - - sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 2.0, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_max_spd_y); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); + + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_brake_x, 0.0); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_limit_speed_x, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_stable_spd_x, 0.0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { + let fall_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); + let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); + + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); + + sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 2.0, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); } } //FUN_71000210d0 -unsafe extern "C" fn special_hi_movement_helper(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_movement_helper(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - let gravity_minus = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y_speed_minus")); //hash40("special_hi_fly_acl_y_speed_minus") - let acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); //hash40("special_hi_fly_acl_y") - let touch_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_touch_max_spd_x")); //hash40("special_hi_fly_touch_max_spd_x") - let max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_x")); //hash40("special_hi_fly_max_spd_x") - let stick_mul_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_max_spd_x")); //hash40("special_hi_fly_stick_mul_max_spd_x") - let stick_mul_acl_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_acl_spd_y")); //hash40("special_hi_fly_stick_mul_acl_spd_y") - let brake_movement_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_movement_y")); //hash40("special_hi_fly_brake_movement_y") - let fly_brake_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_y")); //hash40("special_hi_fly_brake_y") - let fall_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); //hash40("special_hi_fall_max_spd_x") - let fall_stick_mul_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //hash40("special_hi_fall_stick_mul_max_spd_y") - let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); //hash40("special_hi_fall_max_spd_y") - let unknown_param = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), 0x1f32a7c5bf); + let gravity_minus = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y_speed_minus")); //hash40("special_hi_fly_acl_y_speed_minus") + let acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); //hash40("special_hi_fly_acl_y") + let touch_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_touch_max_spd_x")); //hash40("special_hi_fly_touch_max_spd_x") + let max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_x")); //hash40("special_hi_fly_max_spd_x") + let stick_mul_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_max_spd_x")); //hash40("special_hi_fly_stick_mul_max_spd_x") + let stick_mul_acl_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_acl_spd_y")); //hash40("special_hi_fly_stick_mul_acl_spd_y") + let brake_movement_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_movement_y")); //hash40("special_hi_fly_brake_movement_y") + let fly_brake_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_y")); //hash40("special_hi_fly_brake_y") + let fall_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); //hash40("special_hi_fall_max_spd_x") + let fall_stick_mul_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //hash40("special_hi_fall_stick_mul_max_spd_y") + let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); //hash40("special_hi_fall_max_spd_y") + let unknown_param = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), 0x1f32a7c5bf); let mut stick_mul_x_delta; //l160 let mut stick_mul_acl_y_delta; //l170 let mut stick_mul_fall_y_delta; //l180 @@ -356,86 +356,86 @@ unsafe extern "C" fn special_hi_movement_helper(fighter: &mut L2CFighterCommon, stick_mul_x_delta = 1.0; } else { - stick_mul_x_delta = (stick_mul_max_spd_x - 1.0) * fighter.stick_x() + 1.0; + stick_mul_x_delta = (stick_mul_max_spd_x - 1.0) * agent.stick_x() + 1.0; } - if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == (*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL | *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { + if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == (*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL | *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { stick_mul_x_delta = 1.0; } if stick_mul_acl_spd_y >= 1.0 { stick_mul_acl_y_delta = 1.0; } else { - stick_mul_acl_y_delta = 1.0 - (1.0 - stick_mul_acl_spd_y) * fighter.stick_x(); + stick_mul_acl_y_delta = 1.0 - (1.0 - stick_mul_acl_spd_y) * agent.stick_x(); } if fall_stick_mul_max_spd_y <= 1.0 { stick_mul_fall_y_delta = 1.0; } else { - stick_mul_fall_y_delta = 1.0 + (fall_stick_mul_max_spd_y - 1.0) * fighter.stick_x(); + stick_mul_fall_y_delta = 1.0 + (fall_stick_mul_max_spd_y - 1.0) * agent.stick_x(); } - if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() != *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_max_spd_x * stick_mul_x_delta, 0.0); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y * stick_mul_fall_y_delta); + if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() != *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_max_spd_x * stick_mul_x_delta, 0.0); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y * stick_mul_fall_y_delta); } else { - if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_ALL as u32) { - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, touch_max_spd_x * stick_mul_x_delta, 0.0); + if GroundModule::is_touch(agent.module_accessor, *GROUND_TOUCH_FLAG_ALL as u32) { + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, touch_max_spd_x * stick_mul_x_delta, 0.0); } else { - sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, max_spd_x * stick_mul_x_delta, 0.0); + sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, max_spd_x * stick_mul_x_delta, 0.0); } - let brake_after_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + let brake_after_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); if brake_after_frame >= 0 { - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); + WorkModule::inc_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); } - let movement_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let movement_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); let brake_mul = brake_movement_y * 10.0; if brake_mul > movement_y { - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, acl_y * stick_mul_acl_y_delta); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, acl_y * stick_mul_acl_y_delta); } else { - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); + WorkModule::inc_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); } - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + agent.clear_lua_stack(); + agent.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); + let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); if speed_y < 0.0 { - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, gravity_minus); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, gravity_minus); } } - special_hi_lean_physics(fighter); + special_hi_lean_physics(agent); - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); - let mut movement_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - if app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) <= 0.0 { + agent.clear_lua_stack(); + agent.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); + let mut movement_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + if app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent) <= 0.0 { movement_y *= -1.0; } - WorkModule::set_float(fighter.module_accessor, movement_y, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); // unsure about this + WorkModule::set_float(agent.module_accessor, movement_y, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); // unsure about this // if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { // special_hi_lerp_motion(fighter, "special_hi_f", "special_hi_b"); // } - if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END { - special_hi_lerp_motion(fighter, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); + if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END { + special_hi_lerp_motion(agent, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); } - else if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { - special_hi_lerp_motion(fighter, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); + else if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { + special_hi_lerp_motion(agent, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); } } return 0.into() } -unsafe extern "C" fn special_hi_lean_physics(fighter: &mut L2CFighterCommon) { - let mul_max_acl_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_mul_max_acl_x")); - let mul_stick_x = fighter.stick_x() * mul_max_acl_x; //l190 - sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); +unsafe extern "C" fn special_hi_lean_physics(agent: &mut L2CFighterCommon) { + let mul_max_acl_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_mul_max_acl_x")); + let mul_stick_x = agent.stick_x() * mul_max_acl_x; //l190 + sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); if mul_stick_x != 0.0 { let mut calc_mul_x = mul_stick_x; // if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) @@ -452,34 +452,34 @@ unsafe extern "C" fn special_hi_lean_physics(fighter: &mut L2CFighterCommon) { // sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_charge_fly_lean, 0.0); // } // } - sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_mul_x, 0.0); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_mul_x, 0.0); } - if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { - let speed_y = fighter.get_speed_y(*FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - if (-0.1..0.1).contains(&(fighter.stick_x() * PostureModule::lr(fighter.module_accessor))) { - let fly_no_lean_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_no_lean_spd_y"); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - fly_no_lean_spd_y); + if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { + let speed_y = agent.get_speed_y(*FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if (-0.1..0.1).contains(&(agent.stick_x() * PostureModule::lr(agent.module_accessor))) { + let fly_no_lean_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_no_lean_spd_y"); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - fly_no_lean_spd_y); } else { - let fly_lean_f_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_lean_f_spd_y"); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - 0.05); //fly_lean_f_spd_y, change properly when prcs are no longer ass + let fly_lean_f_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_lean_f_spd_y"); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - 0.05); //fly_lean_f_spd_y, change properly when prcs are no longer ass } } - else if (fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) && fighter.status_frame() >= 15) - || fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { - let fall_lean_stick_mul_x = 0.1 * fighter.stick_x(); //ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_lean_stick_mul_x"); - let speed_x = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); - sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); + else if (agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) && agent.status_frame() >= 15) + || agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { + let fall_lean_stick_mul_x = 0.1 * agent.stick_x(); //ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_lean_stick_mul_x"); + let speed_x = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); + sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); } } //FUN_710001e090 -unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, motion1: Hash40, motion2: Hash40) { - let mut lerp_rate = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); //l80 +unsafe extern "C" fn special_hi_lerp_motion(agent: &mut L2CFighterCommon, motion1: Hash40, motion2: Hash40) { + let mut lerp_rate = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); //l80 //println!("stick_x: {}, pre-lerp: {}", fighter.stick_x(), lerp_rate); - if (-0.1..0.1).contains(&fighter.stick_x()) { + if (-0.1..0.1).contains(&agent.stick_x()) { if lerp_rate >= 0.5 { lerp_rate = (lerp_rate - 0.05).clamp(0.5, 1.0); } @@ -488,8 +488,8 @@ unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, moti } } else { - let stick_lr = fighter.stick_x() * PostureModule::lr(fighter.module_accessor); - let turn_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("turn_stick_x")); + let stick_lr = agent.stick_x() * PostureModule::lr(agent.module_accessor); + let turn_stick_x = WorkModule::get_param_float(agent.module_accessor, hash40("common"), hash40("turn_stick_x")); //println!("{} >? {}", stick_lr, turn_stick_x); if stick_lr > turn_stick_x { lerp_rate = (lerp_rate - 0.05).clamp(0.0, 1.0); @@ -499,9 +499,9 @@ unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, moti } } //println!("stick_x: {}, post-lerp: {}", fighter.stick_x(), lerp_rate); - WorkModule::set_float(fighter.module_accessor, lerp_rate, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); + WorkModule::set_float(agent.module_accessor, lerp_rate, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); - let mut motion_kind = MotionModule::motion_kind_2nd(fighter.module_accessor); //l90 + let mut motion_kind = MotionModule::motion_kind_2nd(agent.module_accessor); //l90 //println!("starting motion: {}", motion_kind); let mut hash_motion; let mut adjusted_lerp; //la0 @@ -515,21 +515,19 @@ unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, moti hash_motion = motion1; adjusted_lerp = (lerp_rate * 2.0) - 1.0; } - if MotionModule::motion_kind_2nd(fighter.module_accessor) != motion_kind { - let frame = MotionModule::frame(fighter.module_accessor); - let rate = MotionModule::rate(fighter.module_accessor); - MotionModule::add_motion_2nd(fighter.module_accessor, hash_motion, frame, rate, true, adjusted_lerp); + if MotionModule::motion_kind_2nd(agent.module_accessor) != motion_kind { + let frame = MotionModule::frame(agent.module_accessor); + let rate = MotionModule::rate(agent.module_accessor); + MotionModule::add_motion_2nd(agent.module_accessor, hash_motion, frame, rate, true, adjusted_lerp); } - MotionModule::set_weight(fighter.module_accessor, 1.0 - adjusted_lerp, true); + MotionModule::set_weight(agent.module_accessor, 1.0 - adjusted_lerp, true); } -pub fn install() { - smashline::Agent::new("krool") - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_main) - .status(Exit, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_exit) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_end_main) - .status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_main); + agent.status(Exit, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START, special_hi_start_exit); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_end_main); + agent.status(Main, *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_main); } \ No newline at end of file diff --git a/fighters/krool/src/status/special_lw.rs b/fighters/krool/src/status/special_lw.rs index 63dda58ade..be35712886 100644 --- a/fighters/krool/src/status/special_lw.rs +++ b/fighters/krool/src/status/special_lw.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn special_lw_main_old(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); +unsafe extern "C" fn special_lw_main_old(agent: &mut L2CFighterCommon) -> L2CValue { + agent.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); 0.into() } -unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings(fighter.module_accessor, +unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings(agent.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_KEEP as u32, @@ -19,7 +19,7 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0 ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -34,88 +34,84 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.main_shift(special_lw_main_loop) +unsafe extern "C" fn special_lw_main(agent: &mut L2CFighterCommon) -> L2CValue { + agent.main_shift(special_lw_main_loop) } -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) - || StatusModule::is_situation_changed(fighter.module_accessor) { - special_lw_change_motion(fighter); +unsafe extern "C" fn special_lw_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(agent.module_accessor) + || StatusModule::is_situation_changed(agent.module_accessor) { + special_lw_change_motion(agent); } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || agent.sub_air_check_fall_common().get_bool() { return 1.into(); } } - if MotionModule::is_end(fighter.module_accessor) { - let status = if fighter.is_situation(*SITUATION_KIND_GROUND) { + if MotionModule::is_end(agent.module_accessor) { + let status = if agent.is_situation(*SITUATION_KIND_GROUND) { FIGHTER_STATUS_KIND_WAIT } else { FIGHTER_STATUS_KIND_FALL }; - fighter.change_status(status.into(), false.into()); + agent.change_status(status.into(), false.into()); return 0.into(); } - if WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR) <= 1 { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + if WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR) <= 1 { + GroundModule::correct(agent.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } - if (6..29).contains(&fighter.status_frame()) // gut charge logic - && !ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) - && VarModule::is_flag(fighter.object(), vars::krool::status::GUT_CHECK_CHARGED) { - VarModule::off_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, 30.0, true, true, false); + if (6..29).contains(&agent.status_frame()) // gut charge logic + && !ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) + && VarModule::is_flag(agent.object(), vars::krool::status::GUT_CHECK_CHARGED) { + VarModule::off_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + MotionModule::set_frame_sync_anim_cmd(agent.module_accessor, 30.0, true, true, false); } - if fighter.status_frame() > 8 // Allows for jump cancel on frame 10 (35 in animation) if not charged - && !VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) - && !fighter.is_in_hitlag() { - fighter.check_jump_cancel(false, false); + if agent.status_frame() > 8 // Allows for jump cancel on frame 10 (35 in animation) if not charged + && !VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) + && !agent.is_in_hitlag() { + agent.check_jump_cancel(false, false); } - if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) // restore armor on full charge hit - && AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) - && !AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) { - WorkModule::set_float(fighter.module_accessor, 4.0, 0x4d); - VarModule::set_float(fighter.battle_object, vars::krool::instance::STORED_DAMAGE, 0.0); + if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) // restore armor on full charge hit + && AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) + && !AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_SHIELD) { + WorkModule::set_float(agent.module_accessor, 4.0, 0x4d); + VarModule::set_float(agent.battle_object, vars::krool::instance::STORED_DAMAGE, 0.0); } return 0.into() } //FUN_710001bef0 -unsafe extern "C" fn special_lw_change_motion(fighter: &mut L2CFighterCommon) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_lw"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); +unsafe extern "C" fn special_lw_change_motion(agent: &mut L2CFighterCommon) { + if !agent.is_situation(*SITUATION_KIND_GROUND) { + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_lw"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); } else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_air_lw"), -1.0, 1.0, 0.0); + MotionModule::change_motion_inherit_frame_keep_rate(agent.module_accessor, Hash40::new("special_air_lw"), -1.0, 1.0, 0.0); } } else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); } else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); + MotionModule::change_motion_inherit_frame_keep_rate(agent.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); } } } -pub fn install() { - smashline::Agent::new("krool") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main_old) - .install(); - smashline::Agent::new("krool") - .status(Pre, statuses::krool::SPECIAL_LW_GUT, special_lw_pre) - .status(Main, statuses::krool::SPECIAL_LW_GUT, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main_old); + agent.status(Pre, statuses::krool::SPECIAL_LW_GUT, special_lw_pre); + agent.status(Main, statuses::krool::SPECIAL_LW_GUT, special_lw_main); } \ No newline at end of file From f9e7718710ce092174c35b17b1ce3d94314ffc7d Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 21 Mar 2024 22:10:06 -0400 Subject: [PATCH 046/172] real final kirby refactor maybe --- fighters/kirby/src/acmd/copy.rs | 41 + fighters/kirby/src/acmd/copy/diddy.rs | 85 + fighters/kirby/src/acmd/copy/edge.rs | 85 + fighters/kirby/src/acmd/copy/ganon.rs | 165 ++ fighters/kirby/src/acmd/copy/koopa.rs | 142 ++ fighters/kirby/src/acmd/copy/koopajr.rs | 29 + fighters/kirby/src/acmd/copy/krool.rs | 0 fighters/kirby/src/acmd/copy/littlemac.rs | 141 ++ fighters/kirby/src/acmd/copy/lucas.rs | 168 ++ fighters/kirby/src/acmd/copy/luigi.rs | 0 fighters/kirby/src/acmd/copy/mario.rs | 197 ++ fighters/kirby/src/acmd/copy/mariod.rs | 136 ++ fighters/kirby/src/acmd/copy/miigunner.rs | 92 + fighters/kirby/src/acmd/copy/palutena.rs | 64 + fighters/kirby/src/acmd/copy/richter.rs | 98 + fighters/kirby/src/acmd/copy/ridley.rs | 167 ++ fighters/kirby/src/acmd/copy/roy.rs | 61 + fighters/kirby/src/acmd/copy/shizue.rs | 42 + fighters/kirby/src/acmd/copy/sonic.rs | 37 + fighters/kirby/src/copyability/acmd.rs | 2108 --------------------- fighters/kirby/src/copyability/mod.rs | 11 - fighters/kirby/src/copyability/opff.rs | 1328 ------------- fighters/kirby/src/lib.rs | 3 - 23 files changed, 1750 insertions(+), 3450 deletions(-) create mode 100644 fighters/kirby/src/acmd/copy.rs create mode 100644 fighters/kirby/src/acmd/copy/diddy.rs create mode 100644 fighters/kirby/src/acmd/copy/edge.rs create mode 100644 fighters/kirby/src/acmd/copy/ganon.rs create mode 100644 fighters/kirby/src/acmd/copy/koopa.rs create mode 100644 fighters/kirby/src/acmd/copy/koopajr.rs create mode 100644 fighters/kirby/src/acmd/copy/krool.rs create mode 100644 fighters/kirby/src/acmd/copy/littlemac.rs create mode 100644 fighters/kirby/src/acmd/copy/lucas.rs create mode 100644 fighters/kirby/src/acmd/copy/luigi.rs create mode 100644 fighters/kirby/src/acmd/copy/mario.rs create mode 100644 fighters/kirby/src/acmd/copy/mariod.rs create mode 100644 fighters/kirby/src/acmd/copy/miigunner.rs create mode 100644 fighters/kirby/src/acmd/copy/palutena.rs create mode 100644 fighters/kirby/src/acmd/copy/richter.rs create mode 100644 fighters/kirby/src/acmd/copy/ridley.rs create mode 100644 fighters/kirby/src/acmd/copy/roy.rs create mode 100644 fighters/kirby/src/acmd/copy/shizue.rs create mode 100644 fighters/kirby/src/acmd/copy/sonic.rs delete mode 100644 fighters/kirby/src/copyability/acmd.rs delete mode 100644 fighters/kirby/src/copyability/mod.rs delete mode 100644 fighters/kirby/src/copyability/opff.rs diff --git a/fighters/kirby/src/acmd/copy.rs b/fighters/kirby/src/acmd/copy.rs new file mode 100644 index 0000000000..fb37ebc515 --- /dev/null +++ b/fighters/kirby/src/acmd/copy.rs @@ -0,0 +1,41 @@ +use super::*; + +mod diddy; +mod edge; +mod ganon; +mod koopa; +mod koopajr; +mod krool; +mod littlemac; +mod lucas; +mod luigi; +mod mario; +mod mariod; +mod miigunner; +mod palutena; +mod richter; +mod ridley; +mod roy; +mod shizue; +mod sonic; + +pub fn install(agent: &mut Agent) { + diddy::install(agent); + edge::install(agent); + ganon::install(agent); + koopa::install(agent); + koopajr::install(agent); + krool::install(agent); + littlemac::install(agent); + lucas::install(agent); + luigi::install(agent); + mario::install(agent); + mariod::install(agent); + miigunner::install(agent); + palutena::install(agent); + richter::install(agent); + ridley::install(agent); + roy::install(agent); + shizue::install(agent); + sonic::install(agent); +} diff --git a/fighters/kirby/src/acmd/copy/diddy.rs b/fighters/kirby/src/acmd/copy/diddy.rs new file mode 100644 index 0000000000..7829b457af --- /dev/null +++ b/fighters/kirby/src/acmd/copy/diddy.rs @@ -0,0 +1,85 @@ +use super::*; + +unsafe extern "C" fn game_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn effect_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn sound_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn expression_diddyspecialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn game_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn effect_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn sound_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +unsafe extern "C" fn expression_diddyspecialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_diddyspecialncancel", game_diddyspecialncancel); + agent.acmd("effect_diddyspecialncancel", effect_diddyspecialncancel); + agent.acmd("sound_diddyspecialncancel", sound_diddyspecialncancel); + agent.acmd( + "expression_diddyspecialncancel", + expression_diddyspecialncancel, + ); + agent.acmd( + "game_diddyspecialairncancel", + game_diddyspecialairncancel, + ); + agent.acmd( + "effect_diddyspecialairncancel", + effect_diddyspecialairncancel, + ); + agent.acmd( + "sound_diddyspecialairncancel", + sound_diddyspecialairncancel, + ); + agent.acmd( + "expression_diddyspecialairncancel", + expression_diddyspecialairncancel, + ); + } \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/edge.rs b/fighters/kirby/src/acmd/copy/edge.rs new file mode 100644 index 0000000000..d16d6514aa --- /dev/null +++ b/fighters/kirby/src/acmd/copy/edge.rs @@ -0,0 +1,85 @@ +use super::*; + +unsafe extern "C" fn game_edgespecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 20.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 32.0); + FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 79.0); + FT_MOTION_RATE(agent, 1.2); + frame(lua_state, 99.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 100.0); + if is_excute(agent) { + WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); + } + frame(lua_state, 105.0); + FT_MOTION_RATE(agent, 1.6); + frame(lua_state, 115.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 120.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); + } + frame(lua_state, 140.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } +} + +unsafe extern "C" fn game_edgespecialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); + } + frame(lua_state, 15.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } +} + +unsafe extern "C" fn game_edgespecialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); + } + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 0.4); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); + } + frame(lua_state, 60.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_edgespecialnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialairnstart", game_edgespecialnstart); + agent.acmd("game_edgespecialn1", game_edgespecialn1); + agent.acmd("game_edgespecialairn1", game_edgespecialn1); + agent.acmd("game_edgespecialn2", game_edgespecialn2); + agent.acmd("game_edgespecialairn2", game_edgespecialn2); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/ganon.rs b/fighters/kirby/src/acmd/copy/ganon.rs new file mode 100644 index 0000000000..29f135ce01 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/ganon.rs @@ -0,0 +1,165 @@ +use super::*; + +unsafe extern "C" fn game_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); + } + frame(lua_state, 20.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + } + frame(lua_state, 28.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 6.0); + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } +} + +unsafe extern "C" fn expression_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn sound_ganonfloatstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); + } + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_jump01")); + } +} + +unsafe extern "C" fn game_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0 / 10.0); + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + frame(lua_state, 2.0); + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } +} + +unsafe extern "C" fn expression_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn sound_ganonfloatairstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ganon_appear01")); + } +} + +unsafe extern "C" fn game_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 20.0); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); + } + frame(lua_state, 60.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + } +} + +unsafe extern "C" fn effect_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); + } + for _ in 0..5 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); + } +} + +unsafe extern "C" fn expression_ganonfloat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ganonfloatstart", game_ganonfloatstart); + agent.acmd("effect_ganonfloatstart", effect_ganonfloatstart); + agent.acmd("expression_ganonfloatstart", expression_ganonfloatstart); + agent.acmd("sound_ganonfloatstart", sound_ganonfloatstart); + agent.acmd("game_ganonfloatairstart", game_ganonfloatairstart); + agent.acmd("effect_ganonfloatairstart", effect_ganonfloatairstart); + agent.acmd( + "expression_ganonfloatairstart", + expression_ganonfloatairstart, + ); + agent.acmd("sound_ganonfloatairstart", sound_ganonfloatairstart); + agent.acmd("game_ganonfloat", game_ganonfloat); + agent.acmd("effect_ganonfloat", effect_ganonfloat); + agent.acmd("expression_ganonfloat", expression_ganonfloat); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/koopa.rs b/fighters/kirby/src/acmd/copy/koopa.rs new file mode 100644 index 0000000000..7650c8f340 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/koopa.rs @@ -0,0 +1,142 @@ +use super::*; + +unsafe extern "C" fn effect_koopaspecialnstart(agent: &mut L2CAgentBase) { + if is_excute(agent) { + FLASH(agent, 0.961, 0.569, 0.569, 0.392); + } + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); + } + wait(agent.lua_state_agent, 20.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_koopaspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + } + wait(lua_state, 19.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_copy_koopa_01")); + } +} + +unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + FT_MOTION_RATE_RANGE(agent,1.0,31.0,16.0); +} + +unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); + } +} + +unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent,1.5); + + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + FLASH(agent, 0.961, 0.569, 0.569, 0.392); + } + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); + } + frame(agent.lua_state_agent, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"),false,false); + } + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("koopa_breath_m_fire"),false,false); + + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + frame(agent.lua_state_agent, 42.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); + } +} + +unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + } + wait(agent.lua_state_agent, 19.0); + if is_excute(agent) { + if agent.is_motion(Hash40::new("koopa_special_n_max")){ + PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); + } + } + frame(agent.lua_state_agent, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); + } + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } +} + +unsafe extern "C" fn expression_koopaspecialnmax(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(agent.lua_state_agent, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_koopaspecialnstart", effect_koopaspecialnstart); + agent.acmd("effect_koopaspecialairnstart", effect_koopaspecialnstart); + agent.acmd("sound_koopaspecialnstart", sound_koopaspecialnstart); + agent.acmd("game_koopaspecialnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialairnend", game_koopaspecialnend); + agent.acmd("game_koopaspecialnmax", game_koopaspecialnmax); + agent.acmd("game_koopaspecialairnmax", game_koopaspecialnmax); + agent.acmd("effect_koopaspecialnmax", effect_koopaspecialnmax); + agent.acmd("effect_koopaspecialairnmax", effect_koopaspecialnmax); + agent.acmd("sound_koopaspecialnmax", sound_koopaspecialnmax); + agent.acmd("sound_koopaspecialairnmax", sound_koopaspecialnmax); + agent.acmd( + "expression_koopaspecialnmax", + expression_koopaspecialnmax, + ); + agent.acmd( + "expression_koopaspecialairnmax", + expression_koopaspecialnmax, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/koopajr.rs b/fighters/kirby/src/acmd/copy/koopajr.rs new file mode 100644 index 0000000000..d8ae136388 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/koopajr.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn effect_koopajrspecialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { + EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + else { + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_koopajrspecialnshoot", + effect_koopajrspecialnshoot, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/krool.rs b/fighters/kirby/src/acmd/copy/krool.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fighters/kirby/src/acmd/copy/littlemac.rs b/fighters/kirby/src/acmd/copy/littlemac.rs new file mode 100644 index 0000000000..d6c6526614 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/littlemac.rs @@ -0,0 +1,141 @@ +use super::*; + +unsafe extern "C" fn game_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + let damage = 22.0 * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; + let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; + let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; + let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + AttackModule::set_damage_shake_scale(boma, 0.67); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 39.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::kirby::status::KO_PUNCH_GRAVITY); + } + +} + +unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let size = 1.0; + EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); + } + frame(lua_state, 7.0); + if is_excute(agent) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); + } + } + frame(lua_state, 8.0); + let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(45.0, 135.0, 45.0), 0.3, false, 0, 0, 0, 0, 0, false, false); + if is_excute(agent) { + EffectModule::set_rate(boma, handle as u32, 1.5); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); + let facing = PostureModule::lr(boma); + EffectModule::set_rot(boma, handle as u32, &Vector3f::new(45.0 * facing, 135.0, 45.0 * facing)); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); + } + +} + +unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); + PLAY_SE(agent, Hash40::new("vc_kirby_hammermax")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); + } + +} + +unsafe extern "C" fn expression_littlemacspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 8.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_littlemacspecialn", game_littlemacspecialn); + agent.acmd("game_littlemacspecialairn", game_littlemacspecialn); + agent.acmd("effect_littlemacspecialn", effect_littlemacspecialn); + agent.acmd("effect_littlemacspecialairn", effect_littlemacspecialn); + agent.acmd("sound_littlemacspecialn", sound_littlemacspecialn); + agent.acmd("sound_littlemacspecialairn", sound_littlemacspecialn); + agent.acmd("expression_littlemacspecialn", expression_littlemacspecialn); + agent.acmd("expression_littlemacspecialairn", expression_littlemacspecialn); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/lucas.rs b/fighters/kirby/src/acmd/copy/lucas.rs new file mode 100644 index 0000000000..0e1a433bd9 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/lucas.rs @@ -0,0 +1,168 @@ +use super::*; + +unsafe extern "C" fn game_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} + +unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_010")); + } + +} + +unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { + // INTENTIONALLY LEFT BLANK + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } */ +} + +unsafe extern "C" fn effect_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + for i in 1..=50 { + if is_excute(agent) { + if i%2==0 { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + } + if i%4==0 { + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + } + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn sound_lucasspecialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); + } +} + +unsafe extern "C" fn game_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + } + wait(lua_state, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + AttackModule::clear_all(boma); + } + } else { + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + } + + } +} + +unsafe extern "C" fn effect_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + for _ in 1..=5 { + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + wait(lua_state, 3.0) + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); + } +} + +unsafe extern "C" fn sound_lucasspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_attack04")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_lucasspecialnstart", game_lucasspecialnstart); + agent.acmd("game_lucasspecialairnstart", game_lucasspecialnstart); + agent.acmd("sound_lucasspecialnstart", sound_lucasspecialnstart); + agent.acmd("sound_lucasspecialairnstart", sound_lucasspecialnstart); + agent.acmd("game_lucasspecialnhold", game_lucasspecialnhold); + agent.acmd("game_lucasspecialairnhold", game_lucasspecialnhold); + agent.acmd("effect_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("effect_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialairnhold", effect_lucasspecialnhold); + agent.acmd("sound_lucasspecialnhold", effect_lucasspecialnhold); + agent.acmd("game_lucasspecialnfire", game_lucasspecialnfire); + agent.acmd("game_lucasspecialairnfire", game_lucasspecialnfire); + agent.acmd("effect_lucasspecialnfire", effect_lucasspecialnfire); + agent.acmd("effect_lucasspecialairnfire", effect_lucasspecialnfire); + agent.acmd("sound_lucasspecialairnfire", sound_lucasspecialnfire); + agent.acmd("sound_lucasspecialnfire", sound_lucasspecialnfire); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/luigi.rs b/fighters/kirby/src/acmd/copy/luigi.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/fighters/kirby/src/acmd/copy/mario.rs b/fighters/kirby/src/acmd/copy/mario.rs new file mode 100644 index 0000000000..957b2958d4 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/mario.rs @@ -0,0 +1,197 @@ +use super::*; + +unsafe extern "C" fn game_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); + } + frame(lua_state, 21.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); + frame(lua_state, 49.0); + FT_MOTION_RATE(agent, 1.0); + +} + +unsafe extern "C" fn effect_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 13.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.353); + } + frame(lua_state, 17.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 27.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); + } + +} + +unsafe extern "C" fn sound_mariospecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + } +} + +unsafe extern "C" fn game_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + if PostureModule::lr(boma) > 0.0 { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); + } + } + frame(lua_state, 12.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + EffectModule::enable_sync_init_pos_last(boma); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 18.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.75); + EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + } + frame(lua_state, 24.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); + } +} + +unsafe extern "C" fn sound_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); + } +} + +unsafe extern "C" fn expression_mariospecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_mariospecialn", game_mariospecialn); + agent.acmd("game_mariospecialairn", game_mariospecialn); + agent.acmd("effect_mariospecialn", effect_mariospecialn); + agent.acmd("effect_mariospecialairn", effect_mariospecialn); + agent.acmd("sound_mariospecialn", sound_mariospecialn); + agent.acmd("sound_mariospecialairn", sound_mariospecialn); + agent.acmd("game_mariospecialnfire", game_mariospecialnfire); + agent.acmd("game_mariospecialairnfire", game_mariospecialnfire); + agent.acmd("effect_mariospecialnfire", effect_mariospecialnfire); + agent.acmd("effect_mariospecialairnfire", effect_mariospecialnfire); + agent.acmd("sound_mariospecialnfire", sound_mariospecialnfire); + agent.acmd("sound_mariospecialairnfire", sound_mariospecialnfire); + agent.acmd( + "expression_mariospecialnfire", + expression_mariospecialnfire, + ); + agent.acmd( + "expression_mariospecialairnfire", + expression_mariospecialnfire, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/mariod.rs b/fighters/kirby/src/acmd/copy/mariod.rs new file mode 100644 index 0000000000..45e27c994a --- /dev/null +++ b/fighters/kirby/src/acmd/copy/mariod.rs @@ -0,0 +1,136 @@ +use super::*; + +unsafe extern "C" fn game_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); + frame(lua_state, 15.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); + } +} + +unsafe extern "C" fn effect_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn sound_mariodspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); + } +} + +unsafe extern "C" fn game_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 43.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + FLASH(agent, 0.5, 0.25, 1, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 19.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_frieze_l")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack03")); + } +} + +unsafe extern "C" fn expression_mariodspecialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_mariodspecialn", game_mariodspecialn); + agent.acmd("game_mariodspecialairn", game_mariodspecialn); + agent.acmd("effect_mariodspecialn", effect_mariodspecialn); + agent.acmd("effect_mariodspecialairn", effect_mariodspecialn); + agent.acmd("sound_mariodspecialn", sound_mariodspecialn); + agent.acmd("sound_mariodspecialairn", sound_mariodspecialn); + agent.acmd("game_mariodspecialnchill", game_mariodspecialnchill); + agent.acmd("game_mariodspecialairnchill", game_mariodspecialnchill); + agent.acmd("effect_mariodspecialnchill", effect_mariodspecialnchill); + agent.acmd( + "effect_mariodspecialairnchill", + effect_mariodspecialnchill, + ); + agent.acmd("sound_mariodspecialnchill", sound_mariodspecialnchill); + agent.acmd("sound_mariodspecialairnchill", sound_mariodspecialnchill); + agent.acmd( + "expression_mariodspecialnchill", + expression_mariodspecialnchill, + ); + agent.acmd( + "expression_mariodspecialairnchill", + expression_mariodspecialnchill, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/miigunner.rs b/fighters/kirby/src/acmd/copy/miigunner.rs new file mode 100644 index 0000000000..1869cecaee --- /dev/null +++ b/fighters/kirby/src/acmd/copy/miigunner.rs @@ -0,0 +1,92 @@ +use super::*; + +unsafe extern "C" fn effect_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); + } + } + frame(lua_state, 2.6); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); + } + frame(lua_state, 2.8); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + } + } + else { + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } + +} + +unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); + } + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_miigunnerspecialn1firemax", + effect_miigunnerspecialn1firemax, + ); + agent.acmd( + "effect_miigunnerspecialairn1firemax", + effect_miigunnerspecialn1firemax, + ); + agent.acmd( + "sound_miigunnerspecialn1firemax", + sound_miigunnerspecialn1firemax, + ); + agent.acmd( + "sound_miigunnerspecialairn1firemax", + sound_miigunnerspecialn1firemax, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/palutena.rs b/fighters/kirby/src/acmd/copy/palutena.rs new file mode 100644 index 0000000000..8a12082b6c --- /dev/null +++ b/fighters/kirby/src/acmd/copy/palutena.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn effect_palutenaspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_palutenaspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 22.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_palutenaspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_palutenaspecialn", effect_palutenaspecialn); + agent.acmd("effect_palutenaspecialairn", effect_palutenaspecialn); + agent.acmd("sound_palutenaspecialn", sound_palutenaspecialn); + agent.acmd("sound_palutenaspecialairn", sound_palutenaspecialn); + agent.acmd("expression_palutenaspecialn", expression_palutenaspecialn); + agent.acmd( + "expression_palutenaspecialairn", + expression_palutenaspecialn, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/richter.rs b/fighters/kirby/src/acmd/copy/richter.rs new file mode 100644 index 0000000000..80cb407d38 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/richter.rs @@ -0,0 +1,98 @@ +use super::*; + +unsafe extern "C" fn effect_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn effect_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.6); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); + } +} + +unsafe extern "C" fn sound_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_richter_special_l01")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); + } +} + +unsafe extern "C" fn expression_richterspecialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_richterspecialn", effect_richterspecialn); + agent.acmd("sound_richterspecialn", sound_richterspecialn); + agent.acmd("expression_richterspecialn", expression_richterspecialn); + agent.acmd("effect_richterspecialairn", effect_richterspecialairn); + agent.acmd("sound_richterspecialairn", sound_richterspecialairn); + agent.acmd("expression_richterspecialairn", expression_richterspecialairn); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/ridley.rs b/fighters/kirby/src/acmd/copy/ridley.rs new file mode 100644 index 0000000000..171ab6e37f --- /dev/null +++ b/fighters/kirby/src/acmd/copy/ridley.rs @@ -0,0 +1,167 @@ +use super::*; + +unsafe extern "C" fn game_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + } + frame(lua_state, 18.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + } + frame(lua_state, 34.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn sound_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } + frame(lua_state, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); + } +} + +unsafe extern "C" fn expression_ridleyspecialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + } +} + +unsafe extern "C" fn game_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + } + frame(lua_state, 18.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + } + frame(lua_state, 34.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + } +} + +unsafe extern "C" fn sound_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); + } + frame(lua_state, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); + } +} + +unsafe extern "C" fn expression_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_ridleyspecialnexplode", game_ridleyspecialnexplode); + agent.acmd( + "effect_ridleyspecialnexplode", + effect_ridleyspecialnexplode, + ); + agent.acmd( + "sound_ridleyspecialnexplode", + sound_ridleyspecialnexplode, + ); + agent.acmd( + "expression_ridleyspecialnexplode", + expression_ridleyspecialnexplode, + ); + agent.acmd( + "game_ridleyspecialairnexplode", + game_ridleyspecialairnexplode, + ); + agent.acmd( + "effect_ridleyspecialairnexplode", + effect_ridleyspecialairnexplode, + ); + agent.acmd( + "sound_ridleyspecialairnexplode", + sound_ridleyspecialairnexplode, + ); + agent.acmd( + "expression_ridleyspecialairnexplode", + expression_ridleyspecialairnexplode, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/roy.rs b/fighters/kirby/src/acmd/copy/roy.rs new file mode 100644 index 0000000000..ae957e46c7 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/roy.rs @@ -0,0 +1,61 @@ +use super::*; + +unsafe extern "C" fn effect_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); + + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.25); + //AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + //EFFECT(agent, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(agent, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 26.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } + +} + +unsafe extern "C" fn sound_royspecialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_kirby_copy_roy_02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_royspecialnend", sound_royspecialnend); + agent.acmd("sound_royspecialairnend", sound_royspecialnend); + agent.acmd("effect_royspecialnend", effect_royspecialnend); + agent.acmd("effect_royspecialairnend", effect_royspecialnend); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/shizue.rs b/fighters/kirby/src/acmd/copy/shizue.rs new file mode 100644 index 0000000000..88020428ba --- /dev/null +++ b/fighters/kirby/src/acmd/copy/shizue.rs @@ -0,0 +1,42 @@ +use super::*; + +unsafe extern "C" fn effect_shizuespecialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn expression_shizuespecialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 1.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd( + "effect_shizuespecialnfailure", + effect_shizuespecialnfailure, + ); + agent.acmd( + "effect_shizuespecialairnfailure", + effect_shizuespecialnfailure, + ); + agent.acmd( + "expression_shizuespecialnfailure", + expression_shizuespecialnfailure, + ); + agent.acmd( + "expression_shizuespecialairnfailure", + expression_shizuespecialnfailure, + ); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/sonic.rs b/fighters/kirby/src/acmd/copy/sonic.rs new file mode 100644 index 0000000000..2c8a0ad8a5 --- /dev/null +++ b/fighters/kirby/src/acmd/copy/sonic.rs @@ -0,0 +1,37 @@ +use super::*; + +unsafe extern "C" fn game_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; + KineticModule::add_speed(boma, &temp); + } + FT_MOTION_RATE(agent, 0.5); + +} + +unsafe extern "C" fn effect_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn sound_sonicspecialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("vc_kirby_copy_sonic_01")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_appeal01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_sonicspecialnhit", game_sonicspecialnhit); + agent.acmd("effect_sonicspecialnhit", effect_sonicspecialnhit); + agent.acmd("sound_sonicspecialnhit", sound_sonicspecialnhit); +} \ No newline at end of file diff --git a/fighters/kirby/src/copyability/acmd.rs b/fighters/kirby/src/copyability/acmd.rs deleted file mode 100644 index 0d5a72c7a2..0000000000 --- a/fighters/kirby/src/copyability/acmd.rs +++ /dev/null @@ -1,2108 +0,0 @@ -use super::*; - -// BAYONETTA -// BRAVE -// BUDDY -// CAPTAIN -// CHROM -// CLOUD -// DAISY -// DEDEDE -// DEMON -// DIDDY -unsafe extern "C" fn game_diddyspecialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn effect_diddyspecialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn sound_diddyspecialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn expression_diddyspecialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn game_diddyspecialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn effect_diddyspecialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn sound_diddyspecialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn expression_diddyspecialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - - -// DOLLY -// DONKEY -// DUCKHUNT -// EDGE -unsafe extern "C" fn game_edgespecialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); - if is_excute(agent) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); - if is_excute(agent) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 79.0); - FT_MOTION_RATE(agent, 1.2); - frame(lua_state, 99.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 100.0); - if is_excute(agent) { - WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); - } - frame(lua_state, 105.0); - FT_MOTION_RATE(agent, 1.6); - frame(lua_state, 115.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 120.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); - } - frame(lua_state, 140.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } -} - -unsafe extern "C" fn game_edgespecialn1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 13.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); - } - frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); - frame(lua_state, 35.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } - -} - -unsafe extern "C" fn game_edgespecialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 13.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); - } - frame(lua_state, 35.0); - FT_MOTION_RATE(agent, 0.4); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); - } - frame(lua_state, 60.0); - FT_MOTION_RATE(agent, 1.0); - -} - - -// EFLAME -// ELIGHT -// FALCO -// FOX -// GAMEWATCH -// GANON -unsafe extern "C" fn game_ganonfloatstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_XLU); - } - frame(lua_state, 8.0); - if is_excute(agent) { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_DECIDE_ANGLE); - } - frame(lua_state, 20.0); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - } - frame(lua_state, 28.0); - if is_excute(agent) { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_GROUND_CHANGE_KINETIC); - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn effect_ganonfloatstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 6.0); - for _ in 0..5 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } -} - -unsafe extern "C" fn expression_ganonfloatstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_jump"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn sound_ganonfloatstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ganon_appear01")); - } - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_kirby_jump01")); - } -} - -unsafe extern "C" fn game_ganonfloatairstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE(agent, 1.0 / 10.0); - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 14.0); - if is_excute(agent) { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn effect_ganonfloatairstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - frame(lua_state, 2.0); - for _ in 0..5 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } -} - -unsafe extern "C" fn expression_ganonfloatairstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn sound_ganonfloatairstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ganon_appear01")); - } -} - -unsafe extern "C" fn game_ganonfloat(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 20.0); - if is_excute(agent) { - VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_FALL_SPEED_Y_INCREASE); - } - frame(lua_state, 60.0); - if is_excute(agent) { - VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - } -} - -unsafe extern "C" fn effect_ganonfloat(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_final_hand_triforce"), Hash40::new("haver"), -1.1, -0.3, -0.2, 0, 0, 0, 1, true); - } - for _ in 0..5 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ganon_entry_aura"), Hash40::new("emit"), 0, 0, 0, 0, 0, 0, 1, true); - } - } - frame(lua_state, 60.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("ganon_final_hand_triforce"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("ganon_entry_aura"), false, false); - } -} - -unsafe extern "C" fn expression_ganonfloat(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_13_floating"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// GAOGAEN -// GEKKOUGA -// IKE -// INKLING -// JACK -// KAMUI -// KEN -// KOOPA -unsafe extern "C" fn effect_koopaspecialnstart(agent: &mut L2CAgentBase) { - if is_excute(agent) { - FLASH(agent, 0.961, 0.569, 0.569, 0.392); - } - wait(agent.lua_state_agent, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 0.537, 0.537, 0.588); - FLASH_FRM(agent, 20, 0, 0, 0, 0); - } - wait(agent.lua_state_agent, 20.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_koopaspecialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); - } - wait(lua_state, 19.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_copy_koopa_01")); - } -} - -unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); - FT_MOTION_RATE_RANGE(agent,1.0,31.0,16.0); -} - -unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); - if is_excute(agent) { - VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - frame(agent.lua_state_agent, 24.0); - if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); - } -} - -unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(agent,1.5); - - if agent.is_motion(Hash40::new("koopa_special_n_max")){ - LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - FLASH(agent, 0.961, 0.569, 0.569, 0.392); - } - wait(agent.lua_state_agent, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 0.537, 0.537, 0.588); - FLASH_FRM(agent, 20, 0, 0, 0, 0); - } - frame(agent.lua_state_agent, 20.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"),false,false); - } - frame(agent.lua_state_agent, 24.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent,Hash40::new("koopa_breath_m_fire"),false,false); - - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); - FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - frame(agent.lua_state_agent, 42.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(agent.lua_state_agent, 8.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); - } -} - -unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); - } - wait(agent.lua_state_agent, 19.0); - if is_excute(agent) { - if agent.is_motion(Hash40::new("koopa_special_n_max")){ - PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); - } - } - frame(agent.lua_state_agent, 23.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); - } - frame(agent.lua_state_agent, 24.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); - } -} - -unsafe extern "C" fn expression_koopaspecialnmax(agent: &mut L2CAgentBase) { - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(agent.lua_state_agent, 10.0); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(agent.lua_state_agent, 25.0); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// KOOPAJR -unsafe extern "C" fn effect_koopajrspecialnshoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { - EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - else { - let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } -} - - -// KROOL -unsafe extern "C" fn effect_kroolspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 30.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 31.0); - if is_excute(agent) { - if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn sound_kroolspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_krool_special_n08")); - } - frame(lua_state, 31.0); - if is_excute(agent) { - if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { - PLAY_SE(agent, Hash40::new("se_krool_special_n07")); - } - else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - PLAY_SE(agent, Hash40::new("se_krool_special_n01")); - } - } - frame(lua_state, 60.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_krool_special_n09")); - } -} - -unsafe extern "C" fn expression_kroolspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); - } - if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 30.0); - if is_excute(agent) { - if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - } - } - frame(lua_state, 31.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 76.0); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); - } - if is_excute(agent) { - if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 89.0); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, true, 0); - } -} - -unsafe extern "C" fn effect_kroolspecialnloop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { - EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); - } - else { - EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); - LAST_EFFECT_SET_ALPHA(agent, 0.9); - } - if agent.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); - } - } - wait(lua_state, 10.0); -} - - -// LINK -// LITTLEMAC -unsafe extern "C" fn game_littlemacspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - let damage = 22.0 * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; - let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; - let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; - let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; - let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; - ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_damage_shake_scale(boma, 0.67); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - SA_SET(agent, *SITUATION_KIND_AIR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 39.0); - if is_excute(agent) { - VarModule::on_flag(agent.object(), vars::kirby::status::KO_PUNCH_GRAVITY); - } - -} - -unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let size = 1.0; - EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); - } - frame(lua_state, 7.0); - if is_excute(agent) { - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); - } - else { - EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); - } - } - frame(lua_state, 8.0); - let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(45.0, 135.0, 45.0), 0.3, false, 0, 0, 0, 0, 0, false, false); - if is_excute(agent) { - EffectModule::set_rate(boma, handle as u32, 1.5); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); - let facing = PostureModule::lr(boma); - EffectModule::set_rot(boma, handle as u32, &Vector3f::new(45.0 * facing, 135.0, 45.0 * facing)); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); - } - -} - -unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); - PLAY_SE(agent, Hash40::new("vc_kirby_hammermax")); - } - frame(lua_state, 9.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); - } - -} - -unsafe extern "C" fn expression_littlemacspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 8.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 9.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 24.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - -} - -// LUCARIO -// LUCAS -unsafe extern "C" fn game_lucasspecialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_010")); - } - -} - -unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { - // INTENTIONALLY LEFT BLANK - /* if agent.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } */ -} - -unsafe extern "C" fn effect_lucasspecialnhold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(agent, 0.01, 0.5, 1, 0.4); - } - for i in 1..=50 { - if is_excute(agent) { - if i%2==0 { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); - } - if i%4==0 { - EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); - } - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent){ - COL_NORMAL(agent); - } - wait(lua_state, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent){ - COL_NORMAL(agent); - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn sound_lucasspecialnhold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); - } -} - -unsafe extern "C" fn game_lucasspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { - frame(lua_state, 2.0); - if is_excute(agent) { - VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 115, 0, 50, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - } - wait(lua_state, 2.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - AttackModule::clear_all(boma); - } - } else { - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); - } - frame(lua_state, 2.0); - if is_excute(agent) { - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - } - - } -} - -unsafe extern "C" fn effect_lucasspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - for _ in 1..=5 { - if is_excute(agent) { - FLASH(agent, 0.01, 0.5, 1, 0.4); - } - wait(lua_state, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - wait(lua_state, 3.0) - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); - } -} - -unsafe extern "C" fn sound_lucasspecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_attack04")); - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); - } -} - - -// LUCINA -// LUIGI -unsafe extern "C" fn game_luigispecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); - } - -} - -unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); - FLASH(agent, 0, 1, 0, 0.353); - } - frame(lua_state, 19.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 37.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); - } - -} - -unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); - } - -} - -unsafe extern "C" fn game_luigispecialnthunder(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 21.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_luigispecialnthunder(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - let mut rand = &Vector3f::new( - app::sv_math::rand(hash40("fighter"), 50) as f32, - app::sv_math::rand(hash40("stage"), 50) as f32, - app::sv_math::rand(hash40("luigi"), 50) as f32 - ); - let mut flip = &Vector3f::new( - if app::sv_math::rand(hash40("fighter"), 1) == 0 { -1 } else { 1 } as f32, - if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, - if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 - ); - EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); - } - frame(lua_state, 17.0); - if is_excute(agent) { - FLASH(agent, 0, 0.25, 1.0, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 20.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_luigispecialnthunder(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); - PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); - } -} - -unsafe extern "C" fn expression_luigispecialnthunder(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// MARIO -unsafe extern "C" fn game_mariospecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); - frame(lua_state, 14.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); - } - frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); - frame(lua_state, 49.0); - FT_MOTION_RATE(agent, 1.0); - -} - -unsafe extern "C" fn effect_mariospecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 13.0); - if is_excute(agent) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); - } - else { - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); - } - } - frame(lua_state, 15.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0, 0.353); - } - frame(lua_state, 17.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 27.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 40.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); - } - -} - -unsafe extern "C" fn sound_mariospecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_mario_special_n01")); - } -} - -unsafe extern "C" fn game_mariospecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 14.0); - if is_excute(agent) { - KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 21.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_mariospecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.5); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.7, true); - } - else { - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.7, true); - } - } - frame(lua_state, 12.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); - } - } - frame(lua_state, 14.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0, 0.35); - EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handl"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("handr"), 0.0, 0, 0, 0, 0, 0, 0.2, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 6.5, 11.5, 0, 0, 0, 0.26, true); - LAST_EFFECT_SET_RATE(agent, 1.2); - EffectModule::enable_sync_init_pos_last(boma); - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 17.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 18.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0, 0.75); - EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0, 0.35); - } - frame(lua_state, 24.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); - } -} - -unsafe extern "C" fn sound_mariospecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_mario_special_n01")); - PLAY_SE(agent, Hash40::new("se_common_bomb_l")); - PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); - } -} - -unsafe extern "C" fn expression_mariospecialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// MARIOD -unsafe extern "C" fn game_mariodspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); - frame(lua_state, 15.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); - } -} - -unsafe extern "C" fn effect_mariodspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } - frame(lua_state, 15.0); - if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn sound_mariodspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); - } -} - -unsafe extern "C" fn game_mariodspecialnchill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 43.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn effect_mariodspecialnchill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - FLASH(agent, 0.5, 0.25, 1, 0.35); - EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(agent, 1.5); - EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(agent, 0.75); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 19.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_mariodspecialnchill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_frieze_l")); - PLAY_SE(agent, Hash40::new("vc_kirby_attack03")); - } -} - -unsafe extern "C" fn expression_mariodspecialnchill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// MARTH -// MASTER -// METAKNIGHT -// MEWTWO -// MIIFIGHTER -// MIIGUNNER -unsafe extern "C" fn effect_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(agent, 2.0); - LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(agent, 2.0); - LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); - } - } - frame(lua_state, 2.6); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); - } - frame(lua_state, 2.8); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(agent, 0.85); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(agent, 0.8); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(agent, 0.5); - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); - } - } - else { - EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } - -} - -unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(agent, Hash40::new("se_miigunner_final01")); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(agent, Hash40::new("se_miigunner_final01")); - PLAY_SE(agent, Hash40::new("se_miigunner_final04")); - } - } - -} - - -// MIISWORDSMAN -// MURABITO -// NANA -// NESS -// PACKUN -// PACMAN -// PALUTENA -unsafe extern "C" fn effect_palutenaspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_palutenaspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 22.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn expression_palutenaspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 5.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// PEACH -// PFUSHIGISOU -// PICHU -// PICKEL -// PIKACHU -// PIKMIN -// PIT -// PITB -// PLIZARDON -// POPO -// PURIN -// PZENIGAME -// REFLET -// RICHTER -unsafe extern "C" fn effect_richterspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); - LAST_EFFECT_SET_RATE(agent, 0.6); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); - } -} - -unsafe extern "C" fn sound_richterspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_richter_special_l01")); - PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); - } -} - -unsafe extern "C" fn expression_richterspecialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn effect_richterspecialairn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("richter_bottle_appear"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, true); - } - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(agent, 1.0, 1.0, 0.5); - LAST_EFFECT_SET_RATE(agent, 0.6); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_sp_flash"), false, true); - } -} - -unsafe extern "C" fn sound_richterspecialairn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_richter_special_l01")); - PLAY_SE(agent, Hash40::new("vc_kirby_copy_richter_01")); - } -} - -unsafe extern "C" fn expression_richterspecialairn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_lightthrow4item"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - - -// RIDLEY -unsafe extern "C" fn game_ridleyspecialnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); - } - frame(lua_state, 18.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_ridleyspecialnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); - } - frame(lua_state, 17.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); - } - frame(lua_state, 18.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); - } - frame(lua_state, 34.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn sound_ridleyspecialnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); - } - frame(lua_state, 18.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn expression_ridleyspecialnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 18.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); - } -} - -unsafe extern "C" fn game_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); - } - frame(lua_state, 18.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); - } - frame(lua_state, 17.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); - } - frame(lua_state, 18.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); - } - frame(lua_state, 34.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn sound_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); - } - frame(lua_state, 18.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn expression_ridleyspecialairnexplode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 18.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); - } -} - - -// ROBOT -// ROCKMAN -// ROSETTA -// ROY -unsafe extern "C" fn effect_royspecialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_erupution_hold"), Hash40::new("roy_erupution_hold"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.4, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_sword"), Hash40::new("roy_sword"), Hash40::new("havel"), 0.0, 0.0, 0.0, -90.0, 90.0, 0.0, 1.0, true, *EF_FLIP_NONE); - - EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_attack_fire"), Hash40::new("roy_attack_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW_FLIP(agent, Hash40::new("roy_fire"), Hash40::new("roy_fire"), Hash40::new("havel"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(agent, 1.25); - //AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("havel"), 0.0, 0.0, -0.8, Hash40::new("havel"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(agent, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(agent, 1.5); - //EFFECT(agent, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(agent, 1.5); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 2); - } - frame(lua_state, 26.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(agent) { - COL_NORMAL(agent); - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn sound_royspecialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_roy_special_n01")); - PLAY_SE(agent, Hash40::new("se_roy_special_n02")); - PLAY_SE(agent, Hash40::new("vc_kirby_copy_roy_02")); - PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); - } -} - - -// RYU -// SAMUS -// SAMUSD -// SHEIK -// SHIZUE -unsafe extern "C" fn effect_shizuespecialnfailure(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("shizue_cracker"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn expression_shizuespecialnfailure(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 1.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - } -} - - -// SHULK -// SIMON -// SNAKE -// SONIC -unsafe extern "C" fn game_sonicspecialnhit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; - KineticModule::add_speed(boma, &temp); - } - FT_MOTION_RATE(agent, 0.5); - -} - -unsafe extern "C" fn effect_sonicspecialnhit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn sound_sonicspecialnhit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("vc_kirby_copy_sonic_01")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_kirby_appeal01")); - } -} - - -// SZEROSUIT -// TANTAN -// TOONLINK -// TRAIL -// WARIO -// WIIFIT -// WOLF -// YOSHI -// YOUNGLINK -// ZELDA - -pub fn install(agent: &mut Agent) { - // BAYONETTA - // BRAVE - // CAPTAIN - // CHROM - // CLOUD - // DAISY - // DEDEDE - // DEMON - // DIDDY - agent.acmd("game_diddyspecialncancel", game_diddyspecialncancel); - agent.acmd("effect_diddyspecialncancel", effect_diddyspecialncancel); - agent.acmd("sound_diddyspecialncancel", sound_diddyspecialncancel); - agent.acmd( - "expression_diddyspecialncancel", - expression_diddyspecialncancel, - ); - agent.acmd( - "game_diddyspecialairncancel", - game_diddyspecialairncancel, - ); - agent.acmd( - "effect_diddyspecialairncancel", - effect_diddyspecialairncancel, - ); - agent.acmd( - "sound_diddyspecialairncancel", - sound_diddyspecialairncancel, - ); - agent.acmd( - "expression_diddyspecialairncancel", - expression_diddyspecialairncancel, - ); - // DOLLY - // DONKEY - // DUCKHUNT - // EDGE - agent.acmd("game_edgespecialnstart", game_edgespecialnstart); - agent.acmd("game_edgespecialairnstart", game_edgespecialnstart); - agent.acmd("game_edgespecialn1", game_edgespecialn1); - agent.acmd("game_edgespecialairn1", game_edgespecialn1); - agent.acmd("game_edgespecialn2", game_edgespecialn2); - agent.acmd("game_edgespecialairn2", game_edgespecialn2); - // EFLAME - // ELIGHT - // FOX - // FALCO - // FOX - // GAMEWATCH - // GANON - agent.acmd("game_ganonfloatstart", game_ganonfloatstart); - agent.acmd("effect_ganonfloatstart", effect_ganonfloatstart); - agent.acmd("expression_ganonfloatstart", expression_ganonfloatstart); - agent.acmd("sound_ganonfloatstart", sound_ganonfloatstart); - agent.acmd("game_ganonfloatairstart", game_ganonfloatairstart); - agent.acmd("effect_ganonfloatairstart", effect_ganonfloatairstart); - agent.acmd( - "expression_ganonfloatairstart", - expression_ganonfloatairstart, - ); - agent.acmd("sound_ganonfloatairstart", sound_ganonfloatairstart); - agent.acmd("game_ganonfloat", game_ganonfloat); - agent.acmd("effect_ganonfloat", effect_ganonfloat); - agent.acmd("expression_ganonfloat", expression_ganonfloat); - // GAOGAEN - // GEKKOUGA - // IKE - // INKLING - // JACK - // KAMUI - // KEN - // KOOPA - agent.acmd("effect_koopaspecialnstart", effect_koopaspecialnstart); - agent.acmd("effect_koopaspecialairnstart", effect_koopaspecialnstart); - agent.acmd("sound_koopaspecialnstart", sound_koopaspecialnstart); - agent.acmd("game_koopaspecialnend", game_koopaspecialnend); - agent.acmd("game_koopaspecialairnend", game_koopaspecialnend); - agent.acmd("game_koopaspecialnmax", game_koopaspecialnmax); - agent.acmd("game_koopaspecialairnmax", game_koopaspecialnmax); - agent.acmd("effect_koopaspecialnmax", effect_koopaspecialnmax); - agent.acmd("effect_koopaspecialairnmax", effect_koopaspecialnmax); - agent.acmd("sound_koopaspecialnmax", sound_koopaspecialnmax); - agent.acmd("sound_koopaspecialairnmax", sound_koopaspecialnmax); - agent.acmd( - "expression_koopaspecialnmax", - expression_koopaspecialnmax, - ); - agent.acmd( - "expression_koopaspecialairnmax", - expression_koopaspecialnmax, - ); - // KOOPAJR - agent.acmd( - "effect_koopajrspecialnshoot", - effect_koopajrspecialnshoot, - ); - // KROOL - agent.acmd("effect_kroolspecialnfire", effect_kroolspecialnfire); - agent.acmd("effect_kroolspecialairnfire", effect_kroolspecialnfire); - agent.acmd("sound_kroolspecialnfire", sound_kroolspecialnfire); - agent.acmd("sound_kroolspecialairnfire", sound_kroolspecialnfire); - agent.acmd( - "expression_kroolspecialnfire", - expression_kroolspecialnfire, - ); - agent.acmd( - "expression_kroolspecialairnfire", - expression_kroolspecialnfire, - ); - agent.acmd("effect_kroolspecialnloop", effect_kroolspecialnloop); - agent.acmd("effect_kroolspecialairnloop", effect_kroolspecialnloop); - // LINK - // LITTLEMAC - agent.acmd("game_littlemacspecialn", game_littlemacspecialn); - agent.acmd("game_littlemacspecialairn", game_littlemacspecialn); - agent.acmd("effect_littlemacspecialn", effect_littlemacspecialn); - agent.acmd("effect_littlemacspecialairn", effect_littlemacspecialn); - agent.acmd("sound_littlemacspecialn", sound_littlemacspecialn); - agent.acmd("sound_littlemacspecialairn", sound_littlemacspecialn); - agent.acmd("expression_littlemacspecialn", expression_littlemacspecialn); - agent.acmd("expression_littlemacspecialairn", expression_littlemacspecialn); - // LUCARIO - // LUCAS - agent.acmd("game_lucasspecialnstart", game_lucasspecialnstart); - agent.acmd("game_lucasspecialairnstart", game_lucasspecialnstart); - agent.acmd("sound_lucasspecialnstart", sound_lucasspecialnstart); - agent.acmd("sound_lucasspecialairnstart", sound_lucasspecialnstart); - agent.acmd("game_lucasspecialnhold", game_lucasspecialnhold); - agent.acmd("game_lucasspecialairnhold", game_lucasspecialnhold); - agent.acmd("effect_lucasspecialnhold", effect_lucasspecialnhold); - agent.acmd("effect_lucasspecialairnhold", effect_lucasspecialnhold); - agent.acmd("sound_lucasspecialairnhold", effect_lucasspecialnhold); - agent.acmd("sound_lucasspecialnhold", effect_lucasspecialnhold); - agent.acmd("game_lucasspecialnfire", game_lucasspecialnfire); - agent.acmd("game_lucasspecialairnfire", game_lucasspecialnfire); - agent.acmd("effect_lucasspecialnfire", effect_lucasspecialnfire); - agent.acmd("effect_lucasspecialairnfire", effect_lucasspecialnfire); - agent.acmd("sound_lucasspecialairnfire", sound_lucasspecialnfire); - agent.acmd("sound_lucasspecialnfire", sound_lucasspecialnfire); - // LUCINA - // LUIGI - agent.acmd("game_luigispecialn", game_luigispecialn); - agent.acmd("game_luigispecialairn", game_luigispecialn); - agent.acmd("effect_luigispecialn", effect_luigispecialn); - agent.acmd("effect_luigispecialairn", effect_luigispecialn); - agent.acmd("sound_luigispecialn", sound_luigispecialn); - agent.acmd("sound_luigispecialairn", sound_luigispecialn); - agent.acmd("game_luigispecialnthunder", game_luigispecialnthunder); - agent.acmd("game_luigispecialairnthunder", game_luigispecialnthunder); - agent.acmd( - "effect_luigispecialnthunder", - effect_luigispecialnthunder, - ); - agent.acmd( - "effect_luigispecialairnthunder", - effect_luigispecialnthunder, - ); - agent.acmd("sound_luigispecialnthunder", sound_luigispecialnthunder); - agent.acmd( - "sound_luigispecialairnthunder", - sound_luigispecialnthunder, - ); - agent.acmd( - "expression_luigispecialnthunder", - expression_luigispecialnthunder, - ); - agent.acmd( - "expression_luigispecialairnthunder", - expression_luigispecialnthunder, - ); - // MARIO - agent.acmd("game_mariospecialn", game_mariospecialn); - agent.acmd("game_mariospecialairn", game_mariospecialn); - agent.acmd("effect_mariospecialn", effect_mariospecialn); - agent.acmd("effect_mariospecialairn", effect_mariospecialn); - agent.acmd("sound_mariospecialn", sound_mariospecialn); - agent.acmd("sound_mariospecialairn", sound_mariospecialn); - agent.acmd("game_mariospecialnfire", game_mariospecialnfire); - agent.acmd("game_mariospecialairnfire", game_mariospecialnfire); - agent.acmd("effect_mariospecialnfire", effect_mariospecialnfire); - agent.acmd("effect_mariospecialairnfire", effect_mariospecialnfire); - agent.acmd("sound_mariospecialnfire", sound_mariospecialnfire); - agent.acmd("sound_mariospecialairnfire", sound_mariospecialnfire); - agent.acmd( - "expression_mariospecialnfire", - expression_mariospecialnfire, - ); - agent.acmd( - "expression_mariospecialairnfire", - expression_mariospecialnfire, - ); - // MARIOD - agent.acmd("game_mariodspecialn", game_mariodspecialn); - agent.acmd("game_mariodspecialairn", game_mariodspecialn); - agent.acmd("effect_mariodspecialn", effect_mariodspecialn); - agent.acmd("effect_mariodspecialairn", effect_mariodspecialn); - agent.acmd("sound_mariodspecialn", sound_mariodspecialn); - agent.acmd("sound_mariodspecialairn", sound_mariodspecialn); - agent.acmd("game_mariodspecialnchill", game_mariodspecialnchill); - agent.acmd("game_mariodspecialairnchill", game_mariodspecialnchill); - agent.acmd("effect_mariodspecialnchill", effect_mariodspecialnchill); - agent.acmd( - "effect_mariodspecialairnchill", - effect_mariodspecialnchill, - ); - agent.acmd("sound_mariodspecialnchill", sound_mariodspecialnchill); - agent.acmd("sound_mariodspecialairnchill", sound_mariodspecialnchill); - agent.acmd( - "expression_mariodspecialnchill", - expression_mariodspecialnchill, - ); - agent.acmd( - "expression_mariodspecialairnchill", - expression_mariodspecialnchill, - ); - // MARTH - // MASTER - // METAKNIGHT - // MEWTWO - // MIIFIGHTER - // MIIGUNNER - agent.acmd( - "effect_miigunnerspecialn1firemax", - effect_miigunnerspecialn1firemax, - ); - agent.acmd( - "effect_miigunnerspecialairn1firemax", - effect_miigunnerspecialn1firemax, - ); - agent.acmd( - "sound_miigunnerspecialn1firemax", - sound_miigunnerspecialn1firemax, - ); - agent.acmd( - "sound_miigunnerspecialairn1firemax", - sound_miigunnerspecialn1firemax, - ); - // MIISWORDSMAN - // MURABITO - // NANA - // NESS - // PACKUN - // PACMAN - // PALUTENA - agent.acmd("effect_palutenaspecialn", effect_palutenaspecialn); - agent.acmd("effect_palutenaspecialairn", effect_palutenaspecialn); - agent.acmd("sound_palutenaspecialn", sound_palutenaspecialn); - agent.acmd("sound_palutenaspecialairn", sound_palutenaspecialn); - agent.acmd("expression_palutenaspecialn", expression_palutenaspecialn); - agent.acmd( - "expression_palutenaspecialairn", - expression_palutenaspecialn, - ); - // PEACH - // PFUSHIGISOU - // PICHU - // PICKEL - // PIKACHU - // PIKMIN - // PIT - // PITB - // PLIZARDON - // POPO - // PURIN - // PZENIGAME - // REFLET - // RICHTER - agent.acmd("effect_richterspecialn", effect_richterspecialn); - agent.acmd("sound_richterspecialn", sound_richterspecialn); - agent.acmd("expression_richterspecialn", expression_richterspecialn); - agent.acmd("effect_richterspecialairn", effect_richterspecialairn); - agent.acmd("sound_richterspecialairn", sound_richterspecialairn); - agent.acmd("expression_richterspecialairn", expression_richterspecialairn); - // RIDLEY - agent.acmd("game_ridleyspecialnexplode", game_ridleyspecialnexplode); - agent.acmd( - "effect_ridleyspecialnexplode", - effect_ridleyspecialnexplode, - ); - agent.acmd( - "sound_ridleyspecialnexplode", - sound_ridleyspecialnexplode, - ); - agent.acmd( - "expression_ridleyspecialnexplode", - expression_ridleyspecialnexplode, - ); - agent.acmd( - "game_ridleyspecialairnexplode", - game_ridleyspecialairnexplode, - ); - agent.acmd( - "effect_ridleyspecialairnexplode", - effect_ridleyspecialairnexplode, - ); - agent.acmd( - "sound_ridleyspecialairnexplode", - sound_ridleyspecialairnexplode, - ); - agent.acmd( - "expression_ridleyspecialairnexplode", - expression_ridleyspecialairnexplode, - ); - // ROBOT - // ROCKMAN - // ROSETTA - // ROY - agent.acmd("sound_royspecialnend", sound_royspecialnend); - agent.acmd("sound_royspecialairnend", sound_royspecialnend); - agent.acmd("effect_royspecialnend", effect_royspecialnend); - agent.acmd("effect_royspecialairnend", effect_royspecialnend); - // RYU - // SAMUS - // SAMUSD - // SHEIK - // SHIZUE - agent.acmd( - "effect_shizuespecialnfailure", - effect_shizuespecialnfailure, - ); - agent.acmd( - "effect_shizuespecialairnfailure", - effect_shizuespecialnfailure, - ); - agent.acmd( - "expression_shizuespecialnfailure", - expression_shizuespecialnfailure, - ); - agent.acmd( - "expression_shizuespecialairnfailure", - expression_shizuespecialnfailure, - ); - // SHULK - // SIMON - // SNAKE - // SONIC - agent.acmd("game_sonicspecialnhit", game_sonicspecialnhit); - agent.acmd("effect_sonicspecialnhit", effect_sonicspecialnhit); - agent.acmd("sound_sonicspecialnhit", sound_sonicspecialnhit); - // SZEROSUIT - // TANTAN - // TOONLINK - // TRAIL - // WARIO - // WIIFIT - // WOLF - // YOSHI - // YOUNGLINK - // ZELDA -} diff --git a/fighters/kirby/src/copyability/mod.rs b/fighters/kirby/src/copyability/mod.rs deleted file mode 100644 index 6ca163ba2b..0000000000 --- a/fighters/kirby/src/copyability/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -mod acmd; -mod opff; - -pub fn install(agent: &mut Agent) { - let agent = &mut Agent::new("kirby"); - acmd::install(agent); - opff::install(); - agent.install(); -} \ No newline at end of file diff --git a/fighters/kirby/src/copyability/opff.rs b/fighters/kirby/src/copyability/opff.rs deleted file mode 100644 index a521da1bfa..0000000000 --- a/fighters/kirby/src/copyability/opff.rs +++ /dev/null @@ -1,1328 +0,0 @@ -use super::*; -use globals::*; - -// symbol-based call for the pikachu/pichu characters' common opff -extern "Rust" { - fn gimmick_flash(boma: &mut BattleObjectModuleAccessor); -} - -// Common -// Magic Series -unsafe fn magic_series(boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - if( (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_RYU) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KEN) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCARIO) - || (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_DOLLY)){ - let cat1 = cat[0]; - let cat4 = cat[3]; - // Level 1: Jab and Dash Attack Cancels - if [*FIGHTER_STATUS_KIND_ATTACK, *FIGHTER_STATUS_KIND_ATTACK_DASH].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for tilt attack inputs - if boma.is_cat_flag(Cat1::AttackS3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S3,false); - } - if boma.is_cat_flag(Cat1::AttackHi3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI3,false); - } - if boma.is_cat_flag(Cat1::AttackLw3) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW3,false); - } - - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during dash attack (on hit) - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_DASH - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Level 2: Tilt Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S3, - *FIGHTER_STATUS_KIND_ATTACK_HI3, - *FIGHTER_STATUS_KIND_ATTACK_LW3].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for smash attack inputs - if boma.is_cat_flag(Cat1::AttackS4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_S4_START,true); - } - if boma.is_cat_flag(Cat1::AttackHi4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_HI4_START,true); - } - if boma.is_cat_flag(Cat1::AttackLw4) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_ATTACK_LW4_START,true); - } - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs during utilt - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI3 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - // Smash Cancels - if [*FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4, - *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - // Check for jump inputs - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_HI4 - && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) - && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - } - } - - // Aerial Cancels - if status_kind == *FIGHTER_STATUS_KIND_ATTACK_AIR { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) - || (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) && !boma.is_in_hitlag()) { - // Check for jump inputs - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) { - boma.check_jump_cancel(false, false); - } - // Check for special attack inputs - if boma.is_cat_flag(Cat1::SpecialN) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_N,false); - } - if boma.is_cat_flag(Cat1::SpecialS) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_S,false); - } - if boma.is_cat_flag(Cat1::SpecialHi) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_HI,false); - } - if boma.is_cat_flag(Cat1::SpecialLw) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SPECIAL_LW,false); - } - - //---------------------------------------------------------------------------------------------------------------------- - // Check for command inputs - // Ryu - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_RYU { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N2_COMMAND); - if boma.is_cat_flag( Cat4::SpecialNCommand) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, false); - } - if boma.is_cat_flag( Cat4::SpecialN2Command) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, false); - } - } - // Ken - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_KEN { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_N_COMMAND); - if boma.is_cat_flag( Cat4::AttackCommand1) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, false); - } - } - //---------------------------------------------------------------------------------------------------------------------- - - } - } - - } -} - -//Fastfall Specials -unsafe fn fastfall_copyspecials(fighter: &mut L2CFighterCommon) { - let copystatus = StatusModule::status_kind(fighter.module_accessor); - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_situation(*SITUATION_KIND_AIR) { - if fighter.is_status_one_of(&[ - // for some reason these two statuses aren't considered even if they are in the range, so the range does not include these two - *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N2, - *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3 - ]) - || ((0x206..0x377).contains(©status) - && !fighter.is_status_one_of(&[ - // to not list hundreds of statuses, range is given, but exceptions need to be listed seperately - *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL - ]) ) - { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); - } - } - } - } -} - -// End of Common - -// BAYONETTA---------------------------------------------------------------------------------------------------------------------------- -// BRAVE---------------------------------------------------------------------------------------------------------------------------- -unsafe fn dash_cancel_frizz(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_SHOOT) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_motion(Hash40::new("brave_special_n1")) - && fighter.motion_frame() > 20.0 && fighter.motion_frame() < 44.0 // after F20 and before the FAF - && (WorkModule::get_float(fighter.module_accessor, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLOAT_SP) > 12.0) - { - if fighter.check_dash_cancel() { - let mut brave_fighter = app::Fighter{battle_object: *(fighter.battle_object)}; - FighterSpecializer_Brave::add_sp(&mut brave_fighter, -10.0); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 15, -2, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe fn brave_nspecial_cancels(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BRAVE_SPECIAL_N_CANCEL) - && fighter.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR - { - WorkModule::set_int(fighter.module_accessor, *STATUS_KIND_NONE, *FIGHTER_BRAVE_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(fighter.module_accessor, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } -} - - -// BUDDY---------------------------------------------------------------------------------------------------------------------------- -unsafe fn blue_eggs_land_cancels(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_BUDDY_SPECIAL_N) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && fighter.is_prev_situation(*SITUATION_KIND_AIR) - { - // Current FAF in motion list is 50, frame is 0 indexed so subtract a frame - let special_n_fire_cancel_frame_ground = 49.0; - // 11F of landing lag plus one extra frame to subtract from the FAF to actually get that amount of lag - let landing_lag = 12.0; - if MotionModule::frame(fighter.module_accessor) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, special_n_fire_cancel_frame_ground - landing_lag, true, true, false); - } - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - //fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING, false); - } -} - - -// CAPTAIN---------------------------------------------------------------------------------------------------------------------------- -unsafe fn repeated_falcon_punch_turnaround(fighter: &mut L2CFighterCommon) { - if StatusModule::is_changing(fighter.module_accessor) { - return; - } - let frame = fighter.motion_frame(); - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN) - && 22.0 < frame && frame < 41.0 - && fighter.is_stick_backward() - && fighter.stick_x().abs() > 0.1 - { - fighter.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_CAPTAIN_SPECIAL_N_TURN, true); - } -} - - -// CHROM---------------------------------------------------------------------------------------------------------------------------- -// CLOUD---------------------------------------------------------------------------------------------------------------------------- -// DAISY---------------------------------------------------------------------------------------------------------------------------- -// DEDEDE---------------------------------------------------------------------------------------------------------------------------- -// DEMON---------------------------------------------------------------------------------------------------------------------------- -// DIDDY---------------------------------------------------------------------------------------------------------------------------- -unsafe fn peanut_popgun_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_SHOOT && frame > 5.0 { - boma.check_airdodge_cancel(); - } -} - -unsafe fn diddy_nspecial_cancels(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - if fighter.is_cat_flag(Cat2::StickEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeF) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_F); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if fighter.is_cat_flag(Cat2::StickEscapeB) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_B); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump) && fighter.sub_check_button_frick().get_bool())) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GROUND_JUMP); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - if fighter.sub_check_command_guard().get_bool() { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_GUARD); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - } - else { - if fighter.is_cat_flag(Cat1::AirEscape) { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_ESCAPE_AIR); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL.into(), true.into()); - } - else if (fighter.is_cat_flag(Cat1::JumpButton) || (ControlModule::is_enable_flick_jump(fighter.module_accessor) && fighter.is_cat_flag(Cat1::Jump))) - && fighter.get_num_used_jumps() < fighter.get_jump_count_max() - { - VarModule::set_int(fighter.battle_object, vars::diddy::status::SPECIAL_N_CANCEL_TYPE, vars::diddy::SPECIAL_N_CANCEL_TYPE_JUMP_AERIAL); - fighter.change_status(statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP.into(), true.into()); - } - } - } -} - - -// DOLLY---------------------------------------------------------------------------------------------------------------------------- -// DONKEY---------------------------------------------------------------------------------------------------------------------------- -unsafe fn donkey_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_DONKEY_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_DONKEY_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - - -// DUCKHUNT---------------------------------------------------------------------------------------------------------------------------- -// EDGE---------------------------------------------------------------------------------------------------------------------------- -unsafe fn edge_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - - -// EFLAME---------------------------------------------------------------------------------------------------------------------------- -// ELIGHT---------------------------------------------------------------------------------------------------------------------------- -// FALCO---------------------------------------------------------------------------------------------------------------------------- -unsafe fn falco_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FALCO_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// FOX---------------------------------------------------------------------------------------------------------------------------- -unsafe fn fox_drift_laser_landcancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_FOX_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// GAMEWATCH---------------------------------------------------------------------------------------------------------------------------- -unsafe fn chef_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GAMEWATCH_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - if StatusModule::is_changing(boma) { - let nspec_halt = Vector3f{x: 0.9, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &nspec_halt, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// GANON---------------------------------------------------------------------------------------------------------------------------- -// unsafe fn repeated_warlock_punch_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { -// if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N_TURN { -// if frame > 30.0 && frame < 45.0 { -// if stick_x * facing < 0.0 { -// StatusModule::change_status_request_from_script(boma, *FIGHTER_GANON_STATUS_KIND_SPECIAL_N_TURN, true); -// } -// } -// } -// } - - -// GAOGAEN---------------------------------------------------------------------------------------------------------------------------- -unsafe fn lariat_ledge_slipoff(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_KEEP)); - fighter.sub_transition_group_check_air_cliff(); - } -} - - -// GEKKOUGA---------------------------------------------------------------------------------------------------------------------------- -unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_GEKKOUGA_SPECIAL_N_MAX_SHOT { - if frame > 12.0 { - boma.check_dash_cancel(); - } - } -} - - -// IKE---------------------------------------------------------------------------------------------------------------------------- -// INKLING---------------------------------------------------------------------------------------------------------------------------- -// JACK---------------------------------------------------------------------------------------------------------------------------- -// KAMUI---------------------------------------------------------------------------------------------------------------------------- -// KEN---------------------------------------------------------------------------------------------------------------------------- -unsafe fn ken_air_hado_distinguish(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if !boma.is_status_one_of(&[ - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_RYU_SPECIAL_N2_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N_COMMAND, - *FIGHTER_KIRBY_STATUS_KIND_KEN_SPECIAL_N2_COMMAND, - ]) { - return; - } - - // set VarModule flag on f12 - this flag changes hado properties - if frame == 12.0 && fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n"), - ]) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - // after frame 13, disallow changing from aerial to grounded hadoken - // instead, we enter a landing animation - if (frame > 13.0 || fighter.is_motion_one_of(&[ - Hash40::new("ken_special_air_n_empty"), - Hash40::new("ken_special_n_empty"), - ])) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) { - if frame < 70.0 { // the autocancel frame - WorkModule::set_float(boma, 11.0, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - boma.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - } else { - boma.change_status_req(*FIGHTER_STATUS_KIND_WAIT, false); - } - } -} - - -// KOOPA---------------------------------------------------------------------------------------------------------------------------- -unsafe fn koopa_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - if frame < 23.0 && !cooleddown { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - MotionModule::set_frame(boma, 22.0, true); - } - } - } -} - -unsafe fn koopa_fireball_cooldown(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - /* //Ignore cooldown during respawn,death,entry and nspecial - if (&[ - *FIGHTER_STATUS_KIND_ENTRY,*FIGHTER_STATUS_KIND_DEAD,*FIGHTER_STATUS_KIND_REBIRTH, - *FIGHTER_STATUS_KIND_WIN,*FIGHTER_STATUS_KIND_LOSE, - *FIGHTER_STATUS_KIND_SPECIAL_N - ]).contains(&status_kind) { - return; - } */ - - if (WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_KOOPA) { - let cooleddown = VarModule::countdown_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME, 0); - let charged_effect = VarModule::get_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID); - //If cooling down, remove ready effect - if !cooleddown { - if charged_effect > 0 { - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,0); - if EffectModule::is_exist_effect(boma, charged_effect as u32) { - EffectModule::kill(boma, charged_effect as u32, false,false); - } - } - return; - } - //Otherwise, spawn effect if effect does not exist - else if (charged_effect <= 0 - || !EffectModule::is_exist_effect(boma, charged_effect as u32)) - { - if (charged_effect <= 0){ - gimmick_flash(boma); - } - let pos = &Vector3f{x: 0.0, y: 5.0, z: 0.0}; - let rot = &Vector3f{x: 180.0, y: 0.0, z: 50.0}; - let handle = EffectModule::req_follow(boma, Hash40::new("koopa_breath_m_fire"), Hash40::new("body"), pos, rot, 1.0, true, 0, 0, 0, 0, 0, false, false) as u32; - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_EFFECT_ID,handle as i32); - } - } - // Kirby specific, resets gimmick if copy ability isn't enabled - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_KOOPA { - VarModule::set_int(boma.object(), vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } -} - - -// KOOPAJR---------------------------------------------------------------------------------------------------------------------------- -unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_KOOPAJR_SPECIAL_N_HOLD { - if frame > 16.0 { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - if situation_kind == *SITUATION_KIND_GROUND { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_GUARD_ON, true); - } - } - } - } -} - - -// KROOL---------------------------------------------------------------------------------------------------------------------------- -// LINK---------------------------------------------------------------------------------------------------------------------------- -unsafe fn bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// LITTLEMAC---------------------------------------------------------------------------------------------------------------------------- -// LUCARIO---------------------------------------------------------------------------------------------------------------------------- -unsafe fn lucario_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32) { - /***if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_HOLD { - if boma.is_cat_flag(Cat2::CommonGuard) { - if situation_kind == *SITUATION_KIND_AIR { - if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_ESCAPE_AIR) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - else { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_GUARD); - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL, true); - } - } - }***/ - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_LUCARIO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_LUCARIO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - } - } -} - - -// LUCAS---------------------------------------------------------------------------------------------------------------------------- -unsafe fn lucas_offense_effct_handler(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) == -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) == -1) { - // The case is that Lucas is in Offense Up, has cleared past `pkfr_hold` effects, yet he does not have his hand effects. // - let handle = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handl"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, handle as i32); - let handle2 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("lucas_pkfr_hold"), Hash40::new("handr"), &Vector3f{x: -2.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 0.3, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, handle2 as i32); - let handle3 = EffectModule::req_follow(fighter.module_accessor, Hash40::new("sys_status_defense_up"), Hash40::new("hip"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, handle3 as i32); - } - else if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) - && (VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) != -1 || VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) != -1) { - // The case is that Lucas is no longer in Offence Up, and his hand effects NEED TO BE CLEARED. // - let handle = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1) as u32; - EffectModule::kill(fighter.module_accessor, handle, false, false); - let handle2 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2) as u32; - EffectModule::kill(fighter.module_accessor, handle2, false, false); - let handle3 = VarModule::get_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3) as u32; - EffectModule::kill(fighter.module_accessor, handle3, false, false); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE1, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE2, -1); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_EFFECT_HANDLE3, -1); - } -} - -pub unsafe fn lucas_offense_charge(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, situation_kind: i32, status_kind: i32) { - if(VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE)) { - if fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE] - ) { - //println!("In swing! Status of release: {} Reflective: {}", VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF)); - if(AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT)) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } - else if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4, *FIGHTER_STATUS_KIND_ATTACK_S4, - *FIGHTER_STATUS_KIND_ATTACK_HI4_START, *FIGHTER_STATUS_KIND_ATTACK_LW4_START, *FIGHTER_STATUS_KIND_ATTACK_S4_START, - *FIGHTER_STATUS_KIND_ATTACK_HI4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_LW4_HOLD, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_END]) && VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF - ) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - } - // Kirby specific, resets gimmick if copy ability isn't enabled - if ( WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) != FIGHTER_KIND_LUCAS || [*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_LOSE, *FIGHTER_STATUS_KIND_ENTRY].contains(&status_kind) || !sv_information::is_ready_go() ) { - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, LUCAS_CHARGE_TIME); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - -} - - -// LUCINA---------------------------------------------------------------------------------------------------------------------------- -// LUIGI---------------------------------------------------------------------------------------------------------------------------- -// MARIO---------------------------------------------------------------------------------------------------------------------------- -// MARIOD---------------------------------------------------------------------------------------------------------------------------- -// MARTH---------------------------------------------------------------------------------------------------------------------------- -// MASTER---------------------------------------------------------------------------------------------------------------------------- -unsafe fn master_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MASTER_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_MASTER_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_MASTER_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - - -// METAKNIGHT---------------------------------------------------------------------------------------------------------------------------- -// MEWTWO---------------------------------------------------------------------------------------------------------------------------- -unsafe fn mewtwo_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MEWTWO_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MEWTWO_SPECIAL_N_STATUS_WORK_ID_INT_CANCEL_STATUS); - } - if MotionModule::is_end(boma) { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); - } - } - } -} - - -// MIIFIGHTER---------------------------------------------------------------------------------------------------------------------------- -// MIIGUNNER---------------------------------------------------------------------------------------------------------------------------- -unsafe fn miigunner_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, cat2: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_MIIGUNNER_SPECIAL_N1_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_WORK_INT_CANCEL_STATUS); - } - } - } -} - -// MIISWORDSMAN---------------------------------------------------------------------------------------------------------------------------- -// MURABITO---------------------------------------------------------------------------------------------------------------------------- -// NANA---------------------------------------------------------------------------------------------------------------------------- -// NESS---------------------------------------------------------------------------------------------------------------------------- -// PACKUN---------------------------------------------------------------------------------------------------------------------------- -pub unsafe fn packun_ptooie_stance(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32) { - if fighter.is_status(*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_N_SWALLOW_WAIT) { - let opponent_boma = fighter.get_grabbed_opponent_boma(); - let grabbed_fighter = smash::app::utility::get_kind(opponent_boma); - if grabbed_fighter == *FIGHTER_KIND_PACKUN { - let old_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - let new_stance = VarModule::get_int(opponent_boma.object(), vars::packun::instance::CURRENT_STANCE); - if new_stance != old_stance { - // println!("Copying Pirahna Plant's Current Stance, which is {}", new_stance); - VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, new_stance); - } - } - } -} - -unsafe fn packun_ptooie_scale(boma: &mut BattleObjectModuleAccessor) { - if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 2 { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.3); - } - else { - VarModule::set_float(boma.object(), vars::packun::instance::PTOOIE_SCALE, 1.0); - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - - -// PACMAN---------------------------------------------------------------------------------------------------------------------------- -unsafe fn bonus_fruit_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_SHOOT { - if frame > 11.0 { - boma.check_airdodge_cancel(); - } - } -} - -unsafe fn pacman_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PACMAN_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_PACMAN_STATUS_SPECIAL_N_WORK_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - - -// PALUTENA---------------------------------------------------------------------------------------------------------------------------- -// This is unique to Kirby due to only having access to colorless attack. -unsafe fn colorless_attack_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PALUTENA_SPECIAL_N { - if (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && !boma.is_in_hitlag()) && frame > 19.0 { - boma.check_dash_cancel(); - } - } -} - -// PEACH---------------------------------------------------------------------------------------------------------------------------- -// PFUSHIGISOU---------------------------------------------------------------------------------------------------------------------------- -// PICHU---------------------------------------------------------------------------------------------------------------------------- -// PICKEL---------------------------------------------------------------------------------------------------------------------------- -// handles kirby's mining behavior when copying steve -unsafe fn pickel_mining(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { - if VarModule::get_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX) as i32 > 99 { - VarModule::set_int(boma.object(), vars::kirby::instance::MATERIAL_INDEX, 0); - } - - // wait 2 frames before letting the material table advance, preventing any jumps in entries - if !VarModule::is_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL) { - if VarModule::get_int(boma.object(), vars::kirby::status::MINING_TIMER) == 0 { - VarModule::on_flag(boma.object(), vars::kirby::instance::SHOULD_CYCLE_MATERIAL); - } else { - VarModule::dec_int(boma.object(), vars::kirby::status::MINING_TIMER); - } - } - } -} - - -// PIKACHU---------------------------------------------------------------------------------------------------------------------------- -// PIKMIN---------------------------------------------------------------------------------------------------------------------------- -// PIT---------------------------------------------------------------------------------------------------------------------------- -// PITB---------------------------------------------------------------------------------------------------------------------------- -unsafe fn pitb_bow_lc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if(WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_PITB){ - if [*FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_CHARGE, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_DIR, - *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_TURN].contains(&status_kind) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PIT_SPECIAL_N_SHOOT { - if situation_kind == *SITUATION_KIND_GROUND && StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR { - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - } - } - } - } -} - - -// PLIZARDON---------------------------------------------------------------------------------------------------------------------------- -unsafe fn plizardon_flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { - let prev_situation = StatusModule::prev_situation_kind(boma); - if status_kind != *FIGHTER_KIRBY_STATUS_KIND_PLIZARDON_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { - return; - } - if StatusModule::is_changing(boma) { - return; - } - if frame < 19.0 { - MotionModule::set_frame(boma, 18.0, true); - } -} - - -// POPO---------------------------------------------------------------------------------------------------------------------------- -// PURIN---------------------------------------------------------------------------------------------------------------------------- -// PZENIGAME---------------------------------------------------------------------------------------------------------------------------- -unsafe fn pzenigame_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { - //PM-like neutral-b canceling - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_PZENIGAME_SPECIAL_N_CHARGE { - if situation_kind == *SITUATION_KIND_AIR { - if boma.is_cat_flag(Cat1::AirEscape) { - WorkModule::unable_transition_term_group(boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ESCAPE); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); - } - } - } -} - - -// REFLET---------------------------------------------------------------------------------------------------------------------------- -unsafe fn reflet_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_REFLET_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FIGHTER_REFLET_STATUS_SPECIAL_N_HOLD_INT_NEXT_STATUS); - ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - - -// RICHTER---------------------------------------------------------------------------------------------------------------------------- -unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// RIDLEY---------------------------------------------------------------------------------------------------------------------------- -// ROBOT---------------------------------------------------------------------------------------------------------------------------- -// ROCKMAN---------------------------------------------------------------------------------------------------------------------------- -unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ROCKMAN_SPECIAL_N { - if boma.status_frame() > 16 { - boma.check_airdodge_cancel(); - } - } -} - - -// ROSETTA---------------------------------------------------------------------------------------------------------------------------- -// ROY---------------------------------------------------------------------------------------------------------------------------- -// RYU---------------------------------------------------------------------------------------------------------------------------- -// SAMUS & SAMUSD---------------------------------------------------------------------------------------------------------------------------- -unsafe fn samus_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SAMUS_SPECIAL_N_C { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_SAMUS_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_SAMUS_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - } - } - } -} - - -// SHEIK---------------------------------------------------------------------------------------------------------------------------- -unsafe fn sheik_nspecial_cancels(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SHEIK_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(boma, *STATUS_KIND_NONE, *FT_SHEIK_STATUS_SPECIAL_N_WORK_INT_CANCEL_STATUS); - } - } - } -} - - -// SHULK---------------------------------------------------------------------------------------------------------------------------- -// SIMON---------------------------------------------------------------------------------------------------------------------------- -unsafe fn axe_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_SIMON_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// SNAKE---------------------------------------------------------------------------------------------------------------------------- -// SONIC---------------------------------------------------------------------------------------------------------------------------- -// SZEROSUIT---------------------------------------------------------------------------------------------------------------------------- -// TANTAN---------------------------------------------------------------------------------------------------------------------------- -// TOONLINK---------------------------------------------------------------------------------------------------------------------------- -unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// TRAIL---------------------------------------------------------------------------------------------------------------------------- -unsafe fn magic_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - // Firaga Airdodge Cancel - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N1_SHOOT { - if frame > 2.0 { - boma.check_airdodge_cancel(); - } - } - // Thundaga Land Cancel - if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3) - && boma.is_situation(*SITUATION_KIND_GROUND) - && boma.is_prev_situation(*SITUATION_KIND_AIR) - { - let special_n_fire_cancel_frame_ground = 69.0; - let landing_lag = 12.0; - if MotionModule::frame(boma) < (special_n_fire_cancel_frame_ground - landing_lag) { - MotionModule::set_frame_sync_anim_cmd(boma, special_n_fire_cancel_frame_ground - landing_lag, true, true, true); - } - } -} - -// cycles Kirby to firaga after copying Sora -unsafe fn trail_magic_cycle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { - if fighter.is_motion(Hash40::new("special_n_drink")) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_TRAIL { - let magic_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TRAIL_INSTANCE_WORK_ID_INT_SPECIAL_N_MAGIC_KIND); - let kirby = fighter.global_table[0x4].get_ptr() as *mut Fighter; - if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_FIRE - && frame > 3.0 { - WorkModule::on_flag(fighter.boma(), *FIGHTER_TRAIL_STATUS_SPECIAL_N1_FLAG_CHANGE_MAGIC); - FighterSpecializer_Trail::change_magic(kirby); // cycles to thunder - } else if magic_kind == *FIGHTER_TRAIL_SPECIAL_N_MAGIC_KIND_THUNDER - && frame > 4.0 { - FighterSpecializer_Trail::change_magic(kirby); // cycles to "blizzard", which is now fire - } - } -} - - -// WARIO---------------------------------------------------------------------------------------------------------------------------- -unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { - if StatusModule::is_changing(boma) { - return; - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE { - if compare_mask(ControlModule::get_pad_flag(boma), *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) { - boma.change_status_req(*FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END, false); - } - } - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WARIO_SPECIAL_N_BITE_END { - if frame < 7.0 { - if facing * stick_x < 0.0 { - PostureModule::reverse_lr(boma); - PostureModule::update_rot_y_lr(boma); - } - } - } -} - - -// WIIFIT---------------------------------------------------------------------------------------------------------------------------- -unsafe fn wiifit_nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WIIFIT_SPECIAL_N_CANCEL { - if situation_kind == *SITUATION_KIND_AIR { - if WorkModule::get_int(boma, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE) == *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_AIR_ESCAPE_AIR { - WorkModule::set_int(boma, *FIGHTER_WIIFIT_SPECIAL_N_CANCEL_TYPE_NONE, *FIGHTER_WIIFIT_STATUS_SPECIAL_N_WORK_INT_CANCEL_TYPE); - //ControlModule::clear_command_one(boma, *FIGHTER_PAD_COMMAND_CATEGORY1, *FIGHTER_PAD_CMD_CAT1_AIR_ESCAPE); - } - } - } -} - - -// WOLF---------------------------------------------------------------------------------------------------------------------------- -unsafe fn wolf_drift_airdodge_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_WOLF_SPECIAL_N { - if frame > 17.0 { - boma.check_airdodge_cancel(); - } - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - -// YOSHI---------------------------------------------------------------------------------------------------------------------------- -// YOUNGLINK---------------------------------------------------------------------------------------------------------------------------- -unsafe fn fire_arrow_drift(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_YOUNGLINK_SPECIAL_N { - if situation_kind == *SITUATION_KIND_AIR { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } -} - - - -// ZELDA---------------------------------------------------------------------------------------------------------------------------- -unsafe fn nayru_drift_land_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32, frame: f32) { - if status_kind == *FIGHTER_KIRBY_STATUS_KIND_ZELDA_SPECIAL_N { - if situation_kind == *SITUATION_KIND_GROUND { - if StatusModule::prev_situation_kind(boma) == *SITUATION_KIND_AIR && frame < 55.0 { - //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_LANDING, false); - WorkModule::on_flag(boma, *FIGHTER_ZELDA_STATUS_SPECIAL_N_FLAG_REFLECTOR_END); - MotionModule::set_frame_sync_anim_cmd(boma, 56.0, true, true, false); - } - } - else if situation_kind == *SITUATION_KIND_AIR { - if frame >= 31.0 { - if KineticModule::get_kinetic_type(boma) != *FIGHTER_KINETIC_TYPE_FALL { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - } - } - } -} - - -pub unsafe fn copymoveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - // Common - magic_series(boma, id, cat, status_kind, situation_kind, motion_kind, stick_x, stick_y, facing, frame); - fastfall_copyspecials(fighter); - - // BAYONETTA - // BRAVE - dash_cancel_frizz(fighter); - brave_nspecial_cancels(fighter); - // BUDDY - blue_eggs_land_cancels(fighter); - // CAPTAIN - repeated_falcon_punch_turnaround(fighter); - // CHROM - // CLOUD - // DAISY - // DEDEDE - // DEMON - // DIDDY - peanut_popgun_ac(boma, status_kind, situation_kind, cat[1], frame); - diddy_nspecial_cancels(fighter, boma, status_kind); - // DOLLY - // DONKEY - donkey_nspecial_cancels(fighter, boma, status_kind, situation_kind); - // DUCKHUNT - // EDGE - edge_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - // EFLAME - // ELIGHT - // FALCO - falco_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - // FOX - fox_drift_laser_landcancel(boma, status_kind, situation_kind, cat[1], stick_y); - // GAMEWATCH - chef_drift_land_cancel(boma, status_kind, situation_kind, cat[1], stick_y); - // GANON - // GAOGAEN - lariat_ledge_slipoff(fighter); - // GEKKOUGA - max_water_shuriken_dc(boma, status_kind, situation_kind, cat[0], frame); - // IKE - // INKLING - // JACK - // KAMUI - // KEN - ken_air_hado_distinguish(fighter, boma, frame); - // KOOPA - koopa_flame_cancel(boma, status_kind, situation_kind, frame); - koopa_fireball_cooldown(boma, status_kind); - // KOOPAJR - clown_cannon_shield_cancel(boma, status_kind, situation_kind, frame); - // KROOL - // LINK - bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - // LITTLEMAC - // LUCARIO - lucario_nspecial_cancels(boma, status_kind, situation_kind, cat[2]); - // LUCAS - lucas_offense_charge(fighter, boma, situation_kind, status_kind); - lucas_offense_effct_handler(fighter); - // LUCINA - // LUIGI - // MARIO - // MARIOD - // MARTH - // MASTER - master_nspecial_cancels(boma, status_kind, situation_kind); - // METAKINGHT - // MEWTWO - mewtwo_nspecial_cancels(boma, status_kind, situation_kind); - // MIIFIGHTER - // MIIGUNNER - miigunner_nspecial_cancels(boma, status_kind, situation_kind, cat[1], cat[2]); - // MIISWORDSMAN - // MURABITO - // NANA - // NESS - // PACKUN - packun_ptooie_stance(fighter, boma, status_kind); - packun_ptooie_scale(boma); - // PACMAN - pacman_nspecial_cancels(boma, status_kind, situation_kind); - bonus_fruit_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - // PALUTENA - colorless_attack_dash_cancel(boma, status_kind, situation_kind, cat[0], frame); - // PEACH - // PFUSHIGISOU - // PICHU - // PICKEL - pickel_mining(fighter, boma); - // PIKACHU - // PIKMIN - // PIT - // PITB - pitb_bow_lc(boma, status_kind, situation_kind, cat[1], stick_y); - // PLIZARDON - plizardon_flame_cancel(boma, status_kind, situation_kind, frame); - // POPO - // PURIN - // PZENIGAME - pzenigame_nspecial_cancels(boma, status_kind, situation_kind, cat[1]); - // REFLET - reflet_nspecial_cancels(boma, status_kind, situation_kind); - // RICHTER - knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); - // RIDLEY - // ROBOT - // ROCKMAN - blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame); - // ROSETTA - // ROY - // RYU - // SAMUS & SAMUSD - samus_nspecial_cancels(boma, status_kind, situation_kind); - // SHEIK - sheik_nspecial_cancels(fighter, boma, status_kind, situation_kind); - // SHIZUE - // SHULK - // SIMON - axe_drift(boma, status_kind, situation_kind, cat[1], stick_y); - // SNAKE - // SONIC - // SZEROSUIT - // TANTAN - // TOONLINK - heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y); - // TRAIL - magic_cancels(boma, status_kind, situation_kind, cat[0], frame); - trail_magic_cycle(fighter, boma, frame); - // WARIO - bite_early_throw_turnaround(boma, status_kind, stick_x, facing, frame); - // WIIFIT - wiifit_nspecial_cancels(boma, status_kind, situation_kind); - // WOLF - wolf_drift_airdodge_cancel(boma, status_kind, situation_kind, cat[0], frame); - // YOSHI - // YOUNGLINK - fire_arrow_drift(fighter, boma, status_kind, situation_kind, cat[1], stick_y); - // ZELDA - nayru_drift_land_cancel(boma, status_kind, situation_kind, cat[2], stick_y, frame); -} - -pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - copymoveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); - } -} - -pub fn install() { - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install() -} diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index e4982205d0..2dd9d0ad6a 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -7,8 +7,6 @@ pub mod acmd; pub mod status; pub mod opff; -pub mod copyability; - use smash::{ lib::{ L2CValue, @@ -46,7 +44,6 @@ pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { let agent = &mut Agent::new("kirby"); acmd::install(agent); - copyability::install(agent); status::install(agent); opff::install(); agent.install(); From 6b793010758b3d23c892820131ff8face2267cfe Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 21 Mar 2024 22:10:14 -0400 Subject: [PATCH 047/172] lol --- fighters/kirby/src/acmd/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fighters/kirby/src/acmd/mod.rs b/fighters/kirby/src/acmd/mod.rs index 08566acdd5..f95d5929cc 100644 --- a/fighters/kirby/src/acmd/mod.rs +++ b/fighters/kirby/src/acmd/mod.rs @@ -7,6 +7,8 @@ mod specials; mod throws; mod ground; +mod copy; + pub fn install(agent: &mut Agent) { aerials::install(agent); tilts::install(agent); @@ -15,4 +17,6 @@ pub fn install(agent: &mut Agent) { specials::install(agent); throws::install(agent); ground::install(agent); + + copy::install(agent); } From c6f9378d551a68f2fcc3a27099293bbdcb64656e Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 21 Mar 2024 22:11:14 -0400 Subject: [PATCH 048/172] lol 2 --- fighters/kirby/src/acmd/copy/krool.rs | 114 +++++++++++++++++++ fighters/kirby/src/acmd/copy/luigi.rs | 155 ++++++++++++++++++++++++++ 2 files changed, 269 insertions(+) diff --git a/fighters/kirby/src/acmd/copy/krool.rs b/fighters/kirby/src/acmd/copy/krool.rs index e69de29bb2..5f5082d3ed 100644 --- a/fighters/kirby/src/acmd/copy/krool.rs +++ b/fighters/kirby/src/acmd/copy/krool.rs @@ -0,0 +1,114 @@ +use super::*; + +unsafe extern "C" fn effect_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 30.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 31.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT(agent, Hash40::new("krool_cannon_shot"), Hash40::new("top"), 16, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn sound_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n08")); + } + frame(lua_state, 31.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL) { + PLAY_SE(agent, Hash40::new("se_krool_special_n07")); + } + else if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + PLAY_SE(agent, Hash40::new("se_krool_special_n01")); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_krool_special_n09")); + } +} + +unsafe extern "C" fn expression_kroolspecialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_hide") as i64); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) && IS_GENERATABLE_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_IRONBALL) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + } + frame(lua_state, 31.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 76.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("crown") as i64, hash40("crown_normal") as i64); + } + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_KROOL_GENERATE_ARTICLE_PIRATEHAT, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } + frame(lua_state, 89.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); + } +} + +unsafe extern "C" fn effect_kroolspecialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::krool::instance::BLUNDERBUSS_GRAB) { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 0.8, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("krool_cannon_vacuum"), Hash40::new("top"), 0, 10, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 2.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.9); + } + if agent.is_situation(*SITUATION_KIND_GROUND) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 10, 0, 4, 0, 0, 0, false); + } + } + wait(lua_state, 10.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_kroolspecialnfire", effect_kroolspecialnfire); + agent.acmd("effect_kroolspecialairnfire", effect_kroolspecialnfire); + agent.acmd("sound_kroolspecialnfire", sound_kroolspecialnfire); + agent.acmd("sound_kroolspecialairnfire", sound_kroolspecialnfire); + agent.acmd( + "expression_kroolspecialnfire", + expression_kroolspecialnfire, + ); + agent.acmd( + "expression_kroolspecialairnfire", + expression_kroolspecialnfire, + ); + agent.acmd("effect_kroolspecialnloop", effect_kroolspecialnloop); + agent.acmd("effect_kroolspecialairnloop", effect_kroolspecialnloop); +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/luigi.rs b/fighters/kirby/src/acmd/copy/luigi.rs index e69de29bb2..4a415827cf 100644 --- a/fighters/kirby/src/acmd/copy/luigi.rs +++ b/fighters/kirby/src/acmd/copy/luigi.rs @@ -0,0 +1,155 @@ +use super::*; + +unsafe extern "C" fn game_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); + } + +} + +unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); + FLASH(agent, 0, 1, 0, 0.353); + } + frame(lua_state, 19.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 37.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); + } + +} + +unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); + } + +} + +unsafe extern "C" fn game_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 6.5, 9.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 6.5, 3.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + let mut rand = &Vector3f::new( + app::sv_math::rand(hash40("fighter"), 50) as f32, + app::sv_math::rand(hash40("stage"), 50) as f32, + app::sv_math::rand(hash40("luigi"), 50) as f32 + ); + let mut flip = &Vector3f::new( + if app::sv_math::rand(hash40("fighter"), 1) == 0 { -1 } else { 1 } as f32, + if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, + if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 + ); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 6.5, 9.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + FLASH(agent, 0, 0.25, 1.0, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 6.5, 9.0, 0, 90, 90, 0.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack02")); + PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); + } +} + +unsafe extern "C" fn expression_luigispecialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_luigispecialn", game_luigispecialn); + agent.acmd("game_luigispecialairn", game_luigispecialn); + agent.acmd("effect_luigispecialn", effect_luigispecialn); + agent.acmd("effect_luigispecialairn", effect_luigispecialn); + agent.acmd("sound_luigispecialn", sound_luigispecialn); + agent.acmd("sound_luigispecialairn", sound_luigispecialn); + agent.acmd("game_luigispecialnthunder", game_luigispecialnthunder); + agent.acmd("game_luigispecialairnthunder", game_luigispecialnthunder); + agent.acmd( + "effect_luigispecialnthunder", + effect_luigispecialnthunder, + ); + agent.acmd( + "effect_luigispecialairnthunder", + effect_luigispecialnthunder, + ); + agent.acmd("sound_luigispecialnthunder", sound_luigispecialnthunder); + agent.acmd( + "sound_luigispecialairnthunder", + sound_luigispecialnthunder, + ); + agent.acmd( + "expression_luigispecialnthunder", + expression_luigispecialnthunder, + ); + agent.acmd( + "expression_luigispecialairnthunder", + expression_luigispecialnthunder, + ); +} \ No newline at end of file From e76d5d6dfdec9caff2d0c4a633dc973f511d1abf Mon Sep 17 00:00:00 2001 From: Askew Date: Thu, 21 Mar 2024 22:32:38 -0400 Subject: [PATCH 049/172] Ridley --- fighters/ridley/src/acmd/aerials.rs | 290 ++++---- fighters/ridley/src/acmd/ground.rs | 112 ++-- fighters/ridley/src/acmd/mod.rs | 16 +- fighters/ridley/src/acmd/other.rs | 225 ++----- fighters/ridley/src/acmd/smashes.rs | 88 ++- fighters/ridley/src/acmd/specials.rs | 696 +++++++++----------- fighters/ridley/src/acmd/throws.rs | 104 ++- fighters/ridley/src/acmd/tilts.rs | 174 +++-- fighters/ridley/src/breath/acmd/mod.rs | 7 + fighters/ridley/src/breath/acmd/specials.rs | 18 + fighters/ridley/src/breath/mod.rs | 9 + fighters/ridley/src/lib.rs | 13 +- fighters/ridley/src/opff.rs | 6 +- fighters/ridley/src/status.rs | 8 +- fighters/ridley/src/status/special_lw.rs | 138 ++-- fighters/ridley/src/status/special_n.rs | 188 +++--- fighters/ridley/src/status/special_s.rs | 58 +- 17 files changed, 971 insertions(+), 1179 deletions(-) create mode 100644 fighters/ridley/src/breath/acmd/mod.rs create mode 100644 fighters/ridley/src/breath/acmd/specials.rs create mode 100644 fighters/ridley/src/breath/mod.rs diff --git a/fighters/ridley/src/acmd/aerials.rs b/fighters/ridley/src/acmd/aerials.rs index a26fd59814..a99d6ff6a0 100644 --- a/fighters/ridley/src/acmd/aerials.rs +++ b/fighters/ridley/src/acmd/aerials.rs @@ -1,65 +1,65 @@ use super::*; -unsafe extern "C" fn ridley_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 12.0, 44, 73, 0, 55, 5.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 9.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 9.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 12.0, 44, 73, 0, 55, 5.5, 7.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 9.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 9.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 9.0, 44, 74, 0, 55, 5.5, 7.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 6.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 9.0, 44, 74, 0, 55, 5.5, 7.5, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 6.0, 44, 62, 0, 55, 5.5, 0.0, -2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 44, 62, 0, 55, 6.5, 3.0, -2.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 63.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ridley_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_tail_arc_02"), Hash40::new("ridley_tail_arc_02"), Hash40::new("top"), 0, 12, -1, 0, 0, 90, 0.75, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_tail_arc_02"), Hash40::new("ridley_tail_arc_02"), Hash40::new("top"), 0, 12, -1, 0, 0, 90, 0.75, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.4); } } -unsafe extern "C" fn ridley_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 66, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 66, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); @@ -68,233 +68,223 @@ unsafe extern "C" fn ridley_attack_air_f_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 5, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 5.0, 367, 25, 0, 30, 5.0, 6.4, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 3.0, 367, 25, 0, 30, 6.5, -0.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 25, 0, 30, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail8"), 7.0, 361, 87, 0, 45, 5.0, 6.4, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 5.0, 361, 90, 0, 45, 6.5, -0.5, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 90, 0, 45, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail8"), 7.0, 361, 87, 0, 45, 5.0, 6.4, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 5.0, 361, 90, 0, 45, 6.5, -0.5, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 90, 0, 45, 7.2, 0.0, 8.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ridley_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 7.0/(13.0 - 1.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 55, 94, 0, 35, 6.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0, 361, 82, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 16.0, 361, 82, 0, 35, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 55, 94, 0, 35, 6.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0, 361, 82, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 16.0, 361, 82, 0, 35, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(31.0 - 27.0)); - } + FT_MOTION_RATE_RANGE(agent, 27.0, 31.0, 5.0); frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ridley_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_air_b"), Hash40::new("ridley_air_b"), Hash40::new("top"), 0, 8, -6, -183, 35, 18, 0.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_air_b"), Hash40::new("ridley_air_b"), Hash40::new("top"), 0, 8, -6, -183, 35, 18, 0.9, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn ridley_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 90, 70, 0, 70, 5.5, 0.0, 34.5, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 90, 70, 0, 70, 5.5, 0.0, 34.5, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 84, 62, 0, 70, 8.0, 0.0, 22.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 78, 60, 0, 70, 7.5, 0.0, 23.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ridley_attack_air_lw_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(19.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 19.0, 10.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail4"), 12.0, 361, 50, 0, 60, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail4"), 12.0, 361, 50, 0, 60, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail7"), 12.0, 361, 50, 0, 60, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail8"), 14.0, 50, 50, 0, 60, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.5); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn ridley_attack_air_lw_effect(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 10, -5, 0, -40, 90, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 10, -5, 0, -40, 90, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 0.55); } } -unsafe extern "C" fn ridley_attack_air_lw_sound(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_attackair_n01")); } } -unsafe extern "C" fn ridley_attack_air_lw_expression(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("tail7"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } } -unsafe extern "C" fn ridley_landing_air_lw_sound(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_landing02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_landing02")); } } -unsafe extern "C" fn ridley_landing_air_lw_expression(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, 0); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attackairn", ridley_attack_air_n_game) - .acmd("effect_attackairn", ridley_attack_air_n_effect) - .acmd("game_attackairf", ridley_attack_air_f_game) - .acmd("game_attackairb", ridley_attack_air_b_game) - .acmd("effect_attackairb", ridley_attack_air_b_effect) - .acmd("game_attackairhi", ridley_attack_air_hi_game) - .acmd("game_attackairlw", ridley_attack_air_lw_game) - .acmd("effect_attackairlw", ridley_attack_air_lw_effect) - .acmd("sound_attackairlw", ridley_attack_air_lw_sound) - .acmd("expression_attackairlw", ridley_attack_air_lw_expression) - .acmd("sound_landingairlw", ridley_landing_air_lw_sound) - .acmd("expression_landingairlw", ridley_landing_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/ridley/src/acmd/ground.rs b/fighters/ridley/src/acmd/ground.rs index d8c785db29..60aed72e91 100644 --- a/fighters/ridley/src/acmd/ground.rs +++ b/fighters/ridley/src/acmd/ground.rs @@ -1,110 +1,102 @@ use super::*; -unsafe extern "C" fn ridley_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.5, 180, 15, 0, 25, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.5, 361, 20, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.5, 180, 15, 0, 25, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - frame(lua_state, 16.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } + } -unsafe extern "C" fn ridley_attack11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), 0, 12, 4, -24.6, -5, 209, 1.35, true, *EF_FLIP_YZ); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), 0, 12, 4, -24.6, -5, 209, 1.35, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn ridley_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.5, 361, 20, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 361, 20, 0, 30, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 2.5, 361, 20, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.5, 361, 20, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 361, 20, 0, 30, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 2.5, 361, 20, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - frame(lua_state, 18.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } + } -unsafe extern "C" fn ridley_attack12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), -1, 10.5, 7.5, 8.5, 5.7, 33.2, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_scratch"), Hash40::new("ridley_scratch"), Hash40::new("top"), -1, 10.5, 7.5, 8.5, 5.7, 33.2, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn ridley_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.0, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.8, 0.0, 7.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.0, 0.0, 7.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 42, 128, 0, 50, 5.8, 0.0, 7.5, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.9 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 42, 80, 0, 70, 7.0, 0.0, 6.5, 14.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 42, 80, 0, 70, 7.0, 0.0, 6.5, 14.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attack11", ridley_attack_11_game) - .acmd("effect_attack11", ridley_attack11_effect) - .acmd("game_attack12", ridley_attack_12_game) - .acmd("effect_attack12", ridley_attack12_effect) - .acmd("game_attack13", ridley_attack_13_game) - .acmd("game_attackdash", ridley_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ridley/src/acmd/mod.rs b/fighters/ridley/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/ridley/src/acmd/mod.rs +++ b/fighters/ridley/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/ridley/src/acmd/other.rs b/fighters/ridley/src/acmd/other.rs index 5175dbca9a..5d3a92fdf3 100644 --- a/fighters/ridley/src/acmd/other.rs +++ b/fighters/ridley/src/acmd/other.rs @@ -1,230 +1,135 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ridley_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ridley_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dashturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn ridley_breath_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 48, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - wait(lua_state, 30.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 4.0); - WorkModule::on_flag(boma, *WEAPON_RIDLEY_BREATH_INSTANCE_WORK_ID_FLAG_CHANGE_SCALE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("expression_landingheavy", expression_landingheavy) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("ridley_breath") - .acmd("game_fly", ridley_breath_fly_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_dashturn); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ridley/src/acmd/smashes.rs b/fighters/ridley/src/acmd/smashes.rs index 0c9db4b660..6fb2636a5e 100644 --- a/fighters/ridley/src/acmd/smashes.rs +++ b/fighters/ridley/src/acmd/smashes.rs @@ -1,94 +1,92 @@ use super::*; -unsafe extern "C" fn ridley_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 7.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 82, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 82, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } } -unsafe extern "C" fn ridley_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 17.0, 82, 81, 0, 58, 6.0, -1.5, -1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 17.0, 82, 81, 0, 58, 4.5, 0.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 17.0, 82, 81, 0, 58, 6.0, -1.5, -1.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("toer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_lw4_expression(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw4(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter,*MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent,*MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 24.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, 0); } frame(lua_state, 53.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attacks4", ridley_attack_s4_s_game) - .acmd("game_attackhi4", ridley_attack_hi4_game) - .acmd("expression_attacklw4", ridley_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ridley/src/acmd/specials.rs b/fighters/ridley/src/acmd/specials.rs index 4b83d52cca..b6af0fd651 100644 --- a/fighters/ridley/src/acmd/specials.rs +++ b/fighters/ridley/src/acmd/specials.rs @@ -1,641 +1,547 @@ - use super::*; -unsafe extern "C" fn ridley_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(15.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 6.0); + } -unsafe extern "C" fn ridley_special_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } } -unsafe extern "C" fn ridley_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_FLAG_SHOOT); } } -unsafe extern "C" fn ridley_special_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_bleath_hold"), Hash40::new("mouth1"), 5, 1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_bleath_hold"), Hash40::new("mouth1"), 5, 1, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_bleath_hold"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_bleath_hold"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ridley_special_s02")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); - } -} - -unsafe extern "C" fn ridley_special_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_ridley_special_s02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_smash_s02")); } } -unsafe extern "C" fn ridley_special_air_n_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); +unsafe extern "C" fn expression_specialnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_OFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 80, 0, 58, 9.0, 0.0, 8.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } -unsafe extern "C" fn ridley_special_air_n_explode_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairnexplode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 15.5, -3.5, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11.5, -9, 0, 0, 0, 1.2, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_smash_bomb"), Hash40::new("top"), 0, 8.5, 15, 0, 0, 0, 1.2, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); - } -} - -unsafe extern "C" fn ridley_special_air_n_explode_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ridley_special_s02")); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_smash_s02")); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_mouth_fire"), Hash40::new("top"), 0, 11, 8.5, 0, 0, 0, 1, true); } } -unsafe extern "C" fn ridley_special_air_n_explode_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); - } -} - -unsafe extern "C" fn ridley_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 8.0, 6.0, 7.5, 7.5); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_S_FLAG_START_JUMP); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 7.0, 6.0, 7.5, 5.5); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 7.8, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 4.3, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_A); - CATCH(fighter, 2, Hash40::new("top"), 5.0, 0.0, 8.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 7.8, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 4.3, 0.0, 10.0, 18.0, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 8.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CATCHED_RIDLEY, *COLLISION_SITUATION_MASK_G); GrabModule::set_constraint(boma, 0, true); GrabModule::set_constraint(boma, 1, true); GrabModule::set_constraint(boma, 2, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 39.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn ridley_special_air_hi_charge_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 40, 66, 0, 75, 6.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_apecialairhichargef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 40, 66, 0, 75, 6.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 4.0, 0.0, 16.3, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 6.0, 0.0, 13.5, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairhichargeb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 4.0, 0.0, 16.3, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 78, 60, 0, 80, 6.0, 0.0, 13.5, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 4.0, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 6.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairhichargehi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 4.0, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 64, 46, 0, 85, 6.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_air_hi_charge_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhichargelw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 295, 35, 0, 50, 6.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 44, 50, 0, 85, 6.5, 0.0, 4.5, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 295, 35, 0, 50, 6.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 44, 50, 0, 85, 6.5, 0.0, 4.5, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_lw_stab_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstab(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 30.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::ridley::status::SKEWER_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::ridley::status::SKEWER_STICK_Y); let mut z_mod = -1.0 * grab_y; // no angle (normal Skewer) if grab_y == 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(29.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, 7.0, 24.5, Some(0.0), Some(7.0), Some(29.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(29.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } // angle up else if grab_y > 0.0 { z_mod = 3.0 * grab_y; - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 7.0) + 8.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 11.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } // angle down else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 45.0, 25, 10, 0, 70, 2.2, 0.0, (grab_y * 5.0) + 7.0, 24.5 - z_mod, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 361, 50, 0, 30, 2.2, 0.0, 7.0, 8.0, Some(0.0), Some((grab_y * 6.0) + 7.0), Some(29.5 - z_mod), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); } if WorkModule::get_int(boma, *FIGHTER_RIDLEY_INSTANCE_WORK_ID_INT_DISABLE_SPECIAL_LW_FINISH_COUNT) <= 0 { AttackModule::set_no_dead_all(boma, true, false); } - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.3); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.3); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_special_lw_stab_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstab(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::ridley::status::SKEWER_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::ridley::status::SKEWER_STICK_Y); let mut rot = 0 - ((grab_y * 25.0) as i32); let mut y_mod = if grab_y == 0.0 {0.0} else if grab_y > 0.0 {6.0} else {-3.0}; if grab_y < 0.0 { rot = 0 - ((grab_y * 15.0) as i32); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_death_stab_line"), Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, 8.0 + y_mod, 18, rot, 0, 0, 0.9, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_death_stab_line"), Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, 8.0 + y_mod, 18, rot, 0, 0, 0.9, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 32.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); } } -unsafe extern "C" fn ridley_special_lw_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwfinish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 57, 100, 150, 0, 2.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_stab"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 57, 100, 150, 0, 2.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_stab"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); AttackModule::set_no_finish_camera(boma, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, true, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let capture_id = LinkModule::get_node_object_id(boma, *LINK_NO_CAPTURE) as u32; - VarModule::set_int(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_CATCH_ID, capture_id as i32); - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_THROW); + VarModule::set_int(agent.battle_object, vars::ridley::instance::SPECIAL_LW_CATCH_ID, capture_id as i32); + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_THROW); WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_THROW); JostleModule::set_status(boma, true); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_ENABLE_GRAVITY); } } -unsafe extern "C" fn ridley_special_lw_pogo_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); } frame(lua_state, 32.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 17.0, 280, 73, 0, 37, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); /* Air-only */ - ATTACK(fighter, 6, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 7, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 6, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 7, 0, Hash40::new("tail8"), 17.0, 305, 45, 0, 38, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail7"), 12.0, 46, 70, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail5"), 12.0, 46, 70, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 5, 0, Hash40::new("tail3"), 12.0, 46, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 3, 4, 5, 0.5); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 1, 2, 6, 7, 0.7); + ATTACK(agent, 3, 0, Hash40::new("tail7"), 12.0, 46, 70, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail5"), 12.0, 46, 70, 0, 70, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 5, 0, Hash40::new("tail3"), 12.0, 46, 70, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 3, 4, 5, 0.5); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 1, 2, 6, 7, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 1, 2, 0.5); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 12.0, 46, 70, 0, 70, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 1, 2, 0.5); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); AttackModule::clear_all(boma); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); } } -unsafe extern "C" fn ridley_special_lw_pogo_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("tail8"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, -7, -8, 60, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_flare"), Hash40::new("tail8"), 0, 0, 0, 0, 180, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ridley_death_stab_line"), Hash40::new("top"), 0, -7, -8, 60, 0, 0, 0.9, true); } frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_sp_flash"), Hash40::new("tail8"), 10, -0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); } } -unsafe extern "C" fn ridley_special_lw_pogo_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_special_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_special_l01")); } frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_special_l02")); } } -unsafe extern "C" fn ridley_special_lw_pogo_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwpogo(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 0); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(17.0 - 1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 12.0); frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); + } -unsafe extern "C" fn ridley_special_lw_pogo_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ridley_death_stab_flare"), false, true); +unsafe extern "C" fn effect_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ridley_death_stab_flare"), false, true); EffectModule::set_visible_kind(boma, Hash40::new("ridley_death_stab_line"), false); EffectModule::set_visible_kind(boma, Hash40::new("sys_sp_flash"), false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -18, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), -18, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_landing03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_landing03")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ridley_attackair_f01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ridley_attackair_f01")); } } -unsafe extern "C" fn ridley_special_lw_pogo_landing_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwpogolanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, 0); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_specialnstart", ridley_special_n_start_game) - .acmd("game_specialairnstart", ridley_special_n_start_game) - .acmd("game_specialnhold", ridley_special_n_hold_game) - .acmd("game_specialairnhold", ridley_special_n_hold_game) - .acmd("game_specialnshoot", ridley_special_n_shoot_game) - .acmd("game_specialairnshoot", ridley_special_n_shoot_game) - .acmd("game_specialnexplode", ridley_special_n_explode_game) - .acmd("effect_specialnexplode", ridley_special_n_explode_effect) - .acmd("sound_specialnexplode", ridley_special_n_explode_sound) - .acmd( - "expression_specialnexplode", - ridley_special_n_explode_expression, - ) - .acmd("game_specialairnexplode", ridley_special_air_n_explode_game) - .acmd( - "effect_specialairnexplode", - ridley_special_air_n_explode_effect, - ) - .acmd( - "sound_specialairnexplode", - ridley_special_air_n_explode_sound, - ) - .acmd( - "expression_specialairnexplode", - ridley_special_air_n_explode_expression, - ) - .acmd("game_specialsstart", ridley_special_s_start_game) - .acmd("game_specialairsstart", ridley_special_s_start_game) - .acmd( - "game_specialairhichargef", - ridley_special_air_hi_charge_f_game, - ) - .acmd( - "game_specialairhichargeb", - ridley_special_air_hi_charge_b_game, - ) - .acmd( - "game_specialairhichargehi", - ridley_special_air_hi_charge_hi_game, - ) - .acmd( - "game_specialairhichargelw", - ridley_special_air_hi_charge_lw_game, - ) - .acmd("game_speciallwstab", ridley_special_lw_stab_game) - .acmd("game_specialairlwstab", ridley_special_lw_stab_game) - .acmd("effect_speciallwstab", ridley_special_lw_stab_effect) - .acmd("effect_specialairlwstab", ridley_special_lw_stab_effect) - .acmd("game_speciallwfinish", ridley_special_lw_finish_game) - .acmd("game_specialairlwfinish", ridley_special_lw_finish_game) - .acmd("game_specialairlwpogo", ridley_special_lw_pogo_game) - .acmd("effect_specialairlwpogo", ridley_special_lw_pogo_effect) - .acmd("sound_specialairlwpogo", ridley_special_lw_pogo_sound) - .acmd( - "expression_specialairlwpogo", - ridley_special_lw_pogo_expression, - ) - .acmd( - "game_speciallwpogolanding", - ridley_special_lw_pogo_landing_game, - ) - .acmd( - "effect_speciallwpogolanding", - ridley_special_lw_pogo_landing_effect, - ) - .acmd( - "sound_speciallwpogolanding", - ridley_special_lw_pogo_landing_sound, - ) - .acmd( - "expression_speciallwpogolanding", - ridley_special_lw_pogo_landing_expression, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnhold", game_specialnhold); + agent.acmd("game_specialairnhold", game_specialnhold); + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("game_specialnexplode", game_specialnexplode); + agent.acmd("effect_specialnexplode", effect_specialnexplode); + agent.acmd("sound_specialnexplode", sound_specialnexplode); + agent.acmd("expression_specialnexplode", expression_specialnexplode); + agent.acmd("game_specialairnexplode", game_specialnexplode); + agent.acmd("effect_specialairnexplode", effect_specialairnexplode); + agent.acmd("sound_specialairnexplode", sound_specialnexplode); + agent.acmd("expression_specialairnexplode", expression_specialnexplode); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("game_specialairhichargef", game_apecialairhichargef); + agent.acmd("game_specialairhichargeb", game_specialairhichargeb); + agent.acmd("game_specialairhichargehi", game_specialairhichargehi); + agent.acmd("game_specialairhichargelw", game_specialairhichargelw); + agent.acmd("game_speciallwstab", game_speciallwstab); + agent.acmd("game_specialairlwstab", game_speciallwstab); + agent.acmd("effect_speciallwstab", effect_speciallwstab); + agent.acmd("effect_specialairlwstab", effect_speciallwstab); + agent.acmd("game_speciallwfinish", game_speciallwfinish); + agent.acmd("game_specialairlwfinish", game_speciallwfinish); + agent.acmd("game_specialairlwpogo", game_speciallwpogo); + agent.acmd("effect_specialairlwpogo", effect_speciallwpogo); + agent.acmd("sound_specialairlwpogo", sound_speciallwpogo); + agent.acmd("expression_specialairlwpogo", expression_speciallwpogo); + agent.acmd("game_speciallwpogolanding", game_speciallwpogolanding); + agent.acmd("effect_speciallwpogolanding", effect_speciallwpogolanding); + agent.acmd("sound_speciallwpogolanding", sound_speciallwpogolanding); + agent.acmd("expression_speciallwpogolanding", expression_speciallwpogolanding); } diff --git a/fighters/ridley/src/acmd/throws.rs b/fighters/ridley/src/acmd/throws.rs index 7d8c3a6018..c170067306 100644 --- a/fighters/ridley/src/acmd/throws.rs +++ b/fighters/ridley/src/acmd/throws.rs @@ -1,28 +1,28 @@ use super::*; -unsafe extern "C" fn ridley_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ridley_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -42,7 +42,7 @@ unsafe extern "C" fn ridley_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ridley_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -62,76 +62,74 @@ unsafe extern "C" fn ridley_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ridley_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 38, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 38, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 30, 17); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 30, 17); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ridley_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 24, 4); + CHECK_FINISH_CAMERA(agent, 24, 4); } frame(lua_state, 18.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn ridley_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 75, 98, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 75, 98, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 4, 1); - CHECK_FINISH_CAMERA(fighter, 19, 2); + if is_excute(agent) { + FT_CATCH_STOP(agent, 4, 1); + CHECK_FINISH_CAMERA(agent, 19, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_catch", ridley_catch_game) - .acmd("game_catchdash", ridley_catch_dash_game) - .acmd("game_catchturn", ridley_catch_turn_game) - .acmd("game_throwf", ridley_throw_f_game) - .acmd("game_throwb", ridley_throw_b_game) - .acmd("game_throwlw", ridley_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ridley/src/acmd/tilts.rs b/fighters/ridley/src/acmd/tilts.rs index 4b5c1cbdaf..e7966a78fb 100644 --- a/fighters/ridley/src/acmd/tilts.rs +++ b/fighters/ridley/src/acmd/tilts.rs @@ -1,167 +1,153 @@ use super::*; -unsafe extern "C" fn ridley_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); - } + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail7"), 10.0, 361, 71, 0, 50, 5.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 71, 0, 50, 7.5, 0.0, 7.0, 5.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail8"), 13.0, 361, 71, 0, 55, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("wingr2"), 10.0, 85, 110, 0, 55, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr3"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, -5.7, 2.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 10.0, 85, 110, 0, 55, 6.0, 0.0, 13.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("wingr2"), 10.0, 85, 110, 0, 55, 5.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr3"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, -5.7, 2.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("wingr6"), 10.0, 85, 110, 0, 55, 5.5, 0.0, 2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 85, 110, 0, 55, 6.0, 0.0, 13.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth1"), *HIT_STATUS_NORMAL); AttackModule::clear(boma, 4, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("wingr2"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("wingr1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_wing"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ridley_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 78, 80, 0, 75, 4.0, 0.0, 3.8, 19.0, Some(0.0), Some(3.8), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 85, 80, 0, 75, 4.5, 0.0, 3.8, 28.5, Some(0.0), Some(3.8), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 78, 80, 0, 75, 4.0, 0.0, 3.8, 19.0, Some(0.0), Some(3.8), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 85, 80, 0, 75, 4.5, 0.0, 3.8, 28.5, Some(0.0), Some(3.8), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ridley_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ridley_tail_arc"), Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 8.5, 6.5, -9.2, -5, -163, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ridley_tail_arc"), Hash40::new("ridley_tail_arc"), Hash40::new("top"), 0, 8.5, 6.5, -9.2, -5, -163, 1, true, *EF_FLIP_YZ); } } -pub fn install() { - smashline::Agent::new("ridley") - .acmd("game_attacks3hi", ridley_attack_s3_hi_game) - .acmd("game_attacks3", ridley_attack_s3_s_game) - .acmd("game_attacks3lw", ridley_attack_s3_lw_game) - .acmd("game_attackhi3", ridley_attack_hi3_game) - .acmd("expression_attackhi3", ridley_attack_hi3_expression) - .acmd("game_attacklw3", ridley_attack_lw3_game) - .acmd("effect_attacklw3", ridley_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3s); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/ridley/src/breath/acmd/mod.rs b/fighters/ridley/src/breath/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/ridley/src/breath/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/ridley/src/breath/acmd/specials.rs b/fighters/ridley/src/breath/acmd/specials.rs new file mode 100644 index 0000000000..9d3035f8ba --- /dev/null +++ b/fighters/ridley/src/breath/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 48, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + wait(lua_state, 30.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 4.0); + WorkModule::on_flag(boma, *WEAPON_RIDLEY_BREATH_INSTANCE_WORK_ID_FLAG_CHANGE_SCALE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/ridley/src/breath/mod.rs b/fighters/ridley/src/breath/mod.rs new file mode 100644 index 0000000000..99111e0a79 --- /dev/null +++ b/fighters/ridley/src/breath/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ridley_breath"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ridley/src/lib.rs b/fighters/ridley/src/lib.rs index 8e2ddcc726..70baf799a0 100644 --- a/fighters/ridley/src/lib.rs +++ b/fighters/ridley/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +// articles +mod breath; + use smash::{ lib::{ L2CValue, @@ -39,7 +42,11 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ridley"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + breath::install(); } diff --git a/fighters/ridley/src/opff.rs b/fighters/ridley/src/opff.rs index c22dadc700..e89e876dc1 100644 --- a/fighters/ridley/src/opff.rs +++ b/fighters/ridley/src/opff.rs @@ -162,8 +162,6 @@ pub unsafe fn ridley_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ridley") - .on_line(Main, ridley_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ridley_frame_wrapper); } diff --git a/fighters/ridley/src/status.rs b/fighters/ridley/src/status.rs index 404ec21f5f..e1cc5d0272 100644 --- a/fighters/ridley/src/status.rs +++ b/fighters/ridley/src/status.rs @@ -5,8 +5,8 @@ mod special_n; mod special_s; mod special_lw; -pub fn install() { - special_n::install(); - special_s::install(); - special_lw::install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_lw::install(agent); } diff --git a/fighters/ridley/src/status/special_lw.rs b/fighters/ridley/src/status/special_lw.rs index 8a6275e45c..7a5dc1bf0b 100644 --- a/fighters/ridley/src/status/special_lw.rs +++ b/fighters/ridley/src/status/special_lw.rs @@ -1,96 +1,96 @@ use super::*; use globals::*; -unsafe extern "C" fn special_lw_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND - || VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB); - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +unsafe extern "C" fn special_lw_main(agent: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND + || VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB); + smashline::original_status(Main, agent, *FIGHTER_STATUS_KIND_SPECIAL_LW)(agent) } else { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) <= 0.0 { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) <= 0.0 { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(agent.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); } - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_TO_FINISH); - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_lw_pogo"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + WorkModule::off_flag(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_TO_FINISH); + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_lw_pogo"), 0.0, 1.0, false, 0.0, false, false); + agent.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } } -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING) { - if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); +unsafe extern "C" fn special_lw_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING) { + if StatusModule::situation_kind(agent.module_accessor) != *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + else if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } } - else if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - if VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - fighter.set_situation(SITUATION_KIND_GROUND.into()); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw_pogo_landing"), 0.0, 1.0, false, 0.0, false, false); - VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); + else if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + if VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + agent.set_situation(SITUATION_KIND_GROUND.into()); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_lw_pogo_landing"), 0.0, 1.0, false, 0.0, false, false); + VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); } else { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); + agent.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); return true.into() } } - else if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + else if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_air_check_fall_common().get_bool() { + else if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_air_check_fall_common().get_bool() { return true.into() } } else { - special_lw_pogo_bounce_check(fighter, VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE)); + special_lw_pogo_bounce_check(agent, VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE)); } false.into() } -unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon, check_hit: bool) { +unsafe extern "C" fn special_lw_pogo_bounce_check(agent: &mut L2CFighterCommon, check_hit: bool) { let v3f_tail_pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; - ModelModule::joint_global_position(fighter.module_accessor, Hash40::new("tail8"), v3f_tail_pos, false); - let pos_x_global = PostureModule::pos_x(fighter.module_accessor); - let pos_y_global = PostureModule::pos_y(fighter.module_accessor); - let lr = PostureModule::lr(fighter.module_accessor); - let stored_pos = VarModule::get_vec2(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS); + ModelModule::joint_global_position(agent.module_accessor, Hash40::new("tail8"), v3f_tail_pos, false); + let pos_x_global = PostureModule::pos_x(agent.module_accessor); + let pos_y_global = PostureModule::pos_y(agent.module_accessor); + let lr = PostureModule::lr(agent.module_accessor); + let stored_pos = VarModule::get_vec2(agent.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS); let pos_x_prev = stored_pos.x; let pos_y_prev = stored_pos.y; // save current tail position relative to fighter - VarModule::set_vec2(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS, Vector2f{x: v3f_tail_pos.x - pos_x_global, y: v3f_tail_pos.y - pos_y_global}); + VarModule::set_vec2(agent.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS, Vector2f{x: v3f_tail_pos.x - pos_x_global, y: v3f_tail_pos.y - pos_y_global}); if check_hit { let ground_hit_pos = &mut Vector2f{x: 0.0, y: 0.0}; if GroundModule::ray_check_hit_pos( // checks for ground between previous tail pos and current tail pos, saves collision pos to "ground_hit_pos" - fighter.module_accessor, + agent.module_accessor, &Vector2f{x: pos_x_prev + pos_x_global, y: pos_y_prev + pos_y_global}, &Vector2f{x: (v3f_tail_pos.x - (pos_x_prev + pos_x_global)) + (8.0 * lr), y: v3f_tail_pos.y - (pos_y_prev + pos_y_global) - 8.0}, ground_hit_pos, @@ -100,7 +100,7 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon let mut slope_angle = 0.0; let slope_check_pos = &mut Vector2f{x: 0.0, y: 0.0}; if GroundModule::ray_check_hit_pos( - fighter.module_accessor, + agent.module_accessor, &Vector2f{x: ground_hit_pos.x + (5.0 * lr), y: ground_hit_pos.y + 5.0}, &Vector2f{x: 0.0, y: -10.0 }, slope_check_pos, @@ -114,11 +114,11 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon slope_angle = 360.0 -((-pos_diff_y / 5.0).atan().to_degrees()); } } - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - PLAY_SE(fighter, Hash40::new("se_ridley_special_h03")); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_impact"), 0, false, 0); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + PLAY_SE(agent, Hash40::new("se_ridley_special_h03")); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, 0); let bounce_vel_max = 2.5; let bounce_vel_min = 0.0; @@ -130,18 +130,18 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon else if velocity_y < bounce_vel_min { velocity_y = bounce_vel_min; } - let velocity_x = PostureModule::lr(fighter.module_accessor) * KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - SET_SPEED_EX(fighter, velocity_x*0.5, velocity_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let velocity_x = PostureModule::lr(agent.module_accessor) * KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, velocity_x*0.5, velocity_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } - else if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { + else if AttackModule::is_infliction(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { // hitting a hurtbox gives set momentum - let velocity_x = PostureModule::lr(fighter.module_accessor) * KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - SET_SPEED_EX(fighter, velocity_x*0.5, 1.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + let velocity_x = PostureModule::lr(agent.module_accessor) * KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, velocity_x*0.5, 1.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } } @@ -154,12 +154,6 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon // return true.into() // } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - special_lw_status_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } \ No newline at end of file diff --git a/fighters/ridley/src/status/special_n.rs b/fighters/ridley/src/status/special_n.rs index c51554c896..e08eab1751 100644 --- a/fighters/ridley/src/status/special_n.rs +++ b/fighters/ridley/src/status/special_n.rs @@ -1,125 +1,125 @@ use super::*; use globals::*; -unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); - WorkModule::set_int64(fighter.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); +unsafe extern "C" fn special_n_charge_main(agent: &mut L2CFighterCommon) -> L2CValue { + WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); + WorkModule::set_int64(agent.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + WorkModule::set_int64(agent.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + if agent.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); } else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_hold"), 0.0, 1.0, false, 0.0, false, false); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_n_hold"), 0.0, 1.0, false, 0.0, false, false); } - let max_charge_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")) as f32; - let end_frame = MotionModule::end_frame(fighter.module_accessor); - MotionModule::set_rate(fighter.module_accessor, end_frame/max_charge_frame); - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - let charge = WorkModule::get_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - if !StopModule::is_stop(fighter.module_accessor) { - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let max_charge_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")) as f32; + let end_frame = MotionModule::end_frame(agent.module_accessor); + MotionModule::set_rate(agent.module_accessor, end_frame/max_charge_frame); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); + WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let charge = WorkModule::get_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + if !StopModule::is_stop(agent.module_accessor) { + WorkModule::inc_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_n_charge_substatus as *const () as _)); + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_n_charge_substatus as *const () as _)); - fighter.main_shift(special_n_charge_main_loop) + agent.main_shift(special_n_charge_main_loop) } -unsafe extern "C" fn special_n_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - if StatusModule::is_situation_changed(fighter.module_accessor) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - fighter.set_situation(SITUATION_KIND_GROUND.into()); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_hold"), -1.0, 1.0, 0.0, false, false); +unsafe extern "C" fn special_n_charge_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(agent.module_accessor) { + if StatusModule::is_situation_changed(agent.module_accessor) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + agent.set_situation(SITUATION_KIND_GROUND.into()); + MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new("special_n_hold"), -1.0, 1.0, 0.0, false, false); } else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_hold"), -1.0, 1.0, 0.0, false, false); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + agent.set_situation(SITUATION_KIND_AIR.into()); + MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new("special_air_n_hold"), -1.0, 1.0, 0.0, false, false); } } } - let mut min_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("min_weak_size")); - let mut max_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("max_weak_size")); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - min_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("min_weak_size_kirby")); - max_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("max_weak_size_kirby")); + let mut min_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("min_weak_size")); + let mut max_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("max_weak_size")); + if agent.kind() == *FIGHTER_KIND_KIRBY { + min_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("min_weak_size_kirby")); + max_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("max_weak_size_kirby")); } - let end_frame = MotionModule::end_frame(fighter.module_accessor); + let end_frame = MotionModule::end_frame(agent.module_accessor); let size_ratio = (max_weak_size - min_weak_size); - let ratio = MotionModule::frame(fighter.module_accessor) / end_frame; + let ratio = MotionModule::frame(agent.module_accessor) / end_frame; let size = min_weak_size + (size_ratio * ratio); - WorkModule::set_float(fighter.module_accessor, size, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_FLOAT_WEAK_SIZE); - ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("virtualweakpoint"), &Vector3f::new(size, size, size)); - if !MotionModule::is_end(fighter.module_accessor) { - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); + WorkModule::set_float(agent.module_accessor, size, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_FLOAT_WEAK_SIZE); + ModelModule::set_joint_scale(agent.module_accessor, Hash40::new("virtualweakpoint"), &Vector3f::new(size, size, size)); + if !MotionModule::is_end(agent.module_accessor) { + if ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { + VarModule::on_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); } - else if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + else if !ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { return 0.into() } } - let max_charge_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")); - let charge_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - let max_fire_num = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_fire_num")); + let max_charge_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")); + let charge_count = WorkModule::get_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let max_fire_num = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_fire_num")); let fire_num = ((max_fire_num - 1) * (charge_count / max_charge_frame)) + 1; - WorkModule::set_int(fighter.module_accessor, fire_num, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); - fighter.change_status(FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); + WorkModule::set_int(agent.module_accessor, fire_num, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); + agent.change_status(FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); return 0.into() } -unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_n_charge_substatus(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + WorkModule::inc_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); } return 0.into() } -unsafe extern "C" fn special_n_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { - VarModule::off_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); - WorkModule::set_int64(fighter.module_accessor, hash40("special_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_explode"), 0.0, 1.0, false, 0.0, false, false); +unsafe extern "C" fn special_n_shoot_main(agent: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { + VarModule::off_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); + WorkModule::set_int64(agent.module_accessor, hash40("special_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + WorkModule::set_int64(agent.module_accessor, hash40("special_air_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_n_explode"), 0.0, 1.0, false, 0.0, false, false); } else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_explode"), 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_n_explode"), 0.0, 1.0, false, 0.0, false, false); } - HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); - fighter.sub_shift_status_main(L2CValue::Ptr(special_n_shoot_main_loop as *const () as _)) + agent.sub_shift_status_main(L2CValue::Ptr(special_n_shoot_main_loop as *const () as _)) } else { - smashline::original_status(Main, fighter, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT)(fighter) + smashline::original_status(Main, agent, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT)(agent) } } -unsafe extern "C" fn special_n_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) != StatusModule::prev_situation_kind(fighter.module_accessor) { - special_n_situation_helper(fighter); +unsafe extern "C" fn special_n_shoot_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(agent.module_accessor) != StatusModule::prev_situation_kind(agent.module_accessor) { + special_n_situation_helper(agent); } - if MotionModule::is_end(fighter.module_accessor) { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + if MotionModule::is_end(agent.module_accessor) { + if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); } else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return true.into() } - else if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_air_check_fall_common().get_bool() - || fighter.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_air_check_fall_common().get_bool() + || agent.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } @@ -127,34 +127,24 @@ unsafe extern "C" fn special_n_shoot_main_loop(fighter: &mut L2CFighterCommon) - false.into() } -unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - fighter.set_situation(SITUATION_KIND_GROUND.into()); - let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); +unsafe extern "C" fn special_n_situation_helper(agent: &mut L2CFighterCommon) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + agent.set_situation(SITUATION_KIND_GROUND.into()); + let motion = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + agent.set_situation(SITUATION_KIND_AIR.into()); + let motion = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE, - special_n_charge_main, - ) - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT, - special_n_shoot_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main); } \ No newline at end of file diff --git a/fighters/ridley/src/status/special_s.rs b/fighters/ridley/src/status/special_s.rs index a8e4106afe..223be1739f 100644 --- a/fighters/ridley/src/status/special_s.rs +++ b/fighters/ridley/src/status/special_s.rs @@ -1,55 +1,49 @@ use super::*; use globals::*; -unsafe extern "C" fn special_s_failure_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(fighter.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(fighter.module_accessor)) + WorkModule::get_param_int(fighter.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; +unsafe extern "C" fn special_s_failure_main(agent: &mut L2CFighterCommon) -> L2CValue { + let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(agent.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(agent.module_accessor)) + WorkModule::get_param_int(agent.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; if cancel_frame < 1.0 { - VarModule::set_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, 1.0); + VarModule::set_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, 1.0); } else { - VarModule::set_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, cancel_frame); + VarModule::set_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, cancel_frame); } - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_failure"), 0.0, 1.0, false, 0.0, false, false); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); - let speed_x = sv_kinetic_energy::get_speed_x(fighter.lua_state_agent)*WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("failure_speed_x_mul")); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_GROUND, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy::set_speed(fighter.lua_state_agent); + MotionModule::change_motion(agent.module_accessor, Hash40::new("special_s_failure"), 0.0, 1.0, false, 0.0, false, false); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP); + let speed_x = sv_kinetic_energy::get_speed_x(agent.lua_state_agent)*WorkModule::get_param_float(agent.module_accessor, hash40("param_special_s"), hash40("failure_speed_x_mul")); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_GROUND, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy::reset_energy(agent.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy::set_speed(agent.lua_state_agent); - fighter.sub_shift_status_main(L2CValue::Ptr(side_special_failure_main_loop as *const () as _)) + agent.sub_shift_status_main(L2CValue::Ptr(side_special_failure_main_loop as *const () as _)) } -pub unsafe fn side_special_failure_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); +pub unsafe fn side_special_failure_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(agent.module_accessor) != *SITUATION_KIND_GROUND { + agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + else if MotionModule::is_end(agent.module_accessor) { + agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } - else if VarModule::get_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME) <= MotionModule::frame(fighter.module_accessor) { - CancelModule::enable_cancel(fighter.module_accessor); + else if VarModule::get_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME) <= MotionModule::frame(agent.module_accessor) { + CancelModule::enable_cancel(agent.module_accessor); } false.into() } -pub fn install() { - smashline::Agent::new("ridley") - .status( - Main, - *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE, - special_s_failure_status_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE, special_s_failure_main); } \ No newline at end of file From dd2ddb4e4f107ee1834314e19969b6b3310a293f Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 07:41:20 -0500 Subject: [PATCH 050/172] pikachu --- fighters/pikachu/src/acmd/aerials.rs | 313 ++++++++---------- fighters/pikachu/src/acmd/ground.rs | 29 +- fighters/pikachu/src/acmd/mod.rs | 16 +- fighters/pikachu/src/acmd/other.rs | 204 +++--------- fighters/pikachu/src/acmd/smashes.rs | 141 ++++---- fighters/pikachu/src/acmd/specials.rs | 33 +- fighters/pikachu/src/acmd/throws.rs | 118 ++++--- fighters/pikachu/src/acmd/tilts.rs | 147 ++++---- fighters/pikachu/src/kaminari/acmd/mod.rs | 7 + .../pikachu/src/kaminari/acmd/specials.rs | 18 + fighters/pikachu/src/kaminari/mod.rs | 9 + fighters/pikachu/src/lib.rs | 15 +- fighters/pikachu/src/opff.rs | 8 +- 13 files changed, 474 insertions(+), 584 deletions(-) create mode 100644 fighters/pikachu/src/kaminari/acmd/mod.rs create mode 100644 fighters/pikachu/src/kaminari/acmd/specials.rs create mode 100644 fighters/pikachu/src/kaminari/mod.rs diff --git a/fighters/pikachu/src/acmd/aerials.rs b/fighters/pikachu/src/acmd/aerials.rs index 058306d966..023b53369d 100644 --- a/fighters/pikachu/src/acmd/aerials.rs +++ b/fighters/pikachu/src/acmd/aerials.rs @@ -1,319 +1,286 @@ use super::*; -unsafe extern "C" fn pikachu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 77, 0, 48, 6.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 77, 0, 48, 6.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 24.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 77, 0, 48, 5.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 6.0, 24.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 77, 0, 48, 5.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pikachu_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_elec_spark"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_elec_spark"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.65, true); EffectModule::enable_sync_init_pos_last(boma); - BURN_COLOR(fighter, 0.4, 0.6, 4, 0.7); + BURN_COLOR(agent, 0.4, 0.6, 4, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 2, 0.4, 0.6, 4, 0); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 2, 0.4, 0.6, 4, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 0.4, 0.6, 4, 0.7); + if is_excute(agent) { + BURN_COLOR(agent, 0.4, 0.6, 4, 0.7); } frame(lua_state, 12.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 2, 0.4, 0.6, 4, 0); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 2, 0.4, 0.6, 4, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_elec_spark"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_elec_spark"), false, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek"), false, true); } } -unsafe extern "C" fn pikachu_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 35, 100, 50, 0, 2.0, 0.0, 1.5, 9.5, Some(0.0), Some(1.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 290, 100, 45, 0, 2.0, 0.0, 9.5, 9.5, Some(0.0), Some(9.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 60, 100, 35, 0, 2.0, 0.0, 1.5, 13.0, Some(0.0), Some(1.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 280, 100, 35, 0, 2.0, 0.0, 9.5, 13.0, Some(0.0), Some(9.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 35, 100, 50, 0, 2.0, 0.0, 1.5, 9.5, Some(0.0), Some(1.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 290, 100, 45, 0, 2.0, 0.0, 9.5, 9.5, Some(0.0), Some(9.5), Some(8.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 60, 100, 35, 0, 2.0, 0.0, 1.5, 13.0, Some(0.0), Some(1.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 280, 100, 35, 0, 2.0, 0.0, 9.5, 13.0, Some(0.0), Some(9.5), Some(9.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 154, 0, 40, 6.0, 0.0, 5.5, 12.0, Some(0.0), Some(5.5), Some(9.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 154, 0, 40, 6.0, 0.0, 5.5, 12.0, Some(0.0), Some(5.5), Some(9.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 111, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 361, 111, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 111, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 361, 111, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 100, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 3.0, -15.0, 0, 0, 0, 1.4, true, 1.0); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 3.0, -15.0, 0, 0, 0, 1.4, true, 1.0); + LAST_EFFECT_SET_RATE(agent, 2); } - } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_pikachu_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); - PLAY_SE(fighter, Hash40::new("se_pikachu_tailswing")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_pikachu_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_common_swing_04")); + PLAY_SE(agent, Hash40::new("se_pikachu_tailswing")); } - -} - -unsafe extern "C" fn game_landingairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - } -unsafe extern "C" fn expression_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 80, 100, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 80, 100, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 80, 100, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 80, 100, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 7.5, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 0, 60, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 0, 60, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + FT_MOTION_RATE_RANGE(agent, 5.0, 7.5, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 0, 60, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 0, 60, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 7.5); - FT_MOTION_RATE_RANGE(fighter, 7.5, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 130, 80, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 7.0, 130, 80, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_TAIL); + FT_MOTION_RATE_RANGE(agent, 7.5, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 130, 80, 0, 41, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 7.0, 130, 80, 0, 41, 5.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_TAIL); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn expression_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("neck"), 13.0, 270, 82, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 13.0, 270, 82, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("neck"), 13.0, 270, 59, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 13.0, 270, 59, 0, 16, 5.5, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 12.0, 361, 100, 0, 20, 5.7, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 12.0, 361, 100, 0, 20, 5.7, 2.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn game_landingairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); -unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairf", game_attackairf); -unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_landingairb", null); -unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attackairn", pikachu_attack_air_n_game) - .acmd("effect_attackairn", pikachu_attack_air_n_effect) - .acmd("expression_attackairn", pikachu_attack_air_n_expression) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("game_landingairb", game_landingairb) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_landingairlw", game_landingairlw) - .acmd("effect_landingairlw", effect_landingairlw) - .acmd("expression_landingairlw", expression_landingairlw) - .acmd("sound_landingairlw", sound_landingairlw) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", null); + agent.acmd("effect_landingairlw", null); + agent.acmd("sound_landingairlw", null); + agent.acmd("expression_landingairlw", null); } diff --git a/fighters/pikachu/src/acmd/ground.rs b/fighters/pikachu/src/acmd/ground.rs index 3cb1307aac..ed1588f3a1 100644 --- a/fighters/pikachu/src/acmd/ground.rs +++ b/fighters/pikachu/src/acmd/ground.rs @@ -1,28 +1,25 @@ use super::*; -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 5.0, 2.2, -1.1, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 5.0, 2.2, -1.1, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 60, 88, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 4.0, 2.2, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 4.0, 2.2, -1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 7.0, 70, 120, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikachu/src/acmd/mod.rs b/fighters/pikachu/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/pikachu/src/acmd/mod.rs +++ b/fighters/pikachu/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pikachu/src/acmd/other.rs b/fighters/pikachu/src/acmd/other.rs index b6da0cc5b9..c692008036 100644 --- a/fighters/pikachu/src/acmd/other.rs +++ b/fighters/pikachu/src/acmd/other.rs @@ -1,209 +1,113 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pikachu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pikachu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikachu_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikachu_step_left_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikachu_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikachu_step_right_l")); } } -unsafe extern "C" fn pikachu_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn pikachu_kaminari_regular_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 270, 60, 125, 55, 6.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f::new(0.0, -100.0), 24, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 60, 0, 74, 7.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", pikachu_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("pikachu_kaminari") - .acmd("game_regular", pikachu_kaminari_regular_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pikachu/src/acmd/smashes.rs b/fighters/pikachu/src/acmd/smashes.rs index 764b345f0b..df2f9fb110 100644 --- a/fighters/pikachu/src/acmd/smashes.rs +++ b/fighters/pikachu/src/acmd/smashes.rs @@ -1,140 +1,135 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 11.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 45, 73, 0, 50, 2.5, 0.0, 7.0, 11.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 50, 3.6, 0.0, 7.0, 14.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 50, 3.6, 0.0, 7.0, 14.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 60, 3.6, 0.0, 7.0, 18.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 45, 75, 0, 60, 3.6, 0.0, 7.0, 18.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 5.5, 0.0, 7.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 5.5, 0.0, 7.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 4.5, 0.0, 7.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 102, 0, 40, 4.5, 0.0, 7.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 6, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pikachu_elec_shock"), Hash40::new("top"), 0, 7, 10.5, 0, 0, 0, 0.9, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pikachu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pikachu_elec_shock"), Hash40::new("top"), 0, 7, 10.5, 0, 0, 0, 0.9, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek_elec"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek_elec"), false, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_elec_shock"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_elec_shock"), false, true); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pikachu_cheek2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pikachu_cheek2"), false, true); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 15.0, 87, 97, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 15.0, 87, 97, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 15.0, 87, 97, 0, 50, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 12.0, 85, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 12.0, 85, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 12.0, 85, 100, 0, 30, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 80, 50, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 80, 50, 0, 55, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 7.0, 80, 50, 0, 55, 5.0, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, -10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, 10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 30, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, -10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 178, 30, 0, 65, 4.5, 0.0, 5.0, 10.5, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 30, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 37, 206, 0, 51, 10.0, 0.0, 6.4, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 37, 206, 0, 51, 10.0, 0.0, 6.4, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pikachu/src/acmd/specials.rs b/fighters/pikachu/src/acmd/specials.rs index d6c781c96e..3cb4bdc31a 100644 --- a/fighters/pikachu/src/acmd/specials.rs +++ b/fighters/pikachu/src/acmd/specials.rs @@ -1,31 +1,28 @@ use super::*; -unsafe extern "C" fn pikachu_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 2.0, 70, 100, 20, 0, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 70, 100, 20, 0, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); JostleModule::set_status(boma, false); } } -unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 70, 13.0, 0.0, 10.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 70, 13.0, 0.0, 10.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_specialhi1", pikachu_special_hi1_game) - .acmd("game_specialairhi1", pikachu_special_hi1_game) - .acmd("game_speciallwhit", game_speciallwhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("game_speciallwhit", game_speciallwhit); } diff --git a/fighters/pikachu/src/acmd/throws.rs b/fighters/pikachu/src/acmd/throws.rs index 47d45a4e18..b811a0c5f0 100644 --- a/fighters/pikachu/src/acmd/throws.rs +++ b/fighters/pikachu/src/acmd/throws.rs @@ -1,126 +1,122 @@ use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 3.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.9, 0.0, Some(0.0), Some(5.9), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.9, 0.0, Some(0.0), Some(5.9), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(10.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 150, 0, 48, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 150, 0, 48, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 60, 0, 70, 5.5, 0.0, 14.0, 1.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 60, 0, 70, 5.5, 0.0, 14.0, 1.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 25); + CHECK_FINISH_CAMERA(agent, 1, 25); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -3, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 80, 0, 60, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -3, 3); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 78, 80, 0, 60, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 1.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 3.0, 361, 0, 100, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 3.0, 361, 0, 100, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 0, 0); + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/pikachu/src/acmd/tilts.rs b/fighters/pikachu/src/acmd/tilts.rs index 81ff12df27..92775bd74b 100644 --- a/fighters/pikachu/src/acmd/tilts.rs +++ b/fighters/pikachu/src/acmd/tilts.rs @@ -1,130 +1,123 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.003); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.003); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.5, 361, 100, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.5, 361, 100, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } - } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 88, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 88, 100, 0, 45, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail4"), 7.0, 88, 100, 0, 45, 4.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 88, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 88, 100, 0, 45, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail4"), 7.0, 88, 100, 0, 45, 4.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 8.0, 361, 100, 0, 12, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 4.0, 0.0, 0.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 8.0, 361, 100, 0, 12, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 8.0, 361, 100, 0, 12, 4.0, 0.0, 0.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("pikachu") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pikachu/src/kaminari/acmd/mod.rs b/fighters/pikachu/src/kaminari/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/pikachu/src/kaminari/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/pikachu/src/kaminari/acmd/specials.rs b/fighters/pikachu/src/kaminari/acmd/specials.rs new file mode 100644 index 0000000000..9d16fb9a3a --- /dev/null +++ b/fighters/pikachu/src/kaminari/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 270, 60, 125, 55, 6.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f::new(0.0, -100.0), 24, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 60, 0, 74, 7.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/pikachu/src/kaminari/mod.rs b/fighters/pikachu/src/kaminari/mod.rs new file mode 100644 index 0000000000..8be26035f7 --- /dev/null +++ b/fighters/pikachu/src/kaminari/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pikachu_kaminari"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pikachu/src/lib.rs b/fighters/pikachu/src/lib.rs index 7bcc1676ad..11b1d29acf 100644 --- a/fighters/pikachu/src/lib.rs +++ b/fighters/pikachu/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod kaminari; use smash::{ lib::{ @@ -37,8 +41,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("pikachu"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + kaminari::install(); } diff --git a/fighters/pikachu/src/opff.rs b/fighters/pikachu/src/opff.rs index 221d16e5d7..b023887b31 100644 --- a/fighters/pikachu/src/opff.rs +++ b/fighters/pikachu/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // Disable QA jump cancels if not directly QA into the ground unsafe fn disable_qa_jc(boma: &mut BattleObjectModuleAccessor) { if StatusModule::is_changing(boma) { @@ -127,8 +126,7 @@ pub unsafe fn pikachu_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma); } } -pub fn install() { - smashline::Agent::new("pikachu") - .on_line(Main, pikachu_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pikachu_frame_wrapper); } From 9e77f14ba79d63c369dc0156120f67521a825aff Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 08:20:23 -0500 Subject: [PATCH 051/172] pikachu but smaller --- fighters/pichu/src/acmd/aerials.rs | 235 ++++--- fighters/pichu/src/acmd/ground.rs | 53 +- fighters/pichu/src/acmd/mod.rs | 16 +- fighters/pichu/src/acmd/other.rs | 259 ++------ fighters/pichu/src/acmd/smashes.rs | 264 ++++---- fighters/pichu/src/acmd/specials.rs | 606 +++++++++--------- fighters/pichu/src/acmd/throws.rs | 298 ++++----- fighters/pichu/src/acmd/tilts.rs | 96 ++- fighters/pichu/src/dengekidama/acmd/mod.rs | 7 + .../pichu/src/dengekidama/acmd/specials.rs | 36 ++ fighters/pichu/src/dengekidama/mod.rs | 9 + fighters/pichu/src/kaminari/acmd/mod.rs | 7 + fighters/pichu/src/kaminari/acmd/specials.rs | 17 + fighters/pichu/src/kaminari/mod.rs | 9 + fighters/pichu/src/lib.rs | 17 +- fighters/pichu/src/opff.rs | 10 +- 16 files changed, 945 insertions(+), 994 deletions(-) create mode 100644 fighters/pichu/src/dengekidama/acmd/mod.rs create mode 100644 fighters/pichu/src/dengekidama/acmd/specials.rs create mode 100644 fighters/pichu/src/dengekidama/mod.rs create mode 100644 fighters/pichu/src/kaminari/acmd/mod.rs create mode 100644 fighters/pichu/src/kaminari/acmd/specials.rs create mode 100644 fighters/pichu/src/kaminari/mod.rs diff --git a/fighters/pichu/src/acmd/aerials.rs b/fighters/pichu/src/acmd/aerials.rs index b88437fee4..8dbbcc7aa6 100644 --- a/fighters/pichu/src/acmd/aerials.rs +++ b/fighters/pichu/src/acmd/aerials.rs @@ -1,247 +1,244 @@ use super::*; -unsafe extern "C" fn pichu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 105, 0, 35, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 105, 0, 35, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 7.0, 361, 95, 0, 30, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 7.0, 361, 95, 0, 30, 3.5, 5.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, (4.0/6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, (4.0/6.0)); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - ATTACK(fighter, 0, 0, Hash40::new("neck"), 13.0 * damage_mul, 45, 96, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 13.0 * damage_mul, 45, 96, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 13.0 * damage_mul, 45, 96, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 13.0 * damage_mul, 45, 96, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, (5.0/6.0)); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 5.5 * damage_mul, 361, 80, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.5 * damage_mul, 361, 80, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, (5.0/6.0)); + ATTACK(agent, 0, 0, Hash40::new("neck"), 5.5 * damage_mul, 361, 80, 0, 35, 5.6, 2.2, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.5 * damage_mul, 361, 80, 0, 35, 4.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn pichu_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 4.0, 0.0, 1.8, -11.5, Some(0.0), Some(1.8), Some(0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - FT_MOTION_RATE(fighter, 0.6154); + FT_MOTION_RATE(agent, 0.6154); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * damage_mul, 367, 100, 50, 0, 3.5, 0.0, 2.5, -10.5, Some(0.0), Some(2.5), Some(-0.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5 * damage_mul, 42, 257, 0, 35, 5.0, 0.0, 3.0, -10.5, Some(0.0), Some(3.0), Some(-0.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5 * damage_mul, 42, 257, 0, 35, 5.0, 0.0, 3.0, -10.5, Some(0.0), Some(3.0), Some(-0.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 4.0); - FT_DESIRED_RATE(fighter, 7.0, 6.5); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 7.0, 6.5); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 7.0, 63, 95, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 7.0, 63, 95, 0, 45, 6.0, 1.5, -0.2, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("tail1"), 7.0, 63, 95, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 7.0, 63, 95, 0, 45, 6.0, 1.5, -0.2, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 11.5, 12.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.5, 12.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn pichu_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 2.0 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 2.0 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - HIT_NODE(fighter, Hash40::new("mimir1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mimil1"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0 * damage_mul, 60, 89, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mimir1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimil1"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0 * damage_mul, 60, 89, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 86, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 86, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 58, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("neck"), 14.0 * damage_mul, 270, 58, 0, 16, 5.5, 4.5, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0 * damage_mul, 361, 104, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0 * damage_mul, 361, 104, 0, 35, 5.0, 4.5, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0 * damage_mul, 361, 104, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0 * damage_mul, 361, 104, 0, 35, 5.0, 4.5, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 2, false); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attackairn", pichu_attack_air_n_game) - .acmd("game_attackairf", pichu_attack_air_f_game) - .acmd("expression_attackairf", pichu_attack_air_f_expression) - .acmd("game_attackairb", pichu_attack_air_b_game) - .acmd("game_attackairhi", pichu_attack_air_hi_game) - .acmd("game_attackairlw", pichu_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pichu/src/acmd/ground.rs b/fighters/pichu/src/acmd/ground.rs index 720fd7c77e..d90e463480 100644 --- a/fighters/pichu/src/acmd/ground.rs +++ b/fighters/pichu/src/acmd/ground.rs @@ -1,48 +1,45 @@ - use super::*; -unsafe extern "C" fn pichu_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 3.0); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 3.0); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 67, 72, 0, 70, 4.0, 0.0, 3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 67, 72, 0, 70, 4.0, 0.0, 3.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 67, 72, 0, 70, 4.0, 0.0, 3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 67, 72, 0, 70, 4.0, 0.0, 3.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 2.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 361, 85, 0, 60, 4.6, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 60, 3.0, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 361, 85, 0, 60, 4.6, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 361, 85, 0, 60, 3.0, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 6.0, 361, 65, 0, 60, 3.0, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 60, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 6.0, 361, 65, 0, 60, 3.0, 3.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 60, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.25); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.25); } - } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attack11", pichu_attack_11_game) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pichu/src/acmd/mod.rs b/fighters/pichu/src/acmd/mod.rs index 879f161b12..867f6e305d 100644 --- a/fighters/pichu/src/acmd/mod.rs +++ b/fighters/pichu/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pichu/src/acmd/other.rs b/fighters/pichu/src/acmd/other.rs index a606b51f1d..f718b4e4b5 100644 --- a/fighters/pichu/src/acmd/other.rs +++ b/fighters/pichu/src/acmd/other.rs @@ -1,263 +1,134 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pichu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pichu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pichu_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pichu_step_left_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pichu_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pichu_step_right_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.286); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.286); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn pichu_dengekidama_game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if !VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { - if is_excute(fighter) { - ModelModule::set_scale(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 50, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - } - else { - if is_excute(fighter) { - ModelModule::set_scale(boma, 1.5); - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 50, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - } -} - -unsafe extern "C" fn pichu_dengekidama_effect_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pichu_dengeki"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, true); - if VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) - } - } -} - -unsafe extern "C" fn pichu_kaminari_game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 94, 85, 0, 75, 7.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 115, 60, 0, 74, 4.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pichu_dengekidama") - .acmd("game_regular", pichu_dengekidama_game_regular) - .acmd("effect_regular", pichu_dengekidama_effect_regular) - .install(); - smashline::Agent::new("pichu_kaminari") - .acmd("game_regular", pichu_kaminari_game_regular) - .install(); - smashline::Agent::new("pichu") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pichu/src/acmd/smashes.rs b/fighters/pichu/src/acmd/smashes.rs index 69622df9dc..7a0159afea 100644 --- a/fighters/pichu/src/acmd/smashes.rs +++ b/fighters/pichu/src/acmd/smashes.rs @@ -1,267 +1,263 @@ - use super::*; -unsafe extern "C" fn pichu_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::add(fighter.battle_object, 4.0); + MeterModule::add(agent.battle_object, 4.0); } - FT_ADD_DAMAGE(fighter, 2.5 * recoil_mul); + FT_ADD_DAMAGE(agent, 2.5 * recoil_mul); } frame(lua_state, 16.0); for _ in 0..5 { - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 366, 50, 0, 10, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * damage_mul, 20, 50, 0, 10, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * damage_mul, 366, 50, 0, 10, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * damage_mul, 20, 50, 0, 10, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 1.0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 5.3 * damage_mul, 0.0, 4.7, 11.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0 * damage_mul, 40, 125, 0, 65, 4.3 * damage_mul, 0.0, 4.7, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8 * damage_mul, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.8 * damage_mul, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1.0 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85 * damage_mul, true); if charged { - LAST_EFFECT_SET_COLOR(fighter, 0.8,1.0,0.2) + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) } - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_elec_shock"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_elec_shock"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek_elec"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek_elec"), false, true); } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek2"), false, true); } } -unsafe extern "C" fn pichu_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 15.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 15.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("neck"), 15.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 15.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } else { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 17.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 17.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); - FT_ADD_DAMAGE(fighter, 2.5); + ATTACK(agent, 0, 0, Hash40::new("neck"), 17.0, 95, 98, 0, 45, 6.0, 4.7, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 17.0, 95, 98, 0, 45, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + FT_ADD_DAMAGE(agent, 2.5); } - HIT_NODE(fighter, Hash40::new("mimir1"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mimil1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimir1"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mimil1"), *HIT_STATUS_XLU); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn pichu_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); if charged { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 5.0); - if is_excute(fighter){ + if is_excute(agent){ if charged { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("pichu_tail_arc3"), Hash40::new("pichu_tail_arc3"), Hash40::new("top"), 1, 5, 0, 10, -40, -110, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 3, -0.5, 32, -75, -138, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("pichu_tail_arc3"), Hash40::new("pichu_tail_arc3"), Hash40::new("top"), 1, 5, 0, 10, -40, -110, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 1, 3, -0.5, 32, -75, -138, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); if charged { - EFFECT_FOLLOW(fighter, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pichu_cheek2"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek_elec"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } } frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); if charged { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek_elec"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek_elec"), false, true); } } } -unsafe extern "C" fn pichu_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn pichu_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 2.0); if !charged { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::add(fighter.battle_object, 3.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::add(agent.battle_object, 3.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.4, 125, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.4, 125, 120, 0, 45, 6.0, 0.0, 4.5, -5.5, Some(0.0), Some(4.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } - FT_ADD_DAMAGE(fighter, 1.5 * recoil_mul); + FT_ADD_DAMAGE(agent, 1.5 * recoil_mul); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if !charged { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 90, 0, 45, 4.5, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(-5.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 90, 0, 45, 4.5, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(-5.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 6); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 42.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attacks4", pichu_attack_s4_s_game) - .acmd("effect_attacks4", pichu_attack_s4_s_effect) - .acmd("game_attackhi4", pichu_attack_hi4_game) - .acmd("effect_attackhi4", pichu_attack_hi4_effect) - .acmd("expression_attackhi4", pichu_attack_hi4_expression) - .acmd("game_attacklw4", pichu_attack_lw4_game) - .acmd("expression_attacklw4", pichu_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/pichu/src/acmd/specials.rs b/fighters/pichu/src/acmd/specials.rs index 956c49d2bb..eac4b49cc9 100644 --- a/fighters/pichu/src/acmd/specials.rs +++ b/fighters/pichu/src/acmd/specials.rs @@ -1,234 +1,233 @@ - use super::*; -unsafe extern "C" fn pichu_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = if fighter.kind() == *FIGHTER_KIND_KIRBY {false} else {VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1}; - let charge_state_time = if fighter.kind() == *FIGHTER_KIND_KIRBY {1} else {ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time")}; - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = if agent.kind() == *FIGHTER_KIND_KIRBY {false} else {VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1}; + let charge_state_time = if agent.kind() == *FIGHTER_KIND_KIRBY {1} else {ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time")}; + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if !charged { - FT_MOTION_RATE(fighter, (14.0/18.0)); + FT_MOTION_RATE(agent, (14.0/18.0)); } else if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 180); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 180); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 180.0); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PICHU_GENERATE_ARTICLE_DENGEKIDAMA, false, -1); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - MeterModule::add(fighter.battle_object, 2.0); - FT_ADD_DAMAGE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + MeterModule::add(agent.battle_object, 2.0); + FT_ADD_DAMAGE(agent, 1.0); } else { - FT_ADD_DAMAGE(fighter, 3.0); + FT_ADD_DAMAGE(agent, 3.0); } } } -unsafe extern "C" fn pichu_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 120); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 120); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 120.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_ATTACK_TRIGGER); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_ADD_DAMAGE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 68, 55, 0, 70, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_ADD_DAMAGE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 68, 55, 0, 70, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_CALC_ATTACK_POWER); } else { - FT_ADD_DAMAGE(fighter, 3.0); - FT_DESIRED_RATE(fighter, 18.0, 12.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + FT_ADD_DAMAGE(agent, 3.0); + FT_DESIRED_RATE(agent, 18.0, 12.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); wait(lua_state, 9.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 40, 65, 0, 60, 3.2, 0.0, 3.3, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); } AttackModule::set_attack_keep_rumble(boma, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_BRAKE_TRIGGER); } } -unsafe extern "C" fn pichu_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("pichu_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("pichu_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pichu_rocket_aura"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 0.9, true); + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pichu_rocket_aura"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 0.9, true); EffectModule::enable_sync_init_pos_last(boma); - LAST_EFFECT_SET_COLOR(fighter, 0.85, 0.9, 1); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8 as u64, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.9, 1); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8 as u64, true); } } else { - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pichu_rocket_aura_max"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 1.3, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pichu_rocket_aura_max"), Hash40::new("head"), 6.5, 0, 0, 90, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1.25 as u64, true); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("pichu_rocket_jet"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1.25 as u64, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_sphere_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_sphere_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - FLASH(fighter, 0.08, 0.661, 1, 0.471); + if is_excute(agent) { + FLASH(agent, 0.08, 0.661, 1, 0.471); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.392); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.392); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); } -unsafe extern "C" fn pichu_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_DESIRED_RATE(fighter, 26.0, 33.0); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_DESIRED_RATE(agent, 26.0, 33.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn pichu_special_air_s_miss_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_DESIRED_RATE(fighter, 26.0, 33.0); +unsafe extern "C" fn game_specialairsmissend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_DESIRED_RATE(agent, 26.0, 33.0); } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_SKULL_BASH_MISS_END_RUMBLE_2); } } -unsafe extern "C" fn pichu_special_hi_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if charged { - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 120); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 120); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 120.0); } - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 2.0, 70, 50, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - FT_ADD_DAMAGE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 70, 50, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_ADD_DAMAGE(agent, 1.0); } else { - FT_ADD_DAMAGE(fighter, 0.5); + FT_ADD_DAMAGE(agent, 0.5); } JostleModule::set_status(boma, false); } } -unsafe extern "C" fn pichu_special_hi_1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn expression_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f20a9d549), false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x24772eddef), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f20a9d549), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x24772eddef), false); MotionModule::set_helper_calculation(boma, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_helper_calculation(boma, true); } } -unsafe extern "C" fn pichu_special_hi_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 3.0, 70, 150, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - FT_ADD_DAMAGE(fighter, 2.0); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 3.0, 70, 150, 0, 20, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + FT_ADD_DAMAGE(agent, 2.0); } else { - FT_ADD_DAMAGE(fighter, 1.0); + FT_ADD_DAMAGE(agent, 1.0); } JostleModule::set_status(boma, false); } } -unsafe extern "C" fn pichu_special_hi_2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn expression_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x1f20a9d549), false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x24772eddef), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f20a9d549), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x24772eddef), false); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); MotionModule::set_helper_calculation(boma, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_helper_calculation(boma, true); } } -unsafe extern "C" fn pichu_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); if !charged { - VarModule::off_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::off_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_GENERATE); } else { @@ -244,318 +243,319 @@ unsafe extern "C" fn pichu_special_lw_game(fighter: &mut L2CAgentBase) { let discharge_min_size_mul = 0.75; let discharge_size_mul = 1.0 - ((1.0 - (charge_state_remaining.min(discharge_decrease_power_frame)/discharge_decrease_power_frame)) * (1.0 - discharge_min_size_mul)); VarModule::set_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL, discharge_size_mul); - VarModule::on_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); + VarModule::on_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK); VarModule::set_int(boma.object(), vars::common::instance::GIMMICK_TIMER, 0); MeterModule::drain_direct(boma.object(), 999.0); } } - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { frame(lua_state, 7.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, 6.0, 3.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 6.0, 3.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { boma.change_status_req(*FIGHTER_PIKACHU_STATUS_KIND_SPECIAL_LW_HIT, true); } } } -unsafe extern "C" fn pichu_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let discharge_power_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_POWER_MUL); let discharge_size_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::add(fighter.battle_object, 2.0); - FT_ADD_DAMAGE(fighter, 3.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 71, 0, 90, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::add(agent.battle_object, 2.0); + FT_ADD_DAMAGE(agent, 3.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 71, 0, 90, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } else { - FT_ADD_DAMAGE(fighter, 8.0 * discharge_power_mul); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0 * discharge_power_mul, 361, 80, 0, 70, 18.0 * discharge_size_mul, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + FT_ADD_DAMAGE(agent, 8.0 * discharge_power_mul); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0 * discharge_power_mul, 361, 80, 0, 70, 18.0 * discharge_size_mul, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); VarModule::set_int(boma.object(), vars::common::instance::GIMMICK_TIMER, 0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { - FT_MOTION_RATE(fighter, 1.5 * discharge_power_mul); + MeterModule::watch_damage(agent.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + FT_MOTION_RATE(agent, 1.5 * discharge_power_mul); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) && fighter.is_situation(*SITUATION_KIND_AIR) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) && agent.is_situation(*SITUATION_KIND_AIR) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } } -unsafe extern "C" fn pichu_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 1.0); WorkModule::is_flag(boma, *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_ATTACK_HIT); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { let discharge_effect_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit2"), false, true); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit"), false, true); } for _ in 0..3{ - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn pichu_special_air_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_cheek"), Hash40::new("head"), 0, 0, 0, 0, -90, -90, 1, true); } frame(lua_state, 1.0); WorkModule::is_flag(boma, *FIGHTER_PIKACHU_STATUS_WORK_ID_FLAG_KAMINARI_ATTACK_HIT); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::pichu::instance::IS_CHARGE_ATTACK) { let discharge_effect_mul = VarModule::get_float(boma.object(), vars::pichu::instance::DISCHARGE_SIZE_MUL); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("hip"), 0, 0, 0, 0, 90, 0, 1.15 * discharge_effect_mul, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_final_explosion"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.3 * discharge_effect_mul, false); } else { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit2"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 1.15, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_kaminari_hit"), Hash40::new("top"), 0, -2, 0, 0, 90, 0, 0.85, true); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit2"), false, true); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_kaminari_hit"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_kaminari_hit"), false, true); } for _ in 0..3{ - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } wait(lua_state, 1.0); } - if is_excute(fighter) { - FLASH(fighter, 0, 0, 0, 0); - BURN_COLOR(fighter, 2, 2, 0.5, 0.9); + if is_excute(agent) { + FLASH(agent, 0, 0, 0, 0); + BURN_COLOR(agent, 2, 2, 0.5, 0.9); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0.7); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0.7); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 2, 0, 0, 0, 0); - BURN_COLOR_FRAME(fighter, 2, 2, 2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 2, 0, 0, 0, 0); + BURN_COLOR_FRAME(agent, 2, 2, 2, 0.5, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - COL_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pichu_cheek"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pichu_cheek"), false, true); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_specialn", pichu_special_n_game) - .acmd("game_specialairn", pichu_special_n_game) - .acmd("game_specials", pichu_special_s_game) - .acmd("effect_specials", pichu_special_s_effect) - .acmd("game_specialsend", pichu_special_s_end_game) - .acmd("game_specialairsend", pichu_special_s_end_game) - .acmd("game_specialairsmissend", pichu_special_air_s_miss_end_game) - .acmd("game_specialhi1", pichu_special_hi_1_game) - .acmd("game_specialairhi1", pichu_special_hi_1_game) - .acmd("expression_specialhi1", pichu_special_hi_1_expression) - .acmd("expression_specialairhi1", pichu_special_hi_1_expression) - .acmd("game_specialhi2", pichu_special_hi_2_game) - .acmd("game_specialairhi2", pichu_special_hi_2_game) - .acmd("expression_specialhi2", pichu_special_hi_2_expression) - .acmd("expression_specialairhi2", pichu_special_hi_2_expression) - .acmd("game_speciallw", pichu_special_lw_game) - .acmd("game_specialairlw", pichu_special_lw_game) - .acmd("game_speciallwhit", pichu_special_lw_hit_game) - .acmd("game_specialairlwhit", pichu_special_lw_hit_game) - .acmd("effect_speciallwhit", pichu_special_lw_hit_effect) - .acmd("effect_specialairlwhit", pichu_special_air_lw_hit_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("game_specialairsmissend", game_specialairsmissend); + + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("expression_specialhi1", expression_specialhi1); + agent.acmd("expression_specialairhi1", expression_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialhi2); + agent.acmd("expression_specialhi2", expression_specialhi2); + agent.acmd("expression_specialairhi2", expression_specialhi2); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_specialairlwhit); } diff --git a/fighters/pichu/src/acmd/throws.rs b/fighters/pichu/src/acmd/throws.rs index c02c4c1182..d38bb6049d 100644 --- a/fighters/pichu/src/acmd/throws.rs +++ b/fighters/pichu/src/acmd/throws.rs @@ -1,295 +1,295 @@ - use super::*; -unsafe extern "C" fn pichu_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn pichu_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pichu_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pichu_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0 * damage_mul, 45, 115, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0 * damage_mul, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0 * damage_mul, 45, 115, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0 * damage_mul, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 0.5 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 0.5 * recoil_mul); } for _ in 0..4{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5 * damage_mul, 361, 100, 0, 0, 5.5, 0.0, 8.5, 4.7, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5 * damage_mul, 361, 100, 0, 0, 5.5, 0.0, 8.5, 4.7, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 26.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 26); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 26); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0 * damage_mul, 85, 30, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0 * damage_mul, 85, 30, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 145, 50, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 145, 50, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if charged { - FT_DESIRED_RATE(fighter, 14.0, 9.0); - FT_ADD_DAMAGE(fighter, 1.0); + FT_DESIRED_RATE(agent, 14.0, 9.0); + FT_ADD_DAMAGE(agent, 1.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -6, 4); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -6, 4); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { +unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - EFFECT(fighter, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.35, 0.95); + EFFECT(agent, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.35, 0.95); } } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 0, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 30, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 0, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 5, 1, 0, 30, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 0, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 30, 90, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 0, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4, -0.5, 0, 30, 90, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 23.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); if charged { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - //EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85, true); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.01, 0.2, 0.95); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + //EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("pichu_elec_shock_finish"), Hash40::new("top"), 0, 5.5, 13, 0, 0, 0, 0.85, true); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.01, 0.2, 0.95); } } } -unsafe extern "C" fn pichu_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter) { + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent) { if charged { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 55, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 50, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 50, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 5.0 * damage_mul, 80, 60, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 5.0 * damage_mul, 80, 60, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - FT_ADD_DAMAGE(fighter, 1.0 * recoil_mul); - CHECK_FINISH_CAMERA(fighter, 2, 17); + FT_ADD_DAMAGE(agent, 1.0 * recoil_mul); + CHECK_FINISH_CAMERA(agent, 2, 17); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn pichu_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; let charge_state_time = ParamModule::get_int(boma.object(), ParamType::Agent, "charge_state_time"); - if is_excute(fighter) { + if is_excute(agent) { if charged{ - VarModule::sub_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 180); + VarModule::sub_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 180); MeterModule::drain_direct(boma.object(), (50.0/(charge_state_time as f32)) * 180.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 5, 0, 135, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 60, 5, 0, 135, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_THROW); } else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); if charged { - FT_DESIRED_RATE(fighter, 4.0, 10.0) + FT_DESIRED_RATE(agent, 4.0, 10.0) } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if charged{ - ATTACK(fighter, 0, 0, Hash40::new("trans"), 15.0, 361, 60, 0, 60, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_HEAD); - FT_ADD_DAMAGE(fighter, 5.0); + ATTACK(agent, 0, 0, Hash40::new("trans"), 15.0, 361, 60, 0, 60, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_HEAD); + FT_ADD_DAMAGE(agent, 5.0); } else{ - ATTACK(fighter, 0, 0, Hash40::new("trans"), 4.0, 361, 60, 0, 60, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("trans"), 4.0, 361, 60, 0, 60, 5.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn pichu_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if charged { - EFFECT(fighter, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.35, 0.95); + EFFECT(agent, Hash40::new("sys_level_up"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.35, 0.95); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if charged { - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.01, 0.2, 0.95); + EFFECT(agent, Hash40::new("sys_bomb_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 0.01, 0.2, 0.95); } - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 37.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_catch", pichu_catch_game) - .acmd("game_catchdash", pichu_catch_dash_game) - .acmd("game_catchturn", pichu_catch_turn_game) - .acmd("game_throwf", pichu_throw_f_game) - .acmd("game_throwb", pichu_throw_b_game) - .acmd("effect_throwb", pichu_throw_b_effect) - .acmd("game_throwhi", pichu_throw_hi_game) - .acmd("game_throwlw", pichu_throw_lw_game) - .acmd("effect_throwlw", pichu_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } diff --git a/fighters/pichu/src/acmd/tilts.rs b/fighters/pichu/src/acmd/tilts.rs index 4f352bcedb..981b49157e 100644 --- a/fighters/pichu/src/acmd/tilts.rs +++ b/fighters/pichu/src/acmd/tilts.rs @@ -1,95 +1,91 @@ - use super::*; -unsafe extern "C" fn pichu_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let recoil_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_RECOIL_MUL); let damage_mul = VarModule::get_float(boma.object(), vars::pichu::instance::CHARGE_DAMAGE_MUL); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; - if is_excute(fighter){ + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; + if is_excute(agent){ if !charged { - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_ADD_DAMAGE(fighter, 1.5 * recoil_mul); + if is_excute(agent) { + FT_ADD_DAMAGE(agent, 1.5 * recoil_mul); if !charged { - MeterModule::add(fighter.battle_object, 2.0); + MeterModule::add(agent.battle_object, 2.0); } - ATTACK(fighter, 0, 0, Hash40::new("footl"), 9.0 * damage_mul, 40, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0 * damage_mul, 40, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("footr"), 9.0 * damage_mul, 40, 105, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-3.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("footr"), 9.0 * damage_mul, 40, 105, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-3.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } - } -unsafe extern "C" fn pichu_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 5.5, 80, 90, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 5.5, 80, 90, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 5.5, 80, 90, 0, 70, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 5.5, 80, 90, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 5.5, 80, 90, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 5.5, 80, 90, 0, 70, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pichu_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let charged = VarModule::get_int(fighter.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let charged = VarModule::get_int(agent.battle_object, vars::pichu::instance::CHARGE_LEVEL) == 1; frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 120, 70, 0, 65, 3.5, 0.0, -0.4, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail3"), 6.0, 120, 50, 0, 65, 4.5, 0.5, 0.8, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 120, 70, 0, 65, 3.5, 0.0, -0.4, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail3"), 6.0, 120, 50, 0, 65, 4.5, 0.5, 0.8, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn pichu_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("pichu") - .acmd("game_attacks3", pichu_attack_s3_s_game) - .acmd("game_attackhi3", pichu_attack_hi3_game) - .acmd("game_attacklw3", pichu_attack_lw3_game) - .acmd("expression_attacklw3", pichu_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/pichu/src/dengekidama/acmd/mod.rs b/fighters/pichu/src/dengekidama/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/pichu/src/dengekidama/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/pichu/src/dengekidama/acmd/specials.rs b/fighters/pichu/src/dengekidama/acmd/specials.rs new file mode 100644 index 0000000000..9e010d5e9e --- /dev/null +++ b/fighters/pichu/src/dengekidama/acmd/specials.rs @@ -0,0 +1,36 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if !VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { + if is_excute(agent) { + ModelModule::set_scale(boma, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 50, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + } else { + if is_excute(agent) { + ModelModule::set_scale(boma, 1.5); + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 50, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + } +} + +unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pichu_dengeki"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, true); + if VarModule::is_flag(owner_module_accessor.object(), vars::pichu::instance::IS_CHARGE_ATTACK) { + LAST_EFFECT_SET_COLOR(agent, 0.8,1.0,0.2) + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); + agent.acmd("effect_regular", effect_regular); +} diff --git a/fighters/pichu/src/dengekidama/mod.rs b/fighters/pichu/src/dengekidama/mod.rs new file mode 100644 index 0000000000..50c3951f3b --- /dev/null +++ b/fighters/pichu/src/dengekidama/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pichu_dengekidama"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pichu/src/kaminari/acmd/mod.rs b/fighters/pichu/src/kaminari/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/pichu/src/kaminari/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/pichu/src/kaminari/acmd/specials.rs b/fighters/pichu/src/kaminari/acmd/specials.rs new file mode 100644 index 0000000000..eddf837d74 --- /dev/null +++ b/fighters/pichu/src/kaminari/acmd/specials.rs @@ -0,0 +1,17 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 94, 85, 0, 75, 7.0, 0.0, 2.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 115, 60, 0, 74, 4.0, 0.0, 4.0, 0.0, Some(0.0), Some(14.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/pichu/src/kaminari/mod.rs b/fighters/pichu/src/kaminari/mod.rs new file mode 100644 index 0000000000..39348a7190 --- /dev/null +++ b/fighters/pichu/src/kaminari/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pichu_kaminari"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pichu/src/lib.rs b/fighters/pichu/src/lib.rs index 4579021516..43f134b6ec 100644 --- a/fighters/pichu/src/lib.rs +++ b/fighters/pichu/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + +mod dengekidama; +mod kaminari; use smash::{ lib::{ @@ -37,8 +42,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("pichu"); + acmd::install(agent); + opff::install(agent); + agent.install(); + + dengekidama::install(); + kaminari::install(); } diff --git a/fighters/pichu/src/opff.rs b/fighters/pichu/src/opff.rs index 273617c1b9..58e18c6a44 100644 --- a/fighters/pichu/src/opff.rs +++ b/fighters/pichu/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // symbol-based call for the pikachu/pichu characters' common opff extern "Rust" { @@ -216,9 +215,8 @@ pub unsafe fn pichu_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pichu") - .on_line(Main, pichu_frame_wrapper) - .on_line(Main, pichu_meter) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pichu_frame_wrapper); + agent.on_line(Main, pichu_meter); } From e9f9d1b7a611e9deda61c53d3699fd3840d5f7e9 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 08:53:48 -0500 Subject: [PATCH 052/172] puff --- fighters/purin/src/acmd/aerials.rs | 190 ++++++++++++----------- fighters/purin/src/acmd/ground.rs | 46 +++--- fighters/purin/src/acmd/mod.rs | 16 +- fighters/purin/src/acmd/other.rs | 187 +++++++---------------- fighters/purin/src/acmd/smashes.rs | 32 ++-- fighters/purin/src/acmd/specials.rs | 176 +++++++++------------ fighters/purin/src/acmd/throws.rs | 193 ++++++++++++------------ fighters/purin/src/acmd/tilts.rs | 112 +++++++------- fighters/purin/src/lib.rs | 10 +- fighters/purin/src/opff.rs | 6 +- fighters/purin/src/status.rs | 107 +------------ fighters/purin/src/status/special_lw.rs | 106 +++++++++++++ 12 files changed, 527 insertions(+), 654 deletions(-) create mode 100644 fighters/purin/src/status/special_lw.rs diff --git a/fighters/purin/src/acmd/aerials.rs b/fighters/purin/src/acmd/aerials.rs index fe28c2485f..d1747fe3a3 100644 --- a/fighters/purin/src/acmd/aerials.rs +++ b/fighters/purin/src/acmd/aerials.rs @@ -1,189 +1,185 @@ - use super::*; -unsafe extern "C" fn purin_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 3.7, 0.0, 3.0, 9.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 6.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 3.7, 0.0, 3.0, 9.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 104, 0, 30, 6.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 3.5, 0.0, 3.0, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 3.5, 0.0, 3.0, 2.0, Some(0.0), Some(3.5), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 70, 0, 50, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.125); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.125); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn purin_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 104, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 8.7, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 8.7, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 70, 0, 30, 4.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.333, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - + } } -unsafe extern "C" fn purin_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -13.0, Some(0.0), Some(4.0), Some(-16.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -13.0, Some(0.0), Some(4.0), Some(-16.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 100, 0, 10, 4.5, 0.0, 4.0, -8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn purin_effect_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 3.7, -7.5, 0, 190, 165, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 3.7, -7.5, 0, 190, 165, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.6); } - } -unsafe extern "C" fn purin_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(20.0-9.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0/(20.0-9.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 85, 100, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn purin_effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7, 1, 0, -85, -90, 0.85, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7, 1, 0, -85, -90, 0.85, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn purin_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); for _ in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 145, 100, 0, 10, 3.6, 0.0, -2.3, 1.0, Some(0.0), Some(-1.3), Some(3.5), 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 280, 100, 30, 0, 3.0, 0.0, 3.5, 1.0, None, None, None, 0.8, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 145, 100, 0, 10, 3.6, 0.0, -2.3, 1.0, Some(0.0), Some(-1.3), Some(3.5), 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 280, 100, 30, 0, 3.0, 0.0, 3.5, 1.0, None, None, None, 0.8, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 5.0, 0.0, -2.4, 3.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 3.0, 0.0, 3.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 5.0, 0.0, -2.4, 3.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 55, 140, 0, 45, 3.0, 0.0, 3.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attackairn", purin_attack_air_n_game) - .acmd("game_attackairf", purin_attack_air_f_game) - .acmd("game_attackairb", purin_attack_air_b_game) - .acmd("effect_attackairb", purin_effect_air_b_game) - .acmd("game_attackairhi", purin_attack_air_hi_game) - .acmd("effect_attackairhi", purin_effect_attackairhi) - .acmd("game_attackairlw", purin_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/purin/src/acmd/ground.rs b/fighters/purin/src/acmd/ground.rs index 65120a416a..b32c8136c8 100644 --- a/fighters/purin/src/acmd/ground.rs +++ b/fighters/purin/src/acmd/ground.rs @@ -1,48 +1,44 @@ - use super::*; -unsafe extern "C" fn purin_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 18, 2.5, 0.0, 5.8, 7.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 180, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 18, 2.5, 0.0, 5.8, 7.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 180, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 5.8, 10.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 12.0, 43, 83, 0, 57, 5.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 12.0, 43, 83, 0, 57, 5.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 8.0, 43, 83, 0, 8, 4.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 8.0, 43, 83, 0, 8, 4.5, 0.0, 2.3, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attack11", purin_attack_11_game) - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/purin/src/acmd/mod.rs b/fighters/purin/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/purin/src/acmd/mod.rs +++ b/fighters/purin/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/purin/src/acmd/other.rs b/fighters/purin/src/acmd/other.rs index 8acd686bef..43743285d0 100644 --- a/fighters/purin/src/acmd/other.rs +++ b/fighters/purin/src/acmd/other.rs @@ -1,192 +1,113 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_purin_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_purin_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_purin_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_purin_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_purin_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_purin_step_left_m")); } } -unsafe extern "C" fn purin_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("purin") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", purin_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/purin/src/acmd/smashes.rs b/fighters/purin/src/acmd/smashes.rs index d89fdf3025..b497b6309f 100644 --- a/fighters/purin/src/acmd/smashes.rs +++ b/fighters/purin/src/acmd/smashes.rs @@ -1,33 +1,29 @@ - use super::*; -unsafe extern "C" fn purin_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("toer"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("toer"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 11.0, 0, 103, 0, 34, 4.8, 0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 11.0, 0, 103, 0, 34, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attacklw4", purin_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/purin/src/acmd/specials.rs b/fighters/purin/src/acmd/specials.rs index cb220de3e0..b7e2673f71 100644 --- a/fighters/purin/src/acmd/specials.rs +++ b/fighters/purin/src/acmd/specials.rs @@ -1,118 +1,80 @@ use super::*; -unsafe extern "C" fn purin_special_n_start_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_special_air_n_start_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 30, 60, 0, 60, 2.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 30, 60, 0, 60, 2.5, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn purin_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 30, 60, 0, 60, 2.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 60, 0, 60, 2.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn purin_special_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_air_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn purin_special_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn purin_special_air_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } -} - -unsafe extern "C" fn purin_special_n_end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, false); } } -unsafe extern "C" fn purin_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 4.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn purin_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 75, 0, 52, 3.5, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 17, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_INPUT); @@ -120,34 +82,33 @@ unsafe extern "C" fn purin_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_CHANGE_ENERGY); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_PURIN_SPECIAL_S_ENERGY_MODE_FALL, *FIGHTER_PURIN_STATUS_SPECIAL_S_WORK_INT_ENERGY_MODE); WorkModule::on_flag(boma, *FIGHTER_PURIN_STATUS_SPECIAL_S_FLAG_CHANGE_ENERGY); } frame(lua_state, 41.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn purin_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 361, 66, 0, 106, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 361, 66, 0, 106, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); if(AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT)){ @@ -156,28 +117,27 @@ unsafe extern "C" fn purin_special_lw_game(fighter: &mut L2CAgentBase) { } } } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_specialnstartr", purin_special_n_start_r_game) - .acmd("game_specialairnstartr", purin_special_air_n_start_r_game) - .acmd("game_specialn", purin_special_n_game) - .acmd("game_specialairn", purin_special_air_n_game) - .acmd("game_specialnhold", purin_special_n_hold_game) - .acmd("game_specialairnhold", purin_special_air_n_hold_game) - .acmd("game_specialnturn", purin_special_n_turn_game) - .acmd("game_specialairnturn", purin_special_air_n_turn_game) - .acmd("game_specialairnendl", purin_special_n_end) - .acmd("game_specialairnendr", purin_special_n_end) - .acmd("game_specialnendr", purin_special_n_end) - .acmd("game_specialnendl", purin_special_n_end) - .acmd("game_specials", purin_special_s_game) - .acmd("game_specialairs", purin_special_air_s_game) - .acmd("game_speciallwl", purin_special_lw_game) - .acmd("game_speciallwr", purin_special_lw_game) - .acmd("game_specialairlwl", purin_special_lw_game) - .acmd("game_specialairlwr", purin_special_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstartr", game_specialnstart); + agent.acmd("game_specialairnstartr", game_specialnstart); + agent.acmd("game_specialnhold", game_specialnstart); + agent.acmd("game_specialairnhold", game_specialnstart); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialnturn", game_specialnturn); + agent.acmd("game_specialairnturn", game_specialnturn); + agent.acmd("game_specialnendr", game_specialnend); + agent.acmd("game_specialnendl", game_specialnend); + agent.acmd("game_specialairnendl", game_specialnend); + agent.acmd("game_specialairnendr", game_specialnend); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_speciallwl", game_speciallw); + agent.acmd("game_speciallwr", game_speciallw); + agent.acmd("game_specialairlwl", game_speciallw); + agent.acmd("game_specialairlwr", game_speciallw); } diff --git a/fighters/purin/src/acmd/throws.rs b/fighters/purin/src/acmd/throws.rs index b99e73fb50..4d9feba029 100644 --- a/fighters/purin/src/acmd/throws.rs +++ b/fighters/purin/src/acmd/throws.rs @@ -1,176 +1,177 @@ use super::*; -unsafe extern "C" fn purin_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.35), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 0.0, Some(0.0), Some(5.2), Some(9.35), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn purin_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 4.0, Some(0.0), Some(5.2), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, 4.0, Some(0.0), Some(5.2), Some(10.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn purin_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.2, -4.0, Some(0.0), Some(5.2), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.2, -4.0, Some(0.0), Some(5.2), Some(-14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 35, 30, 0, 103, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 35, 30, 0, 103, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 361, 110, 0, 40, 10.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 361, 110, 0, 40, 10.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 2); + CHECK_FINISH_CAMERA(agent, 13, 2); } frame(lua_state, 12.0); - if is_excute(fighter,) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent,) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 135, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 135, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter,-14, 0); + CHECK_FINISH_CAMERA(agent,-14, 0); } frame(lua_state, 26.0); - if is_excute(fighter){ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent){ + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn expression_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 28.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 20, 0, 115, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 20, 0, 115, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -4, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -4, 9); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 5.0/(38.0-3.0)); + FT_MOTION_RATE(agent, 5.0/(38.0-3.0)); } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 30, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 30, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 35, 130, 0, 10, 6.0, 0.0, 4.0, 3.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 35, 130, 0, 10, 6.0, 0.0, 4.0, 3.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false,false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma,true,false); - CHECK_FINISH_CAMERA(fighter,3,0) + CHECK_FINISH_CAMERA(agent,3,0) } frame(lua_state, 62.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP),WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_catch", purin_catch_game) - .acmd("game_catchdash", purin_catch_dash_game) - .acmd("game_catchturn", purin_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("expression_throwb", expression_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("expression_throwb", expression_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/purin/src/acmd/tilts.rs b/fighters/purin/src/acmd/tilts.rs index 1909d612af..a426106a74 100644 --- a/fighters/purin/src/acmd/tilts.rs +++ b/fighters/purin/src/acmd/tilts.rs @@ -1,105 +1,103 @@ - use super::*; -unsafe extern "C" fn purin_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 100, 0, 8, 3.5, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 9.0, 96, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 3.15, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 8.0, 88, 120, 0, 40, 4.3, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn purin_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -8.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -4.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -8.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, -4.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 20, 75, 0, 50, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("purin") - .acmd("game_attacks3", purin_attack_s3_s_game) - .acmd("game_attacks3hi", purin_attack_s3_hi_game) - .acmd("game_attacks3lw", purin_attack_s3_lw_game) - .acmd("game_attackhi3", purin_game_attackhi3) - .acmd("game_attacklw3", purin_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/purin/src/lib.rs b/fighters/purin/src/lib.rs index 7bb0378152..62a06f606f 100644 --- a/fighters/purin/src/lib.rs +++ b/fighters/purin/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("purin"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/purin/src/opff.rs b/fighters/purin/src/opff.rs index 54e8f1ea40..4593d8ddeb 100644 --- a/fighters/purin/src/opff.rs +++ b/fighters/purin/src/opff.rs @@ -53,8 +53,6 @@ pub unsafe fn purin_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("purin") - .on_line(Main, purin_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, purin_frame_wrapper); } diff --git a/fighters/purin/src/status.rs b/fighters/purin/src/status.rs index b8cd720ad8..52d4ab1814 100644 --- a/fighters/purin/src/status.rs +++ b/fighters/purin/src/status.rs @@ -2,109 +2,8 @@ use super::*; use globals::*; // status script import +mod special_lw; -// FIGHTER_STATUS_KIND_SPECIAL_LW - -pub unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { - if PostureModule::lr(fighter.module_accessor) != 1.0 { - WorkModule::set_int64(fighter.module_accessor, hash40("special_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); - WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); - } - else { - WorkModule::set_int64(fighter.module_accessor, hash40("special_lw_r") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); - WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_r") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); - } - special_lw_situation_helper(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main as *const () as _)) -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - } - - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT) - && ( - !AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) - || AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) - ) - && !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT_CANCEL_OK) { - let frame = fighter.global_table[CURRENT_FRAME].get_i32(); - let cancel_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_ENABLE_HIT_CANCEL_FRAME); - - if frame == cancel_frame - 30 { - // Skip to wake-up animation, 30 frames before on-hit FAF - // Wake-up anim lasts 30 frames - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, 179.0, true, true, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT_CANCEL_OK); - } - } - - if !StatusModule::is_changing(fighter.module_accessor) - && StatusModule::is_situation_changed(fighter.module_accessor) { - special_lw_situation_helper(fighter); - } - - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(false) - ); - return 1.into() - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - return 0.into() -} - -unsafe extern "C" fn special_lw_situation_helper(fighter: &mut L2CFighterCommon) { - let special_lw_mot_rate = WorkModule::get_float(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_FLOAT_MOTION_RATE); - - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - let special_air_lw_mot_kind = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(special_air_lw_mot_kind), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(special_air_lw_mot_kind), -1.0, 1.0, 0.0, false, false); - } - MotionModule::set_rate(fighter.module_accessor, special_lw_mot_rate); - } - else { - let special_lw_mot_kind = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(special_lw_mot_kind), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(special_lw_mot_kind), -1.0, 1.0, 0.0, false, false); - } - MotionModule::set_rate(fighter.module_accessor, special_lw_mot_rate); - } -} -pub fn install() { - smashline::Agent::new("purin") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw) - .install(); +pub fn install(agent: &mut Agent) { + special_lw::install(agent); } diff --git a/fighters/purin/src/status/special_lw.rs b/fighters/purin/src/status/special_lw.rs new file mode 100644 index 0000000000..1b2568a928 --- /dev/null +++ b/fighters/purin/src/status/special_lw.rs @@ -0,0 +1,106 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +pub unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if PostureModule::lr(fighter.module_accessor) != 1.0 { + WorkModule::set_int64(fighter.module_accessor, hash40("special_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); + WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_l") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); + } + else { + WorkModule::set_int64(fighter.module_accessor, hash40("special_lw_r") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); + WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw_r") as i64, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); + } + special_lw_situation_helper(fighter); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + } + + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT) + && ( + !AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) + || AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) + ) + && !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT_CANCEL_OK) { + let frame = fighter.global_table[CURRENT_FRAME].get_i32(); + let cancel_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_ENABLE_HIT_CANCEL_FRAME); + + if frame == cancel_frame - 30 { + // Skip to wake-up animation, 30 frames before on-hit FAF + // Wake-up anim lasts 30 frames + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, 179.0, true, true, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_HIT_CANCEL_OK); + } + } + + if !StatusModule::is_changing(fighter.module_accessor) + && StatusModule::is_situation_changed(fighter.module_accessor) { + special_lw_situation_helper(fighter); + } + + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(false) + ); + return 1.into() + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + return 0.into() +} + +unsafe extern "C" fn special_lw_situation_helper(fighter: &mut L2CFighterCommon) { + let special_lw_mot_rate = WorkModule::get_float(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_FLOAT_MOTION_RATE); + + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + let special_air_lw_mot_kind = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_AIR); + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(special_air_lw_mot_kind), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(special_air_lw_mot_kind), -1.0, 1.0, 0.0, false, false); + } + MotionModule::set_rate(fighter.module_accessor, special_lw_mot_rate); + } + else { + let special_lw_mot_kind = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_WORK_INT_MOTION_KIND_GROUND); + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(special_lw_mot_kind), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_PURIN_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(special_lw_mot_kind), -1.0, 1.0, 0.0, false, false); + } + MotionModule::set_rate(fighter.module_accessor, special_lw_mot_rate); + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} From eb7f69753dd4ae82587bab77327edb7ee54aa4b8 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 09:37:26 -0500 Subject: [PATCH 053/172] daisy!!! --- fighters/daisy/src/acmd/aerials.rs | 289 +++++++++--------- fighters/daisy/src/acmd/ground.rs | 154 ++++------ fighters/daisy/src/acmd/mod.rs | 16 +- fighters/daisy/src/acmd/other.rs | 179 +++-------- fighters/daisy/src/acmd/smashes.rs | 165 +++++----- fighters/daisy/src/acmd/specials.rs | 244 +++++++-------- fighters/daisy/src/acmd/throws.rs | 104 ++++--- fighters/daisy/src/acmd/tilts.rs | 180 +++++------ fighters/daisy/src/lib.rs | 10 +- fighters/daisy/src/opff.rs | 7 +- .../daisy/src/{status/mod.rs => status.rs} | 27 +- fighters/daisy/src/status/attack_air.rs | 8 +- fighters/daisy/src/status/special_lw.rs | 23 +- fighters/daisy/src/status/special_s.rs | 6 +- fighters/daisy/src/status/uniq_float.rs | 22 +- fighters/daisy/src/status/uniq_float_start.rs | 17 -- 16 files changed, 622 insertions(+), 829 deletions(-) rename fighters/daisy/src/{status/mod.rs => status.rs} (74%) delete mode 100644 fighters/daisy/src/status/uniq_float_start.rs diff --git a/fighters/daisy/src/acmd/aerials.rs b/fighters/daisy/src/acmd/aerials.rs index cde4f3fbaf..a11997e7d2 100644 --- a/fighters/daisy/src/acmd/aerials.rs +++ b/fighters/daisy/src/acmd/aerials.rs @@ -1,278 +1,273 @@ use super::*; -unsafe extern "C" fn daisy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 10.0, 361, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("hip"), 10.0, 361, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 7.0, 60, 95, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("hip"), 7.0, 60, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 20.0/(49.0-19.0)); + FT_MOTION_RATE(agent, 20.0/(49.0-19.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn daisy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(16.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(16.5-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 42, 86, 0, 50, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 42, 86, 0, 50, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("arml"), 13.0, 42, 86, 0, 50, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(40.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(40.0-25.0)); } frame(lua_state, 40.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(6.0-1.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 55, 100, 0, 40, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 55, 100, 0, 40, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 90, 0, 25, 4.5, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 90, 0, 25, 4.5, -1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_aire_back_atk"), -1); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 3, 8, -10.5, 0, 0, 0, 1, true); + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_aire_back_atk"), -1); } else{ - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_aire_back_atk"), -1); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), -3, 8, -10.5, 0, 0, 0, 1, true); + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_aire_back_atk"), -1); } - EFFECT(fighter, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 0, 8, -10.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 0, 8, -10.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn daisy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 75, 95, 0, 45, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 6.5, 75 , 95, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 75, 95, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 75, 95, 0, 45, 3.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 6.5, 75 , 95, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 0.0, 2.0, -85, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.5); + } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_smash_s01")); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.6, true, 1.0); } - } -unsafe extern "C" fn daisy_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 0.0, 2.0, -85, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.6, true, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_smash_s01")); } - } -unsafe extern "C" fn daisy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn daisy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); for _ in 0..3 { - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/6.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 50, 0, 20, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 50, 0, 20, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 275, 100, 45, 0, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 275, 100, 45, 0, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/6.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 50, 0, 20, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 50, 0, 20, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 275, 100, 45, 0, 5.0, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 275, 100, 45, 0, 4.0, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 280, 75, 0, 15, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 5.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 280, 95, 0, 45, 4.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn daisy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 16); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 16); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attackairn", daisy_attack_air_n_game) - .acmd("game_attackairf", daisy_attack_air_f_game) - .acmd("game_attackairb", daisy_attack_air_b_game) - .acmd("effect_attackairb", daisy_attack_air_b_effect) - .acmd("game_attackairhi", daisy_attack_air_hi_game) - .acmd("sound_attackairhi", daisy_attack_air_hi_sound) - .acmd("effect_attackairhi", daisy_attack_air_hi_effect) - .acmd("expression_attackairhi", daisy_attack_air_hi_expression) - .acmd("game_attackairlw", daisy_attack_air_lw_game) - .acmd("expression_attackairlw", daisy_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/daisy/src/acmd/ground.rs b/fighters/daisy/src/acmd/ground.rs index f68f737f0f..7eab417fb5 100644 --- a/fighters/daisy/src/acmd/ground.rs +++ b/fighters/daisy/src/acmd/ground.rs @@ -1,143 +1,111 @@ - use super::*; -unsafe extern "C" fn daisy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 75, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 75, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 15, 0, 30, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 15, 0, 30, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn daisy_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.5, 66, 65, 0, 73, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0/(17.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0/(17.0-10.0)); } - } -unsafe extern "C" fn daisy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 11.0, 80, 75, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 11.0, 80, 75, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 11.0, 80, 75, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 55, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - FT_MOTION_RATE(fighter, 10.0/(17.0-10.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 70, 0, 75, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 50, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 10.0/(17.0-10.0)); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.9); - } - /* - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 40, 100, 55, 0, 3.0, 0.0, 7.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 68, 100, 40, 0, 4.0, 0.0, 7.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 30, 100, 45, 0, 3.0, 0.0, 7.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 40, 100, 25, 0, 4.0, 0.0, 7.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 4.0, 40, 100, 58, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("bust"), 4.0, 28, 100, 48, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 2.9); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 2.9); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.9); } - frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 130, 0, 43, 5.0, 0.0, 8.0, 11.2, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 65, 130, 0, 43, 4.5, 0.0, 8.0, 6.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 65, 130, 0, 43, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - */ - } -unsafe extern "C" fn daisy_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attack11", daisy_attack_11_game) - .acmd("game_attack12", daisy_attack_12_game) - .acmd("game_attackdash", daisy_attack_dash_game) - .acmd("effect_attackdash", daisy_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/daisy/src/acmd/mod.rs b/fighters/daisy/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/daisy/src/acmd/mod.rs +++ b/fighters/daisy/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/daisy/src/acmd/other.rs b/fighters/daisy/src/acmd/other.rs index 9ff9353a9a..c5f184f6ca 100644 --- a/fighters/daisy/src/acmd/other.rs +++ b/fighters/daisy/src/acmd/other.rs @@ -1,184 +1,105 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_daisy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_daisy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn daisy_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", daisy_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/daisy/src/acmd/smashes.rs b/fighters/daisy/src/acmd/smashes.rs index ca8aa4d37d..827ae4dd04 100644 --- a/fighters/daisy/src/acmd/smashes.rs +++ b/fighters/daisy/src/acmd/smashes.rs @@ -1,170 +1,147 @@ - use super::*; -unsafe extern "C" fn daisy_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 65, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 13.0, 210, 65, 0, 58, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.0, 210, 65, 0, 58, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::set_size(boma, 2, 3.8); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 60, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 15.0, 45, 80, 0, 65, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - AttackModule::set_size(boma, 2, 3.8); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 200, 65, 0, 50, 2.7, 0.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 200, 65, 0, 50, 2.7, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 200, 68, 0, 55, 4.3, 0.0, 8.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_GOLF, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 16.0, 80, 78, 0, 68, 2.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DAISY_FRYINGPAN, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.5, 190, 60, 0, 55, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 3.0, 0.0, 6.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 13.5, 27, 69, 0, 65, 2.0, 0.0, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DAISY_TENNIS, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.556); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.556); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 90, 105, 0, 24, 2.5, 7.0, 0.0, 0.0, Some(2.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 90, 105, 0, 50, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 90, 105, 0, 24, 2.5, 7.0, 0.0, 0.0, Some(2.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 90, 105, 0, 50, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 75, 111, 0, 40, 3.6, 0.0, 8.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 100, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 85, 100, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 100, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 85, 100, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_MAGIC); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn daisy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 20, 0, 2.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 20, 0, 2.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 180, 100, 25, 0, 3.2, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 100, 225, 0, 65, 4.3, 0.0, 1.8, 7.5, Some(0.0), Some(1.8), Some(-7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 225, 0, 65, 4.3, 0.0, 1.8, 7.5, Some(0.0), Some(1.8), Some(-7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - FT_MOTION_RATE(fighter, 0.820); + FT_MOTION_RATE(agent, 0.82); } } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attacks4hi", daisy_attack_s4_hi_game) - .acmd("game_attacks4", daisy_attack_s4_s_game) - .acmd("game_attacks4lw", daisy_attack_s4_lw_game) - .acmd("game_attackhi4", daisy_attack_hi4_game) - .acmd("game_attacklw4", daisy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/daisy/src/acmd/specials.rs b/fighters/daisy/src/acmd/specials.rs index a637934b1f..945c433d0c 100644 --- a/fighters/daisy/src/acmd/specials.rs +++ b/fighters/daisy/src/acmd/specials.rs @@ -1,183 +1,143 @@ - use super::*; -unsafe extern "C" fn daisy_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(11.0-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(11.0-5.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn daisy_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(11.0-5.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(11.0-5.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn daisy_special_s_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(25.0-1.0)); +unsafe extern "C" fn game_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(25.0-1.0)); JostleModule::set_status(boma, false); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 3.5, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false); + SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_PEACH_SPECIAL_S_BRAKE); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_PEACH_STATUS_SPECIAL_S_JUMP_ID_TIME_OUT); } } -unsafe extern "C" fn daisy_special_s_hit_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 60, 0, 90, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); +unsafe extern "C" fn game_specialshitend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 60, 0, 90, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.4); + FT_MOTION_RATE(agent, 1.4); } - } -unsafe extern "C" fn daisy_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn daisy_special_hi_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn daisy_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 118, 0, 40, 6.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 361, 118, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PARASOL); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 1.0, 78, 100, 90, 0, 5.0, 0.0, 4.0, 0.0, Some(0.0), Some(-1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn daisy_special_air_hi_start_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn daisy_special_hi_open_game(fighter: &mut L2CAgentBase) { - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_open"), false, 1.0); } - } -unsafe extern "C" fn daisy_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let item_kind = fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let item_kind = agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); if item_kind == *ITEM_KIND_NONE { ArticleModule::generate_article(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_DAIKON, false, -1); } else if item_kind == *ITEM_KIND_BOMBHEI { @@ -189,57 +149,57 @@ unsafe extern "C" fn daisy_special_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); } } } -unsafe extern "C" fn daisy_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("daisy_hikkonuki"), -1); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("daisy_hikkonuki"), -1); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn daisy_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_special_l02")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_daisy_special_l01")); - if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(fighter.module_accessor, 0) { - PLAY_SE(fighter, Hash40::new("vc_daisy_appeal_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_daisy_special_l01")); + if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE + && ItemModule::is_have_item(agent.module_accessor, 0) { + PLAY_SE(agent, Hash40::new("vc_daisy_appeal_s01")); } } } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_specialsstart", daisy_special_s_start_game) - .acmd("game_specialairsstart", daisy_special_air_s_start_game) - .acmd("game_specialsjump", daisy_special_s_jump_game) - .acmd("game_specialshitend", daisy_special_s_hit_end_game) - .acmd("game_specialhistart", daisy_special_hi_start_game) - .acmd("expression_specialhistart", daisy_special_hi_start_expression) - .acmd("game_specialairhistart", daisy_special_air_hi_start_game) - .acmd("expression_specialairhistart", daisy_special_air_hi_start_expression) - .acmd("game_specialhiopen", daisy_special_hi_open_game) - .acmd("game_speciallw", daisy_special_lw_game) - .acmd("effect_speciallw", daisy_special_lw_effect) - .acmd("sound_speciallw", daisy_special_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsjump", game_specialsjump); + agent.acmd("game_specialshitend", game_specialshitend); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialhistart); + agent.acmd("expression_specialhistart", expression_specialhistart); + agent.acmd("expression_specialairhistart", expression_specialairhistart); + agent.acmd("game_specialhiopen", game_specialhiopen); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); } \ No newline at end of file diff --git a/fighters/daisy/src/acmd/throws.rs b/fighters/daisy/src/acmd/throws.rs index 5ce0af2b11..bb2dcb78a9 100644 --- a/fighters/daisy/src/acmd/throws.rs +++ b/fighters/daisy/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn daisy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn daisy_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn daisy_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn daisy_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,84 +63,83 @@ unsafe extern "C" fn daisy_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn daisy_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 70, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 70, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if IS_EXIST_ARTICLE(agent, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_hi"), false, -1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 24); + CHECK_FINISH_CAMERA(agent, 1, 24); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn daisy_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.0, 23.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 145, 70, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 23.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 145, 70, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); if ArticleModule::is_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, smash::phx::Hash40::new("throw_lw"), false, 0.0); ArticleModule::set_rate(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, (34.0 - 1.0)/23.0); } } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 270, 100, 20, 0, 3.8, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 270, 100, 20, 0, 3.8, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1.0, 1.0); + CHECK_FINISH_CAMERA(agent, 1.0, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO) { ArticleModule::set_rate(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, 1.0); } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_DAISY_GENERATE_ARTICLE_KINOPIO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_catch", daisy_catch_game) - .acmd("game_catchdash", daisy_catch_dash_game) - .acmd("game_catchturn", daisy_catch_turn_game) - .acmd("game_throwhi", daisy_throw_hi_game) - .acmd("game_throwlw", daisy_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/daisy/src/acmd/tilts.rs b/fighters/daisy/src/acmd/tilts.rs index efc20a9546..9c803198cc 100644 --- a/fighters/daisy/src/acmd/tilts.rs +++ b/fighters/daisy/src/acmd/tilts.rs @@ -1,167 +1,149 @@ - use super::*; -unsafe extern "C" fn daisy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 65, 100, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 57, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 3.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 65, 100, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 80, 100, 0, 57, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 3.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 90, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 90, 120, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 90, 120, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 90, 120, 0, 40, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.909); + FT_MOTION_RATE(agent, 0.909); } - } -unsafe extern "C" fn daisy_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn daisy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 92, 85, 0, 70, 5.0, 0.0, 10.0, 3.5, Some(0.0), Some(10.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.5, 94, 85, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 6.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 92, 85, 0, 70, 5.0, 0.0, 10.0, 3.5, Some(0.0), Some(10.0), Some(-3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.5, 94, 85, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("arml"), 7.5, 94, 85, 0, 60, 6.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn daisy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("daisy_attack_hi3"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.65, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("daisy_flower_petals"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.75, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("daisy_attack_hi3"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.65, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("daisy_flower_petals"), Hash40::new("top"), 0, 24, 0, 0, 90, 0, 0.75, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn daisy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - /* - // Ground only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 275, 85, 0, 100, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 275, 85, 0, 100, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 275, 85, 0, 100, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - // Air only - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 78, 80, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 7.0, 80, 80, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 7.0, 80, 80, 0, 60, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); - AttackModule::set_add_reaction_frame(boma, 2, -3.0, false); - */ - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 77, 66, 0, 77, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 7.0, 81, 66, 0, 77, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 8.0, 85, 66, 0, 77, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legl"), 6.0, 77, 66, 0, 77, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 7.0, 81, 66, 0, 77, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 8.0, 85, 66, 0, 77, 4.0, 5.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); - FT_MOTION_RATE(fighter, 20.0/(28.0-11.0)); + FT_MOTION_RATE(agent, 20.0/(28.0-11.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn daisy_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 2, 5.5, 4, 0, 190, 1.0, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, true); - EFFECT(fighter, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 2, 5.5, 4, 0, 190, 1.0, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("daisy_aire_back_atk"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, true); + EFFECT(agent, Hash40::new("daisy_aire_back_atk_petals"), Hash40::new("top"), 1.0, 2.0, 14.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } - } -pub fn install() { - smashline::Agent::new("daisy") - .acmd("game_attacks3", daisy_attack_s3_s_game) - .acmd("expression_attacks3", daisy_attack_s3_s_expression) - .acmd("game_attackhi3", daisy_attack_hi3_game) - .acmd("effect_attackhi3", daisy_attack_hi3_effect) - .acmd("game_attacklw3", daisy_attack_lw3_game) - .acmd("effect_attacklw3", daisy_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/daisy/src/lib.rs b/fighters/daisy/src/lib.rs index 5537dac979..ed41c0dd19 100644 --- a/fighters/daisy/src/lib.rs +++ b/fighters/daisy/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("daisy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/daisy/src/opff.rs b/fighters/daisy/src/opff.rs index a08d1b36b5..5613b99095 100644 --- a/fighters/daisy/src/opff.rs +++ b/fighters/daisy/src/opff.rs @@ -77,8 +77,7 @@ pub unsafe fn daisy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("daisy") - .on_line(Main, daisy_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, daisy_frame_wrapper); } diff --git a/fighters/daisy/src/status/mod.rs b/fighters/daisy/src/status.rs similarity index 74% rename from fighters/daisy/src/status/mod.rs rename to fighters/daisy/src/status.rs index 7756735430..ec19b4605f 100644 --- a/fighters/daisy/src/status/mod.rs +++ b/fighters/daisy/src/status.rs @@ -4,7 +4,6 @@ use globals::*; mod attack_air; mod special_s; mod special_lw; -mod uniq_float_start; mod uniq_float; // Prevents sideB from being used again if it has already been used once in the current airtime @@ -58,20 +57,18 @@ unsafe extern "C" fn float_check_air_jump_aerial(fighter: &mut L2CFighterCommon) 0.into() } -extern "C" fn daisy_init(fighter: &mut L2CFighterCommon) { - unsafe { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); } -pub fn install() { - smashline::Agent::new("daisy").on_start(daisy_init).install(); - attack_air::install(); - special_s::install(); - special_lw::install(); - uniq_float_start::install(); - uniq_float::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attack_air::install(agent); + special_s::install(agent); + special_lw::install(agent); + uniq_float::install(agent); } \ No newline at end of file diff --git a/fighters/daisy/src/status/attack_air.rs b/fighters/daisy/src/status/attack_air.rs index 5e5c8b6cb2..188055037e 100644 --- a/fighters/daisy/src/status/attack_air.rs +++ b/fighters/daisy/src/status/attack_air.rs @@ -1,6 +1,8 @@ use super::*; use globals::*; +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter); if !fighter.global_table[SUB_STATUS].get_bool() { @@ -13,8 +15,6 @@ unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue ret } -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/special_lw.rs b/fighters/daisy/src/status/special_lw.rs index 3a500e8a37..aa27794843 100644 --- a/fighters/daisy/src/status/special_lw.rs +++ b/fighters/daisy/src/status/special_lw.rs @@ -1,7 +1,9 @@ use super::*; use globals::*; -unsafe extern "C" fn daisy_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -29,15 +31,15 @@ unsafe extern "C" fn daisy_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -unsafe extern "C" fn daisy_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_ENABLE_ITEM_NO_COUNT); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, *FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, *FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 as i32 - 1 ); - fighter.sub_shift_status_main(L2CValue::Ptr(daisy_special_lw_main_loop as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)); 0.into() } -unsafe extern "C" fn daisy_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -60,7 +62,7 @@ unsafe extern "C" fn daisy_special_lw_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn daisy_special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ItemModule::is_have_item(fighter.module_accessor, 0) { if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) == *ITEM_KIND_NONE { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2508b59a2b), FIGHTER_ITEM_HOLD_KIND_HAVE); @@ -71,10 +73,9 @@ unsafe extern "C" fn daisy_special_lw_end(fighter: &mut L2CFighterCommon) -> L2C } 0.into() } -pub fn install() { - smashline::Agent::new("daisy") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, daisy_special_lw_end) - .install(); + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/daisy/src/status/special_s.rs b/fighters/daisy/src/status/special_s.rs index d81b63901d..47a3d30ead 100644 --- a/fighters/daisy/src/status/special_s.rs +++ b/fighters/daisy/src/status/special_s.rs @@ -8,8 +8,6 @@ unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CV smashline::original_status(Main, fighter, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP)(fighter) } -pub fn install() { - smashline::Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/uniq_float.rs b/fighters/daisy/src/status/uniq_float.rs index 02d79bc489..ecc48ca209 100644 --- a/fighters/daisy/src/status/uniq_float.rs +++ b/fighters/daisy/src/status/uniq_float.rs @@ -1,17 +1,29 @@ use super::*; use globals::*; +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START + +extern "Rust" { + #[link_name = "peach_float_start_main_common"] + fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +unsafe extern "C" fn uniq_float_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + peach_float_start_main_common(fighter) +} + +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT + extern "Rust" { #[link_name = "peach_float_main_common"] fn peach_float_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; } -unsafe extern "C" fn uniq_float(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn uniq_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_main_common(fighter) } -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start_main); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float_main); } \ No newline at end of file diff --git a/fighters/daisy/src/status/uniq_float_start.rs b/fighters/daisy/src/status/uniq_float_start.rs deleted file mode 100644 index 1232ab721a..0000000000 --- a/fighters/daisy/src/status/uniq_float_start.rs +++ /dev/null @@ -1,17 +0,0 @@ -use super::*; -use globals::*; - -extern "Rust" { - #[link_name = "peach_float_start_main_common"] - fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -unsafe extern "C" fn uniq_float_start(fighter: &mut L2CFighterCommon) -> L2CValue { - peach_float_start_main_common(fighter) -} - -pub fn install() { - Agent::new("daisy") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start) - .install(); -} \ No newline at end of file From 8188350061dda973a7e6ca8005630c064521c723 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 11:08:37 -0500 Subject: [PATCH 054/172] freddy fast bear --- fighters/buddy/src/acmd/aerials.rs | 357 ++++++------ fighters/buddy/src/acmd/ground.rs | 179 +++--- fighters/buddy/src/acmd/mod.rs | 16 +- fighters/buddy/src/acmd/other.rs | 299 +++------- fighters/buddy/src/acmd/smashes.rs | 214 ++++--- fighters/buddy/src/acmd/specials.rs | 617 ++++++++++----------- fighters/buddy/src/acmd/throws.rs | 203 ++++--- fighters/buddy/src/acmd/tilts.rs | 274 +++++---- fighters/buddy/src/bullet/acmd/mod.rs | 7 + fighters/buddy/src/bullet/acmd/specials.rs | 50 ++ fighters/buddy/src/bullet/mod.rs | 9 + fighters/buddy/src/lib.rs | 19 +- fighters/buddy/src/opff.rs | 15 +- fighters/buddy/src/pad/acmd/mod.rs | 7 + fighters/buddy/src/pad/acmd/specials.rs | 39 ++ fighters/buddy/src/pad/mod.rs | 9 + fighters/buddy/src/status.rs | 313 ++--------- fighters/buddy/src/status/bayonet_end.rs | 82 +++ fighters/buddy/src/status/run.rs | 13 + fighters/buddy/src/status/special_s.rs | 203 +++++++ fighters/daisy/src/lib.rs | 1 + fighters/purin/src/lib.rs | 1 + 22 files changed, 1433 insertions(+), 1494 deletions(-) create mode 100644 fighters/buddy/src/bullet/acmd/mod.rs create mode 100644 fighters/buddy/src/bullet/acmd/specials.rs create mode 100644 fighters/buddy/src/bullet/mod.rs create mode 100644 fighters/buddy/src/pad/acmd/mod.rs create mode 100644 fighters/buddy/src/pad/acmd/specials.rs create mode 100644 fighters/buddy/src/pad/mod.rs create mode 100644 fighters/buddy/src/status/bayonet_end.rs create mode 100644 fighters/buddy/src/status/run.rs create mode 100644 fighters/buddy/src/status/special_s.rs diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index df96cf0141..f303e7b6e0 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -1,235 +1,233 @@ use super::*; -// Uses smash_script, if you prefer to use the built-in macros instead. - -unsafe extern "C" fn buddy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 73, 0, 48, 5.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 73, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 73, 0, 48, 5.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 73, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 32, 73, 0, 48, 5.0, 0.0, 9.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 32, 73, 0, 48, 5.0, 0.0, 9.0, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 7.0, 50, 76, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + AttackModule::clear(agent.module_accessor, 1, false); + ATTACK(agent, 0, 0, Hash40::new("handr"), 7.0, 50, 76, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 76, 0, 48, 5.0, 0.0, 13.0, -14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 92, 26, 0, 78, 4.75, 0.0, 7.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 92, 26, 0, 78, 4.75, 0.0, 7.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 42.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 2.5, 0, 0, 180, 0, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 2.5, 0, 0, 180, 0, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.6); } } -unsafe extern "C" fn buddy_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); - if is_excute(fighter) { - let play_vc = app::sv_math::rand(hash40("fighter"), 3); - if play_vc == 0 {PLAY_SE(fighter, Hash40::new("vc_buddy_attack03"));} + if is_excute(agent) { + let play_vc = app::sv_math::rand(hash40("agent"), 3); + if play_vc == 0 {PLAY_SE(agent, Hash40::new("vc_buddy_attack03"));} } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } } -unsafe extern "C" fn buddy_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag( boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 11.0 / 10.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 11.0 / 10.5); } frame(lua_state, 14.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0 / 1.5); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0 / 1.5); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 361, 89, 0, 37, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 361, 88, 0, 37, 4.2, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 290, 62, 0, 16, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 290, 62, 0, 16, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 275, 75, 0, 41, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 275, 75, 0, 41, 4.8, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag( boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("k_bust"), 3.0, 110, 35, 0, 35, 3.0, -0.2, 2.0, 0.0, Some(9.4), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("k_bust"), 3.0, 180, 35, 0, 35, 3.0, -0.2, -2.0, 0.0, Some(9.4), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("k_bust"), 3.0, 110, 35, 0, 35, 3.0, -0.2, 2.0, 0.0, Some(9.4), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("k_bust"), 3.0, 180, 35, 0, 35, 3.0, -0.2, -2.0, 0.0, Some(9.4), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("k_bust"), 3.0, 190, 35, 0, 35, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 3.0, 365, 100, 40, 0, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 366, 35, 0, 35, 4.4, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("k_bust"), 3.0, 190, 35, 0, 35, 5.0, 1.6, 0.0, 0.0, Some(9.4), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 136, 0, 50, 4.8, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("k_bust"), 5.0, 50, 136, 0, 50, 5.8, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 136, 0, 50, 4.8, 0.0, 4.4, -5.6, Some(0.0), Some(11.4), Some(-5.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("k_bust"), 5.0, 50, 136, 0, 50, 5.8, 1.6, 0.0, 0.0, Some(8.6), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn buddy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 70, 101, 0, 50, 3.75, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("k_wingr3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("k_wingl3"), 8.0, 70, 101, 0, 50, 5.0, 6.5, -3.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 70, 101, 0, 50, 3.75, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -276,99 +274,99 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 60, 0, 54, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 60, 0, 54, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 50, 0, 23, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 50, 0, 23, 5.0, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 76, 63, 0, 67, 5.5, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 76, 63, 0, 67, 5.5, 0.0, 1.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 1, false); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - SET_SPEED_EX(fighter, 0, 1.625, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - FT_MOTION_RATE_RANGE(fighter,46.0,57.0,26.0); + SET_SPEED_EX(agent, 0, 1.625, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + FT_MOTION_RATE_RANGE(agent,46.0,57.0,26.0); } } frame(lua_state, 53.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 57.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 69.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } } -unsafe extern "C" fn buddy_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 14.0); if is_excute(agent) { EFFECT_FLW_POS(agent, Hash40::new("buddy_air_lw"), Hash40::new("top"), 0, -7, 0, 0, 0, 0, 1, true); @@ -395,40 +393,41 @@ unsafe extern "C" fn buddy_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn buddy_landing_air_lw_game(agent: &mut L2CAgentBase) { -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attackairn", buddy_attack_air_n_game) - .acmd("effect_attackairn", buddy_attack_air_n_effect) - .acmd("sound_attackairn", buddy_attack_air_n_sound) - .acmd("expression_attackairn", buddy_attack_air_n_expression) - .acmd("game_attackairf", buddy_attack_air_f_game) - .acmd("expression_attackairf", buddy_attack_air_f_expression) - .acmd("game_attackairb", buddy_attack_air_b_game) - .acmd("game_attackairhi", buddy_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("expression_attackairhi", buddy_attack_air_hi_expression) - .acmd("game_attackairlw", buddy_attack_air_lw_game) - .acmd("effect_attackairlw", buddy_attack_air_lw_effect) - .acmd("expression_attackairlw", buddy_attack_air_lw_expression) - .acmd("game_landingairlw", buddy_landing_air_lw_game) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", null); } diff --git a/fighters/buddy/src/acmd/ground.rs b/fighters/buddy/src/acmd/ground.rs index 3d05ab0871..d986a5ffa8 100644 --- a/fighters/buddy/src/acmd/ground.rs +++ b/fighters/buddy/src/acmd/ground.rs @@ -1,180 +1,177 @@ use super::*; -unsafe extern "C" fn buddy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 45, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 45, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 45, 0, 20, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn buddy_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 75, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 75, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 75, 100, 30, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 24, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn buddy_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(7.5-4.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 74, 98, 0, 72, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handl"), 4.0, 74, 98, 0, 72, 4.0, 4.0, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(7.5-4.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 74, 98, 0, 72, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 74, 98, 0, 72, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handl"), 4.0, 74, 98, 0, 72, 4.0, 4.0, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn buddy_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn buddy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 66, 66, 0, 75, 6.0, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 66, 66, 0, 75, 6.0, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 66, 38, 0, 59, 5.5, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 66, 38, 0, 59, 5.5, 0.0, 5.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); } } -unsafe extern "C" fn buddy_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 6, 0, 0, 0, -90, 0.9, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 6, 0, 0, 0, -90, 0.9, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 5, 0, 0, 0, -90, 0.9, false, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 5, 0, 0, 0, -90, 0.9, false, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attack11", buddy_attack_11_game) - .acmd("game_attack12", buddy_attack_12_game) - .acmd("game_attack13", buddy_attack_13_game) - .acmd("expression_attack13", buddy_attack_13_expression) - .acmd("game_attackdash", buddy_attack_dash_game) - .acmd("effect_attackdash", buddy_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/buddy/src/acmd/mod.rs b/fighters/buddy/src/acmd/mod.rs index 6312b876a0..4ef668d792 100644 --- a/fighters/buddy/src/acmd/mod.rs +++ b/fighters/buddy/src/acmd/mod.rs @@ -8,12 +8,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/buddy/src/acmd/other.rs b/fighters/buddy/src/acmd/other.rs index 99e19ec391..fd7125596e 100644 --- a/fighters/buddy/src/acmd/other.rs +++ b/fighters/buddy/src/acmd/other.rs @@ -1,300 +1,129 @@ use super::*; -unsafe extern "C" fn buddy_jump_aerial_f1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); - } -} - -unsafe extern "C" fn buddy_jump_aerial_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); - } -} - -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02"));} +unsafe extern "C" fn game_jumpaerialf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 26.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_JUMP_FLY_NEXT); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_buddy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_buddy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn buddy_bullet_bakyun_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - //AttackModule::set_add_reaction_frame(boma, 0, 6, false); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - //AttackModule::set_add_reaction_frame(boma, 0, 6, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 361, 8, 0, 8, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.9, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 361, 6, 0, 8, 2.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn buddy_bullet_missile_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); - GroundModule::set_offset_y(boma, -1.0); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 361, 20, 0, 52, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.6, 361, 20, 0, 46, 3.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.8, 361, 20, 0, 40, 2.8, 0.0, 0.0, 0.0, None, None, None, 0.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn buddy_pad_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - let pad_length = 6.0; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 70, 0, 40, 2.0, 0.0, 2.2, pad_length, Some(0.0), Some(2.2), Some(-pad_length), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - //Vanilla code from here on out - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } - frame(lua_state, 42.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("buddy_bullet") - .acmd("game_bakyun", buddy_bullet_bakyun_game) - .acmd("game_missile", buddy_bullet_missile_game) - .install(); - smashline::Agent::new("buddy") - .acmd("game_jumpaerialf1", buddy_jump_aerial_f1_game) - .acmd("game_jumpaerialf2", buddy_jump_aerial_f2_game) - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_turn", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("buddy_pad") - .acmd("game_fall", buddy_pad_fall_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_jumpaerialf1", game_jumpaerialf); + agent.acmd("game_jumpaerialf2", game_jumpaerialf); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/buddy/src/acmd/smashes.rs b/fighters/buddy/src/acmd/smashes.rs index afd434a5a6..f07d3b947a 100644 --- a/fighters/buddy/src/acmd/smashes.rs +++ b/fighters/buddy/src/acmd/smashes.rs @@ -1,203 +1,201 @@ use super::*; -unsafe extern "C" fn buddy_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, smash::phx::Hash40::new("attack_s4s"), true, 0.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, smash::phx::Hash40::new("attack_s4s"), true, 11.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 15.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 15.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 22.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 22.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 19.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 3.5, 0.0, 4.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.0, 0.0, 9.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 12.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 361, 97, 0, 36, 4.5, 0.0, 19.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -// Uses smash_script, if you prefer to use the built-in macros instead. -unsafe extern "C" fn buddy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 16, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 17, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); + HIT_NO(agent, 16, *HIT_STATUS_NORMAL); + HIT_NO(agent, 17, *HIT_STATUS_NORMAL); FighterAreaModuleImpl::enable_fix_jostle_area( boma, 4.0, 3.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } //Launcher hitbox, chains into main hitbox frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 100, 0, 5.0, 0.0, 3.0, 6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 100, 0, 5.0, 0.0, 3.0, 6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear(fighter.module_accessor, 0, false); + if is_excute(agent) { + AttackModule::clear(agent.module_accessor, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("legr"), 13.0, 86, 116, 0, 40, 4.4, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("footr"), 13.0, 86, 116, 0, 40, 4.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("legl"), 13.0, 86, 116, 0, 40, 4.4, 2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("legr"), 13.0, 86, 116, 0, 40, 4.4, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("footr"), 13.0, 86, 116, 0, 40, 4.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("legl"), 13.0, 86, 116, 0, 40, 4.4, 2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); - HIT_NO(fighter, 16, *HIT_STATUS_OFF); - HIT_NO(fighter, 17, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); + HIT_NO(agent, 16, *HIT_STATUS_OFF); + HIT_NO(agent, 17, *HIT_STATUS_OFF); } } -unsafe extern "C" fn buddy_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -90, 0, 0, 1.7, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -90, 0, 0, 1.7, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -90, 0, 0, 1.2, true); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, -2, 0, 0, 0, 0, 1.4, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -90, 0, 0, 1.2, true); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, -2, 0, 0, 0, 0, 1.4, true, 1.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn buddy_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_attackhard_h01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); } frame(lua_state, 28.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_buddy_attackhard_h02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_buddy_attackhard_h02")); } } -unsafe extern "C" fn buddy_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn buddy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 44, 69, 0, 64, 5.0, 0.0, 4.0, 13.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 44, 69, 0, 64, 5.0, 0.0, 4.0, 13.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 48.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attacks4", buddy_attack_s4_game) - .acmd("game_attackhi4", buddy_attack_hi4_game) - .acmd("effect_attackhi4", buddy_attack_hi4_effect) - .acmd("sound_attackhi4", buddy_attack_hi4_sound) - .acmd("expression_attackhi4", buddy_attack_hi4_expression) - .acmd("game_attacklw4", buddy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/buddy/src/acmd/specials.rs b/fighters/buddy/src/acmd/specials.rs index a87ac11e5f..b778d634e3 100644 --- a/fighters/buddy/src/acmd/specials.rs +++ b/fighters/buddy/src/acmd/specials.rs @@ -2,470 +2,419 @@ use smash::app::sv_animcmd::EFFECT_WORK; use super::*; -unsafe extern "C" fn buddy_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); - JostleModule::set_status( boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - //AttackModule::set_captured_same_time_attack(boma, 0, true); - //AttackModule::set_captured_same_time_attack(boma, 1, true); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.48); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - HIT_NO(fighter, 0, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 1, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 2, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 3, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 4, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 5, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 6, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 7, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 8, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 9, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 10, *HIT_STATUS_INVINCIBLE); - HIT_NO(fighter, 11, *HIT_STATUS_NORMAL); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); - //AttackModule::set_captured_same_time_attack(boma, 0, true); - //AttackModule::set_captured_same_time_attack(boma, 1, true); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); - //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.28); - } -} - -unsafe fn will_Bayonet(fighter: &mut L2CAgentBase) -> bool -{ - let is_csticking = ControlModule::get_command_flag_cat(fighter.module_accessor, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; +unsafe fn will_bayonet(agent: &mut L2CAgentBase) -> bool { + let is_csticking = ControlModule::get_command_flag_cat(agent.module_accessor, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; if (is_csticking) { return true; } return false; } -unsafe extern "C" fn buddy_attack_special_n_upperfire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialnupperfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - for _ in 0..4 - { - if is_excute(fighter) && will_Bayonet(fighter){ + for _ in 0..4 { + if is_excute(agent) && will_bayonet(agent){ VarModule::on_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); - fighter.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); + agent.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); VarModule::set_int(boma.object(), vars::buddy::instance::BAYONET_EGGS,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); break; } wait(lua_state, 1.0); } - if !VarModule::is_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE) - { + if !VarModule::is_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE) { frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_GENERATE_BULLET); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_START_PRECEDE_CHECK); } } } -unsafe extern "C" fn buddy_attack_special_n_fire2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialnfire2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - for _ in 0..4 - { - if is_excute(fighter) && will_Bayonet(fighter){ + for _ in 0..4 { + if is_excute(agent) && will_bayonet(agent){ VarModule::on_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); - fighter.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); + agent.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_S3, true); return; } wait(lua_state, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_GENERATE_BULLET); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_N_FLAG_START_PRECEDE_CHECK); } } -unsafe extern "C" fn buddy_special_air_s_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - if (fighter.is_situation(*SITUATION_KIND_GROUND)) - { - ItemModule::set_have_item_visibility(boma, false,0); - } - //slope!(fighter,*MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackll"), 0); - } - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); - } - wait(lua_state, 6.0); - frame(lua_state, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, 0); - } - wait(lua_state, 2.0); +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); + JostleModule::set_status( boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 43, 72, 0, 66, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + //AttackModule::set_captured_same_time_attack(boma, 0, true); + //AttackModule::set_captured_same_time_attack(boma, 1, true); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.48); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + HIT_NO(agent, 0, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 1, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 2, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 3, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 4, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 5, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 6, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 7, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 8, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 9, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 10, *HIT_STATUS_INVINCIBLE); + HIT_NO(agent, 11, *HIT_STATUS_NORMAL); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 3.8, 0.0, 6.2, 1.8, Some(0.0), Some(6.2), Some(3.2), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 63, 0, 56, 4.2, 0.0, 9.2, 3.8, Some(0.0), Some(9.2), Some(5.4), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); + //AttackModule::set_captured_same_time_attack(boma, 0, true); + //AttackModule::set_captured_same_time_attack(boma, 1, true); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 0, 0.25); + //AttackModule::set_captured_same_time_attack_damage_mul(boma, 1, 0.25); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.28); + } +} + +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + if is_excute(agent) { + //Clear speed + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + KineticModule::clear_speed_all(agent.module_accessor); + GroundModule::set_attach_ground(agent.module_accessor, false); + sv_kinetic_energy!(clear_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + SET_SPEED_EX(agent, -0.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 2.0); + frame(lua_state, 10.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + FT_MOTION_RATE(agent, 1.0); + + frame(lua_state, 12.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 2.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } } -unsafe extern "C" fn buddy_special_air_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + } + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); } frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.4, 0, 0.2); + if is_excute(agent) { + FLASH(agent, 1, 0.4, 0, 0.2); } frame(lua_state, 4.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 0, 0, 0, 0); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 0, -6, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH_FRM(agent, 4, 0, 0, 0, 0); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 0, -6, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 12.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.4, 0, 0.3); + if is_excute(agent) { + FLASH(agent, 1, 0.4, 0, 0.3); } } -unsafe extern "C" fn buddy_special_air_s_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 1.0); + if is_excute(agent) && !WorkModule::is_flag(boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL){ + PLAY_SE(agent, Hash40::new("se_buddy_special_s01")); + } + frame(lua_state, 3.0); + if is_excute(agent) { + let play_vc = app::sv_math::rand(hash40("fighter"), 3); + if play_vc == 0 { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s01")); + } +} - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("buddy_special_s_flash1"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 1, 0.3, 0); - - EFFECT_FLW_POS(fighter, Hash40::new("buddy_special_s_flash2"), Hash40::new("k_head"), -1, 0, -4, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter,1,0.5,0); - EffectModule::enable_sync_init_pos_last(boma); +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + if is_excute(agent) { + //Set control + VarModule::on_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); + let stick_y: f32 = ControlModule::get_stick_y(boma); + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,stick_y.signum()); + if stick_y.abs() < 0.1 { + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); + } + //Clear gravity speed (prevents exponential movement from cliff jump) + sv_kinetic_energy!(clear_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + let shieldDamage = 4; + JostleModule::set_status( boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); + HIT_NO(agent, 16, *HIT_STATUS_NORMAL); + HIT_NO(agent, 17, *HIT_STATUS_NORMAL); } + //Weaker hitbox + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } +} +unsafe extern "C" fn effect_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + if is_excute(agent) { + EFFECT(agent, Hash40::new("buddy_special_s_flash1"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 1, 0.3, 0); + EFFECT_FLW_POS(agent, Hash40::new("buddy_special_s_flash2"), Hash40::new("k_head"), -1, 0, -4, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent,1,0.5,0); + EffectModule::enable_sync_init_pos_last(boma); + } if (smash::app::sv_animcmd::get_value_float(lua_state,*SO_VAR_FLOAT_LR)<=0.0){ - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), 2, 0, 3, 0, 0, 0, 1, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), 2, 0, 3, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), 2, 4, 0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), 2, 4, 0, 0, 0, 0, 0.7, true); } } - else if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), -2, 0, 3, 0, 0, 0, 1, true); + else if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_impact"), Hash40::new("throw"), -2, 0, 3, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), -2, 4, 0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_wind"), Hash40::new("top"), -2, 4, 0, 0, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); } - if is_excute(fighter) { - FLASH(fighter, 1, 1, 0.6, 0.3); - EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FLASH(agent, 1, 1, 0.6, 0.3); + EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - //buddy_meter(fighter,boma); - + if is_excute(agent) { + //buddy_meter(agent,boma); EffectModule::enable_sync_init_pos_last(boma); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - } -} - -unsafe extern "C" fn buddy_special_air_s_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 1.0); - if is_excute(fighter) && !WorkModule::is_flag(boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL){ - PLAY_SE(fighter, Hash40::new("se_buddy_special_s01")); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - let play_vc = app::sv_math::rand(hash40("fighter"), 3); - if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); - } - } - frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s01")); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn buddy_special_air_s_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_buddy_special_s05")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_buddy_special_s05")); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = app::sv_math::rand(hash40("fighter"), 3); if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_smash_h01_vc")); + PLAY_SE(agent, Hash40::new("vc_buddy_smash_h01_vc")); } } frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } frame(lua_state, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_special_s02_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_special_s02_03")); } } -unsafe extern "C" fn buddy_special_air_s_wall_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn expression_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_down_m_01")); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - let play_vc = app::sv_math::rand(hash40("fighter"), 2); - if play_vc == 0 { - PLAY_SE(fighter, Hash40::new("vc_buddy_missfoot02")); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + ItemModule::set_have_item_visibility(boma, false,0); } + //slope!(agent,*MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackll"), 0); + } + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_down_m_02")); - } -} - -unsafe extern "C" fn buddy_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - frame(lua_state, 36.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } -} - -unsafe extern "C" fn buddy_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - //Clear speed - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - KineticModule::clear_speed_all(fighter.module_accessor); - GroundModule::set_attach_ground(fighter.module_accessor, false); - sv_kinetic_energy!( - clear_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY - ); - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - SET_SPEED_EX(fighter, -0.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 2.0); - frame(lua_state, 10.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } - FT_MOTION_RATE(fighter, 1.0); - - frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 2.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + wait(lua_state, 6.0); + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, 0); } + wait(lua_state, 2.0); } -// Uses smash_script, if you prefer to use the built-in macros instead. - -unsafe extern "C" fn buddy_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - - if is_excute(fighter) { - //Set control - VarModule::on_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); - VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); - VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); - let stick_y: f32 = ControlModule::get_stick_y(boma); - VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,stick_y.signum()); - if (stick_y.abs())<0.1 - { - VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); - } - //Clear gravity speed (prevents exponential movement from cliff jump) - sv_kinetic_energy!( - clear_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY - ); - sv_kinetic_energy!( - set_accel, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - 0.0 - ); - - let shieldDamage = 4; - JostleModule::set_status( boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 43, 70, 0, 76, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, shieldDamage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - WorkModule::on_flag( boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_CLIFF_CHECK); - - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 16, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 17, *HIT_STATUS_NORMAL); - } - //Weaker hitbox - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 3.2, 0.0, 9.2, 8.8, Some(0.0), Some(9.2), Some(12.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 43, 57, 0, 66, 4.2, 0.0, 4.2, 2.8, None,None,None, 1.125, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } -unsafe extern "C" fn buddy_special_air_s_wall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); if (!has_hit_shield - && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) - { - CancelModule::enable_cancel(fighter.module_accessor); + && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) { + CancelModule::enable_cancel(agent.module_accessor); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); if (!has_hit_shield - && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) - { + && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } frame(lua_state, 19.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY)) - { - FT_MOTION_RATE(fighter, 1.0); //.75 - } - else - { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY)) { + FT_MOTION_RATE(agent, 1.0); //.75 + } else { + FT_MOTION_RATE(agent, 1.0); } } //frame(lua_state, 42.0); - //FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 1.0); frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); } } -unsafe extern "C" fn buddy_special_air_s_wall_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); let lr = PostureModule::lr(boma)==0.0; - let size = if (has_hit_shield) {0.5} else {0.75}; let xRot = if (lr) {-90.0} else {90.0}; let yRot = if (lr) {0.0} else {180.0}; + if is_excute(agent) { + EFFECT(agent, Hash40::new("buddy_special_s_wall"), Hash40::new("top"), 5, 12.5, 0, xRot, yRot, 0, size, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_SCATTER, Hash40::new("top"), -7, 12.5, 0, xRot, yRot, 0, 1, false); + } +} - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("buddy_special_s_wall"), Hash40::new("top"), 5, 12.5, 0, xRot, yRot, 0, size, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_SCATTER, Hash40::new("top"), -7, 12.5, 0, xRot, yRot, 0, 1, false); +unsafe extern "C" fn sound_specialairswall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_m_01")); + } + frame(lua_state, 6.0); + if is_excute(agent) { + let play_vc = app::sv_math::rand(hash40("fighter"), 2); + if play_vc == 0 { + PLAY_SE(agent, Hash40::new("vc_buddy_missfoot02")); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_m_02")); } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_specialsdash", buddy_special_s_dash_game) - .acmd("game_specialnupperfire", buddy_attack_special_n_upperfire_game) - .acmd("game_specialnfire2", buddy_attack_special_n_fire2_game) - .acmd("expression_specialairsdash", buddy_special_air_s_dash_expression) - .acmd("effect_specialairsstart", buddy_special_air_s_start_effect) - .acmd("effect_specialairsdash", buddy_special_air_s_dash_effect) - .acmd("sound_specialairsstart", buddy_special_air_s_start_sound) - .acmd("sound_specialairsdash", buddy_special_air_s_dash_sound) - .acmd("sound_specialairswall", buddy_special_air_s_wall_sound) - .acmd("game_specialairsend", buddy_special_air_s_end_game) - .acmd("game_specialairsstart", buddy_special_air_s_start_game) - .acmd("game_specialairsdash", buddy_special_air_s_dash_game) - .acmd("game_specialairswall", buddy_special_air_s_wall_game) - .acmd("effect_specialairswall", buddy_special_air_s_wall_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnupperfire", game_specialnupperfire); + agent.acmd("game_specialnfire2", game_specialnfire2); + + agent.acmd("game_specialsdash", game_specialsdash); + + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("sound_specialairsstart", sound_specialairsstart); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("effect_specialairsdash", effect_specialairsdash); + agent.acmd("sound_specialairsdash", sound_specialairsdash); + agent.acmd("expression_specialairsdash", expression_specialairsdash); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialairswall", game_specialairswall); + agent.acmd("effect_specialairswall", effect_specialairswall); + agent.acmd("sound_specialairswall", sound_specialairswall); } \ No newline at end of file diff --git a/fighters/buddy/src/acmd/throws.rs b/fighters/buddy/src/acmd/throws.rs index 25f318b012..e2fcceaceb 100644 --- a/fighters/buddy/src/acmd/throws.rs +++ b/fighters/buddy/src/acmd/throws.rs @@ -1,26 +1,26 @@ use super::*; -unsafe extern "C" fn buddy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn buddy_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn buddy_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -60,162 +60,161 @@ unsafe extern "C" fn buddy_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn buddy_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 52, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 52, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 4.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("k_footr"), 6.0, 64, 34, 0, 82, 4.6, 2.8, 2.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("k_footr"), 6.0, 64, 34, 0, 82, 4.6, 2.8, 2.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 2); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn buddy_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 80, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 80, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 8.0, 50, 70, 0, 100, 4.0, 7.0, 0.0, 0.0, Some(8.0), Some(-6.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 8.0, 50, 70, 0, 100, 4.0, 7.0, 0.0, 0.0, Some(8.0), Some(-6.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 20, 3); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 20, 3); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn buddy_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 104, 64, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 104, 64, 0, 78, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.4, 361, 100, 0, 10, 4.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 361, 100, 0, 10, 4.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -1, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -1, 18); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 56.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn buddy_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 7.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 7.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 75, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 25.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 25.0, 10.0); frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.25); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.25); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn buddy_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18, 6, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18, 6, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("buddy_attack_arc_b"), Hash40::new("buddy_attack_arc_b"), Hash40::new("top"), 3, 10, 1.5, 30, -20, -90, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("buddy_attack_arc_b"), Hash40::new("buddy_attack_arc_b"), Hash40::new("top"), 3, 10, 1.5, 30, -20, -90, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 33.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 10, 0, 1, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 10, 0, 1, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn buddy_throw_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_jump01")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_buddy_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_buddy_attack05")); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_03")); } frame(lua_state, 34.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_l")); - PLAY_SE(fighter, Hash40::new("se_common_down_m_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_kick_hit_l")); + PLAY_SE(agent, Hash40::new("se_common_down_m_01")); } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_catch", buddy_catch_game) - .acmd("game_catchdash", buddy_catch_dash_game) - .acmd("game_catchturn", buddy_catch_turn_game) - .acmd("game_throwf", buddy_throw_f_game) - .acmd("game_throwb", buddy_throw_b_game) - .acmd("game_throwhi", buddy_throw_hi_game) - .acmd("game_throwlw", buddy_throw_lw_game) - .acmd("effect_throwlw", buddy_throw_lw_effect) - .acmd("sound_throwlw", buddy_throw_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", buddy_throw_lw_game); + agent.acmd("effect_throwlw", effect_throwlw); + agent.acmd("sound_throwlw", sound_throwlw); } diff --git a/fighters/buddy/src/acmd/tilts.rs b/fighters/buddy/src/acmd/tilts.rs index c5d80baa05..94a06431ae 100644 --- a/fighters/buddy/src/acmd/tilts.rs +++ b/fighters/buddy/src/acmd/tilts.rs @@ -1,265 +1,263 @@ use super::*; -unsafe extern "C" fn buddy_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_hi"), false, 0.0); + ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_s"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.2, 0.0, 14.2, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 46, 2.6, 0.0, 16.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.6, 0.0, 12.4, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.2, 0.0, 7.2, 13.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 45, 71, 0, 46, 2.6, 0.0, 7.2, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.6, 0.0, 7.2, 7.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn buddy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); - ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_s"), false, 0.0); + ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_hi"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.2, 0.0, 7.2, 13.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 45, 71, 0, 46, 2.6, 0.0, 7.2, 18.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 67, 0, 46, 3.6, 0.0, 7.2, 7.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.2, 0.0, 14.2, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 50, 71, 0, 46, 2.6, 0.0, 16.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 67, 0, 46, 3.6, 0.0, 12.4, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + if is_excute(agent) { + AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { - ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn buddy_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("attack_s3_lw"), false, 0.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.2, 0.0, 2.8, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 71, 0, 46, 2.6, 0.0, 1.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.6, 0.0, 4.2, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.2, 0.0, 2.8, 12.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 71, 0, 46, 2.6, 0.0, 1.2, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 40, 67, 0, 46, 3.6, 0.0, 4.2, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn buddy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //Banjo// - ATTACK(fighter, 0, 0, Hash40::new("handl"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.5, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 70, 81, 0, 74, 3.6, 1.2, 0.5, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 6.25, -7.5, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 6.25, -7.5, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 16.0, -4.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 82, 58, 0, 71, 5.3, 0.0, 16.0, -4.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //Kazooie// - ATTACK(fighter, 2, 0, Hash40::new("k_wingr4"), 6.5, 82, 50, 0, 73, 4.8, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("k_wingr4"), 6.5, 82, 50, 0, 73, 4.8, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BUDDY_WING, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //Banjo// - ATTACK(fighter, 0, 0, Hash40::new("handl"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 105, 74, 0, 74, 3.6, 1.2, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } //Remove kazooie hitbox frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma,2,false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn buddy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("buddy_attack100"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("buddy_attack100"), false, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); //Banjo - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 4, 11.5, 6, 0, 4, 115, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter,1.4); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 4, 11.5, 6, 0, 4, 115, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent,1.4); //Kazooie - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -0.25, 14, 1.5, 180, 4, 76, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter,1.4); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -0.25, 14, 1.5, 180, 4, 76, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent,1.4); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.3, 0); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.3, 0); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.7, 0.35, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.7, 0.35, 0.1); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.2, 0.5); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.5); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.2, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.2, 0.35); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.35, 0.35, 0.35); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.35); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.4, 0.3, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.4, 0.3, 0.1); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 1, 0.2, 0.2); + LAST_EFFECT_SET_COLOR(agent, 1, 0.2, 0.2); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.05, 0.1); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.05, 0.1); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 3, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("k_all"), 3, 0, 0, 0, 0, 0, 0.9, true); } - } -unsafe extern "C" fn buddy_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; //frame(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_buddy_attack100_01")); - PLAY_SE(fighter, Hash40::new("se_buddy_attack100_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_buddy_attack100_01")); + PLAY_SE(agent, Hash40::new("se_buddy_attack100_02")); } frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_buddy_attack100_03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_buddy_attack100_03")); } } -unsafe extern "C" fn buddy_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn buddy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let slide_speed = 0.9; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0 / 1.571); // originally was MotionModule::set_rate, but let's use the lua macros for consistency + FT_MOTION_RATE(agent, 1.0 / 1.571); // originally was MotionModule::set_rate, but let's use the lua macros for consistency frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 14, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 15, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 14, *HIT_STATUS_NORMAL); + HIT_NO(agent, 15, *HIT_STATUS_NORMAL); KineticModule::add_speed(boma, &Vector3f::new(slide_speed, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 59, 3.9, 0.0, 4.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 38, 68, 0, 59, 3.75, 0.0, 4.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 59, 3.9, 0.0, 4.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 90, 67, 0, 73, 3.5, 0.0, 3.9, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 90, 61, 0, 73, 3.25, 0.0, 3.75, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 90, 67, 0, 73, 3.5, 0.0, 3.9, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 17.5); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); - HIT_NO(fighter, 14, *HIT_STATUS_OFF); - HIT_NO(fighter, 15, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 14, *HIT_STATUS_OFF); + HIT_NO(agent, 15, *HIT_STATUS_OFF); AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); wait(lua_state, 1.0); for _ in 0..20 { - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new((-1.0*slide_speed)/20.0, 0.0, 0.0)); } wait(lua_state, 1.0); } } -pub fn install() { - smashline::Agent::new("buddy") - .acmd("game_attacks3hi", buddy_attack_s3_hi_game) - .acmd("game_attacks3", buddy_attack_s3_s_game) - .acmd("game_attacks3lw", buddy_attack_s3_lw_game) - .acmd("game_attackhi3", buddy_attack_hi3_game) - .acmd("effect_attackhi3", buddy_attack_hi3_effect) - .acmd("sound_attackhi3", buddy_attack_hi3_sound) - .acmd("expression_attackhi3", buddy_attack_hi3_expression) - .acmd("game_attacklw3", buddy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/buddy/src/bullet/acmd/mod.rs b/fighters/buddy/src/bullet/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/buddy/src/bullet/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/buddy/src/bullet/acmd/specials.rs b/fighters/buddy/src/bullet/acmd/specials.rs new file mode 100644 index 0000000000..8dd1c43a24 --- /dev/null +++ b/fighters/buddy/src/bullet/acmd/specials.rs @@ -0,0 +1,50 @@ +use super::*; + +unsafe extern "C" fn game_bakyun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.7, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + //AttackModule::set_add_reaction_frame(boma, 0, 6, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 86, 62, 0, 72, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.8, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + //AttackModule::set_add_reaction_frame(boma, 0, 6, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 361, 8, 0, 8, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -0.9, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 361, 6, 0, 8, 2.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_missile(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::set_shape_flag(boma, *GROUND_CORRECT_SHAPE_RHOMBUS_MODIFY_FLAG_FIX as u16, true); + GroundModule::set_offset_y(boma, -1.0); + + ATTACK(agent, 0, 0, Hash40::new("top"), 5.4, 361, 20, 0, 52, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 361, 20, 0, 46, 3.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 40.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.8, 361, 20, 0, 40, 2.8, 0.0, 0.0, 0.0, None, None, None, 0.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_bakyun", game_bakyun); + agent.acmd("game_missile", game_missile); +} diff --git a/fighters/buddy/src/bullet/mod.rs b/fighters/buddy/src/bullet/mod.rs new file mode 100644 index 0000000000..8d8f6f911f --- /dev/null +++ b/fighters/buddy/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("buddy_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/buddy/src/lib.rs b/fighters/buddy/src/lib.rs index c033917585..e40b3778af 100644 --- a/fighters/buddy/src/lib.rs +++ b/fighters/buddy/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bullet; +mod pad; use smash::{ lib::{ @@ -37,9 +42,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("buddy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + bullet::install(); + pad::install(); } \ No newline at end of file diff --git a/fighters/buddy/src/opff.rs b/fighters/buddy/src/opff.rs index 749a6b035f..f9f6318a6e 100644 --- a/fighters/buddy/src/opff.rs +++ b/fighters/buddy/src/opff.rs @@ -535,14 +535,6 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod } } -extern "C" fn buddy_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let lua_state = fighter.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); - on_rebirth(fighter, boma); - } -} - pub unsafe extern "C" fn buddy_frame_wrapper(fighter: &mut L2CFighterCommon) { common::opff::fighter_common_opff(fighter); buddy_frame(fighter); @@ -554,9 +546,6 @@ pub unsafe fn buddy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("buddy") - .on_start(buddy_reset) - .on_line(Main, buddy_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, buddy_frame_wrapper); } diff --git a/fighters/buddy/src/pad/acmd/mod.rs b/fighters/buddy/src/pad/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/buddy/src/pad/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/buddy/src/pad/acmd/specials.rs b/fighters/buddy/src/pad/acmd/specials.rs new file mode 100644 index 0000000000..9317beb319 --- /dev/null +++ b/fighters/buddy/src/pad/acmd/specials.rs @@ -0,0 +1,39 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let pad_length = 6.0; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 70, 0, 40, 2.0, 0.0, 2.2, pad_length, Some(0.0), Some(2.2), Some(-pad_length), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + //Vanilla code from here on out + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); + } + frame(lua_state, 23.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_RIGHT); + } + frame(lua_state, 26.0); + if is_excute(agent) { + WorkModule::on_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } + frame(lua_state, 42.0); + if is_excute(agent) { + WorkModule::off_flag(boma, /*Flag*/ *WEAPON_BUDDY_PAD_STATUS_WORK_FLAG_FALL_LEANING_TO_THE_LEFT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/buddy/src/pad/mod.rs b/fighters/buddy/src/pad/mod.rs new file mode 100644 index 0000000000..4b9d70d7d9 --- /dev/null +++ b/fighters/buddy/src/pad/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("buddy_pad"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/buddy/src/status.rs b/fighters/buddy/src/status.rs index 99539d46ce..e53064638f 100644 --- a/fighters/buddy/src/status.rs +++ b/fighters/buddy/src/status.rs @@ -2,299 +2,48 @@ use super::*; use globals::*; // status script import +mod run; +mod special_s; +mod bayonet_end; -pub unsafe extern "C" fn end_run(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::remove_motion_partial(fighter.module_accessor, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, false); - fighter.status_end_Run(); - 0.into() -} - -pub unsafe extern "C" fn buddy_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if (fighter.is_situation(*SITUATION_KIND_GROUND) ) - { - let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); - if feathers_g <= 0 { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); - PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); - return 1.into(); +/// Re-enables the ability to use aerial specials when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)){ + VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); } + return true.into(); } - if (fighter.is_situation(*SITUATION_KIND_AIR) ) - { - - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_AIR), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); +//Called on rebirth and entry +unsafe fn on_rebirth(fighter: &mut L2CFighterCommon,boma: &mut BattleObjectModuleAccessor) { + let entry = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK - | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, - 0 - ); - - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL); - //GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - //GroundModule::set_attach_ground(fighter.module_accessor, false); - if (VarModule::get_float(fighter.battle_object, vars::buddy::instance::FEATHERS_RED_COOLDOWN)>0.0) - { - //fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); - PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); - return 1.into(); - } - else{ - VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); - } - return 0.into(); - } - return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter); -} - -unsafe extern "C" fn buddy_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); - //Bypass if transitioning into Air Fail - if fighter.is_situation(*SITUATION_KIND_AIR) { - if VarModule::get_float(fighter.battle_object, vars::buddy::instance::FEATHERS_RED_COOLDOWN) > 0.0 { - return 1.into(); - } - } - else { - fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_s").into()); - if feathers_g <= 0 { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL); - fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); - } - } - fighter.sub_change_motion_by_situation(Hash40::new("special_s").into(), Hash40::new("special_air_s").into(), false.into()); - fighter.sub_set_ground_correct_by_situation(false.into()); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - fighter.sub_shift_status_main(L2CValue::Ptr(buddy_special_s_main_loop as *const () as _)) + VarModule::off_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); + VarModule::off_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); -} - -unsafe extern "C" fn buddy_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - /* - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 0.into(); - }*/ - - fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_s").into()); - buddy_special_s_armor(fighter); - - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH.into(), false.into()); - return 0.into(); - } - 0.into() -} -unsafe extern "C" fn buddy_special_s_armor(fighter: &mut L2CFighterCommon) { - let needsarmor_on = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - let needsarmor_off = !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - if needsarmor_on { - HitModule::set_total_status_disguise(fighter.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - } - else if needsarmor_off { - HitModule::set_total_status_disguise(fighter.module_accessor, HitStatus(*HIT_STATUS_INVINCIBLE), 0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); - } -} - -pub unsafe extern "C" fn buddy_special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if (fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR)) - { - fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); - return true.into(); - } - else if (fighter.is_situation(*SITUATION_KIND_AIR) ) - { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_AIR), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_AIR as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW |*FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, - 0 - ); - return 0.into(); - } - return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); -} - -unsafe extern "C" fn buddy_special_s_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); - } - //Prevents losing a gold feather - WorkModule::add_int(fighter.module_accessor, 1, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); - - return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); -} - -pub unsafe extern "C" fn buddy_special_s_fail_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if (fighter.is_situation(*SITUATION_KIND_AIR)) - { - if VarModule::is_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED) - { - sv_kinetic_energy!( - clear_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_GRAVITY - ); - VarModule::off_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); - } - } - else if (VarModule::get_int(fighter.battle_object, vars::buddy::instance::BEAKBOMB_FRAME) > 0){ - let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); - KineticModule::clear_speed_all(fighter.module_accessor); - sv_kinetic_energy!( - set_brake, - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - ground_brake, - 0.0 - ); - - } - return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL)(fighter); -} - -/// pre status for bayonet -/// handles initialization -pub unsafe extern "C" fn bayonet_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_GROUND), - *FIGHTER_KINETIC_TYPE_MOTION_BIND, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, - 0 - ); - - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - 0, - 0, - 0, - 0 - ); - - 0.into() -} - -/// main status loop for bayonet_end -unsafe extern "C" fn bayonet_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - // exit if the animation is not done yet - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - - // if the animation is over, transition to shoot - fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); - 1.into() -} - -pub unsafe extern "C" fn bayonet_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { - // change summon anim depending on LR - let frame = 26.0; - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_shoot_start"), frame, 1.0, false, 0.0, false, false); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("special_n_start"), false, frame); + VarModule::set_int(boma.object(), vars::buddy::instance::HUD_DISPLAY_TIME,60); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_FRAME,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE,0); + VarModule::set_int(boma.object(), vars::buddy::instance::BAYONET_EGGS,0); + BAYONET_EGGS[entry]=0; - fighter.main_shift(bayonet_end_main_loop) + VarModule::set_float(boma.object(), vars::buddy::instance::FEATHERS_RED_COOLDOWN,0.0); + VarModule::set_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE,0.0); } -pub unsafe extern "C" fn bayonet_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { - // re-enable energies and remove the screenwide effect - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let next_status = StatusModule::status_kind_next(fighter.module_accessor); - let is_still_blasting = [*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_F,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_B, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_SQUAT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_LANDING, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_AERIAL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR, - *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_FALL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_END].contains(&next_status); - - if !is_still_blasting { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, ArticleOperationTarget(0)); - ItemModule::set_change_status_event(fighter.module_accessor, true); - WorkModule::set_int(fighter.module_accessor, 0,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - 0.into() -} - -/// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)){ - VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); - } - return true.into(); + let lua_state = fighter.lua_state_agent; + let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + on_rebirth(fighter, boma); } -extern "C" fn buddy_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } -} +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); -pub fn install() { - smashline::Agent::new("buddy") - .status(End, *FIGHTER_STATUS_KIND_RUN, end_run) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, buddy_special_s_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, buddy_special_s_main) - .status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, buddy_special_s_dash_pre) - .status(Main, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, buddy_special_s_dash_main) - .status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL, buddy_special_s_fail_pre) - .on_start(buddy_init) - .install(); - smashline::Agent::new("buddy") - .status(Pre, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_pre) - .status(Main, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_main) - .status(End, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_end) - .install(); + run::install(agent); + special_s::install(agent); + bayonet_end::install(agent); } \ No newline at end of file diff --git a/fighters/buddy/src/status/bayonet_end.rs b/fighters/buddy/src/status/bayonet_end.rs new file mode 100644 index 0000000000..dcd07c83f1 --- /dev/null +++ b/fighters/buddy/src/status/bayonet_end.rs @@ -0,0 +1,82 @@ +use super::*; + +// BUDDY_BAYONET_END + +/// pre status for bayonet +/// handles initialization +pub unsafe extern "C" fn bayonet_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_GROUND), + *FIGHTER_KINETIC_TYPE_MOTION_BIND, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, + 0 + ); + + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + 0, + 0, + 0, + 0 + ); + + 0.into() +} + +/// main status loop for bayonet_end +unsafe extern "C" fn bayonet_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + // exit if the animation is not done yet + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + + // if the animation is over, transition to shoot + fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); + 1.into() +} + +pub unsafe extern "C" fn bayonet_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + // change summon anim depending on LR + let frame = 26.0; + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_shoot_start"), frame, 1.0, false, 0.0, false, false); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, Hash40::new("special_n_start"), false, frame); + + fighter.main_shift(bayonet_end_main_loop) +} + +pub unsafe extern "C" fn bayonet_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { + // re-enable energies and remove the screenwide effect + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + let next_status = StatusModule::status_kind_next(fighter.module_accessor); + let is_still_blasting = [*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_F,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_WALK_B, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_SQUAT,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_LANDING, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_JUMP_AERIAL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR, + *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_FALL,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_AIR_TURN,*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_N_SHOOT_END].contains(&next_status); + + if !is_still_blasting { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_BUDDY_GENERATE_ARTICLE_PARTNER, ArticleOperationTarget(0)); + ItemModule::set_change_status_event(fighter.module_accessor, true); + WorkModule::set_int(fighter.module_accessor, 0,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_N_BAKYUN_BULLET_SHOOT_COUNT); + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_pre); + agent.status(Main, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_main); + agent.status(End, statuses::buddy::BUDDY_BAYONET_END, bayonet_end_end); +} \ No newline at end of file diff --git a/fighters/buddy/src/status/run.rs b/fighters/buddy/src/status/run.rs new file mode 100644 index 0000000000..08c447aeb7 --- /dev/null +++ b/fighters/buddy/src/status/run.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_STATUS_KIND_RUN + +pub unsafe extern "C" fn run_end(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::remove_motion_partial(fighter.module_accessor, *FIGHTER_MOTION_PART_SET_KIND_UPPER_BODY, false); + fighter.status_end_Run(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_RUN, run_end); +} \ No newline at end of file diff --git a/fighters/buddy/src/status/special_s.rs b/fighters/buddy/src/status/special_s.rs new file mode 100644 index 0000000000..d789d4c7e4 --- /dev/null +++ b/fighters/buddy/src/status/special_s.rs @@ -0,0 +1,203 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if (fighter.is_situation(*SITUATION_KIND_GROUND) ) { + let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); + if feathers_g <= 0 { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); + PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); + return 1.into(); + } + } + + if (fighter.is_situation(*SITUATION_KIND_AIR) ) + { + + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_AIR), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK + | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, + 0 + ); + + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL); + //GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + //GroundModule::set_attach_ground(fighter.module_accessor, false); + if (VarModule::get_float(fighter.battle_object, vars::buddy::instance::FEATHERS_RED_COOLDOWN)>0.0) + { + //fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL); + PLAY_SE(fighter, Hash40::new("se_buddy_special_s04_02")); + return 1.into(); + } + else{ + VarModule::on_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); + } + return 0.into(); + } + return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter); +} + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let feathers_g = WorkModule::get_int(fighter.module_accessor,*FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); + //Bypass if transitioning into Air Fail + if fighter.is_situation(*SITUATION_KIND_AIR) { + if VarModule::get_float(fighter.battle_object, vars::buddy::instance::FEATHERS_RED_COOLDOWN) > 0.0 { + return 1.into(); + } + } + else { + fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_s").into()); + if feathers_g <= 0 { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL); + fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); + } + } + fighter.sub_change_motion_by_situation(Hash40::new("special_s").into(), Hash40::new("special_air_s").into(), false.into()); + fighter.sub_set_ground_correct_by_situation(false.into()); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) + +} + +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + /* + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 0.into(); + }*/ + + fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_s").into()); + special_s_armor(fighter); + + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH.into(), false.into()); + return 0.into(); + } + 0.into() +} + +unsafe extern "C" fn special_s_armor(fighter: &mut L2CFighterCommon) { + let needsarmor_on = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); + let needsarmor_off = !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR) && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); + if needsarmor_on { + HitModule::set_total_status_disguise(fighter.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); + } + else if needsarmor_off { + HitModule::set_total_status_disguise(fighter.module_accessor, HitStatus(*HIT_STATUS_INVINCIBLE), 0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_SUPER_ARMOR_EQUIP); + } +} + +// FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH + +pub unsafe extern "C" fn special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if (fighter.is_situation(*SITUATION_KIND_GROUND) && fighter.is_prev_situation(*SITUATION_KIND_AIR)) + { + fighter.change_status(FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL.into(), false.into()); + return true.into(); + } + else if (fighter.is_situation(*SITUATION_KIND_AIR) ) + { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_AIR), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_AIR as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW |*FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, + 0 + ); + return 0.into(); + } + return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); +} + +unsafe extern "C" fn special_s_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); + } + //Prevents losing a gold feather + WorkModule::add_int(fighter.module_accessor, 1, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_SPECIAL_S_REMAIN); + + return smashline::original_status(Main, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH)(fighter); +} + +// FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL + +pub unsafe extern "C" fn special_s_fail_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if (fighter.is_situation(*SITUATION_KIND_AIR)) + { + if VarModule::is_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED) + { + sv_kinetic_energy!( + clear_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_GRAVITY + ); + VarModule::off_flag(fighter.battle_object, vars::buddy::instance::FLUTTER_ENABLED); + } + } + else if (VarModule::get_int(fighter.battle_object, vars::buddy::instance::BEAKBOMB_FRAME) > 0){ + let ground_brake = sv_fighter_util::get_default_fighter_param_ground_brake(fighter.lua_state_agent); + KineticModule::clear_speed_all(fighter.module_accessor); + sv_kinetic_energy!( + set_brake, + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + ground_brake, + 0.0 + ); + + } + return smashline::original_status(Pre, fighter, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + + agent.status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_pre); + agent.status(Main, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_main); + + agent.status(Pre, *FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_FAIL, special_s_fail_pre); +} \ No newline at end of file diff --git a/fighters/daisy/src/lib.rs b/fighters/daisy/src/lib.rs index ed41c0dd19..e41bace68c 100644 --- a/fighters/daisy/src/lib.rs +++ b/fighters/daisy/src/lib.rs @@ -37,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("daisy"); diff --git a/fighters/purin/src/lib.rs b/fighters/purin/src/lib.rs index 62a06f606f..8be0587bcd 100644 --- a/fighters/purin/src/lib.rs +++ b/fighters/purin/src/lib.rs @@ -37,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("purin"); From e834b5c7ce43a81b06ff829545be0a00eea43324 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 11:15:58 -0500 Subject: [PATCH 055/172] hor hor horhor hor --- fighters/buddy/src/acmd/throws.rs | 2 +- fighters/buddy/src/lib.rs | 2 ++ fighters/buddy/src/opff.rs | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fighters/buddy/src/acmd/throws.rs b/fighters/buddy/src/acmd/throws.rs index e2fcceaceb..aa48320fd6 100644 --- a/fighters/buddy/src/acmd/throws.rs +++ b/fighters/buddy/src/acmd/throws.rs @@ -214,7 +214,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_throwhi", game_throwhi); - agent.acmd("game_throwlw", buddy_throw_lw_game); + agent.acmd("game_throwlw", game_throwlw); agent.acmd("effect_throwlw", effect_throwlw); agent.acmd("sound_throwlw", sound_throwlw); } diff --git a/fighters/buddy/src/lib.rs b/fighters/buddy/src/lib.rs index e40b3778af..ede6b45794 100644 --- a/fighters/buddy/src/lib.rs +++ b/fighters/buddy/src/lib.rs @@ -44,6 +44,8 @@ use utils::{ use smashline::*; #[macro_use] extern crate smash_script; +static mut BAYONET_EGGS:[i32;8] = [0; 8]; //I have no idea why varmod doesn't work with this, so this will have to do + pub fn install() { let agent = &mut Agent::new("buddy"); acmd::install(agent); diff --git a/fighters/buddy/src/opff.rs b/fighters/buddy/src/opff.rs index f9f6318a6e..82537afbf4 100644 --- a/fighters/buddy/src/opff.rs +++ b/fighters/buddy/src/opff.rs @@ -5,8 +5,6 @@ const HUD_DISPLAY_TIME_MAX: i32 = 90; const FEATHERS_RED_COOLDOWN_GROUND_RATE: f32 = 1.25; const FEATHERS_RED_COOLDOWN_MAX: f32 = 450.0; const BEAKBOMB_END_FRAME: i32 = 25; //Dash timer is shared between ground and air in vl.prc - -static mut BAYONET_EGGS:[i32;8] = [0; 8]; //I have no idea why varmod doesn't work with this, so this will have to do utils::import_noreturn!(common::opff::fighter_common_opff); From 34dc50991436c3aa7e50294a0366b238015e93ed Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 12:07:09 -0500 Subject: [PATCH 056/172] konkney gong --- fighters/donkey/src/acmd/aerials.rs | 268 ++++---- fighters/donkey/src/acmd/ground.rs | 171 ++--- fighters/donkey/src/acmd/mod.rs | 16 +- fighters/donkey/src/acmd/other.rs | 245 +++---- fighters/donkey/src/acmd/smashes.rs | 100 ++- fighters/donkey/src/acmd/specials.rs | 642 +++++++++--------- fighters/donkey/src/acmd/throws.rs | 355 +++++----- fighters/donkey/src/acmd/tilts.rs | 240 +++---- fighters/donkey/src/lib.rs | 11 +- fighters/donkey/src/opff.rs | 7 +- fighters/donkey/src/status.rs | 28 +- fighters/donkey/src/status/catch_pull.rs | 6 +- .../donkey/src/status/item_throw_heavy.rs | 6 +- fighters/donkey/src/status/shoulder.rs | 10 +- fighters/donkey/src/status/special_hi.rs | 8 +- fighters/donkey/src/status/special_lw.rs | 6 +- fighters/donkey/src/status/super_lift.rs | 13 +- 17 files changed, 981 insertions(+), 1151 deletions(-) diff --git a/fighters/donkey/src/acmd/aerials.rs b/fighters/donkey/src/acmd/aerials.rs index eae17a7c0b..96dccf44d7 100644 --- a/fighters/donkey/src/acmd/aerials.rs +++ b/fighters/donkey/src/acmd/aerials.rs @@ -1,247 +1,241 @@ - use super::*; -unsafe extern "C" fn attack_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 25, 8.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handl"), 12.0, 361, 100, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 25, 8.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 50, 100, 0, 10, 7.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handl"), 9.0, 50, 100, 0, 10, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 50, 100, 0, 10, 7.0, 1.6, 3.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn attack_air_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } - frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("handr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 18.0, 361, 89, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("handr"), 17.0, 270, 100, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 17.0, 270, 100, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("handl"), 15.0, 270, 55, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 15.0, 270, 55, 0, 30, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 13.0, 361, 104, 0, 20, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 361, 104, 0, 20, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 361, 104, 0, 20, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 13.0, 361, 104, 0, 20, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 361, 104, 0, 20, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 361, 104, 0, 20, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 8.0, 361, 100, 0, 10, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 10, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 361, 100, 0, 10, 7.0, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 10, 5.0, -1.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 100, 0, 10, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn donkey_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc_c"), Hash40::new("donkey_attack_arc_c"), Hash40::new("top"), 0.0, 9, -1.0 /*left-right */, -155.5, -125, 57, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter, 2.0); - } } -unsafe extern "C" fn donkey_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state,6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter,Hash40::new("donkey_attack_line"), Hash40::new("donkey_attack_line"), Hash40::new("top"), 0, 8, 8, 180, 0, 0, 1.5, true, *EF_FLIP_YZ) + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent,Hash40::new("donkey_attack_line"), Hash40::new("donkey_attack_line"), Hash40::new("top"), 0, 8, 8, 180, 0, 0, 1.5, true, *EF_FLIP_YZ) } frame(lua_state,7.0); - if is_excute(fighter) { - EFFECT(fighter,Hash40::new("sys_attack_impact"), Hash40::new("top"), -2.5, 9, -18, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent,Hash40::new("sys_attack_impact"), Hash40::new("top"), -2.5, 9, -18, 0, 0, 0, 1.8, 0, 0, 0, 0, 0, 360, true); } - } -unsafe extern "C" fn attack_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - //HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + //HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("head"), 12.0, 90, 86, 0, 54, 7.25, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("head"), 12.0, 90, 86, 0, 54, 7.25, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc_c"), Hash40::new("donkey_attack_arc_c"), Hash40::new("top"), 0.0, 9, -1.0 /*left-right */, -155.5, -125, 57, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent, 2.0); + } +} + +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn attack_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.15); + FT_MOTION_RATE(agent, 1.15); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 270, 90, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 13.0, 270, 90, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 270, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 270, 90, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 13.0, 270, 90, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 270, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 16.0, 270, 49, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 13.0, 270, 62, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 13.0, 270, 62, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 16.0, 270, 49, 0, 30, 7.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legl"), 13.0, 270, 62, 0, 20, 5.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 13.0, 270, 62, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn donkey_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 2, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 2, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_smash_line"), Hash40::new("donkey_smash_line"), Hash40::new("top"), -2, 19, -3.5, 83, 0, 0, 1.1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_smash_line"), Hash40::new("donkey_smash_line"), Hash40::new("top"), -2, 19, -3.5, 83, 0, 0, 1.1, true, *EF_FLIP_YZ); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 360, false); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attackairn", attack_air_n) - .acmd("expression_attackairn", attack_air_n_expression) - .acmd("game_attackairf", attack_air_f) - .acmd("game_attackairb", attack_air_b) - .acmd("effect_attackairhi", donkey_attack_air_hi_effect) - .acmd("effect_attackairb", donkey_attack_air_b_effect) - .acmd("game_attackairhi", attack_air_hi) - .acmd("expression_attackairhi", attack_air_hi_expression) - .acmd("game_attackairlw", attack_air_lw) - .acmd("effect_attackairlw", donkey_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/donkey/src/acmd/ground.rs b/fighters/donkey/src/acmd/ground.rs index e5710bcbf4..c324c3a334 100644 --- a/fighters/donkey/src/acmd/ground.rs +++ b/fighters/donkey/src/acmd/ground.rs @@ -1,143 +1,122 @@ - use super::*; -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 6.0, 0.0, 11.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 4.5, 0.0, 10.5, 11.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 120, 25, 0, 35, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 25, 3.0, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(12.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 4.0, 361, 30, 0, 25, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 6.0, 0.0, 11.5, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 80, 25, 0, 35, 4.5, 0.0, 10.5, 11.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 120, 25, 0, 35, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 25, 3.0, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(12.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl"), 4.0, 361, 30, 0, 25, 5.0, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn attack_12_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } -} - -unsafe extern "C" fn attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8 ); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.3 ); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 80); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 8.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_REACTION_VALUE, 80); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 8.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 65, 73, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 8.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 8.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); sv_kinetic_energy!( set_speed_mul, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8 ); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_DRIFT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 0.5); } } -unsafe extern "C" fn attack_dash_eff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn attack_dash_snd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_donkey_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_donkey_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_donkey_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_donkey_attackdash")); } } -unsafe extern "C" fn attack_dash_exp(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_TOP, 4, true); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_erase"), @@ -147,7 +126,7 @@ unsafe extern "C" fn attack_dash_exp(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitl"), @@ -157,27 +136,25 @@ unsafe extern "C" fn attack_dash_exp(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 41.0); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE_INTP, SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attack11", attack_11) - .acmd("expression_attack12", attack_12_exp) - .acmd("game_dash", dash) - .acmd("game_attackdash", attack_dash) - .acmd("game_attackairdash", attack_dash) - .acmd("effect_attackdash", attack_dash_eff) - .acmd("effect_attackairdash", attack_dash_eff) - .acmd("sound_attackdash", attack_dash_snd) - .acmd("sound_attackairdash", attack_dash_snd) - .acmd("expression_attackdash", attack_dash_exp) - .acmd("expression_attackairdash", attack_dash_exp) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attackairdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("effect_attackairdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("sound_attackairdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); + agent.acmd("expression_attackairdash", expression_attackdash); } diff --git a/fighters/donkey/src/acmd/mod.rs b/fighters/donkey/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/donkey/src/acmd/mod.rs +++ b/fighters/donkey/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/donkey/src/acmd/other.rs b/fighters/donkey/src/acmd/other.rs index cc30fbb31f..086ccf683d 100644 --- a/fighters/donkey/src/acmd/other.rs +++ b/fighters/donkey/src/acmd/other.rs @@ -1,226 +1,169 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); - } + } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} - } +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + } + frame(lua_state, 8.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02"));} + frame(lua_state, 16.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - } - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_donkey_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_donkey_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_donkey_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_donkey_step_left_m")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_donkey_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_donkey_step_right_m")); } } -unsafe extern "C" fn dk_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn expression_superliftlanding(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_S); +unsafe extern "C" fn expression_superliftlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn expression_shoulderlanding(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_shoulderlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - //QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + //QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_landl_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("expression_landingheavy", expression_landingheavy) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", dk_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("expression_superliftlanding", expression_superliftlanding) - .acmd("expression_shoulderlanding", expression_shoulderlanding) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("expression_landingheavy", expression_landingheavy); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("expression_superliftlanding", expression_superliftlanding); + agent.acmd("expression_shoulderlanding", expression_shoulderlanding); } diff --git a/fighters/donkey/src/acmd/smashes.rs b/fighters/donkey/src/acmd/smashes.rs index f82697e0a0..b525c9fcc9 100644 --- a/fighters/donkey/src/acmd/smashes.rs +++ b/fighters/donkey/src/acmd/smashes.rs @@ -1,97 +1,93 @@ - use super::*; -unsafe extern "C" fn attack_s4_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 22.0, 46, 95, 0, 21, 5.7, 0.0, 6.4, 24.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 361, 93, 0, 18, 3.7, 0.0, 6.4, 18.0, Some(0.0), Some(6.4), Some(10.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 22.0, 46, 95, 0, 21, 5.7, 0.0, 6.4, 24.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 361, 93, 0, 18, 3.7, 0.0, 6.4, 18.0, Some(0.0), Some(6.4), Some(10.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_hi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 8.8, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 7.0, 0.0, 18.0, 5.0, Some(0.0), Some(18.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 8.8, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 90, 89, 0, 40, 7.0, 0.0, 18.0, 5.0, Some(0.0), Some(18.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_lw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 70, 93, 0, 35, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 82, 93, 0, 35, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 55, 93, 0, 30, 5.0, 0.0, 5.5, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 14.0, 98, 93, 0, 35, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attacks4", attack_s4_s) - .acmd("game_attackhi4", attack_hi4) - .acmd("game_attacklw4", attack_lw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/donkey/src/acmd/specials.rs b/fighters/donkey/src/acmd/specials.rs index 9c2086afba..41fb5af1db 100644 --- a/fighters/donkey/src/acmd/specials.rs +++ b/fighters/donkey/src/acmd/specials.rs @@ -1,532 +1,518 @@ use super::*; -unsafe extern "C" fn special_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); // Kirby if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 70, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 361, 80, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 361, 80, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_n_max(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); WorkModule::set_int(boma, 3, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_IGNORE_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 28.0, 361, 80, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 28.0, 361, 80, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_air_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); // Kirby if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 65, 0, 30, 9.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 361, 75, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 361, 75, 0, 30, 6.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::add_power(boma, 0, WorkModule::get_int(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_POWER_ADD) as f32, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_air_n_max(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.25); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.25); WorkModule::set_int(boma, 3, *FIGHTER_DONKEY_STATUS_SPECIAL_N_WORK_INT_IGNORE_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 25.0, 70, 70, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 25.0, 70, 65, 0, 30, 6.0, -6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 28.0, 361, 75, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 25.0, 70, 70, 0, 30, 6.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 28.0, 361, 75, 0, 30, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_s_common(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_S_FLAG_FALL_START); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 270, 50, 0, 40, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 270, 50, 0, 40, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 300, 41, 0, 45, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 300, 41, 0, 45, 9.0, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 300, 41, 0, 45, 6.5, 0.0, 5.0, 10.5, Some(0.0), Some(5.0), Some(1.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 300, 41, 0, 45, 9.0, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_headbat_line"), Hash40::new("top"), 0, 12, -3, 0, -75, -85, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_headbat_line"), Hash40::new("top"), 0, 12, -3, 0, -75, -85, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 1.5, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 1.5, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_headbat"), Hash40::new("top"), 0, 0, 6, 5, 0, 0, 0.70, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_headbat"), Hash40::new("top"), 0, 0, 6, 5, 0, 0, 0.70, true); } } -unsafe extern "C" fn special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.33); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.33); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 90, 0, 60, 5.0, 0.0, 10.5, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); + HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 90, 0, 60, 5.0, 0.0, 10.5, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } - frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_whole(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 19.0); - // looping decreasingly effective multihits let mut damage = 6.0; for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), damage + 1.0, 361, 80, 0, 30, 8.0, 0.0, 11.0, 15.0, Some(0.0), Some(11.0), Some(-6.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), damage + 1.0, 361, 80, 0, 30, 8.0, 0.0, 11.0, 15.0, Some(0.0), Some(11.0), Some(-6.0), 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); damage = damage * 0.5; } wait(lua_state, 5.0); } - frame(lua_state, 62.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_YACL_DEFAULT); WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_GROUND_SPINEND); //old finisher - //ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 85, 0, 75, 8.0, 0.0, 11.0, 20.0, Some(0.0), Some(11.0), Some(-4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + //ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 85, 0, 75, 8.0, 0.0, 11.0, 20.0, Some(0.0), Some(11.0), Some(-4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); } - } -unsafe extern "C" fn special_lw_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 14.0); + for _ in 0..5 { + if is_excute(agent) { + let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(agent.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 14, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); + } + wait(lua_state, 4.0); + if is_excute(agent) { + let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(agent.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_XY); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 11, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); + } + wait(lua_state, 4.0); + } + frame(lua_state, 63.0); + if is_excute(agent) { + //LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 80.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_spin_wind_flash"), Hash40::new("donkey_spin_wind_flash"), Hash40::new("top"), -3.5, 17, 15.5, 0, 0, 60, 1.3, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn special_lw_loop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.6); - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - wait(lua_state, 1.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 19.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - wait(lua_state, 3.0); - if !ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - MotionModule::set_frame(boma, MotionModule::frame(boma) + 15.0, true); - } else { - wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - //ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.6); - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } + frame(lua_state, 23.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.50); + frame(lua_state, 30.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 5.5, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 7.0, 0.0, 4.0, 13.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + frame(lua_state, 38.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 24.0); - if is_excute(fighter) { - grab!(fighter, MA_MSC_CMD_GRAB_CLEAR_ALL); + frame(lua_state, 47.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn sound_special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_donkey_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_donkey_attackdash")); + frame(lua_state, 53.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } -} - -unsafe extern "C" fn effect_special_air_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 5, 16, 9, 0, 0, 0, 0.8, true); + frame(lua_state, 60.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, -27, 0, 180, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, 27, 0, 0, 1.4, true); + frame(lua_state, 62.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 81.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn game_special_air_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_GROUND_MOT_FRAME); } frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 40, 8.0, 0.0, 11.0, -8.0, Some(0.0), Some(11.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 40, 8.0, 0.0, 11.0, -8.0, Some(0.0), Some(11.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - HitModule::set_whole(fighter.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } wait(lua_state, 8.0); // loop increasingly weak multihits let mut damage = 8.0; for _ in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage + 1.0, 361, 80, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { damage = damage * 0.75; WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_CLIFF_CHECK); AttackModule::clear_all(boma); } } frame(lua_state, 68.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_DONKEY_STATUS_SPECIAL_HI_FLAG_YACL_DEFAULT); // set on 68 in vanilla (this is frame 72 rn) - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } } -unsafe extern "C" fn effect_special_lw_loop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); - //LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); - //LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } } -unsafe extern "C" fn effect_special_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 14.0); - for _ in 0..5 { - if is_excute(fighter) { - let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(fighter.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 14, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - let movement_lean = PostureModule::lr(boma) * 15.0 * KineticModule::get_sum_speed_x(fighter.boma(), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_XY); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind"), Hash40::new("donkey_spin_wind"), Hash40::new("top"), 5, 11, 3, /* rotate along z axis */ movement_lean, 6, /* rotate along left-right axis */ 20, 2, true, *EF_FLIP_YZ); - } - wait(lua_state, 4.0); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - //LAST_EFFECT_SET_RATE(fighter, 0.8); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 19.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 5.5, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 7.0, 0.0, 4.0, 13.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } - frame(lua_state, 80.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_XY); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_spin_wind_flash"), Hash40::new("donkey_spin_wind_flash"), Hash40::new("top"), -3.5, 17, 15.5, 0, 0, 60, 1.3, true, *EF_FLIP_YZ); + frame(lua_state, 24.0); + if is_excute(agent) { + grab!(agent, MA_MSC_CMD_GRAB_CLEAR_ALL); } } -unsafe extern "C" fn expression_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flash"), Hash40::new("top"), 5, 16, 9, 0, 0, 0, 0.8, true); } - - frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, -27, 0, 180, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("donkey_attack_arc"), Hash40::new("top"), -1, 10, 5, 27, 0, 0, 1.4, true); } +} - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - } +unsafe extern "C" fn sound_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_donkey_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_donkey_attackdash")); } - frame(lua_state, 23.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); +} + +unsafe extern "C" fn game_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } - frame(lua_state, 30.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.6); + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); } - frame(lua_state, 38.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); } - frame(lua_state, 47.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } - frame(lua_state, 53.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 3.0); + if !ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + MotionModule::set_frame(boma, MotionModule::frame(boma) + 15.0, true); + } else { + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(20.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 84, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + //ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 78, 30, 0, 90, 10.3, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.6); + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_DONKEY_STATUS_SPECIAL_LW_FLAG_ATTACK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } } - frame(lua_state, 60.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + wait(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.50); } - frame(lua_state, 62.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); +} + +unsafe extern "C" fn effect_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(agent.lua_state_agent, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); + //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } - frame(lua_state, 81.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + frame(agent.lua_state_agent, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); + //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_specialn", special_n) - .acmd("game_specialnmax", special_n_max) - .acmd("game_specialairn", special_air_n) - .acmd("game_specialairnmax", special_air_n_max) - .acmd("game_specials", special_s_common) - .acmd("game_specialairs", special_s_common) - .acmd("effect_specials", special_s_effect) - .acmd("effect_specialairs", special_s_effect) - .acmd("game_specialhi", special_hi) - .acmd("game_speciallwstart", special_lw_start) - .acmd("game_speciallwloop", special_lw_loop) - .acmd("game_specialairlw", special_air_lw) - .acmd("sound_specialairlw", sound_special_air_lw) - .acmd("effect_specialairlw", effect_special_air_lw) - .acmd("game_specialairhi", game_special_air_hi) - .acmd("effect_speciallwloop", effect_special_lw_loop) - .acmd("effect_specialhi", effect_special_hi) - .acmd("expression_specialhi", expression_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialnmax", game_specialnmax); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialairnmax", game_specialairnmax); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("sound_specialairlw", sound_specialairlw); + agent.acmd("game_speciallwloop", game_speciallwloop); + agent.acmd("effect_speciallwloop", effect_speciallwloop); } diff --git a/fighters/donkey/src/acmd/throws.rs b/fighters/donkey/src/acmd/throws.rs index 1b1799579f..0fad5f0652 100644 --- a/fighters/donkey/src/acmd/throws.rs +++ b/fighters/donkey/src/acmd/throws.rs @@ -1,282 +1,277 @@ - use super::*; -unsafe extern "C" fn catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(14.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(14.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn catch_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 3.4, Some(0.0), Some(7.0), Some(18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 3.4, Some(0.0), Some(7.0), Some(18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn catch_turn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-21.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(-21.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn game_throwff(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 53, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 53, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 38, 19); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 38, 19); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{x:-5.0, y: 8.0, z: 24.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwfb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 52, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwfb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 60, 52, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 26, 14); + CHECK_FINISH_CAMERA(agent, 26, 14); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let release_position = Vector3f{ x:5.0, y: 9.0, z: -12.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn game_throwfhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwfhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 36.0, 39.0 + 18.0 * (weight / 100.0 - 1.0)); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 36.0, 39.0 + 18.0 * (weight / 100.0 - 1.0)); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 31); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 31); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 16.0, z: 0.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwflw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 46, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwflw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 46, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 30, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_STOP); - CHECK_FINISH_CAMERA(fighter, 4, 2); + CHECK_FINISH_CAMERA(agent, 4, 2); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - SET_SPEED_EX(fighter, 0.0, 1.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + SET_SPEED_EX(agent, 0.0, 1.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - } -unsafe extern "C" fn heavy_item_throw_f(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::set_flag(fighter.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS, boma.stick_x().abs() < 0.33); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - } - - let is_neutral_toss = VarModule::is_flag(fighter.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS); - let toss_frame = match is_neutral_toss { - true => 16.0, - false => 17.0 - }; - frame(lua_state, toss_frame); - if is_excute(fighter) { - ItemModule::throw_item(boma, 45.0, 3.0, 1.0, 0, true, 0.0); - FT_MOTION_RATE(fighter, 1.0); - } +unsafe extern "C" fn game_itemheavythrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + VarModule::set_flag(agent.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS, boma.stick_x().abs() < 0.33); + } + frame(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); + } + let is_neutral_toss = VarModule::is_flag(agent.object(), consts::vars::donkey::status::IS_NEUTRAL_TOSS); + let toss_frame = match is_neutral_toss { + true => 16.0, + false => 17.0 + }; + frame(lua_state, toss_frame); + if is_excute(agent) { + ItemModule::throw_item(boma, 45.0, 3.0, 1.0, 0, true, 0.0); + FT_MOTION_RATE(agent, 1.0); + } } -unsafe extern "C" fn heavy_item_throw_b(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 19.5); - if is_excute(fighter) { - // the exact *real* frame we are on needs to stay a whole - // number in order for the barrel (or other item) to be - // released at an appropriate location. - ItemModule::throw_item(boma, 135.0, 4.0, 1.0, 0, true, 0.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); - } +unsafe extern "C" fn game_itemheavythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); + } + frame(lua_state, 19.5); + if is_excute(agent) { + // the exact *real* frame we are on needs to stay a whole + // number in order for the barrel (or other item) to be + // released at an appropriate location. + ItemModule::throw_item(boma, 135.0, 4.0, 1.0, 0, true, 0.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); + } } -unsafe extern "C" fn game_itemheavythrowlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_itemheavythrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 13.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ItemModule::throw_item(boma, 270.0, 4.0, 1.0, 0, true, 0.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - let main_speed_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let stick_add_x = fighter.stick_x() * 0.5; + if is_excute(agent) { + let main_speed_x = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let stick_add_x = agent.stick_x() * 0.5; // change to kinetic type fall and change to air situation - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - GroundModule::set_correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::unable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + GroundModule::set_correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(agent.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); let kinetic = *FIGHTER_KINETIC_TYPE_FALL; - KineticModule::change_kinetic(fighter.module_accessor, kinetic); + KineticModule::change_kinetic(agent.module_accessor, kinetic); // pop up into the air - SET_SPEED_EX(fighter, (main_speed_x + stick_add_x) * PostureModule::lr(fighter.module_accessor), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, (main_speed_x + stick_add_x) * PostureModule::lr(agent.module_accessor), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } // when we reach the cancel frame, transition into fall instead - let motion_kind = Hash40::new_raw(MotionModule::motion_kind(fighter.module_accessor)); - let cancel_frame = FighterMotionModuleImpl::get_cancel_frame( - boma, motion_kind, true); + let motion_kind = Hash40::new_raw(MotionModule::motion_kind(agent.module_accessor)); + let cancel_frame = FighterMotionModuleImpl::get_cancel_frame(boma, motion_kind, true); frame(lua_state, cancel_frame); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); } } } -unsafe extern "C" fn effect_heavyitemthrowlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_heavyitemthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), -2, 16, -1, -5, -33, -102, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), -2, 16, -1, -5, -33, -102, 1.2, true, *EF_FLIP_YZ); } } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_catch", catch) - .acmd("game_catchdash", catch_dash) - .acmd("game_catchturn", catch_turn) - .acmd("game_throwff", game_throwff) - .acmd("game_throwfb", game_throwfb) - .acmd("game_throwfhi", game_throwfhi) - .acmd("game_throwflw", game_throwflw) - .acmd("game_itemheavythrowf", heavy_item_throw_f) - .acmd("game_itemheavythrowb", heavy_item_throw_b) - .acmd("game_itemheavythrowlw", game_itemheavythrowlw) - .acmd("game_itemheavythrowlw4", game_itemheavythrowlw) - .acmd("effect_itemheavythrowlw", effect_heavyitemthrowlw) - .acmd("effect_itemheavythrowlw4", effect_heavyitemthrowlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwff", game_throwff); + + agent.acmd("game_throwfb", game_throwfb); + + agent.acmd("game_throwfhi", game_throwfhi); + + agent.acmd("game_throwflw", game_throwflw); + + agent.acmd("game_itemheavythrowf", game_itemheavythrowf); + + agent.acmd("game_itemheavythrowb", game_itemheavythrowb); + + agent.acmd("game_itemheavythrowlw", game_itemheavythrowlw); + agent.acmd("game_itemheavythrowlw4", game_itemheavythrowlw); + agent.acmd("effect_itemheavythrowlw", effect_heavyitemthrowlw); + agent.acmd("effect_itemheavythrowlw4", effect_heavyitemthrowlw); } diff --git a/fighters/donkey/src/acmd/tilts.rs b/fighters/donkey/src/acmd/tilts.rs index abd8e6da9f..ccf2d501f7 100644 --- a/fighters/donkey/src/acmd/tilts.rs +++ b/fighters/donkey/src/acmd/tilts.rs @@ -1,209 +1,171 @@ - use super::*; -unsafe extern "C" fn attack_s3_hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.910); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.5, 6.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 78, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_s3_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn attack_s3_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.910); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.5, 6.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 361, 78, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 78, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - -} - -unsafe extern "C" fn attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } } -unsafe extern "C" fn attack_s3_lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.910); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.910); } frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.5, 10.0, 0.0, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 361, 78, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 361, 78, 0, 50, 6.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.15, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 3, 9, 1.5, 2.5, -42, 15, 1.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 3, 9, 1.5, 2.5, -42, 15, 1.9, true, *EF_FLIP_YZ); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn attack_s3_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn attack_hi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 9.0, 110, 105, 0, 70, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 110, 110, 0, 70, 4.0, 3.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 110, 115, 0, 70, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 9.0, 110, 105, 0, 70, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 110, 110, 0, 70, 4.0, 3.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 110, 115, 0, 70, 4.8, 2.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 0, 12.5, -3, -138, 80, -54, 1.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.9); - } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter, 5.0); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 0, 12.5, -3, -138, 80, -54, 1.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.9); + } + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent, 5.0); } } -unsafe extern "C" fn attack_lw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - //HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - //HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + if is_excute(agent) { + //HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + //HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 4.4, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 5.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 40, 95, 0, 25, 4.4, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 4.4, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 40, 95, 0, 25, 5.5, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -pub fn install() { - smashline::Agent::new("donkey") - .acmd("game_attacks3hi", attack_s3_hi) - .acmd("expression_attacks3hi", attack_s3_hi_expression) - .acmd("game_attacks3", attack_s3_s) - .acmd("expression_attacks3", attack_s3_s_expression) - .acmd("game_attacks3lw", attack_s3_lw) - .acmd("effect_attacks3lw", attack_s3_lw_effect) - .acmd("expression_attacks3lw", attack_s3_lw_expression) - .acmd("game_attackhi3", attack_hi3) - .acmd("effect_attackhi3", attack_hi3_effect) - .acmd("game_attacklw3", attack_lw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/donkey/src/lib.rs b/fighters/donkey/src/lib.rs index 8e2ddcc726..248375e7f6 100644 --- a/fighters/donkey/src/lib.rs +++ b/fighters/donkey/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("donkey"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/donkey/src/opff.rs b/fighters/donkey/src/opff.rs index 09e3d7b153..a597c6605a 100644 --- a/fighters/donkey/src/opff.rs +++ b/fighters/donkey/src/opff.rs @@ -195,8 +195,7 @@ pub unsafe fn donkey_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("donkey") - .on_line(Main, donkey_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, donkey_frame_wrapper); } diff --git a/fighters/donkey/src/status.rs b/fighters/donkey/src/status.rs index a2e643542b..2170fbd448 100644 --- a/fighters/donkey/src/status.rs +++ b/fighters/donkey/src/status.rs @@ -56,24 +56,18 @@ unsafe extern "C" fn status_change(fighter: &mut L2CFighterCommon) -> L2CValue { // setting the callback for shield to be used for b in shield -extern "C" fn donkey_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) == *FIGHTER_KIND_DONKEY { - //fighter.global_table[0x34].assign(&L2CValue::Ptr(when_shield as *const () as _)); - fighter.global_table[STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(status_change as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + //fighter.global_table[0x34].assign(&L2CValue::Ptr(when_shield as *const () as _)); + fighter.global_table[STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(status_change as *const () as _)); } -pub fn install() { - item_throw_heavy::install(); - special_hi::install(); - special_lw::install(); - catch_pull::install(); - shoulder::install(); - super_lift::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); - smashline::Agent::new("donkey") - .on_start(donkey_init) - .install(); + item_throw_heavy::install(agent); + special_hi::install(agent); + special_lw::install(agent); + catch_pull::install(agent); + shoulder::install(agent); + super_lift::install(agent); } diff --git a/fighters/donkey/src/status/catch_pull.rs b/fighters/donkey/src/status/catch_pull.rs index 363b26234f..f28e908efd 100644 --- a/fighters/donkey/src/status/catch_pull.rs +++ b/fighters/donkey/src/status/catch_pull.rs @@ -72,8 +72,6 @@ unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2C } } -pub fn install() { - smashline::Agent::new("donkey") - .status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main); } diff --git a/fighters/donkey/src/status/item_throw_heavy.rs b/fighters/donkey/src/status/item_throw_heavy.rs index 1182786aba..49eb78d3b3 100644 --- a/fighters/donkey/src/status/item_throw_heavy.rs +++ b/fighters/donkey/src/status/item_throw_heavy.rs @@ -10,8 +10,6 @@ unsafe extern "C" fn heavy_throw_end(fighter: &mut L2CFighterCommon) -> L2CValue return smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY)(fighter); } -pub fn install() { - smashline::Agent::new("donkey") - .status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, heavy_throw_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, heavy_throw_end); } diff --git a/fighters/donkey/src/status/shoulder.rs b/fighters/donkey/src/status/shoulder.rs index 305055142b..6a066bd4b6 100644 --- a/fighters/donkey/src/status/shoulder.rs +++ b/fighters/donkey/src/status/shoulder.rs @@ -29,12 +29,6 @@ unsafe extern "C" fn shoulder_landing_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -pub fn install() { - smashline::Agent::new("donkey") - .status( - Main, - *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING, - shoulder_landing_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING, shoulder_landing_main); } diff --git a/fighters/donkey/src/status/special_hi.rs b/fighters/donkey/src/status/special_hi.rs index ae333cc89c..d0610e4144 100644 --- a/fighters/donkey/src/status/special_hi.rs +++ b/fighters/donkey/src/status/special_hi.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_HI -pub unsafe extern "C" fn exec_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); @@ -15,8 +15,6 @@ pub unsafe extern "C" fn exec_special_hi(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("donkey") - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, exec_special_hi) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); } diff --git a/fighters/donkey/src/status/special_lw.rs b/fighters/donkey/src/status/special_lw.rs index 7a6fd28903..41e978d3e8 100644 --- a/fighters/donkey/src/status/special_lw.rs +++ b/fighters/donkey/src/status/special_lw.rs @@ -112,8 +112,6 @@ unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2C 1.into() } -pub fn install() { - smashline::Agent::new("donkey") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/donkey/src/status/super_lift.rs b/fighters/donkey/src/status/super_lift.rs index 0bb92dd09f..3a8258dbe6 100644 --- a/fighters/donkey/src/status/super_lift.rs +++ b/fighters/donkey/src/status/super_lift.rs @@ -127,13 +127,8 @@ pub unsafe extern "C" fn donkey_frame_wrapper(fighter: &mut smash::lua2cpp::L2CF if status == *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_JUMP_SQUAT_B { super_lift_jump_squat_b(fighter) } } -pub fn install() { - smashline::Agent::new("donkey") - .status( - Main, - *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING, - super_lift_landing_main, - ) - .on_line(Main, donkey_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING, super_lift_landing_main); + + agent.on_line(Main, donkey_frame_wrapper); } From 2c4b73a7bfc18d43f1059152706c5cbf0c86f929 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 12:50:42 -0500 Subject: [PATCH 057/172] falcon --- fighters/captain/src/acmd/aerials.rs | 337 ++++++++-------- fighters/captain/src/acmd/ground.rs | 147 ++++--- fighters/captain/src/acmd/mod.rs | 16 +- fighters/captain/src/acmd/other.rs | 189 +++------ fighters/captain/src/acmd/smashes.rs | 169 ++++---- fighters/captain/src/acmd/specials.rs | 457 +++++++++++----------- fighters/captain/src/acmd/throws.rs | 92 ++--- fighters/captain/src/acmd/tilts.rs | 177 +++++---- fighters/captain/src/lib.rs | 11 +- fighters/captain/src/opff.rs | 6 +- fighters/captain/src/status.rs | 7 + fighters/captain/src/status/mod.rs | 7 - fighters/captain/src/status/special_lw.rs | 8 +- 13 files changed, 760 insertions(+), 863 deletions(-) create mode 100644 fighters/captain/src/status.rs delete mode 100644 fighters/captain/src/status/mod.rs diff --git a/fighters/captain/src/acmd/aerials.rs b/fighters/captain/src/acmd/aerials.rs index 6be8332caf..e1fb29b472 100644 --- a/fighters/captain/src/acmd/aerials.rs +++ b/fighters/captain/src/acmd/aerials.rs @@ -1,269 +1,264 @@ - use super::*; -// x = into screen, y = up down, z = forward back - -unsafe extern "C" fn captain_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 4.5, 3.0, -148, -141, -3.0, 1.1, true, 0.7); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -5.0, -15.0, 5.0, 0.0, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 0.8); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - //EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 12.0, 14.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.5); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 6.0, -0.7, 0.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); - } -} - -unsafe extern "C" fn captain_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.7, true); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0.0, 15.0, 0.0, 90.0, 0.0, 0, 1.1, true, 0.75); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 15.0, 2.0, 90.0, 0.0, 0.0, 1.1, true, 0.75); - } - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); - } -} - -unsafe extern "C" fn captain_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0.0, 10.0, 1.0, 0.0, 100.0, 90.0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - } -} - -unsafe extern "C" fn captain_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 7.75, 8.5, -20.0, 0.0, 0.0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 2.0, 7.75, 8.0, 0.0, 0.0, 0.0, 1.3, true); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("captain_at_thrust"), Hash40::new("top"), 0.0, 5.75, 2.0, -20.0, 10.0, 0.0, 0.85, true, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1); - } -} - -unsafe extern "C" fn captain_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 5.0/(9.1-7.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 82, 100, 45, 0, 5.5, 5.2, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 100, 45, 0, 6.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 74, 100, 45, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 5.0/(9.1-7.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 82, 100, 45, 0, 5.5, 5.2, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 100, 45, 0, 6.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 74, 100, 45, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.1); - FT_MOTION_RATE(fighter, 1.0/(10.0-9.1)); + FT_MOTION_RATE(agent, 1.0/(10.0-9.1)); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 5.0/(11.5-10.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(11.5-10.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.5); - FT_MOTION_RATE(fighter, (1.0)/(14.0-12.5)); + FT_MOTION_RATE(agent, (1.0)/(14.0-12.5)); frame(lua_state, 14.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.333); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 361, 92, 0, 55, 5.7, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 361, 92, 0, 55, 6.25, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 361, 92, 0, 55, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.333); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 361, 92, 0, 55, 5.7, 5.0, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 361, 92, 0, 55, 6.25, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 361, 92, 0, 55, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0.0, 4.5, 3.0, -148, -141, -3.0, 1.1, true, 0.7); + //LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0.0, 8.0, -5.0, -15.0, 5.0, 0.0, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 14.0); + if is_excute(agent) { + //EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 12.0, 14.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.5); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 6.0, -0.7, 0.0, 0.0, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); + } +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 0, *FIGHTER_CAPTAIN_STATUS_ATTACK_AIR_WORK_INT_CRITICAL_ATTACK_ID); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 3.25, 0.1, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 4.5, 4.4, -0.2, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 3.25, 0.1, -2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legl"), 17.0, 32, 88, 0, 30, 4.5, 4.4, -0.2, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 0.591); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.591); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CAPTAIN_STATUS_ATTACK_AIR_WORK_FLAG_CRITICAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 3.0, 1.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 4.0, 4.4, -0.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 3.0, 1.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 361, 80, 0, 35, 4.0, 4.4, -0.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_captain_swing_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_captain_rnd_attack")); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 7.75, 8.5, -20.0, 0.0, 0.0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 2.0, 7.75, 8.0, 0.0, 0.0, 0.0, 1.3, true); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("captain_at_thrust"), Hash40::new("top"), 0.0, 5.75, 2.0, -20.0, 10.0, 0.0, 0.85, true, 0.5); + LAST_EFFECT_SET_RATE(agent, 1); } - } -unsafe extern "C" fn captain_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_captain_swing_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_captain_rnd_attack")); + } +} + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.0, -2.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 100, 0, 0, 4.0, -2.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.0, -1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 361, 100, 0, 27, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 0, 4.0, -1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 361, 86, 0, 30, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 88, 0, 29, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 361, 86, 0, 30, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 88, 0, 29, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 30, 70, 0, 15, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 30, 70, 0, 15, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 30, 70, 0, 15, 4.25, 3.2, 2.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 30, 70, 0, 15, 4.75, 5.8, 0.9, -0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn captain_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + + +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0.0, 10.0, 1.0, 0.0, 100.0, 90.0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + } +} + +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn captain_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); JostleModule::set_status(boma, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("footl"), 16.0, 270, 100, 0, 30, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 270, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 16.0, 290, 100, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("footl"), 16.0, 270, 100, 0, 30, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 270, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("bust"), 16.0, 290, 100, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 31, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 31, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("bust"), 16.0, 290, 56, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 270, 42, 0, 31, 4.5, 0.0, -1.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 16.0, 270, 42, 0, 31, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("bust"), 16.0, 290, 56, 0, 30, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("effect_attackairn", captain_attack_air_n_effect) - .acmd("effect_attackairlw", captain_attack_air_lw_effect) - .acmd("effect_attackairhi", captain_attack_air_hi_effect) - .acmd("effect_attackairf", captain_attack_air_f_effect) - .acmd("game_attackairn", captain_attack_air_n_game) - .acmd("game_attackairf", captain_attack_air_f_game) - .acmd("sound_attackairf", captain_attack_air_f_sound) - .acmd("game_attackairb", captain_attack_air_b_game) - .acmd("game_attackairhi", captain_attack_air_hi_game) - .acmd("expression_attackairhi", captain_attack_air_hi_expression) - .acmd("game_attackairlw", captain_attack_air_lw_game) - .install(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.7, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0.0, 15.0, 0.0, 90.0, 0.0, 0, 1.1, true, 0.75); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 15.0, 2.0, 90.0, 0.0, 0.0, 1.1, true, 0.75); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("toer"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/captain/src/acmd/ground.rs b/fighters/captain/src/acmd/ground.rs index 3dab916675..acab336ada 100644 --- a/fighters/captain/src/acmd/ground.rs +++ b/fighters/captain/src/acmd/ground.rs @@ -1,140 +1,137 @@ - use super::*; -unsafe extern "C" fn captain_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 10.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.0, 0.0, 10.0, 8.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 20, 0, 30, 3.5, 0.0, 10.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 10.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.0, 0.0, 10.0, 8.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 20, 0, 30, 3.5, 0.0, 10.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn captain_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.5, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 4.0, 0.0, 9.0, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 2.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 3.5, 0.0, 9.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 25, 0, 30, 4.0, 0.0, 9.0, 15.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.0, 6.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn captain_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 11.5, 3, 10, 12, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 11.5, 3, 10, 12, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 17.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 360, true, 0.5); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 17.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn captain_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 100, 0, 70, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 70, 3.8, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 100, 0, 70, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 70, 3.8, 0.0, 10.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 7.0, Some(0.0), Some(5.5), Some(7.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 13.5, Some(0.0), Some(5.5), Some(13.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 7.0, Some(0.0), Some(5.5), Some(7.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 45, 55, 0, 80, 4.5, 0.0, 13.0, 13.5, Some(0.0), Some(5.5), Some(13.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 51, 80, 0, 70, 5.5, 0.0, 10.0, 8.5, Some(0.0), Some(8.0), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 51, 80, 0, 70, 4.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 51, 80, 0, 70, 5.5, 0.0, 10.0, 8.5, Some(0.0), Some(8.0), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 51, 80, 0, 70, 4.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 51, 80, 0, 70, 4.0, 0.0, 10.0, 9.5, Some(0.0), Some(6.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 51, 80, 0, 70, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 51, 80, 0, 70, 4.0, 0.0, 10.0, 9.5, Some(0.0), Some(6.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 51, 80, 0, 70, 4.0, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_at_impact"), Hash40::new("top"), 0, 8, 10, 0, 0, 0, 0.85, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attack11", captain_attack_11_game) - .acmd("game_attack12", captain_attack_12_game) - .acmd("effect_attack12", captain_attack_12_effect) - .acmd("game_attack13", captain_attack_13_game) - .acmd("game_attack100end", captain_attack_100_end_game) - .acmd("game_attackdash", captain_attack_dash_game) - .acmd("effect_attackdash", captain_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/captain/src/acmd/mod.rs b/fighters/captain/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/captain/src/acmd/mod.rs +++ b/fighters/captain/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/captain/src/acmd/other.rs b/fighters/captain/src/acmd/other.rs index 6f712cd717..17b2c479c9 100644 --- a/fighters/captain/src/acmd/other.rs +++ b/fighters/captain/src/acmd/other.rs @@ -1,196 +1,119 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_captain_metal")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_captain_metal")); } wait(lua_state, 1.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_captain_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_captain_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_captain_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_captain_step_right_l")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_captain_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_captain_step_left_l")); } } -unsafe extern "C" fn captain_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", captain_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/captain/src/acmd/smashes.rs b/fighters/captain/src/acmd/smashes.rs index 2928c345a5..156b35565f 100644 --- a/fighters/captain/src/acmd/smashes.rs +++ b/fighters/captain/src/acmd/smashes.rs @@ -1,164 +1,161 @@ - use super::*; -unsafe extern "C" fn captain_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 45, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0, 45, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 19.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 19.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 45, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 20.0, 45, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 43, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 11.0, 43, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0, 45, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 12.0, 45, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.8, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 38, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 38, 93, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 20.0, 38, 93, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 12.0, 38, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 12.0, 38, 91, 0, 36, 3.8, 2.2, 0.7, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 38, 91, 0, 36, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 22.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 110, 90, 150, 0, 5.7, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 96, 90, 80, 0, 6.0, 0.0, 17.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 367, 90, 20, 30, 4.8, 0.0, 21.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 367, 90, 10, 8, 4.8, 0.0, 28.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 110, 90, 150, 0, 5.7, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 96, 90, 80, 0, 6.0, 0.0, 17.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 367, 90, 20, 30, 4.8, 0.0, 21.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 367, 90, 10, 8, 4.8, 0.0, 28.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_vec_target_pos(boma, 3, smash::phx::Hash40::new("top"), &Vector2f::new(0.0, 29.0), 7.5 as u32, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 83, 81, 0, 70, 6.0, 0.0, 29.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 85, 81, 0, 70, 5.5, 0.0, 21.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 89, 0, 70, 5.0, 0.0, 16.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 83, 81, 0, 70, 6.0, 0.0, 29.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 85, 81, 0, 70, 5.5, 0.0, 21.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 89, 0, 70, 5.0, 0.0, 16.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 14.0, 28, 95, 0, 30, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 28, 95, 0, 30, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 14.0, 28, 95, 0, 30, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 18.0, 28, 90, 0, 20, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.5, 4.9, -0.9, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 18.0, 28, 90, 0, 20, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 18.0, 28, 90, 0, 20, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attacks4hi", captain_attack_s4_hi_game) - .acmd("game_attacks4", captain_attack_s4_s_game) - .acmd("game_attacks4lw", captain_attack_s4_lw_game) - .acmd("game_attackhi4", captain_attack_hi4_game) - .acmd("game_attacklw4", captain_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/captain/src/acmd/specials.rs b/fighters/captain/src/acmd/specials.rs index 5c42045f64..5402e07ada 100644 --- a/fighters/captain/src/acmd/specials.rs +++ b/fighters/captain/src/acmd/specials.rs @@ -1,397 +1,390 @@ - use super::*; -unsafe extern "C" fn captain_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 53.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_special_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 0.667); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.667); + if is_excute(agent) { PostureModule::reverse_lr(boma); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 28.0, 361, 65, 0, 85, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 28.0, 361, 65, 0, 85, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 28.0, 361, 65, 0, 85, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn captain_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, 0.5, 0.0)); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 51.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_DIR_DECIDE); WorkModule::set_int(boma, 1, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.9, 2.4, 0.0)); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 22.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 69.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } - } -unsafe extern "C" fn captain_special_air_n_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 0.667); - if is_excute(fighter) { - REVERSE_LR(fighter); + FT_MOTION_RATE(agent, 0.667); + if is_excute(agent) { + REVERSE_LR(agent); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_TURN); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_DIR_DECIDE); WorkModule::set_int(boma, 1, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.9, 2.4, 0.0)); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_PUNCH_GENERATE_BIRD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 25.0, 361, 59, 0, 93, 5.5, -2.5, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.5, 4.2, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 2.5, -3.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 5.0, 1.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 25.0, 361, 59, 0, 93, 4.0, 5.0, 0.0, 2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 2, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_PUNCH_AIR_PHASE); } - } -unsafe extern "C" fn captain_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 4.0, 0.0, 12.0, 7.0, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 4.0, 0.0, 12.0, 7.0, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KNUCKLE_HIT_CHECK_ONOFF); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 0); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 0.0, 5.5); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KNUCKLE_HIT_CHECK_ONOFF); } - } -unsafe extern "C" fn captain_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, -2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, -2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 10.0, 76, 55, 0, 82, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.750); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.750); + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } -unsafe extern "C" fn captain_special_s_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn captain_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 270, 28, 0, 59, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 2.5, -2.0, 0.0, 0.0, Some(-5.0), Some(0.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 270, 28, 0, 59, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 8.0, 8.0, 0.0, 0.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0, 60, 80, 0, 60, 2.5, -2.0, 0.0, 0.0, Some(-5.0), Some(0.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.5, 2.5, 0.0)); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 60, 80, 0, 60, 4.0, 0.0, 8.0, 5.5, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 60, 80, 0, 60, 4.0, 0.0, 8.0, 5.5, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_LANDING); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn captain_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.867); - frame(lua_state, 15.0); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.82); - frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KICK_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 15.0, 361, 57, 0, 80, 5.76, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + boma.select_cliff_hangdata_from_name("special_hi"); } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 13.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + CATCH(agent, 0, Hash40::new("top"), 6.0, 0.0, 13.0, 7.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.0, 0.0, 7.75, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_G); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } - wait(lua_state, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + frame(lua_state, 15.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 14.25, 5.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 5.0, 0.0, 11.0, 6.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); } -} - -unsafe extern "C" fn captain_special_air_lw_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_fk_hold"), Hash40::new("bust"), 0, 0, 0, 0, 0, 0, 0.7, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("captain_fk_air"), Hash40::new("toel"), 1, 1, 0, 0, 0, 140, 0.45, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); - } -} - -unsafe extern "C" fn captain_special_air_lw_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.790); + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 35, 0, 80, 4.8, 0.0, 2.0, 7.2, Some(0.0), Some(2.0), Some(-7.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear(boma, 0, false); } - wait(lua_state, 2.0); - if is_excute(fighter) { + frame(lua_state, 31.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); } - + frame(lua_state, 36.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + } } -unsafe extern "C" fn game_specialhithrow(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 50, 62, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 8.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - CHECK_FINISH_CAMERA(fighter, 2, 1); +unsafe extern "C" fn game_specialhithrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 50, 62, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 8.0, 0, 10, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + CHECK_FINISH_CAMERA(agent, 2, 1); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: 3.0, z: 0.0}); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_THROW_FLAG_FALL); } frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 59.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - boma.select_cliff_hangdata_from_name("special_hi"); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - CATCH(fighter, 0, Hash40::new("top"), 6.0, 0.0, 13.0, 7.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.0, 0.0, 7.75, 9.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_G); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - } +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.867); frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 14.25, 5.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 5.0, 0.0, 11.0, 6.0, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_CAPTAIN, *COLLISION_SITUATION_MASK_GA); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.82); + frame(lua_state, 16.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_WORK_ID_FLAG_FALCON_KICK_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 15.0, 361, 57, 0, 80, 5.76, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(lua_state, 31.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 46, 0, 80, 5.0, 4.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 36.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +} + +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_fk_hold"), Hash40::new("bust"), 0, 0, 0, 0, 0, 0, 0.7, true); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("captain_fk_air"), Hash40::new("toel"), 1, 1, 0, 0, 0, 140, 0.45, true); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); + } +} + +unsafe extern "C" fn game_specialairlwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_CAPTAIN_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 35, 0, 80, 4.8, 0.0, 2.0, 7.2, Some(0.0), Some(2.0), Some(-7.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_specialn", captain_special_n_game) - .acmd("game_specialnturn", captain_special_n_turn_game) - .acmd("game_specialairn", captain_special_air_n_game) - .acmd("game_specialairnturn", captain_special_air_n_turn_game) - .acmd("game_specialsstart", captain_special_s_start_game) - .acmd("game_specialsend", captain_special_s_end_game) - .acmd("expression_specialsend", captain_special_s_end_expression) - .acmd("game_specialairsend", captain_special_air_s_end_game) - .acmd("game_specialairlw", captain_special_air_lw_game) - .acmd("effect_specialairlw", captain_special_air_lw_effect) - .acmd("game_specialairlwend", captain_special_air_lw_end_game) - .acmd("game_specialhithrow", game_specialhithrow) - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialhi", game_specialairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialnturn", game_specialnturn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("game_specialairnturn", game_specialairnturn); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", captain_special_s_end_game); + agent.acmd("expression_specialsend", expression_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("game_specialhithrow", game_specialhithrow); + + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("game_specialairlwend", game_specialairlwend); } diff --git a/fighters/captain/src/acmd/throws.rs b/fighters/captain/src/acmd/throws.rs index 1f23020b9b..5db1c1252c 100644 --- a/fighters/captain/src/acmd/throws.rs +++ b/fighters/captain/src/acmd/throws.rs @@ -1,96 +1,90 @@ - use super::*; -unsafe extern "C" fn captain_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn captain_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn captain_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-16.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-16.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 85, 105, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 85, 105, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 80, 100, 0, 60, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 80, 100, 0, 60, 4.5, 4.8, 0.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 32); + CHECK_FINISH_CAMERA(agent, 8, 32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.5, y: 12.75, z: 5.2 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_catch", captain_catch_game) - .acmd("game_catchdash", captain_catch_dash_game) - .acmd("game_catchturn", captain_catch_turn_game) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/captain/src/acmd/tilts.rs b/fighters/captain/src/acmd/tilts.rs index 38e6843f31..97a28cf4f1 100644 --- a/fighters/captain/src/acmd/tilts.rs +++ b/fighters/captain/src/acmd/tilts.rs @@ -1,156 +1,155 @@ - use super::*; -unsafe extern "C" fn captain_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 58, 0, 60, 4.3, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 361, 58, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 58, 0, 60, 5.3, 5.5, -1.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.812); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.812); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 285, 90, 0, 30, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 285, 90, 0, 30, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 12.0, 285, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 50, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 50, 4.5, 7.0, -2.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 4.0, 5.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 12.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn captain_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 7, 11, -30, -84, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 11.5, 7, 11, -30, -84, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 22.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn captain_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.778); + FT_MOTION_RATE(agent, 0.778); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 80, 75, 0, 46, 4.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 11.0, 80, 75, 0, 46, 5.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 25, 65, 0, 46, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 80, 75, 0, 46, 4.0, 0.0, 3.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 11.0, 80, 75, 0, 46, 5.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 25, 65, 0, 46, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn captain_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -4, 5.5, 6, -9.2, -36, 175, 1.1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -4, 5.5, 6, -9.2, -36, 175, 1.1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("captain") - .acmd("game_attacks3hi", captain_attack_s3_hi_game) - .acmd("game_attacks3", captain_attack_s3_game) - .acmd("game_attacks3lw", captain_attack_s3_lw_game) - .acmd("game_attackhi3", captain_attack_hi3_game) - .acmd("effect_attackhi3", captain_attack_hi3_effect) - .acmd("game_attacklw3", captain_attack_lw3_game) - .acmd("effect_attacklw3", captain_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/captain/src/lib.rs b/fighters/captain/src/lib.rs index 71552adbad..faddf98c80 100644 --- a/fighters/captain/src/lib.rs +++ b/fighters/captain/src/lib.rs @@ -5,8 +5,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("captain"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/captain/src/opff.rs b/fighters/captain/src/opff.rs index 91a7fcad44..7fe83d50fd 100644 --- a/fighters/captain/src/opff.rs +++ b/fighters/captain/src/opff.rs @@ -78,8 +78,6 @@ pub unsafe extern "C" fn captain_frame_wrapper(fighter: &mut L2CFighterCommon) { fastfall_specials(fighter); } -pub fn install() { - smashline::Agent::new("captain") - .on_line(Main, captain_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, captain_frame_wrapper); } diff --git a/fighters/captain/src/status.rs b/fighters/captain/src/status.rs new file mode 100644 index 0000000000..12b375c06e --- /dev/null +++ b/fighters/captain/src/status.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/captain/src/status/mod.rs b/fighters/captain/src/status/mod.rs deleted file mode 100644 index 74ccd15388..0000000000 --- a/fighters/captain/src/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special_lw; - -pub fn install() { - special_lw::install(); -} \ No newline at end of file diff --git a/fighters/captain/src/status/special_lw.rs b/fighters/captain/src/status/special_lw.rs index 584ffae85a..067acf903a 100644 --- a/fighters/captain/src/status/special_lw.rs +++ b/fighters/captain/src/status/special_lw.rs @@ -23,9 +23,7 @@ unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CV ret } -pub fn install() { - smashline::Agent::new("captain") - .status(Init, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_init) - .status(Main, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_init); + agent.status(Main, *FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main); } \ No newline at end of file From 80037d3c87a6d659108963438501cbc791a39e89 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 12:56:29 -0500 Subject: [PATCH 058/172] whoops --- fighters/captain/src/acmd/other.rs | 2 +- fighters/captain/src/acmd/specials.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/captain/src/acmd/other.rs b/fighters/captain/src/acmd/other.rs index 17b2c479c9..db56db7ab5 100644 --- a/fighters/captain/src/acmd/other.rs +++ b/fighters/captain/src/acmd/other.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); diff --git a/fighters/captain/src/acmd/specials.rs b/fighters/captain/src/acmd/specials.rs index 5402e07ada..72aacae90a 100644 --- a/fighters/captain/src/acmd/specials.rs +++ b/fighters/captain/src/acmd/specials.rs @@ -376,7 +376,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnturn", game_specialairnturn); agent.acmd("game_specialsstart", game_specialsstart); - agent.acmd("game_specialsend", captain_special_s_end_game); + agent.acmd("game_specialsend", game_specialsend); agent.acmd("expression_specialsend", expression_specialsend); agent.acmd("game_specialairsend", game_specialairsend); From 0f858d5b87d38967de045e9fef3ad5ec3e919236 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 13:36:01 -0500 Subject: [PATCH 059/172] stupid falcon mistake that isnt worth a commit so i also did corrin --- fighters/captain/src/acmd/other.rs | 6 +- fighters/kamui/src/acmd/aerials.rs | 406 ++++++------ fighters/kamui/src/acmd/ground.rs | 101 ++- fighters/kamui/src/acmd/mod.rs | 16 +- fighters/kamui/src/acmd/other.rs | 215 ++----- fighters/kamui/src/acmd/smashes.rs | 212 +++---- fighters/kamui/src/acmd/specials.rs | 584 ++++++------------ fighters/kamui/src/acmd/throws.rs | 96 ++- fighters/kamui/src/acmd/tilts.rs | 140 +++-- fighters/kamui/src/dragonhand/acmd/mod.rs | 7 + .../kamui/src/dragonhand/acmd/specials.rs | 38 ++ fighters/kamui/src/dragonhand/mod.rs | 9 + fighters/kamui/src/lib.rs | 23 +- fighters/kamui/src/opff.rs | 7 +- fighters/kamui/src/ryusensya/acmd/mod.rs | 7 + fighters/kamui/src/ryusensya/acmd/specials.rs | 18 + fighters/kamui/src/ryusensya/mod.rs | 9 + fighters/kamui/src/spearhand/acmd/mod.rs | 9 + fighters/kamui/src/spearhand/acmd/smashes.rs | 20 + fighters/kamui/src/spearhand/acmd/specials.rs | 84 +++ fighters/kamui/src/spearhand/mod.rs | 9 + fighters/kamui/src/status.rs | 4 +- fighters/kamui/src/status/special_lw.rs | 10 +- fighters/kamui/src/waterdragon/acmd/mod.rs | 7 + .../kamui/src/waterdragon/acmd/specials.rs | 42 ++ fighters/kamui/src/waterdragon/mod.rs | 9 + 26 files changed, 1031 insertions(+), 1057 deletions(-) create mode 100644 fighters/kamui/src/dragonhand/acmd/mod.rs create mode 100644 fighters/kamui/src/dragonhand/acmd/specials.rs create mode 100644 fighters/kamui/src/dragonhand/mod.rs create mode 100644 fighters/kamui/src/ryusensya/acmd/mod.rs create mode 100644 fighters/kamui/src/ryusensya/acmd/specials.rs create mode 100644 fighters/kamui/src/ryusensya/mod.rs create mode 100644 fighters/kamui/src/spearhand/acmd/mod.rs create mode 100644 fighters/kamui/src/spearhand/acmd/smashes.rs create mode 100644 fighters/kamui/src/spearhand/acmd/specials.rs create mode 100644 fighters/kamui/src/spearhand/mod.rs create mode 100644 fighters/kamui/src/waterdragon/acmd/mod.rs create mode 100644 fighters/kamui/src/waterdragon/acmd/specials.rs create mode 100644 fighters/kamui/src/waterdragon/mod.rs diff --git a/fighters/captain/src/acmd/other.rs b/fighters/captain/src/acmd/other.rs index db56db7ab5..54a37bc8e8 100644 --- a/fighters/captain/src/acmd/other.rs +++ b/fighters/captain/src/acmd/other.rs @@ -106,9 +106,9 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); agent.acmd("sound_dash", sound_dash); diff --git a/fighters/kamui/src/acmd/aerials.rs b/fighters/kamui/src/acmd/aerials.rs index bcfc4a7315..257522e3ac 100644 --- a/fighters/kamui/src/acmd/aerials.rs +++ b/fighters/kamui/src/acmd/aerials.rs @@ -1,379 +1,371 @@ use super::*; -unsafe extern "C" fn kamui_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("attack_air_n"), false, 0.0); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 60, 93, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 50, 88, 0, 47, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 60, 93, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 50, 88, 0, 47, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 60, 93, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("handl"), 7.0, 60, 93, 0, 47, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 6.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 6.0, 1.0); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 15.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 15.0, 8.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 60, 88, 0, 51, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 50, 88, 0, 51, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 60, 88, 0, 51, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 50, 88, 0, 51, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 60, 88, 0, 51, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.0, 7.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("handl"), 5.0, 60, 88, 0, 51, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_horn") as i64); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_hide") as i64); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_hide") as i64); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_normal") as i64); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_normal") as i64); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_none") as i64); } } -unsafe extern "C" fn kamui_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 8.85, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 8.85, 5.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.85); - FT_MOTION_RATE_RANGE(fighter, 8.85, 14.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 67, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 50, 75, 0, 57, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 8.85, 14.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 67, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 50, 75, 0, 57, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 67, 95, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 59.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn kamui_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 5, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 5, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.85); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.85); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE); if (1.0..4.0).contains(&charge) { - SET_SPEED_EX(fighter, 0.3 + (0.2 * charge), 0.1 + (0.03 * charge), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0.3 + (0.2 * charge), 0.1 + (0.03 * charge), *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } else if charge >= 5.0 { - SET_SPEED_EX(fighter, 1.3, 0.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.3, 0.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 13.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE); let damage = 13.0 + (charge * 0.5); let kbg = 98 - (charge * 1.6) as i32; let sound_level = if charge > 0.0 { *ATTACK_SOUND_LEVEL_L } else { *ATTACK_SOUND_LEVEL_M }; let sound = if charge > 0.0 { *COLLISION_SOUND_ATTR_WATER } else { *COLLISION_SOUND_ATTR_CUTUP }; - ATTACK(fighter, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, 40, 7.0, 0.0, 10.0, -12.5, Some(0.0), Some(11.0), Some(-17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), sound_level, sound, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, 40, 7.0, 0.0, 10.0, -12.5, Some(0.0), Some(11.0), Some(-17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), sound_level, sound, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 106, 0, 40, 5.7, 0.0, 10.7, -12.5, Some(0.0), Some(11.9), Some(-19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 106, 0, 40, 5.7, 0.0, 10.7, -12.5, Some(0.0), Some(11.9), Some(-19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_start"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_start"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.1); - if is_excute(fighter) { - if VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 1.6, 17.0, -8.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 1.0); + if is_excute(agent) { + if VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 1.6, 17.0, -8.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 1.0); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.3, -21, 0, 0, 0, 1.1, true); - if VarModule::get_float(fighter.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, 11.0, -10.0, 270, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.3, -21, 0, 0, 0, 1.1, true); + if VarModule::get_float(agent.battle_object, vars::kamui::status::CURRENT_CHARGE) > 0.0 { + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, 11.0, -10.0, 270, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } - } -unsafe extern "C" fn kamui_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 10.5, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 70, 80, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 68, 70, 0, 85, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 10.5, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 70, 80, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 68, 70, 0, 85, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.25, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 70, 80, 0, 60, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE_RANGE(fighter, 10.5, 11.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 10.5, 11.0, 1.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state =fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state =agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 7, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 7, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 10.0); - if is_excute(fighter){ - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent){ + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.769); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.769); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 270, 49, 0, 33, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 5.5, 0.0, 2.0, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 40, 0, 4.0, 0.0, -7.5, 0.0, None, None, None, 0.8, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 6.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 4.5, 0.0, -7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 6.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 78, 45, 0, 90, 4.5, 0.0, -7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn kamui_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 0, 6, 0, -90, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 2, 6, 0, -90, 0, 0, 0.8, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 13, -2.5, 78, 0, 0, 1.1, true, 0.9); - EFFECT_FOLLOW(fighter, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0.0, -5.0, 0.0, 120, 70, 100, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 0, 6, 0, -90, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sheik_atk_lw"), Hash40::new("top"), 2, 6, 0, -90, 0, 0, 0.8, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 13, -2.5, 78, 0, 0, 1.1, true, 0.9); + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0.0, -5.0, 0.0, 120, 70, 100, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 6.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_ryusensya_shot"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, -7.0, 0.0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, -12.0, 0.0, 0, 0, 0, 1.25, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_ryusensya_shot"), Hash40::new("top"), 0, -5.0, 0, 0, 0, 0, 1.0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 0.0, -7.0, 0.0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, -12.0, 0.0, 0, 0, 0, 1.25, true, 1.0); } - } -unsafe extern "C" fn kamui_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn kamui_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_club_tornado"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line_b"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_ryusensya_shot"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_counter_splash"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_transform_splash_end"), false, true); - EFFECT_FLW_POS(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line_b"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_ryusensya_shot"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_counter_splash"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("kamui_transform_splash_end"), false, true); + EFFECT_FLW_POS(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attackairn", kamui_attack_air_n_game) - .acmd("expression_attackairn", kamui_attack_air_n_expression) - .acmd("game_attackairf", kamui_attack_air_f_game) - .acmd("effect_attackairf", kamui_attack_air_f_effect) - .acmd("expression_attackairf", kamui_attack_air_f_expression) - .acmd("game_attackairb", kamui_attack_air_b_game) - .acmd("effect_attackairb", kamui_attack_air_b_effect) - .acmd("game_attackairhi", kamui_attack_air_hi_game) - .acmd("effect_attackairhi", kamui_attack_air_hi_effect) - .acmd("expression_attackairhi", kamui_attack_air_hi_expression) - .acmd("game_attackairlw", kamui_attack_air_lw_game) - .acmd("effect_attackairlw", kamui_attack_air_lw_effect) - .acmd("game_landingairlw", kamui_landing_air_lw_game) - .acmd("effect_landingairlw", kamui_landing_air_lw_effect) - .install(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", null); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/kamui/src/acmd/ground.rs b/fighters/kamui/src/acmd/ground.rs index 042ca9dc47..a8bd1f0462 100644 --- a/fighters/kamui/src/acmd/ground.rs +++ b/fighters/kamui/src/acmd/ground.rs @@ -1,106 +1,105 @@ use super::*; -unsafe extern "C" fn kamui_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("attack_11"), false, 0.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 4.5, 0.0, 9.0, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 2.2, 0.0, 10.5, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 60, 25, 0, 25, 1.8, 8.0, 0.0, 0.4, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 4.5, 0.0, 9.0, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 25, 0, 25, 2.2, 0.0, 10.5, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 60, 25, 0, 25, 1.8, 8.0, 0.0, 0.4, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 85, 55, 0, 20, 1.8, 13.0, 0.0, 0.4, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 85, 55, 0, 20, 1.8, 13.0, 0.0, 0.4, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn kamui_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 60, 22, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn kamui_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 35, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 50, 150, 0, 30, 3.2, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kamui_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 14, 100, 65, 0, 4.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 14, 100, 25, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 14, 100, 5, 0, 3.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 14, 100, 65, 0, 4.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 14, 100, 25, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 14, 100, 5, 0, 3.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 5.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 5.0, 0.0, -1.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 60, 160, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attack11", kamui_attack_11_game) - .acmd("game_attack12", kamui_attack_12_game) - .acmd("game_attack13", kamui_attack_13_game) - .acmd("game_attackdash", kamui_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/kamui/src/acmd/mod.rs b/fighters/kamui/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/kamui/src/acmd/mod.rs +++ b/fighters/kamui/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/kamui/src/acmd/other.rs b/fighters/kamui/src/acmd/other.rs index cc6d74f32e..ed7394d486 100644 --- a/fighters/kamui/src/acmd/other.rs +++ b/fighters/kamui/src/acmd/other.rs @@ -1,220 +1,125 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn kamui_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.333); } frame(lua_state, 8.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_kamui_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_kamui_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn kamui_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 10.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn kamui_ryusensya_regular_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_RYUSENSYA_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 45, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - AttackModule::enable_safe_pos(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("kamui_ryusensya") - .acmd("game_regular", kamui_ryusensya_regular_game) - .install(); - smashline::Agent::new("kamui") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", kamui_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", kamui_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/kamui/src/acmd/smashes.rs b/fighters/kamui/src/acmd/smashes.rs index a4335c2b40..316b71c386 100644 --- a/fighters/kamui/src/acmd/smashes.rs +++ b/fighters/kamui/src/acmd/smashes.rs @@ -1,15 +1,15 @@ use super::*; -unsafe extern "C" fn kamui_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -17,31 +17,32 @@ unsafe extern "C" fn kamui_attack_s4_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 12.25, 16.0, Some(0.0), Some(14.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 11.0, 7.5, Some(0.0), Some(13.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 14.0, 27.0, Some(0.0), Some(16.0), Some(41.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 10.25, 16.0, Some(0.0), Some(10.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.5, 7.5, Some(0.0), Some(10.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 10.0, 27.0, Some(0.0), Some(9.5), Some(42.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); + } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -49,32 +50,31 @@ unsafe extern "C" fn kamui_attack_s4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 10.25, 16.0, Some(0.0), Some(10.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.5, 7.5, Some(0.0), Some(10.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 10.0, 27.0, Some(0.0), Some(9.5), Some(42.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); - + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 12.25, 16.0, Some(0.0), Some(14.0), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 11.0, 7.5, Some(0.0), Some(13.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 14.0, 27.0, Some(0.0), Some(16.0), Some(41.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 19.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 19.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, -1); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("attack_s4_s"), false, -1.0); @@ -82,148 +82,128 @@ unsafe extern "C" fn kamui_attack_s4_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 7.25, 16.0, Some(0.0), Some(3.75), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.0, 7.5, Some(0.0), Some(5.5), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 3.5, 27.0, Some(0.0), Some(-1.0), Some(40.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.6); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 103, 0, 40, 2.0, 0.0, 7.25, 16.0, Some(0.0), Some(3.75), Some(27.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 50, 103, 0, 40, 1.7, 0.0, 10.0, 7.5, Some(0.0), Some(5.5), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 50, 107, 0, 45, 1.1, 0.0, 3.5, 27.0, Some(0.0), Some(-1.0), Some(40.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.6); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 61.0, 29.0); + FT_MOTION_RATE_RANGE(agent, 35.0, 61.0, 29.0); } -unsafe extern "C" fn kamui_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_horn") as i64); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_hide") as i64); VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_hide") as i64); } frame(lua_state, 9.0); app::sv_animcmd::execute(lua_state, 9.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 0); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_attackm"), 0, 1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_attackm"), 0, 1); sv_animcmd::RUMBLE_HIT(lua_state); - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("rbkind_piercel"), 0, 2); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("rbkind_piercel"), 0, 2); sv_animcmd::RUMBLE_HIT(lua_state); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("hair") as i64, hash40("hair_normal") as i64); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("front_hair") as i64, hash40("front_hair_normal") as i64); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("dragon") as i64, hash40("dragon_none") as i64); } } -unsafe extern "C" fn kamui_spearhand_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - FT_MOTION_RATE(agent, 0.8); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 27.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 35.0); - FT_MOTION_RATE(agent, 1.2); -} - -unsafe extern "C" fn kamui_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, 3.0, Some(0.0), Some(19.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, -2.2, Some(0.0), Some(19.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 90, 95, 0, 50, 3.3, 0.0, 30.0, 0.0, Some(0.0), Some(26.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 95, 80, 0, 75, 2.8, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, 3.0, Some(0.0), Some(19.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 93, 90, 0, 50, 2.0, 0.0, 8.0, -2.2, Some(0.0), Some(19.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 90, 95, 0, 50, 3.3, 0.0, 30.0, 0.0, Some(0.0), Some(26.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 95, 80, 0, 75, 2.8, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kamui_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 30, 100, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 32, 100, 0, 40, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 10.0, 35, 100, 0, 50, 3.0, 0.0, 9.0, -13.0, Some(0.0), Some(9.0), Some(-6.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("top"), 14.0, 35, 95, 0, 50, 2.5, 0.0, 9.0, -22.0, Some(0.0), Some(9.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 30, 100, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 32, 100, 0, 40, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 30, 100, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 10.0, 35, 100, 0, 50, 3.0, 0.0, 9.0, -13.0, Some(0.0), Some(9.0), Some(-6.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("top"), 14.0, 35, 95, 0, 50, 2.5, 0.0, 9.0, -22.0, Some(0.0), Some(9.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("kamui_spearhand") - .acmd("game_attacks4", kamui_spearhand_attack_s4_game) - .install(); - smashline::Agent::new("kamui") - .acmd("game_attacks4hi", kamui_attack_s4_hi_game) - .acmd("game_attacks4", kamui_attack_s4_game) - .acmd("game_attacks4lw", kamui_attack_s4_lw_game) - .acmd("expression_attacks4hi", kamui_attack_s4_expression) - .acmd("expression_attacks4", kamui_attack_s4_expression) - .acmd("expression_attacks4lw", kamui_attack_s4_expression) - .acmd("game_attackhi4", kamui_attack_hi4_game) - .acmd("game_attacklw4", kamui_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("expression_attacks4hi", expression_attacks4); + agent.acmd("expression_attacks4lw", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/kamui/src/acmd/specials.rs b/fighters/kamui/src/acmd/specials.rs index 7726ccfd95..665f56f18a 100644 --- a/fighters/kamui/src/acmd/specials.rs +++ b/fighters/kamui/src/acmd/specials.rs @@ -1,569 +1,389 @@ use super::*; -unsafe extern "C" fn kamui_special_n_end1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 45.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 45.0, 19.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_N_FLAG_AIR_CONTROL); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_DRAGONHAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kamui_dragonhand_special_n_end1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - if WorkModule::is_flag(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLAG_IS_KAMUI) { - if sv_animcmd::get_value_float(fighter.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - } - else { - let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - ATK_LERP_RATIO(fighter, lerp); - } - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn kamui_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn kamui_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn kamui_spearhand_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); - let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); - let facing = PostureModule::lr(boma); - let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; - if GroundModule::line_segment_check(boma, - &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, - &Vector2f::zero(), - ground, - true).is_null() { - ATTACK(fighter, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - ATTACK(fighter, 0, 0, Hash40::new("drag2"), 7.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } -} - -unsafe extern "C" fn kamui_spearhand_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); - let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; - ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); - let facing = PostureModule::lr(boma); - let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; - // debug_draw_line( - // &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - // &Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, - // 500 - // ); - // debug_draw_circle(&Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, 5.0, 100); - // debug_draw_circle(&Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, 5.0, 100); - // debug_set_draw_color(255.0, 0.0, 0.0, 1.0); - if GroundModule::line_segment_check(boma, - &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, - &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, - &Vector2f::zero(), - ground, - true).is_null() { - ATTACK(fighter, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - ATTACK(fighter, 0, 0, Hash40::new("drag2"), 8.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } -} - -unsafe extern "C" fn kamui_special_s_wall_attack_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallattackf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("special_s_wall_attack_f"), false, 0.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 55, 50, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 55, 50, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 55, 50, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); } wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 90, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 90, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 90, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), GROUND_CLIFF_CHECK_KIND_ALWAYS); + } } -unsafe extern "C" fn kamui_special_s_wall_attack_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialswallattackf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, -6, 0, 0, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, -6, 0, 0, 0, 0.45, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1.5, 15.5, 0, 0, 90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1.5, 15.5, 0, 0, 90, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_tyousoutotu_wind"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("kamui_tyousoutotu_wind"), false, false); } } -unsafe extern "C" fn kamui_special_s_wall_attack_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallattackb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, smash::phx::Hash40::new("special_s_wall_attack_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 125, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 125, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 125, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_WALL_ATTACK_B_REVERSE_LR); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 55, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 55, 70, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 55, 70, 0, 100, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 55, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 55, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 55, 50, 0, 100, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } - } -unsafe extern "C" fn kamui_special_s_wall_attack_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialswallattackb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, -4, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, -4, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 14, 0, 12, 210, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 14, 0, 12, 210, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, 5, 0, 180, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_wind"), Hash40::new("top"), 0, 0, 5, 0, 180, 0, 0.45, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1, -12, 0, 180, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_tyousoutotu_atk"), Hash40::new("top"), 0, 1, -12, 0, 180, 90, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("kamui_tyousoutotu_wind"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("kamui_tyousoutotu_wind"), false, false); } } -unsafe extern "C" fn kamui_special_s_wall_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialswalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 2.0); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_wall_jump"), true, 0.0); ArticleModule::set_rate(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, 1.5); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.5, 6.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.5, 6.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 58, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_MOVE_KINETIC_PARAM); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_CHANGE_JUMP_ACCEL_Y); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_S_FLAG_JUMP_CONTROL); } } -unsafe extern "C" fn kamui_special_s_wall_jump_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialswalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -6, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 8, 6, 0, 0, 90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_c"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 8, 6, 0, 0, 90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 21, -16, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 21, -16, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn kamui_special_s_wall_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialswallend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_wall_end"), true, 0.0); ArticleModule::change_motion(boma, 0, Hash40::new("fall"), false, 0.0); } } -unsafe extern "C" fn kamui_special_hi_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.5, 85, 100, 150, 0, 5.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(fighter.module_accessor, true, false); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.5, 85, 100, 150, 0, 5.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + AttackModule::set_no_damage_fly_smoke_all(agent.module_accessor, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); } frame(lua_state, 20.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 1, Hash40::new("rot"), 1.2, 80, 100, 140, 0, 2.0, 0.0, 5.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 1, Hash40::new("rot"), 1.2, 105, 100, 140, 0, 5.5, 0.0, 4.0, 6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 1, Hash40::new("rot"), 1.2, 68, 100, 140, 0, 5.5, 0.0, 4.0, -6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 1, Hash40::new("rot"), 1.2, 100, 100, 155, 0, 5.0, 0.0, -1.0, 5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 1, Hash40::new("rot"), 1.2, 73, 100, 155, 0, 5.0, 0.0, -1.0, -5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(fighter.module_accessor, true, false); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATTACK(agent, 0, 1, Hash40::new("rot"), 1.2, 80, 100, 140, 0, 2.0, 0.0, 5.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 1, Hash40::new("rot"), 1.2, 105, 100, 140, 0, 5.5, 0.0, 4.0, 6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 1, Hash40::new("rot"), 1.2, 68, 100, 140, 0, 5.5, 0.0, 4.0, -6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 1, Hash40::new("rot"), 1.2, 100, 100, 155, 0, 5.0, 0.0, -1.0, 5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 1, Hash40::new("rot"), 1.2, 73, 100, 155, 0, 5.0, 0.0, -1.0, -5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + AttackModule::set_no_damage_fly_smoke_all(agent.module_accessor, true, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 29.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATTACK(agent, 0, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 34.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 36.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn kamui_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 26.0, 30.0); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 26.0, 30.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 12.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 27.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 31.0); - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 37.0); + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 37.0); frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); VisibilityModule::set_whole(boma, true); } } -unsafe extern "C" fn kamui_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_guard_mark"), true, true); - EFFECT(fighter, Hash40::new("kamui_counter_success"), Hash40::new("top"), 0, 14, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_water_hamon"), Hash40::new("top"), 0, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_guard_mark"), true, true); + EFFECT(agent, Hash40::new("kamui_counter_success"), Hash40::new("top"), 0, 14, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_water_hamon"), Hash40::new("top"), 0, 0.5, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } if WorkModule::is_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("kamui_water_splash"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("kamui_water_splash"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } frame(lua_state, 26.0); - if is_excute(fighter) { - if sv_animcmd::get_value_float(fighter.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if sv_animcmd::get_value_float(agent.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), 7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("kamui_counter_ripple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("kamui_counter_ripple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_REQ_EFEECT_TRANSFORM_WIND); } frame(lua_state, 47.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("kamui_transform_splash_end"), Hash40::new("neck"), 2, 0, 0, 0, 0, 0, 1, true); WorkModule::on_flag(boma, *FIGHTER_KAMUI_INSTANCE_WORK_ID_FLAG_OFF_EFEECT_TRANSFORM_WIND); } } -unsafe extern "C" fn kamui_waterdragon_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 26.0, 30.0); - frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 80, 60, 0, 90, 8.0, 0.0, 8.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - if WorkModule::is_flag(boma, *WEAPON_KAMUI_WATERDRAGON_INSTANCE_WORK_ID_FLAG_SET_CRITICAL_HIT_SE) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_kamui_criticalhit")); - } - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 5.0, 0.0, 21.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 7.0, 0.0, 10.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 80, 60, 0, 90, 5.0, 0.0, 22.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 31.0); - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 37.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend1", game_specialnend1); + agent.acmd("game_specialairnend1", game_specialnend1); + + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("game_specialswallattackf", game_specialswallattackf); + agent.acmd("effect_specialswallattackf", effect_specialswallattackf); + agent.acmd("game_specialswallattackb", game_specialswallattackb); + agent.acmd("effect_specialswallattackb", effect_specialswallattackb); + agent.acmd("game_specialswalljump", game_specialswalljump); + agent.acmd("effect_specialswalljump", effect_specialswalljump); + agent.acmd("game_specialswallend", game_specialswallend); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_specialnend1", kamui_special_n_end1_game) - .acmd("game_specialairnend1", kamui_special_n_end1_game) - .acmd("game_specialsattack", kamui_special_s_attack_game) - .acmd("game_specialairsattack", kamui_special_air_s_attack_game) - .acmd( - "game_specialswallattackf", - kamui_special_s_wall_attack_f_game, - ) - .acmd( - "effect_specialswallattackf", - kamui_special_s_wall_attack_f_effect, - ) - .acmd( - "game_specialswallattackb", - kamui_special_s_wall_attack_b_game, - ) - .acmd( - "effect_specialswallattackb", - kamui_special_s_wall_attack_b_effect, - ) - .acmd("game_specialswalljump", kamui_special_s_wall_jump_game) - .acmd("effect_specialswalljump", kamui_special_s_wall_jump_effect) - .acmd("game_specialswallend", kamui_special_s_wall_end_game) - .acmd("game_specialhi", kamui_special_hi_game) - .acmd("game_specialairhi", kamui_special_hi_game) - .acmd("game_speciallwhit", kamui_special_lw_hit_game) - .acmd("game_specialairlwhit", kamui_special_lw_hit_game) - .acmd("effect_speciallwhit", kamui_special_lw_hit_effect) - .acmd("effect_specialairlwhit", kamui_special_lw_hit_effect) - .install(); - smashline::Agent::new("kamui_spearhand") - .acmd("game_specialsattack", kamui_spearhand_special_s_attack_game) - .acmd( - "game_specialairsattack", - kamui_spearhand_special_air_s_attack_game, - ) - .install(); - smashline::Agent::new("kamui_dragonhand") - .acmd("game_dhspecialnend1", kamui_dragonhand_special_n_end1_game) - .acmd( - "game_dhspecialairnend1", - kamui_dragonhand_special_n_end1_game, - ) - .install(); - smashline::Agent::new("kamui_waterdragon") - .acmd("game_speciallwhit", kamui_waterdragon_special_lw_hit_game) - .acmd( - "game_specialairlwhit", - kamui_waterdragon_special_lw_hit_game, - ) - .install(); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); } diff --git a/fighters/kamui/src/acmd/throws.rs b/fighters/kamui/src/acmd/throws.rs index d76422b039..5a219290c2 100644 --- a/fighters/kamui/src/acmd/throws.rs +++ b/fighters/kamui/src/acmd/throws.rs @@ -1,27 +1,26 @@ use super::*; -unsafe extern "C" fn kamui_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn kamui_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn kamui_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn kamui_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -61,76 +60,75 @@ unsafe extern "C" fn kamui_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn kamui_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("throw_b"), true, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 140, 70, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 140, 70, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 6.5, 30, 120, 0, 40, 2.5, 10.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 12.0, 30, 100, 0, 40, 2.0, 20.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 6.5, 30, 120, 0, 40, 2.5, 10.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handl"), 12.0, 30, 100, 0, 40, 2.0, 20.0, 0.0, 0.0, Some(-2.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_string"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 8); + CHECK_FINISH_CAMERA(agent, 14, 8); } frame(lua_state, 13.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn kamui_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, smash::phx::Hash40::new("throw_lw"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 107, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 107, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); ArticleModule::set_visibility_whole(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 40, 7.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(-6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 40, 7.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(-6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3.0, 0.0); + CHECK_FINISH_CAMERA(agent, 3.0, 0.0); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_WATERDRAGON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); VisibilityModule::set_whole(boma, true); } - } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_catch", kamui_catch_game) - .acmd("game_catchdash", kamui_catch_dash_game) - .acmd("game_catchturn", kamui_catch_turn_game) - .acmd("game_throwb", kamui_throw_b_game) - .acmd("game_throwlw", kamui_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/kamui/src/acmd/tilts.rs b/fighters/kamui/src/acmd/tilts.rs index 77036ac1ae..1a41ea4055 100644 --- a/fighters/kamui/src/acmd/tilts.rs +++ b/fighters/kamui/src/acmd/tilts.rs @@ -1,124 +1,122 @@ use super::*; -unsafe extern "C" fn kamui_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 7.9, 1.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 7.9, 1.0); frame(lua_state, 7.9); - FT_MOTION_RATE_RANGE(fighter, 7.9, 9.1, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 25, 65, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 35, 89, 0, 35, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.9, 9.1, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 25, 65, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 35, 89, 0, 35, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 25, 65, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.1); - FT_MOTION_RATE_RANGE(fighter, 9.1, 10.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 9.1, 10.0, 1.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kamui_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.9); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.9); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn kamui_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 20.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 80, 43, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 80, 72, 0, 71, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 80, 43, 0, 80, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 68, 0, 80, 3.0, 0.0, 12.0, 4.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 20.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 80, 43, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 80, 72, 0, 71, 2.25, -1.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 88, 43, 0, 80, 3.0, -1.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 80, 43, 0, 80, 3.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 68, 0, 80, 3.0, 0.0, 12.0, 4.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, 4.0, Some(0.0), Some(26.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, 4.0, Some(0.0), Some(26.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 80, 63, 0, 81, 3.0, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 6, false); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn kamui_attack_hi3_effect(fighter: &mut L2CAgentBase){ - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase){ + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter){ - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent){ + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter){ - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 8, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2) + if is_excute(agent){ + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_kamui_sword1"), Hash40::new("tex_kamui_sword2"), 8, Hash40::new("haver"), 0.0, 0.1, 0.0, Hash40::new("haver"), -0.0, 15.0, 0.0, true, Hash40::new("kamui_sword_flare"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2) } frame(lua_state, 18.0); - if is_excute(fighter){ - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent){ + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn kamui_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 3.0, 0.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 2.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 60, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 3.0, 0.0, 7.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 78, 75, 0, 65, 2.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("kamui") - .acmd("game_attacks3", kamui_attack_s3_game) - .acmd("expression_attacks3", kamui_attack_s3_expression) - .acmd("game_attackhi3", kamui_attack_hi3_game) - .acmd("effect_attackhi3", kamui_attack_hi3_effect) - .acmd("game_attacklw3", kamui_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/kamui/src/dragonhand/acmd/mod.rs b/fighters/kamui/src/dragonhand/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/kamui/src/dragonhand/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/dragonhand/acmd/specials.rs b/fighters/kamui/src/dragonhand/acmd/specials.rs new file mode 100644 index 0000000000..08211e3fd0 --- /dev/null +++ b/fighters/kamui/src/dragonhand/acmd/specials.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_dhspecialnend1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + if WorkModule::is_flag(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLAG_IS_KAMUI) { + if sv_animcmd::get_value_float(agent.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + } + else { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.1, 15.0, Some(0.0), Some(8.1), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + } + } + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_dhspecialnend1", game_dhspecialnend1); + agent.acmd("game_dhspecialairnend1", game_dhspecialnend1); +} diff --git a/fighters/kamui/src/dragonhand/mod.rs b/fighters/kamui/src/dragonhand/mod.rs new file mode 100644 index 0000000000..df98b48f82 --- /dev/null +++ b/fighters/kamui/src/dragonhand/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_dragonhand"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/lib.rs b/fighters/kamui/src/lib.rs index 8e2ddcc726..929cbbc242 100644 --- a/fighters/kamui/src/lib.rs +++ b/fighters/kamui/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod dragonhand; +mod ryusensya; +mod spearhand; +mod waterdragon; use smash::{ lib::{ @@ -37,9 +44,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("kamui"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + dragonhand::install(); + ryusensya::install(); + spearhand::install(); + waterdragon::install(); } diff --git a/fighters/kamui/src/opff.rs b/fighters/kamui/src/opff.rs index f0c7667712..bd4300d459 100644 --- a/fighters/kamui/src/opff.rs +++ b/fighters/kamui/src/opff.rs @@ -127,8 +127,7 @@ pub unsafe fn kamui_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("kamui") - .on_line(Main, kamui_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, kamui_frame_wrapper); } diff --git a/fighters/kamui/src/ryusensya/acmd/mod.rs b/fighters/kamui/src/ryusensya/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/kamui/src/ryusensya/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/ryusensya/acmd/specials.rs b/fighters/kamui/src/ryusensya/acmd/specials.rs new file mode 100644 index 0000000000..6d973b4f94 --- /dev/null +++ b/fighters/kamui/src/ryusensya/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_RYUSENSYA_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 45, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + ATK_LERP_RATIO(agent, lerp); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} diff --git a/fighters/kamui/src/ryusensya/mod.rs b/fighters/kamui/src/ryusensya/mod.rs new file mode 100644 index 0000000000..94d7823ced --- /dev/null +++ b/fighters/kamui/src/ryusensya/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_ryusensya"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/spearhand/acmd/mod.rs b/fighters/kamui/src/spearhand/acmd/mod.rs new file mode 100644 index 0000000000..3c7129c773 --- /dev/null +++ b/fighters/kamui/src/spearhand/acmd/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod smashes; +mod specials; + +pub fn install(agent: &mut Agent) { + smashes::install(agent); + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/spearhand/acmd/smashes.rs b/fighters/kamui/src/spearhand/acmd/smashes.rs new file mode 100644 index 0000000000..655965d188 --- /dev/null +++ b/fighters/kamui/src/spearhand/acmd/smashes.rs @@ -0,0 +1,20 @@ +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 1.2); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); +} diff --git a/fighters/kamui/src/spearhand/acmd/specials.rs b/fighters/kamui/src/spearhand/acmd/specials.rs new file mode 100644 index 0000000000..a9f959f94a --- /dev/null +++ b/fighters/kamui/src/spearhand/acmd/specials.rs @@ -0,0 +1,84 @@ +use super::*; + +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); + let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); + let facing = PostureModule::lr(boma); + let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; + if GroundModule::line_segment_check(boma, + &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, + &Vector2f::zero(), + ground, + true).is_null() { + ATTACK(agent, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + ATTACK(agent, 0, 0, Hash40::new("drag2"), 7.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + } +} + +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + let tip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag8"), tip_pos, false); + let base_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; + ModelModule::joint_global_position(boma, Hash40::new("drag2"), base_pos, false); + let facing = PostureModule::lr(boma); + let ground = &mut Vector2f{ x: 0.0, y: 0.0 }; + // debug_draw_line( + // &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + // &Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, + // 500 + // ); + // debug_draw_circle(&Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, 5.0, 100); + // debug_draw_circle(&Vector2f{ x: tip_pos.x + (38.0 * facing), y: tip_pos.y - 35.0 }, 5.0, 100); + // debug_set_draw_color(255.0, 0.0, 0.0, 1.0); + if GroundModule::line_segment_check(boma, + &Vector2f{ x: base_pos.x + (10.0 * facing), y: base_pos.y - 8.0 }, + &Vector2f{ x: tip_pos.x + (35.0 * facing), y: tip_pos.y - 32.0 }, + &Vector2f::zero(), + ground, + true).is_null() { + ATTACK(agent, 1, 0, Hash40::new("drag8"), 17.0, 40, 90, 0, 32, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + ATTACK(agent, 0, 0, Hash40::new("drag2"), 8.0, 50, 100, 0, 25, 3.5, 4.0, 0.0, 0.0, Some(17.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_pierce"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_KAMUI_SPEARHAND_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); +} diff --git a/fighters/kamui/src/spearhand/mod.rs b/fighters/kamui/src/spearhand/mod.rs new file mode 100644 index 0000000000..0b75de640e --- /dev/null +++ b/fighters/kamui/src/spearhand/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_spearhand"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/kamui/src/status.rs b/fighters/kamui/src/status.rs index a3fc07cbb3..eea8ca5953 100644 --- a/fighters/kamui/src/status.rs +++ b/fighters/kamui/src/status.rs @@ -2,6 +2,6 @@ use super::*; mod special_lw; -pub fn install() { - special_lw::install(); +pub fn install(agent: &mut Agent) { + special_lw::install(agent); } diff --git a/fighters/kamui/src/status/special_lw.rs b/fighters/kamui/src/status/special_lw.rs index 2e5b807f00..cf18a3c03e 100644 --- a/fighters/kamui/src/status/special_lw.rs +++ b/fighters/kamui/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); special_lw_mot_helper(fighter); @@ -99,9 +101,7 @@ unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("kamui") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/kamui/src/waterdragon/acmd/mod.rs b/fighters/kamui/src/waterdragon/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/kamui/src/waterdragon/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/waterdragon/acmd/specials.rs b/fighters/kamui/src/waterdragon/acmd/specials.rs new file mode 100644 index 0000000000..cebe24b7d7 --- /dev/null +++ b/fighters/kamui/src/waterdragon/acmd/specials.rs @@ -0,0 +1,42 @@ +use super::*; + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 26.0, 30.0); + frame(lua_state, 26.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 80, 60, 0, 90, 8.0, 0.0, 8.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + if WorkModule::is_flag(boma, *WEAPON_KAMUI_WATERDRAGON_INSTANCE_WORK_ID_FLAG_SET_CRITICAL_HIT_SE) { + AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_kamui_criticalhit")); + } + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 5.0, 0.0, 21.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 6.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + } + frame(lua_state, 29.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 80, 60, 0, 90, 7.0, 0.0, 10.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 80, 60, 0, 90, 5.0, 0.0, 22.0, 15.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_OBJECT); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + } + frame(lua_state, 31.0); + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 37.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/kamui/src/waterdragon/mod.rs b/fighters/kamui/src/waterdragon/mod.rs new file mode 100644 index 0000000000..0575b3b678 --- /dev/null +++ b/fighters/kamui/src/waterdragon/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("kamui_waterdragon"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From e16064eff4e00bf4f890c53bf7c62e456b8354c2 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Fri, 22 Mar 2024 15:35:45 -0400 Subject: [PATCH 060/172] Icies wheeeeee --- Cargo.lock | 36 +- Cargo.toml | 9 +- fighters/Cargo.toml | 6 +- fighters/{nana => iceclimber}/Cargo.toml | 2 +- fighters/iceclimber/src/acmd/aerials.rs | 218 ++++++++ fighters/iceclimber/src/acmd/ground.rs | 86 +++ fighters/iceclimber/src/acmd/mod.rs | 18 + fighters/iceclimber/src/acmd/other.rs | 146 +++++ fighters/iceclimber/src/acmd/smashes.rs | 206 +++++++ fighters/iceclimber/src/acmd/specials.rs | 92 ++++ fighters/iceclimber/src/acmd/throws.rs | 509 ++++++++++++++++++ fighters/iceclimber/src/acmd/tilts.rs | 129 +++++ fighters/iceclimber/src/blizzard/acmd/mod.rs | 7 + .../iceclimber/src/blizzard/acmd/specials.rs | 26 + fighters/iceclimber/src/blizzard/mod.rs | 14 + fighters/{popo => iceclimber}/src/lib.rs | 22 +- fighters/{popo => iceclimber}/src/opff.rs | 32 +- fighters/{nana => iceclimber}/src/status.rs | 62 ++- fighters/nana/src/acmd/aerials.rs | 211 -------- fighters/nana/src/acmd/ground.rs | 54 -- fighters/nana/src/acmd/mod.rs | 18 - fighters/nana/src/acmd/other.rs | 261 --------- fighters/nana/src/acmd/smashes.rs | 161 ------ fighters/nana/src/acmd/specials.rs | 53 -- fighters/nana/src/acmd/throws.rs | 456 ---------------- fighters/nana/src/acmd/tilts.rs | 132 ----- fighters/nana/src/lib.rs | 57 -- fighters/nana/src/opff.rs | 48 -- fighters/popo/Cargo.toml | 13 - fighters/popo/src/acmd/aerials.rs | 208 ------- fighters/popo/src/acmd/ground.rs | 58 -- fighters/popo/src/acmd/mod.rs | 18 - fighters/popo/src/acmd/other.rs | 226 -------- fighters/popo/src/acmd/smashes.rs | 197 ------- fighters/popo/src/acmd/specials.rs | 45 -- fighters/popo/src/acmd/throws.rs | 183 ------- fighters/popo/src/acmd/tilts.rs | 132 ----- fighters/popo/src/status.rs | 42 -- src/fighters.rs | 4 +- 39 files changed, 1545 insertions(+), 2652 deletions(-) rename fighters/{nana => iceclimber}/Cargo.toml (96%) create mode 100644 fighters/iceclimber/src/acmd/aerials.rs create mode 100644 fighters/iceclimber/src/acmd/ground.rs create mode 100644 fighters/iceclimber/src/acmd/mod.rs create mode 100644 fighters/iceclimber/src/acmd/other.rs create mode 100644 fighters/iceclimber/src/acmd/smashes.rs create mode 100644 fighters/iceclimber/src/acmd/specials.rs create mode 100644 fighters/iceclimber/src/acmd/throws.rs create mode 100644 fighters/iceclimber/src/acmd/tilts.rs create mode 100644 fighters/iceclimber/src/blizzard/acmd/mod.rs create mode 100644 fighters/iceclimber/src/blizzard/acmd/specials.rs create mode 100644 fighters/iceclimber/src/blizzard/mod.rs rename fighters/{popo => iceclimber}/src/lib.rs (59%) rename fighters/{popo => iceclimber}/src/opff.rs (93%) rename fighters/{nana => iceclimber}/src/status.rs (58%) delete mode 100644 fighters/nana/src/acmd/aerials.rs delete mode 100644 fighters/nana/src/acmd/ground.rs delete mode 100644 fighters/nana/src/acmd/mod.rs delete mode 100644 fighters/nana/src/acmd/other.rs delete mode 100644 fighters/nana/src/acmd/smashes.rs delete mode 100644 fighters/nana/src/acmd/specials.rs delete mode 100644 fighters/nana/src/acmd/throws.rs delete mode 100644 fighters/nana/src/acmd/tilts.rs delete mode 100644 fighters/nana/src/lib.rs delete mode 100644 fighters/nana/src/opff.rs delete mode 100644 fighters/popo/Cargo.toml delete mode 100644 fighters/popo/src/acmd/aerials.rs delete mode 100644 fighters/popo/src/acmd/ground.rs delete mode 100644 fighters/popo/src/acmd/mod.rs delete mode 100644 fighters/popo/src/acmd/other.rs delete mode 100644 fighters/popo/src/acmd/smashes.rs delete mode 100644 fighters/popo/src/acmd/specials.rs delete mode 100644 fighters/popo/src/acmd/throws.rs delete mode 100644 fighters/popo/src/acmd/tilts.rs delete mode 100644 fighters/popo/src/status.rs diff --git a/Cargo.lock b/Cargo.lock index e3a3faa962..f3a477ca62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -610,6 +610,7 @@ dependencies = [ "gekkouga", "hash40 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hid-hdr", + "iceclimber", "ike", "inkling", "jack", @@ -637,7 +638,6 @@ dependencies = [ "miigunner", "miiswordsman", "murabito", - "nana", "ness", "ninput", "once_cell", @@ -653,7 +653,6 @@ dependencies = [ "pit", "pitb", "plizardon", - "popo", "purin", "pzenigame", "rand 0.7.4", @@ -719,6 +718,17 @@ dependencies = [ "skyline-web", ] +[[package]] +name = "iceclimber" +version = "0.1.0" +dependencies = [ + "dynamic", + "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "skyline_smash", + "smash_script", + "smashline", +] + [[package]] name = "ike" version = "0.1.0" @@ -1182,17 +1192,6 @@ dependencies = [ "smashline", ] -[[package]] -name = "nana" -version = "0.1.0" -dependencies = [ - "dynamic", - "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skyline_smash", - "smash_script", - "smashline", -] - [[package]] name = "ness" version = "0.1.0" @@ -1497,17 +1496,6 @@ dependencies = [ "smashline", ] -[[package]] -name = "popo" -version = "0.1.0" -dependencies = [ - "dynamic", - "skyline 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "skyline_smash", - "smash_script", - "smashline", -] - [[package]] name = "ppv-lite86" version = "0.2.17" diff --git a/Cargo.toml b/Cargo.toml index 9de4803671..273928be20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ gamewatch = { path = "fighters/gamewatch" } ganon = { path = "fighters/ganon" } gaogaen = { path = "fighters/gaogaen" } gekkouga = { path = "fighters/gekkouga" } +iceclimber = { path = "fighters/iceclimber" } ike = { path = "fighters/ike" } inkling = { path = "fighters/inkling" } jack = { path = "fighters/jack" } @@ -67,7 +68,6 @@ miifighter = { path = "fighters/miifighter" } miigunner = { path = "fighters/miigunner" } miiswordsman = { path = "fighters/miiswordsman" } murabito = { path = "fighters/murabito" } -nana = { path = "fighters/nana" } ness = { path = "fighters/ness" } packun = { path = "fighters/packun" } pacman = { path = "fighters/pacman" } @@ -81,7 +81,6 @@ pikmin = { path = "fighters/pikmin" } pit = { path = "fighters/pit" } pitb = { path = "fighters/pitb" } plizardon = { path = "fighters/plizardon" } -popo = { path = "fighters/popo" } purin = { path = "fighters/purin" } pzenigame = { path = "fighters/pzenigame" } reflet = { path = "fighters/reflet" } @@ -143,6 +142,7 @@ gamewatch = { workspace = true, optional = true } ganon = { workspace = true, optional = true } gaogaen = { workspace = true, optional = true } gekkouga = { workspace = true, optional = true } +iceclimber = { workspace = true, optional = true } ike = { workspace = true, optional = true } inkling = { workspace = true, optional = true } jack = { workspace = true, optional = true } @@ -169,7 +169,6 @@ miifighter = { workspace = true, optional = true } miigunner = { workspace = true, optional = true } miiswordsman = { workspace = true, optional = true } murabito = { workspace = true, optional = true } -nana = { workspace = true, optional = true } ness = { workspace = true, optional = true } packun = { workspace = true, optional = true } pacman = { workspace = true, optional = true } @@ -183,7 +182,6 @@ pikmin = { workspace = true, optional = true } pit = { workspace = true, optional = true } pitb = { workspace = true, optional = true } plizardon = { workspace = true, optional = true } -popo = { workspace = true, optional = true } purin = { workspace = true, optional = true } pzenigame = { workspace = true, optional = true } reflet = { workspace = true, optional = true } @@ -253,6 +251,7 @@ default = [ "ganon", "gaogaen", "gekkouga", + "iceclimber", "ike", "inkling", "jack", @@ -279,7 +278,6 @@ default = [ "miigunner", "miiswordsman", "murabito", - "nana", "ness", "packun", "pacman", @@ -293,7 +291,6 @@ default = [ "pit", "pitb", "plizardon", - "popo", "purin", "pzenigame", "reflet", diff --git a/fighters/Cargo.toml b/fighters/Cargo.toml index 8ba10e0af8..f830f987f8 100644 --- a/fighters/Cargo.toml +++ b/fighters/Cargo.toml @@ -28,7 +28,6 @@ lucario = { path = "./lucario", optional = true } zelda = { path = "./zelda", optional = true } kamui = { path = "./kamui", optional = true } wolf = { path = "./wolf", optional = true } -nana = { path = "./nana", optional = true } tantan = { path = "./tantan", optional = true } koopag = { path = "./koopag", optional = true } ridley = { path = "./ridley", optional = true } @@ -94,7 +93,7 @@ bayonetta = { path = "./bayonetta", optional = true } samus = { path = "./samus", optional = true } koopa = { path = "./koopa", optional = true } simon = { path = "./simon", optional = true } -popo = { path = "./popo", optional = true } +iceclimber = { path = "./iceclimber", optional = true } dedede = { path = "./dedede", optional = true } snake = { path = "./snake", optional = true } demon = { path = "./demon", optional = true } @@ -123,7 +122,6 @@ include-lucario = ["lucario"] include-zelda = ["zelda"] include-kamui = ["kamui"] include-wolf = ["wolf"] -include-nana = ["nana"] include-tantan = ["tantan"] include-koopag = ["koopag"] include-ridley = ["ridley"] @@ -189,7 +187,7 @@ include-bayonetta = ["bayonetta"] include-samus = ["samus"] include-koopa = ["koopa"] include-simon = ["simon"] -include-popo = ["popo"] +include-iceclimber = ["iceclimber"] include-dedede = ["dedede"] include-snake = ["snake"] include-demon = ["demon"] diff --git a/fighters/nana/Cargo.toml b/fighters/iceclimber/Cargo.toml similarity index 96% rename from fighters/nana/Cargo.toml rename to fighters/iceclimber/Cargo.toml index 43d13d0f95..94e5dc3681 100644 --- a/fighters/nana/Cargo.toml +++ b/fighters/iceclimber/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "nana" +name = "iceclimber" version = "0.1.0" edition = "2018" diff --git a/fighters/iceclimber/src/acmd/aerials.rs b/fighters/iceclimber/src/acmd/aerials.rs new file mode 100644 index 0000000000..6039831a82 --- /dev/null +++ b/fighters/iceclimber/src/acmd/aerials.rs @@ -0,0 +1,218 @@ + +use super::*; + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.3); + } +} + +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0 / (10.0 - 1.0)); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0 / (33.0 - 10.0)); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 33.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 6.0 / (36.0 - 33.0)); + AttackModule::clear_all(boma); + } + frame(lua_state, 36.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("havel"), -0.75, 7.0, 0, 0, 0, 0, 1.2, true); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + // skipping the frames where they bring hammer way above their head + FT_MOTION_RATE(agent, 1.0/(11.0 - 3.0)); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0 / (54.0 - 11.0)); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 54.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 22.0/(63.0 - 54.0)); + } + frame(lua_state, 60.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 63.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); + } +} + +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 18.0); + if is_excute(agent){ + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairn_nana", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairf_nana", game_attackairf); + agent.acmd("effect_attackairf_nana", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairb_nana", game_attackairb); + agent.acmd("effect_attackairb_nana", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairhi_nana", game_attackairhi); + agent.acmd("effect_attackairhi_nana", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + + agent.acmd("game_attackairlw_nana", game_attackairlw); + agent.acmd("effect_attackairlw_nana", effect_attackairlw); + + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); + + agent.acmd("effect_landingairlw_nana", effect_landingairlw); + agent.acmd("expression_landingairlw_nana", expression_landingairlw); +} diff --git a/fighters/iceclimber/src/acmd/ground.rs b/fighters/iceclimber/src/acmd/ground.rs new file mode 100644 index 0000000000..87b4a5fc1f --- /dev/null +++ b/fighters/iceclimber/src/acmd/ground.rs @@ -0,0 +1,86 @@ + +use super::*; + +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 2.5, 0.0, 5.0, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 3.0, 0.0, 5.0, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 180, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); + AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 12.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); + } + +} + +unsafe extern "C" fn game_attack11_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 2.5, 3.0, 5.0, 7.0, Some(-3.0), Some(5.0), Some(7.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 3.0, 3.0, 5.0, 10.0, Some(-3.0), Some(5.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 180, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 361, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 12.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); + } + +} + +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 24.0/(41.0 - 15.0)); + } + frame(lua_state, 41.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack11_nana", game_attack11_nana); + + agent.acmd("game_attackdash", game_attackdash); + + agent.acmd("game_attackdash_nana", game_attackdash); +} diff --git a/fighters/iceclimber/src/acmd/mod.rs b/fighters/iceclimber/src/acmd/mod.rs new file mode 100644 index 0000000000..095a2343a6 --- /dev/null +++ b/fighters/iceclimber/src/acmd/mod.rs @@ -0,0 +1,18 @@ +use super::*; +mod aerials; +mod tilts; +mod other; +mod smashes; +mod specials; +mod throws; +mod ground; + +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); +} \ No newline at end of file diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs new file mode 100644 index 0000000000..3397e4ed34 --- /dev/null +++ b/fighters/iceclimber/src/acmd/other.rs @@ -0,0 +1,146 @@ + +use super::*; + +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { + app::sv_math::rand(hash40("fighter"), 3) + } else { + 0 + }; + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} + } + } + frame(lua_state, 1.1); + if is_excute(agent) { + let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { + app::sv_math::rand(hash40("fighter"), 3) + } else { + 0 + }; + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} + } +} + +unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { + app::sv_math::rand(hash40("fighter"), 3) + } else { + 0 + }; + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} + } + } + frame(lua_state, 1.1); + if is_excute(agent) { + let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { + app::sv_math::rand(hash40("fighter"), 3) + } else { + 0 + }; + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} + } +} + +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } + +} + +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_popo_dash_start"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); + } + wait(lua_state, 11.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); + } +} + +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } + +} + +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); + + frame(lua_state, 29.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + frame(lua_state, escape_air_cancel_frame); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 29.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); + } + frame(lua_state, 39.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + + agent.acmd("sound_damageflyhi_nana", sound_damagefly_nana); + agent.acmd("sound_damageflylw_nana", sound_damagefly_nana); + agent.acmd("sound_damageflyn_nana", sound_damagefly_nana); + agent.acmd("sound_damageflyroll_nana", sound_damagefly_nana); + agent.acmd("sound_damageflytop_nana", sound_damagefly_nana); + + agent.acmd("game_dash", dash_game); + agent.acmd("sound_dash", dash_sound); + + agent.acmd("game_turndash", turn_dash_game); + + agent.acmd("game_escapeair", escape_air_game); + + agent.acmd("game_escapeairslide", escape_air_slide_game); +} diff --git a/fighters/iceclimber/src/acmd/smashes.rs b/fighters/iceclimber/src/acmd/smashes.rs new file mode 100644 index 0000000000..cce5234621 --- /dev/null +++ b/fighters/iceclimber/src/acmd/smashes.rs @@ -0,0 +1,206 @@ + +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + FT_MOTION_RATE(agent, 2.0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 10.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); + } + frame(lua_state, 5.0); + app::sv_animcmd::execute(lua_state, 5.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + } + frame(lua_state, 30.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 8); + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.3); + } +} + +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + } + frame(lua_state, 6.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 8.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } + frame(lua_state, 44.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4_nana", game_attacks4); + agent.acmd("effect_attacks4_nana", effect_attacks4); + agent.acmd("expression_attacks4_nana", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attackhi4_nana", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); + + agent.acmd("game_attacklw4_nana", game_attacklw4); + agent.acmd("effect_attacklw4_nana", effect_attacklw4); + agent.acmd("expression_attacklw4_nana", expression_attacklw4); +} diff --git a/fighters/iceclimber/src/acmd/specials.rs b/fighters/iceclimber/src/acmd/specials.rs new file mode 100644 index 0000000000..725b91d8be --- /dev/null +++ b/fighters/iceclimber/src/acmd/specials.rs @@ -0,0 +1,92 @@ + +use super::*; + +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); + } +} + +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 50.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + + agent.acmd("game_specialn_nana", game_specialn_nana); + + agent.acmd("game_specialairn", game_specialairn); + + agent.acmd("game_specialairn_nana", game_specialairn_nana); +} diff --git a/fighters/iceclimber/src/acmd/throws.rs b/fighters/iceclimber/src/acmd/throws.rs new file mode 100644 index 0000000000..4b22b913c0 --- /dev/null +++ b/fighters/iceclimber/src/acmd/throws.rs @@ -0,0 +1,509 @@ + +use super::*; + +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.2); + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + } + game_CaptureCutCommon(agent); + wait(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.176); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); + GrabModule::set_rebound(boma, false); + } +} + +unsafe extern "C" fn sound_catch_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } +} + +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.285); + frame(lua_state, 7.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + } + game_CaptureCutCommon(agent); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.21); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); + GrabModule::set_rebound(boma, false); + } +} + +unsafe extern "C" fn sound_catchdash_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 23.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_popo_landing01")); + } +} + +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.125); + frame(lua_state, 8.0); + if is_excute(agent) { + GrabModule::set_rebound(boma, true); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + } + game_CaptureCutCommon(agent); + wait(lua_state, 2.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); + GrabModule::set_rebound(boma, false); + } +} + +unsafe extern "C" fn sound_catchturn_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_02")); + } +} + +unsafe extern "C" fn game_catchattack_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.8, 0.0, 7.2, 7.4, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_catchattack_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 11, -1.5, 10, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } +} + +unsafe extern "C" fn expression_catchattack_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); + } +} + +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // scale attack startup based on opponent weight + let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); + FT_MOTION_RATE(agent, ((weight/100.00) * 32.0) / 36.0); + } + frame(lua_state, 36.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + CHECK_FINISH_CAMERA(agent, 10, 4); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 17.0/(49.0 - 37.0)); + } +} + +unsafe extern "C" fn effect_throwlw_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 28.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4.5, 5.4, 8, -90, 0, 0, 0.9, true); + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 9, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn sound_throwlw_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack04")); + } + frame(lua_state, 25.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_03")); + } + frame(lua_state, 28.0); + if is_excute(agent) { + PLAY_DOWN_SE(agent, Hash40::new("se_common_down_s_01")); + PLAY_SE(agent, Hash40::new("se_common_kick_hit_m")); + } +} + +unsafe extern "C" fn expression_throwlw_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 4, false, 0x50000000 /* default value */); + } + frame(lua_state, 26.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 29.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 48.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, 16, 9); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_throwf_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 22.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 8, 1, 163.714, 220.144, -140.09, 1.35, true, *EF_FLIP_YZ); + } + frame(lua_state, 29.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwf_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + PLAY_SE(agent, Hash40::new("vc_nana_attack01")); + } + frame(lua_state, 21.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_popo_swing_l")); + } +} + +unsafe extern "C" fn expression_throwf_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 24.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } +} + +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE(agent, 28.0/20.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, 2, 19); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_throwhi_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 24.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 25.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), -1.5, 10, -3, 180, -90, -270, 1.3, true, *EF_FLIP_YZ); + } + frame(lua_state, 33.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwhi_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 22.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack03")); + PLAY_SE(agent, Hash40::new("se_popo_swing_ll")); + } +} + +unsafe extern "C" fn expression_throwhi_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 22.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + } + frame(lua_state, 25.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 41.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } +} + +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 9.0); + if is_excute(agent) { + REVERSE_LR(agent); + } + frame(lua_state, 17.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 10); + // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + } +} + +unsafe extern "C" fn effect_throwb_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), -5, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 17.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 16.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + } +} + +unsafe extern "C" fn sound_throwb_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_nana_attack02")); + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + } +} + +unsafe extern "C" fn expression_throwb_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 14); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); + } + frame(lua_state, 31.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 10); + } + frame(lua_state, 44.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + + agent.acmd("game_catch_nana", game_catch); + agent.acmd("sound_catch_nana", sound_catch_nana); + + agent.acmd("game_catchdash", game_catchdash); + + agent.acmd("game_catchdash_nana", game_catchdash); + agent.acmd("sound_catchdash_nana", sound_catchdash_nana); + + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchturn_nana", game_catchturn); + agent.acmd("sound_catchturn_nana", sound_catchturn_nana); + + agent.acmd("game_catchattack_nana", game_catchattack_nana); + agent.acmd("effect_catchattack_nana", effect_catchattack_nana); + agent.acmd("expression_catchattack_nana", expression_catchattack_nana); + + agent.acmd("game_throwlw", game_throwlw); + + agent.acmd("game_throwlw_nana", game_throwlw); + agent.acmd("effect_throwlw_nana", effect_throwlw_nana); + agent.acmd("sound_throwlw_nana", sound_throwlw_nana); + agent.acmd("expression_throwlw_nana", expression_throwlw_nana); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwf_nana", game_throwf); + agent.acmd("effect_throwf_nana", effect_throwf_nana); + agent.acmd("sound_throwf_nana", sound_throwf_nana); + agent.acmd("expression_throwf_nana", expression_throwf_nana); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwhi_nana", game_throwhi); + agent.acmd("effect_throwhi_nana", effect_throwhi_nana); + agent.acmd("sound_throwhi_nana", sound_throwhi_nana); + agent.acmd("expression_throwhi_nana", expression_throwhi_nana); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwb_nana", game_throwb); + agent.acmd("effect_throwb_nana", effect_throwb_nana); + agent.acmd("sound_throwb_nana", sound_throwb_nana); + agent.acmd("expression_throwb_nana", expression_throwb_nana); +} diff --git a/fighters/iceclimber/src/acmd/tilts.rs b/fighters/iceclimber/src/acmd/tilts.rs new file mode 100644 index 0000000000..4dd0100471 --- /dev/null +++ b/fighters/iceclimber/src/acmd/tilts.rs @@ -0,0 +1,129 @@ + +use super::*; + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} + +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} + +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + FT_MOTION_RATE(agent, 16.0 / (32.0 - 9.0)); + } + frame(lua_state, 32.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + for _ in 0..3 { + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); + } + wait(lua_state, 5.0); + } + frame(lua_state, 32.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); + } +} + +unsafe extern "C" fn popo_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.714); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + ATTACK(agent, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3); + + agent.acmd("game_attacks3hi_nana", game_attacks3); + + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attacks3_nana", game_attacks3); + + agent.acmd("game_attackslw", game_attacks3lw); + + agent.acmd("game_attackslw_nana", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attackhi3_nana", game_attackhi3); + agent.acmd("effect_attackhi3_nana", effect_attackhi3); + + agent.acmd("game_attacklw3", popo_attack_lw3_game); + + agent.acmd("game_attacklw3_nana", popo_attack_lw3_game); +} diff --git a/fighters/iceclimber/src/blizzard/acmd/mod.rs b/fighters/iceclimber/src/blizzard/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/iceclimber/src/blizzard/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/iceclimber/src/blizzard/acmd/specials.rs b/fighters/iceclimber/src/blizzard/acmd/specials.rs new file mode 100644 index 0000000000..d2a07ce82c --- /dev/null +++ b/fighters/iceclimber/src/blizzard/acmd/specials.rs @@ -0,0 +1,26 @@ + +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); + } + wait(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/iceclimber/src/blizzard/mod.rs b/fighters/iceclimber/src/blizzard/mod.rs new file mode 100644 index 0000000000..8ac26fb25e --- /dev/null +++ b/fighters/iceclimber/src/blizzard/mod.rs @@ -0,0 +1,14 @@ +use super::*; + +mod acmd; + +pub fn install() { + let popo = &mut Agent::new("popo_blizzard"); + let nana = &mut Agent::new("nana_blizzard"); + + acmd::install(popo); + acmd::install(nana); + + popo.install(); + nana.install(); +} \ No newline at end of file diff --git a/fighters/popo/src/lib.rs b/fighters/iceclimber/src/lib.rs similarity index 59% rename from fighters/popo/src/lib.rs rename to fighters/iceclimber/src/lib.rs index 7bb0378152..041c56b595 100644 --- a/fighters/popo/src/lib.rs +++ b/fighters/iceclimber/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod status; pub mod opff; +mod blizzard; + use smash::{ lib::{ L2CValue, @@ -39,7 +41,21 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let popo = &mut Agent::new("popo"); + let nana = &mut Agent::new("nana"); + + acmd::install(popo); + acmd::install(nana); + + status::install(popo); + status::install(nana); + status::install_nana(nana); + + opff::install_popo(popo); + opff::install_nana(nana); + + popo.install(); + nana.install(); + + blizzard::install(); } diff --git a/fighters/popo/src/opff.rs b/fighters/iceclimber/src/opff.rs similarity index 93% rename from fighters/popo/src/opff.rs rename to fighters/iceclimber/src/opff.rs index f494584b05..c48b377db6 100644 --- a/fighters/popo/src/opff.rs +++ b/fighters/iceclimber/src/opff.rs @@ -192,10 +192,6 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { } } -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - // nothing lol -} - #[no_mangle] pub unsafe extern "Rust" fn ice_climbers_common(fighter: &mut L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { @@ -217,18 +213,30 @@ pub unsafe fn ice_climbers_moveset(fighter: &mut L2CFighterCommon, boma: &mut Ba pub extern "C" fn popo_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { common::opff::fighter_common_opff(fighter); - popo_frame(fighter); ice_climbers_common(fighter); } } -pub unsafe fn popo_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +// Ice Climbers Cheer Cancel (Techy) +unsafe fn cheer_cancel(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_POPO_STATUS_KIND_THROW_NANA) { + MotionModule::set_frame(fighter.module_accessor, MotionModule::end_frame(fighter.module_accessor), true); + StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_WAIT, true); + } +} + +pub extern "C" fn nana_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + unsafe { + common::opff::fighter_common_opff(fighter); + ice_climbers_common(fighter); + cheer_cancel(fighter); } } -pub fn install() { - smashline::Agent::new("popo") - .on_line(Main, popo_frame_wrapper) - .install(); + +pub fn install_popo(agent: &mut Agent) { + agent.on_line(Main, popo_frame_wrapper); +} + +pub fn install_nana(agent: &mut Agent) { + agent.on_line(Main, nana_frame_wrapper); } diff --git a/fighters/nana/src/status.rs b/fighters/iceclimber/src/status.rs similarity index 58% rename from fighters/nana/src/status.rs rename to fighters/iceclimber/src/status.rs index d2014a74b9..48d325969f 100644 --- a/fighters/nana/src/status.rs +++ b/fighters/iceclimber/src/status.rs @@ -1,16 +1,31 @@ use super::*; use globals::*; -utils::import!(popo::{ics_dash}); // status script import - + +unsafe extern "C" fn ics_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[OBJECT_ID] == FIGHTER_KIND_NANA { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_POPO_INSTANCE_WORK_ID_FLAG_ENABLE_TRANSITION_FORBID) { + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } + } + fighter.status_Dash_Main(); + 0.into() +} // FIGHTER_STATUS_KIND_DASH // pub unsafe extern "C" fn dash(fighter: &mut L2CFighterCommon) -> L2CValue { - popo::ics_dash(fighter) + fighter.status_Dash_Sub(); + fighter.sub_shift_status_main(L2CValue::Ptr(ics_dash_main as *const () as _)) } -pub unsafe extern "C" fn throw(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP // + +pub unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +pub unsafe extern "C" fn throw_nana(fighter: &mut L2CFighterCommon) -> L2CValue { // TODO: this check has issues. // - if we grab on a platform far off stage (like smashville) this check fails @@ -48,14 +63,14 @@ pub unsafe extern "C" fn throw(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.boma(), Hash40::new(throw_name), 0.0, 1.0, false, 0.0, false, false); // shift into the L2CFighterCommon's throw impl (instead of nana's default, modified impl) - return fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Throw_Main as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Throw_Main as *const () as _)) } -unsafe extern "C" fn catchwait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(catchwait_main_loop as *const () as _)) +unsafe extern "C" fn catchwait_nana_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(catchwait_nana_main_loop as *const () as _)) } -unsafe extern "C" fn catchwait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catchwait_nana_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // let boma = fighter.boma(); // let opponent_boma = boma.get_grabbed_opponent_boma(); // let damage = DamageModule::damage(opponent_boma, 0); @@ -67,21 +82,16 @@ unsafe extern "C" fn catchwait_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// uncomment this to prevent buffering pummels with nana -// #[status_script(agent = "nana", status = FIGHTER_STATUS_KIND_CATCH_ATTACK, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// unsafe fn catchattack_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// fighter.sub_shift_status_main(L2CValue::Ptr(catchattack_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn catchattack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// fighter.change_status(FIGHTER_STATUS_KIND_THROW.into(), false.into()); -// 0.into() -// } - -pub fn install() { - smashline::Agent::new("nana") - .status(Main, *FIGHTER_STATUS_KIND_DASH, dash) - .status(Main, *FIGHTER_STATUS_KIND_THROW, throw) - .status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catchwait_main) - .install(); -} \ No newline at end of file +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_DASH, dash); + agent.status( + Exit, + *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, + special_hi_jump_exit, + ); +} + +pub fn install_nana(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_THROW, throw_nana); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catchwait_nana_main); +} diff --git a/fighters/nana/src/acmd/aerials.rs b/fighters/nana/src/acmd/aerials.rs deleted file mode 100644 index 64a9ca2586..0000000000 --- a/fighters/nana/src/acmd/aerials.rs +++ /dev/null @@ -1,211 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn nana_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} - -unsafe extern "C" fn nana_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_effect_attackairb_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn nana_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0 / (10.0 - 1.0)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0 / (33.0 - 10.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0 / (36.0 - 33.0)); - AttackModule::clear_all(boma); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn nana_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn nana_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - // skipping the frames where they bring hammer way above their head - FT_MOTION_RATE(fighter, 1.0/(11.0 - 3.0)); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0 / (54.0 - 11.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 22.0/(63.0 - 54.0)); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn effect_attackairlw_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn nana_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("havel"), 0.0, 7.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn nana_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 18.0); - if is_excute(fighter){ - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attackairn_nana", nana_attack_air_n_game) - .acmd("game_attackairf_nana", nana_attack_air_f_game) - .acmd("effect_attackairf_nana", nana_attack_air_f_effect) - .acmd("game_attackairb_nana", nana_attack_air_b_game) - .acmd("effect_attackairb_nana", nana_effect_attackairb_nana) - .acmd("game_attackairhi_nana", nana_attack_air_hi_game) - .acmd("effect_attackairhi_nana", nana_attack_air_hi_effect) - .acmd("game_attackairlw_nana", nana_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .acmd("effect_attackairlw_nana", effect_attackairlw_nana) - .acmd("effect_landingairlw_nana", nana_landing_air_lw_effect) - .acmd("expression_landingairlw_nana", nana_landing_air_lw_expression) - .install(); -} \ No newline at end of file diff --git a/fighters/nana/src/acmd/ground.rs b/fighters/nana/src/acmd/ground.rs deleted file mode 100644 index bc3b60bd75..0000000000 --- a/fighters/nana/src/acmd/ground.rs +++ /dev/null @@ -1,54 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 2.5, 3.0, 5.0, 7.0, Some(-3.0), Some(5.0), Some(7.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 361, 25, 0, 25, 3.0, 3.0, 5.0, 10.0, Some(-3.0), Some(5.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 180, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 361, 15, 0, 25, 3.5, 3.0, 5.0, 13.0, Some(-3.0), Some(5.0), Some(13.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } - -} - -unsafe extern "C" fn nana_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 24.0/(41.0 - 15.0)); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attack11_nana", nana_attack_11_game) - .acmd("game_attackdash_nana", nana_attack_dash_game) - .install(); -} diff --git a/fighters/nana/src/acmd/mod.rs b/fighters/nana/src/acmd/mod.rs deleted file mode 100644 index 484e04a282..0000000000 --- a/fighters/nana/src/acmd/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -use super::*; -mod aerials; -mod tilts; -mod other; -mod smashes; -mod specials; -mod throws; -mod ground; - -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} \ No newline at end of file diff --git a/fighters/nana/src/acmd/other.rs b/fighters/nana/src/acmd/other.rs deleted file mode 100644 index 95da7b04e2..0000000000 --- a/fighters/nana/src/acmd/other.rs +++ /dev/null @@ -1,261 +0,0 @@ - -use super::*; - -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_popo_dash_start"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); - } - wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); - } -} - -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - - frame(lua_state, 29.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 29.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); - } - frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn blizzard_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn nana_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.8, 0.0, 7.2, 7.4, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_catch_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 11, -1.5, 10, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - } -} - -unsafe extern "C" fn nana_catch_attack_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash_nana", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash_nana", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_catchattack_nana", nana_catch_attack_game) - .acmd("effect_catchattack_nana", nana_catch_attack_effect) - .acmd("expression_catchattack_nana", nana_catch_attack_expression) - .install(); - smashline::Agent::new("nana_blizzard") - .acmd("game_fly", blizzard_fly_game) - .install(); -} diff --git a/fighters/nana/src/acmd/smashes.rs b/fighters/nana/src/acmd/smashes.rs deleted file mode 100644 index c1f5db1728..0000000000 --- a/fighters/nana/src/acmd/smashes.rs +++ /dev/null @@ -1,161 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn nana_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attacks4_nana", nana_attack_s4_s_game) - .acmd("effect_attacks4_nana", nana_attack_s4_s_effect) - .acmd("game_attackhi4_nana", nana_attack_hi4_game) - .acmd("game_attacklw4_nana", nana_attack_lw4_game) - .acmd("effect_attacklw4_nana", effect_attacklw4) - .acmd("expression_attacklw4_nana", nana_attack_lw4_expression) - .install(); -} diff --git a/fighters/nana/src/acmd/specials.rs b/fighters/nana/src/acmd/specials.rs deleted file mode 100644 index a99b4afdc5..0000000000 --- a/fighters/nana/src/acmd/specials.rs +++ /dev/null @@ -1,53 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); - } -} - -unsafe extern "C" fn nana_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_ENABLE_COUPLE); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_specialn_nana", nana_special_n_game) - .acmd("game_specialairn_nana", nana_special_air_n_game) - .install(); -} diff --git a/fighters/nana/src/acmd/throws.rs b/fighters/nana/src/acmd/throws.rs deleted file mode 100644 index 190ea7f3b8..0000000000 --- a/fighters/nana/src/acmd/throws.rs +++ /dev/null @@ -1,456 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.176); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } -} - -unsafe extern "C" fn nana_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } -} - -unsafe extern "C" fn nana_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.285); - frame(lua_state, 7.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.21); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } - -} - -unsafe extern "C" fn nana_catch_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_popo_landing01")); - } -} - -unsafe extern "C" fn nana_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.125); - frame(lua_state, 8.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } -} - -unsafe extern "C" fn nana_catch_turn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_02")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_02")); - } -} - -unsafe extern "C" fn nana_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - // scale attack startup based on opponent weight - let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE(fighter, ((weight/100.00) * 32.0) / 36.0); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CHECK_FINISH_CAMERA(fighter, 10, 4); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 17.0/(49.0 - 37.0)); - } -} - -unsafe extern "C" fn nana_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4.5, 5.4, 8, -90, 0, 0, 0.9, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 9, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_throw_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack04")); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_03")); - } - frame(lua_state, 28.0); - if is_excute(fighter) { - PLAY_DOWN_SE(fighter, Hash40::new("se_common_down_s_01")); - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_m")); - } -} - -unsafe extern "C" fn nana_throw_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 4, false, 0x50000000 /* default value */); - } - frame(lua_state, 26.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -unsafe extern "C" fn nana_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 9); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 22.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 8, 1, 163.714, 220.144, -140.09, 1.35, true, *EF_FLIP_YZ); - } - frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn nana_throw_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - PLAY_SE(fighter, Hash40::new("vc_nana_attack01")); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_popo_swing_l")); - } -} - -unsafe extern "C" fn nana_throw_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn nana_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - FT_MOTION_RATE(fighter, 28.0/20.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 19); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 24.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), -1.5, 10, -3, 180, -90, -270, 1.3, true, *EF_FLIP_YZ); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn nana_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack03")); - PLAY_SE(fighter, Hash40::new("se_popo_swing_ll")); - } -} - -unsafe extern "C" fn nana_throw_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } -} - -unsafe extern "C" fn nana_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 10); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - } -} - -unsafe extern "C" fn nana_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), -5, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 16.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn nana_throw_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_nana_attack02")); - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); - } -} - -unsafe extern "C" fn nana_throw_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 14); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, 0x50000000 /* default value */); - } - frame(lua_state, 31.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 10); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_catch_nana", nana_catch_game) - .acmd("sound_catch_nana", nana_catch_sound) - .acmd("game_catchdash_nana", nana_catch_dash_game) - .acmd("sound_catchdash_nana", nana_catch_dash_sound) - .acmd("game_catchturn_nana", nana_catch_turn_game) - .acmd("sound_catchturn_nana", nana_catch_turn_sound) - .acmd("game_throwlw_nana", nana_throw_lw_game) - .acmd("effect_throwlw_nana", nana_throw_lw_effect) - .acmd("sound_throwlw_nana", nana_throw_lw_sound) - .acmd("expression_throwlw_nana", nana_throw_lw_expression) - .acmd("game_throwf_nana", nana_throw_f_game) - .acmd("effect_throwf_nana", nana_throw_f_effect) - .acmd("sound_throwf_nana", nana_throw_f_sound) - .acmd("expression_throwf_nana", nana_throw_f_expression) - .acmd("game_throwhi_nana", nana_throw_hi_game) - .acmd("effect_throwhi_nana", nana_throw_hi_effect) - .acmd("sound_throwhi_nana", nana_throw_hi_sound) - .acmd("expression_throwhi_nana", nana_throw_hi_expression) - .acmd("game_throwb_nana", nana_throw_b_game) - .acmd("effect_throwb_nana", nana_throw_b_effect) - .acmd("sound_throwb_nana", nana_throw_b_sound) - .acmd("expression_throwb_nana", nana_throw_b_expression) - .install(); -} diff --git a/fighters/nana/src/acmd/tilts.rs b/fighters/nana/src/acmd/tilts.rs deleted file mode 100644 index 48a8d126d7..0000000000 --- a/fighters/nana/src/acmd/tilts.rs +++ /dev/null @@ -1,132 +0,0 @@ - -use super::*; - -unsafe extern "C" fn nana_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn nana_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - FT_MOTION_RATE(fighter, 16.0 / (32.0 - 9.0)); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn nana_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); - } - wait(lua_state, 5.0); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } -} - -unsafe extern "C" fn nana_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.714); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .acmd("game_attacks3hi_nana", nana_attack_s3_hi_game) - .acmd("game_attacks3_nana", nana_attack_s3_s_game) - .acmd("game_attacks3lw_nana", nana_attack_s3_lw_game) - .acmd("game_attackhi3_nana", nana_attack_hi3_game) - .acmd("effect_attackhi3_nana", nana_attack_hi3_effect) - .acmd("game_attacklw3_nana", nana_attack_lw3_game) - .install(); -} diff --git a/fighters/nana/src/lib.rs b/fighters/nana/src/lib.rs deleted file mode 100644 index 40e3787ac4..0000000000 --- a/fighters/nana/src/lib.rs +++ /dev/null @@ -1,57 +0,0 @@ -#![deny(deprecated)] -#![allow(unused)] -#![allow(non_snake_case)] - -pub mod acmd; - -pub mod status; -pub mod opff; - -use smash::{ - lib::{ - L2CValue, - LuaConst, - }, - app::{ - *, - self, - sv_animcmd::{ - frame, - wait - }, - lua_bind::* - }, - hash40, - lib::lua_const::*, - lua2cpp::*, - phx::* -}; -use smash_script::{ - *, - macros::* -}; -use utils::{ - *, - util::*, - ext::*, - consts::*, -}; -use smashline::*; - -pub fn install() { - acmd::install(); - status::install(); - opff::install(); - - // NOPs nana's change_status call (inner impl) to the FIGHTER_POPO_STATUS_KIND_THROW_NANA status when buffered - skyline::patching::Patch::in_text(0xfb6434).nop(); - - // NOPs nana's change_motion call (inner impl) to the throw animations (her cheer animations) status when buffered - skyline::patching::Patch::in_text(0xfb6540).nop(); - - // NOPs nana's change_status call (inner impl) to the FIGHTER_POPO_STATUS_KIND_THROW_NANA status status when not buffered - skyline::patching::Patch::in_text(0xfba3e8).nop(); - - // NOPs nana's change_motion call (inner impl) to the throw animations (her cheer animations) status when not buffered - skyline::patching::Patch::in_text(0xfbb8d0).nop(); -} diff --git a/fighters/nana/src/opff.rs b/fighters/nana/src/opff.rs deleted file mode 100644 index 9f231ec4ba..0000000000 --- a/fighters/nana/src/opff.rs +++ /dev/null @@ -1,48 +0,0 @@ -// opff import -utils::import_noreturn!(common::opff::fighter_common_opff); -use super::*; -use globals::*; - -// Ice Climbers Cheer Cancel (Techy) -unsafe fn cheer_cancel(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_POPO_STATUS_KIND_THROW_NANA) { - MotionModule::set_frame(fighter.module_accessor, MotionModule::end_frame(fighter.module_accessor), true); - StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_WAIT, true); - } -} - -// symbol-based call for the shotos' common opff -extern "Rust" { - fn ice_climbers_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); -} - -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - // nothing lol -} - -pub fn cheer_cancel_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - cheer_cancel(fighter); - } -} - -pub extern "C" fn nana_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - unsafe { - common::opff::fighter_common_opff(fighter); - nana_frame(fighter); - ice_climbers_common(fighter); - cheer_cancel_wrapper(fighter); - } -} - -pub unsafe fn nana_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); - } -} - -pub fn install() { - smashline::Agent::new("nana") - .on_line(Main, nana_frame_wrapper) - .install(); -} \ No newline at end of file diff --git a/fighters/popo/Cargo.toml b/fighters/popo/Cargo.toml deleted file mode 100644 index 81e375d7b3..0000000000 --- a/fighters/popo/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "popo" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -utils = { package = "dynamic", path = "../../dynamic" } -skyline = "0.2.1" -skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] } -smash_script = { git = "https://github.com/blu-dev/smash-script", branch = "development" } -smashline = { git = "https://github.com/HDR-Development/smashline" } \ No newline at end of file diff --git a/fighters/popo/src/acmd/aerials.rs b/fighters/popo/src/acmd/aerials.rs deleted file mode 100644 index d2d1ccf5e6..0000000000 --- a/fighters/popo/src/acmd/aerials.rs +++ /dev/null @@ -1,208 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 7.0, 361, 100, 0, 20, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn popo_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.0, 285, 66, 0, 30, 3.0, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 70, 100, 0, 40, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 70, 100, 0, 40, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc"), Hash40::new("popo_attack_arc"), Hash40::new("top"), 2, 8, 1, 4.3, -22.9, -89.6, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } -} - -unsafe extern "C" fn popo_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 9.0, 361, 134, 0, 25, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_attack_arc_b"), Hash40::new("popo_attack_arc_b"), Hash40::new("top"), 0.5, 6, -3, 16.42, 228.9, -5.3, 1.25, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn popo_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0 / (10.0 - 1.0)); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0 / (33.0 - 10.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 70, 140, 0, 10, 3.5, -0.75, 7.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0 / (36.0 - 33.0)); - AttackModule::clear_all(boma); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } -} - -unsafe extern "C" fn popo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("havel"), -0.75, 7.0, 0, 0, 0, 0, 1.2, true); - } -} - -unsafe extern "C" fn popo_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - // skipping the frames where they bring hammer way above their head - FT_MOTION_RATE(fighter, 1.0/(11.0 - 3.0)); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0 / (54.0 - 11.0)); - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 10.0, 65, 41, 0, 80, 4.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 54.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 22.0/(63.0 - 54.0)); - } - frame(lua_state, 60.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 63.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn effect_attackairlw_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("popo_air_lw"), Hash40::new("top"), 0, 0, 0, -5, 0, 0, 1, true); - } -} - -unsafe extern "C" fn popo_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn popo_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 18.0); - if is_excute(fighter){ - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attackairn", popo_attack_air_n_game) - .acmd("game_attackairf", popo_attack_air_f_game) - .acmd("effect_attackairf", popo_attack_air_f_effect) - .acmd("game_attackairb", popo_attack_air_b_game) - .acmd("effect_attackairb", popo_effect_attackairb) - .acmd("game_attackairhi", popo_attack_air_hi_game) - .acmd("effect_attackairhi", popo_attack_air_hi_effect) - .acmd("game_attackairlw", popo_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .acmd("effect_attackairlw_nana", effect_attackairlw_nana) - .acmd("effect_landingairlw", popo_landing_air_lw_effect) - .acmd("expression_landingairlw", popo_landing_air_lw_expression) - .install(); -} diff --git a/fighters/popo/src/acmd/ground.rs b/fighters/popo/src/acmd/ground.rs deleted file mode 100644 index fe8650146d..0000000000 --- a/fighters/popo/src/acmd/ground.rs +++ /dev/null @@ -1,58 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 2.5, 0.0, 5.0, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 25, 0, 25, 3.0, 0.0, 5.0, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 180, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.5, 0.0, 5.0, 12.3, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); - AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); - } - -} - -unsafe extern "C" fn popo_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 70, 40, 0, 90, 5.0, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 70, 40, 0, 90, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 24.0/(41.0 - 15.0)); - } - frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attack11", popo_attack_11_game) - .acmd("game_attackdash", popo_attack_dash_game) - .install(); -} diff --git a/fighters/popo/src/acmd/mod.rs b/fighters/popo/src/acmd/mod.rs deleted file mode 100644 index 484e04a282..0000000000 --- a/fighters/popo/src/acmd/mod.rs +++ /dev/null @@ -1,18 +0,0 @@ -use super::*; -mod aerials; -mod tilts; -mod other; -mod smashes; -mod specials; -mod throws; -mod ground; - -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} \ No newline at end of file diff --git a/fighters/popo/src/acmd/other.rs b/fighters/popo/src/acmd/other.rs deleted file mode 100644 index 6d5cffa367..0000000000 --- a/fighters/popo/src/acmd/other.rs +++ /dev/null @@ -1,226 +0,0 @@ - -use super::*; - -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_popo_dash_start"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); - } - wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_right_l"), Hash40::new("se_popo_step_left_l")); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_popo_step_left_l"), Hash40::new("se_popo_step_right_l")); - } -} - -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - - frame(lua_state, 29.0); - if is_excute(fighter) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - frame(lua_state, 29.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); - } - frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn blizzard_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 361, 60, 0, 10, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 60, 0, 10, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 20, 0, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.65, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_NONE); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("popo_blizzard") - .acmd("game_fly", blizzard_fly_game) - .install(); -} diff --git a/fighters/popo/src/acmd/smashes.rs b/fighters/popo/src/acmd/smashes.rs deleted file mode 100644 index 6751aff51f..0000000000 --- a/fighters/popo/src/acmd/smashes.rs +++ /dev/null @@ -1,197 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 12.5, 361, 110, 0, 50, 5.0, 1.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - FT_MOTION_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 110, 0, 50, 5.0, 0.0, 4.5, 2.0, Some(0.0), Some(4.5), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc"), Hash40::new("popo_smash_arc"), Hash40::new("top"), -1, 9, 5, -146, -160, 80, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), -4.5, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 8, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_crown"), Hash40::new("sys_crown"), Hash40::new("top"), 7, 0, 5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - } -} - -unsafe extern "C" fn popo_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); - } - frame(lua_state, 5.0); - app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 8); - } -} - -unsafe extern "C" fn popo_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 3.0, -0.8, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 11.0, 83, 110, 0, 50, 5.0, -0.8, 8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 83, 110, 0, 50, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 7.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 12.0, 40, 110, 0, 50, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 6, 7, -10, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("popo_smash_arc_b"), Hash40::new("popo_smash_arc_b"), Hash40::new("top"), 1.5, 2.5, 1, 180, -75, 180, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.3); - } -} - -unsafe extern "C" fn popo_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 15.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); - } - frame(lua_state, 44.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_ATTACK_LW4_FLAG_NANA_START_TURN); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attacks4", popo_attack_s4_s_game) - .acmd("effect_attacks4", popo_attack_s4_s_effect) - .acmd("expression_attacks4", popo_attack_s4_s_expression) - .acmd("game_attackhi4", popo_attack_hi4_game) - .acmd("game_attacklw4", popo_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .acmd("expression_attacklw4", popo_attack_lw4_expression) - .install(); -} diff --git a/fighters/popo/src/acmd/specials.rs b/fighters/popo/src/acmd/specials.rs deleted file mode 100644 index 3a586c46df..0000000000 --- a/fighters/popo/src/acmd/specials.rs +++ /dev/null @@ -1,45 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_POPO_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 9.0, 80, 60, 0, 80, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ArticleModule::shoot_exist(boma, *FIGHTER_POPO_GENERATE_ARTICLE_ICESHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_specialn", popo_special_n_game) - .acmd("game_specialairn", popo_special_air_n_game) - .install(); -} diff --git a/fighters/popo/src/acmd/throws.rs b/fighters/popo/src/acmd/throws.rs deleted file mode 100644 index 4ff09a9449..0000000000 --- a/fighters/popo/src/acmd/throws.rs +++ /dev/null @@ -1,183 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.75, 3.5, Some(0.0), Some(5.75), Some(6.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.176); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } -} - -unsafe extern "C" fn popo_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.285); - frame(lua_state, 7.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.21); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } -} - -unsafe extern "C" fn popo_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.125); - frame(lua_state, 8.0); - if is_excute(fighter) { - GrabModule::set_rebound(boma, true); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.75, 0.0, 5.0, -5.0, Some(0.0), Some(5.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - } - game_CaptureCutCommon(fighter); - wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } -} - -unsafe extern "C" fn popo_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 120, 0, 45, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - // scale attack startup based on opponent weight - let weight = WorkModule::get_param_float(boma.get_grabbed_opponent_boma(), hash40("weight"), 0); - FT_MOTION_RATE(fighter, ((weight/100.00) * 32.0) / 36.0); - } - frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - CHECK_FINISH_CAMERA(fighter, 10, 4); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - FT_MOTION_RATE(fighter, 17.0/(49.0 - 37.0)); - } -} - -unsafe extern "C" fn popo_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 60, 0, 50, 5.0, 0.0, 6.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 16, 9); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 88, 26, 0, 120, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - FT_MOTION_RATE(fighter, 28.0/20.0); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 3.0, 70, 60, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HAMMER); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 19); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 60, 30, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - } - frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 10); - // FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); - // FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_catch", popo_catch_game) - .acmd("game_catchdash", popo_catch_dash_game) - .acmd("game_catchturn", popo_catch_turn_game) - .acmd("game_throwlw", popo_throw_lw_game) - .acmd("game_throwf", popo_throw_f_game) - .acmd("game_throwhi", popo_throw_hi_game) - .acmd("game_throwb", popo_throw_b_game) - .install(); -} diff --git a/fighters/popo/src/acmd/tilts.rs b/fighters/popo/src/acmd/tilts.rs deleted file mode 100644 index 04c4717968..0000000000 --- a/fighters/popo/src/acmd/tilts.rs +++ /dev/null @@ -1,132 +0,0 @@ - -use super::*; - -unsafe extern "C" fn popo_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 3.0, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 8.0, 361, 110, 0, 30, 4.0, 0.0, 7.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn popo_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 125, 100, 75, 0, 3.5, 0.0, 4.0, -4.0, Some(0.0), Some(4.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 0.5, 110, 20, 0, 15, 5.0, 0.0, 7.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - FT_MOTION_RATE(fighter, 16.0 / (32.0 - 9.0)); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 4.5, 0.0, 9.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 95, 0, 47, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn popo_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("havel"), 0.0, 7.5, 0.0, 0.0, 0.0, 0.0, 0.6, true, 0.4); - } - wait(lua_state, 5.0); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 17.0, 0.0, 0.0, 0.0, 0.0, 1.5, true); - } -} - -unsafe extern "C" fn popo_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.714); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 6.0, 75, 95, 0, 40, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 6.0, 85, 95, 0, 40, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HAMMER); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -pub fn install() { - smashline::Agent::new("popo") - .acmd("game_attacks3hi", popo_attack_s3_hi_game) - .acmd("game_attacks3", popo_attack_s3_s_game) - .acmd("game_attackslw", popo_attack_s3_lw_game) - .acmd("game_attackhi3", popo_attack_hi3_game) - .acmd("effect_attackhi3", popo_attack_hi3_effect) - .acmd("game_attacklw3", popo_attack_lw3_game) - .install(); -} diff --git a/fighters/popo/src/status.rs b/fighters/popo/src/status.rs deleted file mode 100644 index e7e50f93b4..0000000000 --- a/fighters/popo/src/status.rs +++ /dev/null @@ -1,42 +0,0 @@ -use super::*; -use globals::*; -// status script import - - -#[utils::export(popo)] -pub unsafe fn ics_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Dash_Sub(); - fighter.sub_shift_status_main(L2CValue::Ptr(ics_dash_main as *const () as _)) -} - -unsafe extern "C" fn ics_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[OBJECT_ID] == FIGHTER_KIND_NANA { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_POPO_INSTANCE_WORK_ID_FLAG_ENABLE_TRANSITION_FORBID) { - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - } - fighter.status_Dash_Main(); - 0.into() -} - -// FIGHTER_STATUS_KIND_DASH // - -pub unsafe extern "C" fn dash(fighter: &mut L2CFighterCommon) -> L2CValue { - ics_dash(fighter) -} - -// FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP // - -pub unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} -pub fn install() { - smashline::Agent::new("popo") - .status(Main, *FIGHTER_STATUS_KIND_DASH, dash) - .status( - Exit, - *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, - special_hi_jump_exit, - ) - .install(); -} diff --git a/src/fighters.rs b/src/fighters.rs index 791302b7bb..70eaad44ef 100644 --- a/src/fighters.rs +++ b/src/fighters.rs @@ -37,6 +37,7 @@ pub fn install() { ganon = "ganon", gaogaen = "gaogaen", gekkouga = "gekkouga", + iceclimber = "iceclimber", ike = "ike", inkling = "inkling", jack = "jack", @@ -62,8 +63,6 @@ pub fn install() { miigunner = "miigunner", miiswordsman = "miiswordsman", murabito = "murabito", - nana = "nana", - ness = "ness", packun = "packun", pacman = "pacman", palutena = "palutena", @@ -76,7 +75,6 @@ pub fn install() { pit = "pit", pitb = "pitb", plizardon = "plizardon", - popo = "popo", purin = "purin", pzenigame = "pzenigame", reflet = "reflet", From 8fe5dadc5582188c4df1c9f90bc37f862c69e8a9 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Fri, 22 Mar 2024 15:42:15 -0400 Subject: [PATCH 061/172] why --- fighters/iceclimber/src/acmd/other.rs | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs index 3397e4ed34..6b502f3467 100644 --- a/fighters/iceclimber/src/acmd/other.rs +++ b/fighters/iceclimber/src/acmd/other.rs @@ -26,6 +26,21 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + frame(lua_state, 1.0); + if is_excute(fighter) { + if !StopModule::is_stop(fighter.module_accessor) { + PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + } + } + frame(lua_state, 1.1); + if is_excute(fighter) { + PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + } +} + unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -51,6 +66,21 @@ unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn sound_damageflyroll_nana(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + frame(lua_state, 1.0); + if is_excute(fighter) { + if !StopModule::is_stop(fighter.module_accessor) { + PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + } + } + frame(lua_state, 1.1); + if is_excute(fighter) { + PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + } +} + unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -126,13 +156,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); agent.acmd("sound_damageflylw", sound_damagefly); agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflyroll", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyhi_nana", sound_damagefly_nana); agent.acmd("sound_damageflylw_nana", sound_damagefly_nana); agent.acmd("sound_damageflyn_nana", sound_damagefly_nana); - agent.acmd("sound_damageflyroll_nana", sound_damagefly_nana); + agent.acmd("sound_damageflyroll_nana", sound_damageflyroll_nana); agent.acmd("sound_damageflytop_nana", sound_damagefly_nana); agent.acmd("game_dash", dash_game); From d7beb36fbf0a3b3233d541a9f03a51a50bb06931 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 14:56:09 -0500 Subject: [PATCH 062/172] IDEA: CHILI DOG ENTRY does a srug --- fighters/sonic/src/acmd/aerials.rs | 338 ++++++------- fighters/sonic/src/acmd/ground.rs | 211 ++++---- fighters/sonic/src/acmd/mod.rs | 16 +- fighters/sonic/src/acmd/other.rs | 190 +++---- fighters/sonic/src/acmd/smashes.rs | 340 ++++++------- fighters/sonic/src/acmd/specials.rs | 476 ++++++++---------- fighters/sonic/src/acmd/throws.rs | 156 +++--- fighters/sonic/src/acmd/tilts.rs | 259 +++++----- fighters/sonic/src/gimmickjump/acmd/mod.rs | 7 + .../sonic/src/gimmickjump/acmd/specials.rs | 13 + fighters/sonic/src/gimmickjump/mod.rs | 9 + fighters/sonic/src/lib.rs | 15 +- fighters/sonic/src/opff.rs | 6 +- fighters/sonic/src/status.rs | 38 +- fighters/sonic/src/status/dash.rs | 10 +- fighters/sonic/src/status/special_hi.rs | 27 +- fighters/sonic/src/status/special_lw_hold.rs | 14 +- fighters/sonic/src/status/special_n.rs | 21 +- fighters/sonic/src/status/special_n_hit.rs | 12 +- fighters/sonic/src/status/special_s.rs | 14 +- fighters/sonic/src/status/special_s_dash.rs | 14 +- fighters/sonic/src/status/wait.rs | 8 +- 22 files changed, 1038 insertions(+), 1156 deletions(-) create mode 100644 fighters/sonic/src/gimmickjump/acmd/mod.rs create mode 100644 fighters/sonic/src/gimmickjump/acmd/specials.rs create mode 100644 fighters/sonic/src/gimmickjump/mod.rs diff --git a/fighters/sonic/src/acmd/aerials.rs b/fighters/sonic/src/acmd/aerials.rs index 76d7a92baf..1f065ec804 100644 --- a/fighters/sonic/src/acmd/aerials.rs +++ b/fighters/sonic/src/acmd/aerials.rs @@ -1,318 +1,312 @@ - use super::*; -unsafe extern "C" fn sonic_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 105, 0, 15, 4.25, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 361, 105, 0, 15, 6.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 105, 0, 15, 4.25, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 361, 105, 0, 15, 6.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma,1,false); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 95, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 95, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 361, 100, 0, 25, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 361, 100, 0, 25, 3.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 0.33); + FT_MOTION_RATE(agent, 0.33); frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sonic_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0/6.0); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0/6.0); frame(lua_state, 4.8); // effectively f4 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 11.0, 361, 90, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 11.0, 361, 90, 0, 45, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.6); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 11.0, 270, 52, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 11.0, 270, 85, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.0, -2.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 11.0, 270, 52, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 11.0, 270, 85, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sonic_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.5, 1.0, 180, -150 , 90, 0.92, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.5, 1.0, 180, -150 , 90, 0.92, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 2); } - } -unsafe extern "C" fn sonic_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_l")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_sonic_attackair_f03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_sonic_attackair_f03")); } - } -unsafe extern "C" fn sonic_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 361, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 361, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 94, 0, 30, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 361, 80, 0, 40, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 5.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 361, 80, 0, 40, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 80, 0, 40, 5.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sonic_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6.0, -4.0, 165, 65, 150, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6.0, -4.0, 165, 65, 150, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); } - } -unsafe extern "C" fn sonic_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 5.0/(4.0-0.0)); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 5.0/(4.0-0.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 45, 0, 3.5, 0.0, 7.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 123, 100, 60, 0, 4.0, 0.0, 8.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.333); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.333); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 5.0, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 5.0, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 85, 0, 52, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn sonic_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7.5, 2.5, -10, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 7.5, -2.5, 190, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7.5, 2.5, -10, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 7.5, -2.5, 190, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), 0.85, 11.5, 0, 59, 74, 154, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), -0.95, 11.5, 0, 245, -77, 22, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.7, 0.2); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), 0.85, 11.5, 0, 59, 74, 154, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("sonic_atk_hi"), Hash40::new("sonic_atk_hi"), Hash40::new("top"), -0.95, 11.5, 0, 245, -77, 22, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.7, 0.2); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 19.5, 0.0, 0, 0, 0, 1.55, 0, 0, 0, 0, 0, 361, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 19.5, 0.0, 0, 0, 0, 1.55, 0, 0, 0, 0, 0, 361, true); } - } -unsafe extern "C" fn sonic_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 10.0/(16.0-0.0)); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 10.0/(16.0-0.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 1.4, -4, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.4, -4, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 287, 76, 0, 13, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 37, 88, 0, 45, 4.1, 0.0, -0.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 287, 76, 0, 13, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 37, 88, 0, 45, 4.1, 0.0, -0.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 66, 0, 30, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 88, 0, 45, 4.1, 0.0, 1.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 66, 0, 30, 5.0, -4.0, 5.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 88, 0, 45, 4.1, 0.0, 1.3, 3.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 75, 0, 45, 4.3, -4.0, 6.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 75, 0, 45, 4.3, -4.0, 6.0, 1.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 14.0/(49.0-33.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 14.0/(49.0-33.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } - } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attackairn", sonic_attack_air_n_game) - .acmd("game_attackairf", sonic_attack_air_f_game) - .acmd("effect_attackairf", sonic_attack_air_f_effect) - .acmd("sound_attackairf", sonic_attack_air_f_sound) - .acmd("expression_attackairf", sonic_attack_air_f_expression) - .acmd("game_attackairb", sonic_attack_air_b_game) - .acmd("effect_attackairb", sonic_attack_air_b_effect) - .acmd("game_attackairhi", sonic_attack_air_hi_game) - .acmd("effect_attackairhi", sonic_attack_air_hi_effect) - .acmd("expression_attackairhi", sonic_attack_air_hi_expression) - .acmd("game_attackairlw", sonic_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/sonic/src/acmd/ground.rs b/fighters/sonic/src/acmd/ground.rs index 61abce468c..92dc5227ab 100644 --- a/fighters/sonic/src/acmd/ground.rs +++ b/fighters/sonic/src/acmd/ground.rs @@ -1,197 +1,192 @@ - use super::*; -unsafe extern "C" fn sonic_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.0, 0.0, 7.0, 6.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 3.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.0, 0.0, 3.3, 8.0, Some(0.0), Some(3.3), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.0, 0.0, 7.0, 6.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 2.5, 0.0, 7.0, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 83, 30, 0, 25, 3.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.0, 0.0, 3.3, 8.0, Some(0.0), Some(3.3), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn sonic_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/6.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 85, 25, 0, 20, 3.3, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 4.3, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 85, 25, 0, 20, 3.3, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 85, 25, 0, 20, 4.3, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn sonic_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("footl"), -6, -5, 0, 90, 180, 60, 0.7, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("footl"), -6, -5, 0, 90, 180, 60, 0.7, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 7.5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 7.5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn sonic_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 361, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 5.0, 5.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 361, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 361, 110, 0, 50, 5.0, 5.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn sonic_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("footr"), -7, 1.5, 0, 90, 180, -40, 0.8, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 8.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("footr"), -7, 1.5, 0, 90, 180, -40, 0.8, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 8.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn sonic_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/11.0); + FT_MOTION_RATE(agent, 8.0/11.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 20, 0, 3.0, 0.0, 6.0, 7.0, Some(0.0), Some(6.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 20, 0, 3.0, 0.0, 6.0, 7.0, Some(0.0), Some(6.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 15.0/(21.0 - 11.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 30, 0, 4.5, 1.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 15.0/(21.0 - 11.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 30, 0, 4.5, 1.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 55, 80, 0, 85, 4.0, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("head"), 6.0, 55, 80, 0, 85, 3.5, 2.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 55, 80, 0, 85, 4.0, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("head"), 6.0, 55, 80, 0, 85, 3.5, 2.5, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 48, 94, 0, 50, 3.6, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 48, 94, 0, 50, 3.6, 3.5, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 38.0/(50.0 - 21.0)); + FT_MOTION_RATE(agent, 38.0/(50.0 - 21.0)); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sonic_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -5, 0, 180, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -5, 0, 180, 0, 1.0, true, *EF_FLIP_YZ); } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 3, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 3, 0, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 16.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -10, -15, 0, 0, 1.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -10, -15, 0, 0, 1.3, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -1, 0, 10, 0, 0, 0, 1.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -1, 0, 10, 0, 0, 0, 1.4, true); } - } -unsafe extern "C" fn sonic_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_ll")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_swing_l")); } - } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attack11", sonic_attack_11_game) - .acmd("game_attack12", sonic_attack_12_game) - .acmd("effect_attack12", sonic_attack_12_effect) - .acmd("game_attack13", sonic_attack_13_game) - .acmd("effect_attack13", sonic_attack_13_effect) - .acmd("game_attackdash", sonic_attack_dash_game) - .acmd("effect_attackdash", sonic_attack_dash_effect) - .acmd("sound_attackdash", sonic_attack_dash_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/sonic/src/acmd/mod.rs b/fighters/sonic/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/sonic/src/acmd/mod.rs +++ b/fighters/sonic/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/sonic/src/acmd/other.rs b/fighters/sonic/src/acmd/other.rs index 8b1ba1055b..8bf47972ed 100644 --- a/fighters/sonic/src/acmd/other.rs +++ b/fighters/sonic/src/acmd/other.rs @@ -1,183 +1,106 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_sonic_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_sonic_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sonic_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sonic_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_sonic_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_sonic_step_left_m")); } } -unsafe extern "C" fn sonic_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_SONIC_STATUS_DASH_FLAG_BRAKE_INCREASE); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } @@ -187,17 +110,18 @@ unsafe extern "C" fn expression_wait4(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", sonic_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("expression_wait4", expression_wait4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("expression_wait4", expression_wait4); } diff --git a/fighters/sonic/src/acmd/smashes.rs b/fighters/sonic/src/acmd/smashes.rs index e063d79230..d96e2857ea 100644 --- a/fighters/sonic/src/acmd/smashes.rs +++ b/fighters/sonic/src/acmd/smashes.rs @@ -1,105 +1,147 @@ - use super::*; -unsafe extern "C" fn sonic_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 16.0, 361, 98, 0, 32, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 361, 98, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 361, 98, 0, 32, 2.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn sonic_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 16.0, 80, 100, 0, 27, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 16.0, 80, 100, 0, 27, 5.25, 3.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 16.0, 80, 100, 0, 27, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 16.0, 80, 100, 0, 27, 5.25, 3.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 12.0, 361, 100, 0, 15, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 15, 4.5, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 12.0, 361, 100, 0, 15, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 30.0/(42.0 - 17.0)); + FT_MOTION_RATE(agent, 30.0/(42.0 - 17.0)); + } +} + +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13, 0, 0, 50, 90, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 3.0, 0.15, 0.15); + LAST_EFFECT_SET_RATE(agent, 2.0); + } + frame(lua_state, 27.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sonic_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new_raw(0x13589f8893)); + } + frame(lua_state, 9.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("se_sonic_attackair_f03")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_sonic_attack06")); + PLAY_STATUS(agent, Hash40::new("se_sonic_smash_l01")); + //PLAY_SE(agent, Hash40::new("se_sonic_smash_h01")); + } + wait(lua_state, 27.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_landing02")); + } +} + +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); } frame(lua_state, 7.0); // make this the frame you can charge the attack sv_animcmd::execute(lua_state , 7.0); // make this the frame you can charge the attack - if is_excute(fighter) { - slope!(fighter, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble( boma, Hash40::new("rbkind_nohitm"), @@ -109,165 +151,117 @@ unsafe extern "C" fn sonic_attack_hi4_expression(fighter: &mut L2CAgentBase) { ); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn sonic_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/10.0); } - frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13, 0, 0, 50, 90, 1.2, true); - LAST_EFFECT_SET_COLOR(fighter, 3.0, 0.15, 0.15); - LAST_EFFECT_SET_RATE(fighter, 2.0); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sonic_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new_raw(0x13589f8893)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(32.0 - 10.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 90, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("se_sonic_attackair_f03")); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 94, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_sonic_attack06")); - PLAY_STATUS(fighter, Hash40::new("se_sonic_smash_l01")); - //PLAY_SE(fighter, Hash40::new("se_sonic_smash_h01")); + frame(lua_state, 32.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_MOTION_RATE(agent, 28.0/(54.0 - 32.0)); } - wait(lua_state, 27.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_landing02")); + frame(lua_state, 54.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sonic_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/10.0); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + frame(lua_state, 8.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(32.0 - 10.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 361, 90, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 15.0, 361, 90, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -4, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } - frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 94, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 361, 94, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 32.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 28.0/(54.0 - 32.0)); + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, 2.5, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); } - frame(lua_state, 54.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -5.5, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } - } -unsafe extern "C" fn sonic_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 8); } frame(lua_state, 52.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn sonic_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -4, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, 2.5, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); - } - frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 5, -5.5, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attacks4hi", sonic_attack_s4_hi_game) - .acmd("game_attacks4", sonic_attack_s4_s_game) - .acmd("game_attacks4lw", sonic_attack_s4_lw_game) - .acmd("game_attackhi4", sonic_attack_hi4_game) - .acmd("expression_attackhi4", sonic_attack_hi4_expression) - .acmd("effect_attackhi4", sonic_attack_hi4_effect) - .acmd("sound_attackhi4", sonic_attack_hi4_sound) - .acmd("game_attacklw4", sonic_attack_lw4_game) - .acmd("expression_attacklw4", sonic_attack_lw4_expression) - .acmd("effect_attacklw4", sonic_attack_lw4_effect) - .install(); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index 130adf3b80..f253b4bc9a 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -1,258 +1,277 @@ - use super::*; -unsafe extern "C" fn sonic_specialsbooststart(fighter: &mut L2CAgentBase) { - // FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specialnhomingstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK) { + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 40.0, 0.0, 10.0, 10.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); + } + } } -unsafe extern "C" fn sonic_specialsbooststart_snd(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_sonic_rnd_attack")); +unsafe extern "C" fn game_specialnhoming(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut bone_hash = match WorkModule::is_flag(boma, *FIGHTER_SONIC_STATUS_SPECIAL_N_HOMING_FLAG_IS_KIRBY){ + true => Hash40::new("rot"), + false => Hash40::new("hip") + }; + if is_excute(agent) { + JostleModule::set_status(boma, false); + FT_MOTION_RATE(agent, 0.013); + ATTACK(agent, 0, 0, bone_hash, 8.0, 80, 90, 0, 50, 5.0, 0.5, 1.5, 0.0, Some(0.5), Some(1.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::set_captured_same_time_attack(boma, 0, true); + AttackModule::set_attack_keep_rumble(boma, 0, true); } } -unsafe extern "C" fn sonic_specialsbooststart_exp(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn sound_specialnhoming(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let rng = app::sv_math::rand(smash::hash40("fighter"), 2); + let mut sound = ""; + if rng == 0 { sound = "vc_sonic_004"; } + else { sound = "vc_sonic_attack02"; } + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_sonic_rounddash")); + PLAY_SE(agent, Hash40::new(sound)); + PLAY_SE(agent, Hash40::new("se_sonic_special_n01")); } } -unsafe extern "C" fn sonic_specialsboost(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 1.0 / 3.0); - frame(fighter.lua_state_agent, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 45, 4.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - } - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 25, 120, 0, 50, 3.0, 0.0, 4.0, -0.5, Some(0.0), Some(9.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - VarModule::on_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_JUMP); - } - frame(fighter.lua_state_agent, 14.0); - FT_MOTION_RATE(fighter, 0.25); +unsafe extern "C" fn game_specialnhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.3); + } + frame(lua_state, 3.0); + if is_excute(agent) { + let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; + KineticModule::add_speed(boma, &temp); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } } -unsafe extern "C" fn sonic_specialsboost_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + UNABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::set_captured_same_time_attack(boma, 0, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); + ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 60, 60, 0, 80, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } + frame(lua_state, 34.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 39.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn game_specialsbooststart(agent: &mut L2CAgentBase) { + // FT_MOTION_RATE(agent, 0.75); +} + +unsafe extern "C" fn sound_specialsbooststart(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); + } +} + +unsafe extern "C" fn expression_specialsbooststart(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_specialsboost(agent: &mut L2CAgentBase) { + FT_MOTION_RATE(agent, 1.0 / 3.0); + frame(agent.lua_state_agent, 3.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 45, 4.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } + frame(agent.lua_state_agent, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 25, 120, 0, 50, 3.0, 0.0, 4.0, -0.5, Some(0.0), Some(9.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_JUMP); + } + frame(agent.lua_state_agent, 14.0); + FT_MOTION_RATE(agent, 0.25); +} + +unsafe extern "C" fn effect_specialsboost(agent: &mut L2CAgentBase) { + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_FOLLOW_NO_STOP(fighter, eff, Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1.25, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + EFFECT_FOLLOW_NO_STOP(agent, eff, Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1.25, true); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); } } -unsafe extern "C" fn sonic_specialsboost_snd(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_special_s01")); +unsafe extern "C" fn sound_specialsboost(agent: &mut L2CAgentBase) { + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_special_s01")); } } -unsafe extern "C" fn sonic_specialsboost_exp(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); +unsafe extern "C" fn expression_specialsboost(agent: &mut L2CAgentBase) { + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn sonic_specialsboostend(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 0.5); - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - } - frame(fighter.lua_state_agent, 8.0); - FT_MOTION_RATE(fighter, 1.6); +unsafe extern "C" fn game_specialsboostend(agent: &mut L2CAgentBase) { + FT_MOTION_RATE(agent, 0.5); + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + frame(agent.lua_state_agent, 8.0); + FT_MOTION_RATE(agent, 1.6); } -unsafe extern "C" fn sonic_specialsboostend_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn effect_specialsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_OFF_KIND(fighter, eff, false, false); + EFFECT_OFF_KIND(agent, eff, false, false); } for _ in 0..4 { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } - wait(fighter.lua_state_agent, 4.0); + wait(agent.lua_state_agent, 4.0); } } -unsafe extern "C" fn sonic_specialsboostend_snd(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_sonic_dash_stop")); +unsafe extern "C" fn sound_specialsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_sonic_dash_stop")); } } -unsafe extern "C" fn sonic_specialsboostend_exp(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn sonic_specialairsboostend(fighter: &mut L2CAgentBase) { - FT_MOTION_RATE(fighter, 0.8); - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - VarModule::on_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_CONTROL); +unsafe extern "C" fn game_specialairsboostend(agent: &mut L2CAgentBase) { + FT_MOTION_RATE(agent, 0.8); + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_CONTROL); } } -unsafe extern "C" fn sonic_specialairsboostend_eff(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - let eff = if VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_S_HOP) { +unsafe extern "C" fn effect_specialairsboostend(agent: &mut L2CAgentBase) { + if is_excute(agent) { + let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") } else { Hash40::new("sonic_spintrace") }; - EFFECT_OFF_KIND(fighter, eff, false, false); + EFFECT_OFF_KIND(agent, eff, false, false); } } -unsafe extern "C" fn sonic_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::shoot_exist(boma, *FIGHTER_SONIC_GENERATE_ARTICLE_GIMMICKJUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sonic_gimmick_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 90, 0, 30, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn sonic_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for i in 1..50 { wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 1.0, 90, 0, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 90, 0, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn sonic_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, false); } - } -unsafe extern "C" fn sonic_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, false); } - -} - -unsafe extern "C" fn sonic_special_lw_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 60, 57, 0, 97, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter,0, 0.5); - AttackModule::set_captured_same_time_attack(boma, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_ATTACK_ID_DEFAULT, true); - AttackModule::set_attack_keep_rumble(boma, 0, true); - } } -unsafe extern "C" fn sonic_special_air_lw_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { JostleModule::set_status(boma, false); - UNABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 60, 106, 0, 55, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - AttackModule::set_captured_same_time_attack(boma, 0, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); - ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); - } - frame(lua_state, 34.0); - if is_excute(agent) { AttackModule::clear_all(boma); - } - frame(lua_state, 39.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn sonic_special_n_homing_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK) { - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 40.0, 0.0, 10.0, 10.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); - } - } -} - -unsafe extern "C" fn sonic_special_n_homing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - let mut bone_hash = match WorkModule::is_flag(boma, *FIGHTER_SONIC_STATUS_SPECIAL_N_HOMING_FLAG_IS_KIRBY){ - true => Hash40::new("rot"), - false => Hash40::new("hip") - }; - - - if is_excute(fighter) { - JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 0.013); - ATTACK(fighter, 0, 0, bone_hash, 8.0, 80, 90, 0, 50, 5.0, 0.5, 1.5, 0.0, Some(0.5), Some(1.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - AttackModule::set_captured_same_time_attack(boma, 0, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 60, 57, 0, 97, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL(agent,0, 0.5); + AttackModule::set_captured_same_time_attack(boma, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_ATTACK_ID_DEFAULT, true); AttackModule::set_attack_keep_rumble(boma, 0, true); } - } -unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -261,17 +280,14 @@ unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { } frame(lua_state, 3.0); if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 60, 106, 0, 55, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_captured_same_time_attack(boma, 0, true); } frame(lua_state, 10.0); if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); + WorkModule::on_flag(boma, *FIGHTER_SONIC_STATUS_SPIN_JUMP_WORK_ID_FLAG_ENABLE_JUMP_AERIAL); ENABLE_AREA(agent, *FIGHTER_AREA_KIND_TREAD_JUMP_CHECK); } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 60, 60, 0, 80, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); -} frame(lua_state, 34.0); if is_excute(agent) { AttackModule::clear_all(boma); @@ -282,90 +298,40 @@ unsafe extern "C" fn hash_0x195dc47911(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sonic_special_n_homing_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let rng = app::sv_math::rand(smash::hash40("fighter"), 2); - let mut sound = ""; - - if rng == 0 { sound = "vc_sonic_004"; } - else { sound = "vc_sonic_attack02"; } - - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_sonic_rounddash")); - PLAY_SE(fighter, Hash40::new(sound)); - PLAY_SE(fighter, Hash40::new("se_sonic_special_n01")); - } -} - -unsafe extern "C" fn sonic_special_n_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.3); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - let temp = Vector3f { x: -0.3, y: 1.0, z: 0.0 }; - KineticModule::add_speed(boma, &temp); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } -} - -unsafe extern "C" fn sonic_special_n_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sonic_special_n_landing(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_specialsbooststart", sonic_specialsbooststart) - .acmd("sound_specialsbooststart", sonic_specialsbooststart_snd) - .acmd( - "expression_specialsbooststart", - sonic_specialsbooststart_exp, - ) - .acmd("game_specialsboost", sonic_specialsboost) - .acmd("effect_specialsboost", sonic_specialsboost_eff) - .acmd("sound_specialsboost", sonic_specialsboost_snd) - .acmd("expression_specialsboost", sonic_specialsboost_exp) - .acmd("game_specialsboostend", sonic_specialsboostend) - .acmd("effect_specialsboostend", sonic_specialsboostend_eff) - .acmd("sound_specialsboostend", sonic_specialsboostend_snd) - .acmd("expression_specialsboostend", sonic_specialsboostend_exp) - .acmd("game_specialairsboostend", sonic_specialairsboostend) - .acmd("effect_specialairsboostend", sonic_specialairsboostend_eff) - .acmd("game_specialhi", sonic_special_hi_game) - .acmd("game_speciallwhold", sonic_special_lw_hold_game) - .acmd("game_specialairlwhold", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargehi", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargelw", sonic_special_lw_hold_game) - .acmd("game_speciallwholdchargemiddle", sonic_special_lw_hold_game) - .acmd("game_speciallwstart", sonic_special_lw_start_game) - .acmd("game_specialairlwstart", sonic_special_air_lw_start_game) - .game_acmd(0x1b07509826, sonic_special_lw_dash_game) - .game_acmd(0x195dc47911, sonic_special_air_lw_dash_game) - .acmd( - "game_specialnhomingstart", - sonic_special_n_homing_start_game, - ) - .acmd("game_specialnhoming", sonic_special_n_homing_game) - .game_acmd(0x195dc47911, hash_0x195dc47911) - .acmd("sound_specialnhoming", sonic_special_n_homing_sound) - .acmd("game_specialnhit", sonic_special_n_hit_game) - .acmd("effect_specialnhit", sonic_special_n_hit_effect) - .acmd("game_specialnlanding", sonic_special_n_landing) - .install(); - smashline::Agent::new("sonic_gimmickjump") - .acmd("game_fall", sonic_gimmick_jump_game) - .install(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnhomingstart", game_specialnhomingstart); + agent.acmd("game_specialnhoming", game_specialnhoming); + agent.acmd("sound_specialnhoming", sound_specialnhoming); + agent.acmd("game_specialnhit", game_specialnhit); + agent.acmd("effect_specialnhit", null); + agent.acmd("game_specialnlanding", null); + agent.game_acmd(0x195dc47911, hash_0x195dc47911); + + agent.acmd("game_specialsbooststart", game_specialsbooststart); + agent.acmd("sound_specialsbooststart", sound_specialsbooststart); + agent.acmd("expression_specialsbooststart", expression_specialsbooststart); + agent.acmd("game_specialsboost", game_specialsboost); + agent.acmd("effect_specialsboost", effect_specialsboost); + agent.acmd("sound_specialsboost", sound_specialsboost); + agent.acmd("expression_specialsboost", expression_specialsboost); + agent.acmd("game_specialsboostend", game_specialsboostend); + agent.acmd("effect_specialsboostend", effect_specialsboostend); + agent.acmd("sound_specialsboostend", sound_specialsboostend); + agent.acmd("expression_specialsboostend", expression_specialsboostend); + agent.acmd("game_specialairsboostend", game_specialairsboostend); + agent.acmd("effect_specialairsboostend", effect_specialairsboostend); + + agent.acmd("game_specialhi", game_specialhi); + + agent .acmd("game_speciallwhold", game_speciallwhold) + agent.acmd("game_specialairlwhold", game_speciallwhold); + agent.acmd("game_speciallwholdchargehi", game_speciallwhold); + agent.acmd("game_speciallwholdchargelw", game_speciallwhold); + agent.acmd("game_speciallwholdchargemiddle", game_speciallwhold); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.game_acmd(0x1b07509826, game_speciallwdash); + agent.game_acmd(0x195dc47911, game_specialairlwdash); } diff --git a/fighters/sonic/src/acmd/throws.rs b/fighters/sonic/src/acmd/throws.rs index 6fd5f2adfa..4f7de24f2d 100644 --- a/fighters/sonic/src/acmd/throws.rs +++ b/fighters/sonic/src/acmd/throws.rs @@ -1,141 +1,138 @@ use super::*; -unsafe extern "C" fn sonic_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(7.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(7.65), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 8.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.22); - + FT_MOTION_RATE(agent, 1.22); } -unsafe extern "C" fn sonic_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(11.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.28); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.28); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn sonic_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 10.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 12.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.125); - + FT_MOTION_RATE(agent, 1.125); } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 140, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 42.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 8); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 76, 60, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 76, 60, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 180, 0, 60, 5.0, 0.0, 11.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 180, 0, 60, 5.0, 0.0, 11.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 5, 4); + CHECK_FINISH_CAMERA(agent, 5, 4); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 20, 35, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.5, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 20, 35, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.5, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 45, 100, 0, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 100, 0, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 41.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 0, -5, 0); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 43.0);{ @@ -146,13 +143,14 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_catch", sonic_catch_game) - .acmd("game_catchdash", sonic_catch_dash_game) - .acmd("game_catchturn", sonic_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/sonic/src/acmd/tilts.rs b/fighters/sonic/src/acmd/tilts.rs index ce1ffe684a..5c32c2d58e 100644 --- a/fighters/sonic/src/acmd/tilts.rs +++ b/fighters/sonic/src/acmd/tilts.rs @@ -1,134 +1,133 @@ - use super::*; -unsafe extern "C" fn sonic_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 0, 1, -42, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 1, 1, -22, 0, 0, 1.1, true, *EF_FLIP_YZ); LAST_EFFECT_SET_COLOR(agent, 3, 0.7, 0.2); } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.2, 16.2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, 19.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn sonic_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 1, 1, -22, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 0, 1, -42, 0, 0, 1.1, true, *EF_FLIP_YZ); LAST_EFFECT_SET_COLOR(agent, 3, 0.7, 0.2); } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9, 19.5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.2, 16.2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn sonic_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 28, 3, 0, 80, 4.0, 2.3, 1.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 115, 0, 30, 4.5, 6.0, 0.0, -1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 361, 115, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn sonic_attack_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -146,113 +145,113 @@ unsafe extern "C" fn sonic_attack_s3_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sonic_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - JostleModule::set_status(boma, false); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 100, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 100, 100, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 106, 106, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } -} - -unsafe extern "C" fn sonic_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 5, 2, 2, 1, 5, 5, 0.925, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - - unsafe extern "C" fn sonic_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // ground only - ATTACK(fighter, 1, 0, Hash40::new("legr"), 2.0, 80, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.0, 80, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 2.0, 361, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 2.0, 80, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.0, 80, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 2.0, 361, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //air only - ATTACK(fighter, 4, 0, Hash40::new("legr"), 2.0, 366, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 2.0, 366, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneer"), 2.0, 366, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 2.0, 366, 100, 35, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 2.0, 366, 100, 35, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneer"), 2.0, 366, 100, 45, 0, 5.0, 7.0, 0.0, -1.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 75, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.2, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 75, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 75, 120, 0, 40, 4.2, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } - unsafe extern "C" fn sonic_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 8, 4, 180, 325, 90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 8, 4, 180, 325, 90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.55); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 2, 8, -0.2, 180, 260, 90, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 2, 8, -0.2, 180, 260, 90, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), false, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), false, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("sonic") - .acmd("game_attacks3hi", sonic_attack_s3_hi_game) - .acmd("effect_attacks3hi", sonic_attack_s3_hi_effect) - .acmd("game_attacks3", sonic_attack_s3_game) - .acmd("effect_attacks3", sonic_attack_s3_effect) - .acmd("game_attacks3lw", sonic_attack_s3_lw_game) - .acmd("effect_attacks3lw", sonic_attack_s3_lw_effect) - .acmd("game_attacklw3", sonic_attack_lw3_game) - .acmd("effect_attacklw3", sonic_attack_lw3_effect) - .acmd("game_attackhi3", sonic_attack_hi3_game) - .acmd("effect_attackhi3", sonic_attack_hi3_effect) - .install(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 100, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 100, 100, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 106, 106, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + JostleModule::set_status(boma, true); + } +} + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 5, 2, 2, 1, 5, 5, 0.925, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/sonic/src/gimmickjump/acmd/mod.rs b/fighters/sonic/src/gimmickjump/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/sonic/src/gimmickjump/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/sonic/src/gimmickjump/acmd/specials.rs b/fighters/sonic/src/gimmickjump/acmd/specials.rs new file mode 100644 index 0000000000..2d33d415bc --- /dev/null +++ b/fighters/sonic/src/gimmickjump/acmd/specials.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 90, 0, 30, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/sonic/src/gimmickjump/mod.rs b/fighters/sonic/src/gimmickjump/mod.rs new file mode 100644 index 0000000000..d1e769c6c0 --- /dev/null +++ b/fighters/sonic/src/gimmickjump/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("sonic_gimmickjump"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/sonic/src/lib.rs b/fighters/sonic/src/lib.rs index 8e2ddcc726..57d149b2e5 100644 --- a/fighters/sonic/src/lib.rs +++ b/fighters/sonic/src/lib.rs @@ -7,6 +7,10 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod gimmickjump; + use smash::{ lib::{ L2CValue, @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("sonic"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + gimmickjump::install(); } diff --git a/fighters/sonic/src/opff.rs b/fighters/sonic/src/opff.rs index 827daadc28..72f0b1d056 100644 --- a/fighters/sonic/src/opff.rs +++ b/fighters/sonic/src/opff.rs @@ -92,8 +92,6 @@ pub unsafe fn sonic_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("sonic") - .on_line(Main, sonic_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, sonic_frame_wrapper); } diff --git a/fighters/sonic/src/status.rs b/fighters/sonic/src/status.rs index e929a4ed04..a98aea6c58 100644 --- a/fighters/sonic/src/status.rs +++ b/fighters/sonic/src/status.rs @@ -36,28 +36,24 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn sonic_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_SONIC { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { - wait::install(); - dash::install(); - special_n::install(); - special_s::install(); - special_s_dash::install(); - special_lw_hold::install(); - special_hi::install(); - special_n_hit::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); - smashline::Agent::new("sonic").on_start(sonic_init).install(); + wait::install(agent); + dash::install(agent); + special_n::install(agent); + special_s::install(agent); + special_s_dash::install(agent); + special_lw_hold::install(agent); + special_hi::install(agent); + special_n_hit::install(agent); } diff --git a/fighters/sonic/src/status/dash.rs b/fighters/sonic/src/status/dash.rs index af85e4c102..28ace3041f 100644 --- a/fighters/sonic/src/status/dash.rs +++ b/fighters/sonic/src/status/dash.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn pre_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_DASH + +pub unsafe extern "C" fn dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ground_brake = WorkModule::get_param_float(fighter.module_accessor, hash40("ground_brake"), 0); let mut initial_speed = VarModule::get_float(fighter.battle_object, vars::common::instance::CURR_DASH_SPEED); @@ -22,8 +24,6 @@ pub unsafe extern "C" fn pre_dash(fighter: &mut L2CFighterCommon) -> L2CValue { smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_DASH)(fighter) } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_DASH, dash_pre); } diff --git a/fighters/sonic/src/status/special_hi.rs b/fighters/sonic/src/status/special_hi.rs index 5789432868..9cbf651c61 100644 --- a/fighters/sonic/src/status/special_hi.rs +++ b/fighters/sonic/src/status/special_hi.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -35,7 +37,7 @@ pub unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub unsafe extern "C" fn exec_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_jump_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); let min_speed_y = 1.0; let speed_y = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); @@ -47,7 +49,7 @@ pub unsafe extern "C" fn exec_special_hi_jump(fighter: &mut L2CFighterCommon) -> return 0.into(); } -unsafe extern "C" fn exit_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_jump_exit(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); let landing_lag = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_landing_frame")) as f32; @@ -59,18 +61,9 @@ unsafe extern "C" fn exit_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi) - .status( - Exec, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, - exec_special_hi_jump, - ) - .status( - Exit, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, - exit_special_hi_jump, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + + agent.status(Exec, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec); + agent.status(Exit, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exit); } diff --git a/fighters/sonic/src/status/special_lw_hold.rs b/fighters/sonic/src/status/special_lw_hold.rs index 0669221491..333a2dcbbc 100644 --- a/fighters/sonic/src/status/special_lw_hold.rs +++ b/fighters/sonic/src/status/special_lw_hold.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -unsafe extern "C" fn sonic_speciallwhold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD + +unsafe extern "C" fn special_lw_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_x = fighter.global_table[STICK_X].get_f32(); let lr = PostureModule::lr(fighter.module_accessor); if stick_x * lr <= -0.35 { @@ -37,12 +39,6 @@ unsafe extern "C" fn sonic_speciallwhold_pre(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, - sonic_speciallwhold_pre, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD, special_lw_hold_pre); } diff --git a/fighters/sonic/src/status/special_n.rs b/fighters/sonic/src/status/special_n.rs index 09fcd10c19..9e33c9d422 100644 --- a/fighters/sonic/src/status/special_n.rs +++ b/fighters/sonic/src/status/special_n.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn main_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_N + +pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { hash40("special_n_start") } @@ -95,20 +97,17 @@ unsafe extern "C" fn special_n_main_loop2(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub unsafe extern "C" fn pre_special_n_homing_start(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START + +pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let blast_attack = VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK); let ret = smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); VarModule::set_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK, blast_attack); ret } -pub fn install() { - smashline::Agent::new("sonic") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, main_special_n) - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START, - pre_special_n_homing_start, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HOMING_START, special_n_homing_start_pre); } diff --git a/fighters/sonic/src/status/special_n_hit.rs b/fighters/sonic/src/status/special_n_hit.rs index fa3283c05b..34831b8e1c 100644 --- a/fighters/sonic/src/status/special_n_hit.rs +++ b/fighters/sonic/src/status/special_n_hit.rs @@ -2,6 +2,8 @@ use super::*; use globals::*; use smashline::*; +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT + // Randomized Homing Attack Poses pub unsafe extern "C" fn special_n_hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -35,12 +37,6 @@ pub unsafe extern "C" fn special_n_hit_main(fighter: &mut L2CFighterCommon) -> L ret } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Main, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT, - special_n_hit_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT, special_n_hit_main); } diff --git a/fighters/sonic/src/status/special_s.rs b/fighters/sonic/src/status/special_s.rs index 6c8a803902..f09f683c74 100644 --- a/fighters/sonic/src/status/special_s.rs +++ b/fighters/sonic/src/status/special_s.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn pre_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -37,7 +39,7 @@ pub unsafe extern "C" fn pre_special_s(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub unsafe extern "C" fn main_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { // fighter.sub_change_motion_by_situation(L2CValue::Hash40s("special_s"), L2CValue::Hash40s("special_air_s"), false.into()); VarModule::set_int(fighter.battle_object, vars::sonic::status::SPECIAL_S_STEP, vars::sonic::SPECIAL_S_STEP_START); MotionModule::change_motion( @@ -305,9 +307,7 @@ unsafe fn sonic_special_s_ledge_cancel_helper(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::sonic::status::SPECIAL_S_STEP, vars::sonic::SPECIAL_S_STEP_END); } -pub fn install() { - smashline::Agent::new("sonic") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, pre_special_s) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, main_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } diff --git a/fighters/sonic/src/status/special_s_dash.rs b/fighters/sonic/src/status/special_s_dash.rs index 4c6bab9055..477f5e0b0a 100644 --- a/fighters/sonic/src/status/special_s_dash.rs +++ b/fighters/sonic/src/status/special_s_dash.rs @@ -2,7 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub unsafe extern "C" fn pre_special_s_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH + +pub unsafe extern "C" fn special_s_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let log_mask_flags; let power_up_bit; if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_SONIC_STATUS_SPECIAL_S_DASH_FLAG_SPECIAL_LW_HOLD) { @@ -43,12 +45,6 @@ pub unsafe extern "C" fn pre_special_s_dash(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("sonic") - .status( - Pre, - *FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH, - pre_special_s_dash, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH, special_s_dash_pre); } diff --git a/fighters/sonic/src/status/wait.rs b/fighters/sonic/src/status/wait.rs index ea433a9bc4..c1696fee9e 100644 --- a/fighters/sonic/src/status/wait.rs +++ b/fighters/sonic/src/status/wait.rs @@ -2,6 +2,8 @@ use super::*; use globals::*; use smashline::*; +// FIGHTER_STATUS_KIND_WAIT + pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_wait_common(); MotionModule::change_motion( @@ -16,8 +18,6 @@ pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ); fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Wait_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("sonic") - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); } From 6803fa6e6794da54d889fd9cd63233cd33018734 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 22 Mar 2024 15:00:15 -0500 Subject: [PATCH 063/172] way past cool --- fighters/sonic/src/acmd/specials.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index f253b4bc9a..22bd38783a 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -325,7 +325,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialhi", game_specialhi); - agent .acmd("game_speciallwhold", game_speciallwhold) + agent.acmd("game_speciallwhold", game_speciallwhold); agent.acmd("game_specialairlwhold", game_speciallwhold); agent.acmd("game_speciallwholdchargehi", game_speciallwhold); agent.acmd("game_speciallwholdchargelw", game_speciallwhold); From c414b7548332b2688750c15169acadaf9a25c527 Mon Sep 17 00:00:00 2001 From: Askew Date: Fri, 22 Mar 2024 16:12:17 -0400 Subject: [PATCH 064/172] Corrections --- fighters/brave/src/acmd/aerials.rs | 28 +- fighters/brave/src/acmd/ground.rs | 24 +- fighters/brave/src/acmd/other.rs | 8 +- fighters/brave/src/acmd/smashes.rs | 40 +- fighters/brave/src/acmd/specials.rs | 106 ++-- fighters/brave/src/acmd/throws.rs | 4 +- fighters/brave/src/crash/acmd/specials.rs | 4 +- fighters/brave/src/fireball/acmd/specials.rs | 4 +- fighters/brave/src/spark/acmd/specials.rs | 4 +- fighters/brave/src/tornado/acmd/specials.rs | 24 +- fighters/gamewatch/src/acmd/aerials.rs | 48 +- fighters/gamewatch/src/acmd/ground.rs | 12 +- fighters/gamewatch/src/acmd/other.rs | 8 +- fighters/gamewatch/src/acmd/smashes.rs | 14 +- fighters/gamewatch/src/acmd/specials.rs | 84 +-- fighters/gamewatch/src/acmd/tilts.rs | 12 +- fighters/gamewatch/src/breath/acmd/aerials.rs | 4 +- .../gamewatch/src/parachute/acmd/specials.rs | 4 +- .../gamewatch/src/rescue/acmd/specials.rs | 8 +- fighters/gamewatch/src/status/special_hi.rs | 60 +- .../gamewatch/src/status/special_hi_open.rs | 42 +- fighters/krool/src/status/special_hi.rs | 562 +++++++++--------- fighters/krool/src/status/special_lw.rs | 92 +-- fighters/ridley/src/status/special_lw.rs | 128 ++-- fighters/ridley/src/status/special_n.rs | 172 +++--- fighters/ridley/src/status/special_s.rs | 48 +- fighters/sonic/src/acmd/specials.rs | 2 +- 27 files changed, 773 insertions(+), 773 deletions(-) diff --git a/fighters/brave/src/acmd/aerials.rs b/fighters/brave/src/acmd/aerials.rs index 953e6aed42..78bc4225c5 100644 --- a/fighters/brave/src/acmd/aerials.rs +++ b/fighters/brave/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -87,7 +87,7 @@ unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -127,7 +127,7 @@ unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn expression_attack_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -143,7 +143,7 @@ unsafe extern "C" fn expression_attack_air_b(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -189,7 +189,7 @@ unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.5); @@ -202,7 +202,7 @@ unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -271,11 +271,11 @@ unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attack_air_n); - agent.acmd("game_attackairf", game_attack_air_f); - agent.acmd("game_attackairb", game_attack_air_b); - agent.acmd("expression_attackairb", expression_attack_air_b); - agent.acmd("game_attackairhi", game_attack_air_hi); - agent.acmd("expression_attackairhi", expression_attack_air_hi); - agent.acmd("game_attackairlw", game_attack_air_lw); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/brave/src/acmd/ground.rs b/fighters/brave/src/acmd/ground.rs index 9afd92f359..3297768667 100644 --- a/fighters/brave/src/acmd/ground.rs +++ b/fighters/brave/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -27,7 +27,7 @@ unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attack_11(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -44,7 +44,7 @@ unsafe extern "C" fn expression_attack_11(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_12(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -71,7 +71,7 @@ unsafe extern "C" fn game_attack_12(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_13(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -99,7 +99,7 @@ unsafe extern "C" fn game_attack_13(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -131,7 +131,7 @@ unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attack_dash(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -163,10 +163,10 @@ unsafe extern "C" fn expression_attack_dash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", game_attack_11); - agent.acmd("expression_attack11", expression_attack_11); - agent.acmd("game_attack12", game_attack_12); - agent.acmd("game_attack13", game_attack_13); - agent.acmd("game_attackdash", game_attack_dash); - agent.acmd("expression_attackdash", expression_attack_dash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index 0a5bfae38f..58ba67849b 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -108,7 +108,7 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_special_lw8(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw8(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -137,7 +137,7 @@ unsafe extern "C" fn effect_special_lw8(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_special_air_lw8(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairlw8(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -173,6 +173,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("effect_speciallw8", effect_special_lw8); - agent.acmd("effect_specialairlw8", effect_special_air_lw8); + agent.acmd("effect_speciallw8", effect_speciallw8); + agent.acmd("effect_specialairlw8", effect_specialairlw8); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/smashes.rs b/fighters/brave/src/acmd/smashes.rs index 83a70b17be..d3bea7f5c6 100644 --- a/fighters/brave/src/acmd/smashes.rs +++ b/fighters/brave/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn game_attack_s4_s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn game_attack_s4_s(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_attack_s4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -96,7 +96,7 @@ unsafe extern "C" fn effect_attack_s4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_attack_s4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 15.0); @@ -125,7 +125,7 @@ unsafe extern "C" fn sound_attack_s4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn expression_attack_s4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -151,7 +151,7 @@ unsafe extern "C" fn expression_attack_s4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -186,7 +186,7 @@ unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_attack_hi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -214,7 +214,7 @@ unsafe extern "C" fn sound_attack_hi4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_attack_hi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -260,7 +260,7 @@ unsafe extern "C" fn effect_attack_hi4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -315,7 +315,7 @@ unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_attack_lw4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -379,7 +379,7 @@ unsafe extern "C" fn effect_attack_lw4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_attack_lw4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -410,14 +410,14 @@ unsafe extern "C" fn sound_attack_lw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attack_s4_s); - agent.acmd("effect_attacks4", effect_attack_s4); - agent.acmd("sound_attacks4", sound_attack_s4); - agent.acmd("expression_attacks4", expression_attack_s4); - agent.acmd("game_attackhi4", game_attack_hi4); - agent.acmd("sound_attackhi4", sound_attack_hi4); - agent.acmd("effect_attackhi4", effect_attack_hi4); - agent.acmd("game_attacklw4", game_attack_lw4); - agent.acmd("effect_attacklw4", effect_attack_lw4); - agent.acmd("sound_attacklw4", sound_attack_lw4); + agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); } diff --git a/fighters/brave/src/acmd/specials.rs b/fighters/brave/src/acmd/specials.rs index 8556ed9f96..48c820a314 100644 --- a/fighters/brave/src/acmd/specials.rs +++ b/fighters/brave/src/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_n1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -21,7 +21,7 @@ unsafe extern "C" fn game_special_n1(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_special_n2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -49,7 +49,7 @@ unsafe extern "C" fn game_special_n2(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_n3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -74,7 +74,7 @@ unsafe extern "C" fn game_special_n3(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -134,7 +134,7 @@ unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -161,7 +161,7 @@ unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -189,7 +189,7 @@ unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -214,7 +214,7 @@ unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -239,7 +239,7 @@ unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_lw_start(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -248,7 +248,7 @@ unsafe extern "C" fn game_special_lw_start(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_special_lw_8(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw8(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 20.0); @@ -268,7 +268,7 @@ unsafe extern "C" fn game_special_lw_8(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_air_lw10(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw10(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -279,7 +279,7 @@ unsafe extern "C" fn game_special_air_lw10(agent: &mut L2CAgentBase) { frame(lua_state, 15.0); } -unsafe extern "C" fn game_special_lw_14(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw14(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -292,7 +292,7 @@ unsafe extern "C" fn game_special_lw_14(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_lw_17(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw17(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -321,7 +321,7 @@ unsafe extern "C" fn game_special_lw_17(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_special_lw_17(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw17(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -353,7 +353,7 @@ unsafe extern "C" fn effect_special_lw_17(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_lw_18(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw18(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -388,7 +388,7 @@ unsafe extern "C" fn game_special_lw_18(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_special_lw_18(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw18(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -417,7 +417,7 @@ unsafe extern "C" fn effect_special_lw_18(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_lw_19(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw19(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -436,7 +436,7 @@ unsafe extern "C" fn game_special_lw_19(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_lw20(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw20(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -458,39 +458,39 @@ unsafe extern "C" fn game_special_lw20(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn1", game_special_n1); - agent.acmd("game_specialairn1", game_special_n1); - agent.acmd("game_specialn2", game_special_n2); - agent.acmd("game_specialair2", game_special_n2); - agent.acmd("game_specialn3", game_special_n3); - agent.acmd("game_specialairn3", game_special_n3); - agent.acmd("game_specials1", game_special_s1); - agent.acmd("game_specialairs1", game_special_s1); - agent.acmd("game_specials2", game_special_s2); - agent.acmd("game_specialairs2", game_special_s2); - agent.acmd("game_specialhi1", game_special_hi1); - agent.acmd("game_specialairhi1", game_special_hi1); - agent.acmd("game_specialhi2", game_special_hi2); - agent.acmd("game_specialairhi2", game_special_hi2); - agent.acmd("game_specialhi3", game_special_hi3); - agent.acmd("game_specialairhi3", game_special_hi3); - agent.acmd("game_speciallwstart", game_special_lw_start); - agent.acmd("game_specialairlwstart", game_special_lw_start); - agent.acmd("game_speciallw8", game_special_lw_8); - agent.acmd("game_specialairlw8", game_special_lw_8); - agent.acmd("game_specialairlw10", game_special_air_lw10); - agent.acmd("game_speciallw14", game_special_lw_14); - agent.acmd("game_specialairlw14", game_special_lw_14); - agent.acmd("game_speciallw17", game_special_lw_17); - agent.acmd("game_specialairlw17", game_special_lw_17); - agent.acmd("effect_speciallw17", effect_special_lw_17); - agent.acmd("game_specialairlw17", effect_special_lw_17); - agent.acmd("game_speciallw18", game_special_lw_18); - agent.acmd("game_specialairlw18", game_special_lw_18); - agent.acmd("effect_speciallw18", effect_special_lw_18); - agent.acmd("effect_specialairlw18", effect_special_lw_18); - agent.acmd("game_speciallw19", game_special_lw_19); - agent.acmd("game_specialairlw19", game_special_lw_19); - agent.acmd("game_speciallw20", game_special_lw20); - agent.acmd("game_specialairlw20", game_special_lw20); + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialair2", game_specialn2); + agent.acmd("game_specialn3", game_specialn3); + agent.acmd("game_specialairn3", game_specialn3); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); + agent.acmd("game_speciallw8", game_speciallw8); + agent.acmd("game_specialairlw8", game_speciallw8); + agent.acmd("game_specialairlw10", game_specialairlw10); + agent.acmd("game_speciallw14", game_speciallw14); + agent.acmd("game_specialairlw14", game_speciallw14); + agent.acmd("game_speciallw17", game_speciallw17); + agent.acmd("game_specialairlw17", game_speciallw17); + agent.acmd("effect_speciallw17", effect_speciallw17); + agent.acmd("game_specialairlw17", effect_speciallw17); + agent.acmd("game_speciallw18", game_speciallw18); + agent.acmd("game_specialairlw18", game_speciallw18); + agent.acmd("effect_speciallw18", effect_speciallw18); + agent.acmd("effect_specialairlw18", effect_speciallw18); + agent.acmd("game_speciallw19", game_speciallw19); + agent.acmd("game_specialairlw19", game_speciallw19); + agent.acmd("game_speciallw20", game_speciallw20); + agent.acmd("game_specialairlw20", game_speciallw20); } diff --git a/fighters/brave/src/acmd/throws.rs b/fighters/brave/src/acmd/throws.rs index bf0c8420b2..9b36085b6e 100644 --- a/fighters/brave/src/acmd/throws.rs +++ b/fighters/brave/src/acmd/throws.rs @@ -24,7 +24,7 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_catch_dash(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -156,7 +156,7 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); - agent.acmd("game_catchdash", game_catch_dash); + agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwf", game_throwf); agent.acmd("game_throwb", game_throwb); diff --git a/fighters/brave/src/crash/acmd/specials.rs b/fighters/brave/src/crash/acmd/specials.rs index 8510566a15..2e1451c9b9 100644 --- a/fighters/brave/src/crash/acmd/specials.rs +++ b/fighters/brave/src/crash/acmd/specials.rs @@ -87,7 +87,7 @@ unsafe extern "C" fn effect_crash1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_crash_end1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_crashend1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -102,5 +102,5 @@ unsafe extern "C" fn effect_crash_end1(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_crash1", game_crash1); agent.acmd("effect_crash1", effect_crash1); - agent.acmd("effect_crashend1", effect_crash_end1); + agent.acmd("effect_crashend1", effect_crashend1); } \ No newline at end of file diff --git a/fighters/brave/src/fireball/acmd/specials.rs b/fighters/brave/src/fireball/acmd/specials.rs index fdb74994e1..71fd755755 100644 --- a/fighters/brave/src/fireball/acmd/specials.rs +++ b/fighters/brave/src/fireball/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_burst_l(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_burstl(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -25,5 +25,5 @@ unsafe extern "C" fn game_burst_l(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_burstl", game_burst_l); + agent.acmd("game_burstl", game_burstl); } \ No newline at end of file diff --git a/fighters/brave/src/spark/acmd/specials.rs b/fighters/brave/src/spark/acmd/specials.rs index ac35dc952a..d9068e5f41 100644 --- a/fighters/brave/src/spark/acmd/specials.rs +++ b/fighters/brave/src/spark/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -12,5 +12,5 @@ unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specials1", game_special_s1); + agent.acmd("game_specials1", game_specials1); } \ No newline at end of file diff --git a/fighters/brave/src/tornado/acmd/specials.rs b/fighters/brave/src/tornado/acmd/specials.rs index 191525e9e5..8bbd39fd87 100644 --- a/fighters/brave/src/tornado/acmd/specials.rs +++ b/fighters/brave/src/tornado/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -9,7 +9,7 @@ unsafe extern "C" fn game_special_hi1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_special_hi1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -17,7 +17,7 @@ unsafe extern "C" fn effect_special_hi1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -31,7 +31,7 @@ unsafe extern "C" fn game_special_hi2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_special_hi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -39,7 +39,7 @@ unsafe extern "C" fn effect_special_hi2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); for _ in 0..i32::MAX { @@ -67,7 +67,7 @@ unsafe extern "C" fn game_special_hi3(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_special_hi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -77,10 +77,10 @@ unsafe extern "C" fn effect_special_hi3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialhi1", game_special_hi1); - agent.acmd("effect_specialhi1", effect_special_hi1); - agent.acmd("game_specialhi2", game_special_hi2); - agent.acmd("effect_specialhi2", effect_special_hi2); - agent.acmd("game_specialhi3", game_special_hi3); - agent.acmd("effect_specialhi3", effect_special_hi3); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("effect_specialhi3", effect_specialhi3); } \ No newline at end of file diff --git a/fighters/gamewatch/src/acmd/aerials.rs b/fighters/gamewatch/src/acmd/aerials.rs index 866f5bec6a..88ae996c38 100644 --- a/fighters/gamewatch/src/acmd/aerials.rs +++ b/fighters/gamewatch/src/acmd/aerials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -74,7 +74,7 @@ unsafe extern "C" fn game_attack_air_n(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -113,7 +113,7 @@ unsafe extern "C" fn game_attack_air_f(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_landing_air_f(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -122,7 +122,7 @@ unsafe extern "C" fn game_landing_air_f(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn expression_attack_air_f(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -139,7 +139,7 @@ unsafe extern "C" fn expression_attack_air_f(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -200,7 +200,7 @@ unsafe extern "C" fn game_attack_air_b(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_landing_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -209,7 +209,7 @@ unsafe extern "C" fn game_landing_air_b(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -233,7 +233,7 @@ unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -242,7 +242,7 @@ unsafe extern "C" fn sound_attack_air_hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -260,7 +260,7 @@ unsafe extern "C" fn expression_attack_air_hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -299,13 +299,13 @@ unsafe extern "C" fn game_attack_air_lw(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_landing_air_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); } -unsafe extern "C" fn expression_landing_air_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -320,16 +320,16 @@ unsafe extern "C" fn expression_landing_air_lw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attack_air_n); - agent.acmd("game_attackairf", game_attack_air_f); - agent.acmd("game_landingairf", game_landing_air_f); - agent.acmd("expression_attackairf", expression_attack_air_f); - agent.acmd("game_attackairb", game_attack_air_b); - agent.acmd("game_landingairb", game_landing_air_b); - agent.acmd("game_attackairhi", game_attack_air_hi); - agent.acmd("sound_attackairhi", sound_attack_air_hi); - agent.acmd("expression_attackairhi", expression_attack_air_hi); - agent.acmd("game_attackairlw", game_attack_air_lw); - agent.acmd("game_landingairlw", game_landing_air_lw); - agent.acmd("expression_landingairlw", expression_landing_air_lw); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/gamewatch/src/acmd/ground.rs b/fighters/gamewatch/src/acmd/ground.rs index 53cb6e51bb..6c74ff576b 100644 --- a/fighters/gamewatch/src/acmd/ground.rs +++ b/fighters/gamewatch/src/acmd/ground.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -27,7 +27,7 @@ unsafe extern "C" fn game_attack_11(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_100_end(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -45,7 +45,7 @@ unsafe extern "C" fn game_attack_100_end(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 0.6); @@ -75,7 +75,7 @@ unsafe extern "C" fn game_attack_dash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", game_attack_11); - agent.acmd("game_attack100end", game_attack_100_end); - agent.acmd("game_attackdash", game_attack_dash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gamewatch/src/acmd/other.rs b/fighters/gamewatch/src/acmd/other.rs index 4d51254039..57e47348e0 100644 --- a/fighters/gamewatch/src/acmd/other.rs +++ b/fighters/gamewatch/src/acmd/other.rs @@ -59,7 +59,7 @@ unsafe extern "C" fn sound_appealhir(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -74,7 +74,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -115,8 +115,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_turndash", game_turndash); agent.acmd("sound_appealhil", sound_appealhil); agent.acmd("sound_appealhir", sound_appealhir); - agent.acmd("game_escapeair", escape_air_game); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); agent.acmd("game_downforwardd", game_down); agent.acmd("game_downforwardu", game_down); agent.acmd("game_downbackd", game_down); diff --git a/fighters/gamewatch/src/acmd/smashes.rs b/fighters/gamewatch/src/acmd/smashes.rs index 4622dd6fc3..614f330ba4 100644 --- a/fighters/gamewatch/src/acmd/smashes.rs +++ b/fighters/gamewatch/src/acmd/smashes.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attack_s4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -32,7 +32,7 @@ unsafe extern "C" fn game_attack_s4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -56,7 +56,7 @@ unsafe extern "C" fn game_attack_hi4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -81,8 +81,8 @@ unsafe extern "C" fn game_attack_lw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attack_s4); - agent.acmd("game_attackhi4", game_attack_hi4); - agent.acmd("game_attackhi4r", game_attack_hi4); - agent.acmd("game_attacklw4", game_attack_lw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4r", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gamewatch/src/acmd/specials.rs b/fighters/gamewatch/src/acmd/specials.rs index b5efd3cb23..397e62e586 100644 --- a/fighters/gamewatch/src/acmd/specials.rs +++ b/fighters/gamewatch/src/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_n(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -34,7 +34,7 @@ unsafe extern "C" fn game_special_n(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -54,7 +54,7 @@ unsafe extern "C" fn game_special_s1(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -72,7 +72,7 @@ unsafe extern "C" fn game_special_s2(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -89,7 +89,7 @@ unsafe extern "C" fn game_special_s3(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -106,7 +106,7 @@ unsafe extern "C" fn game_special_s4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s5(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials5(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -129,7 +129,7 @@ unsafe extern "C" fn game_special_s5(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s6(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials6(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -145,7 +145,7 @@ unsafe extern "C" fn game_special_s6(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_s7(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials7(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -163,7 +163,7 @@ unsafe extern "C" fn game_special_s7(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_s8(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials8(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -179,7 +179,7 @@ unsafe extern "C" fn game_special_s8(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_s9(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials9(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -196,7 +196,7 @@ unsafe extern "C" fn game_special_s9(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -249,7 +249,7 @@ unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn expression_special_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -281,7 +281,7 @@ unsafe extern "C" fn expression_special_hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -309,7 +309,7 @@ unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_special_hi_open(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialhiopen(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -331,7 +331,7 @@ unsafe extern "C" fn sound_special_hi_open(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_special_hi_open(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialhiopen(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -345,31 +345,31 @@ unsafe extern "C" fn expression_special_hi_open(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn", game_special_n); - agent.acmd("game_specialairn", game_special_n); - agent.acmd("game_specials1", game_special_s1); - agent.acmd("game_specialairs1", game_special_s1); - agent.acmd("game_specials2", game_special_s2); - agent.acmd("game_specialairs2", game_special_s2); - agent.acmd("game_specials3", game_special_s3); - agent.acmd("game_specialairs3", game_special_s3); - agent.acmd("game_specials4", game_special_s4); - agent.acmd("game_specialairs4", game_special_s4); - agent.acmd("game_specials5", game_special_s5); - agent.acmd("game_specialairs5", game_special_s5); - agent.acmd("game_specials6", game_special_s6); - agent.acmd("game_specialairs6", game_special_s6); - agent.acmd("game_specials7", game_special_s7); - agent.acmd("game_specialairs7", game_special_s7); - agent.acmd("game_specials8", game_special_s8); - agent.acmd("game_specialairs8", game_special_s8); - agent.acmd("game_specials9", game_special_s9); - agent.acmd("game_specialairs9", game_special_s9); - agent.acmd("game_specialhi", game_special_hi); - agent.acmd("game_specialairhi", game_special_hi); - agent.acmd("expression_specialhi", expression_special_hi); - agent.acmd("expression_specialairhi", expression_special_hi); - agent.acmd("game_specialhiopen", game_special_hi_open); - agent.acmd("sound_specialhiopen", sound_special_hi_open); - agent.acmd("expression_specialhiopen", expression_special_hi_open); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + agent.acmd("game_specials3", game_specials3); + agent.acmd("game_specialairs3", game_specials3); + agent.acmd("game_specials4", game_specials4); + agent.acmd("game_specialairs4", game_specials4); + agent.acmd("game_specials5", game_specials5); + agent.acmd("game_specialairs5", game_specials5); + agent.acmd("game_specials6", game_specials6); + agent.acmd("game_specialairs6", game_specials6); + agent.acmd("game_specials7", game_specials7); + agent.acmd("game_specialairs7", game_specials7); + agent.acmd("game_specials8", game_specials8); + agent.acmd("game_specialairs8", game_specials8); + agent.acmd("game_specials9", game_specials9); + agent.acmd("game_specialairs9", game_specials9); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("expression_specialairhi", expression_specialhi); + agent.acmd("game_specialhiopen", game_specialhiopen); + agent.acmd("sound_specialhiopen", sound_specialhiopen); + agent.acmd("expression_specialhiopen", expression_specialhiopen); } diff --git a/fighters/gamewatch/src/acmd/tilts.rs b/fighters/gamewatch/src/acmd/tilts.rs index dd2c084e00..145bf466e3 100644 --- a/fighters/gamewatch/src/acmd/tilts.rs +++ b/fighters/gamewatch/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attack_s3_s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -27,7 +27,7 @@ unsafe extern "C" fn game_attack_s3_s(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_hi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -74,7 +74,7 @@ unsafe extern "C" fn game_attack_hi3(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack_lw3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -110,7 +110,7 @@ unsafe extern "C" fn game_attack_lw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attack_s3_s); - agent.acmd("game_attackhi3", game_attack_hi3); - agent.acmd("game_attacklw3", game_attack_lw3); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gamewatch/src/breath/acmd/aerials.rs b/fighters/gamewatch/src/breath/acmd/aerials.rs index 56aad41060..42139c9972 100644 --- a/fighters/gamewatch/src/breath/acmd/aerials.rs +++ b/fighters/gamewatch/src/breath/acmd/aerials.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn game_attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairhi", game_attack_air_hi); + agent.acmd("game_attackairhi", game_attackairhi); } \ No newline at end of file diff --git a/fighters/gamewatch/src/parachute/acmd/specials.rs b/fighters/gamewatch/src/parachute/acmd/specials.rs index 3d1d5de0d6..e8a0e047af 100644 --- a/fighters/gamewatch/src/parachute/acmd/specials.rs +++ b/fighters/gamewatch/src/parachute/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -10,5 +10,5 @@ unsafe extern "C" fn game_special_hi_open(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialhiopen", game_special_hi_open); + agent.acmd("game_specialhiopen", game_specialhiopen); } \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/acmd/specials.rs b/fighters/gamewatch/src/rescue/acmd/specials.rs index 140767f817..378747a1de 100644 --- a/fighters/gamewatch/src/rescue/acmd/specials.rs +++ b/fighters/gamewatch/src/rescue/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -19,7 +19,7 @@ unsafe extern "C" fn game_special_hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_special_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -39,6 +39,6 @@ unsafe extern "C" fn game_special_air_hi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialhi", game_special_hi); - agent.acmd("game_specialairhi", game_special_air_hi); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } \ No newline at end of file diff --git a/fighters/gamewatch/src/status/special_hi.rs b/fighters/gamewatch/src/status/special_hi.rs index 0f4111f090..fd587959a2 100644 --- a/fighters/gamewatch/src/status/special_hi.rs +++ b/fighters/gamewatch/src/status/special_hi.rs @@ -1,54 +1,54 @@ use super::*; use globals::*; -unsafe extern "C" fn special_hi_main(agent: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { - let cancel_module = *(agent.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { + let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false } - WorkModule::on_flag(agent.module_accessor, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_FLAG_SPECIAL_HI); - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, false, -1); - let motion = if agent.is_situation(*SITUATION_KIND_GROUND) { Hash40::new("special_hi") } else { Hash40::new("special_air_hi") }; - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, motion, false, -1.0); - MotionModule::change_motion(agent.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); - if agent.is_situation(*SITUATION_KIND_GROUND) { - agent.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_GAMEWATCH_INSTANCE_WORK_ID_FLAG_SPECIAL_HI); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, false, -1); + let motion = if fighter.is_situation(*SITUATION_KIND_GROUND) { Hash40::new("special_hi") } else { Hash40::new("special_air_hi") }; + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, motion, false, -1.0); + MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); + if fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe fn special_hi_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - agent.sub_transition_group_check_air_cliff(); - if MotionModule::is_end(agent.module_accessor) { - let control = ControlModule::get_attack_air_kind(agent.module_accessor); - WorkModule::set_int(agent.module_accessor, control, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_WORK_INT_ATTACK_AIR_KIND); - if VarModule::is_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { - agent.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); +unsafe fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_transition_group_check_air_cliff(); + if MotionModule::is_end(fighter.module_accessor) { + let control = ControlModule::get_attack_air_kind(fighter.module_accessor); + WorkModule::set_int(fighter.module_accessor, control, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_WORK_INT_ATTACK_AIR_KIND); + if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); } else { - VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return 1.into() } - if agent.status_frame() > 31 && agent.is_cat_flag(Cat1::SpecialAny) { - VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - agent.change_status(statuses::gamewatch::SPECIAL_HI_OPEN.into(), true.into()); + if fighter.status_frame() > 31 && fighter.is_cat_flag(Cat1::SpecialAny) { + VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + fighter.change_status(statuses::gamewatch::SPECIAL_HI_OPEN.into(), true.into()); } - if agent.is_situation(*SITUATION_KIND_GROUND) { - if WorkModule::is_flag(agent.module_accessor, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) { - let status = if WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("landing_frame")) > 0.0 + if fighter.is_situation(*SITUATION_KIND_GROUND) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_GAMEWATCH_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) { + let status = if WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("landing_frame")) > 0.0 { FIGHTER_STATUS_KIND_LANDING } else { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL }; - agent.change_status(status.into(), true.into()); + fighter.change_status(status.into(), true.into()); return 1.into() } } return 0.into() } -unsafe extern "C" fn special_hi_exit(agent: &mut L2CFighterCommon) -> L2CValue { - VarModule::on_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL); +unsafe extern "C" fn special_hi_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::on_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL); 0.into() } diff --git a/fighters/gamewatch/src/status/special_hi_open.rs b/fighters/gamewatch/src/status/special_hi_open.rs index 7b80220d97..337dff28f0 100644 --- a/fighters/gamewatch/src/status/special_hi_open.rs +++ b/fighters/gamewatch/src/status/special_hi_open.rs @@ -1,9 +1,9 @@ use super::*; use globals::*; -unsafe extern "C" fn special_hi_open_pre(agent: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - agent.module_accessor, + fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), *FIGHTER_KINETIC_TYPE_MOTION_FALL, *GROUND_CORRECT_KIND_KEEP as u32, @@ -15,7 +15,7 @@ unsafe extern "C" fn special_hi_open_pre(agent: &mut L2CFighterCommon) -> L2CVal 0 ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -30,36 +30,36 @@ unsafe extern "C" fn special_hi_open_pre(agent: &mut L2CFighterCommon) -> L2CVal 0.into() } -unsafe extern "C" fn special_hi_open_main(agent: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(agent.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, Hash40::new("special_hi_open"), false, -1.0); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_hi_open"), 0.0, 1.0, false, 0.0, false, false); - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_open_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_open_main(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_PARACHUTE); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, false, -1); + ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_RESCUE, Hash40::new("special_hi_open"), false, -1.0); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_open"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_open_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_open_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.is_situation(*SITUATION_KIND_GROUND) { - let status = if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) +unsafe extern "C" fn special_hi_open_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + let status = if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL } else { FIGHTER_STATUS_KIND_LANDING }; - agent.change_status(status.into(), true.into()); + fighter.change_status(status.into(), true.into()); return 1.into() } - agent.sub_air_check_dive(); - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || agent.sub_air_check_fall_common().get_bool() { + fighter.sub_air_check_dive(); + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } - if MotionModule::is_end(agent.module_accessor) || agent.status_frame() > 45 { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) || fighter.status_frame() > 45 { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return 0.into() } -unsafe extern "C" fn special_hi_open_exit(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); +unsafe extern "C" fn special_hi_open_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); 0.into() } diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index 7398d35495..e3a61a8cab 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -1,55 +1,55 @@ use super::*; use std::convert::TryInto; -unsafe extern "C" fn special_hi_start_main(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); - ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - if agent.is_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(agent, Hash40::new("special_hi_start"), true, false); +unsafe extern "C" fn special_hi_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); + ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + if fighter.is_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(fighter, Hash40::new("special_hi_start"), true, false); } else { - special_hi_change_motion(agent, Hash40::new("special_air_hi_start"), false, false); + special_hi_change_motion(fighter, Hash40::new("special_air_hi_start"), false, false); } - VarModule::set_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL, 0); - special_hi_set_physics(agent); - if !StopModule::is_stop(agent.module_accessor) { - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_start_helper as *const () as _)); + VarModule::set_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL, 0); + special_hi_set_physics(fighter); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_start_helper as *const () as _)); } - GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_start_main_loop as *const () as _)) + GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_start_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_start_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || !agent.sub_air_check_fall_common().get_bool() { +unsafe extern "C" fn special_hi_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || !fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } - let rise_min_frame = ParamModule::get_int(agent.battle_object, ParamType::Agent, "param_special_hi.rise_min_frame"); - if MotionModule::is_end(agent.module_accessor) || - ((rise_min_frame..MotionModule::end_frame(agent.module_accessor) as i32).contains(&agent.status_frame()) - && ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL)) { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI.into(), false.into()); + let rise_min_frame = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "param_special_hi.rise_min_frame"); + if MotionModule::is_end(fighter.module_accessor) || + ((rise_min_frame..MotionModule::end_frame(fighter.module_accessor) as i32).contains(&fighter.status_frame()) + && ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL)) { + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI.into(), false.into()); } else { - if agent.status_frame() > rise_min_frame { - if agent.is_situation(*SITUATION_KIND_GROUND) && (agent.status_frame() + rise_min_frame) % 15 == 0 { - EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_ZX); + if fighter.status_frame() > rise_min_frame { + if fighter.is_situation(*SITUATION_KIND_GROUND) && (fighter.status_frame() + rise_min_frame) % 15 == 0 { + EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_ZX); } - if agent.status_frame() <= 50 { - VarModule::inc_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL); + if fighter.status_frame() <= 50 { + VarModule::inc_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL); } } - if agent.is_prev_situation(*SITUATION_KIND_GROUND) { - if agent.is_situation(*SITUATION_KIND_AIR) { - special_hi_change_motion(agent, Hash40::new("special_air_hi_start"), false, true); + if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { + if fighter.is_situation(*SITUATION_KIND_AIR) { + special_hi_change_motion(fighter, Hash40::new("special_air_hi_start"), false, true); } } else { - if agent.is_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(agent, Hash40::new("special_hi_start"), true, true); + if fighter.is_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(fighter, Hash40::new("special_hi_start"), true, true); } } } @@ -57,84 +57,84 @@ unsafe extern "C" fn special_hi_start_main_loop(agent: &mut L2CFighterCommon) -> return 0.into() } -unsafe extern "C" fn special_hi_start_exit(agent: &mut L2CFighterCommon) -> L2CValue { - SoundModule::stop_se(agent.module_accessor, Hash40::new("se_krool_special_h02"), 0); +unsafe extern "C" fn special_hi_start_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_krool_special_h02"), 0); return 0.into() } -unsafe extern "C" fn special_hi_main(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FLY, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - if agent.is_prev_situation(*SITUATION_KIND_GROUND) { - special_hi_change_motion(agent, Hash40::new("special_hi"), false, false); +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FLY, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { + special_hi_change_motion(fighter, Hash40::new("special_hi"), false, false); } else { - special_hi_change_motion(agent, Hash40::new("special_air_hi"), false, false); + special_hi_change_motion(fighter, Hash40::new("special_air_hi"), false, false); } - agent.set_situation(SITUATION_KIND_AIR.into()); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_UNIQ); - special_hi_set_physics(agent); - WorkModule::set_float(agent.module_accessor, 0.5, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); - if !StopModule::is_stop(agent.module_accessor) { - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_UNIQ); + special_hi_set_physics(fighter); + WorkModule::set_float(fighter.module_accessor, 0.5, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); } - GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) + GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || !agent.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || !fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } - let param_brake_after_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_after_frame")); - let brake_after_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + let param_brake_after_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_after_frame")); + let brake_after_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); if brake_after_frame > param_brake_after_frame { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END.into(), false.into()); + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END.into(), false.into()); return 0.into() } - if agent.is_situation(*SITUATION_KIND_GROUND) { - let start_air_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_air_frame")); - if agent.global_table[CURRENT_FRAME].get_i32() > start_air_frame { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if fighter.is_situation(*SITUATION_KIND_GROUND) { + let start_air_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_air_frame")); + if fighter.global_table[CURRENT_FRAME].get_i32() > start_air_frame { + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } } return 0.into() } -unsafe extern "C" fn special_hi_end_main(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_TOP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_hi_air_end"), 0.0, 1.0, false, 0.0, false, false); - special_hi_lerp_motion(agent, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); - special_hi_set_physics(agent); - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); - GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_TOP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi_air_end"), 0.0, 1.0, false, 0.0, false, false); + special_hi_lerp_motion(fighter, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); + special_hi_set_physics(fighter); + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_end_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if !CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } else { - if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL.into(), false.into()); } } - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || !agent.sub_air_check_fall_common().get_bool() { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || !fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } @@ -142,23 +142,23 @@ unsafe extern "C" fn special_hi_end_main_loop(agent: &mut L2CFighterCommon) -> L return 0.into() } -unsafe extern "C" fn special_hi_fall_main(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::change_status(agent.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FALL, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - special_hi_change_motion(agent, Hash40::new("special_hi_fall"), false, true); - special_hi_lerp_motion(agent, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); - special_hi_set_physics(agent); - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); - GroundModule::select_cliff_hangdata(agent.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); - agent.sub_shift_status_main(L2CValue::Ptr(special_hi_fall_main_loop as *const () as _)) +unsafe extern "C" fn special_hi_fall_main(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_FALL, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + special_hi_change_motion(fighter, Hash40::new("special_hi_fall"), false, true); + special_hi_lerp_motion(fighter, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); + special_hi_set_physics(fighter); + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_hi_movement_helper as *const () as _)); + GroundModule::select_cliff_hangdata(fighter.module_accessor, *FIGHTER_KROOL_CLIFF_HANG_DATA_SPECIAL_HI as u32); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_fall_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi_fall_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_fall_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into() } - if !CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - agent.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.change_status(FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_LANDING.into(), false.into()); } // else { // let fall_special_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_special_spd_y"); @@ -169,8 +169,8 @@ unsafe extern "C" fn special_hi_fall_main_loop(agent: &mut L2CFighterCommon) -> // fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), false.into()); // } // } - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || !agent.sub_air_check_fall_common().get_bool() { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || !fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } @@ -179,19 +179,19 @@ unsafe extern "C" fn special_hi_fall_main_loop(agent: &mut L2CFighterCommon) -> } //FUN_7100023a20 -unsafe extern "C" fn special_hi_start_helper(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_start_helper(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - agent.clear_lua_stack(); - lua_args!(agent, *FIGHTER_KINETIC_ENERGY_ID_STOP); - let mut speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, *FIGHTER_KINETIC_ENERGY_ID_STOP); + let mut speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); let square_y = speed_y * speed_y; if square_y < 0.0 { - let move_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - WorkModule::set_float(agent.module_accessor, -(move_y.abs()), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let move_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + WorkModule::set_float(fighter.module_accessor, -(move_y.abs()), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); } else { - let move_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - WorkModule::set_float(agent.module_accessor, move_y.abs(), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let move_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + WorkModule::set_float(fighter.module_accessor, move_y.abs(), *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); } } @@ -199,155 +199,155 @@ unsafe extern "C" fn special_hi_start_helper(agent: &mut L2CFighterCommon, param } // FUN_710001dba0 -unsafe extern "C" fn special_hi_change_motion(agent: &mut L2CFighterCommon, motion: Hash40, ground: bool, inherit: bool) { +unsafe extern "C" fn special_hi_change_motion(fighter: &mut L2CFighterCommon, motion: Hash40, ground: bool, inherit: bool) { if ground { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); } else { - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); } if inherit { - MotionModule::change_motion_inherit_frame(agent.module_accessor, motion, -1.0, 1.0, 0.0, false, false); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, motion, -1.0, 1.0, 0.0, false, false); } else { - MotionModule::change_motion(agent.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } } // FUN_710001ea30 -unsafe extern "C" fn special_hi_set_physics(agent: &mut L2CFighterCommon) { - let mut speed_x = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - let mut speed_y = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START) { - let start_mul_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_mul_spd_x")); - let start_air_mul_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_x")); - let start_brake_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_brake_x"); - let start_limit_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_limit_spd_x"); - let start_air_mul_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_y")); - let start_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_max_spd_y")); - let start_stable_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.start_stable_spd_y"); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); +unsafe extern "C" fn special_hi_set_physics(fighter: &mut L2CFighterCommon) { + let mut speed_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let mut speed_y = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START) { + let start_mul_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_mul_spd_x")); + let start_air_mul_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_x")); + let start_brake_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_brake_x"); + let start_limit_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_limit_spd_x"); + let start_air_mul_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_start_air_mul_spd_y")); + let start_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_start_max_spd_y")); + let start_stable_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_stable_spd_y"); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); speed_y *= start_air_mul_spd_y; speed_y = speed_y.clamp(-start_max_spd_y, start_max_spd_y); let start_acl_y = if speed_y <= 0.0 { 1.0 } else { -1.0 }; - speed_x *= if agent.is_situation(*SITUATION_KIND_GROUND) { start_mul_spd_x } else { start_air_mul_spd_x }; - - sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_acl_y); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_max_spd_y); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_stable_spd_y); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); - - sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, start_brake_x, 0.0); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, start_limit_spd_x, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { - let fly_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); - let fly_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_y")); - let charge_frames = VarModule::get_int(agent.object(), vars::krool::instance::SPECIAL_HI_FUEL) as f32; - let fly_charge_min_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_x"); - let fly_charge_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_x_mul"); - let mut fly_limit_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_limit_spd_x"); - fly_limit_spd_x *= PostureModule::lr(agent.module_accessor); - let fly_charge_min_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_y"); - let fly_charge_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_charge_y_mul"); + speed_x *= if fighter.is_situation(*SITUATION_KIND_GROUND) { start_mul_spd_x } else { start_air_mul_spd_x }; + + sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_acl_y); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_max_spd_y); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, start_stable_spd_y); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); + + sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, start_brake_x, 0.0); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, start_limit_spd_x, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { + let fly_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); + let fly_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_y")); + let charge_frames = VarModule::get_int(fighter.object(), vars::krool::instance::SPECIAL_HI_FUEL) as f32; + let fly_charge_min_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_x"); + let fly_charge_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_x_mul"); + let mut fly_limit_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_limit_spd_x"); + fly_limit_spd_x *= PostureModule::lr(fighter.module_accessor); + let fly_charge_min_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_min_spd_y"); + let fly_charge_y_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_charge_y_mul"); // accounts for 50 max charge frames (this ended up being 38 in practice, oops) - let calc_charge_x = (fly_charge_min_spd_x + (charge_frames * fly_charge_x_mul)) * PostureModule::lr(agent.module_accessor); + let calc_charge_x = (fly_charge_min_spd_x + (charge_frames * fly_charge_x_mul)) * PostureModule::lr(fighter.module_accessor); let calc_charge_y = fly_charge_min_spd_y + (charge_frames * fly_charge_y_mul); // max x: 0.97, max y: 3.0 - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); - sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, calc_charge_y); - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_acl_y); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fly_max_spd_y); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); - - sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fly_limit_spd_x, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { - let max_sum_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_max_sum_spd_y")); - let fall_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); - let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); - let fall_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); - let fall_stick_mul_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //unused - let fall_brake_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_brake_x"); - let mut fall_stable_spd_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_stable_spd_x"); - fall_stable_spd_x *= PostureModule::lr(agent.module_accessor); - let fall_limit_speed_x = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fall_limit_spd_x"); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, calc_charge_y); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_acl_y); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fly_max_spd_y); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); + + sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fly_limit_spd_x, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { + let max_sum_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_max_sum_spd_y")); + let fall_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); + let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); + let fall_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); + let fall_stick_mul_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //unused + let fall_brake_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_brake_x"); + let mut fall_stable_spd_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_stable_spd_x"); + fall_stable_spd_x *= PostureModule::lr(fighter.module_accessor); + let fall_limit_speed_x = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_limit_spd_x"); if speed_y >= max_sum_spd_y { speed_y = max_sum_spd_y; } speed_x = speed_x.clamp(-fall_max_spd_x, fall_max_spd_x); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); - sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_max_spd_y); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); - - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_brake_x, 0.0); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_limit_speed_x, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_stable_spd_x, 0.0); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - else if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { - let fall_acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); - let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); - - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); - sv_kinetic_energy!(reset_energy, agent, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, agent.module_accessor); - - sv_kinetic_energy!(reset_energy, agent, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 2.0, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_max_spd_y); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); + + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_brake_x, 0.0); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_limit_speed_x, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_stable_spd_x, 0.0); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + else if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { + let fall_acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_acl_y")); + let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); + + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + sv_kinetic_energy!(reset_energy, fighter, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fall_acl_y); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_CONTROL, fighter.module_accessor); + + sv_kinetic_energy!(reset_energy, fighter, ENERGY_STOP_RESET_TYPE_AIR, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 2.0, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); } } //FUN_71000210d0 -unsafe extern "C" fn special_hi_movement_helper(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_movement_helper(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - let gravity_minus = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y_speed_minus")); //hash40("special_hi_fly_acl_y_speed_minus") - let acl_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); //hash40("special_hi_fly_acl_y") - let touch_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_touch_max_spd_x")); //hash40("special_hi_fly_touch_max_spd_x") - let max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_x")); //hash40("special_hi_fly_max_spd_x") - let stick_mul_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_max_spd_x")); //hash40("special_hi_fly_stick_mul_max_spd_x") - let stick_mul_acl_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_acl_spd_y")); //hash40("special_hi_fly_stick_mul_acl_spd_y") - let brake_movement_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_movement_y")); //hash40("special_hi_fly_brake_movement_y") - let fly_brake_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_y")); //hash40("special_hi_fly_brake_y") - let fall_max_spd_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); //hash40("special_hi_fall_max_spd_x") - let fall_stick_mul_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //hash40("special_hi_fall_stick_mul_max_spd_y") - let fall_max_spd_y = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); //hash40("special_hi_fall_max_spd_y") - let unknown_param = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), 0x1f32a7c5bf); + let gravity_minus = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y_speed_minus")); //hash40("special_hi_fly_acl_y_speed_minus") + let acl_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_acl_y")); //hash40("special_hi_fly_acl_y") + let touch_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_touch_max_spd_x")); //hash40("special_hi_fly_touch_max_spd_x") + let max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_max_spd_x")); //hash40("special_hi_fly_max_spd_x") + let stick_mul_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_max_spd_x")); //hash40("special_hi_fly_stick_mul_max_spd_x") + let stick_mul_acl_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_stick_mul_acl_spd_y")); //hash40("special_hi_fly_stick_mul_acl_spd_y") + let brake_movement_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_movement_y")); //hash40("special_hi_fly_brake_movement_y") + let fly_brake_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_brake_y")); //hash40("special_hi_fly_brake_y") + let fall_max_spd_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_x")); //hash40("special_hi_fall_max_spd_x") + let fall_stick_mul_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_stick_mul_max_spd_y")); //hash40("special_hi_fall_stick_mul_max_spd_y") + let fall_max_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fall_max_spd_y")); //hash40("special_hi_fall_max_spd_y") + let unknown_param = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), 0x1f32a7c5bf); let mut stick_mul_x_delta; //l160 let mut stick_mul_acl_y_delta; //l170 let mut stick_mul_fall_y_delta; //l180 @@ -356,86 +356,86 @@ unsafe extern "C" fn special_hi_movement_helper(agent: &mut L2CFighterCommon, pa stick_mul_x_delta = 1.0; } else { - stick_mul_x_delta = (stick_mul_max_spd_x - 1.0) * agent.stick_x() + 1.0; + stick_mul_x_delta = (stick_mul_max_spd_x - 1.0) * fighter.stick_x() + 1.0; } - if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == (*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL | *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { + if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == (*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL | *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) { stick_mul_x_delta = 1.0; } if stick_mul_acl_spd_y >= 1.0 { stick_mul_acl_y_delta = 1.0; } else { - stick_mul_acl_y_delta = 1.0 - (1.0 - stick_mul_acl_spd_y) * agent.stick_x(); + stick_mul_acl_y_delta = 1.0 - (1.0 - stick_mul_acl_spd_y) * fighter.stick_x(); } if fall_stick_mul_max_spd_y <= 1.0 { stick_mul_fall_y_delta = 1.0; } else { - stick_mul_fall_y_delta = 1.0 + (fall_stick_mul_max_spd_y - 1.0) * agent.stick_x(); + stick_mul_fall_y_delta = 1.0 + (fall_stick_mul_max_spd_y - 1.0) * fighter.stick_x(); } - if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() != *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_max_spd_x * stick_mul_x_delta, 0.0); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y * stick_mul_fall_y_delta); + if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() != *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, fall_max_spd_x * stick_mul_x_delta, 0.0); + sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_max_spd_y * stick_mul_fall_y_delta); } else { - if GroundModule::is_touch(agent.module_accessor, *GROUND_TOUCH_FLAG_ALL as u32) { - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, touch_max_spd_x * stick_mul_x_delta, 0.0); + if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_ALL as u32) { + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, touch_max_spd_x * stick_mul_x_delta, 0.0); } else { - sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, max_spd_x * stick_mul_x_delta, 0.0); + sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, max_spd_x * stick_mul_x_delta, 0.0); } - let brake_after_frame = WorkModule::get_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + let brake_after_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); if brake_after_frame >= 0 { - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); - WorkModule::inc_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); } - let movement_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + let movement_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); let brake_mul = brake_movement_y * 10.0; if brake_mul > movement_y { - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, acl_y * stick_mul_acl_y_delta); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, acl_y * stick_mul_acl_y_delta); } else { - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); - WorkModule::inc_int(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -fly_brake_y); + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_INT_BRAKE_AFTER_FRAME); } - agent.clear_lua_stack(); - agent.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); - let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); + fighter.clear_lua_stack(); + fighter.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); if speed_y < 0.0 { - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, gravity_minus); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, gravity_minus); } } - special_hi_lean_physics(agent); + special_hi_lean_physics(fighter); - agent.clear_lua_stack(); - agent.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); - let mut movement_y = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); - if app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent) <= 0.0 { + fighter.clear_lua_stack(); + fighter.push_lua_stack(&mut L2CValue::new_int((*FIGHTER_KINETIC_ENERGY_ID_GRAVITY).try_into().unwrap())); + let mut movement_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); + if app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent) <= 0.0 { movement_y *= -1.0; } - WorkModule::set_float(agent.module_accessor, movement_y, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); // unsure about this + WorkModule::set_float(fighter.module_accessor, movement_y, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOVEMENT_Y); // unsure about this // if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI { // special_hi_lerp_motion(fighter, "special_hi_f", "special_hi_b"); // } - if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END { - special_hi_lerp_motion(agent, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); + if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END { + special_hi_lerp_motion(fighter, Hash40::new("special_hi_air_end_f"), Hash40::new("special_hi_air_end_b")); } - else if agent.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { - special_hi_lerp_motion(agent, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); + else if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL { + special_hi_lerp_motion(fighter, Hash40::new("special_hi_fall_f"), Hash40::new("special_hi_fall_b")); } } return 0.into() } -unsafe extern "C" fn special_hi_lean_physics(agent: &mut L2CFighterCommon) { - let mul_max_acl_x = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_mul_max_acl_x")); - let mul_stick_x = agent.stick_x() * mul_max_acl_x; //l190 - sv_kinetic_energy!(set_brake, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); +unsafe extern "C" fn special_hi_lean_physics(fighter: &mut L2CFighterCommon) { + let mul_max_acl_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("special_hi_fly_mul_max_acl_x")); + let mul_stick_x = fighter.stick_x() * mul_max_acl_x; //l190 + sv_kinetic_energy!(set_brake, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); if mul_stick_x != 0.0 { let mut calc_mul_x = mul_stick_x; // if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) @@ -452,34 +452,34 @@ unsafe extern "C" fn special_hi_lean_physics(agent: &mut L2CFighterCommon) { // sv_kinetic_energy!(set_limit_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_charge_fly_lean, 0.0); // } // } - sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_mul_x, 0.0); + sv_kinetic_energy!(set_accel, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, calc_mul_x, 0.0); } - if agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { - let speed_y = agent.get_speed_y(*FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - if (-0.1..0.1).contains(&(agent.stick_x() * PostureModule::lr(agent.module_accessor))) { - let fly_no_lean_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_no_lean_spd_y"); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - fly_no_lean_spd_y); + if fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI) { + let speed_y = fighter.get_speed_y(*FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + if (-0.1..0.1).contains(&(fighter.stick_x() * PostureModule::lr(fighter.module_accessor))) { + let fly_no_lean_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_no_lean_spd_y"); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - fly_no_lean_spd_y); } else { - let fly_lean_f_spd_y = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi.fly_lean_f_spd_y"); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - 0.05); //fly_lean_f_spd_y, change properly when prcs are no longer ass + let fly_lean_f_spd_y = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fly_lean_f_spd_y"); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, speed_y - 0.05); //fly_lean_f_spd_y, change properly when prcs are no longer ass } } - else if (agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) && agent.status_frame() >= 15) - || agent.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { - let fall_lean_stick_mul_x = 0.1 * agent.stick_x(); //ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_lean_stick_mul_x"); - let speed_x = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); - sv_kinetic_energy!(set_speed, agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); + else if (fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_AIR_END) && fighter.status_frame() >= 15) + || fighter.is_status(*FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_FALL) { + let fall_lean_stick_mul_x = 0.1 * fighter.stick_x(); //ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.fall_lean_stick_mul_x"); + let speed_x = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); + sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); } } //FUN_710001e090 -unsafe extern "C" fn special_hi_lerp_motion(agent: &mut L2CFighterCommon, motion1: Hash40, motion2: Hash40) { - let mut lerp_rate = WorkModule::get_float(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); //l80 +unsafe extern "C" fn special_hi_lerp_motion(fighter: &mut L2CFighterCommon, motion1: Hash40, motion2: Hash40) { + let mut lerp_rate = WorkModule::get_float(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); //l80 //println!("stick_x: {}, pre-lerp: {}", fighter.stick_x(), lerp_rate); - if (-0.1..0.1).contains(&agent.stick_x()) { + if (-0.1..0.1).contains(&fighter.stick_x()) { if lerp_rate >= 0.5 { lerp_rate = (lerp_rate - 0.05).clamp(0.5, 1.0); } @@ -488,8 +488,8 @@ unsafe extern "C" fn special_hi_lerp_motion(agent: &mut L2CFighterCommon, motion } } else { - let stick_lr = agent.stick_x() * PostureModule::lr(agent.module_accessor); - let turn_stick_x = WorkModule::get_param_float(agent.module_accessor, hash40("common"), hash40("turn_stick_x")); + let stick_lr = fighter.stick_x() * PostureModule::lr(fighter.module_accessor); + let turn_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("turn_stick_x")); //println!("{} >? {}", stick_lr, turn_stick_x); if stick_lr > turn_stick_x { lerp_rate = (lerp_rate - 0.05).clamp(0.0, 1.0); @@ -499,9 +499,9 @@ unsafe extern "C" fn special_hi_lerp_motion(agent: &mut L2CFighterCommon, motion } } //println!("stick_x: {}, post-lerp: {}", fighter.stick_x(), lerp_rate); - WorkModule::set_float(agent.module_accessor, lerp_rate, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); + WorkModule::set_float(fighter.module_accessor, lerp_rate, *FIGHTER_KROOL_STATUS_SPECIAL_HI_FLOAT_MOTION_2ND_LERP_RATE); - let mut motion_kind = MotionModule::motion_kind_2nd(agent.module_accessor); //l90 + let mut motion_kind = MotionModule::motion_kind_2nd(fighter.module_accessor); //l90 //println!("starting motion: {}", motion_kind); let mut hash_motion; let mut adjusted_lerp; //la0 @@ -515,12 +515,12 @@ unsafe extern "C" fn special_hi_lerp_motion(agent: &mut L2CFighterCommon, motion hash_motion = motion1; adjusted_lerp = (lerp_rate * 2.0) - 1.0; } - if MotionModule::motion_kind_2nd(agent.module_accessor) != motion_kind { - let frame = MotionModule::frame(agent.module_accessor); - let rate = MotionModule::rate(agent.module_accessor); - MotionModule::add_motion_2nd(agent.module_accessor, hash_motion, frame, rate, true, adjusted_lerp); + if MotionModule::motion_kind_2nd(fighter.module_accessor) != motion_kind { + let frame = MotionModule::frame(fighter.module_accessor); + let rate = MotionModule::rate(fighter.module_accessor); + MotionModule::add_motion_2nd(fighter.module_accessor, hash_motion, frame, rate, true, adjusted_lerp); } - MotionModule::set_weight(agent.module_accessor, 1.0 - adjusted_lerp, true); + MotionModule::set_weight(fighter.module_accessor, 1.0 - adjusted_lerp, true); } diff --git a/fighters/krool/src/status/special_lw.rs b/fighters/krool/src/status/special_lw.rs index be35712886..150f3d423f 100644 --- a/fighters/krool/src/status/special_lw.rs +++ b/fighters/krool/src/status/special_lw.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn special_lw_main_old(agent: &mut L2CFighterCommon) -> L2CValue { - agent.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); +unsafe extern "C" fn special_lw_main_old(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); 0.into() } -unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings(agent.module_accessor, +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_UNIQ, *GROUND_CORRECT_KIND_KEEP as u32, @@ -19,7 +19,7 @@ unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { 0 ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -34,77 +34,77 @@ unsafe extern "C" fn special_lw_pre(agent: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn special_lw_main(agent: &mut L2CFighterCommon) -> L2CValue { - agent.main_shift(special_lw_main_loop) +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.main_shift(special_lw_main_loop) } -unsafe extern "C" fn special_lw_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(agent.module_accessor) - || StatusModule::is_situation_changed(agent.module_accessor) { - special_lw_change_motion(agent); +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) + || StatusModule::is_situation_changed(fighter.module_accessor) { + special_lw_change_motion(fighter); } - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || agent.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { return 1.into(); } } - if MotionModule::is_end(agent.module_accessor) { - let status = if agent.is_situation(*SITUATION_KIND_GROUND) { + if MotionModule::is_end(fighter.module_accessor) { + let status = if fighter.is_situation(*SITUATION_KIND_GROUND) { FIGHTER_STATUS_KIND_WAIT } else { FIGHTER_STATUS_KIND_FALL }; - agent.change_status(status.into(), false.into()); + fighter.change_status(status.into(), false.into()); return 0.into(); } - if WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR) <= 1 { - GroundModule::correct(agent.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + if WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_FRAME_IN_AIR) <= 1 { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } - if (6..29).contains(&agent.status_frame()) // gut charge logic - && !ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) - && VarModule::is_flag(agent.object(), vars::krool::status::GUT_CHECK_CHARGED) { - VarModule::off_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED); - MotionModule::set_frame_sync_anim_cmd(agent.module_accessor, 30.0, true, true, false); + if (6..29).contains(&fighter.status_frame()) // gut charge logic + && !ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) + && VarModule::is_flag(fighter.object(), vars::krool::status::GUT_CHECK_CHARGED) { + VarModule::off_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED); + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, 30.0, true, true, false); } - if agent.status_frame() > 8 // Allows for jump cancel on frame 10 (35 in animation) if not charged - && !VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) - && !agent.is_in_hitlag() { - agent.check_jump_cancel(false, false); + if fighter.status_frame() > 8 // Allows for jump cancel on frame 10 (35 in animation) if not charged + && !VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) + && !fighter.is_in_hitlag() { + fighter.check_jump_cancel(false, false); } - if VarModule::is_flag(agent.battle_object, vars::krool::status::GUT_CHECK_CHARGED) // restore armor on full charge hit - && AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) - && !AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_SHIELD) { - WorkModule::set_float(agent.module_accessor, 4.0, 0x4d); - VarModule::set_float(agent.battle_object, vars::krool::instance::STORED_DAMAGE, 0.0); + if VarModule::is_flag(fighter.battle_object, vars::krool::status::GUT_CHECK_CHARGED) // restore armor on full charge hit + && AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) + && !AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) { + WorkModule::set_float(fighter.module_accessor, 4.0, 0x4d); + VarModule::set_float(fighter.battle_object, vars::krool::instance::STORED_DAMAGE, 0.0); } return 0.into() } //FUN_710001bef0 -unsafe extern "C" fn special_lw_change_motion(agent: &mut L2CFighterCommon) { - if !agent.is_situation(*SITUATION_KIND_GROUND) { - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_lw"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); +unsafe extern "C" fn special_lw_change_motion(fighter: &mut L2CFighterCommon) { + if !fighter.is_situation(*SITUATION_KIND_GROUND) { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_lw"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); } else { - MotionModule::change_motion_inherit_frame_keep_rate(agent.module_accessor, Hash40::new("special_air_lw"), -1.0, 1.0, 0.0); + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_air_lw"), -1.0, 1.0, 0.0); } } else { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KROOL_STATUS_SPECIAL_LW_FLAG_FIRST); } else { - MotionModule::change_motion_inherit_frame_keep_rate(agent.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); } } diff --git a/fighters/ridley/src/status/special_lw.rs b/fighters/ridley/src/status/special_lw.rs index 7a5dc1bf0b..29ceb35667 100644 --- a/fighters/ridley/src/status/special_lw.rs +++ b/fighters/ridley/src/status/special_lw.rs @@ -1,96 +1,96 @@ use super::*; use globals::*; -unsafe extern "C" fn special_lw_main(agent: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND - || VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB); - smashline::original_status(Main, agent, *FIGHTER_STATUS_KIND_SPECIAL_LW)(agent) +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND + || VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB); + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) } else { - if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) <= 0.0 { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) <= 0.0 { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); } - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - WorkModule::off_flag(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_TO_FINISH); - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_lw_pogo"), 0.0, 1.0, false, 0.0, false, false); - agent.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_LW_FLAG_TO_FINISH); + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING); + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_lw_pogo"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } } -unsafe extern "C" fn special_lw_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING) { - if StatusModule::situation_kind(agent.module_accessor) != *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING) { + if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + else if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } } - else if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { - if VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - agent.set_situation(SITUATION_KIND_GROUND.into()); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_lw_pogo_landing"), 0.0, 1.0, false, 0.0, false, false); - VarModule::on_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); + else if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { + if VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_LANDING) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + fighter.set_situation(SITUATION_KIND_GROUND.into()); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw_pogo_landing"), 0.0, 1.0, false, 0.0, false, false); + VarModule::on_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_LANDING); } else { - agent.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); + fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); return true.into() } } - else if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + else if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_air_check_fall_common().get_bool() { + else if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_air_check_fall_common().get_bool() { return true.into() } } else { - special_lw_pogo_bounce_check(agent, VarModule::is_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE)); + special_lw_pogo_bounce_check(fighter, VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE)); } false.into() } -unsafe extern "C" fn special_lw_pogo_bounce_check(agent: &mut L2CFighterCommon, check_hit: bool) { +unsafe extern "C" fn special_lw_pogo_bounce_check(fighter: &mut L2CFighterCommon, check_hit: bool) { let v3f_tail_pos = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; - ModelModule::joint_global_position(agent.module_accessor, Hash40::new("tail8"), v3f_tail_pos, false); - let pos_x_global = PostureModule::pos_x(agent.module_accessor); - let pos_y_global = PostureModule::pos_y(agent.module_accessor); - let lr = PostureModule::lr(agent.module_accessor); - let stored_pos = VarModule::get_vec2(agent.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS); + ModelModule::joint_global_position(fighter.module_accessor, Hash40::new("tail8"), v3f_tail_pos, false); + let pos_x_global = PostureModule::pos_x(fighter.module_accessor); + let pos_y_global = PostureModule::pos_y(fighter.module_accessor); + let lr = PostureModule::lr(fighter.module_accessor); + let stored_pos = VarModule::get_vec2(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS); let pos_x_prev = stored_pos.x; let pos_y_prev = stored_pos.y; // save current tail position relative to fighter - VarModule::set_vec2(agent.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS, Vector2f{x: v3f_tail_pos.x - pos_x_global, y: v3f_tail_pos.y - pos_y_global}); + VarModule::set_vec2(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_BOUNCE_PREV_POS, Vector2f{x: v3f_tail_pos.x - pos_x_global, y: v3f_tail_pos.y - pos_y_global}); if check_hit { let ground_hit_pos = &mut Vector2f{x: 0.0, y: 0.0}; if GroundModule::ray_check_hit_pos( // checks for ground between previous tail pos and current tail pos, saves collision pos to "ground_hit_pos" - agent.module_accessor, + fighter.module_accessor, &Vector2f{x: pos_x_prev + pos_x_global, y: pos_y_prev + pos_y_global}, &Vector2f{x: (v3f_tail_pos.x - (pos_x_prev + pos_x_global)) + (8.0 * lr), y: v3f_tail_pos.y - (pos_y_prev + pos_y_global) - 8.0}, ground_hit_pos, @@ -100,7 +100,7 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(agent: &mut L2CFighterCommon, let mut slope_angle = 0.0; let slope_check_pos = &mut Vector2f{x: 0.0, y: 0.0}; if GroundModule::ray_check_hit_pos( - agent.module_accessor, + fighter.module_accessor, &Vector2f{x: ground_hit_pos.x + (5.0 * lr), y: ground_hit_pos.y + 5.0}, &Vector2f{x: 0.0, y: -10.0 }, slope_check_pos, @@ -114,11 +114,11 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(agent: &mut L2CFighterCommon, slope_angle = 360.0 -((-pos_diff_y / 5.0).atan().to_degrees()); } } - EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - PLAY_SE(agent, Hash40::new("se_ridley_special_h03")); - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, 0); + EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), (ground_hit_pos.x - pos_x_global) * lr, ground_hit_pos.y - pos_y_global, 0, slope_angle, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + PLAY_SE(fighter, Hash40::new("se_ridley_special_h03")); + QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_impact"), 0, false, 0); let bounce_vel_max = 2.5; let bounce_vel_min = 0.0; @@ -130,18 +130,18 @@ unsafe extern "C" fn special_lw_pogo_bounce_check(agent: &mut L2CFighterCommon, else if velocity_y < bounce_vel_min { velocity_y = bounce_vel_min; } - let velocity_x = PostureModule::lr(agent.module_accessor) * KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - SET_SPEED_EX(agent, velocity_x*0.5, velocity_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let velocity_x = PostureModule::lr(fighter.module_accessor) * KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(fighter, velocity_x*0.5, velocity_y, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } - else if AttackModule::is_infliction(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { + else if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { // hitting a hurtbox gives set momentum - let velocity_x = PostureModule::lr(agent.module_accessor) * KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - SET_SPEED_EX(agent, velocity_x*0.5, 1.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - VarModule::off_flag(agent.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + let velocity_x = PostureModule::lr(fighter.module_accessor) * KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(fighter, velocity_x*0.5, 1.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + VarModule::off_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_ENABLE_BOUNCE); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } } diff --git a/fighters/ridley/src/status/special_n.rs b/fighters/ridley/src/status/special_n.rs index e08eab1751..265a770bb8 100644 --- a/fighters/ridley/src/status/special_n.rs +++ b/fighters/ridley/src/status/special_n.rs @@ -1,125 +1,125 @@ use super::*; use globals::*; -unsafe extern "C" fn special_n_charge_main(agent: &mut L2CFighterCommon) -> L2CValue { - WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); - WorkModule::set_int64(agent.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - WorkModule::set_int64(agent.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - if agent.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); +unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); + WorkModule::set_int64(fighter.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + if fighter.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); } else { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_n_hold"), 0.0, 1.0, false, 0.0, false, false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_hold"), 0.0, 1.0, false, 0.0, false, false); } - let max_charge_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")) as f32; - let end_frame = MotionModule::end_frame(agent.module_accessor); - MotionModule::set_rate(agent.module_accessor, end_frame/max_charge_frame); - HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); - WorkModule::set_int(agent.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - let charge = WorkModule::get_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - if !StopModule::is_stop(agent.module_accessor) { - WorkModule::inc_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let max_charge_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")) as f32; + let end_frame = MotionModule::end_frame(fighter.module_accessor); + MotionModule::set_rate(fighter.module_accessor, end_frame/max_charge_frame); + HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let charge = WorkModule::get_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + if !StopModule::is_stop(fighter.module_accessor) { + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); } - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_n_charge_substatus as *const () as _)); + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_n_charge_substatus as *const () as _)); - agent.main_shift(special_n_charge_main_loop) + fighter.main_shift(special_n_charge_main_loop) } -unsafe extern "C" fn special_n_charge_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(agent.module_accessor) { - if StatusModule::is_situation_changed(agent.module_accessor) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - agent.set_situation(SITUATION_KIND_GROUND.into()); - MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new("special_n_hold"), -1.0, 1.0, 0.0, false, false); +unsafe extern "C" fn special_n_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + if StatusModule::is_situation_changed(fighter.module_accessor) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + fighter.set_situation(SITUATION_KIND_GROUND.into()); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_n_hold"), -1.0, 1.0, 0.0, false, false); } else { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - agent.set_situation(SITUATION_KIND_AIR.into()); - MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new("special_air_n_hold"), -1.0, 1.0, 0.0, false, false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_n_hold"), -1.0, 1.0, 0.0, false, false); } } } - let mut min_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("min_weak_size")); - let mut max_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("max_weak_size")); - if agent.kind() == *FIGHTER_KIND_KIRBY { - min_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("min_weak_size_kirby")); - max_weak_size = WorkModule::get_param_float(agent.module_accessor, hash40("param_special_n"), hash40("max_weak_size_kirby")); + let mut min_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("min_weak_size")); + let mut max_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("max_weak_size")); + if fighter.kind() == *FIGHTER_KIND_KIRBY { + min_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("min_weak_size_kirby")); + max_weak_size = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_n"), hash40("max_weak_size_kirby")); } - let end_frame = MotionModule::end_frame(agent.module_accessor); + let end_frame = MotionModule::end_frame(fighter.module_accessor); let size_ratio = (max_weak_size - min_weak_size); - let ratio = MotionModule::frame(agent.module_accessor) / end_frame; + let ratio = MotionModule::frame(fighter.module_accessor) / end_frame; let size = min_weak_size + (size_ratio * ratio); - WorkModule::set_float(agent.module_accessor, size, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_FLOAT_WEAK_SIZE); - ModelModule::set_joint_scale(agent.module_accessor, Hash40::new("virtualweakpoint"), &Vector3f::new(size, size, size)); - if !MotionModule::is_end(agent.module_accessor) { - if ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); + WorkModule::set_float(fighter.module_accessor, size, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_FLOAT_WEAK_SIZE); + ModelModule::set_joint_scale(fighter.module_accessor, Hash40::new("virtualweakpoint"), &Vector3f::new(size, size, size)); + if !MotionModule::is_end(fighter.module_accessor) { + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { + VarModule::on_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); } - else if !ControlModule::check_button_off(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + else if !ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { return 0.into() } } - let max_charge_frame = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")); - let charge_count = WorkModule::get_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); - let max_fire_num = WorkModule::get_param_int(agent.module_accessor, hash40("param_special_n"), hash40("max_fire_num")); + let max_charge_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_charge_frame")); + let charge_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + let max_fire_num = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_n"), hash40("max_fire_num")); let fire_num = ((max_fire_num - 1) * (charge_count / max_charge_frame)) + 1; - WorkModule::set_int(agent.module_accessor, fire_num, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); - agent.change_status(FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); + WorkModule::set_int(fighter.module_accessor, fire_num, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); + fighter.change_status(FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT.into(), false.into()); return 0.into() } -unsafe extern "C" fn special_n_charge_substatus(agent: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { +unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue { if param_1.get_bool() { - WorkModule::inc_int(agent.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT); } return 0.into() } -unsafe extern "C" fn special_n_shoot_main(agent: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { - VarModule::off_flag(agent.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); - WorkModule::set_int64(agent.module_accessor, hash40("special_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - WorkModule::set_int64(agent.module_accessor, hash40("special_air_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_n_explode"), 0.0, 1.0, false, 0.0, false, false); +unsafe extern "C" fn special_n_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { + VarModule::off_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); + WorkModule::set_int64(fighter.module_accessor, hash40("special_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_explode") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_explode"), 0.0, 1.0, false, 0.0, false, false); } else { - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_air_n_explode"), 0.0, 1.0, false, 0.0, false, false); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_explode"), 0.0, 1.0, false, 0.0, false, false); } - HIT_NODE(agent, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); + HIT_NODE(fighter, Hash40::new("virtualweakpoint"), *HIT_STATUS_NORMAL); - agent.sub_shift_status_main(L2CValue::Ptr(special_n_shoot_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_shoot_main_loop as *const () as _)) } else { - smashline::original_status(Main, agent, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT)(agent) + smashline::original_status(Main, fighter, *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT)(fighter) } } -unsafe extern "C" fn special_n_shoot_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(agent.module_accessor) != StatusModule::prev_situation_kind(agent.module_accessor) { - special_n_situation_helper(agent); +unsafe extern "C" fn special_n_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) != StatusModule::prev_situation_kind(fighter.module_accessor) { + special_n_situation_helper(fighter); } - if MotionModule::is_end(agent.module_accessor) { - if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + if MotionModule::is_end(fighter.module_accessor) { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); } else { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); } return true.into() } - else if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_air_check_fall_common().get_bool() - || agent.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_air_check_fall_common().get_bool() + || fighter.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } @@ -127,20 +127,20 @@ unsafe extern "C" fn special_n_shoot_main_loop(agent: &mut L2CFighterCommon) -> false.into() } -unsafe extern "C" fn special_n_situation_helper(agent: &mut L2CFighterCommon) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - agent.set_situation(SITUATION_KIND_GROUND.into()); - let motion = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); - MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); +unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + fighter.set_situation(SITUATION_KIND_GROUND.into()); + let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } else { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - agent.set_situation(SITUATION_KIND_AIR.into()); - let motion = WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); - MotionModule::change_motion_inherit_frame(agent.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_AIR_KIND); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } } diff --git a/fighters/ridley/src/status/special_s.rs b/fighters/ridley/src/status/special_s.rs index 223be1739f..78b1ac24fb 100644 --- a/fighters/ridley/src/status/special_s.rs +++ b/fighters/ridley/src/status/special_s.rs @@ -1,44 +1,44 @@ use super::*; use globals::*; -unsafe extern "C" fn special_s_failure_main(agent: &mut L2CFighterCommon) -> L2CValue { - let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(agent.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(agent.module_accessor)) + WorkModule::get_param_int(agent.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; +unsafe extern "C" fn special_s_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(fighter.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(fighter.module_accessor)) + WorkModule::get_param_int(fighter.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; if cancel_frame < 1.0 { - VarModule::set_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, 1.0); + VarModule::set_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, 1.0); } else { - VarModule::set_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, cancel_frame); + VarModule::set_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME, cancel_frame); } - MotionModule::change_motion(agent.module_accessor, Hash40::new("special_s_failure"), 0.0, 1.0, false, 0.0, false, false); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP); - let speed_x = sv_kinetic_energy::get_speed_x(agent.lua_state_agent)*WorkModule::get_param_float(agent.module_accessor, hash40("param_special_s"), hash40("failure_speed_x_mul")); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_GROUND, 0.0, 0.0, 0.0, 0.0, 0.0); - sv_kinetic_energy::reset_energy(agent.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); - sv_kinetic_energy::set_speed(agent.lua_state_agent); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_failure"), 0.0, 1.0, false, 0.0, false, false); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); + let speed_x = sv_kinetic_energy::get_speed_x(fighter.lua_state_agent)*WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("failure_speed_x_mul")); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_GROUND, 0.0, 0.0, 0.0, 0.0, 0.0); + sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x, 0.0); + sv_kinetic_energy::set_speed(fighter.lua_state_agent); - agent.sub_shift_status_main(L2CValue::Ptr(side_special_failure_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(side_special_failure_main_loop as *const () as _)) } -pub unsafe fn side_special_failure_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(agent.module_accessor) != *SITUATION_KIND_GROUND { - agent.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); +pub unsafe fn side_special_failure_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() } - else if MotionModule::is_end(agent.module_accessor) { - agent.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + else if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); return true.into() } - else if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() { + else if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return true.into() } } - else if VarModule::get_float(agent.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME) <= MotionModule::frame(agent.module_accessor) { - CancelModule::enable_cancel(agent.module_accessor); + else if VarModule::get_float(fighter.battle_object, vars::ridley::instance::SPECIAL_S_FAILURE_CANCEL_FRAME) <= MotionModule::frame(fighter.module_accessor) { + CancelModule::enable_cancel(fighter.module_accessor); } false.into() diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index f253b4bc9a..f97b438593 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -325,7 +325,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialhi", game_specialhi); - agent .acmd("game_speciallwhold", game_speciallwhold) + agent .acmd("game_speciallwhold", game_speciallwhold); agent.acmd("game_specialairlwhold", game_speciallwhold); agent.acmd("game_speciallwholdchargehi", game_speciallwhold); agent.acmd("game_speciallwholdchargelw", game_speciallwhold); From b415a2ce707d3dacf16dc1f0295c5827673ccca1 Mon Sep 17 00:00:00 2001 From: Askew Date: Fri, 22 Mar 2024 16:13:03 -0400 Subject: [PATCH 065/172] Little Mac --- fighters/littlemac/src/acmd/aerials.rs | 250 ++++++----- fighters/littlemac/src/acmd/ground.rs | 218 +++++----- fighters/littlemac/src/acmd/mod.rs | 16 +- fighters/littlemac/src/acmd/other.rs | 177 +++----- fighters/littlemac/src/acmd/smashes.rs | 276 ++++++------ fighters/littlemac/src/acmd/specials.rs | 406 +++++++++--------- fighters/littlemac/src/acmd/throws.rs | 172 ++++---- fighters/littlemac/src/acmd/tilts.rs | 116 +++-- fighters/littlemac/src/lib.rs | 8 +- fighters/littlemac/src/opff.rs | 6 +- fighters/littlemac/src/status.rs | 16 +- fighters/littlemac/src/status/special_hi.rs | 6 +- fighters/littlemac/src/status/special_lw.rs | 12 +- .../littlemac/src/status/special_lw_cancel.rs | 19 +- fighters/littlemac/src/status/special_n.rs | 12 +- fighters/littlemac/src/status/special_s.rs | 12 +- 16 files changed, 809 insertions(+), 913 deletions(-) diff --git a/fighters/littlemac/src/acmd/aerials.rs b/fighters/littlemac/src/acmd/aerials.rs index e374a0ae0b..4db8b384f3 100644 --- a/fighters/littlemac/src/acmd/aerials.rs +++ b/fighters/littlemac/src/acmd/aerials.rs @@ -1,46 +1,44 @@ use super::*; -unsafe extern "C" fn littlemac_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 361, 140, 0, 18, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 361, 140, 0, 18, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 361, 140, 0, 18, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.0, 30, 128, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 30, 128, 0, 5, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.0, 30, 128, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn littlemac_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("littlemac_attack_line_glove"), Hash40::new("top"), 0, 13, -1, 55, 0, 0, 0.8, true, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("littlemac_attack_line_glove"), Hash40::new("top"), 0, 13, -1, 55, 0, 0, 0.8, true, 1); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -52,126 +50,126 @@ unsafe extern "C" fn littlemac_attack_air_n_effect(fighter: &mut L2CAgentBase) { 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 6.5, 3, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 6.5, 3, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn littlemac_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.476); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.476); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 5.0, 50, 110, 0, 60, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 50, 110, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 5.0, 50, 110, 0, 60, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn littlemac_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn littlemac_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 354, 75, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 354, 75, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 354, 75, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn littlemac_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 4.25, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 4.25, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.25); - FT_MOTION_RATE_RANGE(fighter, 4.25, 4.75, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 4.25, 4.75, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 78, 114, 0, 64, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.75); - FT_MOTION_RATE_RANGE(fighter, 4.75, 6.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 4.75, 6.0, 1.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn littlemac_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.25); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("littlemac_attack_arc_weak"), Hash40::new("top"), -3, 9.5, 2, -10, -80, -100, 0.8, true, 1); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("littlemac_attack_arc_weak"), Hash40::new("top"), -3, 9.5, 2, -10, -80, -100, 0.8, true, 1); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -183,72 +181,72 @@ unsafe extern "C" fn littlemac_attack_air_hi_effect(fighter: &mut L2CAgentBase) 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_RATE(fighter, 0.9); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn littlemac_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.25); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn littlemac_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 270, 80, 0, 15, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 270, 80, 0, 15, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 270, 80, 0, 15, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 9.0, 270, 65, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 9.0, 270, 65, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 9.0, 270, 65, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 90, 0, 10, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 10, 3.75, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn littlemac_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 12, 0, 90, 0, -4, 0.85, true, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 12, 0, 90, 0, -4, 0.85, true, 0.2); let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { 0 => Vector3f::new(0.43, 1.0, 0.3), 1 => Vector3f::new(1.0, 0.6, 0.3), @@ -260,25 +258,23 @@ unsafe extern "C" fn littlemac_attack_air_lw_effect(fighter: &mut L2CAgentBase) 7 => Vector3f::new(1.0, 0.4, 0.5), _ => Vector3f::new(0.43, 1.0, 0.3) }; - LAST_PARTICLE_SET_COLOR(fighter, color_vec.x, color_vec.y, color_vec.z); + LAST_PARTICLE_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -4, -2, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -4, -2, 0, 0, 0, 0, 0.9, true); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attackairn", littlemac_attack_air_n_game) - .acmd("effect_attackairn", littlemac_attack_air_n_effect) - .acmd("game_attackairf", littlemac_attack_air_f_game) - .acmd("expression_attackairf", littlemac_attack_air_f_expression) - .acmd("game_attackairb", littlemac_attack_air_b_game) - .acmd("game_attackairhi", littlemac_attack_air_hi_game) - .acmd("effect_attackairhi", littlemac_attack_air_hi_effect) - .acmd("expression_attackairhi", littlemac_attack_air_hi_expression) - .acmd("game_attackairlw", littlemac_attack_air_lw_game) - .acmd("effect_attackairlw", littlemac_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/littlemac/src/acmd/ground.rs b/fighters/littlemac/src/acmd/ground.rs index 5191099e9d..8e7fade53b 100644 --- a/fighters/littlemac/src/acmd/ground.rs +++ b/fighters/littlemac/src/acmd/ground.rs @@ -1,222 +1,220 @@ use super::*; -unsafe extern "C" fn littlemac_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.5, 88, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 83, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.5, 78, 25, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 10, 0, 27, 2.5, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.5, 88, 25, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 83, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.5, 78, 25, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 10, 0, 27, 2.5, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_MIDDLE), false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn littlemac_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); - VarModule::off_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); + VarModule::off_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 3.0, 88, 55, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 83, 55, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 3.0, 78, 55, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 2.5, 0.0, 4.5, 5.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 3.0, 88, 55, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 83, 55, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 3.0, 78, 55, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 2.5, 0.0, 4.5, 5.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 21.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); } } -unsafe extern "C" fn littlemac_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 1.0); } frame(lua_state, 4.0); - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - let is_dle = VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); + if is_excute(agent) { + let is_dle = VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS); let angle = if is_dle { 70 } else { 62 }; let bkb = if is_dle { 62 } else { 70 }; let kbg = if is_dle { 40 } else { 88 }; let hitlag = if is_dle { 1.5 } else { 1.0 }; let sdi = if is_dle { 0.6 } else { 1.0 }; let collision_attr = if is_dle { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, angle, kbg, 0, bkb, 3.2, 2.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, angle, kbg, 0, bkb, 3.5, 0.0, 8.0, 6.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, angle, kbg, 0, bkb, 3.2, 2.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 7.0, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle, kbg, 0, bkb, 3.5, 0.0, 8.0, 6.0, None, None, None, hitlag, sdi, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, collision_attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); if is_dle { - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 2.5); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 2.5); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { if is_training_mode() { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT) { + FLASH(agent, 1, 0, 0.05, 0.7); } else { - FLASH(fighter, 0, 0.24, 0.8, 0.7); + FLASH(agent, 0, 0.24, 0.8, 0.7); } } } else { - EFFECT(fighter, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 5, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.43, 1, 0.3); + EFFECT(agent, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 5, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.43, 1, 0.3); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - EFFECT(fighter, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 1, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.43, 1, 0.3); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + EFFECT(agent, Hash40::new("littlemac_attack_arc_glove_b"), Hash40::new("top"), -1, 11, 1, -10, -45, 120, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.43, 1, 0.3); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 10, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.7); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 10, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_level_up"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_level_up"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 0.1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - if is_training_mode() && !VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { - COL_NORMAL(fighter); + if is_excute(agent) { + if is_training_mode() && !VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) { + COL_NORMAL(agent); } - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc_glove_b"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc_glove_b"), true, true); } } -unsafe extern "C" fn littlemac_attack_13_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::littlemac::instance::IS_DREAMLAND_EXPRESS) && (AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) || is_training_mode()) { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n02")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n03")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n02")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n03")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")) }; } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_littlemac_rnd_combo03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_littlemac_rnd_combo03")); } - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_m")); + PLAY_SE(agent, Hash40::new("se_littlemac_swing_m")); } } -unsafe extern "C" fn littlemac_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 10.0, 55, 70, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 55, 70, 0, 80, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 10.0, 55, 70, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 88, 50, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 88, 50, 0, 75, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 88, 50, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); if !WorkModule::is_flag(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLAG_ATTACK_HIT) { - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attack11", littlemac_attack_11_game) - .acmd("game_attack12", littlemac_attack_12_game) - .acmd("game_attack13", littlemac_attack_13_game) - .acmd("effect_attack13", littlemac_attack_13_effect) - .acmd("sound_attack13", littlemac_attack_13_sound) - .acmd("game_attackdash", littlemac_attack_dash_game) - .acmd("expression_attackdash", littlemac_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/littlemac/src/acmd/mod.rs b/fighters/littlemac/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/littlemac/src/acmd/mod.rs +++ b/fighters/littlemac/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/other.rs b/fighters/littlemac/src/acmd/other.rs index db62ee19dd..d07e0220a1 100644 --- a/fighters/littlemac/src/acmd/other.rs +++ b/fighters/littlemac/src/acmd/other.rs @@ -1,188 +1,111 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_littlemac_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_littlemac_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_littlemac_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_littlemac_step_left_m")); } } -unsafe extern "C" fn littlemac_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", littlemac_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/littlemac/src/acmd/smashes.rs b/fighters/littlemac/src/acmd/smashes.rs index 7b463a02eb..4956ae5954 100644 --- a/fighters/littlemac/src/acmd/smashes.rs +++ b/fighters/littlemac/src/acmd/smashes.rs @@ -1,268 +1,266 @@ use smash::app::sv_animcmd::get_value_float; use super::*; -unsafe extern "C" fn littlemac_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 16.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 14.0, 16.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); + LAST_EFFECT_SET_RATE(agent, 1.5); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); } } -unsafe extern "C" fn littlemac_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 15.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 14.0, 15.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn littlemac_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 18.0, 5, 21, 0, 72, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 7.5, 3.0, Some(0.0), Some(8.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 18.0, 5, 21, 0, 72, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 7.5, 3.0, Some(0.0), Some(8.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 18.0, 5, 21, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 21.0, 86, 76, 0, 40, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 85, 76, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 21.0, 86, 76, 0, 40, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 85, 76, 0, 40, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 18.0, 85, 76, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 85, 98, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 16.0, 85, 98, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_spark"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_attack_spark2"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_spark"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_attack_spark2"), Hash40::new("top"), -2, 1, 4, 0, 180, 0, 1, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_attack_arc"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 13.5, -4.0, 4, 60, 110, 0.8, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 0.8, 0.7); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 13.5, -4.0, 4, 60, 110, 0.8, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 0.8, 0.7); } } -unsafe extern "C" fn littlemac_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 5.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 30, 94, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 30, 94, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn littlemac_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 4.5, 4, 20, -50, -30, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 4.5, 4, 20, -50, -30, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -4, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 2, 6, -2, 30, 130, 10, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 2, 6, -2, 30, 130, 10, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } else { frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 5, 4, 20, -40, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), 1, 5, 4, 20, -40, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 6, -2, 30, 130, 10, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 6, -2, 30, 130, 10, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 4, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attacks4hi", littlemac_attack_s4_hi_game) - .acmd("effect_attacks4hi", littlemac_attack_s4_hi_effect) - .acmd("game_attacks4", littlemac_attack_s4_s_game) - .acmd("effect_attacks4", littlemac_attack_s4_s_effect) - .acmd("game_attacks4lw", littlemac_attack_s4_lw_game) - .acmd("game_attackhi4", littlemac_attack_hi4_game) - .acmd("effect_attackhi4", littlemac_attack_hi4_effect) - .acmd("game_attacklw4", littlemac_attack_lw4_game) - .acmd("effect_attacklw4", littlemac_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("effect_attacks4", effect_attacks4s); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/littlemac/src/acmd/specials.rs b/fighters/littlemac/src/acmd/specials.rs index 3d983a1f51..441411c01f 100644 --- a/fighters/littlemac/src/acmd/specials.rs +++ b/fighters/littlemac/src/acmd/specials.rs @@ -1,364 +1,364 @@ use super::*; -unsafe extern "C" fn littlemac_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_CHECK_DASH); } } -unsafe extern "C" fn littlemac_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(39.0 - 1.0)); + FT_MOTION_RATE_RANGE(agent, 1.0, 39.0, 8.0); frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn littlemac_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn littlemac_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) && (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) && (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let mut meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); let meter_lvl = if meter < 40.0 { 0 } else if meter >= 40.0 && meter < 100.0 { 1 } else { 2 }; - let damage = (if meter_lvl == 2 { 25.0 } else { 10.0 + meter / 8.0 }) * if fighter.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; - let angle = if fighter.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; - let bkb = if fighter.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; + let damage = (if meter_lvl == 2 { 25.0 } else { 10.0 + meter / 8.0 }) * if agent.is_situation(*SITUATION_KIND_GROUND) { 1.0 } else { 0.8 }; + let angle = if agent.is_situation(*SITUATION_KIND_GROUND) { 80 } else { 75 }; + let bkb = if agent.is_situation(*SITUATION_KIND_GROUND) { 40 } else { 30 }; + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 104 } else { 124 }; let hitlag = if meter_lvl == 0 { 1.0 } else if meter_lvl == 1 { 1.2 } else { 1.5 }; - let shield_damage = if fighter.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; + let shield_damage = if agent.is_situation(*SITUATION_KIND_GROUND) { 2 } else { 0 }; let sfx_lvl = if meter_lvl == 0 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_L }; let sound_attr = if meter_lvl == 0 { *COLLISION_SOUND_ATTR_PUNCH } else if meter_lvl == 1 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_KICK }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 5.0, 3.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), damage, angle, kbg, 0, bkb, 3.0, -1.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), damage, angle, kbg, 0, bkb, 3.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, sound_attr, *ATTACK_REGION_PUNCH); if meter_lvl == 2 { AttackModule::set_damage_shake_scale(boma, 0.67); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_RESET_KO_GAUGE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_KO_GRAVITY); } } -unsafe extern "C" fn littlemac_special_n2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); - if is_excute(fighter) { + if is_excute(agent) { let size = if meter < 40.0 { 0.5 } else if meter >= 40.0 && meter < 100.0 { 0.7 } else { 1.0 }; - EFFECT_FLW_POS(fighter, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); + EFFECT_FLW_POS(agent, Hash40::new("littlemac_ko_uppercut_start"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, size, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("littlemac_ko_uppercut_start"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("littlemac_ko_uppercut_start"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if meter >= 40.0 { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), 0.5, 1, -3, 0, -60, 70, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_ko_uppercut_arc"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_ko_uppercut_arc_splash"), Hash40::new("rot"), -4, 1, -3, -15, -60, 90, 1, false); } } } frame(lua_state, 8.0); let mut handle = EffectModule::req_follow(boma, Hash40::new("sys_starrod_bullet"), Hash40::new("handr"), &Vector3f::new(3.0, 0.0, 0.0), &Vector3f::new(0.0, 90.0, 0.0), if meter == 100.0 { 0.3 } else { 0.0 }, false, 0, 0, 0, 0, 0, false, false); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, handle as u32, 1.5); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if meter == 100.0 { EffectModule::set_scale(boma, handle as u32, &Vector3f::new(0.8, 0.8, 0.8)); } if meter < 40.0 { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 10.5, 1.0, 4, 30, 110, 0.8, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.7, 0.7, 0.9); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -1, 10.5, 1.0, 4, 30, 110, 0.8, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.7, 0.7, 0.9); + LAST_EFFECT_SET_RATE(agent, 1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_ko_uppercut"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_ko_uppercut"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); } } -unsafe extern "C" fn littlemac_special_n2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) == 100.0) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_littlemac_rnd_special_n2")); - PLAY_SE(fighter, Hash40::new("se_littlemac_special_n03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_littlemac_rnd_special_n2")); + PLAY_SE(agent, Hash40::new("se_littlemac_special_n03")); } else { if (WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE) < 40.0) { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_attack06")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_attack07")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l01")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l01")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_attack06")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_attack07")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l01")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l01")) }; } else { match smash::app::sv_math::rand(smash::hash40("fighter"), 3) { - 0 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")), - 1 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n02")), - 2 => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_n03")), - _ => PLAY_SE(fighter, Hash40::new("vc_littlemac_special_l02")) + 0 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")), + 1 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n02")), + 2 => PLAY_SE(agent, Hash40::new("vc_littlemac_special_n03")), + _ => PLAY_SE(agent, Hash40::new("vc_littlemac_special_l02")) }; } } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal04")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal04")); } else if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R)) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal05")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal05")); } else if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) { - PLAY_SE(fighter, Hash40::new("vc_littlemac_appeal06")); + PLAY_SE(agent, Hash40::new("vc_littlemac_appeal06")); } } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_littlemac_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); } } -unsafe extern "C" fn littlemac_special_n2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let meter = WorkModule::get_float(boma, *FIGHTER_LITTLEMAC_INSTANCE_WORK_ID_FLOAT_KO_GAGE); - QUAKE(fighter, if meter < 40.0 {*CAMERA_QUAKE_KIND_M} else { *CAMERA_QUAKE_KIND_L }); + QUAKE(agent, if meter < 40.0 {*CAMERA_QUAKE_KIND_M} else { *CAMERA_QUAKE_KIND_L }); let rumble = if meter < 100.0 { Hash40::new("rbkind_nohitl") } else { Hash40::new("rbkind_nohitll") }; ControlModule::set_rumble(boma, rumble, 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_elecattack"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_elecattack"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 4, 45, 200, 1, 17, 15, 38, 30, 50); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn littlemac_special_s_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.1, 0.0, 7.4, 3.0, 0.0, 7.4, 3.2, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.1, 0.0, 7.4, 3.0, 0.0, 7.4, 3.2, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 23, 0, 3.0, 0.0, 0.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 23, 0, 3.0, 0.0, 0.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 5.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.2, 0.0, 8.6, -3.0, 0.0, 9.0, 3.4, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 5.2, 0.0, 8.6, -3.0, 0.0, 9.0, 3.4, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } wait(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_air_s_blow_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsblow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 68, 0, 75, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 68, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 68, 0, 75, 3.5, 0.0, 4.5, 5.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 68, 0, 75, 5.0, 0.0, 18.0, 5.0, Some(0.0), Some(10.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 68, 0, 75, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 14.0, 361, 68, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 68, 0, 75, 3.5, 0.0, 4.5, 5.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 68, 0, 75, 5.0, 0.0, 18.0, 5.0, Some(0.0), Some(10.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn littlemac_special_air_s_blow_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc2_aura"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("littlemac_attack_arc2"), Hash40::new("top"), 1, 8.5, -1.5, 0, -20, -110, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("littlemac_attack_arc2_splash"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); +unsafe extern "C" fn effect_specialairsblow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc2_aura"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc2"), Hash40::new("top"), 1, 8.5, -1.5, 0, -20, -110, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("littlemac_attack_arc2_splash"), Hash40::new("top"), 1, 10, -1.5, 0, -20, -110, 1, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("littlemac_joltblow"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_joltblow"), false, false); EffectModule::enable_sync_init_pos_last(boma); } } -unsafe extern "C" fn littlemac_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 103, 100, 185, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 95, 100, 180, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 103, 100, 185, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 95, 100, 180, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 103, 100, 155, 0, 2.0, 0.0, 6.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 95, 100, 160, 0, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(12.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 50, 0, 40, 6.5, 0.0, 26.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 0, 180, 0, 3.0, 0.0, 18.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 50, 0, 40, 6.5, 0.0, 26.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 0, 180, 0, 3.0, 0.0, 18.0, 0.0, None, None, None, 0.7, 0.9, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 23.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 23.0, 3.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 197, 0, 45, 6.5, 0.0, 26.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 197, 0, 45, 6.5, 0.0, 26.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -367,7 +367,7 @@ unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -375,31 +375,29 @@ unsafe extern "C" fn littlemac_special_hi_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_specialnstart", littlemac_special_n_start_game) - .acmd("game_specialairnstart", littlemac_special_n_start_game) - .acmd("game_specialncancel", littlemac_special_n_cancel_game) - .acmd("game_specialairncancel", littlemac_special_n_cancel_game) - .acmd("effect_specialncancel", littlemac_special_n_cancel_effect) - .acmd("effect_specialairncancel", littlemac_special_n_cancel_effect) - .acmd("sound_specialncancel", littlemac_special_n_cancel_sound) - .acmd("sound_specialairncancel", littlemac_special_n_cancel_sound) - .acmd("expression_specialncancel", littlemac_special_n_cancel_expression) - .acmd("expression_specialairncancel", littlemac_special_n_cancel_expression) - .acmd("game_specialn2", littlemac_special_n2_game) - .acmd("game_specialairn2", littlemac_special_n2_game) - .acmd("effect_specialn2", littlemac_special_n2_effect) - .acmd("effect_specialairn2", littlemac_special_n2_effect) - .acmd("sound_specialn2", littlemac_special_n2_sound) - .acmd("sound_specialairn2", littlemac_special_n2_sound) - .acmd("expression_specialn2", littlemac_special_n2_expression) - .acmd("expression_specialairn2", littlemac_special_n2_expression) - .acmd("game_specialsjump", littlemac_special_s_jump_game) - .acmd("game_specialairsblow", littlemac_special_air_s_blow_game) - .acmd("effect_specialairsblow", littlemac_special_air_s_blow_effect) - .acmd("game_specialhistart", littlemac_special_hi_start_game) - .acmd("game_specialairhistart", littlemac_special_air_hi_start_game) - .acmd("game_specialhi", littlemac_special_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialncancel", game_specialncancel); + agent.acmd("game_specialairncancel", game_specialncancel); + agent.acmd("effect_specialncancel", effect_specialncancel); + agent.acmd("effect_specialairncancel", effect_specialncancel); + agent.acmd("sound_specialncancel", sound_specialncancel); + agent.acmd("sound_specialairncancel", sound_specialncancel); + agent.acmd("expression_specialncancel", expression_specialncancel); + agent.acmd("expression_specialairncancel", expression_specialncancel); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + agent.acmd("game_specialsjump", game_specialsjump); + agent.acmd("game_specialairsblow", game_specialairsblow); + agent.acmd("effect_specialairsblow", effect_specialairsblow); + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialhi", game_specialhi); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/throws.rs b/fighters/littlemac/src/acmd/throws.rs index 1f953359fd..cce945a937 100644 --- a/fighters/littlemac/src/acmd/throws.rs +++ b/fighters/littlemac/src/acmd/throws.rs @@ -1,176 +1,174 @@ use super::*; -unsafe extern "C" fn littlemac_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn littlemac_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn littlemac_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.7, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.7, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn littlemac_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 10.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 10.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 18, 3); + CHECK_FINISH_CAMERA(agent, 18, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 10.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 10.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 0, 60, 4.0, 0.0, 10.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 0, 60, 4.0, 0.0, 10.0, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 11, 8); + CHECK_FINISH_CAMERA(agent, 11, 8); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn littlemac_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 90, 35, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 90, 35, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 14.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 0, 60, 4.0, 0.0, 14.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 11); + CHECK_FINISH_CAMERA(agent, 13, 11); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 85, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 85, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 100, 0, 60, 4.0, 0.0, 7.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 0, 60, 4.0, 0.0, 7.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 10, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_catch", littlemac_catch_game) - .acmd("game_catchdash", littlemac_catch_dash_game) - .acmd("game_catchturn", littlemac_catch_turn_game) - .acmd("game_throwf", littlemac_throw_f_game) - .acmd("game_throwb", littlemac_throw_b_game) - .acmd("game_throwhi", littlemac_throw_hi_game) - .acmd("game_throwlw", littlemac_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/littlemac/src/acmd/tilts.rs b/fighters/littlemac/src/acmd/tilts.rs index b281ebd735..d3873359ff 100644 --- a/fighters/littlemac/src/acmd/tilts.rs +++ b/fighters/littlemac/src/acmd/tilts.rs @@ -1,107 +1,105 @@ use super::*; -unsafe extern "C" fn littlemac_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 367, 100, 40, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 30, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 30, 100, 30, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 30, 100, 40, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("arml"), 4.0, 359, 100, 40, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 4.0, 20, 100, 45, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 367, 100, 40, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 30, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 30, 100, 30, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 30, 100, 40, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("arml"), 4.0, 359, 100, 20, 0, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("arml"), 4.0, 359, 100, 40, 0, 3.0, -5.8, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("hip"), 4.0, 20, 100, 45, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 4.0, 3.7, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 40, 130, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 4.0, 3.7, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 40, 130, 0, 40, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 8.0, 40, 130, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 7.0, 100, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 7.0, 100, 80, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 100, 80, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 7.0, 100, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 7.0, 100, 80, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn littlemac_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 45, 0, 75, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 72, 4.0, 4.4, 0.2, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 7.0, 70, 45, 0, 75, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 45, 0, 75, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 80, 46, 0, 72, 4.0, 4.4, 0.2, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 7.0, 70, 45, 0, 75, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 1.7); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 1.7); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn littlemac_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7.5, -5.5, 25, 0, 0, 0.9, false); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, -7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7.5, -5.5, 25, 0, 0, 0.9, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, -7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2, 10.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 2, 10.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); } } -pub fn install() { - smashline::Agent::new("littlemac") - .acmd("game_attacks3", littlemac_attack_s3_game) - .acmd("game_attackhi3", littlemac_attack_hi3_game) - .acmd("game_attacklw3", littlemac_attack_lw3_game) - .acmd("effect_attacklw3", littlemac_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/littlemac/src/lib.rs b/fighters/littlemac/src/lib.rs index a08c069cc9..9e93ab7e48 100644 --- a/fighters/littlemac/src/lib.rs +++ b/fighters/littlemac/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("littlemac"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/littlemac/src/opff.rs b/fighters/littlemac/src/opff.rs index 5aa9a9934b..3adad78944 100644 --- a/fighters/littlemac/src/opff.rs +++ b/fighters/littlemac/src/opff.rs @@ -146,8 +146,6 @@ pub unsafe fn littlemac_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("littlemac") - .on_line(Main, littlemac_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, littlemac_frame_wrapper); } diff --git a/fighters/littlemac/src/status.rs b/fighters/littlemac/src/status.rs index cbee494e62..1d452fde49 100644 --- a/fighters/littlemac/src/status.rs +++ b/fighters/littlemac/src/status.rs @@ -23,13 +23,11 @@ unsafe extern "C" fn littlemac_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - special_n::install(); - special_s::install(); - special_hi::install(); - special_lw::install(); - special_lw_cancel::install(); - smashline::Agent::new("littlemac") - .on_start(littlemac_init) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_lw_cancel::install(agent); + agent.on_start(littlemac_init); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_hi.rs b/fighters/littlemac/src/status/special_hi.rs index 87ad6554ae..5d084f859a 100644 --- a/fighters/littlemac/src/status/special_hi.rs +++ b/fighters/littlemac/src/status/special_hi.rs @@ -8,8 +8,6 @@ unsafe extern "C" fn special_hi_jump_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_super_jump_punch_main as *const () as _)) } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_lw.rs b/fighters/littlemac/src/status/special_lw.rs index c2728fb61b..a111adf3ad 100644 --- a/fighters/littlemac/src/status/special_lw.rs +++ b/fighters/littlemac/src/status/special_lw.rs @@ -201,11 +201,9 @@ unsafe extern "C" fn special_lw_substatus(fighter: &mut L2CFighterCommon, param_ return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_old_pre) - .status(Init, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_LW_HIT, special_lw_hit_init) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_old_pre); + agent.status(Init, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_LW_HIT, special_lw_hit_init); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START, special_lw_main); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_lw_cancel.rs b/fighters/littlemac/src/status/special_lw_cancel.rs index 28a9f57d29..41c9db13f2 100644 --- a/fighters/littlemac/src/status/special_lw_cancel.rs +++ b/fighters/littlemac/src/status/special_lw_cancel.rs @@ -163,15 +163,12 @@ unsafe extern "C" fn special_lw_jump_cancel_end(fighter: &mut L2CFighterCommon) return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_pre) - .status(Main, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_main) - .status(End, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_end) - .install(); - smashline::Agent::new("littlemac") - .status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_pre) - .status(Main, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_main) - .status(End, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_pre); + agent.status(Main, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_main); + agent.status(End, statuses::littlemac::SPECIAL_LW_CANCEL, special_lw_cancel_end); + + agent.status(Pre, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_pre); + agent.status(Main, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_main); + agent.status(End, statuses::littlemac::SPECIAL_LW_CANCEL_JUMP, special_lw_jump_cancel_end); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_n.rs b/fighters/littlemac/src/status/special_n.rs index f21086406e..31b8e5ed50 100644 --- a/fighters/littlemac/src/status/special_n.rs +++ b/fighters/littlemac/src/status/special_n.rs @@ -166,11 +166,9 @@ unsafe extern "C" fn special_n2_end(fighter: &mut L2CFighterCommon) -> L2CValue return 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_main) - .status(End, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_main); + agent.status(End, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N2, special_n2_end); } \ No newline at end of file diff --git a/fighters/littlemac/src/status/special_s.rs b/fighters/littlemac/src/status/special_s.rs index 3ed456ce1d..0ae3ba0a88 100644 --- a/fighters/littlemac/src/status/special_s.rs +++ b/fighters/littlemac/src/status/special_s.rs @@ -160,11 +160,9 @@ unsafe extern "C" fn special_s_blow_end_main_loop(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("littlemac") - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_main) - .status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_pre) - .status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_main); + agent.status(Pre, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_pre); + agent.status(Main, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_BLOW_END, special_s_blow_end_main); } \ No newline at end of file From 6ca8575a4747e544003f94cd53fa65a8c6b025db Mon Sep 17 00:00:00 2001 From: Askew Date: Fri, 22 Mar 2024 16:59:50 -0400 Subject: [PATCH 066/172] Mario/Doc --- fighters/mario/src/acmd/aerials.rs | 239 +++--- fighters/mario/src/acmd/ground.rs | 182 +++-- fighters/mario/src/acmd/mod.rs | 16 +- fighters/mario/src/acmd/other.rs | 340 ++------ fighters/mario/src/acmd/smashes.rs | 138 ++-- fighters/mario/src/acmd/specials.rs | 753 +++++++++--------- fighters/mario/src/acmd/throws.rs | 148 ++-- fighters/mario/src/acmd/tilts.rs | 150 ++-- fighters/mario/src/fireball/acmd/mod.rs | 7 + fighters/mario/src/fireball/acmd/specials.rs | 22 + fighters/mario/src/fireball/mod.rs | 9 + fighters/mario/src/lib.rs | 17 +- fighters/mario/src/opff.rs | 6 +- fighters/mario/src/pump/acmd/mod.rs | 7 + fighters/mario/src/pump/acmd/specials.rs | 9 + fighters/mario/src/pump/mod.rs | 9 + fighters/mario/src/pumpwater/acmd/mod.rs | 7 + fighters/mario/src/pumpwater/acmd/specials.rs | 29 + fighters/mario/src/pumpwater/mod.rs | 9 + fighters/mario/src/status.rs | 14 +- fighters/mario/src/status/special_n.rs | 6 +- fighters/mariod/src/acmd/aerials.rs | 306 ++++--- fighters/mariod/src/acmd/ground.rs | 182 +++-- fighters/mariod/src/acmd/mod.rs | 16 +- fighters/mariod/src/acmd/other.rs | 355 +++------ fighters/mariod/src/acmd/smashes.rs | 348 ++++---- fighters/mariod/src/acmd/specials.rs | 676 ++++++++-------- fighters/mariod/src/acmd/throws.rs | 164 ++-- fighters/mariod/src/acmd/tilts.rs | 168 ++-- fighters/mariod/src/drcapsule/acmd/mod.rs | 7 + .../mariod/src/drcapsule/acmd/specials.rs | 18 + fighters/mariod/src/drcapsule/mod.rs | 9 + fighters/mariod/src/lib.rs | 12 +- fighters/mariod/src/opff.rs | 6 +- fighters/mariod/src/status.rs | 10 +- fighters/mariod/src/status/special_n.rs | 6 +- 36 files changed, 2115 insertions(+), 2285 deletions(-) create mode 100644 fighters/mario/src/fireball/acmd/mod.rs create mode 100644 fighters/mario/src/fireball/acmd/specials.rs create mode 100644 fighters/mario/src/fireball/mod.rs create mode 100644 fighters/mario/src/pump/acmd/mod.rs create mode 100644 fighters/mario/src/pump/acmd/specials.rs create mode 100644 fighters/mario/src/pump/mod.rs create mode 100644 fighters/mario/src/pumpwater/acmd/mod.rs create mode 100644 fighters/mario/src/pumpwater/acmd/specials.rs create mode 100644 fighters/mario/src/pumpwater/mod.rs create mode 100644 fighters/mariod/src/drcapsule/acmd/mod.rs create mode 100644 fighters/mariod/src/drcapsule/acmd/specials.rs create mode 100644 fighters/mariod/src/drcapsule/mod.rs diff --git a/fighters/mario/src/acmd/aerials.rs b/fighters/mario/src/acmd/aerials.rs index 7c780c1c99..fcefa4245d 100644 --- a/fighters/mario/src/acmd/aerials.rs +++ b/fighters/mario/src/acmd/aerials.rs @@ -1,201 +1,199 @@ use super::*; -unsafe extern "C" fn mario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 15, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 15, 3.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 100, 0, 15, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 100, 0, 15, 3.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 280, 75, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 280, 75, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 280, 35, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 15.0, 280, 35, 0, 30, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mario_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("mario_fb_shoot"), Hash40::new("handl"), 0.75, -1, 0, 0, -45, 0, 0.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_fb_shoot"), Hash40::new("mario_fb_shoot"), Hash40::new("handl"), 0.75, -1, 0, 0, -45, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_fb_bullet_r"), Hash40::new("mario_fb_bullet_l"), Hash40::new("handl"), 0.75, -1, 0, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_fb_bullet_r"), Hash40::new("mario_fb_bullet_l"), Hash40::new("handl"), 0.75, -1, 0, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -11, -113, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent){ + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -11, -113, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, 20.0); - if is_excute(fighter){ - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent){ + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_bullet_r"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_bullet_l"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_bullet_r"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_bullet_l"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-6.0)); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 38, 112, 0, 25, 3.5, 5.1, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 38, 112, 0, 25, 3.5, 5.1, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(13.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mario_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn mario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(4.5-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 4.5, 3.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(10.0-4.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 68, 84, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 68, 84, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 4.5, 10.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 68, 84, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 68, 84, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 60, 82, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 60, 82, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 60, 82, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 60, 82, 0, 30, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.2); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 3.5, 0.0, -0.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 4.8, 0.0, 6.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 3.5, 0.0, -0.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 365, 25, 0, 33, 4.8, 0.0, 6.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -244,33 +242,22 @@ unsafe extern "C" fn expression_attackairlw(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn mario_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 70, 90, 0, 40, 4.3, 0.0, 3.2, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 70, 90, 0, 40, 4.3, 0.0, 3.2, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - */ +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attackairn", mario_attack_air_n_game) - .game_acmd("game_attackairf", mario_attack_air_f_game) - .effect_acmd("effect_attackairf", mario_attack_air_f_effect) - .game_acmd("game_attackairb", mario_attack_air_b_game) - .effect_acmd("effect_attackairb", mario_attack_air_b_effect) - .game_acmd("game_attackairhi", mario_attack_air_hi_game) - .game_acmd("game_attackairlw", mario_attack_air_lw_game) - .effect_acmd("effect_attackairlw", effect_attackairlw) - .sound_acmd("sound_attackairlw", sound_attackairlw) - .expression_acmd("expression_attackairlw", expression_attackairlw) - .game_acmd("game_landingairlw", mario_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_attackairn", game_attackairn); + agent.game_acmd("game_attackairf", game_attackairf); + agent.effect_acmd("effect_attackairf", effect_attackairf); + agent.game_acmd("game_attackairb", game_attackairb); + agent.effect_acmd("effect_attackairb", effect_attackairb); + agent.game_acmd("game_attackairhi", game_attackairhi); + agent.game_acmd("game_attackairlw", game_attackairlw); + agent.effect_acmd("effect_attackairlw", effect_attackairlw); + agent.sound_acmd("sound_attackairlw", sound_attackairlw); + agent.expression_acmd("expression_attackairlw", expression_attackairlw); + agent.game_acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/mario/src/acmd/ground.rs b/fighters/mario/src/acmd/ground.rs index ad290d4c56..eacd617018 100644 --- a/fighters/mario/src/acmd/ground.rs +++ b/fighters/mario/src/acmd/ground.rs @@ -1,179 +1,175 @@ use super::*; -unsafe extern "C" fn mario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 83, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 83, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn mario_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 80, 100, 25, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 2.0, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 80, 100, 25, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 80, 100, 25, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 2.0, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 80, 100, 25, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn mario_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mario_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.5-2.0)); - } + FT_MOTION_RATE_RANGE(agent, 2.0, 2.5, 1.0); frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.0-2.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 361, 83, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 5.0, 361, 83, 0, 35, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 2.5, 5.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 361, 83, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 5.0, 361, 83, 0, 35, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mario_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn mario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 60, 40, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 60, 40, 0, 80, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 60, 40, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 60, 40, 0, 80, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 110, 50, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 110, 50, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 110, 50, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 110, 50, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attack11", mario_attack_11_game) - .effect_acmd("effect_attack11", mario_attack_11_effect) - .game_acmd("game_attack12", mario_attack_12_game) - .effect_acmd("effect_attack12", mario_attack_12_effect) - .game_acmd("game_attack13", mario_attack_13_game) - .effect_acmd("effect_attack13", mario_attack_13_effect) - .expression_acmd("expression_attack13", mario_attack_13_expression) - .game_acmd("game_attackdash", mario_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_attack11", game_attack11); + agent.effect_acmd("effect_attack11", effect_attack11); + agent.game_acmd("game_attack12", game_attack12); + agent.effect_acmd("effect_attack12", effect_attack12); + agent.game_acmd("game_attack13", game_attack13); + agent.effect_acmd("effect_attack13", effect_attack13); + agent.expression_acmd("expression_attack13", expression_attack13); + agent.game_acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mario/src/acmd/mod.rs b/fighters/mario/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/mario/src/acmd/mod.rs +++ b/fighters/mario/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/mario/src/acmd/other.rs b/fighters/mario/src/acmd/other.rs index 8c1275d95b..74365489d1 100644 --- a/fighters/mario/src/acmd/other.rs +++ b/fighters/mario/src/acmd/other.rs @@ -1,352 +1,186 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_mario_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mario_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_mario_step_left_m"), Hash40::new("se_mario_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_mario_step_left_m"), Hash40::new("se_mario_step_right_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.222); + FT_MOTION_RATE(agent, 1.222); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn mario_fireball_regular_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); - } - frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); - } -} - -// Removing flood projectile, properties, and sounds - -unsafe extern "C" fn effect_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mario_pump_shoot"), Hash40::new("mouth"), 0, 0, 0, 0, 90, 0, 0.9, true); - } - frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_pump_shoot"), false, true); - } - */ -} - -unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 55, 100, 70, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_WATER_PUMP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - */ -} - -unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mario_pump_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - */ -} - -unsafe extern "C" fn effect_hit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn effect_clash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - -} - -unsafe extern "C" fn sound_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - /* - if is_excute(fighter) { - SET_TAKEOUT_SE(fighter, Hash40::new("se_common_c_water_m")); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - */ } -unsafe extern "C" fn game_appealsl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, false, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_appealsr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, false, 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hat"), 1.0, 361, 30, 0, 20, 2.5, 0.0, 0.0, -2.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn expression_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("mario_fireball") - .game_acmd("game_regular", mario_fireball_regular_game) - .install(); - smashline::Agent::new("mario_pump") - .effect_acmd("effect_light", effect_light) - .install(); - smashline::Agent::new("mario_pumpwater") - .game_acmd("game_regular", game_regular) - .effect_acmd("effect_regular", effect_regular) - .effect_acmd("effect_hit", effect_hit) - .effect_acmd("effect_clash", effect_clash) - .sound_acmd("sound_regular", sound_regular) - .install(); - smashline::Agent::new("mario") - .sound_acmd("sound_damageflyhi", damageflyhi_sound) - .sound_acmd("sound_damageflylw", damageflylw_sound) - .sound_acmd("sound_damageflyn", damageflyn_sound) - .sound_acmd("sound_damageflyroll", damageflyroll_sound) - .sound_acmd("sound_damageflytop", damageflytop_sound) - .game_acmd("game_dash", dash_game) - .sound_acmd("sound_dash", dash_sound) - .game_acmd("game_turndash", turn_dash_game) - .game_acmd("game_escapeair", escape_air_game) - .game_acmd("game_escapeairslide", escape_air_slide_game) - .game_acmd("game_appealsl", game_appealsl) - .game_acmd("game_appealsr", game_appealsr) - .expression_acmd("expression_appealsl", expression_appeals) - .expression_acmd("expression_appealsr", expression_appeals) - .install(); +pub fn install(agent: &mut Agent) { + agent.sound_acmd("sound_damageflyhi", sound_damagefly); + agent.sound_acmd("sound_damageflylw", sound_damagefly); + agent.sound_acmd("sound_damageflyn", sound_damagefly); + agent.sound_acmd("sound_damageflytop", sound_damagefly); + agent.sound_acmd("sound_damageflyroll", sound_damageflyroll); + agent.game_acmd("game_dash", game_dash); + agent.sound_acmd("sound_dash", sound_dash); + agent.game_acmd("game_turndash", game_turndash); + agent.game_acmd("game_escapeair", game_escapeair); + agent.game_acmd("game_escapeairslide", game_escapeairslide); + agent.game_acmd("game_appealsl", game_appealsl); + agent.game_acmd("game_appealsr", game_appealsr); + agent.expression_acmd("expression_appealsl", expression_appeals); + agent.expression_acmd("expression_appealsr", expression_appeals); } diff --git a/fighters/mario/src/acmd/smashes.rs b/fighters/mario/src/acmd/smashes.rs index e634f2b797..466f08dfc6 100644 --- a/fighters/mario/src/acmd/smashes.rs +++ b/fighters/mario/src/acmd/smashes.rs @@ -1,152 +1,150 @@ use super::*; -unsafe extern "C" fn mario_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 95, 0, 25, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 95, 0, 25, 5.7, 6.3, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 9.0; let attack_end_frame = 14.0; let attack_duration = 3.0; let motion_rate = attack_duration/(attack_end_frame-attack_start_frame); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("head"), 14.0, 83, 95, 0, 32, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 14.0, 83, 95, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, motion_rate); + ATTACK(agent, 0, 0, Hash40::new("head"), 14.0, 83, 95, 0, 32, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 14.0, 83, 95, 0, 32, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, attack_end_frame + 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn mario_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mario_smash_arc"), Hash40::new("mario_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.90, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mario_smash_arc"), Hash40::new("mario_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.90, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 4.5, 0.0, 3.6, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 4.5, 0.0, 3.6, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 75, 0, 40, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 4.5, 0.0, 3.6, -11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 4.5, 0.0, 3.6, -11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 38, 75, 0, 35, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attacks4hi", mario_attack_s4_hi_game) - .game_acmd("game_attacks4", mario_attack_s4_s_game) - .game_acmd("game_attacks4lw", mario_attack_s4_lw_game) - .game_acmd("game_attackhi4", mario_attack_hi4_game) - .effect_acmd("effect_attackhi4", mario_attack_hi4_effect) - .game_acmd("game_attacklw4", mario_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_attacks4hi", game_attacks4hi); + agent.game_acmd("game_attacks4", game_attacks4s); + agent.game_acmd("game_attacks4lw", game_attacks4lw); + agent.game_acmd("game_attackhi4", game_attackhi4); + agent.effect_acmd("effect_attackhi4", effect_attackhi4); + agent.game_acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mario/src/acmd/specials.rs b/fighters/mario/src/acmd/specials.rs index cafa1ce809..871dd70523 100644 --- a/fighters/mario/src/acmd/specials.rs +++ b/fighters/mario/src/acmd/specials.rs @@ -2,197 +2,197 @@ use smash::app::sv_animcmd::QUAKE; use super::*; -unsafe extern "C" fn mario_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 14.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 14.0, 8.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_FIREBALL, false, 0); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 49.0, 23.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mario_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 1, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.353); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.353); } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 27.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); } } -unsafe extern "C" fn mario_special_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 7.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - KineticModule::add_speed(fighter.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 40, 100, 0, 50, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 6, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.55, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, 45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, 45, 0, 0.55, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.55, true); - EFFECT_FOLLOW(fighter, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("havel"), 0, 0, 0, 0, -45, 0, 0.55, true); + EFFECT_FOLLOW(agent, Hash40::new("mario_fb_shoot"), Hash40::new("haver"), 0, 0, 0, 0, -45, 0, 0.55, true); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); } } frame(lua_state, 14.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 7.5, 10.5, 0, 0, 0, 0.26, true); - LAST_EFFECT_SET_COLOR(fighter, 0.65, 0.2, 0.08); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 6.0, 10.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 5.0, 10.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.55); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 7.5, 10.5, 0, 0, 0, 0.26, true); + LAST_EFFECT_SET_COLOR(agent, 0.65, 0.2, 0.08); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 6.0, 10.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.55); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 0, 5.0, 10.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.55); EffectModule::enable_sync_init_pos_last(boma); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 18.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.75); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_bomb_a"), false, false); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.75); + EFFECT_OFF_KIND(agent, Hash40::new("sys_bomb_a"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0, 0.35); + if is_excute(agent) { + FLASH(agent, 1, 0, 0, 0.35); } frame(lua_state, 24.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_flame"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("mario_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_flame"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } } -unsafe extern "C" fn mario_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mario_special_n01")); - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); - PLAY_SE(fighter, Hash40::new("vc_mario_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mario_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("vc_mario_attack07")); } } -unsafe extern "C" fn mario_special_n_fire_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_MANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -200,34 +200,34 @@ unsafe extern "C" fn mario_special_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIO_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); WorkModule::off_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn mario_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_MANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -235,59 +235,59 @@ unsafe extern "C" fn mario_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIO_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL) { WorkModule::on_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - VarModule::on_flag(fighter.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); + VarModule::on_flag(agent.battle_object, vars::mario::instance::SPECIAL_S_DISABLE_STALL); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 7.5, 0.0, 6.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_MANT, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIO_REFLECTOR_KIND_MANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); WorkModule::off_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if (WorkModule::is_flag(boma, *FIGHTER_MARIO_STATUS_SPECIAL_HI_FLAG_CAPPY)) { - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -295,50 +295,50 @@ unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_mario_local_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_LOCAL_COIN_LAST, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } else { - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 60, 100, 160, 0, 2.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 86, 100, 150, 0, 4.0, 0.0, 4.5, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 150, 0, 4.0, 0.0, 4.3, 9.2, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 60, 100, 180, 0, 3.0, 0.0, 4.5, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.6, 92, 100, 170, 0, 3.8, 0.0, 4.5, 7.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.6, 60, 100, 110, 0, 3.0, 0.0, 8.0, 2.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.6, 92, 100, 110, 0, 3.8, 0.0, 8.0, 8.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); AttackModule::set_no_finish_camera(boma, 2, true, false); @@ -346,21 +346,21 @@ unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 125, 0, 50, 6.5, 0.0, 9.5, 2.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIO_COIN_LAST, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } @@ -368,317 +368,304 @@ unsafe extern "C" fn mario_special_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn mario_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_superjump_power"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_superjump_power"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mario_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mario_superjump_fnish"), -1); } } -unsafe extern "C" fn mario_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_power"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 0, -0.4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mario_superjump_fnish"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mario_superjump_power"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mario_superjump_power"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mario_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mario_superjump_fnish"), -1); } } -unsafe extern "C" fn mario_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 0.0, 10.0, 5.0); - if is_excute(fighter){ +unsafe extern "C" fn game_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 0.0, 10.0, 5.0); + if is_excute(agent){ ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } -//Galaxy spin special effects - -unsafe extern "C" fn effect_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 10.4, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } -//Galaxy spin sound effects - -unsafe extern "C" fn sound_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = SoundModule::play_se(boma, Hash40::new("se_mario_special_l01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 0.7, 0); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); } } -unsafe extern "C" fn expression_special_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_speciallwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter){ - if VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent){ + if VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mario_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter){ +unsafe extern "C" fn game_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent){ ArticleModule::remove_exist(boma, *FIGHTER_MARIO_GENERATE_ARTICLE_PUMP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - FT_MOTION_RATE_RANGE(fighter, 0.0, 10.0, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { + FT_MOTION_RATE_RANGE(agent, 0.0, 10.0, 5.0); + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.2, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 45, 0, 88, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } else { frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 40.0, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 2.7, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 40.0, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 2.7, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 40, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(5.0), Some(-0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 45.0, 7.0); - if is_excute(fighter){ + FT_MOTION_RATE_RANGE(agent, 40.0, 45.0, 7.0); + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 45.0); - FT_MOTION_RATE_RANGE(fighter, 45.0, 48.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 45.0, 48.0, 3.0); frame(lua_state, 48.0); - FT_MOTION_RATE_RANGE(fighter, 48.0, 52.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); - FT_MOTION_RATE_RANGE(fighter, 52.0, 95.0, 35.0); + FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); } } -//Galaxy spin special effects - -unsafe extern "C" fn effect_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will disappear if you used galaxy spin in the air - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 180, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.045, 0.345, 2.05); - LAST_EFFECT_SET_ALPHA(fighter, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.45); - - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will disappear if you used galaxy spin in the air + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.45, 0, 0, 180, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.045, 0.345, 2.05); + LAST_EFFECT_SET_ALPHA(agent, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.45); + + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -9.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, 4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 9.3, -4.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } else { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.1); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.1); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.1); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 9.5, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.1); + LAST_EFFECT_SET_RATE(agent, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_ALPHA(agent, 0.2); } } } -//Galaxy spin sound effects - -unsafe extern "C" fn sound_special_air_lw_light(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairlwlight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will change if you used galaxy spin in the air + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mario::instance::DISABLE_DSPECIAL_STALL) { // Effects will change if you used galaxy spin in the air let handle = SoundModule::play_se(boma, Hash40::new("se_mario_special_l01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 0.7, 0); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); } else { - PLAY_SE(fighter, Hash40::new("se_mario_attackair_l01")); - PLAY_SE(fighter, Hash40::new("vc_mario_attack05")); + PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); + PLAY_SE(agent, Hash40::new("vc_mario_attack05")); } } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_specialn", mario_special_n_game) - .game_acmd("game_specialairn", mario_special_n_game) - .effect_acmd("effect_specialn", mario_special_n_effect) - .effect_acmd("effect_specialairn", mario_special_n_effect) - .sound_acmd("sound_specialn", mario_special_n_sound) - .sound_acmd("sound_specialairn", mario_special_n_sound) - .expression_acmd("expression_specialn", mario_special_n_expression) - .expression_acmd("expression_specialairn", mario_special_n_expression) - .game_acmd("game_specialnfire", mario_special_n_fire_game) - .game_acmd("game_specialairnfire", mario_special_n_fire_game) - .effect_acmd("effect_specialnfire", mario_special_n_fire_effect) - .effect_acmd("effect_specialairnfire", mario_special_n_fire_effect) - .sound_acmd("sound_specialnfire", mario_special_n_fire_sound) - .sound_acmd("sound_specialairnfire", mario_special_n_fire_sound) - .expression_acmd("expression_specialnfire", mario_special_n_fire_expression) - .expression_acmd( - "expression_specialairnfire", - mario_special_n_fire_expression, - ) - .game_acmd("game_specials", mario_special_s_game) - .game_acmd("game_specialairs", mario_special_air_s_game) - .game_acmd("game_specialhi", mario_special_hi_game) - .game_acmd("game_specialairhi", mario_special_hi_game) - .effect_acmd("effect_specialhi", mario_special_hi_effect) - .effect_acmd("effect_specialairhi", mario_special_air_hi_effect) - .game_acmd("game_speciallwlight", mario_special_lw_light) - .effect_acmd("effect_speciallwlight", effect_special_lw_light) - .sound_acmd("sound_speciallwlight", sound_special_lw_light) - .expression_acmd("expression_speciallwlight", expression_special_lw_light) - .expression_acmd("expression_specialairlwlight", expression_special_lw_light) - .game_acmd("game_specialairlwlight", mario_special_air_lw_light) - .effect_acmd("effect_specialairlwlight", effect_special_air_lw_light) - .sound_acmd("sound_specialairlwlight", sound_special_air_lw_light) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_specialn", game_specialn); + agent.game_acmd("game_specialairn", game_specialn); + agent.effect_acmd("effect_specialn", effect_specialn); + agent.effect_acmd("effect_specialairn", effect_specialn); + agent.sound_acmd("sound_specialn", sound_specialn); + agent.sound_acmd("sound_specialairn", sound_specialn); + agent.expression_acmd("expression_specialn", expression_specialn); + agent.expression_acmd("expression_specialairn", expression_specialn); + agent.game_acmd("game_specialnfire", game_specialnfire); + agent.game_acmd("game_specialairnfire", game_specialnfire); + agent.effect_acmd("effect_specialnfire", effect_specialnfire); + agent.effect_acmd("effect_specialairnfire", effect_specialnfire); + agent.sound_acmd("sound_specialnfire", sound_specialnfire); + agent.sound_acmd("sound_specialairnfire", sound_specialnfire); + agent.expression_acmd("expression_specialnfire", expression_specialnfire); + agent.expression_acmd("expression_specialairnfire", expression_specialnfire); + agent.game_acmd("game_specials", game_specials); + agent.game_acmd("game_specialairs", game_specialairs); + agent.game_acmd("game_specialhi", game_specialhi); + agent.game_acmd("game_specialairhi", game_specialhi); + agent.effect_acmd("effect_specialhi", effect_specialhi); + agent.effect_acmd("effect_specialairhi", effect_specialairhi); + agent.game_acmd("game_speciallwlight", game_speciallwlight); + agent.effect_acmd("effect_speciallwlight", effect_speciallwlight); + agent.sound_acmd("sound_speciallwlight", sound_speciallwlight); + agent.expression_acmd("expression_speciallwlight", expression_speciallwlight); + agent.expression_acmd("expression_specialairlwlight", expression_speciallwlight); + agent.game_acmd("game_specialairlwlight", game_specialairlwlight); + agent.effect_acmd("effect_specialairlwlight", effect_specialairlwlight); + agent.sound_acmd("sound_specialairlwlight", sound_specialairlwlight); } diff --git a/fighters/mario/src/acmd/throws.rs b/fighters/mario/src/acmd/throws.rs index 1d8a4e696b..a3d3bd6686 100644 --- a/fighters/mario/src/acmd/throws.rs +++ b/fighters/mario/src/acmd/throws.rs @@ -1,51 +1,51 @@ use super::*; -unsafe extern "C" fn mario_grab(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mario_dashgrab(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mario_pivotgrab(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 9.0); @@ -66,101 +66,99 @@ unsafe extern "C" fn mario_pivotgrab(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn mario_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 45, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 45, 65, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 78, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 78, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 8.0, 50, 70, 0, 100, 4.0, -1.0, 6.0, 0.0, Some(-3.2), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 8.0, 50, 70, 0, 100, 4.0, -1.0, 6.0, 0.0, Some(-3.2), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 43.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 90, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 90, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 5, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 5, 7); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mario_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 95, 0, 58, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 90, 95, 0, 58, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4.0, 0.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_catch", mario_grab) - .game_acmd("game_catchdash", mario_dashgrab) - .game_acmd("game_catchturn", mario_pivotgrab) - .game_acmd("game_throwf", mario_throw_f_game) - .game_acmd("game_throwb", mario_throw_b_game) - .game_acmd("game_throwhi", mario_throw_hi_game) - .game_acmd("game_throwlw", mario_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_catch", game_catch); + agent.game_acmd("game_catchdash", game_catchdash); + agent.game_acmd("game_catchturn", game_catchturn); + agent.game_acmd("game_throwf", game_throwf); + agent.game_acmd("game_throwb", game_throwb); + agent.game_acmd("game_throwhi", game_throwhi); + agent.game_acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mario/src/acmd/tilts.rs b/fighters/mario/src/acmd/tilts.rs index 40bee6c762..1c39052cf7 100644 --- a/fighters/mario/src/acmd/tilts.rs +++ b/fighters/mario/src/acmd/tilts.rs @@ -1,141 +1,139 @@ use super::*; -unsafe extern "C" fn mario_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 80, 0, 40, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 361, 80, 0, 40, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 361, 80, 0, 40, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 8.0, 92, 100, 0, 40, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 92, 100, 0, 40, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 80, 80, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 80, 80, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 80, 80, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("mario") - .game_acmd("game_attacks3hi", mario_attack_s3_hi_game) - .effect_acmd("effect_attacks3hi", mario_attack_s3_hi_effect) - .game_acmd("game_attacks3", mario_attack_s3_s_game) - .effect_acmd("effect_attacks3", mario_attack_s3_s_effect) - .game_acmd("game_attacks3lw", mario_attack_s3_lw_game) - .effect_acmd("effect_attacks3lw", mario_attack_s3_lw_effect) - .game_acmd("game_attackhi3", mario_attack_hi3_game) - .game_acmd("game_attacklw3", mario_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_attacks3hi", game_attacks3hi); + agent.effect_acmd("effect_attacks3hi", effect_attacks3hi); + agent.game_acmd("game_attacks3", game_attacks3s); + agent.effect_acmd("effect_attacks3", effect_attacks3s); + agent.game_acmd("game_attacks3lw", game_attacks3lw); + agent.effect_acmd("effect_attacks3lw", effect_attacks3lw); + agent.game_acmd("game_attackhi3", game_attackhi3); + agent.game_acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/mario/src/fireball/acmd/mod.rs b/fighters/mario/src/fireball/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/mario/src/fireball/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/mario/src/fireball/acmd/specials.rs b/fighters/mario/src/fireball/acmd/specials.rs new file mode 100644 index 0000000000..80b2e0290e --- /dev/null +++ b/fighters/mario/src/fireball/acmd/specials.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 30, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIO_FIREBALL, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_regular", game_regular); +} \ No newline at end of file diff --git a/fighters/mario/src/fireball/mod.rs b/fighters/mario/src/fireball/mod.rs new file mode 100644 index 0000000000..e17a0ce4c3 --- /dev/null +++ b/fighters/mario/src/fireball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_fireball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/lib.rs b/fighters/mario/src/lib.rs index 812a5b171d..ef4c84ba16 100644 --- a/fighters/mario/src/lib.rs +++ b/fighters/mario/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod opff; pub mod status; +// articles +mod fireball; +mod pump; +mod pumpwater; + use smash::{ app::{ self, @@ -25,7 +30,13 @@ use smashline::*; use utils::{consts::*, ext::*, util::*, *}; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("mario"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + fireball::install(); + pump::install(); + pumpwater::install(); } diff --git a/fighters/mario/src/opff.rs b/fighters/mario/src/opff.rs index 493a1f197a..e3d307f6df 100644 --- a/fighters/mario/src/opff.rs +++ b/fighters/mario/src/opff.rs @@ -265,8 +265,6 @@ pub unsafe fn mario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("mario") - .on_line(Main, mario_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mario_frame_wrapper); } diff --git a/fighters/mario/src/pump/acmd/mod.rs b/fighters/mario/src/pump/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/mario/src/pump/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/mario/src/pump/acmd/specials.rs b/fighters/mario/src/pump/acmd/specials.rs new file mode 100644 index 0000000000..64b83e17d8 --- /dev/null +++ b/fighters/mario/src/pump/acmd/specials.rs @@ -0,0 +1,9 @@ +use super::*; + +unsafe extern "C" fn effect_light(agent: &mut L2CAgentBase) { + +} + +pub fn install(agent: &mut Agent) { + agent.effect_acmd("effect_light", effect_light); +} \ No newline at end of file diff --git a/fighters/mario/src/pump/mod.rs b/fighters/mario/src/pump/mod.rs new file mode 100644 index 0000000000..2df2c0db77 --- /dev/null +++ b/fighters/mario/src/pump/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_pump"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd/mod.rs b/fighters/mario/src/pumpwater/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/mario/src/pumpwater/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd/specials.rs b/fighters/mario/src/pumpwater/acmd/specials.rs new file mode 100644 index 0000000000..024ccab3da --- /dev/null +++ b/fighters/mario/src/pumpwater/acmd/specials.rs @@ -0,0 +1,29 @@ +use super::*; + +unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { + +} + +unsafe extern "C" fn sound_regular(fighter: &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_hit(fighter: &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_clash(fighter: &mut L2CAgentBase) { + +} + +pub fn install(agent: &mut Agent) { + agent.game_acmd("game_regular", game_regular); + agent.effect_acmd("effect_regular", effect_regular); + agent.sound_acmd("sound_regular", sound_regular); + agent.effect_acmd("effect_hit", effect_hit); + agent.effect_acmd("effect_clash", effect_clash); +} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/mod.rs b/fighters/mario/src/pumpwater/mod.rs new file mode 100644 index 0000000000..68bffd2022 --- /dev/null +++ b/fighters/mario/src/pumpwater/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mario_pumpwater"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mario/src/status.rs b/fighters/mario/src/status.rs index 5f4c4480f3..516ffee3d6 100644 --- a/fighters/mario/src/status.rs +++ b/fighters/mario/src/status.rs @@ -62,12 +62,10 @@ unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub fn install() { - special_n::install(); - smashline::Agent::new("mario") - .on_start(mario_init) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + agent.on_start(mario_init); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre); + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end); } diff --git a/fighters/mario/src/status/special_n.rs b/fighters/mario/src/status/special_n.rs index 39b33591a2..30d28f8bac 100644 --- a/fighters/mario/src/status/special_n.rs +++ b/fighters/mario/src/status/special_n.rs @@ -56,8 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("mario") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } diff --git a/fighters/mariod/src/acmd/aerials.rs b/fighters/mariod/src/acmd/aerials.rs index 194b880cdb..92f3499589 100644 --- a/fighters/mariod/src/acmd/aerials.rs +++ b/fighters/mariod/src/acmd/aerials.rs @@ -1,300 +1,296 @@ use super::*; -unsafe extern "C" fn mariod_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 20, 3.7, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 20, 3.7, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 25, 3.0, 0.9, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 361, 100, 0, 25, 3.0, 0.9, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("legl"), 2.0, 0.0, 0.0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_punch_kick_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_s")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark2")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark2")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } } -unsafe extern "C" fn mariod_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 50, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 17.0, 50, 100, 0, 35, 4.6, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1, 0, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("handl"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("handl"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("handl"), 1.0, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("handl"), 1.0, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -20, -113, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 7, -1, -3, -20, -113, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, 20.0); - if is_excute(fighter){ - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent){ + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-6.0)); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 38, 112, 0, 25, 3.7, 5.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 35, 70, 0, 40, 4.7, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 38, 112, 0, 25, 3.7, 5.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(13.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 8.0, 13.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 100, 0, 20, 4.5, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 100, 0, 20, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 5.4, 5, 180, 0, 0, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.75, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -11.0, 5.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, false); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.75, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(4.5-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 4.5, 3.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 6.0/(10.0-4.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 54, 85, 0, 25, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 54, 85, 0, 25, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 4.5, 10.0, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 54, 85, 0, 25, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 54, 85, 0, 25, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10, 0, -4, 80, 96, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 10, 0, -4, 80, 96, 0.95, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mariod_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 16.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 16.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 270, 82, 0, 14, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 270, 82, 0, 14, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 270, 58, 0, 12, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 15.0, 361, 82, 0, 14, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 270, 58, 0, 12, 5.0, 3.25, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 15.0, 361, 82, 0, 14, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mariod_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -6, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.8, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 1.8, 11, 0, 90, 0, 0, 1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.65, 1.65, 1.65); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 1.8, 11, 0, 90, 0, 0, 1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.65, 1.65, 1.65); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -5, 0, 0, 0, 0, 1.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, -5, 0, 0, 0, 0, 1.35, false); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("hip"), -6.0, 0.0, 0.0, 0, 0, 0, 0.9, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attackairn", mariod_attack_air_n_game) - .acmd("effect_attackairn", mariod_attack_air_n_effect) - .acmd("sound_attackairn", mariod_attack_air_n_sound) - .acmd("game_attackairf", mariod_attack_air_f_game) - .acmd("effect_attackairf", mariod_attack_air_f_effect) - .acmd("game_attackairb", mariod_attack_air_b_game) - .acmd("effect_attackairb", mariod_attack_air_b_effect) - .acmd("game_attackairhi", mariod_attack_air_hi_game) - .acmd("effect_attackairhi", mariod_attack_air_hi_effect) - .acmd("game_attackairlw", mariod_attack_air_lw_game) - .acmd("effect_attackairlw", mariod_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/mariod/src/acmd/ground.rs b/fighters/mariod/src/acmd/ground.rs index ce9fab2731..9c9232ec5a 100644 --- a/fighters/mariod/src/acmd/ground.rs +++ b/fighters/mariod/src/acmd/ground.rs @@ -1,174 +1,170 @@ use super::*; -unsafe extern "C" fn mariod_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 83, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 83, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 83, 100, 30, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 83, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 83, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 83, 100, 30, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn mariod_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 6.7, 1, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mariod_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 30, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 30, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 30, 0, 3.0, 1.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 30, 0, 4.0, 4.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 6.0, Some(0.0), Some(3.3), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn mariod_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -3, 5.9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12, 6.7, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -unsafe extern "C" fn mariod_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.5-2.0)); - } + FT_MOTION_RATE_RANGE(agent, 2.0, 2.5, 1.0); frame(lua_state, 2.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.0-2.5)); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 361, 83, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 6.0, 361, 83, 0, 45, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 2.5, 5.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 361, 83, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 6.0, 361, 83, 0, 45, 4.5, 0.4, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1, 8.5, 4.5, 0, -25, 80, 0.85, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn mariod_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn mariod_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.09); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 80, 40, 0, 70, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 80, 40, 0, 70, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 80, 50, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 50, 0, 60, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.875); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 80, 50, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 50, 0, 60, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.875); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attack11", mariod_attack_11_game) - .acmd("effect_attack11", mariod_attack_11_effect) - .acmd("game_attack12", mariod_attack_12_game) - .acmd("effect_attack12", mariod_attack_12_effect) - .acmd("game_attack13", mariod_attack_13_game) - .acmd("effect_attack13", mariod_attack_13_effect) - .acmd("expression_attack13", mariod_attack_13_expression) - .acmd("game_attackdash", mariod_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mariod/src/acmd/mod.rs b/fighters/mariod/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/mariod/src/acmd/mod.rs +++ b/fighters/mariod/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/mariod/src/acmd/other.rs b/fighters/mariod/src/acmd/other.rs index ad97913fae..8bee90c9cb 100644 --- a/fighters/mariod/src/acmd/other.rs +++ b/fighters/mariod/src/acmd/other.rs @@ -1,339 +1,246 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_mariod_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mariod_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_mariod_step_left_m"), Hash40::new("se_mariod_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_mariod_step_left_m"), Hash40::new("se_mariod_step_right_m")); } } -unsafe extern "C" fn mariod_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.375); + FT_MOTION_RATE(agent, 1.375); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F11 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn mariod_drcapsule_regular_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn mariod_jumpback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } } -unsafe extern "C" fn mariod_jumpfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } } -unsafe extern "C" fn mariod_jumpbackmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpbackmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_attack05")); } } -unsafe extern "C" fn mariod_jumpfrontmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfrontmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_attack05")); } } -unsafe extern "C" fn mariod_jumpaerialback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_007")); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn mariod_jumpaerialfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpaerialfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_007")); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn mariod_cliffjump2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_cliffjump2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_04")); } } -unsafe extern "C" fn mariod_passivewalljump_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_009")); +unsafe extern "C" fn sound_passivewalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_009")); } } -unsafe extern "C" fn mariod_shootlegsjumpsquat_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_shootlegsjumpsquat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_mariod_passive")); - } -} - -pub fn install() { - smashline::Agent::new("mariod") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", mariod_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_jumpback", mariod_jumpback_sound) - .acmd("sound_jumpfront", mariod_jumpfront_sound) - .acmd("sound_jumpbackmini", mariod_jumpbackmini_sound) - .acmd("sound_jumpfrontmini", mariod_jumpfrontmini_sound) - .acmd("sound_jumpaerialback", mariod_jumpaerialback_sound) - .acmd("sound_jumpaerialfront", mariod_jumpaerialfront_sound) - .acmd("sound_cliffjump2", mariod_cliffjump2_sound) - .acmd("sound_passivewalljump", mariod_passivewalljump_sound) - .acmd("sound_shootlegsjumpsquat", mariod_shootlegsjumpsquat_sound) - .install(); - smashline::Agent::new("mariod_drcapsule") - .acmd("game_regular", mariod_drcapsule_regular_game) - .install(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_mariod_passive")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_jumpback", sound_jumpback); + agent.acmd("sound_jumpfront", sound_jumpfront); + agent.acmd("sound_jumpbackmini", sound_jumpbackmini); + agent.acmd("sound_jumpfrontmini", sound_jumpfrontmini); + agent.acmd("sound_jumpaerialback", sound_jumpaerialback); + agent.acmd("sound_jumpaerialfront", sound_jumpaerialfront); + agent.acmd("sound_cliffjump2", sound_cliffjump2); + agent.acmd("sound_passivewalljump", sound_passivewalljump); + agent.acmd("sound_shootlegsjumpsquat", sound_shootlegsjumpsquat); } diff --git a/fighters/mariod/src/acmd/smashes.rs b/fighters/mariod/src/acmd/smashes.rs index 736ca3fa45..e517afe53b 100644 --- a/fighters/mariod/src/acmd/smashes.rs +++ b/fighters/mariod/src/acmd/smashes.rs @@ -1,339 +1,337 @@ use super::*; -unsafe extern "C" fn mariod_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.0, 361, 95, 0, 25, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 20.0, 361, 95, 0, 25, 5.0, 4.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 2, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.3, true, *EF_FLIP_YZ); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 5, 11.5, 30, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 5, 11.5, 30, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 18, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 18, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 4.5, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 4.5, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 38.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_start_frame = 9.0; let attack_end_frame = 14.0; let attack_duration = 3.0; let motion_rate = attack_duration/(attack_end_frame-attack_start_frame); let late_hit_frame = attack_start_frame + 2.0/motion_rate; frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, attack_start_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, motion_rate); + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 16.0, 97, 97, 0, 35, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("bust"), 16.0, 97, 97, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, late_hit_frame); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 15.0, 259, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 15.0, 259, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("head"), 15.0, 76, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 15.0, 76, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 15.0, 259, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 15.0, 259, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("head"), 15.0, 76, 84, 0, 37, 4.7, 2.5, 1.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("bust"), 15.0, 76, 84, 0, 37, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); } frame(lua_state, attack_end_frame); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, attack_end_frame + 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn mariod_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("head"), 6, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 1.0, 7.0, 0.0, -30, -100, -80, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -unsafe extern "C" fn mariod_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 75, 0, 45, 4.5, 0.0, 3.6, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 75, 0, 45, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 75, 0, 45, 4.5, 0.0, 3.6, 12.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 75, 0, 45, 3.5, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 38, 75, 0, 40, 4.5, 0.0, 3.6, -11.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 38, 75, 0, 40, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 38, 75, 0, 40, 4.5, 0.0, 3.6, -11.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 38, 75, 0, 40, 3.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toel"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toel"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, 2, 0, -10, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, 2, 0, -10, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, 12.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, 12.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, -2, 0, 180, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_arc"), Hash40::new("mariod_smash_arc"), Hash40::new("top"), 0, 3, -2, 0, 180, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("hip"), -7.0, 0.0, 0.0, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, -11.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1.0, 3.6, -11.5, 0, 0, 0, 0.8, true, *EF_FLIP_YZ); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attacks4hi", mariod_attack_s4_hi_game) - .acmd("effect_attacks4hi", mariod_attack_s4_hi_effect) - .acmd("game_attacks4", mariod_attack_s4_s_game) - .acmd("effect_attacks4", mariod_attack_s4_s_effect) - .acmd("game_attacks4lw", mariod_attack_s4_lw_game) - .acmd("effect_attacks4lw", mariod_attack_s4_lw_effect) - .acmd("game_attackhi4", mariod_attack_hi4_game) - .acmd("effect_attackhi4", mariod_attack_hi4_effect) - .acmd("game_attacklw4", mariod_attack_lw4_game) - .acmd("effect_attacklw4", mariod_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("effect_attacks4", effect_attacks4s); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/mariod/src/acmd/specials.rs b/fighters/mariod/src/acmd/specials.rs index 0c8a100886..b93a2cef2f 100644 --- a/fighters/mariod/src/acmd/specials.rs +++ b/fighters/mariod/src/acmd/specials.rs @@ -1,120 +1,120 @@ use super::*; -unsafe extern "C" fn mariod_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 15.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 15.0, 8.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, false, 0); } } -unsafe extern "C" fn mariod_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), -1, 8, 11, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn mariod_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_mariod_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_mariod_special_n01")); } } -unsafe extern "C" fn mariod_special_n_chill_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 3.5, 0.0, 6.5, 4.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 69, 84, 0, 42, 4.75, 0.0, 4.0, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 43.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 19.0, 43.0, 36.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_n_chill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 8, 11, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.25, 1, 0.35); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + FLASH(agent, 0.5, 0.25, 1, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice_landing"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 0.75); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLIP(fighter, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FLIP(agent, Hash40::new("mariod_capsule_shoot"), Hash40::new("mariod_capsule_shoot"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.46, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 4, 7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn mariod_special_n_chill_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_frieze_l")); - PLAY_SE(fighter, Hash40::new("vc_mariod_012")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_frieze_l")); + PLAY_SE(agent, Hash40::new("vc_mariod_012")); } } -unsafe extern "C" fn mariod_special_n_chill_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnchill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn mariod_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -122,76 +122,76 @@ unsafe extern "C" fn mariod_special_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIOD_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 46.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 46.0, 13.0); + if is_excute(agent) { let motion_rate = 13.0/(46.0-23.0); ArticleModule::set_rate(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, 1.0/motion_rate); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_down_smoke"), Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.2); if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, false, 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } /*frame(lua_state, 6.0); if is_excute(fighter) { @@ -199,452 +199,444 @@ unsafe extern "C" fn mariod_special_air_s_game(fighter: &mut L2CAgentBase) { WorkModule::set_float(boma, 9.0, *FIGHTER_MARIOD_STATUS_SPECIAL_S_WORK_ID_FLOAT_REFLECT_MOTION_FRAME); }*/ frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - VarModule::on_flag(fighter.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); + VarModule::on_flag(agent.battle_object, vars::mariod::instance::SPECIAL_S_DISABLE_STALL); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 4.5, 0.0, 13.0, 8.0, Some(0.0), Some(1.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 110, 100, 80, 0, 5.0, 0.0, 6.7, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_turn"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARIOD_MANT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 35, 100, 45, 0, 10, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(13.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MARIOD_REFLECTOR_KIND_DRMANTLE, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 46.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 46.0, 13.0); + if is_excute(agent) { let motion_rate = 13.0/(46.0-23.0); ArticleModule::set_rate(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, 1.0/motion_rate); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRMANTLE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_air_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), 1, 7.5, 5, 0, 35, 0, 1.2, true, *EF_FLIP_NONE); } else{ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_supermant_wind_r"), Hash40::new("mariod_supermant_wind_l"), Hash40::new("top"), -1, 7.5, 5, 0, -35, 0, 1.2, true, *EF_FLIP_NONE); } } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("mariod_supermant_flash"), Hash40::new("top"), 0, 5.5, 7.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_supermant_wind_r"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_supermant_wind_l"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_supermant_wind_r"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_supermant_wind_l"), -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), true, true); } } -unsafe extern "C" fn mariod_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - VarModule::off_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); + VarModule::off_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 70, 100, 125, 0, 5.0, 0.0, 6.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 70, 100, 125, 0, 5.0, 0.0, 6.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if boma.is_stick_backward() { - VarModule::on_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); + VarModule::on_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL); StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); } else { - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } -unsafe extern "C" fn mariod_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_superjump_fnish"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_impact"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_impact"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_aura"), -1); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_superjump_power"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_superjump_power"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); } } -unsafe extern "C" fn mariod_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 50, 89, 0, 33, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_stick_backward() { PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 74, 66, 0, 64, 4.0, 0.0, 6.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } -unsafe extern "C" fn mariod_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_aura"), Hash40::new("mariod_smash_aura"), Hash40::new("havel"), -1.5, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 0, 1, 0, 0, 0, 1.05, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_fnish"), Hash40::new("handl"), 2.5, 1, 0, 0, 0, 0, 1.05, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("havel"), 1.0, 0, 0, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mariod_superjump_power"), Hash40::new("handl"), 1.2, 0, 0, 0, 0, 0, 1.45, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_superjump_fnish"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_superjump_fnish"), -1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_impact"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_smash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_impact"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_smash_aura"), -1); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_superjump_power"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_superjump_power"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); } } -unsafe extern "C" fn mariod_landing_fall_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if VarModule::is_flag(fighter.object(), vars::mariod::instance::UP_SPECIAL_CANCEL) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 29.0, 24.0); + if VarModule::is_flag(agent.object(), vars::mariod::instance::UP_SPECIAL_CANCEL) { + FT_MOTION_RATE_RANGE(agent, 1.0, 29.0, 24.0); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mariod_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - } + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, 1, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, 1, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_l"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_l"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_cyclone_impact"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_cyclone_impact"), -1); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 41.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -unsafe extern "C" fn mariod_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.6, 90, 100, 80, 0, 4.0, 0.0, 3.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, -6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.6, 105, 100, 45, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 15, 0, 4.5, 0.0, 9.0, 6.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_MARIOD_STATUS_SPECIAL_LW_FLAG_RISE); WorkModule::on_flag(boma, *FIGHTER_MARIOD_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_BUOYANCY); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 6.0, 0.0, 12.0, 6.0, Some(0.0), Some(12.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 46, 154, 0, 80, 5.5, 0.0, 4.0, 2.5, Some(0.0), Some(4.0), Some(-2.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, -1.5, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_r"), Hash40::new("mariod_cyclone_l"), Hash40::new("top"), 0, -1.5, 0, 0, 180, 0, 0.8, true, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_cyclone_l"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_cyclone_l"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_aura"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_DETACH_KIND(fighter, Hash40::new("mariod_cyclone_impact"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mariod_cyclone_impact"), Hash40::new("mariod_cyclone_impact"), Hash40::new("top"), 3, 9.5, 0, 0, 0, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_DETACH_KIND(agent, Hash40::new("mariod_cyclone_impact"), -1); + EFFECT_FOLLOW(agent, Hash40::new("mariod_smash_impact"), Hash40::new("top"), 0.0, 8.0, 0.0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_impact"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("mariod_smash_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_specialn", mariod_special_n_game) - .acmd("game_specialairn", mariod_special_n_game) - .acmd("effect_specialn", mariod_special_n_effect) - .acmd("effect_specialairn", mariod_special_n_effect) - .acmd("sound_specialn", mariod_special_n_sound) - .acmd("sound_specialairn", mariod_special_n_sound) - .acmd("game_specialnchill", mariod_special_n_chill_game) - .acmd("game_specialairnchill", mariod_special_n_chill_game) - .acmd("effect_specialnchill", mariod_special_n_chill_effect) - .acmd("effect_specialairnchill", mariod_special_n_chill_effect) - .acmd("sound_specialnchill", mariod_special_n_chill_sound) - .acmd("sound_specialairnchill", mariod_special_n_chill_sound) - .acmd( - "expression_specialnchill", - mariod_special_n_chill_expression, - ) - .acmd( - "expression_specialairnchill", - mariod_special_n_chill_expression, - ) - .acmd("game_specials", mariod_special_s_game) - .acmd("effect_specials", mariod_special_s_effect) - .acmd("game_specialairs", mariod_special_air_s_game) - .acmd("effect_specialairs", mariod_special_air_s_effect) - .acmd("game_specialhi", mariod_special_hi_game) - .acmd("effect_specialhi", mariod_special_hi_effect) - .acmd("game_specialairhi", mariod_special_air_hi_game) - .acmd("effect_specialairhi", mariod_special_air_hi_effect) - .acmd("game_landingfallspecial", mariod_landing_fall_special_game) - .acmd("game_speciallw", mariod_special_lw_game) - .acmd("effect_speciallw", mariod_special_lw_effect) - .acmd("game_specialairlw", mariod_special_air_lw_game) - .acmd("effect_specialairlw", mariod_special_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("game_specialnchill", game_specialnchill); + agent.acmd("game_specialairnchill", game_specialnchill); + agent.acmd("effect_specialnchill", effect_specialnchill); + agent.acmd("effect_specialairnchill", effect_specialnchill); + agent.acmd("sound_specialnchill", sound_specialnchill); + agent.acmd("sound_specialairnchill", sound_specialnchill); + agent.acmd("expression_specialnchill", expression_specialnchill); + agent.acmd("expression_specialairnchill", expression_specialnchill); + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_landingfallspecial", game_landingfallspecial); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/mariod/src/acmd/throws.rs b/fighters/mariod/src/acmd/throws.rs index b7b3df262d..2476add8e5 100644 --- a/fighters/mariod/src/acmd/throws.rs +++ b/fighters/mariod/src/acmd/throws.rs @@ -1,165 +1,163 @@ use super::*; -unsafe extern "C" fn mariod_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mariod_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mariod_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mariod_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 48, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 48, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 2); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 2); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.0); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: 0.0, z: 0.0}); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mariod_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 74, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 74, 0, 73, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 6); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 60.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn mariod_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 8); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 8); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn mariod_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 42, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 42, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2.0, 0.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_catch", mariod_catch_game) - .acmd("game_catchdash", mariod_catch_dash_game) - .acmd("game_catchturn", mariod_catch_turn_game) - .acmd("game_throwf", mariod_throw_f_game) - .acmd("game_throwb", mariod_throw_b_game) - .acmd("game_throwhi", mariod_throw_hi_game) - .acmd("game_throwlw", mariod_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mariod/src/acmd/tilts.rs b/fighters/mariod/src/acmd/tilts.rs index 866afa52a6..d72b1f6879 100644 --- a/fighters/mariod/src/acmd/tilts.rs +++ b/fighters/mariod/src/acmd/tilts.rs @@ -1,156 +1,154 @@ use super::*; -unsafe extern "C" fn mariod_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 60, 60, 0, 45, 4.5, 4.6, 0.0, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 60, 60, 0, 45, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 60, 60, 0, 45, 3.5, 1.1, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 9.0, 5, -90, 170, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 4.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mariod_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.2, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 6.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 84, 85, 0, 50, 4.0, -0.5, -0.8, 0.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 84, 85, 0, 50, 4.0, 4.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 120, 70, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 120, 70, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 3.2, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 120, 70, 0, 40, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mariod_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 3, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 4, -1, 12, -172, 0.95, true, *EF_FLIP_YZ); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 3, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 3, 4, -1, 12, -172, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), false, true); } } -pub fn install() { - smashline::Agent::new("mariod") - .acmd("game_attacks3hi", mariod_attack_s3_hi_game) - .acmd("effect_attacks3hi", mariod_attack_s3_hi_effect) - .acmd("game_attacks3", mariod_attack_s3_s_game) - .acmd("effect_attacks3", mariod_attack_s3_s_effect) - .acmd("game_attacks3lw", mariod_attack_s3_lw_game) - .acmd("effect_attacks3lw", mariod_attack_s3_lw_effect) - .acmd("game_attackhi3", mariod_attack_hi3_game) - .acmd("game_attacklw3", mariod_attack_lw3_game) - .acmd("effect_attacklw3", mariod_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3s); + agent.acmd("effect_attacks3", effect_attacks3s); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/mariod/src/drcapsule/acmd/mod.rs b/fighters/mariod/src/drcapsule/acmd/mod.rs new file mode 100644 index 0000000000..3878f50b33 --- /dev/null +++ b/fighters/mariod/src/drcapsule/acmd/mod.rs @@ -0,0 +1,7 @@ +use super::*; + +mod specials; + +pub fn install(agent: &mut Agent) { + specials::install(agent); +} \ No newline at end of file diff --git a/fighters/mariod/src/drcapsule/acmd/specials.rs b/fighters/mariod/src/drcapsule/acmd/specials.rs new file mode 100644 index 0000000000..815416326a --- /dev/null +++ b/fighters/mariod/src/drcapsule/acmd/specials.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 30, 0, 50, 1.7, 0.0, 1.7, 0.0, Some(0.0), Some(-1.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MARIOD_CAPSULE, *ATTACK_REGION_NONE); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_regular", game_regular); +} \ No newline at end of file diff --git a/fighters/mariod/src/drcapsule/mod.rs b/fighters/mariod/src/drcapsule/mod.rs new file mode 100644 index 0000000000..e751d60238 --- /dev/null +++ b/fighters/mariod/src/drcapsule/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mariod_drcapsule"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mariod/src/lib.rs b/fighters/mariod/src/lib.rs index 8e2ddcc726..f97869960e 100644 --- a/fighters/mariod/src/lib.rs +++ b/fighters/mariod/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +// articles +mod drcapsule; + use smash::{ lib::{ L2CValue, @@ -39,7 +42,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("mariod"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + + drcapsule::install(); } diff --git a/fighters/mariod/src/opff.rs b/fighters/mariod/src/opff.rs index 49cc049bf3..a0d2804704 100644 --- a/fighters/mariod/src/opff.rs +++ b/fighters/mariod/src/opff.rs @@ -70,8 +70,6 @@ pub unsafe fn mariod_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("mariod") - .on_line(Main, mariod_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mariod_frame_wrapper); } diff --git a/fighters/mariod/src/status.rs b/fighters/mariod/src/status.rs index 57e85664fe..0abb279e56 100644 --- a/fighters/mariod/src/status.rs +++ b/fighters/mariod/src/status.rs @@ -28,12 +28,10 @@ unsafe extern "C" fn mariod_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - special_n::install(); - smashline::Agent::new("mariod") - .on_start(mariod_init) - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, mariod_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + agent.on_start(mariod_init); + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, mariod_rebirth_end); // Pill Fix for respawn platform let _ = skyline::patching::Patch::in_text(0xcc9e34).data(0x14000047u32); diff --git a/fighters/mariod/src/status/special_n.rs b/fighters/mariod/src/status/special_n.rs index 3ccc41f6a6..edde53e003 100644 --- a/fighters/mariod/src/status/special_n.rs +++ b/fighters/mariod/src/status/special_n.rs @@ -56,8 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("mariod") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } From f3ae09bceb813e23d01c08fcefb36c4041a223b7 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Fri, 22 Mar 2024 20:02:06 -0400 Subject: [PATCH 067/172] Olimar and co crate refractory changes --- fighters/pikmin/src/acmd/aerials.rs | 229 ++++++++++---------- fighters/pikmin/src/acmd/ground.rs | 57 +++-- fighters/pikmin/src/acmd/mod.rs | 16 +- fighters/pikmin/src/acmd/other.rs | 153 +++++++------ fighters/pikmin/src/acmd/specials.rs | 63 +++--- fighters/pikmin/src/acmd/tilts.rs | 63 +++--- fighters/pikmin/src/lib.rs | 7 +- fighters/pikmin/src/opff.rs | 101 +++++---- fighters/pikmin/src/pikmin/acmd/aerials.rs | 155 +++++++------ fighters/pikmin/src/pikmin/acmd/mod.rs | 12 +- fighters/pikmin/src/pikmin/acmd/smashes.rs | 59 +++-- fighters/pikmin/src/pikmin/acmd/specials.rs | 29 ++- fighters/pikmin/src/pikmin/acmd/throws.rs | 67 +++--- fighters/pikmin/src/pikmin/mod.rs | 2 +- fighters/pikmin/src/pikmin/status.rs | 95 ++++---- fighters/pikmin/src/status.rs | 2 +- fighters/pikmin/src/status/attack_air.rs | 105 +++++---- fighters/pikmin/src/status/escape_air.rs | 9 +- fighters/pikmin/src/status/rebirth.rs | 9 +- 19 files changed, 610 insertions(+), 623 deletions(-) diff --git a/fighters/pikmin/src/acmd/aerials.rs b/fighters/pikmin/src/acmd/aerials.rs index ac5636789a..ca450f3b7c 100644 --- a/fighters/pikmin/src/acmd/aerials.rs +++ b/fighters/pikmin/src/acmd/aerials.rs @@ -2,314 +2,314 @@ use super::*; use globals::*; use std::ops::Index; -unsafe extern "C" fn olimar_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } //With Pikmin frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 6.0, 35, 120, 0, 50, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 35, 120, 0, 50, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 6.0, 35, 120, 0, 50, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 35, 120, 0, 50, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn olimar_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } //With Pikmin frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count != 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } //Without Pikmin frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if (pikmin_count == 0) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn olimar_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - FT_MOTION_RATE_RANGE(fighter, 2.0, 7.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 7.0, 3.0); frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 23.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 23.0, 20.0); + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn effect_attackairn(fighter: &mut L2CAgentBase) { } +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n02")); } wait(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_pikmin_attackair_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n03")); } } -unsafe extern "C" fn expression_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .acmd("game_attackairf", olimar_attack_air_f_game) .acmd("expression_attackairf", olimar_attack_air_f_expression) @@ -322,5 +322,4 @@ pub fn install() { .acmd("effect_attackairn", effect_attackairn) .acmd("sound_attackairn", sound_attackairn) .acmd("expression_attackairn", expression_attackairn) - .install(); } diff --git a/fighters/pikmin/src/acmd/ground.rs b/fighters/pikmin/src/acmd/ground.rs index b1a0eb26db..90755050bc 100644 --- a/fighters/pikmin/src/acmd/ground.rs +++ b/fighters/pikmin/src/acmd/ground.rs @@ -1,66 +1,65 @@ use super::*; -unsafe extern "C" fn pikmin_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.4, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 180, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.4, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 180, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 2.8, 0.0, 5.0, 8.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 180, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 180, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 15, 0, 25, 3.0, 0.0, 5.0, 10.8, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pikmin_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 80, 0, 40, 2.8, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 45, 80, 0, 40, 3.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 80, 0, 40, 2.8, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 45, 80, 0, 40, 3.5, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.5); } } -unsafe extern "C" fn pikmin_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 7.0, 68, 50, 0, 30, 5.0, 0.0, 7.7, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 7.0, 68, 50, 0, 30, 5.0, 0.0, 7.7, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("trans"), 4.0, 75, 50, 0, 90, 4.5, 0.0, 7.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("trans"), 4.0, 75, 50, 0, 90, 4.5, 0.0, 7.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .acmd("game_attack11", pikmin_attack_11_game) .acmd("game_attack12", pikmin_attack_12_game) .acmd("game_attackdash", pikmin_attack_dash_game) - .install(); } diff --git a/fighters/pikmin/src/acmd/mod.rs b/fighters/pikmin/src/acmd/mod.rs index f328554ba5..5b79a4e6b2 100644 --- a/fighters/pikmin/src/acmd/mod.rs +++ b/fighters/pikmin/src/acmd/mod.rs @@ -9,12 +9,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index cafb2f2a70..93734e7661 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -1,199 +1,199 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pikmin_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pikmin_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikmin_step_right_ll")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikmin_step_right_ll")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pikmin_step_left_ll")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pikmin_step_left_ll")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectuvekt F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .acmd("sound_damageflyhi", damageflyhi_sound) .acmd("sound_damageflylw", damageflylw_sound) @@ -205,5 +205,4 @@ pub fn install() { .acmd("game_turndash", turn_dash_game) .acmd("game_escapeair", escape_air_game) .acmd("game_escapeairslide", escape_air_slide_game) - .install(); } diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index 943dd2f6da..42850ccdec 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -1,71 +1,71 @@ use super::*; -unsafe extern "C" fn pikmin_special_s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_SPECIAL_S_FLAG_THROW); } } -unsafe extern "C" fn pikmin_special_n(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, WorkModule::get_float(boma, *FIGHTER_PIKMIN_STATUS_PULL_OUT_WORK_FLOAT_MOT_RATE)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } -unsafe extern "C" fn pikmin_special_n_failure(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnfailure(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_SPECIAL_LW_FLAG_SORT); // damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 7.5, 0.0, 7.0, -8.5, 0.0, 7.0, 8.5, 1.0, 0.8, 50, false, 0.8, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 7.5, 0.0, 7.0, -8.5, 0.0, 7.0, 8.5, 1.0, 0.8, 50, false, 0.8, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } -unsafe extern "C" fn effect_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_order"), Hash40::new("s_antenna4"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pikmin_order"), Hash40::new("s_antenna4"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("pikmin_seiretsu"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 0.55, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("pikmin_seiretsu"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 0.55, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .acmd("game_specials", pikmin_special_s) .acmd("game_specialairs", pikmin_special_s) @@ -76,5 +76,4 @@ pub fn install() { .acmd("game_specialairlw", game_speciallw) .acmd("effect_speciallw", effect_speciallw) .acmd("effect_specialairlw", effect_speciallw) - .install(); } diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 87719a5971..12e40a64b0 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -1,78 +1,77 @@ use super::*; -unsafe extern "C" fn pikmin_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.641); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.641); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 3.5, 0.0, 5.0, 13.5, Some(0.0), Some(5.0), Some(9.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 2.2, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 3.5, 0.0, 5.0, 13.5, Some(0.0), Some(5.0), Some(9.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5, 361, 111, 0, 40, 2.2, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pikmin_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 4.5, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 3.5, -1.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 4.5, 1.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 7.5, 70, 85, 0, 55, 3.5, -1.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pikmin_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, 3.0, 4.0, 5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, -3.0, 4.0, -5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 0.6, 367, 100, 0, 45, 5.0, 3.0, 0.0, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, 3.0, 4.0, 5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("trans"), 0.6, 120, 100, 50, 0, 3.5, -3.0, 4.0, -5.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 0.6, 367, 100, 0, 45, 5.0, 3.0, 0.0, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("trans"), 4.0, 90, 100, 0, 70, 6.0, 0.0, 8.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("trans"), 4.0, 90, 100, 0, 70, 6.0, 0.0, 8.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .acmd("game_attacks3", pikmin_attack_s3_s_game) .acmd("game_attacklw3", pikmin_attack_lw3_game) .acmd("game_attackhi3", pikmin_attack_hi3_game) - .install(); } diff --git a/fighters/pikmin/src/lib.rs b/fighters/pikmin/src/lib.rs index 991904067c..72b4deac6e 100644 --- a/fighters/pikmin/src/lib.rs +++ b/fighters/pikmin/src/lib.rs @@ -39,8 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); + let agent = &mut Agent::new("pikmin"); + acmd::install(agent); pikmin::install(); - status::install(); - opff::install(); + status::install(agent); + opff::install(agent); } diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 763a8e1c80..1ef7551544 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -3,7 +3,7 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -unsafe fn winged_pikmin_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat1: i32) { +unsafe fn winged_pikmin_cancel(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat1: i32) { if [*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT].contains(&status_kind) { if boma.is_cat_flag(Cat1::SpecialN) { StatusModule::change_status_request_from_script(boma, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_END, false); @@ -12,13 +12,13 @@ unsafe fn winged_pikmin_cancel(fighter: &mut L2CFighterCommon, boma: &mut Battle VarModule::on_flag(boma.object(), vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); } } - if fighter.is_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) - && fighter.is_situation(*SITUATION_KIND_AIR) - && !StatusModule::is_changing(fighter.module_accessor) - && CancelModule::is_enable_cancel(fighter.module_accessor) + if agent.is_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) + && agent.is_situation(*SITUATION_KIND_AIR) + && !StatusModule::is_changing(agent.module_accessor) + && CancelModule::is_enable_cancel(agent.module_accessor) && VarModule::is_flag(boma.object(), vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true); - let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true); + let cancel_module = *(agent.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false } } @@ -50,10 +50,10 @@ pub struct TroopManager { // funny blujay made this happen } -unsafe fn pikmin_antenna_indicator(fighter: &mut L2CFighterCommon) { - if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ENTRY +unsafe fn pikmin_antenna_indicator(agent: &mut L2CFighterCommon) { + if agent.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ENTRY || sv_information::is_ready_go() { - let troops = WorkModule::get_int64(fighter.module_accessor, 0x100000C0); + let troops = WorkModule::get_int64(agent.module_accessor, 0x100000C0); // 0x100000C0 = FIGHTER_PIKMIN_INSTANCE_WORK_INT_TROOPS_MANAGER_ADDRESS let troopmanager = troops as *const TroopManager; let count = (*troopmanager).current_pikmin_count; @@ -67,7 +67,7 @@ unsafe fn pikmin_antenna_indicator(fighter: &mut L2CFighterCommon) { pikmin = std::ptr::null_mut(); pikmin_id = *BATTLE_OBJECT_ID_INVALID as u32; } - let antenna_eff = WorkModule::get_int(fighter.module_accessor, 0x100000C4) as u32; + let antenna_eff = WorkModule::get_int(agent.module_accessor, 0x100000C4) as u32; // 0x100000C4 = FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_ANTENNA_EFFECT_HANDLE if pikmin_id != *BATTLE_OBJECT_ID_INVALID as u32 && sv_battle_object::is_active(pikmin_id) { @@ -102,75 +102,74 @@ unsafe fn pikmin_antenna_indicator(fighter: &mut L2CFighterCommon) { b_param = "antenna.light_medium_high"; } // Purple }; - let r = ParamModule::get_float(fighter.battle_object, ParamType::Agent, r_param); - let g = ParamModule::get_float(fighter.battle_object, ParamType::Agent, g_param); - let b = ParamModule::get_float(fighter.battle_object, ParamType::Agent, b_param); - let alpha = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_bright_alpha"); - EffectModule::set_alpha(fighter.module_accessor, antenna_eff, 1.0); - EffectModule::set_rgb(fighter.module_accessor, antenna_eff, r, g, b); + let r = ParamModule::get_float(agent.battle_object, ParamType::Agent, r_param); + let g = ParamModule::get_float(agent.battle_object, ParamType::Agent, g_param); + let b = ParamModule::get_float(agent.battle_object, ParamType::Agent, b_param); + let alpha = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_bright_alpha"); + EffectModule::set_alpha(agent.module_accessor, antenna_eff, 1.0); + EffectModule::set_rgb(agent.module_accessor, antenna_eff, r, g, b); } else { // No Pikmin, make it transparent and grey. - let rgb = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_medium_high"); - EffectModule::set_rgb(fighter.module_accessor, antenna_eff, rgb, rgb, rgb); - let alpha = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_dim_alpha"); - EffectModule::set_alpha(fighter.module_accessor, antenna_eff, 0.05); + let rgb = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_medium_high"); + EffectModule::set_rgb(agent.module_accessor, antenna_eff, rgb, rgb, rgb); + let alpha = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_dim_alpha"); + EffectModule::set_alpha(agent.module_accessor, antenna_eff, 0.05); } } } -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ +unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { + if !agent.is_in_hitlag() + && !StatusModule::is_changing(agent.module_accessor) + && agent.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_LW, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_END ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + && agent.is_situation(*SITUATION_KIND_AIR) { + agent.sub_air_check_dive(); + if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(agent.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); } } } } -pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - winged_pikmin_cancel(fighter, boma, status_kind, cat[0]); +pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + winged_pikmin_cancel(agent, boma, status_kind, cat[0]); solimar_scaling(boma, status_kind, frame); - pikmin_antenna_indicator(fighter); - fastfall_specials(fighter); + pikmin_antenna_indicator(agent); + fastfall_specials(agent); } -pub extern "C" fn pikmin_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn pikmin_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(fighter); - pikmin_frame(fighter) + common::opff::fighter_common_opff(agent); + pikmin_frame(agent) } } -pub unsafe fn pikmin_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(fighter) { - moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn pikmin_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(agent) { + moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .on_line(Main, pikmin_frame_wrapper) - .install(); } diff --git a/fighters/pikmin/src/pikmin/acmd/aerials.rs b/fighters/pikmin/src/pikmin/acmd/aerials.rs index d16cb12ab1..453be7f91e 100644 --- a/fighters/pikmin/src/pikmin/acmd/aerials.rs +++ b/fighters/pikmin/src/pikmin/acmd/aerials.rs @@ -3,171 +3,171 @@ use super::PikminInfo; use std::ops::Index; use globals::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 6.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 6.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 22.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 22.0, 20.0); + if is_excute(agent) { let dmg = 8.8; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 75 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 7.6; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 62 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 6.4; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn effect_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_smash_trail"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.5, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); - EFFECT_FOLLOW(fighter, Hash40::new("pikmin_attack_flash"), Hash40::new("waist"), 0, 0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, p.color.x, p.color.y, p.color.z); + EFFECT_FOLLOW(agent, Hash40::new("pikmin_attack_flash"), Hash40::new("waist"), 0, 0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, p.color.x, p.color.y, p.color.z); } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 8.0; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 2.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 11.2; - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 50 + p.angle, 76, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 12.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 30, 4.0, 0.0, 5.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 20, 4.0, 0.0, -1.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 30, 4.0, 0.0, 5.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head1"), dmg * p.dmg, 40 + p.angle, 105, 0, 20, 4.0, 0.0, -1.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 7.2; - ATTACK(fighter, 0, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 1, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 2, 0, Hash40::new("head1"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - ATTACK(fighter, 3, 0, Hash40::new("waist"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 2.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head2"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head1"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 3, 0, Hash40::new("waist"), dmg * p.dmg, 95 + p.angle, 74, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 10.08; /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 79, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 79, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 59, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("head1"), dmg * p.dmg, 270 + p.angle, 59, 0, 30, 3.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 6.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 50, 60, 0, 40, 2.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 50, 60, 0, 40, 2.5, 0.0, 3.0, 0.0, Some(0.0), Some(-1.5), Some(0.0), p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); AttackModule::clear(boma, 1, false); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin_pikmin") .acmd("game_attackairn", game_attackairn) .acmd("game_attackairn_y", game_attackairn) @@ -199,5 +199,4 @@ pub fn install() { .acmd("game_attackairlw_b", game_attackairlw) .acmd("game_attackairlw_w", game_attackairlw) .acmd("game_attackairlw_v", game_attackairlw) - .install(); } diff --git a/fighters/pikmin/src/pikmin/acmd/mod.rs b/fighters/pikmin/src/pikmin/acmd/mod.rs index 9899ed119d..c3284d0fd4 100644 --- a/fighters/pikmin/src/pikmin/acmd/mod.rs +++ b/fighters/pikmin/src/pikmin/acmd/mod.rs @@ -7,10 +7,10 @@ mod smashes; mod specials; mod throws; -pub fn install() { - aerials::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); } \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/smashes.rs b/fighters/pikmin/src/pikmin/acmd/smashes.rs index 4c225d5309..e35e819e88 100644 --- a/fighters/pikmin/src/pikmin/acmd/smashes.rs +++ b/fighters/pikmin/src/pikmin/acmd/smashes.rs @@ -3,85 +3,85 @@ use super::PikminInfo; use std::ops::Index; use globals::*; -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); let dmg = 18.2; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 83 + p.angle, 72, 0, 50, 6.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 83 + p.angle, 72, 0, 50, 6.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); let dmg = 14.0; - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg * p.dmg, 94 + p.angle, 64, 0, 50, 4.0, 0.0, 3.5, 9.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg * p.dmg, 94 + p.angle, 64, 0, 50, 4.0, 0.0, 3.5, 9.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 15.4; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 60 + p.angle, 68, 0, 50, 5.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 60 + p.angle, 68, 0, 50, 5.0, 0.0, 3.5, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); let dmg = 15.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 12.6; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 28 + p.angle, 71, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.2, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn game_attacks4sjump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); let dmg = 20.3; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 14.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 8.4; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin_pikmin") .acmd("game_attackhi4", game_attackhi4) .acmd("game_attackhi4_b", game_attackhi4) @@ -98,5 +98,4 @@ pub fn install() { .acmd("game_attacks4sjump_v", game_attacks4sjump) .acmd("game_attacks4sjump_w", game_attacks4sjump) .acmd("game_attacks4sjump_y", game_attacks4sjump) - .install(); } diff --git a/fighters/pikmin/src/pikmin/acmd/specials.rs b/fighters/pikmin/src/pikmin/acmd/specials.rs index 0b19178b38..a25139d8e1 100644 --- a/fighters/pikmin/src/pikmin/acmd/specials.rs +++ b/fighters/pikmin/src/pikmin/acmd/specials.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn game_spsremved(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_spsremved(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if VarModule::is_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE) { - if is_excute(fighter) { + if VarModule::is_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE) { + if is_excute(agent) { AttackModule::clear_all(boma); let dmg = 4.8; // special case for yellow pikmin @@ -17,25 +17,25 @@ unsafe extern "C" fn game_spsremved(fighter: &mut L2CAgentBase) { } else { 1.0 }; - ATTACK(fighter, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into()); + agent.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into()); } } } -unsafe extern "C" fn pikmin_special_n_pikmin(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_spntakenoutstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, WorkModule::get_float(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_PULL_OUT_START_WORK_FLOAT_MOT_RATE)); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } } @@ -148,7 +148,7 @@ unsafe extern "C" fn game_spsthrown_y(agent: &mut L2CAgentBase) { } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin_pikmin") .acmd("game_spsremved", game_spsremved) .acmd("game_spsremved_b", game_spsremved) @@ -170,5 +170,4 @@ pub fn install() { .acmd("game_spsthrown_v", game_spsthrown_v) .acmd("game_spsthrown_w", game_spsthrown_w) .acmd("game_spsthrown_y", game_spsthrown_y) - .install(); } diff --git a/fighters/pikmin/src/pikmin/acmd/throws.rs b/fighters/pikmin/src/pikmin/acmd/throws.rs index 05e49636ef..0bb15c4ab4 100644 --- a/fighters/pikmin/src/pikmin/acmd/throws.rs +++ b/fighters/pikmin/src/pikmin/acmd/throws.rs @@ -1,108 +1,108 @@ use super::*; -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 15.3 } else { 9.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 45 + p.angle, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 45 + p.angle, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 11.9 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 361, 60, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 361, 60, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if is_excute(fighter) { + if is_excute(agent) { let dmg = if variation == 2 { 12.5 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 85 + p.angle, 80, 0, 81, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 85 + p.angle, 80, 0, 81, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 1.0; - ATTACK(fighter, 0, 0, Hash40::new("head1"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let dmg = 1.0; - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 7.0, 0.0, 4.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("top"), dmg * p.dmg, 90 + p.angle, 200, 0, 50, 7.0, 0.0, 4.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PIKMIN); AttackModule::set_catch_only_all(boma, true, false); let dmg = if variation == 2 { 11.9 } else { 7.0 }; - ATTACK_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 70 + p.angle, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, 0, dmg * p.dmg, 70 + p.angle, 60, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, p.attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_TASK); let target_group = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *WEAPON_PIKMIN_PIKMIN_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *WEAPON_PIKMIN_PIKMIN_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin_pikmin") .acmd("game_throwb", game_throwb) .acmd("game_throwb_b", game_throwb) @@ -124,5 +124,4 @@ pub fn install() { .acmd("game_throwlw_v", game_throwlw) .acmd("game_throwlw_w", game_throwlw) .acmd("game_throwlw_y", game_throwlw) - .install(); } diff --git a/fighters/pikmin/src/pikmin/mod.rs b/fighters/pikmin/src/pikmin/mod.rs index 78e3ddcf3b..0535c9183d 100644 --- a/fighters/pikmin/src/pikmin/mod.rs +++ b/fighters/pikmin/src/pikmin/mod.rs @@ -77,7 +77,7 @@ impl From for PikminInfo { } } -pub fn install() { +pub fn install(agent: &mut Agent) { acmd::install(); status::install(); } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index d104f0e290..25d8854ea6 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -4,77 +4,77 @@ use globals::*; // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING -pub unsafe extern "C" fn special_s_cling_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); - AttackModule::set_ignore_just_shield(fighter.module_accessor, true); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); +pub unsafe extern "C" fn special_s_cling_main(agent: &mut L2CFighterCommon) -> L2CValue { + agent.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); + AttackModule::set_ignore_just_shield(agent.module_accessor, true); + MotionModule::change_motion(agent.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); - if !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - && !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { - let target = fighter.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + if !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + && !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + let target = agent.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); + agent.clear_lua_stack(); + agent.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(agent.lua_state_agent); } - let founder_id = sv_battle_object::get_founder_id(fighter.global_table[OBJECT_ID].get_u32()); + let founder_id = sv_battle_object::get_founder_id(agent.global_table[OBJECT_ID].get_u32()); let mut founder_module_accessor = sv_battle_object::module_accessor(founder_id as u32); if !founder_module_accessor.is_null() { let power_special_s = WorkModule::get_param_float(founder_module_accessor, hash40("power_special_s"), 0); - AttackModule::set_power_up(fighter.module_accessor, power_special_s); + AttackModule::set_power_up(agent.module_accessor, power_special_s); let founder_power_mul_status = AttackModule::power_mul_status(founder_module_accessor); - AttackModule::set_power_mul_status(fighter.module_accessor, founder_power_mul_status); + AttackModule::set_power_mul_status(agent.module_accessor, founder_power_mul_status); } - let variation = fighter.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); + let variation = agent.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - VarModule::set_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); - VarModule::off_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); - VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + VarModule::set_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); + VarModule::off_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); + VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - fighter.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) + agent.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) } -unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - let clatter_time = ControlModule::get_clatter_time(fighter.module_accessor, 0); - fighter.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); - let variation = fighter.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); +unsafe extern "C" fn special_s_cling_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(agent.module_accessor); + let clatter_time = ControlModule::get_clatter_time(agent.module_accessor, 0); + agent.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); + let variation = agent.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if !fighter.global_table[IS_STOPPING].get_bool() - && !StatusModule::is_changing(fighter.module_accessor) + if !agent.global_table[IS_STOPPING].get_bool() + && !StatusModule::is_changing(agent.module_accessor) { - let is_attack = AttackModule::is_attack(fighter.module_accessor, 0, false); - if is_attack && !VarModule::is_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { - VarModule::inc_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); + let is_attack = AttackModule::is_attack(agent.module_accessor, 0, false); + if is_attack && !VarModule::is_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { + VarModule::inc_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); } - VarModule::set_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); - if VarModule::get_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ - VarModule::on_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - fighter.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); + VarModule::set_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); + if VarModule::get_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ + VarModule::on_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + agent.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); return 1.into(); } } - if fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - || fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + if agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + || agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { return 0.into(); } - if !fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { - fighter.clear_lua_stack(); - fighter.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + if !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { + agent.clear_lua_stack(); + agent.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(agent.lua_state_agent); if frame > 3.0 { - fighter.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); - let target = fighter.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); + agent.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); + let target = agent.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); } } - if LinkModule::is_link(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { - LinkModule::send_event_parents(fighter.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); + if LinkModule::is_link(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { + LinkModule::send_event_parents(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); } return 0.into(); @@ -82,9 +82,9 @@ unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) - // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE -pub unsafe extern "C" fn special_s_cling_remove_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - smashline::original_status(End, fighter, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(fighter) +pub unsafe extern "C" fn special_s_cling_remove_end(agent: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + smashline::original_status(End, agent, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(agent) } pub fn install() { @@ -99,5 +99,4 @@ pub fn install() { *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, special_s_cling_remove_end, ) - .install(); } diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status.rs index 5c5522aa95..558140eb7e 100644 --- a/fighters/pikmin/src/status.rs +++ b/fighters/pikmin/src/status.rs @@ -3,7 +3,7 @@ mod escape_air; mod attack_air; mod rebirth; -pub fn install() { +pub fn install(agent: &mut Agent) { escape_air::install(); attack_air::install(); rebirth::install(); diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 3cb1eb5cbc..2697745b0e 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -1,49 +1,49 @@ use super::*; use globals::*; -pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air(); - fighter.main_shift(attack_air_main_loop) +pub unsafe extern "C" fn attack_air_main(agent: &mut L2CFighterCommon) -> L2CValue { + agent.sub_attack_air(); + agent.main_shift(attack_air_main_loop) } -unsafe extern "C" fn attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let status = if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { +unsafe extern "C" fn attack_air_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let status = if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR } else { FIGHTER_STATUS_KIND_LANDING }; - fighter.change_status(status.into(), false.into()); + agent.change_status(status.into(), false.into()); return 0.into(); } else { - if fighter.sub_transition_group_check_air_landing().get_bool() { + if agent.sub_transition_group_check_air_landing().get_bool() { return 0.into(); } } - let fall_special = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_ATTACK_AIR_WORK_FLAG_FALL_SPECIAL); + let fall_special = WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_ATTACK_AIR_WORK_FLAG_FALL_SPECIAL); if !fall_special { - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(agent.module_accessor) { + if agent.sub_wait_ground_check_common(false.into()).get_bool() + || agent.sub_air_check_fall_common().get_bool() { return 0.into(); } } } - if MotionModule::is_end(fighter.module_accessor) { + if MotionModule::is_end(agent.module_accessor) { let status = if fall_special { FIGHTER_STATUS_KIND_FALL_SPECIAL } else { FIGHTER_STATUS_KIND_FALL }; - fighter.change_status(status.into(), false.into()); + agent.change_status(status.into(), false.into()); return 0.into(); } - if !fighter.global_table[IS_STOPPING].get_bool() { - fighter.sub_attack_air_uniq_process_exec_fix_pos(); - pikmin_attack_air_handle_pikmin(fighter); + if !agent.global_table[IS_STOPPING].get_bool() { + agent.sub_attack_air_uniq_process_exec_fix_pos(); + pikmin_attack_air_handle_pikmin(agent); } 0.into() } @@ -68,103 +68,102 @@ extern "C" { fn store_event_table(event: *const app::LinkEvent) -> L2CValue; } -unsafe extern "C" fn pikmin_attack_air_handle_pikmin(fighter: &mut L2CFighterCommon) { - fighter.sub_attack_air_uniq_process_exec(); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC) { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH) { +unsafe extern "C" fn pikmin_attack_air_handle_pikmin(agent: &mut L2CFighterCommon) { + agent.sub_attack_air_uniq_process_exec(); + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC) { + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH) { return; } - pikmin_attack_air_handle_pikmin_detatch(fighter); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); + pikmin_attack_air_handle_pikmin_detatch(agent); + WorkModule::off_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } else { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); - let fightermoduleaccessor = fighter.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; + WorkModule::off_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); + let fightermoduleaccessor = agent.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; FighterSpecializer_Pikmin::hold_pikmin(fightermoduleaccessor, 1); FighterSpecializer_Pikmin::update_hold_pikmin_param(fightermoduleaccessor); - let hold_pikmin_num = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + let hold_pikmin_num = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if hold_pikmin_num <= 0 { return; } - let pikmin_id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_OBJECT_ID_0); - let ret = LinkModule::link(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, pikmin_id as u32); + let pikmin_id = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_OBJECT_ID_0); + let ret = LinkModule::link(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, pikmin_id as u32); if ret & 1 != 0 { let mut link_event = FighterPikminLinkEventWeaponPikminConstraint__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_constraint"))); link_event[0xf2a5bf2beu64].assign(&L2CValue::Hash40(Hash40::new("top"))); link_event["joint_id_"].assign(&L2CValue::Hash40(Hash40::new("top"))); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); - LinkModule::set_attribute(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_STOP as u8}, true); - LinkModule::set_attribute(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_ATTACK_STOP as u8}, true); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + LinkModule::set_attribute(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_STOP as u8}, true); + LinkModule::set_attribute(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_ATTACK_STOP as u8}, true); let mut link_event = FighterPikminLinkEventWeaponPikminChangeMotion__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_motion"))); - let motion = MotionModule::motion_kind(fighter.module_accessor); + let motion = MotionModule::motion_kind(agent.module_accessor); link_event["motion_kind_"].assign(&L2CValue::Hash40(Hash40::new_raw(motion))); link_event["start_frame_"].assign(&L2CValue::F32(0.0)); link_event["rate_"].assign(&L2CValue::F32(1.0)); link_event["loop_"].assign(&L2CValue::Bool(false)); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminChangeStatus__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_status"))); link_event["status_kind_"].assign(&L2CValue::I32(*WEAPON_PIKMIN_PIKMIN_STATUS_KIND_ATTACK_AIR)); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminSyncLR__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_sync_lr"))); - let lr = PostureModule::lr(fighter.module_accessor); + let lr = PostureModule::lr(agent.module_accessor); link_event["lr_"].assign(&L2CValue::F32(lr)); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); - WorkModule::set_int(fighter.module_accessor, 1, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_INT_HAVE_PIKMIN); + WorkModule::set_int(agent.module_accessor, 1, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_INT_HAVE_PIKMIN); } } } -unsafe extern "C" fn pikmin_attack_air_handle_pikmin_detatch(fighter: &mut L2CFighterCommon) { - let fightermoduleaccessor = fighter.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; +unsafe extern "C" fn pikmin_attack_air_handle_pikmin_detatch(agent: &mut L2CFighterCommon) { + let fightermoduleaccessor = agent.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; FighterSpecializer_Pikmin::update_hold_pikmin_param(fightermoduleaccessor); - let hold_pikmin_num = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + let hold_pikmin_num = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if hold_pikmin_num > 0 { - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN) { + if LinkModule::is_link(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN) { let mut link_event = new_event_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new_raw(0x39ab74e206))); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminChangeStatus__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_status"))); link_event["status_kind_"].assign(&L2CValue::I32(*WEAPON_PIKMIN_PIKMIN_STATUS_KIND_AIR_FOLLOW)); - let object_id = fighter.global_table[OBJECT_ID].get_u32(); + let object_id = agent.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); } FighterSpecializer_Pikmin::reduce_pikmin_all(fightermoduleaccessor); } } -unsafe extern "C" fn link_event_store_l2c_table(fighter: &mut L2CFighterCommon, link_no: L2CValue, event: L2CValue) -> L2CValue { +unsafe extern "C" fn link_event_store_l2c_table(agent: &mut L2CFighterCommon, link_no: L2CValue, event: L2CValue) -> L2CValue { let callable: extern "C" fn() -> *mut app::LinkEvent = std::mem::transmute(event["new_instance_lua_"].get_ptr()); let link_event = callable(); lua_bind::LinkEvent::load_from_l2c_table(link_event, &event); - LinkModule::send_event_parents_struct(fighter.module_accessor, link_no.get_i32(), link_event); + LinkModule::send_event_parents_struct(agent.module_accessor, link_no.get_i32(), link_event); let ret = store_event_table(link_event); let deleter: extern "C" fn(*mut app::LinkEvent) = std::mem::transmute(*((*(link_event as *const u64) + 0x8) as *const u64)); deleter(link_event); ret } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); } diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index 082ffc46da..6c4bc44cfc 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -1,13 +1,12 @@ use super::*; use globals::*; -pub unsafe extern "C" fn escape_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); - fighter.status_end_EscapeAir() +pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); + agent.status_end_EscapeAir() } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) - .install(); } diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index fdf943e871..4e9472e97c 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -1,13 +1,12 @@ use super::*; use globals::*; -pub unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); - smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) +pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); + smashline::original_status(End, agent, *FIGHTER_STATUS_KIND_REBIRTH)(agent) } -pub fn install() { +pub fn install(agent: &mut Agent) { smashline::Agent::new("pikmin") .status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) - .install(); } From 5edda6770c41458a8995d558f868ab9048c3e85b Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Fri, 22 Mar 2024 22:25:14 -0400 Subject: [PATCH 068/172] Olimar 2.0 (i learned some new tricks) --- fighters/ike/src/acmd/aerials.rs | 370 ++++++------ fighters/ike/src/acmd/ground.rs | 134 +++-- fighters/ike/src/acmd/mod.rs | 16 +- fighters/ike/src/acmd/other.rs | 280 +++++---- fighters/ike/src/acmd/smashes.rs | 288 +++++----- fighters/ike/src/acmd/specials.rs | 595 ++++++++++---------- fighters/ike/src/acmd/throws.rs | 188 +++---- fighters/ike/src/acmd/tilts.rs | 264 +++++---- fighters/ike/src/lib.rs | 8 +- fighters/ike/src/opff.rs | 6 +- fighters/ike/src/status.rs | 6 +- fighters/ike/src/sword/acmd/mod.rs | 8 + fighters/ike/src/sword/acmd/other.rs | 6 + fighters/ike/src/sword/mod.rs | 9 + fighters/pikmin/src/acmd/aerials.rs | 25 +- fighters/pikmin/src/acmd/ground.rs | 7 +- fighters/pikmin/src/acmd/other.rs | 21 +- fighters/pikmin/src/acmd/smashes.rs | 2 +- fighters/pikmin/src/acmd/specials.rs | 21 +- fighters/pikmin/src/acmd/throws.rs | 2 +- fighters/pikmin/src/acmd/tilts.rs | 7 +- fighters/pikmin/src/opff.rs | 3 +- fighters/pikmin/src/pikmin/acmd/aerials.rs | 61 +- fighters/pikmin/src/pikmin/acmd/other.rs | 2 +- fighters/pikmin/src/pikmin/acmd/smashes.rs | 31 +- fighters/pikmin/src/pikmin/acmd/specials.rs | 43 +- fighters/pikmin/src/pikmin/acmd/throws.rs | 43 +- fighters/pikmin/src/pikmin/mod.rs | 4 +- fighters/pikmin/src/pikmin/status.rs | 11 +- fighters/pikmin/src/status.rs | 6 +- fighters/pikmin/src/status/attack_air.rs | 3 +- fighters/pikmin/src/status/escape_air.rs | 3 +- fighters/pikmin/src/status/rebirth.rs | 3 +- 33 files changed, 1230 insertions(+), 1246 deletions(-) create mode 100644 fighters/ike/src/sword/acmd/mod.rs create mode 100644 fighters/ike/src/sword/acmd/other.rs create mode 100644 fighters/ike/src/sword/mod.rs diff --git a/fighters/ike/src/acmd/aerials.rs b/fighters/ike/src/acmd/aerials.rs index 46f3c9cf67..16cd0dce81 100644 --- a/fighters/ike/src/acmd/aerials.rs +++ b/fighters/ike/src/acmd/aerials.rs @@ -1,354 +1,352 @@ use super::*; -unsafe extern "C" fn ike_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.0)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 20.0/(50.0-20.0)); + FT_MOTION_RATE(agent, 20.0/(50.0-20.0)); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn ike_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(8.0-1.0)); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(8.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(9.5-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(9.5-8.0)); } frame(lua_state, 9.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.2-9.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.2-9.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(45.0-20.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(45.0-20.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn ike_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn ike_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(7.1-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(7.1-4.0)); } frame(lua_state, 7.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-7.1)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-7.1)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(11.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(11.0-10.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/(40.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/(40.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 5.0/(46.0-31.0)); + FT_MOTION_RATE(agent, 5.0/(46.0-31.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 10); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 10); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), true, true); } } -unsafe extern "C" fn ike_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attackairn", ike_attack_air_n_game) - .acmd("effect_attackairn", ike_attack_air_n_effect) - .acmd("expression_attackairn", ike_attack_air_n_expression) - .acmd("game_attackairf", ike_attack_air_f_game) - .acmd("effect_attackairf", ike_attack_air_f_effect) - .acmd("expression_attackairf", ike_attack_air_f_expression) - .acmd("game_attackairb", ike_attack_air_b_game) - .acmd("game_attackairhi", ike_attack_air_hi_game) - .acmd("expression_attackairhi", ike_attack_air_hi_expression) - .acmd("game_attackairlw", ike_attack_air_lw_game) - .acmd("effect_attackairlw", ike_attack_air_lw_effect) - .acmd("effect_landingairlw", ike_landing_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/ike/src/acmd/ground.rs b/fighters/ike/src/acmd/ground.rs index 9bf47da25d..c6023df207 100644 --- a/fighters/ike/src/acmd/ground.rs +++ b/fighters/ike/src/acmd/ground.rs @@ -1,131 +1,129 @@ use super::*; -unsafe extern "C" fn ike_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn ike_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn ike_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attack11", ike_attack_11_game) - .acmd("game_attack12", ike_attack_12_game) - .acmd("game_attack13", ike_attack_13_game) - .acmd("game_attackdash", ike_attack_dash_game) - .acmd("expression_attackdash", ike_attack_dash_expression) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); +} \ No newline at end of file diff --git a/fighters/ike/src/acmd/mod.rs b/fighters/ike/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/ike/src/acmd/mod.rs +++ b/fighters/ike/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 7f5707d23e..453c2eed2f 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -1,335 +1,329 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_right_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_right_s")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_left_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_left_s")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn ike_appeal_lw_l_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_r_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); - if is_excute(fighter) { +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, Hash40::new("appeal_lw"), false, 0.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_sword_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_sword_appeal_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT(fighter, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("ike_sword") - .acmd("game_appeallw", ike_sword_appeal_lw_game) - .acmd("effect_appeallw", ike_sword_appeal_lw_effect) - .install(); - smashline::Agent::new("ike") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appeallwl", ike_appeal_lw_l_sound) - .acmd("sound_appeallwr", ike_appeal_lw_r_sound) - .acmd("game_appeallwl", ike_appeal_lw_game) - .acmd("game_appeallwr", ike_appeal_lw_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appeallwl", sound_appeallwl); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ike/src/acmd/smashes.rs b/fighters/ike/src/acmd/smashes.rs index a9a1ebcc53..96a4baf76c 100644 --- a/fighters/ike/src/acmd/smashes.rs +++ b/fighters/ike/src/acmd/smashes.rs @@ -1,273 +1,271 @@ use super::*; -unsafe extern "C" fn ike_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(84.0-54.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(84.0-54.0)); } frame(lua_state, 84.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -unsafe extern "C" fn ike_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -unsafe extern "C" fn ike_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0/(71.0-37.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0/(71.0-37.0)); AttackModule::clear_all(boma); } frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 31.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 46.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks4", ike_attack_s4_s_game) - .acmd("effect_attacks4", ike_attack_s4_s_effect) - .acmd("game_attackhi4", ike_attack_hi4_game) - .acmd("effect_attackhi4", ike_attack_hi4_effect) - .acmd("game_attacklw4", ike_attack_lw4_game) - .acmd("effect_attacklw4", ike_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ike/src/acmd/specials.rs b/fighters/ike/src/acmd/specials.rs index eac0ec26d2..93827f421e 100644 --- a/fighters/ike/src/acmd/specials.rs +++ b/fighters/ike/src/acmd/specials.rs @@ -1,260 +1,260 @@ use super::*; -unsafe extern "C" fn ike_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_s_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); +unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); } -unsafe extern "C" fn ike_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } } -unsafe extern "C" fn ike_special_s_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 5.0); for _ in 0..3{ - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } } -unsafe extern "C" fn ike_special_s_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal02")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal02")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_special_s01")); + PLAY_SE(agent, Hash40::new("vc_ike_special_s01")); } } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_special_s02")); } } -unsafe extern "C" fn ike_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); } } -unsafe extern "C" fn ike_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // Instakill if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); //ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 7.0, 10.0, Some(0.0), Some(5.0), Some(-10.0), 5.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.05); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.05); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } } // Normal Quickdraw else { frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); /* let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector @@ -263,342 +263,337 @@ unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { } } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_special_air_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); //LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); } } -unsafe extern "C" fn ike_special_s_attack_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, 0, 3, 130, 300, 1, 0, 12, 24, 24); +unsafe extern "C" fn expression_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, 0, 3, 130, 300, 1, 0, 12, 24, 24); crate::sv_animcmd::AREA_WIND_2ND(lua_state); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slash_critical"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slash_critical"), 0); } } frame(lua_state, 1.3); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn ike_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector ColorBlendModule::set_main_color(boma, /* Brightness */ &cbm_vec1, /* Diffuse */ &cbm_vec2, 0.0, 0.0, /*Fadein time*/ 15, /* Display Color */ true); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); for _ in 0..2{ - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_END_NO_LANDING); } } -unsafe extern "C" fn ike_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.82); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.82); } -unsafe extern "C" fn ike_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ike_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn ike_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ika_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn ike_special_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_specialhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_specialnend", ike_special_n_end_game) - .acmd("game_specialairnend", ike_special_air_n_end_game) - .acmd("game_specialsstart", ike_special_s_start_game) - .acmd("game_specialairsstart", ike_special_air_s_start_game) - .acmd("effect_specialshold", ike_special_s_hold_effect) - .acmd("game_specialsdash", ike_special_s_dash_game) - .acmd("effect_specialsdash", ike_special_s_dash_effect) - .acmd("sound_specialsdash", ike_special_s_dash_sound) - .acmd("game_specialairsdash", ike_special_air_s_dash_game) - .acmd("game_specialsattack", ike_special_s_attack_game) - .acmd("effect_specialsattack", ike_special_s_attack_effect) - .acmd("game_specialairsattack", ike_special_air_s_attack_game) - .acmd("effect_specialairsattack", ike_special_air_s_attack_effect) - .acmd("expression_specialsattack", ike_special_s_attack_expression) - .acmd( - "expression_specialairsattack", - ike_special_s_attack_expression, - ) - .acmd("effect_specialsend", ike_special_s_end_effect) - .acmd("game_specialairsend", ike_special_air_s_end_game) - .acmd("game_specialhi1", ike_special_hi1_game) - .acmd("game_specialhi2", ike_special_hi2_game) - .acmd("game_specialairhi2", ike_special_hi2_game) - .acmd("game_specialhi3", ike_special_hi3_game) - .acmd("game_specialairhi2", ike_special_air_hi2_game) - .acmd("game_specialhi3", ika_special_hi3_game) - .acmd("game_specialairhi3", ika_special_hi3_game) - .acmd("game_specialhi4", ike_special_hi4_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("effect_specialsdash", effect_specialsdash); + agent.acmd("sound_specialsdash", sound_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("effect_specialairsattack", effect_specialairsattack); + agent.acmd("expression_specialsattack", expression_specialsattack); + agent.acmd("expression_specialairsattack", expression_specialairsattack); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialairhi3); + agent.acmd("game_specialhi4", game_specialhi4); } diff --git a/fighters/ike/src/acmd/throws.rs b/fighters/ike/src/acmd/throws.rs index e968961f59..b02f176d6f 100644 --- a/fighters/ike/src/acmd/throws.rs +++ b/fighters/ike/src/acmd/throws.rs @@ -1,199 +1,197 @@ use super::*; -unsafe extern "C" fn ike_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ike_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ike_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 26, 16); + CHECK_FINISH_CAMERA(agent, 26, 16); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 15, 7); + CHECK_FINISH_CAMERA(agent, 15, 7); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.1); } frame(lua_state, 22.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(44.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(44.0-25.0)); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 12, 17); + CHECK_FINISH_CAMERA(agent, 12, 17); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 0); + CHECK_FINISH_CAMERA(agent, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_catch", ike_catch_game) - .acmd("game_catchdash", ike_catch_dash_game) - .acmd("game_catchturn", ike_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ike/src/acmd/tilts.rs b/fighters/ike/src/acmd/tilts.rs index 0b66ff6cfa..ff5148bb06 100644 --- a/fighters/ike/src/acmd/tilts.rs +++ b/fighters/ike/src/acmd/tilts.rs @@ -1,234 +1,232 @@ use super::*; -unsafe extern "C" fn ike_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(34.0-31.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(34.0-31.0)); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(3.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(3.5-1.0)); } frame(lua_state, 3.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-3.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-3.5)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Ground-only */ ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Air-only */ ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-6.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Ground-only */ ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Air-only */ ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 11.0/(27.0-11.0)); + FT_MOTION_RATE(agent, 11.0/(27.0-11.0)); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks3hi", ike_attack_s3_hi_game) - .acmd("game_attacks3", ike_attack_s3_s_game) - .acmd("game_attacks3lw", ike_attack_s3_lw_game) - .acmd("expression_attacks3hi", ike_attack_s3_expression) - .acmd("expression_attacks3", ike_attack_s3_expression) - .acmd("expression_attacks3lw", ike_attack_s3_expression) - .acmd("game_attackhi3", ike_attack_hi3_game) - .acmd("game_attacklw3", ike_attack_lw3_game) - .acmd("expression_attacklw3", ike_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/ike/src/lib.rs b/fighters/ike/src/lib.rs index 8e2ddcc726..b92243f55c 100644 --- a/fighters/ike/src/lib.rs +++ b/fighters/ike/src/lib.rs @@ -38,8 +38,8 @@ use utils::{ }; use smashline::*; -pub fn install() { - acmd::install(); - opff::install(); - status::install(); +pub fn install(agent: &mut Agent) { + acmd::install(agent); + opff::install(agent); + status::install(agent); } diff --git a/fighters/ike/src/opff.rs b/fighters/ike/src/opff.rs index 0d8f3ec019..c250573ef5 100644 --- a/fighters/ike/src/opff.rs +++ b/fighters/ike/src/opff.rs @@ -458,8 +458,6 @@ pub unsafe fn ike_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ike") - .on_line(Main, ike_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ike_frame_wrapper); } diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status.rs index 185ddfba96..8a5cedd5a1 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status.rs @@ -49,9 +49,7 @@ unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("ike") - .on_start(ike_init) +pub fn install(agent: &mut Agent) { + agent.on_start(ike_init) .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end) - .install(); } diff --git a/fighters/ike/src/sword/acmd/mod.rs b/fighters/ike/src/sword/acmd/mod.rs new file mode 100644 index 0000000000..f9d06fb11d --- /dev/null +++ b/fighters/ike/src/sword/acmd/mod.rs @@ -0,0 +1,8 @@ + +use super::*; + +mod other; + +pub fn install(agent: &mut Agent) { + other::install(agent); +} diff --git a/fighters/ike/src/sword/acmd/other.rs b/fighters/ike/src/sword/acmd/other.rs new file mode 100644 index 0000000000..ee87670f6e --- /dev/null +++ b/fighters/ike/src/sword/acmd/other.rs @@ -0,0 +1,6 @@ +use super::*; + +pub fn install(agent: &mut Agent) { + agent.acmd("game_appeallw", ike_sword_appeal_lw_game); + agent.acmd("effect_appeallw", ike_sword_appeal_lw_effect); +} \ No newline at end of file diff --git a/fighters/ike/src/sword/mod.rs b/fighters/ike/src/sword/mod.rs new file mode 100644 index 0000000000..60629a8fdf --- /dev/null +++ b/fighters/ike/src/sword/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ike_sword"); + acmd::install(agent); + agent.install(); +} diff --git a/fighters/pikmin/src/acmd/aerials.rs b/fighters/pikmin/src/acmd/aerials.rs index ca450f3b7c..ecb56af493 100644 --- a/fighters/pikmin/src/acmd/aerials.rs +++ b/fighters/pikmin/src/acmd/aerials.rs @@ -217,7 +217,7 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -310,16 +310,15 @@ unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attackairf", olimar_attack_air_f_game) - .acmd("expression_attackairf", olimar_attack_air_f_expression) - .acmd("game_attackairhi", olimar_attack_air_hi_game) - .acmd("expression_attackairhi", olimar_attack_air_hi_expression) - .acmd("game_attackairlw", olimar_attack_air_lw_game) - .acmd("game_attackairb", olimar_attack_air_b_game) - .acmd("expression_attackairb", olimar_attack_air_b_expression) - .acmd("game_attackairn", olimar_attack_air_n_game) - .acmd("effect_attackairn", effect_attackairn) - .acmd("sound_attackairn", sound_attackairn) - .acmd("expression_attackairn", expression_attackairn) + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); } diff --git a/fighters/pikmin/src/acmd/ground.rs b/fighters/pikmin/src/acmd/ground.rs index 90755050bc..e8da77ea1b 100644 --- a/fighters/pikmin/src/acmd/ground.rs +++ b/fighters/pikmin/src/acmd/ground.rs @@ -58,8 +58,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attack11", pikmin_attack_11_game) - .acmd("game_attack12", pikmin_attack_12_game) - .acmd("game_attackdash", pikmin_attack_dash_game) + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index 93734e7661..6fa6d6abab 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -194,15 +194,14 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pikmin/src/acmd/smashes.rs b/fighters/pikmin/src/acmd/smashes.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/pikmin/src/acmd/smashes.rs +++ b/fighters/pikmin/src/acmd/smashes.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index 42850ccdec..ed9058d4ca 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -66,14 +66,13 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_specials", pikmin_special_s) - .acmd("game_specialairs", pikmin_special_s) - .acmd("game_specialnstart", pikmin_special_n) - .acmd("game_specialnfailure", pikmin_special_n_failure) - .acmd("game_specialairnfailure", pikmin_special_n_failure) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("effect_speciallw", effect_speciallw) - .acmd("effect_specialairlw", effect_speciallw) -} + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnfailure", game_specialnfailure); + agent.acmd("game_specialairnfailure", game_specialairnfailure); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); +} \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/throws.rs b/fighters/pikmin/src/acmd/throws.rs index b46e3acdb5..3370df1a53 100644 --- a/fighters/pikmin/src/acmd/throws.rs +++ b/fighters/pikmin/src/acmd/throws.rs @@ -1,3 +1,3 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 12e40a64b0..252ca38185 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -70,8 +70,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attacks3", pikmin_attack_s3_s_game) - .acmd("game_attacklw3", pikmin_attack_lw3_game) - .acmd("game_attackhi3", pikmin_attack_hi3_game) + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attackhi3", game_attackhi3); } diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 1ef7551544..81ea209e34 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -170,6 +170,5 @@ pub unsafe fn pikmin_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { } } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .on_line(Main, pikmin_frame_wrapper) + agent.on_line(Main, pikmin_frame_wrapper); } diff --git a/fighters/pikmin/src/pikmin/acmd/aerials.rs b/fighters/pikmin/src/pikmin/acmd/aerials.rs index 453be7f91e..b0e83af3f1 100644 --- a/fighters/pikmin/src/pikmin/acmd/aerials.rs +++ b/fighters/pikmin/src/pikmin/acmd/aerials.rs @@ -168,35 +168,34 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairn_y", game_attackairn) - .acmd("game_attackairn_b", game_attackairn) - .acmd("game_attackairn_w", game_attackairn) - .acmd("game_attackairn_v", game_attackairn) - .acmd("effect_attackairn", effect_attackairn) - .acmd("effect_attackairn_y", effect_attackairn) - .acmd("effect_attackairn_b", effect_attackairn) - .acmd("effect_attackairn_w", effect_attackairn) - .acmd("effect_attackairn_v", effect_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairf_y", game_attackairf) - .acmd("game_attackairf_b", game_attackairf) - .acmd("game_attackairf_w", game_attackairf) - .acmd("game_attackairf_v", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("game_attackairb_y", game_attackairb) - .acmd("game_attackairb_b", game_attackairb) - .acmd("game_attackairb_w", game_attackairb) - .acmd("game_attackairb_v", game_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairhi_y", game_attackairhi) - .acmd("game_attackairhi_b", game_attackairhi) - .acmd("game_attackairhi_w", game_attackairhi) - .acmd("game_attackairhi_v", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_attackairlw_y", game_attackairlw) - .acmd("game_attackairlw_b", game_attackairlw) - .acmd("game_attackairlw_w", game_attackairlw) - .acmd("game_attackairlw_v", game_attackairlw) + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairn_y", game_attackairn); + agent.acmd("game_attackairn_b", game_attackairn); + agent.acmd("game_attackairn_w", game_attackairn); + agent.acmd("game_attackairn_v", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("effect_attackairn_y", effect_attackairn); + agent.acmd("effect_attackairn_b", effect_attackairn); + agent.acmd("effect_attackairn_w", effect_attackairn); + agent.acmd("effect_attackairn_v", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf_y", game_attackairf); + agent.acmd("game_attackairf_b", game_attackairf); + agent.acmd("game_attackairf_w", game_attackairf); + agent.acmd("game_attackairf_v", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairb_y", game_attackairb); + agent.acmd("game_attackairb_b", game_attackairb); + agent.acmd("game_attackairb_w", game_attackairb); + agent.acmd("game_attackairb_v", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairhi_y", game_attackairhi); + agent.acmd("game_attackairhi_b", game_attackairhi); + agent.acmd("game_attackairhi_w", game_attackairhi); + agent.acmd("game_attackairhi_v", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw_y", game_attackairlw); + agent.acmd("game_attackairlw_b", game_attackairlw); + agent.acmd("game_attackairlw_w", game_attackairlw); + agent.acmd("game_attackairlw_v", game_attackairlw); } diff --git a/fighters/pikmin/src/pikmin/acmd/other.rs b/fighters/pikmin/src/pikmin/acmd/other.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/pikmin/src/pikmin/acmd/other.rs +++ b/fighters/pikmin/src/pikmin/acmd/other.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/pikmin/acmd/smashes.rs b/fighters/pikmin/src/pikmin/acmd/smashes.rs index e35e819e88..2982d75526 100644 --- a/fighters/pikmin/src/pikmin/acmd/smashes.rs +++ b/fighters/pikmin/src/pikmin/acmd/smashes.rs @@ -82,20 +82,19 @@ unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attackhi4_b", game_attackhi4) - .acmd("game_attackhi4_v", game_attackhi4) - .acmd("game_attackhi4_w", game_attackhi4) - .acmd("game_attackhi4_y", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("game_attacklw4_b", game_attacklw4) - .acmd("game_attacklw4_v", game_attacklw4) - .acmd("game_attacklw4_w", game_attacklw4) - .acmd("game_attacklw4_y", game_attacklw4) - .acmd("game_attacks4sjump", game_attacks4sjump) - .acmd("game_attacks4sjump_b", game_attacks4sjump) - .acmd("game_attacks4sjump_v", game_attacks4sjump) - .acmd("game_attacks4sjump_w", game_attacks4sjump) - .acmd("game_attacks4sjump_y", game_attacks4sjump) + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4_b", game_attackhi4); + agent.acmd("game_attackhi4_v", game_attackhi4); + agent.acmd("game_attackhi4_w", game_attackhi4); + agent.acmd("game_attackhi4_y", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacklw4_b", game_attacklw4); + agent.acmd("game_attacklw4_v", game_attacklw4); + agent.acmd("game_attacklw4_w", game_attacklw4); + agent.acmd("game_attacklw4_y", game_attacklw4); + agent.acmd("game_attacks4sjump", game_attacks4sjump); + agent.acmd("game_attacks4sjump_b", game_attacks4sjump); + agent.acmd("game_attacks4sjump_v", game_attacks4sjump); + agent.acmd("game_attacks4sjump_w", game_attacks4sjump); + agent.acmd("game_attacks4sjump_y", game_attacks4sjump); } diff --git a/fighters/pikmin/src/pikmin/acmd/specials.rs b/fighters/pikmin/src/pikmin/acmd/specials.rs index a25139d8e1..54cd67bd40 100644 --- a/fighters/pikmin/src/pikmin/acmd/specials.rs +++ b/fighters/pikmin/src/pikmin/acmd/specials.rs @@ -149,25 +149,24 @@ unsafe extern "C" fn game_spsthrown_y(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_spsremved", game_spsremved) - .acmd("game_spsremved_b", game_spsremved) - .acmd("game_spsremved_v", game_spsremved) - .acmd("game_spsremved_w", game_spsremved) - .acmd("game_spsremved_y", game_spsremved) - .acmd("game_splwairrespond", game_spsremved) - .acmd("game_splwairrespond_b", game_spsremved) - .acmd("game_splwairrespond_v", game_spsremved) - .acmd("game_splwairrespond_w", game_spsremved) - .acmd("game_splwairrespond_y", game_spsremved) - .acmd("game_spntakenoutstart", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_y", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_b", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_w", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_v", pikmin_special_n_pikmin) - .acmd("game_spsthrown", game_spsthrown) - .acmd("game_spsthrown_b", game_spsthrown_b) - .acmd("game_spsthrown_v", game_spsthrown_v) - .acmd("game_spsthrown_w", game_spsthrown_w) - .acmd("game_spsthrown_y", game_spsthrown_y) -} +agent.acmd("game_spsremved", game_spsremved); +agent.acmd("game_spsremved_b", game_spsremved); +agent.acmd("game_spsremved_v", game_spsremved); +agent.acmd("game_spsremved_w", game_spsremved); +agent.acmd("game_spsremved_y", game_spsremved); +agent.acmd("game_splwairrespond", game_spsremved); +agent.acmd("game_splwairrespond_b", game_spsremved); +agent.acmd("game_splwairrespond_v", game_spsremved); +agent.acmd("game_splwairrespond_w", game_spsremved); +agent.acmd("game_splwairrespond_y", game_spsremved); +agent.acmd("game_spntakenoutstart", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_y", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_b", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_w", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_v", game_spntakenoutstart); +agent.acmd("game_spsthrown", game_spsthrown); +agent.acmd("game_spsthrown_b", game_spsthrown_b); +agent.acmd("game_spsthrown_v", game_spsthrown_v); +agent.acmd("game_spsthrown_w", game_spsthrown_w); +agent.acmd("game_spsthrown_y", game_spsthrown_y); +} \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/throws.rs b/fighters/pikmin/src/pikmin/acmd/throws.rs index 0bb15c4ab4..989e528ba2 100644 --- a/fighters/pikmin/src/pikmin/acmd/throws.rs +++ b/fighters/pikmin/src/pikmin/acmd/throws.rs @@ -102,26 +102,25 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_throwb", game_throwb) - .acmd("game_throwb_b", game_throwb) - .acmd("game_throwb_v", game_throwb) - .acmd("game_throwb_w", game_throwb) - .acmd("game_throwb_y", game_throwb) - .acmd("game_throwf", game_throwf) - .acmd("game_throwf_b", game_throwf) - .acmd("game_throwf_v", game_throwf) - .acmd("game_throwf_w", game_throwf) - .acmd("game_throwf_y", game_throwf) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwhi_b", game_throwhi) - .acmd("game_throwhi_v", game_throwhi) - .acmd("game_throwhi_w", game_throwhi) - .acmd("game_throwhi_y", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwlw_b", game_throwlw) - .acmd("game_throwlw_v", game_throwlw) - .acmd("game_throwlw_w", game_throwlw) - .acmd("game_throwlw_y", game_throwlw) +pub fn install(agent: &mut Agent) {; + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwb_b", game_throwb); + agent.acmd("game_throwb_v", game_throwb); + agent.acmd("game_throwb_w", game_throwb); + agent.acmd("game_throwb_y", game_throwb); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwf_b", game_throwf); + agent.acmd("game_throwf_v", game_throwf); + agent.acmd("game_throwf_w", game_throwf); + agent.acmd("game_throwf_y", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwhi_b", game_throwhi); + agent.acmd("game_throwhi_v", game_throwhi); + agent.acmd("game_throwhi_w", game_throwhi); + agent.acmd("game_throwhi_y", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwlw_b", game_throwlw); + agent.acmd("game_throwlw_v", game_throwlw); + agent.acmd("game_throwlw_w", game_throwlw); + agent.acmd("game_throwlw_y", game_throwlw); } diff --git a/fighters/pikmin/src/pikmin/mod.rs b/fighters/pikmin/src/pikmin/mod.rs index 0535c9183d..c902c3467d 100644 --- a/fighters/pikmin/src/pikmin/mod.rs +++ b/fighters/pikmin/src/pikmin/mod.rs @@ -78,6 +78,6 @@ impl From for PikminInfo { } pub fn install(agent: &mut Agent) { - acmd::install(); - status::install(); + acmd::install(agent); + status::install(agent); } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index 25d8854ea6..da9e1b18c9 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -87,16 +87,15 @@ pub unsafe extern "C" fn special_s_cling_remove_end(agent: &mut L2CFighterCommon smashline::original_status(End, agent, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(agent) } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .status( +pub fn install(agent: &mut Agent) { + agent.status( Main, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, special_s_cling_main, - ) - .status( + ); + agent.status( End, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, special_s_cling_remove_end, - ) + ); } diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status.rs index 558140eb7e..adf9d1fa76 100644 --- a/fighters/pikmin/src/status.rs +++ b/fighters/pikmin/src/status.rs @@ -4,7 +4,7 @@ mod attack_air; mod rebirth; pub fn install(agent: &mut Agent) { - escape_air::install(); - attack_air::install(); - rebirth::install(); + escape_air::install(agent); + attack_air::install(agent); + rebirth::install(agent); } diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 2697745b0e..e64440a492 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -164,6 +164,5 @@ unsafe extern "C" fn link_event_store_l2c_table(agent: &mut L2CFighterCommon, li ret } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) } diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index 6c4bc44cfc..ffb9ca3cf3 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -7,6 +7,5 @@ pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) } diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index 4e9472e97c..b932ed6140 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -7,6 +7,5 @@ pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) } From 0602510d22bcf7cb257559c8cb6954b83db3933c Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Fri, 22 Mar 2024 23:17:26 -0400 Subject: [PATCH 069/172] Olimar 2.0 (i learned some new tricks) --- fighters/pikmin/src/acmd/aerials.rs | 25 ++++----- fighters/pikmin/src/acmd/ground.rs | 7 +-- fighters/pikmin/src/acmd/other.rs | 21 ++++--- fighters/pikmin/src/acmd/smashes.rs | 2 +- fighters/pikmin/src/acmd/specials.rs | 21 ++++--- fighters/pikmin/src/acmd/throws.rs | 2 +- fighters/pikmin/src/acmd/tilts.rs | 7 +-- fighters/pikmin/src/opff.rs | 3 +- fighters/pikmin/src/pikmin/acmd/aerials.rs | 61 ++++++++++----------- fighters/pikmin/src/pikmin/acmd/other.rs | 2 +- fighters/pikmin/src/pikmin/acmd/smashes.rs | 31 +++++------ fighters/pikmin/src/pikmin/acmd/specials.rs | 43 +++++++-------- fighters/pikmin/src/pikmin/acmd/throws.rs | 43 +++++++-------- fighters/pikmin/src/pikmin/mod.rs | 4 +- fighters/pikmin/src/pikmin/status.rs | 11 ++-- fighters/pikmin/src/status.rs | 6 +- fighters/pikmin/src/status/attack_air.rs | 3 +- fighters/pikmin/src/status/escape_air.rs | 3 +- fighters/pikmin/src/status/rebirth.rs | 3 +- 19 files changed, 142 insertions(+), 156 deletions(-) diff --git a/fighters/pikmin/src/acmd/aerials.rs b/fighters/pikmin/src/acmd/aerials.rs index ca450f3b7c..ecb56af493 100644 --- a/fighters/pikmin/src/acmd/aerials.rs +++ b/fighters/pikmin/src/acmd/aerials.rs @@ -217,7 +217,7 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -310,16 +310,15 @@ unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attackairf", olimar_attack_air_f_game) - .acmd("expression_attackairf", olimar_attack_air_f_expression) - .acmd("game_attackairhi", olimar_attack_air_hi_game) - .acmd("expression_attackairhi", olimar_attack_air_hi_expression) - .acmd("game_attackairlw", olimar_attack_air_lw_game) - .acmd("game_attackairb", olimar_attack_air_b_game) - .acmd("expression_attackairb", olimar_attack_air_b_expression) - .acmd("game_attackairn", olimar_attack_air_n_game) - .acmd("effect_attackairn", effect_attackairn) - .acmd("sound_attackairn", sound_attackairn) - .acmd("expression_attackairn", expression_attackairn) + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); } diff --git a/fighters/pikmin/src/acmd/ground.rs b/fighters/pikmin/src/acmd/ground.rs index 90755050bc..e8da77ea1b 100644 --- a/fighters/pikmin/src/acmd/ground.rs +++ b/fighters/pikmin/src/acmd/ground.rs @@ -58,8 +58,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attack11", pikmin_attack_11_game) - .acmd("game_attack12", pikmin_attack_12_game) - .acmd("game_attackdash", pikmin_attack_dash_game) + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index 93734e7661..6fa6d6abab 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -194,15 +194,14 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pikmin/src/acmd/smashes.rs b/fighters/pikmin/src/acmd/smashes.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/pikmin/src/acmd/smashes.rs +++ b/fighters/pikmin/src/acmd/smashes.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index 42850ccdec..ed9058d4ca 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -66,14 +66,13 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_specials", pikmin_special_s) - .acmd("game_specialairs", pikmin_special_s) - .acmd("game_specialnstart", pikmin_special_n) - .acmd("game_specialnfailure", pikmin_special_n_failure) - .acmd("game_specialairnfailure", pikmin_special_n_failure) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("effect_speciallw", effect_speciallw) - .acmd("effect_specialairlw", effect_speciallw) -} + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnfailure", game_specialnfailure); + agent.acmd("game_specialairnfailure", game_specialairnfailure); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); +} \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/throws.rs b/fighters/pikmin/src/acmd/throws.rs index b46e3acdb5..3370df1a53 100644 --- a/fighters/pikmin/src/acmd/throws.rs +++ b/fighters/pikmin/src/acmd/throws.rs @@ -1,3 +1,3 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 12e40a64b0..252ca38185 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -70,8 +70,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .acmd("game_attacks3", pikmin_attack_s3_s_game) - .acmd("game_attacklw3", pikmin_attack_lw3_game) - .acmd("game_attackhi3", pikmin_attack_hi3_game) + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attackhi3", game_attackhi3); } diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 1ef7551544..81ea209e34 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -170,6 +170,5 @@ pub unsafe fn pikmin_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { } } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .on_line(Main, pikmin_frame_wrapper) + agent.on_line(Main, pikmin_frame_wrapper); } diff --git a/fighters/pikmin/src/pikmin/acmd/aerials.rs b/fighters/pikmin/src/pikmin/acmd/aerials.rs index 453be7f91e..b0e83af3f1 100644 --- a/fighters/pikmin/src/pikmin/acmd/aerials.rs +++ b/fighters/pikmin/src/pikmin/acmd/aerials.rs @@ -168,35 +168,34 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairn_y", game_attackairn) - .acmd("game_attackairn_b", game_attackairn) - .acmd("game_attackairn_w", game_attackairn) - .acmd("game_attackairn_v", game_attackairn) - .acmd("effect_attackairn", effect_attackairn) - .acmd("effect_attackairn_y", effect_attackairn) - .acmd("effect_attackairn_b", effect_attackairn) - .acmd("effect_attackairn_w", effect_attackairn) - .acmd("effect_attackairn_v", effect_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairf_y", game_attackairf) - .acmd("game_attackairf_b", game_attackairf) - .acmd("game_attackairf_w", game_attackairf) - .acmd("game_attackairf_v", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("game_attackairb_y", game_attackairb) - .acmd("game_attackairb_b", game_attackairb) - .acmd("game_attackairb_w", game_attackairb) - .acmd("game_attackairb_v", game_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("game_attackairhi_y", game_attackairhi) - .acmd("game_attackairhi_b", game_attackairhi) - .acmd("game_attackairhi_w", game_attackairhi) - .acmd("game_attackairhi_v", game_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .acmd("game_attackairlw_y", game_attackairlw) - .acmd("game_attackairlw_b", game_attackairlw) - .acmd("game_attackairlw_w", game_attackairlw) - .acmd("game_attackairlw_v", game_attackairlw) + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairn_y", game_attackairn); + agent.acmd("game_attackairn_b", game_attackairn); + agent.acmd("game_attackairn_w", game_attackairn); + agent.acmd("game_attackairn_v", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("effect_attackairn_y", effect_attackairn); + agent.acmd("effect_attackairn_b", effect_attackairn); + agent.acmd("effect_attackairn_w", effect_attackairn); + agent.acmd("effect_attackairn_v", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf_y", game_attackairf); + agent.acmd("game_attackairf_b", game_attackairf); + agent.acmd("game_attackairf_w", game_attackairf); + agent.acmd("game_attackairf_v", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairb_y", game_attackairb); + agent.acmd("game_attackairb_b", game_attackairb); + agent.acmd("game_attackairb_w", game_attackairb); + agent.acmd("game_attackairb_v", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairhi_y", game_attackairhi); + agent.acmd("game_attackairhi_b", game_attackairhi); + agent.acmd("game_attackairhi_w", game_attackairhi); + agent.acmd("game_attackairhi_v", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw_y", game_attackairlw); + agent.acmd("game_attackairlw_b", game_attackairlw); + agent.acmd("game_attackairlw_w", game_attackairlw); + agent.acmd("game_attackairlw_v", game_attackairlw); } diff --git a/fighters/pikmin/src/pikmin/acmd/other.rs b/fighters/pikmin/src/pikmin/acmd/other.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/pikmin/src/pikmin/acmd/other.rs +++ b/fighters/pikmin/src/pikmin/acmd/other.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/pikmin/acmd/smashes.rs b/fighters/pikmin/src/pikmin/acmd/smashes.rs index e35e819e88..2982d75526 100644 --- a/fighters/pikmin/src/pikmin/acmd/smashes.rs +++ b/fighters/pikmin/src/pikmin/acmd/smashes.rs @@ -82,20 +82,19 @@ unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attackhi4_b", game_attackhi4) - .acmd("game_attackhi4_v", game_attackhi4) - .acmd("game_attackhi4_w", game_attackhi4) - .acmd("game_attackhi4_y", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("game_attacklw4_b", game_attacklw4) - .acmd("game_attacklw4_v", game_attacklw4) - .acmd("game_attacklw4_w", game_attacklw4) - .acmd("game_attacklw4_y", game_attacklw4) - .acmd("game_attacks4sjump", game_attacks4sjump) - .acmd("game_attacks4sjump_b", game_attacks4sjump) - .acmd("game_attacks4sjump_v", game_attacks4sjump) - .acmd("game_attacks4sjump_w", game_attacks4sjump) - .acmd("game_attacks4sjump_y", game_attacks4sjump) + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4_b", game_attackhi4); + agent.acmd("game_attackhi4_v", game_attackhi4); + agent.acmd("game_attackhi4_w", game_attackhi4); + agent.acmd("game_attackhi4_y", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacklw4_b", game_attacklw4); + agent.acmd("game_attacklw4_v", game_attacklw4); + agent.acmd("game_attacklw4_w", game_attacklw4); + agent.acmd("game_attacklw4_y", game_attacklw4); + agent.acmd("game_attacks4sjump", game_attacks4sjump); + agent.acmd("game_attacks4sjump_b", game_attacks4sjump); + agent.acmd("game_attacks4sjump_v", game_attacks4sjump); + agent.acmd("game_attacks4sjump_w", game_attacks4sjump); + agent.acmd("game_attacks4sjump_y", game_attacks4sjump); } diff --git a/fighters/pikmin/src/pikmin/acmd/specials.rs b/fighters/pikmin/src/pikmin/acmd/specials.rs index a25139d8e1..54cd67bd40 100644 --- a/fighters/pikmin/src/pikmin/acmd/specials.rs +++ b/fighters/pikmin/src/pikmin/acmd/specials.rs @@ -149,25 +149,24 @@ unsafe extern "C" fn game_spsthrown_y(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_spsremved", game_spsremved) - .acmd("game_spsremved_b", game_spsremved) - .acmd("game_spsremved_v", game_spsremved) - .acmd("game_spsremved_w", game_spsremved) - .acmd("game_spsremved_y", game_spsremved) - .acmd("game_splwairrespond", game_spsremved) - .acmd("game_splwairrespond_b", game_spsremved) - .acmd("game_splwairrespond_v", game_spsremved) - .acmd("game_splwairrespond_w", game_spsremved) - .acmd("game_splwairrespond_y", game_spsremved) - .acmd("game_spntakenoutstart", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_y", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_b", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_w", pikmin_special_n_pikmin) - .acmd("game_spntakenoutstart_v", pikmin_special_n_pikmin) - .acmd("game_spsthrown", game_spsthrown) - .acmd("game_spsthrown_b", game_spsthrown_b) - .acmd("game_spsthrown_v", game_spsthrown_v) - .acmd("game_spsthrown_w", game_spsthrown_w) - .acmd("game_spsthrown_y", game_spsthrown_y) -} +agent.acmd("game_spsremved", game_spsremved); +agent.acmd("game_spsremved_b", game_spsremved); +agent.acmd("game_spsremved_v", game_spsremved); +agent.acmd("game_spsremved_w", game_spsremved); +agent.acmd("game_spsremved_y", game_spsremved); +agent.acmd("game_splwairrespond", game_spsremved); +agent.acmd("game_splwairrespond_b", game_spsremved); +agent.acmd("game_splwairrespond_v", game_spsremved); +agent.acmd("game_splwairrespond_w", game_spsremved); +agent.acmd("game_splwairrespond_y", game_spsremved); +agent.acmd("game_spntakenoutstart", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_y", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_b", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_w", game_spntakenoutstart); +agent.acmd("game_spntakenoutstart_v", game_spntakenoutstart); +agent.acmd("game_spsthrown", game_spsthrown); +agent.acmd("game_spsthrown_b", game_spsthrown_b); +agent.acmd("game_spsthrown_v", game_spsthrown_v); +agent.acmd("game_spsthrown_w", game_spsthrown_w); +agent.acmd("game_spsthrown_y", game_spsthrown_y); +} \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/throws.rs b/fighters/pikmin/src/pikmin/acmd/throws.rs index 0bb15c4ab4..989e528ba2 100644 --- a/fighters/pikmin/src/pikmin/acmd/throws.rs +++ b/fighters/pikmin/src/pikmin/acmd/throws.rs @@ -102,26 +102,25 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin_pikmin") - .acmd("game_throwb", game_throwb) - .acmd("game_throwb_b", game_throwb) - .acmd("game_throwb_v", game_throwb) - .acmd("game_throwb_w", game_throwb) - .acmd("game_throwb_y", game_throwb) - .acmd("game_throwf", game_throwf) - .acmd("game_throwf_b", game_throwf) - .acmd("game_throwf_v", game_throwf) - .acmd("game_throwf_w", game_throwf) - .acmd("game_throwf_y", game_throwf) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwhi_b", game_throwhi) - .acmd("game_throwhi_v", game_throwhi) - .acmd("game_throwhi_w", game_throwhi) - .acmd("game_throwhi_y", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwlw_b", game_throwlw) - .acmd("game_throwlw_v", game_throwlw) - .acmd("game_throwlw_w", game_throwlw) - .acmd("game_throwlw_y", game_throwlw) +pub fn install(agent: &mut Agent) {; + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwb_b", game_throwb); + agent.acmd("game_throwb_v", game_throwb); + agent.acmd("game_throwb_w", game_throwb); + agent.acmd("game_throwb_y", game_throwb); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwf_b", game_throwf); + agent.acmd("game_throwf_v", game_throwf); + agent.acmd("game_throwf_w", game_throwf); + agent.acmd("game_throwf_y", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwhi_b", game_throwhi); + agent.acmd("game_throwhi_v", game_throwhi); + agent.acmd("game_throwhi_w", game_throwhi); + agent.acmd("game_throwhi_y", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwlw_b", game_throwlw); + agent.acmd("game_throwlw_v", game_throwlw); + agent.acmd("game_throwlw_w", game_throwlw); + agent.acmd("game_throwlw_y", game_throwlw); } diff --git a/fighters/pikmin/src/pikmin/mod.rs b/fighters/pikmin/src/pikmin/mod.rs index 0535c9183d..c902c3467d 100644 --- a/fighters/pikmin/src/pikmin/mod.rs +++ b/fighters/pikmin/src/pikmin/mod.rs @@ -78,6 +78,6 @@ impl From for PikminInfo { } pub fn install(agent: &mut Agent) { - acmd::install(); - status::install(); + acmd::install(agent); + status::install(agent); } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index 25d8854ea6..da9e1b18c9 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -87,16 +87,15 @@ pub unsafe extern "C" fn special_s_cling_remove_end(agent: &mut L2CFighterCommon smashline::original_status(End, agent, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(agent) } -pub fn install() { - smashline::Agent::new("pikmin_pikmin") - .status( +pub fn install(agent: &mut Agent) { + agent.status( Main, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, special_s_cling_main, - ) - .status( + ); + agent.status( End, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, special_s_cling_remove_end, - ) + ); } diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status.rs index 558140eb7e..adf9d1fa76 100644 --- a/fighters/pikmin/src/status.rs +++ b/fighters/pikmin/src/status.rs @@ -4,7 +4,7 @@ mod attack_air; mod rebirth; pub fn install(agent: &mut Agent) { - escape_air::install(); - attack_air::install(); - rebirth::install(); + escape_air::install(agent); + attack_air::install(agent); + rebirth::install(agent); } diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 2697745b0e..e64440a492 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -164,6 +164,5 @@ unsafe extern "C" fn link_event_store_l2c_table(agent: &mut L2CFighterCommon, li ret } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) } diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index 6c4bc44cfc..ffb9ca3cf3 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -7,6 +7,5 @@ pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) } diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index 4e9472e97c..b932ed6140 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -7,6 +7,5 @@ pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("pikmin") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) } From 7d9bf7fc97dba0776b4542c2e13287ab2be237f5 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Fri, 22 Mar 2024 23:17:42 -0400 Subject: [PATCH 070/172] ike. --- fighters/ike/src/acmd/aerials.rs | 370 +++++++++-------- fighters/ike/src/acmd/ground.rs | 134 +++--- fighters/ike/src/acmd/mod.rs | 16 +- fighters/ike/src/acmd/other.rs | 280 ++++++------- fighters/ike/src/acmd/smashes.rs | 288 +++++++------ fighters/ike/src/acmd/specials.rs | 595 +++++++++++++-------------- fighters/ike/src/acmd/throws.rs | 188 +++++---- fighters/ike/src/acmd/tilts.rs | 264 ++++++------ fighters/ike/src/lib.rs | 8 +- fighters/ike/src/opff.rs | 6 +- fighters/ike/src/status.rs | 6 +- fighters/ike/src/sword/acmd/mod.rs | 8 + fighters/ike/src/sword/acmd/other.rs | 6 + fighters/ike/src/sword/mod.rs | 9 + 14 files changed, 1088 insertions(+), 1090 deletions(-) create mode 100644 fighters/ike/src/sword/acmd/mod.rs create mode 100644 fighters/ike/src/sword/acmd/other.rs create mode 100644 fighters/ike/src/sword/mod.rs diff --git a/fighters/ike/src/acmd/aerials.rs b/fighters/ike/src/acmd/aerials.rs index 46f3c9cf67..16cd0dce81 100644 --- a/fighters/ike/src/acmd/aerials.rs +++ b/fighters/ike/src/acmd/aerials.rs @@ -1,354 +1,352 @@ use super::*; -unsafe extern "C" fn ike_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.0)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 65, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.0, 65, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 65, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 65, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 10.0, 55, 90, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 55, 90, 0, 40, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 11.0, 55, 90, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 55, 90, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 361, 90, 0, 40, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 20.0/(50.0-20.0)); + FT_MOTION_RATE(agent, 20.0/(50.0-20.0)); } frame(lua_state, 50.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 4, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn ike_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 10.0/(8.0-1.0)); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 10.0/(8.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(9.5-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(9.5-8.0)); } frame(lua_state, 9.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.2-9.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.2-9.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 105, 0, 25, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 105, 0, 25, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 361, 105, 0, 25, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 35, 105, 0, 20, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(45.0-20.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(45.0-20.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn ike_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn ike_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(7.1-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(7.1-4.0)); } frame(lua_state, 7.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-7.1)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-7.1)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 361, 100, 0, 30, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 15.0, 361, 100, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 17.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 361, 100, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 35, 100, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(11.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(11.0-10.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/(40.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/(40.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 12.0, 75, 105, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 75, 105, 0, 55, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 75, 105, 0, 55, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 15.0, 75, 105, 0, 55, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 75, 105, 0, 55, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 70, 105, 0, 55, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 100, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 17.0, 270, 100, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 270, 100, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 270, 100, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 14.0, 270, 57, 0, 20, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 17.0, 270, 51, 0, 20, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword"), 14.0, 270, 57, 0, 20, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword"), 12.0, 270, 60, 0, 22, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 10, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 1.75, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 9.0, 361, 100, 0, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 5.0/(46.0-31.0)); + FT_MOTION_RATE(agent, 5.0/(46.0-31.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ike_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("ike_attack_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 10); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 10); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), true, true); } } -unsafe extern "C" fn ike_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attackairn", ike_attack_air_n_game) - .acmd("effect_attackairn", ike_attack_air_n_effect) - .acmd("expression_attackairn", ike_attack_air_n_expression) - .acmd("game_attackairf", ike_attack_air_f_game) - .acmd("effect_attackairf", ike_attack_air_f_effect) - .acmd("expression_attackairf", ike_attack_air_f_expression) - .acmd("game_attackairb", ike_attack_air_b_game) - .acmd("game_attackairhi", ike_attack_air_hi_game) - .acmd("expression_attackairhi", ike_attack_air_hi_expression) - .acmd("game_attackairlw", ike_attack_air_lw_game) - .acmd("effect_attackairlw", ike_attack_air_lw_effect) - .acmd("effect_landingairlw", ike_landing_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/ike/src/acmd/ground.rs b/fighters/ike/src/acmd/ground.rs index 9bf47da25d..c6023df207 100644 --- a/fighters/ike/src/acmd/ground.rs +++ b/fighters/ike/src/acmd/ground.rs @@ -1,131 +1,129 @@ use super::*; -unsafe extern "C" fn ike_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 65, 100, 20, 1, 3.0, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 100, 20, 1, 3.5, 3.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 100, 20, 1, 3.0, 0.0, 4.0, 9.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn ike_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 65, 100, 30, 0, 2.75, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 65, 100, 30, 0, 4.0, 4.5, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn ike_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 45, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 6.0, 45, 100, 0, 45, 2.75, 1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 45, 100, 0, 45, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 6.0, 45, 100, 0, 45, 4.0, 0.0, 7.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 5.0, 45, 100, 0, 45, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.1); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 75, 0, 50, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 75, 0, 50, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 361, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 361, 75, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 35, 75, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 75, 0, 30, 2.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 75, 0, 30, 2.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 10.0, 361, 75, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 9.0, 361, 75, 0, 30, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 7.0, 35, 75, 0, 30, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 50); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attack11", ike_attack_11_game) - .acmd("game_attack12", ike_attack_12_game) - .acmd("game_attack13", ike_attack_13_game) - .acmd("game_attackdash", ike_attack_dash_game) - .acmd("expression_attackdash", ike_attack_dash_expression) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); +} \ No newline at end of file diff --git a/fighters/ike/src/acmd/mod.rs b/fighters/ike/src/acmd/mod.rs index e2d01f3d67..534f81f03e 100644 --- a/fighters/ike/src/acmd/mod.rs +++ b/fighters/ike/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 7f5707d23e..453c2eed2f 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -1,335 +1,329 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_right_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_right_s")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ike_step_left_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ike_step_left_s")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn ike_appeal_lw_l_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_r_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_swing_l")); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let costume_type = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) % 2; // Path of Radiance voiceline if costume_type == 0 { - PLAY_SE(fighter, Hash40::new("vc_ike_win02")); + PLAY_SE(agent, Hash40::new("vc_ike_win02")); } // Radiant Dawn voiceline else{ - PLAY_SE(fighter, Hash40::new("vc_ike_win01")); + PLAY_SE(agent, Hash40::new("vc_ike_win01")); } } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_stab")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_stab")); } wait(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ //PLAY_SE(fighter, Hash40::new("vc_ike_win01")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal03")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal03")); } - PLAY_SE(fighter, Hash40::new("se_ike_appeal_04")); + PLAY_SE(agent, Hash40::new("se_ike_appeal_04")); } frame(lua_state, 98.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_appeal_pullout")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_appeal_pullout")); } } -unsafe extern "C" fn ike_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); - if is_excute(fighter) { +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, Hash40::new("appeal_lw"), false, 0.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_sword_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 17.0/13.0); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_sword_appeal_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT(fighter, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("ike_sword") - .acmd("game_appeallw", ike_sword_appeal_lw_game) - .acmd("effect_appeallw", ike_sword_appeal_lw_effect) - .install(); - smashline::Agent::new("ike") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appeallwl", ike_appeal_lw_l_sound) - .acmd("sound_appeallwr", ike_appeal_lw_r_sound) - .acmd("game_appeallwl", ike_appeal_lw_game) - .acmd("game_appeallwr", ike_appeal_lw_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appeallwl", sound_appeallwl); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ike/src/acmd/smashes.rs b/fighters/ike/src/acmd/smashes.rs index a9a1ebcc53..96a4baf76c 100644 --- a/fighters/ike/src/acmd/smashes.rs +++ b/fighters/ike/src/acmd/smashes.rs @@ -1,273 +1,271 @@ use super::*; -unsafe extern "C" fn ike_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 22.0, 361, 100, 0, 45, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 22.0, 361, 100, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 25.0, 361, 100, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 22.0, 361, 100, 0, 45, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 18.0, 35, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(84.0-54.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(84.0-54.0)); } frame(lua_state, 84.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 18, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 16, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -unsafe extern "C" fn ike_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 19.0, 82, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 19.0, 82, 90, 0, 50, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 22.0, 82, 90, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 18.0, 70, 90, 0, 50, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 17.0, 65, 90, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -3, 0, -9, 0, 30, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2.5, 0, -7, 0, 30, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -unsafe extern "C" fn ike_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 16.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 44, 105, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 44, 105, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 44, 105, 0, 40, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 11.0, 44, 105, 0, 40, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 32.0/(71.0-37.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 32.0/(71.0-37.0)); AttackModule::clear_all(boma); } frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 12, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword5"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.1); } frame(lua_state, 31.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_sword2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 36.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 46.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks4", ike_attack_s4_s_game) - .acmd("effect_attacks4", ike_attack_s4_s_effect) - .acmd("game_attackhi4", ike_attack_hi4_game) - .acmd("effect_attackhi4", ike_attack_hi4_effect) - .acmd("game_attacklw4", ike_attack_lw4_game) - .acmd("effect_attacklw4", ike_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ike/src/acmd/specials.rs b/fighters/ike/src/acmd/specials.rs index eac0ec26d2..93827f421e 100644 --- a/fighters/ike/src/acmd/specials.rs +++ b/fighters/ike/src/acmd/specials.rs @@ -1,260 +1,260 @@ use super::*; -unsafe extern "C" fn ike_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 13.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 275, 52, 0, 45, 4.0, 0.0, -4.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 15.0, 0.0, 8.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 110, 0, 40, 10.0, 0.0, 25.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ike_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_CHARGE); } } -unsafe extern "C" fn ike_special_s_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); +unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri_hold"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 15, 0, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.5, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sword"), 0, 10, 0, 0, 0, 0, 0.75, 3, 10, 3, 0, 0, 0, true); } wait(lua_state, 2.0); } -unsafe extern "C" fn ike_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 0, 0, 0, 4.0, 0.0, 4.1, -1.0, Some(0.0), Some(4.1), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } } -unsafe extern "C" fn ike_special_s_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 4, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ike_iaigiri"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 5.0); for _ in 0..3{ - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } } -unsafe extern "C" fn ike_special_s_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - PLAY_SE(fighter, Hash40::new("vc_ike_appeal02")); + PLAY_SE(agent, Hash40::new("vc_ike_appeal02")); } else{ - PLAY_SE(fighter, Hash40::new("vc_ike_special_s01")); + PLAY_SE(agent, Hash40::new("vc_ike_special_s01")); } } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ike_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ike_special_s02")); } } -unsafe extern "C" fn ike_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); } } -unsafe extern "C" fn ike_special_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // Instakill if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(-8.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); //ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 7.0, 10.0, Some(0.0), Some(5.0), Some(-10.0), 5.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.05); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.05); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 100, 400, 1, 6.0, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(-10.0), 10.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } } // Normal Quickdraw else { frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); /* let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector @@ -263,342 +263,337 @@ unsafe extern "C" fn ike_special_s_attack_effect(fighter: &mut L2CAgentBase) { } } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); - EFFECT(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); + EFFECT(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); - FT_MOTION_RATE(fighter, 3.0/(1.1-1.0)); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); + FT_MOTION_RATE(agent, 3.0/(1.1-1.0)); } frame(lua_state, 1.1); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(1.3-1.1)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(1.3-1.1)); } frame(lua_state, 1.3); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(2.0-1.3)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(2.0-1.3)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 70, 130, 0, 40, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 6.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 7.0, 70, 130, 0, 40, 3.8, 0.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 17.0/(35.0-15.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 17.0/(35.0-15.0)); } frame(lua_state, 35.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_special_air_s_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, false); //LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("ike_sword"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_ike_sword6"), Hash40::new("tex_ike_sword2"), 5, Hash40::new("sword"), 0.0, 1.0, 0.0, Hash40::new("sword"), 0.0, 16.2, 0.0, true, Hash40::new("ike_sword"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ike_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ike_sword"), true, true); } } -unsafe extern "C" fn ike_special_s_attack_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, 0, 3, 130, 300, 1, 0, 12, 24, 24); +unsafe extern "C" fn expression_specialairsattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, 0, 3, 130, 300, 1, 0, 12, 24, 24); crate::sv_animcmd::AREA_WIND_2ND(lua_state); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slash_critical"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slash_critical"), 0); } } frame(lua_state, 1.3); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn ike_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ let cbm_vec1 = Vector4f{ /* Red */ x: 0.85, /* Green */ y: 0.85, /* Blue */ z: 0.85, /* Alpha */ w: 0.2}; // Brightness vector let cbm_vec2 = Vector4f{ /* Red */ x: 0.125, /* Green */ y: 0.4, /* Blue */ z: 1.0, /* Alpha */ w: 0.0}; // Diffuse vector ColorBlendModule::set_main_color(boma, /* Brightness */ &cbm_vec1, /* Diffuse */ &cbm_vec2, 0.0, 0.0, /*Fadein time*/ 15, /* Display Color */ true); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); for _ in 0..2{ - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 8, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } wait(lua_state, 4.0); } - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::ike::status::IS_QUICK_DRAW_INSTAKILL){ - EFFECT_OFF_KIND(fighter, Hash40::new("ike_volcano_hold"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("ike_volcano_hold"), false, false); ColorBlendModule::cancel_main_color(boma, 0); } } } -unsafe extern "C" fn ike_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_s"); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_ATTACK_END); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_S_FLAG_END_NO_LANDING); } } -unsafe extern "C" fn ike_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.82); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.82); } -unsafe extern "C" fn ike_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ike_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn ike_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::off_flag(boma, *FIGHTER_IKE_INSTANCE_WORK_ID_FLAG_SWORD_FINAL); ArticleModule::generate_article(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 88, 100, 150, 0, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 94, 100, 150, 0, 1.5, 0.0, 3.0, 15.0, Some(0.0), Some(7.0), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 96, 100, 150, 0, 3.5, 0.0, 5.0, 19.0, Some(0.0), Some(5.0), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 86, 100, 145, 0, 3.5, 0.0, 13.5, 7.0, Some(0.0), Some(13.5), Some(8.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 94, 100, 145, 0, 1.5, 0.0, 11.5, 15.0, Some(0.0), Some(15.5), Some(15.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 96, 100, 140, 0, 3.5, 0.0, 13.5, 19.0, Some(0.0), Some(13.5), Some(7.0), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_IKE_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_IKE_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn ika_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn ike_special_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_specialhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 90, 0, 50, 10.0, 0.0, 6.0, 11.8, Some(0.0), Some(11.0), Some(11.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_specialnend", ike_special_n_end_game) - .acmd("game_specialairnend", ike_special_air_n_end_game) - .acmd("game_specialsstart", ike_special_s_start_game) - .acmd("game_specialairsstart", ike_special_air_s_start_game) - .acmd("effect_specialshold", ike_special_s_hold_effect) - .acmd("game_specialsdash", ike_special_s_dash_game) - .acmd("effect_specialsdash", ike_special_s_dash_effect) - .acmd("sound_specialsdash", ike_special_s_dash_sound) - .acmd("game_specialairsdash", ike_special_air_s_dash_game) - .acmd("game_specialsattack", ike_special_s_attack_game) - .acmd("effect_specialsattack", ike_special_s_attack_effect) - .acmd("game_specialairsattack", ike_special_air_s_attack_game) - .acmd("effect_specialairsattack", ike_special_air_s_attack_effect) - .acmd("expression_specialsattack", ike_special_s_attack_expression) - .acmd( - "expression_specialairsattack", - ike_special_s_attack_expression, - ) - .acmd("effect_specialsend", ike_special_s_end_effect) - .acmd("game_specialairsend", ike_special_air_s_end_game) - .acmd("game_specialhi1", ike_special_hi1_game) - .acmd("game_specialhi2", ike_special_hi2_game) - .acmd("game_specialairhi2", ike_special_hi2_game) - .acmd("game_specialhi3", ike_special_hi3_game) - .acmd("game_specialairhi2", ike_special_air_hi2_game) - .acmd("game_specialhi3", ika_special_hi3_game) - .acmd("game_specialairhi3", ika_special_hi3_game) - .acmd("game_specialhi4", ike_special_hi4_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("effect_specialsdash", effect_specialsdash); + agent.acmd("sound_specialsdash", sound_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("effect_specialairsattack", effect_specialairsattack); + agent.acmd("expression_specialsattack", expression_specialsattack); + agent.acmd("expression_specialairsattack", expression_specialairsattack); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialairhi3); + agent.acmd("game_specialhi4", game_specialhi4); } diff --git a/fighters/ike/src/acmd/throws.rs b/fighters/ike/src/acmd/throws.rs index e968961f59..b02f176d6f 100644 --- a/fighters/ike/src/acmd/throws.rs +++ b/fighters/ike/src/acmd/throws.rs @@ -1,199 +1,197 @@ use super::*; -unsafe extern "C" fn ike_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ike_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ike_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 55, 105, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 3.0, 361, 150, 0, 30, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 150, 0, 30, 4.0, 1.1, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 26, 16); + CHECK_FINISH_CAMERA(agent, 26, 16); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 4.5, z: 17.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 48, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 2.0, 361, 150, 0, 30, 5.0, 2.4, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 361, 150, 0, 30, 4.0, 1.0, 2.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 15, 7); + CHECK_FINISH_CAMERA(agent, 15, 7); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.1); } frame(lua_state, 22.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(44.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(44.0-25.0)); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 135, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 9.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 150, 0, 30, 2.0, 0.0, 14.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 12, 17); + CHECK_FINISH_CAMERA(agent, 12, 17); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 5.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 120, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 30, 4.5, -5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 0); + CHECK_FINISH_CAMERA(agent, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_catch", ike_catch_game) - .acmd("game_catchdash", ike_catch_dash_game) - .acmd("game_catchturn", ike_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ike/src/acmd/tilts.rs b/fighters/ike/src/acmd/tilts.rs index 0b66ff6cfa..ff5148bb06 100644 --- a/fighters/ike/src/acmd/tilts.rs +++ b/fighters/ike/src/acmd/tilts.rs @@ -1,234 +1,232 @@ use super::*; -unsafe extern "C" fn ike_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(11.0-1.0)); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(11.0-1.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(16.2-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(16.2-12.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 361, 97, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 13.0, 361, 97, 0, 35, 2.75, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 15.0, 361, 97, 0, 35, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 13.0, 361, 97, 0, 35, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 11.0, 361, 97, 0, 35, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(17.0-16.2)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(17.0-16.2)); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 22.0/(42.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn ike_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(10.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(10.0-1.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 85, 90, 0, 50, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 12.0, 85, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 85, 90, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 12.0, 85, 90, 0, 50, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 10.0, 80, 90, 0, 50, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.0, 90, 110, 0, 25, 4.0, 0.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 90, 110, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 90, 110, 0, 25, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 10.0, 90, 110, 0, 25, 4.0, 0.5, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 8.0, 80, 110, 0, 25, 4.0, 0.5, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(34.0-31.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(34.0-31.0)); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(3.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(3.5-1.0)); } frame(lua_state, 3.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-3.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-3.5)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(10.0-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Ground-only */ ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Air-only */ ATTACK(fighter, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(10.0-6.0)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 70, 95, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Ground-only */ ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Air-only */ ATTACK(agent, 2, 0, Hash40::new("sword"), 14.0, 90, 95, 0, 35, 4.4, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 70, 95, 0, 20, 2.75, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 12.0, 70, 95, 0, 20, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 10.0, 60, 95, 0, 20, 4.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 11.0/(27.0-11.0)); + FT_MOTION_RATE(agent, 11.0/(27.0-11.0)); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn ike_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -pub fn install() { - smashline::Agent::new("ike") - .acmd("game_attacks3hi", ike_attack_s3_hi_game) - .acmd("game_attacks3", ike_attack_s3_s_game) - .acmd("game_attacks3lw", ike_attack_s3_lw_game) - .acmd("expression_attacks3hi", ike_attack_s3_expression) - .acmd("expression_attacks3", ike_attack_s3_expression) - .acmd("expression_attacks3lw", ike_attack_s3_expression) - .acmd("game_attackhi3", ike_attack_hi3_game) - .acmd("game_attacklw3", ike_attack_lw3_game) - .acmd("expression_attacklw3", ike_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/ike/src/lib.rs b/fighters/ike/src/lib.rs index 8e2ddcc726..b92243f55c 100644 --- a/fighters/ike/src/lib.rs +++ b/fighters/ike/src/lib.rs @@ -38,8 +38,8 @@ use utils::{ }; use smashline::*; -pub fn install() { - acmd::install(); - opff::install(); - status::install(); +pub fn install(agent: &mut Agent) { + acmd::install(agent); + opff::install(agent); + status::install(agent); } diff --git a/fighters/ike/src/opff.rs b/fighters/ike/src/opff.rs index 0d8f3ec019..c250573ef5 100644 --- a/fighters/ike/src/opff.rs +++ b/fighters/ike/src/opff.rs @@ -458,8 +458,6 @@ pub unsafe fn ike_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("ike") - .on_line(Main, ike_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ike_frame_wrapper); } diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status.rs index 185ddfba96..8a5cedd5a1 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status.rs @@ -49,9 +49,7 @@ unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("ike") - .on_start(ike_init) +pub fn install(agent: &mut Agent) { + agent.on_start(ike_init) .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end) - .install(); } diff --git a/fighters/ike/src/sword/acmd/mod.rs b/fighters/ike/src/sword/acmd/mod.rs new file mode 100644 index 0000000000..f9d06fb11d --- /dev/null +++ b/fighters/ike/src/sword/acmd/mod.rs @@ -0,0 +1,8 @@ + +use super::*; + +mod other; + +pub fn install(agent: &mut Agent) { + other::install(agent); +} diff --git a/fighters/ike/src/sword/acmd/other.rs b/fighters/ike/src/sword/acmd/other.rs new file mode 100644 index 0000000000..ee87670f6e --- /dev/null +++ b/fighters/ike/src/sword/acmd/other.rs @@ -0,0 +1,6 @@ +use super::*; + +pub fn install(agent: &mut Agent) { + agent.acmd("game_appeallw", ike_sword_appeal_lw_game); + agent.acmd("effect_appeallw", ike_sword_appeal_lw_effect); +} \ No newline at end of file diff --git a/fighters/ike/src/sword/mod.rs b/fighters/ike/src/sword/mod.rs new file mode 100644 index 0000000000..60629a8fdf --- /dev/null +++ b/fighters/ike/src/sword/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ike_sword"); + acmd::install(agent); + agent.install(); +} From b9dbe0994eabafbc7e3e99b56c49810e85474e32 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Fri, 22 Mar 2024 23:42:51 -0400 Subject: [PATCH 071/172] Dark pit Crate --- fighters/pitb/src/acmd/aerials.rs | 282 ++++++++++++------------- fighters/pitb/src/acmd/ground.rs | 104 +++++---- fighters/pitb/src/acmd/mod.rs | 16 +- fighters/pitb/src/acmd/other.rs | 230 ++++++++++---------- fighters/pitb/src/acmd/smashes.rs | 118 +++++------ fighters/pitb/src/acmd/specials.rs | 174 ++++++++------- fighters/pitb/src/acmd/throws.rs | 114 +++++----- fighters/pitb/src/acmd/tilts.rs | 92 ++++---- fighters/pitb/src/lib.rs | 8 +- fighters/pitb/src/opff.rs | 6 +- fighters/pitb/src/status/mod.rs | 4 +- fighters/pitb/src/status/special_hi.rs | 38 ++-- 12 files changed, 584 insertions(+), 602 deletions(-) diff --git a/fighters/pitb/src/acmd/aerials.rs b/fighters/pitb/src/acmd/aerials.rs index f2c9197d48..0eaa56144b 100644 --- a/fighters/pitb/src/acmd/aerials.rs +++ b/fighters/pitb/src/acmd/aerials.rs @@ -1,87 +1,87 @@ use super::*; -unsafe extern "C" fn pitb_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 24.0, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 363, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 24.0, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 363, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 100, 45, 0, 9.0, 1.0, 9.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 7.0, 361, 85, 0, 50, 10.5, 1.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 361, 85, 0, 50, 10.5, 1.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pitb_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("bowr"), 0, 0, 0, -90, 90, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, 0.87, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, -0.87, 0, 180, -90, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("bowr"), 0, 0, 0, -90, 90, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, 0.87, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("bowr"), 0, -0.87, 0, 180, -90, 0, 0.9, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("bowl"), 0, 0, 0, -90, 90, 0, 1.3, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_pitb_sword1"), Hash40::new("tex_pitb_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("bowl"), 0, 0, 0, -90, 90, 0, 1.3, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_pitb_sword1"), Hash40::new("tex_pitb_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), true, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn pitb_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_pitb_attackair_n01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_pitb_attackair_n01")); } frame(lua_state, 18.0); - if is_excute(fighter) { - sound!(fighter, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_pitb_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_pitb_swing_m")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_pitb_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_pitb_swing_m")); } } @@ -116,191 +116,189 @@ unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn pitb_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 110, 0, 21, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 110, 0, 21, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 110, 0, 21, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 110, 0, 21, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 91, 0, 22, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 91, 0, 22, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 91, 0, 22, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 91, 0, 22, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pitb_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 43, 80, 0, 33, 3.5, 0.0, 6.2, -11.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 101, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 43, 80, 0, 33, 3.5, 0.0, 6.2, -11.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 101, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 43, 100, 0, 30, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 43, 100, 0, 30, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 1, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pitb_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); } } -unsafe extern "C" fn pitb_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 75, 106, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 75, 106, 0, 20, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 75, 106, 0, 20, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 100, 0, 20, 3.5, 0.0, 9.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 100, 0, 20, 3.5, 0.0, 9.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 75, 100, 0, 20, 4.0, 0.0, 17.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pitb_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 54, 74, 0, 46, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 54, 74, 0, 46, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 54, 74, 0, 46, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 54, 70, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 54, 70, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 10.0, 54, 70, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pitb_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attackairn", pitb_attack_air_n_game) - .acmd("effect_attackairn", pitb_attack_air_n_effect) - .acmd("sound_attackairn", pitb_attack_air_n_sound) - .acmd("expression_attackairn", expression_attackairn) - .acmd("game_attackairf", pitb_attack_air_f_game) - .acmd("game_attackairb", pitb_attack_air_b_game) - .acmd("effect_attackairb", pitb_attack_air_b_effect) - .acmd("game_attackairhi", pitb_attack_air_hi_game) - .acmd("game_attackairlw", pitb_attack_air_lw_game) - .acmd("expression_attackairlw", pitb_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pitb/src/acmd/ground.rs b/fighters/pitb/src/acmd/ground.rs index ded99e8960..b49f80f507 100644 --- a/fighters/pitb/src/acmd/ground.rs +++ b/fighters/pitb/src/acmd/ground.rs @@ -1,102 +1,100 @@ use super::*; -unsafe extern "C" fn pitb_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pitb_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pitb_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 3.0, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 32.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 32.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.37); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.37); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attack11", pitb_attack_11_game) - .acmd("game_attack12", pitb_attack_12_game) - .acmd("game_attack13", pitb_attack_13_game) - .acmd("game_attackdash", pitb_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pitb/src/acmd/mod.rs b/fighters/pitb/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/pitb/src/acmd/mod.rs +++ b/fighters/pitb/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index 88af1aba3a..c6d6c8567e 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -1,256 +1,254 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} } } -unsafe extern "C" fn pitb_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.231); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.231); } frame(lua_state, 13.0); // Now effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pitb_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pitb_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pitb_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pitb_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pitb_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pitb_step_left_m")); } } -unsafe extern "C" fn pitb_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Now effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn appeal_sl_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), false, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn appeal_sr_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("pitb_atk_air_n"), Hash40::new("swordr2"), 0, -1, 0, -90, -90, 0, 1, true, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordl"), 0, -0.06, 0, 180, 90, 0, 1, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_air_n"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_air_n"), false, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), false, false); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 5, 13, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", pitb_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", pitb_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_appealsl", appeal_sl_effect) - .acmd("effect_appealsr", appeal_sr_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_appealsl", effect_appealsl); + agent.acmd("effect_appealsr", effect_appealsr); } diff --git a/fighters/pitb/src/acmd/smashes.rs b/fighters/pitb/src/acmd/smashes.rs index 6986a7fbfb..b774e14301 100644 --- a/fighters/pitb/src/acmd/smashes.rs +++ b/fighters/pitb/src/acmd/smashes.rs @@ -1,123 +1,121 @@ use super::*; -unsafe extern "C" fn pitb_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 10.0, 361, 121, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 10.0, 361, 121, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); let hitVec = Vector2f { x: 0.0, y: 24.5 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.7, 0.0, 3.3, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.6, 0.0, 2.8, 12.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 48, 93, 0, 35, 3.4, 0.0, 2.0, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.7, 0.0, 3.3, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 48, 98, 0, 40, 3.6, 0.0, 2.8, 12.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 48, 93, 0, 35, 3.4, 0.0, 2.0, 17.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.7, 0.0, 3.3, -8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.6, 0.0, 2.8, -14.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 30, 93, 0, 25, 3.4, 0.0, 2.0, -19.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.7, 0.0, 3.3, -8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 30, 93, 0, 25, 3.6, 0.0, 2.8, -14.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 30, 93, 0, 25, 3.4, 0.0, 2.0, -19.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attacks4", pitb_attack_s4_s_game) - .acmd("game_attackhi4", pitb_attack_hi4_game) - .acmd("game_attacklw4", pitb_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pitb/src/acmd/specials.rs b/fighters/pitb/src/acmd/specials.rs index 2d09e0d555..05473ab7dc 100644 --- a/fighters/pitb/src/acmd/specials.rs +++ b/fighters/pitb/src/acmd/specials.rs @@ -1,105 +1,105 @@ use super::*; -unsafe extern "C" fn pitb_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 12.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 12.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } frame(lua_state, 26.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MTRANS_AIR_UNABLE); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); // WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } } -unsafe extern "C" fn pitb_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 40, 80, 0, 63, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 40, 80, 0, 63, 6.0, 0.0, 4.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } } -unsafe extern "C" fn pitb_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 14.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 2.0, 0.0, 14.0, 9.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_search"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT_CHECK_ONOFF); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 0.5, 367, 100, 0, 35, 6.0, 0.0, -3.0, -2.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 0.5, 367, 100, 0, 35, 6.0, 0.0, -3.0, -2.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 68, 110, 0, 60, 6.5, 0.0, -3.0, -2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 68, 110, 0, 60, 6.5, 0.0, -3.0, -2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_HI_RUSH_FLAG_FIX_ANGLE); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_HI_RUSH_FLAG_BACK_ANGLE); @@ -108,65 +108,63 @@ unsafe extern "C" fn pitb_special_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn pitb_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 4.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 85, 0, 77, 7.5, 0.0, 7.0, -1.5, Some(0.0), Some(7.0), Some(1.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 85, 0, 77, 7.5, 0.0, 7.0, -1.5, Some(0.0), Some(7.0), Some(1.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_NONE); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT_FOLLOW(fighter, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 3, -2, 0, rot1, 0, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 3, 2, 0, rot2, 0, 1.3, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 3, -2, 0, rot1, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 3, 2, 0, rot2, 0, 1.3, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn pitb_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_specialsstart", pitb_special_s_start_game) - .acmd("game_specialsend", pitb_special_s_end_game) - .acmd("game_specialairsstart", pitb_special_air_s_start_game) - .acmd("game_specialhi", pitb_special_hi_game) - .acmd("game_speciallwstartl", pitb_special_lw_start_game) - .acmd("game_speciallwstartr", pitb_special_lw_start_game) - .acmd("game_specialairlwstartl", pitb_special_lw_start_game) - .acmd("game_specialairlwstartr", pitb_special_lw_start_game) - .acmd("effect_speciallwstartl", pitb_special_lw_start_effect) - .acmd("effect_speciallwstartr", pitb_special_lw_start_effect) - .acmd("effect_specialairlwstartl", pitb_special_lw_start_effect) - .acmd("effect_specialairlwstartr", pitb_special_lw_start_effect) - .acmd("game_speciallwhold", pitb_special_lw_hold_game) - .acmd("game_specialairlwhold", pitb_special_lw_hold_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_speciallwstartl", game_speciallwstartl); + agent.acmd("game_speciallwstartr", game_speciallwstartl); + agent.acmd("game_specialairlwstartl", game_speciallwstartl); + agent.acmd("game_specialairlwstartr", game_speciallwstartl); + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); + agent.acmd("effect_speciallwstartr", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); +} \ No newline at end of file diff --git a/fighters/pitb/src/acmd/throws.rs b/fighters/pitb/src/acmd/throws.rs index 2cd51eda09..b855445db5 100644 --- a/fighters/pitb/src/acmd/throws.rs +++ b/fighters/pitb/src/acmd/throws.rs @@ -1,121 +1,119 @@ use super::*; -unsafe extern "C" fn pitb_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pitb_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pitb_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pitb_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_catch", pitb_catch_game) - .acmd("game_catchdash", pitb_catch_dash_game) - .acmd("game_catchturn", pitb_catch_turn_game) - .acmd("game_throwf", pitb_throw_f_game) - .acmd("game_throwhi", pitb_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pitb/src/acmd/tilts.rs b/fighters/pitb/src/acmd/tilts.rs index 6f4beb3cc3..d851cc8a59 100644 --- a/fighters/pitb/src/acmd/tilts.rs +++ b/fighters/pitb/src/acmd/tilts.rs @@ -1,95 +1,93 @@ use super::*; -unsafe extern "C" fn pitb_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 361, 100, 0, 40, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pitb_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.4, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.4, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); let hitVec = Vector2f { x: 4.5, y: 21.5 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 69, 44, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 69, 44, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 34.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 34.0, 11.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 69, 48, 0, 61, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 69, 48, 0, 61, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 30.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 30.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pitb_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pitb_atk_wind"), Hash40::new("top"), -7, 6, 2.3, -12, -42, 168, 1.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("pitb_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pitb_atk_wind"), Hash40::new("top"), -7, 6, 2.3, -12, -42, 168, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("pitb_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_sword"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pitb_atk_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_wind"), true, true); } } -pub fn install() { - smashline::Agent::new("pitb") - .acmd("game_attacks3", pitb_attack_s3_s_game) - .acmd("game_attackhi3", pitb_attack_hi3_game) - .acmd("game_attacklw3", pitb_attack_lw3_game) - .acmd("effect_attacklw3", pitb_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pitb/src/lib.rs b/fighters/pitb/src/lib.rs index 7bb0378152..bb4aa6874b 100644 --- a/fighters/pitb/src/lib.rs +++ b/fighters/pitb/src/lib.rs @@ -38,8 +38,8 @@ use utils::{ }; use smashline::*; -pub fn install() { - acmd::install(); - status::install(); - opff::install(); +pub fn install(agent: &mut Agent) { + acmd::install(agent); + status::install(agent); + opff::install(agent); } diff --git a/fighters/pitb/src/opff.rs b/fighters/pitb/src/opff.rs index 5a11edc7d8..a9a41d99a7 100644 --- a/fighters/pitb/src/opff.rs +++ b/fighters/pitb/src/opff.rs @@ -45,8 +45,6 @@ pub unsafe fn pitb_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("pitb") - .on_line(Main, pitb_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pitb_frame_wrapper) } diff --git a/fighters/pitb/src/status/mod.rs b/fighters/pitb/src/status/mod.rs index 543ba824c8..2c47e30dd3 100644 --- a/fighters/pitb/src/status/mod.rs +++ b/fighters/pitb/src/status/mod.rs @@ -3,6 +3,6 @@ use smashline::*; mod special_hi; -pub fn install() { - special_hi::install(); +pub fn install(agent: &mut Agent) { + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/pitb/src/status/special_hi.rs b/fighters/pitb/src/status/special_hi.rs index a7d9d9c26e..df26612fdc 100644 --- a/fighters/pitb/src/status/special_hi.rs +++ b/fighters/pitb/src/status/special_hi.rs @@ -3,9 +3,9 @@ use globals::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END -pub unsafe extern "C" fn special_hi_rush_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_end_pre(agent: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - fighter.module_accessor, + agent.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_MOTION_FALL, *GROUND_CORRECT_KIND_KEEP as u32, @@ -18,7 +18,7 @@ pub unsafe extern "C" fn special_hi_rush_end_pre(fighter: &mut L2CFighterCommon) ); FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, + agent.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -33,9 +33,9 @@ pub unsafe extern "C" fn special_hi_rush_end_pre(fighter: &mut L2CFighterCommon) 0.into() } -pub unsafe extern "C" fn special_hi_rush_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_end_main(agent: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion( - fighter.module_accessor, + agent.module_accessor, Hash40::new("special_air_hi_end"), 0.0, 1.0, @@ -45,38 +45,37 @@ pub unsafe extern "C" fn special_hi_rush_end_main(fighter: &mut L2CFighterCommon false ); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let x_max_mul = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FALL_X_MAX_MUL); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let x_max_mul = WorkModule::get_float(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FALL_X_MAX_MUL); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * x_max_mul, 0.0 ); - fighter.select_cliff_hangdata_from_name("special_hi"); + agent.select_cliff_hangdata_from_name("special_hi"); - fighter.main_shift(special_hi_rush_end_main_loop) + agent.main_shift(special_hi_rush_end_main_loop) } -unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_rush_end_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if agent.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + if agent.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + agent.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); return 0.into(); } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); + if MotionModule::is_end(agent.module_accessor) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } 0.into() } -pub fn install() { - smashline::Agent::new("pitb") - .status( +pub fn install(agent: &mut Agent) { + agent.status( Pre, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_pre, @@ -86,5 +85,4 @@ pub fn install() { *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main, ) - .install(); } From ea64b7fe871cfde3df5153a8a61496846c551a32 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Sat, 23 Mar 2024 00:21:33 -0400 Subject: [PATCH 072/172] adjustments --- fighters/ike/src/acmd/aerials.rs | 24 +++---- fighters/ike/src/acmd/other.rs | 63 +++++------------- fighters/ike/src/acmd/smashes.rs | 12 ++-- fighters/ike/src/acmd/specials.rs | 80 +++++++++------------- fighters/ike/src/acmd/throws.rs | 14 ++-- fighters/ike/src/acmd/tilts.rs | 18 ++--- fighters/ike/src/lib.rs | 8 ++- fighters/ike/src/status.rs | 4 +- fighters/ike/src/sword/acmd/other.rs | 36 +++++++++- fighters/pikmin/src/acmd/other.rs | 85 ++---------------------- fighters/pikmin/src/acmd/specials.rs | 18 ++--- fighters/pikmin/src/acmd/tilts.rs | 6 +- fighters/pikmin/src/lib.rs | 4 +- fighters/pikmin/src/pikmin/mod.rs | 4 +- fighters/pikmin/src/status/attack_air.rs | 2 +- fighters/pikmin/src/status/escape_air.rs | 2 +- fighters/pikmin/src/status/rebirth.rs | 2 +- fighters/pitb/src/acmd/aerials.rs | 20 +++--- fighters/pitb/src/acmd/ground.rs | 8 +-- fighters/pitb/src/acmd/other.rs | 24 +++---- fighters/pitb/src/acmd/smashes.rs | 6 +- fighters/pitb/src/acmd/specials.rs | 28 ++++---- fighters/pitb/src/acmd/throws.rs | 10 +-- fighters/pitb/src/acmd/tilts.rs | 8 +-- fighters/pitb/src/lib.rs | 4 +- fighters/pitb/src/opff.rs | 2 +- fighters/pitb/src/status/special_hi.rs | 20 +++--- 27 files changed, 214 insertions(+), 298 deletions(-) diff --git a/fighters/ike/src/acmd/aerials.rs b/fighters/ike/src/acmd/aerials.rs index 16cd0dce81..34def8c468 100644 --- a/fighters/ike/src/acmd/aerials.rs +++ b/fighters/ike/src/acmd/aerials.rs @@ -337,16 +337,16 @@ unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attackairn); - agent.acmd("effect_attackairn", effect_attackairn); - agent.acmd("expression_attackairn", expression_attackairn); - agent.acmd("game_attackairf", game_attackairf); - agent.acmd("effect_attackairf", effect_attackairf); - agent.acmd("expression_attackairf", expression_attackairf); - agent.acmd("game_attackairb", game_attackairb); - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("expression_attackairhi", expression_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("effect_attackairlw", effect_attackairlw); - agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 453c2eed2f..cef5febfb9 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -234,7 +234,7 @@ unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 17.0/13.0); @@ -249,39 +249,6 @@ unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE(agent, 17.0/13.0); - frame(lua_state, 13.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - /* Air-only */ - ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - /* Ground-only */ - ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn effect_appeallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT(agent, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(agent, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } - } -} - unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -312,18 +279,18 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); - agent.acmd("game_dash", game_dash); - agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); - agent.acmd("sound_appeallwl", sound_appeallwl); - agent.acmd("sound_appeallwr", sound_appeallwr); - agent.acmd("game_appeallwl", game_appeallwl); - agent.acmd("game_appeallwr", game_appeallwr); - agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appeallwl", sound_appeallwl); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ike/src/acmd/smashes.rs b/fighters/ike/src/acmd/smashes.rs index 96a4baf76c..b9ebd1d7cc 100644 --- a/fighters/ike/src/acmd/smashes.rs +++ b/fighters/ike/src/acmd/smashes.rs @@ -262,10 +262,10 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attacks4); - agent.acmd("effect_attacks4", effect_attacks4); - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("effect_attackhi4", effect_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); - agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ike/src/acmd/specials.rs b/fighters/ike/src/acmd/specials.rs index 93827f421e..4cb9c5a668 100644 --- a/fighters/ike/src/acmd/specials.rs +++ b/fighters/ike/src/acmd/specials.rs @@ -348,7 +348,7 @@ unsafe extern "C" fn effect_specialairsattack(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_specialairsattack(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -423,7 +423,7 @@ unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -471,25 +471,6 @@ unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - boma.select_cliff_hangdata_from_name("special_hi"); - camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); - KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(agent, 0, -6); - ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } -} - unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -544,17 +525,18 @@ unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { + boma.select_cliff_hangdata_from_name("special_hi"); camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); ADD_SPEED_NO_LIMIT(agent, 0, -6); - ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 30, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 30, 0, 120, 6.5, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-12.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 165, 0, 4.8, 0.0, 6.8, -1.0, Some(0.0), Some(6.8), Some(-13.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 2.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword"), 4.5, 270, 120, 0, 25, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.0, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 270, 100, 150, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } @@ -571,29 +553,27 @@ unsafe extern "C" fn game_specialhi4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) {; - agent.acmd("game_specialnend", game_specialnend); - agent.acmd("game_specialairnend", game_specialairnend); - agent.acmd("game_specialsstart", game_specialsstart); - agent.acmd("game_specialairsstart", game_specialairsstart); - agent.acmd("effect_specialshold", effect_specialshold); - agent.acmd("game_specialsdash", game_specialsdash); - agent.acmd("effect_specialsdash", effect_specialsdash); - agent.acmd("sound_specialsdash", sound_specialsdash); - agent.acmd("game_specialairsdash", game_specialairsdash); - agent.acmd("game_specialsattack", game_specialsattack); - agent.acmd("effect_specialsattack", effect_specialsattack); - agent.acmd("game_specialairsattack", game_specialairsattack); - agent.acmd("effect_specialairsattack", effect_specialairsattack); - agent.acmd("expression_specialsattack", expression_specialsattack); - agent.acmd("expression_specialairsattack", expression_specialairsattack); - agent.acmd("effect_specialsend", effect_specialsend); - agent.acmd("game_specialairsend", game_specialairsend); - agent.acmd("game_specialhi1", game_specialhi1); - agent.acmd("game_specialhi2", game_specialhi2); - agent.acmd("game_specialairhi2", game_specialairhi2); - agent.acmd("game_specialhi3", game_specialhi3); - agent.acmd("game_specialairhi2", game_specialairhi2); - agent.acmd("game_specialhi3", game_specialhi3); - agent.acmd("game_specialairhi3", game_specialairhi3); - agent.acmd("game_specialhi4", game_specialhi4); + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("effect_specialsdash", effect_specialsdash); + agent.acmd("sound_specialsdash", sound_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsattack", game_specialsattack); + agent.acmd("effect_specialsattack", effect_specialsattack); + agent.acmd("game_specialairsattack", game_specialairsattack); + agent.acmd("effect_specialairsattack", effect_specialairsattack); + agent.acmd("expression_specialsattack", expression_specialsattack); + agent.acmd("expression_specialairsattack", expression_specialsattack); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("game_specialhi4", game_specialhi4); } diff --git a/fighters/ike/src/acmd/throws.rs b/fighters/ike/src/acmd/throws.rs index b02f176d6f..9e81c03e0b 100644 --- a/fighters/ike/src/acmd/throws.rs +++ b/fighters/ike/src/acmd/throws.rs @@ -187,11 +187,11 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", game_catch); - agent.acmd("game_catchdash", game_catchdash); - agent.acmd("game_catchturn", game_catchturn); - agent.acmd("game_throwf", game_throwf); - agent.acmd("game_throwb", game_throwb); - agent.acmd("game_throwhi", game_throwhi); - agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ike/src/acmd/tilts.rs b/fighters/ike/src/acmd/tilts.rs index ff5148bb06..50e64d5841 100644 --- a/fighters/ike/src/acmd/tilts.rs +++ b/fighters/ike/src/acmd/tilts.rs @@ -220,13 +220,13 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("game_attacks3", game_attacks3); - agent.acmd("game_attacks3lw", game_attacks3lw); - agent.acmd("expression_attacks3hi", expression_attacks3); - agent.acmd("expression_attacks3", expression_attacks3); - agent.acmd("expression_attacks3lw", expression_attacks3); - agent.acmd("game_attackhi3", game_attackhi3); - agent.acmd("game_attacklw3", game_attacklw3); - agent.acmd("expression_attacklw3", expression_attacklw3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/ike/src/lib.rs b/fighters/ike/src/lib.rs index b92243f55c..f4d0d9004a 100644 --- a/fighters/ike/src/lib.rs +++ b/fighters/ike/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod status; pub mod opff; +mod sword; + use smash::{ lib::{ L2CValue, @@ -38,8 +40,12 @@ use utils::{ }; use smashline::*; -pub fn install(agent: &mut Agent) { +pub fn install() { + let agent = &mut Agent::new("ike"); acmd::install(agent); opff::install(agent); status::install(agent); + agent.install(); + + sword::install(); } diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status.rs index 8a5cedd5a1..71900d8f04 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status.rs @@ -50,6 +50,6 @@ unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.on_start(ike_init) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end) + agent.on_start(ike_init); + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end); } diff --git a/fighters/ike/src/sword/acmd/other.rs b/fighters/ike/src/sword/acmd/other.rs index ee87670f6e..bef6228a7f 100644 --- a/fighters/ike/src/sword/acmd/other.rs +++ b/fighters/ike/src/sword/acmd/other.rs @@ -1,6 +1,38 @@ use super::*; +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 17.0/13.0); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + /* Air-only */ + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 270, 33, 0, 30, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + /* Ground-only */ + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 3.5, 0.0, 6.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 270, 100, 275, 0, 4.5, 0.0, 12.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_IKE, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ + EFFECT(agent, Hash40::new("ike_volcano_ground"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("ike_volcano"), Hash40::new("top"), 0, 0.0, -8.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + } + } +} + pub fn install(agent: &mut Agent) { - agent.acmd("game_appeallw", ike_sword_appeal_lw_game); - agent.acmd("effect_appeallw", ike_sword_appeal_lw_effect); + agent.acmd("game_appeallw", game_appeallw); + agent.acmd("effect_appeallw", effect_appeallw); } \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index 6fa6d6abab..50bb308b86 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -194,11 +119,11 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index ed9058d4ca..200f309de8 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -66,13 +66,13 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specials", game_specials); - agent.acmd("game_specialairs", game_specialairs); - agent.acmd("game_specialnstart", game_specialnstart); - agent.acmd("game_specialnfailure", game_specialnfailure); - agent.acmd("game_specialairnfailure", game_specialairnfailure); - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_speciallw); - agent.acmd("effect_speciallw", effect_speciallw); - agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnfailure", game_specialnfailure); + agent.acmd("game_specialairnfailure", game_specialnfailure); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); } \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 252ca38185..9459f863a9 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -70,7 +70,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attacks3); - agent.acmd("game_attacklw3", game_attacklw3); - agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attackhi3", game_attackhi3); } diff --git a/fighters/pikmin/src/lib.rs b/fighters/pikmin/src/lib.rs index 72b4deac6e..7cfbd543c5 100644 --- a/fighters/pikmin/src/lib.rs +++ b/fighters/pikmin/src/lib.rs @@ -41,7 +41,9 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("pikmin"); acmd::install(agent); - pikmin::install(); status::install(agent); opff::install(agent); + agent.install(); + + pikmin::install(); } diff --git a/fighters/pikmin/src/pikmin/mod.rs b/fighters/pikmin/src/pikmin/mod.rs index c902c3467d..0066101448 100644 --- a/fighters/pikmin/src/pikmin/mod.rs +++ b/fighters/pikmin/src/pikmin/mod.rs @@ -77,7 +77,9 @@ impl From for PikminInfo { } } -pub fn install(agent: &mut Agent) { +pub fn install() { + let agent = &mut Agent::new("pikmin_pikmin"); acmd::install(agent); status::install(agent); + agent.install(); } diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index e64440a492..13f5a6f9f9 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -164,5 +164,5 @@ unsafe extern "C" fn link_event_store_l2c_table(agent: &mut L2CFighterCommon, li ret } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index ffb9ca3cf3..cfabf68ac4 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -7,5 +7,5 @@ pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end) + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_AIR, escape_air_end); } diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index b932ed6140..863ee7a762 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -7,5 +7,5 @@ pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end) + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/pitb/src/acmd/aerials.rs b/fighters/pitb/src/acmd/aerials.rs index 0eaa56144b..f2d5c341cf 100644 --- a/fighters/pitb/src/acmd/aerials.rs +++ b/fighters/pitb/src/acmd/aerials.rs @@ -291,14 +291,14 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attackairn); - agent.acmd("effect_attackairn", effect_attackairn); - agent.acmd("sound_attackairn", sound_attackairn); - agent.acmd("expression_attackairn", expression_attackairn); - agent.acmd("game_attackairf", game_attackairf); - agent.acmd("game_attackairb", game_attackairb); - agent.acmd("effect_attackairb", effect_attackairb); - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pitb/src/acmd/ground.rs b/fighters/pitb/src/acmd/ground.rs index b49f80f507..40de149b14 100644 --- a/fighters/pitb/src/acmd/ground.rs +++ b/fighters/pitb/src/acmd/ground.rs @@ -93,8 +93,8 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", game_attack11); - agent.acmd("game_attack12", game_attack12); - agent.acmd("game_attack13", game_attack13); - agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index c6d6c8567e..08fd699345 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -239,16 +239,16 @@ unsafe extern "C" fn effect_appealsr(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); - agent.acmd("game_dash", game_dash); - agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); - agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("effect_appealsl", effect_appealsl); - agent.acmd("effect_appealsr", effect_appealsr); + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_appealsl", effect_appealsl); + agent.acmd("effect_appealsr", effect_appealsr); } diff --git a/fighters/pitb/src/acmd/smashes.rs b/fighters/pitb/src/acmd/smashes.rs index b774e14301..3d80f726f1 100644 --- a/fighters/pitb/src/acmd/smashes.rs +++ b/fighters/pitb/src/acmd/smashes.rs @@ -115,7 +115,7 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attacks4); - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pitb/src/acmd/specials.rs b/fighters/pitb/src/acmd/specials.rs index 05473ab7dc..92871dedbe 100644 --- a/fighters/pitb/src/acmd/specials.rs +++ b/fighters/pitb/src/acmd/specials.rs @@ -153,18 +153,18 @@ unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialsstart", game_specialsstart); - agent.acmd("game_specialsend", game_specialsend); - agent.acmd("game_specialairsstart", game_specialairsstart); - agent.acmd("game_specialhi", game_specialhi); - agent.acmd("game_speciallwstartl", game_speciallwstartl); - agent.acmd("game_speciallwstartr", game_speciallwstartl); - agent.acmd("game_specialairlwstartl", game_speciallwstartl); - agent.acmd("game_specialairlwstartr", game_speciallwstartl); - agent.acmd("effect_speciallwstartl", effect_speciallwstartl); - agent.acmd("effect_speciallwstartr", effect_speciallwstartl); - agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); - agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); - agent.acmd("game_speciallwhold", game_speciallwhold); - agent.acmd("game_specialairlwhold", game_speciallwhold); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_speciallwstartl", game_speciallwstartl); + agent.acmd("game_speciallwstartr", game_speciallwstartl); + agent.acmd("game_specialairlwstartl", game_speciallwstartl); + agent.acmd("game_specialairlwstartr", game_speciallwstartl); + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); + agent.acmd("effect_speciallwstartr", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); } \ No newline at end of file diff --git a/fighters/pitb/src/acmd/throws.rs b/fighters/pitb/src/acmd/throws.rs index b855445db5..5611fa3966 100644 --- a/fighters/pitb/src/acmd/throws.rs +++ b/fighters/pitb/src/acmd/throws.rs @@ -111,9 +111,9 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", game_catch); - agent.acmd("game_catchdash", game_catchdash); - agent.acmd("game_catchturn", game_catchturn); - agent.acmd("game_throwf", game_throwf); - agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pitb/src/acmd/tilts.rs b/fighters/pitb/src/acmd/tilts.rs index d851cc8a59..a8271e50a7 100644 --- a/fighters/pitb/src/acmd/tilts.rs +++ b/fighters/pitb/src/acmd/tilts.rs @@ -86,8 +86,8 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attacks3); - agent.acmd("game_attackhi3", game_attackhi3); - agent.acmd("game_attacklw3", game_attacklw3); - agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pitb/src/lib.rs b/fighters/pitb/src/lib.rs index bb4aa6874b..7555d7fb29 100644 --- a/fighters/pitb/src/lib.rs +++ b/fighters/pitb/src/lib.rs @@ -38,8 +38,10 @@ use utils::{ }; use smashline::*; -pub fn install(agent: &mut Agent) { +pub fn install() { + let agent = &mut Agent::new("pitb"); acmd::install(agent); status::install(agent); opff::install(agent); + agent.install(); } diff --git a/fighters/pitb/src/opff.rs b/fighters/pitb/src/opff.rs index a9a41d99a7..0c292175b5 100644 --- a/fighters/pitb/src/opff.rs +++ b/fighters/pitb/src/opff.rs @@ -46,5 +46,5 @@ pub unsafe fn pitb_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - agent.on_line(Main, pitb_frame_wrapper) + agent.on_line(Main, pitb_frame_wrapper); } diff --git a/fighters/pitb/src/status/special_hi.rs b/fighters/pitb/src/status/special_hi.rs index df26612fdc..e99e467a9e 100644 --- a/fighters/pitb/src/status/special_hi.rs +++ b/fighters/pitb/src/status/special_hi.rs @@ -75,14 +75,14 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(agent: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status( - Pre, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_pre, - ) - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) + agent.status( + Pre, + *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, + special_hi_rush_end_pre, + ); + agent.status( + Main, + *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, + special_hi_rush_end_main, + ); } From 0ac69a1ddf2f602a6fe1cff7bb26656f6ea369a5 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 00:31:23 -0400 Subject: [PATCH 073/172] Cloud crate --- fighters/cloud/src/acmd/aerials.rs | 288 ++++++------ fighters/cloud/src/acmd/ground.rs | 106 +++-- fighters/cloud/src/acmd/mod.rs | 16 +- fighters/cloud/src/acmd/other.rs | 170 ++++--- fighters/cloud/src/acmd/smashes.rs | 180 ++++---- fighters/cloud/src/acmd/specials.rs | 682 ++++++++++++++-------------- fighters/cloud/src/acmd/throws.rs | 36 +- fighters/cloud/src/acmd/tilts.rs | 130 +++--- fighters/cloud/src/lib.rs | 6 +- fighters/cloud/src/opff.rs | 74 ++- 10 files changed, 837 insertions(+), 851 deletions(-) diff --git a/fighters/cloud/src/acmd/aerials.rs b/fighters/cloud/src/acmd/aerials.rs index 98e07a9cc7..6aa001b793 100644 --- a/fighters/cloud/src/acmd/aerials.rs +++ b/fighters/cloud/src/acmd/aerials.rs @@ -1,289 +1,287 @@ use super::*; -unsafe extern "C" fn cloud_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 11.0/(19.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 45, 95, 0, 40, 4.0, 3.0, 13.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.05); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 0.05); + FT_MOTION_RATE(agent, 11.0/(19.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 95, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 55, 95, 0, 45, 3.0, 3.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 45, 95, 0, 40, 4.0, 3.0, 13.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.05); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 0.05); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } } -unsafe extern "C" fn cloud_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0/(17.4-16.0)); + FT_MOTION_RATE(agent, 1.0/(17.4-16.0)); frame(lua_state, 17.4); - FT_MOTION_RATE(fighter, 3.0/(19.0-17.4)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 0.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(19.0-17.4)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 0.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("haver"), 13.0, 45, 95, 0, 30, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 14.0, 270, 100, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 270, 60, 0, 20, 4.0, 0.0, 8.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 77.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn cloud_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(10.5-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(10.5-6.0)); } frame(lua_state, 10.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(14.0-10.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 13.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(14.0-10.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.0, 361, 111, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.0, 361, 111, 0, 20, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 13.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn cloud_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 78, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 78, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 78, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 80, 80, 0, 45, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn cloud_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_cloud_sword3"), Hash40::new("tex_cloud_sword4"), 3, Hash40::new("haver"), 0.0, 1.5, -1.2, Hash40::new("haver"), 0.0, 20.5, -1.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_cloud_sword3"), Hash40::new("tex_cloud_sword4"), 3, Hash40::new("haver"), 0.0, 1.5, -1.2, Hash40::new("haver"), 0.0, 20.5, -1.2, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, 0.14); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, 0.14); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } } -unsafe extern "C" fn cloud_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 270, 71, 0, 10, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 270, 65, 0, 10, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 270, 71, 0, 10, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 13.0, 270, 105, 0, 30, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 270, 105, 0, 30, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 13.0, 270, 105, 0, 30, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 65, 55, 0, 80, 4.0, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } wait(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, 0.5); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("cloud_speedline"), Hash40::new("haver"), 0, 4, 0, -90, 0, 0, 0.8, true); - LAST_EFFECT_SET_COLOR(fighter, 0.627, 1, 0.674); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("cloud_speedline"), Hash40::new("haver"), 0, 4, 0, -90, 0, 0, 0.8, true); + LAST_EFFECT_SET_COLOR(agent, 0.627, 1, 0.674); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, true, true); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_CLOUD_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, true, true); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attackairn", cloud_attack_air_n_game) - .acmd("game_attackairf", cloud_attack_air_f_game) - .acmd("expression_attackairf", cloud_attack_air_f_expression) - .acmd("game_attackairb", cloud_attack_air_b_game) - .acmd("expression_attackairb", cloud_attack_air_b_expression) - .acmd("game_attackairhi", cloud_attack_air_hi_game) - .acmd("expression_attackairhi", cloud_attack_air_hi_expression) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", cloud_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/cloud/src/acmd/ground.rs b/fighters/cloud/src/acmd/ground.rs index 493006d6d0..7ecad2cd95 100644 --- a/fighters/cloud/src/acmd/ground.rs +++ b/fighters/cloud/src/acmd/ground.rs @@ -1,109 +1,107 @@ use super::*; -unsafe extern "C" fn cloud_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 60, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 60, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.5, 82, 42, 0, 24, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.5, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn cloud_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 361, 25, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 30, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 361, 25, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 35, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 55, 25, 0, 30, 2.5, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 25, 0, 35, 3.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 25, 0, 35, 3.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn cloud_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 30, 50, 0, 75, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 30, 50, 0, 75, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 60, 2.5, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 11.0, 60, 70, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 60, 2.5, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("handr"), 11.0, 60, 70, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } //frame(lua_state, 10.0); //if is_excute(fighter) { // ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); //} frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 8.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 8.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 65, 60, 0, 100, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attack11", cloud_attack_11_game) - .acmd("game_attack12", cloud_attack_12_game) - .acmd("game_attack13", cloud_attack_13_game) - .acmd("game_attackdash", cloud_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/cloud/src/acmd/mod.rs b/fighters/cloud/src/acmd/mod.rs index 6312b876a0..4ef668d792 100644 --- a/fighters/cloud/src/acmd/mod.rs +++ b/fighters/cloud/src/acmd/mod.rs @@ -8,12 +8,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/other.rs b/fighters/cloud/src/acmd/other.rs index 0a91c06900..ef12ffbcd9 100644 --- a/fighters/cloud/src/acmd/other.rs +++ b/fighters/cloud/src/acmd/other.rs @@ -1,204 +1,202 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_cloud_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_cloud_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_cloud_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_cloud_step_left_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/cloud/src/acmd/smashes.rs b/fighters/cloud/src/acmd/smashes.rs index d4ed50f5ad..5a39afeb64 100644 --- a/fighters/cloud/src/acmd/smashes.rs +++ b/fighters/cloud/src/acmd/smashes.rs @@ -1,187 +1,185 @@ use super::*; -unsafe extern "C" fn cloud_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 30, 25, 30, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 170, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 0, 100, 10, 0, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 180, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 30, 25, 30, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 170, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 0, 100, 10, 0, 4.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 180, 100, 10, 0, 4.5, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_01, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 15, 100, 80, 0, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 15, 100, 50, 0, 5.2, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 170, 100, 10, 0, 5.2, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 15, 100, 80, 0, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 15, 100, 50, 0, 5.2, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 170, 100, 10, 0, 5.2, 0.0, 9.0, 16.0, Some(0.0), Some(9.0), Some(6.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_SMASH_02, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 18.5, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 18.5, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 10.0, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 9.0, 18.5, Some(0.0), Some(9.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 121, 0, 42, 5.5, 0.0, 7.0, 18.5, Some(0.0), Some(7.0), Some(6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_SMASH_03, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn cloud_attack_s4_s_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 28.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.830); + FT_MOTION_RATE(agent, 0.830); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 0.738); + FT_MOTION_RATE(agent, 0.738); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 13.0, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 83, 106, 0, 50, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 83, 106, 0, 50, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 83, 106, 0, 50, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 83, 106, 0, 50, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 83, 106, 0, 50, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 60, 100, 0, 32, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 3.3, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 60, 100, 0, 32, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 60, 100, 0, 32, 3.5, 0.0, 15.0, 5.0, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn cloud_attack_hi4_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn cloud_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 170, 97, 90, 0, 2.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 155, 97, 85, 0, 2.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 160, 97, 90, 0, 3.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 150, 97, 85, 0, 3.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 170, 97, 90, 0, 2.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 155, 97, 85, 0, 2.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 160, 97, 90, 0, 3.5, 0.0, 4.0, 8.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 150, 97, 85, 0, 3.5, 0.0, 4.0, 13.5, Some(0.0), Some(4.0), Some(5.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 92, 0, 35, 4.0, 0.0, 4.4, -20.0, Some(0.0), Some(4.4), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 92, 0, 35, 4.0, 0.0, 4.4, -20.0, Some(0.0), Some(4.4), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attacks4", cloud_attack_s4_s_game) - .acmd("expression_attacks4", cloud_attack_s4_s_expression) - .acmd("game_attackhi4", cloud_attack_hi4_game) - .acmd("expression_attackhi4", cloud_attack_hi4_expression) - .acmd("game_attacklw4", cloud_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/cloud/src/acmd/specials.rs b/fighters/cloud/src/acmd/specials.rs index 11897f1b40..5ee503a754 100644 --- a/fighters/cloud/src/acmd/specials.rs +++ b/fighters/cloud/src/acmd/specials.rs @@ -1,693 +1,693 @@ use super::*; -unsafe extern "C" fn cloud_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 7.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 11.0, false); AttackModule::set_add_reaction_frame(boma, 1, 11.0, false); AttackModule::set_add_reaction_frame(boma, 2, 11.0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn cloud_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.5, 0.0, 9.0, 12.5, Some(0.0), Some(6.5), Some(13.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.5, 0.0, 17.0, 18.0, Some(0.0), Some(6.5), Some(20.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.0, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.0, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 35, 0, 30, 3.0, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 112, 35, 0, 32, 3.0, 0.0, 17.0, 19.200001, Some(0.0), Some(6.5), Some(17.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 366, 40, 0, 30, 5.0, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn cloud_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn cloud_special_air_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_DETACH_EFFECT); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::clear_speed_all(boma); if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 25, 0, 33, 7.5, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 25, 0, 43, 4.5, 0.0, 8.5, 9.5, Some(0.0), Some(8.5), Some(8.5), 0.8, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn cloud_special_s1_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } } -unsafe extern "C" fn cloud_special_air_s1_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 16.0, Some(0.0), Some(6.5), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 14.0, Some(0.0), Some(9.0), Some(16.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 4.025, 0.0, 9.0, 10.5, Some(0.0), Some(6.5), Some(10.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.05, 0.0, 19.0, 16.0, Some(0.0), Some(9.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } } -unsafe extern "C" fn cloud_special_s2_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specials2_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } } -unsafe extern "C" fn cloud_special_air_s2_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.75); +unsafe extern "C" fn game_specialairs2_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 17.7, Some(0.0), Some(9.0), Some(15.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 80, 0, 8.395, 0.0, 13.5, 15.7, Some(0.0), Some(9.0), Some(17.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } } -unsafe extern "C" fn cloud_special_s3_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_LB_SCENE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } } -unsafe extern "C" fn cloud_special_air_s3_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 16.799999, Some(0.0), Some(8.5), Some(16.799999), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 280, 100, 14, 0, 10.12, 0.0, 13.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 21, 0, 10.12, 0.0, 8.5, 12.7, Some(0.0), Some(8.5), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 12.7, Some(0.0), Some(9.0), Some(18.700001), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 95, 100, 26, 0, 8.05, 0.0, 9.0, 11.7, Some(0.0), Some(9.0), Some(11.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 26, 0, 9.2, 0.0, 9.0, 18.700001, Some(0.0), Some(9.0), Some(12.7), 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 12.7, Some(0.0), Some(9.0), Some(12.7), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 151, 0, 30, 10.35, 0.0, 18.0, 16.799999, Some(0.0), Some(9.0), Some(16.799999), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_LB_SCENE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } } -unsafe extern "C" fn cloud_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.333); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 40, 5, 0, 100, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 78, 5, 0, 100, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 5, 0, 100, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 40, 5, 0, 100, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 78, 5, 0, 100, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 5, 0, 100, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 4.0, 50, 5, 0, 100, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 4.0, 85, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 4.0, 96, 5, 0, 100, 3.5, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -12.0, Some(0.0), Some(6.0), Some(-12.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 4.0, 85, 5, 0, 100, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 4.0, 96, 5, 0, 100, 3.5, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 4.0, 90, 5, 0, 100, 3.5, 0.0, 14.5, -12.0, Some(0.0), Some(6.0), Some(-12.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } } -unsafe extern "C" fn cloud_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } -unsafe extern "C" fn cloud_special_hi2_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } } -unsafe extern "C" fn cloud_special_hi_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 2.0); + ATTACK(agent, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn cloud_special_air_hi_lb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi_lb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 100, 80, 0, 2.0, 0.0, 7.0, 3.0, Some(0.0), Some(7.0), Some(3.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 78, 100, 80, 0, 5.0, 0.0, 7.0, 5.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 102, 100, 80, 0, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); } frame(lua_state, 8.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_LB_SCENE); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 9.0, 88, 148, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.0, 88, 148, 0, 50, 3.5, 0.0, 7.0, 15.0, Some(0.0), Some(7.0), Some(6.5), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); - ATTACK(fighter, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 2.0); + ATTACK(agent, 0, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 7.0, 88, 120, 0, 50, 5.0, 0.0, 14.5, 0.0, Some(0.0), Some(6.0), Some(0.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("haver"), 5.0, 90, 50, 0, 98, 3.5, 0.0, 14.5, -10.0, Some(0.0), Some(6.0), Some(-10.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT_RESERVE); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn cloud_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.812); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.812); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 51, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 51, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 51, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 1, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 2, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); @@ -698,51 +698,51 @@ unsafe extern "C" fn cloud_special_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 3, 0.1); } frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.812); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.812); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 12.0, 0.0, 10.0, 13.0, Some(0.0), Some(10.0), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 1.0, 80, 451, 0, 37, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 451, 0, 37, 10.0, 0.0, 20.0, 9.0, Some(0.0), Some(11.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 22.0, -2.0, Some(0.0), Some(22.0), Some(-8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 436, 0, 37, 10.0, 0.0, 16.0, -11.5, Some(0.0), Some(10.0), Some(-11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 1, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); AttackModule::set_target_category(boma, 2, (*COLLISION_CATEGORY_MASK_NO_IF) as u32); @@ -753,39 +753,37 @@ unsafe extern "C" fn cloud_special_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 3, 0.1); } frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_FLAG_LB_SCENE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 80, 0, 16.0, 0.0, 15.0, 15.0, Some(0.0), Some(15.0), Some(-15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 8.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("haver"), 0.0, 361, 100, 80, 0, 5.0, 0.0, 14.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_specials1", cloud_special_s1_game) - .acmd("game_specialairs1", cloud_special_air_s1_game) - .acmd("game_specials2", cloud_special_s2_game) - .acmd("game_specialairs2", cloud_special_air_s2_game) - .acmd("game_specials1_lb", cloud_special_s1_lb_game) - .acmd("game_specialairs1_lb", cloud_special_air_s1_lb_game) - .acmd("game_specials2_lb", cloud_special_s2_lb_game) - .acmd("game_specialairs2_lb", cloud_special_air_s2_lb_game) - .acmd("game_specials3_lb", cloud_special_s3_lb_game) - .acmd("game_specialairs3_lb", cloud_special_air_s3_lb_game) - .acmd("game_specialhi", cloud_special_hi_game) - .acmd("game_specialhi2", cloud_special_hi2_game) - .acmd("game_specialhi2fall", cloud_special_hi2_fall_game) - .acmd("game_specialhi_lb", cloud_special_hi_lb_game) - .acmd("game_specialairhi_lb", cloud_special_air_hi_lb_game) - .acmd("game_speciallw", cloud_special_lw_game) - .acmd("game_specialairlw", cloud_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specialairs2); + agent.acmd("game_specials1_lb", game_specials1_lb); + agent.acmd("game_specialairs1_lb", game_specialairs1_lb); + agent.acmd("game_specials2_lb", game_specials2_lb); + agent.acmd("game_specialairs2_lb", game_specialairs2_lb); + agent.acmd("game_specials3_lb", game_specials3_lb); + agent.acmd("game_specialairs3_lb", game_specialairs3_lb); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialhi2fall", game_specialhi2fall); + agent.acmd("game_specialhi_lb", game_specialhi_lb); + agent.acmd("game_specialairhi_lb", game_specialairhi_lb); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/cloud/src/acmd/throws.rs b/fighters/cloud/src/acmd/throws.rs index a168ebf595..0a093b565f 100644 --- a/fighters/cloud/src/acmd/throws.rs +++ b/fighters/cloud/src/acmd/throws.rs @@ -1,32 +1,32 @@ use super::*; -unsafe extern "C" fn cloud_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 7.1, 0.0, Some(0.0), Some(7.1), Some(8.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 7.1, 0.0, Some(0.0), Some(7.1), Some(8.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn cloud_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -46,7 +46,7 @@ unsafe extern "C" fn cloud_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn cloud_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -66,10 +66,8 @@ unsafe extern "C" fn cloud_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_catch", cloud_catch_game) - .acmd("game_catchdash", cloud_catch_dash_game) - .acmd("game_catchturn", cloud_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/tilts.rs b/fighters/cloud/src/acmd/tilts.rs index d10d3df1e3..d90a6a9143 100644 --- a/fighters/cloud/src/acmd/tilts.rs +++ b/fighters/cloud/src/acmd/tilts.rs @@ -1,126 +1,124 @@ use super::*; -unsafe extern "C" fn cloud_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(8.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(8.5-1.0)); } frame(lua_state, 8.5); - FT_MOTION_RATE(fighter, 3.0/(10.5-8.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 111, 0, 20, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 111, 0, 20, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(10.5-8.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 111, 0, 20, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 361, 111, 0, 20, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 111, 0, 20, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE(fighter, 1.0/(11.0-10.5)); + FT_MOTION_RATE(agent, 1.0/(11.0-10.5)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 5.0, 0.0, 8.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 6.0, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 80, 103, 0, 46, 4.5, 0.0, 18.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 80, 103, 0, 46, 5.6, 0.0, 12.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 5.0, 0.0, 8.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 80, 103, 0, 46, 6.0, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 80, 103, 0, 46, 4.5, 0.0, 18.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 80, 103, 0, 46, 5.6, 0.0, 12.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 75, 103, 0, 46, 4.5, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 75, 103, 0, 46, 4.5, 0.0, 21.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 75, 103, 0, 46, 4.5, -1.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 75, 103, 0, 46, 4.5, 0.0, 21.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn cloud_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn cloud_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.92); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.92); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 78, 70, 0, 80, 3.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 3.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 4.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 78, 70, 0, 80, 3.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 3.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 78, 70, 0, 80, 4.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 70, 80, 0, 50, 2.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 2.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 3.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 70, 80, 0, 50, 2.0, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 2.5, 0.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 70, 80, 0, 50, 3.0, 6.0, -1.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("cloud") - .acmd("game_attacks3", cloud_attack_s3_s_game) - .acmd("expression_attacks3", cloud_attack_s3_s_expression) - .acmd("game_attackhi3", cloud_attack_hi3_game) - .acmd("expression_attackhi3", cloud_attack_hi3_expression) - .acmd("game_attacklw3", cloud_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/cloud/src/lib.rs b/fighters/cloud/src/lib.rs index 61c500d639..4d6a5fd27f 100644 --- a/fighters/cloud/src/lib.rs +++ b/fighters/cloud/src/lib.rs @@ -38,6 +38,8 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); + let agent = &mut Agent::new("cloud"); + acmd::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/cloud/src/opff.rs b/fighters/cloud/src/opff.rs index a7cb70ef3b..86041399fb 100644 --- a/fighters/cloud/src/opff.rs +++ b/fighters/cloud/src/opff.rs @@ -3,29 +3,29 @@ use globals::*; utils::import_noreturn!(common::opff::fighter_common_opff); -unsafe fn dspecial_cancels(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END) - && fighter.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR +unsafe fn dspecial_cancels(agent: &mut L2CFighterCommon) { + if agent.is_status(*FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END) + && agent.is_situation(*SITUATION_KIND_AIR) + && WorkModule::get_int(agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS); + WorkModule::set_int(agent.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS); } } // Fixes bug where touching ground during upB puts you into special fall for 1f before landing -unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { - if fighter.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) - && fighter.is_situation(*SITUATION_KIND_GROUND) - && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); +unsafe fn up_special_proper_landing(Agent: &mut L2CFighterCommon) { + if Agent.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) + && Agent.is_situation(*SITUATION_KIND_GROUND) + && WorkModule::is_flag(Agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL) { + Agent.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + WorkModule::off_flag(Agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } } -unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { - if !fighter.is_in_hitlag() - && !StatusModule::is_changing(fighter.module_accessor) - && fighter.is_status_one_of(&[ +unsafe fn fastfall_specials(Agent: &mut L2CFighterCommon) { + if !Agent.is_in_hitlag() + && !StatusModule::is_changing(Agent.module_accessor) + && Agent.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_STATUS_KIND_SPECIAL_LW, @@ -35,38 +35,36 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { *FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_CHARGE, *FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END ]) - && fighter.is_situation(*SITUATION_KIND_AIR) { - fighter.sub_air_check_dive(); - if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); + && Agent.is_situation(*SITUATION_KIND_AIR) { + Agent.sub_air_check_dive(); + if Agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(Agent.module_accessor)) { + Agent.clear_lua_stack(); + lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(Agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + Agent.clear_lua_stack(); + lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(Agent.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); + Agent.clear_lua_stack(); + lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(Agent.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, Agent.module_accessor); } } } } -pub unsafe extern "C" fn cloud_frame_wrapper(fighter: &mut L2CFighterCommon) { - common::opff::fighter_common_opff(fighter); +pub unsafe extern "C" fn cloud_frame_wrapper(Agent: &mut L2CFighterCommon) { + common::opff::fighter_common_opff(Agent); - dspecial_cancels(fighter); - up_special_proper_landing(fighter); - fastfall_specials(fighter); + dspecial_cancels(Agent); + up_special_proper_landing(Agent); + fastfall_specials(Agent); } -pub fn install() { - smashline::Agent::new("cloud") - .on_line(Main, cloud_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, cloud_frame_wrapper); } \ No newline at end of file From 2dff392c2826e1dd30cbbd8e2ca3158f13bf379f Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 01:43:39 -0400 Subject: [PATCH 074/172] Satan herself --- fighters/murabito/src/acmd/smashes.rs | 202 ++++----- fighters/reflet/src/acmd/aerials.rs | 426 +++++++++---------- fighters/reflet/src/acmd/ground.rs | 184 ++++---- fighters/reflet/src/acmd/mod.rs | 16 +- fighters/reflet/src/acmd/other.rs | 273 ++++-------- fighters/reflet/src/acmd/smashes.rs | 102 +++-- fighters/reflet/src/acmd/specials.rs | 90 ++-- fighters/reflet/src/acmd/throws.rs | 112 +++-- fighters/reflet/src/acmd/tilts.rs | 162 ++++--- fighters/reflet/src/elwind/acmd.rs | 7 + fighters/reflet/src/elwind/acmd/special.rs | 30 ++ fighters/reflet/src/elwind/mod.rs | 9 + fighters/reflet/src/gigafire/acmd.rs | 7 + fighters/reflet/src/gigafire/acmd/special.rs | 41 ++ fighters/reflet/src/gigafire/mod.rs | 9 + fighters/reflet/src/lib.rs | 10 +- fighters/reflet/src/opff.rs | 7 +- fighters/reflet/src/status.rs | 10 +- fighters/reflet/src/status/attack_air.rs | 10 +- fighters/reflet/src/status/float.rs | 10 +- fighters/reflet/src/status/special_n.rs | 6 +- fighters/reflet/src/thunder/acmd.rs | 7 + fighters/reflet/src/thunder/acmd/special.rs | 54 +++ fighters/reflet/src/thunder/mod.rs | 9 + 24 files changed, 906 insertions(+), 887 deletions(-) create mode 100644 fighters/reflet/src/elwind/acmd.rs create mode 100644 fighters/reflet/src/elwind/acmd/special.rs create mode 100644 fighters/reflet/src/elwind/mod.rs create mode 100644 fighters/reflet/src/gigafire/acmd.rs create mode 100644 fighters/reflet/src/gigafire/acmd/special.rs create mode 100644 fighters/reflet/src/gigafire/mod.rs create mode 100644 fighters/reflet/src/thunder/acmd.rs create mode 100644 fighters/reflet/src/thunder/acmd/special.rs create mode 100644 fighters/reflet/src/thunder/mod.rs diff --git a/fighters/murabito/src/acmd/smashes.rs b/fighters/murabito/src/acmd/smashes.rs index 611ce3fe8a..8d406333a1 100644 --- a/fighters/murabito/src/acmd/smashes.rs +++ b/fighters/murabito/src/acmd/smashes.rs @@ -1,101 +1,101 @@ use super::*; -unsafe extern "C" fn murabito_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 60.0, 29.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 60.0, 29.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn murabito_bowlingball__game_fall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn murabito_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_firework_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -118,7 +118,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -126,18 +126,18 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -160,7 +160,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -168,44 +168,44 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -213,35 +213,35 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -249,60 +249,60 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } } -unsafe extern "C" fn murabito_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } } pub fn install() { smashline::Agent::new("murabito_bowlingball") - .acmd("game_fall", murabito_bowlingball__game_fall) + .acmd("game_fall", game_fall) .install(); smashline::Agent::new("murabito") - .acmd("game_attacks4", murabito_attack_s4_s_game) - .acmd("game_attackhi4", murabito_attack_hi4_game) - .acmd("game_attacklw4", murabito_attack_lw4_game) - .acmd("effect_attacklw4", murabito_attack_lw4_effect) - .acmd("sound_attacklw4", murabito_attack_lw4_sound) + .acmd("game_attacks4", game_attacks4) + .acmd("game_attackhi4", game_attackhi4) + .acmd("game_attacklw4", game_attacklw4) + .acmd("effect_attacklw4", effect_attacklw4) + .acmd("sound_attacklw4", sound_attacklw4) .install(); smashline::Agent::new("murabito_firework") - .acmd("game_shoot", murabito_firework_shoot_game) + .acmd("game_shoot", game_shoot) .install(); } diff --git a/fighters/reflet/src/acmd/aerials.rs b/fighters/reflet/src/acmd/aerials.rs index fc5946acd7..b72155c9b5 100644 --- a/fighters/reflet/src/acmd/aerials.rs +++ b/fighters/reflet/src/acmd/aerials.rs @@ -1,53 +1,53 @@ use super::*; -unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } else { @@ -55,11 +55,11 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -71,77 +71,77 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 26.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } -unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(12.0)); + FT_MOTION_RATE(agent, 9.0/(12.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -150,11 +150,11 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -163,88 +163,88 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); app::sv_animcmd::execute(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } } -unsafe extern "C" fn reflet_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } } -unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -253,11 +253,11 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -266,71 +266,71 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } } -unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -339,16 +339,16 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { AttackModule::clear_all(boma); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -358,89 +358,89 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 24.0); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } -unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { //Air-Only Hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); //Ground-Only Hitboxes - ATTACK(fighter, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -449,71 +449,69 @@ unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attackairn", reflet_attack_air_n_game) - .acmd("effect_attackairn", reflet_attack_air_n_effect) - .acmd("game_attackairf", reflet_attack_air_f_game) - .acmd("expression_attackairf", reflet_attack_air_f_expression) - .acmd("effect_attackairf", reflet_attack_air_f_effect) - .acmd("game_attackairb", reflet_attack_air_b_game) - .acmd("effect_attackairb", reflet_attack_air_b_effect) - .acmd("game_attackairhi", reflet_attack_air_hi_game) - .acmd("effect_attackairhi", reflet_attack_air_hi_effect) - .acmd("game_attackairlw", reflet_attack_air_lw_game) - .acmd("effect_attackairlw", reflet_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/reflet/src/acmd/ground.rs b/fighters/reflet/src/acmd/ground.rs index 9598da2f4e..98d9569a0f 100644 --- a/fighters/reflet/src/acmd/ground.rs +++ b/fighters/reflet/src/acmd/ground.rs @@ -1,182 +1,180 @@ use super::*; -unsafe extern "C" fn reflet_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 2.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(22.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(22.0-7.0)); AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn reflet_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.5); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_HI_CURRENT_POINT) > 1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } frame(lua_state, 7.0); if WorkModule::get_float(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLOAT_SPECIAL_S_CURRENT_POINT) > 0.1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn reflet_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_100_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { for _ in 0..99 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 3); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - wait_loop_clear(fighter); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + wait_loop_clear(agent); } } } -unsafe extern "C" fn reflet_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } } -unsafe extern "C" fn reflet_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attack11", reflet_attack_11_game) - .acmd("expression_attack11", reflet_attack_11_expression) - .acmd("game_attack12", reflet_attack_12_game) - .acmd("expression_attack12", reflet_attack_12_expression) - .acmd("game_attack13", reflet_attack_13_game) - .acmd("game_attack100", reflet_attack_100_game) - .acmd("game_attack100end", reflet_attack_100_end_game) - .acmd("game_attackdash", reflet_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100", game_attack100); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/reflet/src/acmd/mod.rs b/fighters/reflet/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/reflet/src/acmd/mod.rs +++ b/fighters/reflet/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index a7b427c197..c650fb3d19 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -1,313 +1,182 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn reflet_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn reflet_elwind_shoot0_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_elwind_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn reflet_arcthunder_shoot2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcthunder_spark_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn reflet_thoron_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); - //let damage = (1 + (charge-1)*9/14) as f32; - let damage = 1.5 + (charge/2) as f32; if is_excute(agent) { - if charge > 0 && charge <= 8 { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); - } -} - -unsafe extern "C" fn reflet_arcfire_burn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.45); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("reflet_gigafire") - .acmd("game_burn", reflet_arcfire_burn_game) - .acmd("game_rise", reflet_arcfire_rise_game) - .acmd("effect_rise", reflet_arcfire_rise_effect) - .install(); - smashline::Agent::new("reflet") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", reflet_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("reflet_thunder") - .acmd("game_shoot2", reflet_arcthunder_shoot2_game) - .acmd("game_gigaspark", reflet_arcthunder_spark_game) - .acmd("game_tron0", reflet_thoron_game) - .install(); - smashline::Agent::new("reflet_elwind") - .acmd("game_shoot0", reflet_elwind_shoot0_game) - .acmd("game_landing", reflet_elwind_landing_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/reflet/src/acmd/smashes.rs b/fighters/reflet/src/acmd/smashes.rs index 3fc3547a9e..5e40cf17e9 100644 --- a/fighters/reflet/src/acmd/smashes.rs +++ b/fighters/reflet/src/acmd/smashes.rs @@ -1,35 +1,35 @@ use super::*; -unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.323); + FT_MOTION_RATE(agent, 0.323); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -38,11 +38,11 @@ unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -52,72 +52,72 @@ unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -128,9 +128,7 @@ unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks4", reflet_attack_s4_s_game) - .acmd("game_attacklw4", reflet_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/reflet/src/acmd/specials.rs b/fighters/reflet/src/acmd/specials.rs index f67b622627..5930cd5bd6 100644 --- a/fighters/reflet/src/acmd/specials.rs +++ b/fighters/reflet/src/acmd/specials.rs @@ -1,50 +1,50 @@ use super::*; -unsafe extern "C" fn reflet_special_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_air_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.7); //FAF is frame 61 +unsafe extern "C" fn game_specialntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.7); //FAF is frame 61 } -unsafe extern "C" fn reflet_special_air_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.35); //FAF is frame 63 +unsafe extern "C" fn game_specialairntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.35); //FAF is frame 63 } -unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -54,7 +54,7 @@ unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -64,20 +64,20 @@ unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -87,7 +87,7 @@ unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -97,19 +97,11 @@ unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_specialntronstart", reflet_special_n_tron_start_game) - .acmd( - "game_specialairntronstart", - reflet_special_air_n_tron_start_game, - ) - .acmd("game_specialntronend", reflet_special_n_tron_end_game) - .acmd( - "game_specialairntronend", - reflet_special_air_n_tron_end_game, - ) - .acmd("game_specialhi", reflet_special_hi_game) - .acmd("game_specialairhi", reflet_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialntronstart", game_specialntronstart); + agent.acmd( "game_specialairntronstart",game_specialairntronstart); + agent.acmd("game_specialntronend", game_specialntronend); + agent.acmd("game_specialairntronend",game_specialairntronend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/reflet/src/acmd/throws.rs b/fighters/reflet/src/acmd/throws.rs index 285f1bfbe7..0759b61c76 100644 --- a/fighters/reflet/src/acmd/throws.rs +++ b/fighters/reflet/src/acmd/throws.rs @@ -1,31 +1,31 @@ use super::*; -unsafe extern "C" fn reflet_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn reflet_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn reflet_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,83 +65,81 @@ unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 21, 9); + CHECK_FINISH_CAMERA(agent, 21, 9); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn reflet_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 18); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 47.0, 19.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 47.0, 19.0); frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 6); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 37.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 37.0, 11.0); frame(lua_state, 37.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_catch", reflet_catch_game) - .acmd("game_catchdash", reflet_catch_dash_game) - .acmd("game_catchturn", reflet_catch_turn_game) - .acmd("game_throwb", reflet_throw_b_game) - .acmd("game_throwhi", reflet_throw_hi_game) - .acmd("game_throwlw", reflet_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/reflet/src/acmd/tilts.rs b/fighters/reflet/src/acmd/tilts.rs index 7380fc2422..8fc01fd78a 100644 --- a/fighters/reflet/src/acmd/tilts.rs +++ b/fighters/reflet/src/acmd/tilts.rs @@ -1,158 +1,156 @@ use super::*; -unsafe extern "C" fn reflet_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 17.0/(33.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0/(33.0-13.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn reflet_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn reflet_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 4.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 4.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 5.0); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 8.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 22.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 22.0, 19.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 4.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks3", reflet_attack_s3_s_game) - .acmd("expression_attacks3", reflet_attack_s3_s_expression) - .acmd("game_attackhi3", reflet_attack_hi3_game) - .acmd("expression_attackhi3", reflet_attack_hi3_expression) - .acmd("game_attacklw3", reflet_attack_lw3_game) - .acmd("expression_attacklw3", reflet_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/reflet/src/elwind/acmd.rs b/fighters/reflet/src/elwind/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/elwind/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/elwind/acmd/special.rs b/fighters/reflet/src/elwind/acmd/special.rs new file mode 100644 index 0000000000..35e2ecae77 --- /dev/null +++ b/fighters/reflet/src/elwind/acmd/special.rs @@ -0,0 +1,30 @@ +use super::*; +unsafe extern "C" fn game_shoot0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot0", game_shoot0); + agent.acmd("game_landing", game_landing); +} diff --git a/fighters/reflet/src/elwind/mod.rs b/fighters/reflet/src/elwind/mod.rs new file mode 100644 index 0000000000..a913d87998 --- /dev/null +++ b/fighters/reflet/src/elwind/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_elwind"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/gigafire/acmd.rs b/fighters/reflet/src/gigafire/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/gigafire/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/gigafire/acmd/special.rs b/fighters/reflet/src/gigafire/acmd/special.rs new file mode 100644 index 0000000000..5dc5f3fa27 --- /dev/null +++ b/fighters/reflet/src/gigafire/acmd/special.rs @@ -0,0 +1,41 @@ +use super::*; +unsafe extern "C" fn game_burn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_rise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn effect_rise(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.45); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_burn", game_burn); + agent.acmd("game_rise", game_rise); + agent.acmd("effect_rise", effect_rise); +} diff --git a/fighters/reflet/src/gigafire/mod.rs b/fighters/reflet/src/gigafire/mod.rs new file mode 100644 index 0000000000..336fda9e89 --- /dev/null +++ b/fighters/reflet/src/gigafire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_gigafire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/lib.rs b/fighters/reflet/src/lib.rs index 1ad1fd8b2b..2c38acffe5 100644 --- a/fighters/reflet/src/lib.rs +++ b/fighters/reflet/src/lib.rs @@ -38,7 +38,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); -} + let agent = &mut Agent::new("reflet"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/opff.rs b/fighters/reflet/src/opff.rs index ac0320ba4c..19729fa05b 100644 --- a/fighters/reflet/src/opff.rs +++ b/fighters/reflet/src/opff.rs @@ -136,8 +136,7 @@ pub unsafe fn reflet_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("reflet") - .on_line(Main, reflet_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, reflet_frame_wrapper) + } diff --git a/fighters/reflet/src/status.rs b/fighters/reflet/src/status.rs index d8583fe0c2..9a84243059 100644 --- a/fighters/reflet/src/status.rs +++ b/fighters/reflet/src/status.rs @@ -33,12 +33,12 @@ unsafe extern "C" fn reflet_on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::reflet::FLOAT); } -pub fn install() { - attack_air::install(); +pub fn install(agent: &mut Agent) { + attack_air::install(agent); - special_n::install(); + special_n::install(agent); - float::install(); + float::install(agent); - Agent::new("reflet").on_start(reflet_on_start).install(); + agent.on_start(reflet_on_start); } diff --git a/fighters/reflet/src/status/attack_air.rs b/fighters/reflet/src/status/attack_air.rs index 837ceb9120..b2b0b6d2e9 100644 --- a/fighters/reflet/src/status/attack_air.rs +++ b/fighters/reflet/src/status/attack_air.rs @@ -25,10 +25,8 @@ unsafe extern "C" fn reflet_attack_air_main(fighter: &mut L2CFighterCommon) -> L attack_air_float_main(fighter, statuses::reflet::FLOAT.into()) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main); } diff --git a/fighters/reflet/src/status/float.rs b/fighters/reflet/src/status/float.rs index 1013e2930f..dbe7967e71 100644 --- a/fighters/reflet/src/status/float.rs +++ b/fighters/reflet/src/status/float.rs @@ -222,10 +222,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, statuses::reflet::FLOAT, float_pre) - .status(Main, statuses::reflet::FLOAT, float_main) - .status(End, statuses::reflet::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::reflet::FLOAT, float_pre); + agent.status(Main, statuses::reflet::FLOAT, float_main); + agent.status(End, statuses::reflet::FLOAT, float_end); } diff --git a/fighters/reflet/src/status/special_n.rs b/fighters/reflet/src/status/special_n.rs index 9538415d0b..ea437ed256 100644 --- a/fighters/reflet/src/status/special_n.rs +++ b/fighters/reflet/src/status/special_n.rs @@ -6,8 +6,6 @@ pub unsafe extern "C" fn init_special_n(fighter: &mut L2CFighterCommon) -> L2CVa smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n); } diff --git a/fighters/reflet/src/thunder/acmd.rs b/fighters/reflet/src/thunder/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/thunder/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/thunder/acmd/special.rs b/fighters/reflet/src/thunder/acmd/special.rs new file mode 100644 index 0000000000..04f7a25a61 --- /dev/null +++ b/fighters/reflet/src/thunder/acmd/special.rs @@ -0,0 +1,54 @@ +use super::*; +unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 25.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn game_tron0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); + //let damage = (1 + (charge-1)*9/14) as f32; + let damage = 1.5 + (charge/2) as f32; + if is_excute(agent) { + if charge > 0 && charge <= 8 { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot2", game_shoot2); + agent.acmd("game_gigaspark", game_gigaspark); + agent.acmd("game_tron0", game_tron0); +} diff --git a/fighters/reflet/src/thunder/mod.rs b/fighters/reflet/src/thunder/mod.rs new file mode 100644 index 0000000000..a65c112871 --- /dev/null +++ b/fighters/reflet/src/thunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_gigafire"); + acmd::install(agent); + agent.install(); +} From d5e9d81ae61d80c8edf7662bd88281560d5a4167 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 12:32:51 -0400 Subject: [PATCH 075/172] Annoying bird! (delirious edition) --- fighters/falco/src/acmd/aerials.rs | 406 ++++++++++---------- fighters/falco/src/acmd/ground.rs | 98 +++-- fighters/falco/src/acmd/mod.rs | 16 +- fighters/falco/src/acmd/other.rs | 72 ++-- fighters/falco/src/acmd/smashes.rs | 114 +++--- fighters/falco/src/acmd/specials.rs | 352 +++++++++-------- fighters/falco/src/acmd/throws.rs | 90 ++--- fighters/falco/src/acmd/tilts.rs | 154 ++++---- fighters/falco/src/blaster/acmd.rs | 7 + fighters/falco/src/blaster/acmd/special.rs | 46 +++ fighters/falco/src/blaster/mod.rs | 9 + fighters/falco/src/illusion/acmd.rs | 7 + fighters/falco/src/illusion/acmd/special.rs | 12 + fighters/falco/src/illusion/mod.rs | 9 + fighters/falco/src/lib.rs | 8 +- fighters/falco/src/opff.rs | 6 +- fighters/falco/src/status.rs | 10 +- fighters/falco/src/status/special_hi.rs | 18 +- fighters/falco/src/status/special_lw.rs | 32 +- fighters/falco/src/status/special_s.rs | 10 +- 20 files changed, 750 insertions(+), 726 deletions(-) create mode 100644 fighters/falco/src/blaster/acmd.rs create mode 100644 fighters/falco/src/blaster/acmd/special.rs create mode 100644 fighters/falco/src/blaster/mod.rs create mode 100644 fighters/falco/src/illusion/acmd.rs create mode 100644 fighters/falco/src/illusion/acmd/special.rs create mode 100644 fighters/falco/src/illusion/mod.rs diff --git a/fighters/falco/src/acmd/aerials.rs b/fighters/falco/src/acmd/aerials.rs index f6c5d37105..364b7ff41c 100644 --- a/fighters/falco/src/acmd/aerials.rs +++ b/fighters/falco/src/acmd/aerials.rs @@ -1,394 +1,392 @@ use super::*; -unsafe extern "C" fn falco_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 12.0, 361, 100, 0, 10, 3.7, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 3.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 100, 0, 10, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legl"), 12.0, 361, 100, 0, 10, 3.7, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 100, 0, 10, 3.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 10, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(31.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 361, 90, 0, 15, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(31.0-8.0)); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 15, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 361, 90, 0, 15, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 90, 0, 15, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 15, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 18.0/(43.0-31.0)); + FT_MOTION_RATE(agent, 18.0/(43.0-31.0)); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 43.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn falco_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackhard_l01")); } } -unsafe extern "C" fn falco_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, -8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 6, -8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn falco_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.700) + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.700) } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000) + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000) } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 3.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 366, 100, 33, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 3.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 100, 33, 0, 5.5, 0.0, 11.0, 1.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 366, 100, 33, 0, 4.5, 3.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 2.0, 366, 100, 33, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.599); + FT_MOTION_RATE(agent, 0.599); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 3.0, 0.0, 10.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 5.0, 0.0, 10.0, 6.0, Some(0.0), Some(11.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 50, 130, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 4.0, 50, 130, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 3.0, 0.0, 10.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 130, 0, 40, 5.0, 0.0, 10.0, 6.0, Some(0.0), Some(11.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 50, 130, 40, 0, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 4.0, 50, 130, 40, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //FT_MOTION_RATE(fighter, 16.0/(43.0-22.0)); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn falco_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } } -unsafe extern "C" fn falco_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { } +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } -unsafe extern "C" fn falco_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -1, 4, -2, -30, -4, -144, 0.6, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -1, 4, -2, -30, -4, -144, 0.6, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 6, 3, -20, -10, -144, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 6, 3, -20, -10, -144, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 8, 3, -33, -20, -144, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 8, 3, -33, -20, -144, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 2); } } -unsafe extern "C" fn falco_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, 0 as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 7, false, 0 as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0 as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("arml"), app::AttackDirectionAxis(*ATTACK_DIRECTION_X), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_attackhard_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_attackhard_l01")); } } -unsafe extern "C" fn falco_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 14.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 100, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legr"), 14.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 100, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(27.0-8.0)); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(27.0-8.0)); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 361, 110, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 361, 110, 0, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 0, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 15.0/(38.0-30.0)); + FT_MOTION_RATE(agent, 15.0/(38.0-30.0)); } frame(lua_state, 38.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn falco_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 9.0, -3.5, 23, 120, 200, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 2.0, 9.0, -3.5, 23, 120, 200, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 10.5, -10.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 10.5, -10.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn falco_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn falco_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.857); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.857); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.620); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.620); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.5, 70, 110, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.2, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.5, 70, 110, 0, 35, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5, 70, 110, 0, 35, 4.2, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe fn falco_attack_air_hi_effect(fighter: &mut L2CAgentBase){ - let lua_state: u64 = fighter.lua_state_agent; +unsafe fn game_attackairhi(agent: &mut L2CAgentBase){ + let lua_state: u64 = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter ,Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -70, 90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 4.0) + if is_excute(agent) { + EFFECT_FOLLOW(agent ,Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -70, 90, 1, true); + LAST_EFFECT_SET_RATE(agent, 4.0) } frame(lua_state,11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -140, 90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 4.0) + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 11, 0, 180, -140, 90, 1, true); + LAST_EFFECT_SET_RATE(agent, 4.0) } } -unsafe extern "C" fn falco_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.444); + FT_MOTION_RATE(agent, 0.444); frame(lua_state, 6.5); // effectively f4 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); // f5 - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 10.0); // f6 - MotionModule::set_rate(fighter.boma(), 0.684); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + MotionModule::set_rate(agent.boma(), 0.684); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 290, 92, 0, 15, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, 3.5, 0.0, -1.0, None, None, None, 1.3, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 290, 72, 0, 20, 5.5, -2.1, 0.0, -1.0, None, None, None, 1.3, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.42); // f10 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 290, 92, 0, 12, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, 3.5, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 290, 57, 0, 24, 4.0, -2.1, 0.0, -1.0, None, None, None, 1.0, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); // f25 - FT_MOTION_RATE(fighter, 27.0/(55.0-23.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 27.0/(55.0-23.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); // f32 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attackairn", falco_attack_air_n_game) - .acmd("sound_attackairn", falco_attack_air_n_sound) - .acmd("effect_attackairn", falco_attack_air_n_effect) - .acmd("expression_attackairn", falco_attack_air_n_expression) - .acmd("game_attackairf", falco_attack_air_f_game) - .acmd("sound_attackairf", falco_attack_air_f_sound) - .acmd("game_landingairf", falco_landing_air_f_game) - .acmd("effect_attackairf", falco_attack_air_f_effect) - .acmd("expression_attackairf", falco_attack_air_f_expression) - .acmd("sound_attackairb", falco_attack_air_b_sound) - .acmd("game_attackairb", falco_attack_air_b_game) - .acmd("effect_attackairb", falco_attack_air_b_effect) - .acmd("expression_attackairb", falco_attack_air_b_expression) - .acmd("game_attackairhi", falco_attack_air_hi_game) - .acmd("game_attackairlw", falco_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw) } diff --git a/fighters/falco/src/acmd/ground.rs b/fighters/falco/src/acmd/ground.rs index 5f76979b09..a7ab5e404e 100644 --- a/fighters/falco/src/acmd/ground.rs +++ b/fighters/falco/src/acmd/ground.rs @@ -1,102 +1,100 @@ use super::*; -unsafe extern "C" fn falco_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn falco_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 70, 40, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 70, 40, 0, 30, 3.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 30, 0, 30, 3.0, 0.0, 3.5, 3.5, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn falco_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("arml"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn falco_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 80, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 40, 70, 0, 70, 3.5, -2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attack11", falco_attack_11_game) - .acmd("game_attack12", falco_attack_12_game) - .acmd("expression_attack12", falco_attack_12_expression) - .acmd("game_attackdash", falco_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/falco/src/acmd/mod.rs b/fighters/falco/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/falco/src/acmd/mod.rs +++ b/fighters/falco/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index e218eb6289..3fe6952772 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -116,7 +116,7 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -134,7 +134,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn falco_turn_dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -174,7 +174,7 @@ unsafe extern "C" fn falco_blaster_bullet_fly_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_escapeair(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); @@ -185,7 +185,7 @@ unsafe extern "C" fn escape_air_sound(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_slide_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); @@ -196,7 +196,7 @@ unsafe extern "C" fn escape_air_slide_sound(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_n_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_escapen(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); @@ -207,7 +207,7 @@ unsafe extern "C" fn escape_n_sound(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn wall_jump_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_passivewalljump(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); @@ -218,7 +218,7 @@ unsafe extern "C" fn wall_jump_sound(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -233,7 +233,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -246,36 +246,18 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } - -unsafe extern "C" fn falco_illusion_move_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - } -} - -pub fn install() { - smashline::Agent::new("falco_illusion") - .acmd("game_moveair", falco_illusion_move_air_game) - .install(); - smashline::Agent::new("falco") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", falco_turn_dash_game) - .acmd("sound_escapeair", escape_air_sound) - .acmd("sound_escapeairslide", escape_air_slide_sound) - .acmd("sound_escapen", escape_n_sound) - .acmd("sound_passivewalljump", wall_jump_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("falco_blaster_bullet") - .acmd("game_fly", falco_blaster_bullet_fly_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_escapeair", sound_escapeair); + agent.acmd("sound_escapeairslide", sound_escapeairslide); + agent.acmd("sound_escapen", sound_escapen); + agent.acmd("sound_passivewalljump", sound_passivewalljump); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/falco/src/acmd/smashes.rs b/fighters/falco/src/acmd/smashes.rs index d0b88bdf3c..3afcef09f4 100644 --- a/fighters/falco/src/acmd/smashes.rs +++ b/fighters/falco/src/acmd/smashes.rs @@ -1,112 +1,110 @@ use super::*; -unsafe extern "C" fn falco_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.556); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.556); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 2.2, 0.0, 1.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 3.0, 4.0, 1.8, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 4.0, 8.0, 2.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 2.2, 0.0, 1.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 3.0, 4.0, 1.8, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.0, 361, 95, 0, 42, 4.0, 8.0, 2.2, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 107, 0, 15, 6.0, 0.0, 5.0, 12.0, Some(0.0), Some(5.0), Some(6.0), 1.0, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 107, 0, 15, 6.0, 0.0, 5.0, 12.0, Some(0.0), Some(5.0), Some(6.0), 1.0, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn falco_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 130, 15, 0, 50, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 110, 100, 100, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 4.0, 95, 100, 100, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 4.0, 127, 100, 100, 0, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("top"), 4.0, 127, 100, 100, 0, 5.5, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 130, 15, 0, 50, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 110, 100, 100, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 4.0, 95, 100, 100, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 4.0, 127, 100, 100, 0, 4.0, 7.7, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("top"), 4.0, 127, 100, 100, 0, 5.5, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 3.5, 7.0, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 110, 15, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 110, 15, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 3.5, 7.0, -1.3, -1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 5.0, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legl"), 13.0, 80, 105, 0, 28, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 5.0, 7.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneel"), 13.0, 80, 105, 0, 28, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legl"), 13.0, 80, 105, 0, 28, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attacks4", falco_attack_s4_s_game) - .acmd("expression_attacks4", falco_attack_s4_s_expression) - .acmd("game_attackhi4", falco_attack_hi4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index 1cde601631..a5c5a790af 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn falco_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(14.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(14.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); @@ -15,37 +15,37 @@ unsafe extern "C" fn falco_special_n_start_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn falco_special_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //DamageModule::add_damage(boma, 1.0, 0); - FT_MOTION_RATE(fighter, 10.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 10.0/(4.0-1.0)); WorkModule::on_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("loop"), false, 0.0); } } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.25); + FT_MOTION_RATE(agent, 0.25); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); } } -unsafe extern "C" fn falco_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(5.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ ArticleModule::change_motion(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("open"), false, 0.0); @@ -53,17 +53,17 @@ unsafe extern "C" fn falco_special_air_n_start_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn falco_special_air_n_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //DamageModule::add_damage(boma, 1.0, 0); WorkModule::on_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); //DamageModule::add_damage(boma, 1.0, 0); ArticleModule::generate_article(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER_BULLET, false, 0); if ArticleModule::is_exist(boma, *FIGHTER_FALCO_GENERATE_ARTICLE_BLASTER){ @@ -71,99 +71,99 @@ unsafe extern "C" fn falco_special_air_n_loop_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); if WorkModule::is_flag(boma,*FIGHTER_FALCO_BLASTER_STATUS_WORK_ID_FLAG_LOOP){ //laser loop motion rate(changing this allows for faster or slower sequential lasers from the first) - FT_MOTION_RATE(fighter,0.10); + FT_MOTION_RATE(agent,0.10); } } } -unsafe extern "C" fn falco_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { } +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } - unsafe extern "C" fn falco_special_hi_hold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); + unsafe extern "C" fn game_specialhiholdair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 40, 0, 30, 7.0, 0.0, 6.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 40, 0, 30, 7.0, 0.0, 6.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); let target = Vector2f { x: 0.0, y: 5.0 }; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &target, 8, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } } -unsafe extern "C" fn falco_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 16.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 16.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn falco_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); ReflectorModule::set_status(boma, *FIGHTER_FALCO_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 84, 48, 0, 92, 6.5, 0.0, 7.0, -2.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); ReflectorModule::set_status(boma, *FIGHTER_FALCO_REFLECTOR_KIND_REFLECTOR, app::ShieldStatus(*SHIELD_STATUS_NORMAL), *FIGHTER_REFLECTOR_GROUP_EXTEND); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.7); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { //LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); - EffectModule::preset_limit_num(fighter.module_accessor, 2); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); + EffectModule::preset_limit_num(agent.module_accessor, 2); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); //FLASH(fighter, 1, 1, 1, 0.627); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } // frame(lua_state, 1.0); // if is_excute(fighter) { @@ -178,144 +178,144 @@ unsafe extern "C" fn falco_special_lw_effect(fighter: &mut L2CAgentBase) { // } } -unsafe extern "C" fn falco_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_on"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn falco_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); } } -unsafe extern "C" fn falco_special_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_item_item_get")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_item_item_get")); } } -unsafe extern "C" fn game_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairlwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn effect_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if !VarModule::is_flag(fighter.battle_object, vars::falco::status::SET_EFFECT) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2, 0, 0, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.2, 0, -0.5, 0, 0, 0, 1, true); - VarModule::on_flag(fighter.battle_object, vars::falco::status::SET_EFFECT); + if !VarModule::is_flag(agent.battle_object, vars::falco::status::SET_EFFECT) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2, 0, 0, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.2, 0, -0.5, 0, 0, 0, 1, true); + VarModule::on_flag(agent.battle_object, vars::falco::status::SET_EFFECT); } } - if is_excute(fighter) { - FLASH(fighter, 0, 0.5, 1, 0.25); + if is_excute(agent) { + FLASH(agent, 0, 0.5, 1, 0.25); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); } -unsafe extern "C" fn sound_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //STOP_SE(fighter, Hash40::new("se_falco_special_l02")); //PLAY_STATUS(fighter, Hash40::new("se_falco_special_l02")); } } -unsafe extern "C" fn expression_speciallwloop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_animcmd::wait_loop_sync_mot(fighter.lua_state_agent); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_animcmd::wait_loop_sync_mot(agent.lua_state_agent); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } -unsafe extern "C" fn game_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn effect_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn sound_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn expression_speciallwend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_shield_off"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn falco_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn falco_special_n_start_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_special_n02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_special_n02")); } } -unsafe extern "C" fn falco_special_air_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn falco_special_air_n_start_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_special_n02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_special_n02")); } } @@ -344,40 +344,38 @@ unsafe extern "C" fn falco_special_air_n_start_sound(fighter: &mut L2CAgentBase) // } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_specialnstart", falco_special_n_start_game) - .acmd("game_specialnloop", falco_special_n_loop_game) - .acmd("game_specialairnstart", falco_special_air_n_start_game) - .acmd("game_specialairnloop", falco_special_air_n_loop_game) - .acmd("game_specialairsend", falco_special_air_s_end_game) - .acmd("game_specialhiholdair", falco_special_hi_hold) - .acmd("game_specialhi", falco_special_hi_game) - .acmd("game_speciallw", falco_special_lw_game) - .acmd("game_specialairlw", falco_special_air_lw_game) - .acmd("effect_speciallw", falco_special_lw_effect) - .acmd("effect_specialairlw", falco_special_lw_effect) - .acmd("expression_speciallw", falco_special_lw_expression) - .acmd("expression_specialairlw", falco_special_lw_expression) - .acmd("sound_speciallw", falco_special_lw_sound) - .acmd("sound_specialairlw", falco_special_air_lw_sound) - .acmd("game_speciallwloop", game_speciallwloop) - .acmd("game_specialairlwloop", game_specialairlwloop) - .acmd("effect_speciallwloop", effect_speciallwloop) - .acmd("effect_specialairlwloop", effect_speciallwloop) - .acmd("sound_speciallwloop", sound_speciallwloop) - .acmd("sound_specialairlwloop", sound_speciallwloop) - .acmd("expression_speciallwloop", expression_speciallwloop) - .acmd("expression_specialairlwloop", expression_speciallwloop) - .acmd("game_speciallwend", game_speciallwend) - .acmd("game_specialairlwend", game_speciallwend) - .acmd("effect_speciallwend", effect_speciallwend) - .acmd("effect_specialairlwend", effect_speciallwend) - .acmd("sound_speciallwend", sound_speciallwend) - .acmd("sound_specialairlwend", sound_speciallwend) - .acmd("expression_speciallwend", expression_speciallwend) - .acmd("expression_specialairlwend", expression_speciallwend) - .acmd("sound_specialnstart", falco_special_n_start_sound) - .acmd("sound_specialairnstart", falco_special_air_n_start_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnstart", game_specialairnstart); + agent.acmd("game_specialairnloop", game_specialairnloop); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhiholdair", game_specialhiholdair); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_specialairlw); + agent.acmd("game_speciallwloop", game_speciallwloop); + agent.acmd("game_specialairlwloop", game_specialairlwloop); + agent.acmd("effect_speciallwloop", effect_speciallwloop); + agent.acmd("effect_specialairlwloop", effect_speciallwloop); + agent.acmd("sound_speciallwloop", sound_speciallwloop); + agent.acmd("sound_specialairlwloop", sound_speciallwloop); + agent.acmd("expression_speciallwloop", expression_speciallwloop); + agent.acmd("expression_specialairlwloop", expression_speciallwloop); + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("game_specialairlwend", game_speciallwend); + agent.acmd("effect_speciallwend", effect_speciallwend); + agent.acmd("effect_specialairlwend", effect_speciallwend); + agent.acmd("sound_speciallwend", sound_speciallwend); + agent.acmd("sound_specialairlwend", sound_speciallwend); + agent.acmd("expression_speciallwend", expression_speciallwend); + agent.acmd("expression_specialairlwend", expression_speciallwend); + agent.acmd("sound_specialnstart", falco_special_n_start_sound); + agent.acmd("sound_specialairnstart", falco_special_air_n_start_sound); } diff --git a/fighters/falco/src/acmd/throws.rs b/fighters/falco/src/acmd/throws.rs index 52a62c5b5a..4d63214fda 100644 --- a/fighters/falco/src/acmd/throws.rs +++ b/fighters/falco/src/acmd/throws.rs @@ -1,95 +1,71 @@ use super::*; -unsafe extern "C" fn falco_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(9.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn falco_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("trans"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn falco_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, -4.0, Some(0.0), Some(7.2), Some(-14.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("trans"), 4.1, 0.0, 7.2, -4.0, Some(0.0), Some(7.2), Some(-14.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } - -unsafe extern "C" fn falco_blaster_bullet_flythrowhi_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn falco_blaster_bullet_flythrowb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - - frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -pub fn install() { - smashline::Agent::new("falco_blaster_bullet") - .acmd("game_flythrowhi", falco_blaster_bullet_flythrowhi_game) - .acmd("game_flythrowb", falco_blaster_bullet_flythrowb_game) - .install(); - smashline::Agent::new("falco") - .acmd("game_catch", falco_catch_game) - .acmd("game_catchdash", falco_catch_dash_game) - .acmd("game_catchturn", falco_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/falco/src/acmd/tilts.rs b/fighters/falco/src/acmd/tilts.rs index db58cbc631..c372d4182c 100644 --- a/fighters/falco/src/acmd/tilts.rs +++ b/fighters/falco/src/acmd/tilts.rs @@ -1,145 +1,143 @@ use super::*; -unsafe extern "C" fn falco_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter){ - FT_MOTION_RATE(fighter,1.400) + if is_excute(agent){ + FT_MOTION_RATE(agent,1.400) } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000) + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000) } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 135, 100, 100, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 135, 100, 100, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 135, 100, 90, 0, 6.0, 0.0, 9.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.5, 95, 100, 50, 0, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.5, 95, 100, 50, 0, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.5, 367, 100, 40, 0, 6.0, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.5, 95, 100, 50, 0, 5.0, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.5, 95, 100, 50, 0, 5.0, 1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.5, 367, 100, 40, 0, 6.0, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 75, 215, 0, 20, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 7.0, 6.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 75, 215, 0, 20, 6.0, -1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 75, 215, 0, 20, 7.0, 6.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state,18.0); - if is_excute(fighter){ - FT_MOTION_RATE(fighter, 1.200) + if is_excute(agent){ + FT_MOTION_RATE(agent, 1.200) } } -unsafe extern "C" fn falco_attack_s3hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_s3lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn falco_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 11.0, 75, 140, 0, 25, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 10.5, 75, 140, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 10.0, 75, 140, 0, 25, 2.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 11.0, 75, 140, 0, 25, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 10.5, 75, 140, 0, 25, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 10.0, 75, 140, 0, 25, 2.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 12.0/(28.0-20.0)); + FT_MOTION_RATE(agent, 12.0/(28.0-20.0)); frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("falco_arc"), Hash40::new("top"), 0, 3, 4.3, 0, -20, 188, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("falco_arc"), Hash40::new("top"), 0, 3, 4.3, 0, -20, 188, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("falco") - .acmd("game_attackhi3", falco_attack_hi3_game) - .acmd("game_attacks3hi", falco_attack_s3hi_game) - .acmd("game_attacks3", falco_attack_s3_game) - .acmd("game_attacks3lw", falco_attack_s3lw_game) - .acmd("game_attacklw3", falco_attack_lw3_game) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/falco/src/blaster/acmd.rs b/fighters/falco/src/blaster/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/falco/src/blaster/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/falco/src/blaster/acmd/special.rs b/fighters/falco/src/blaster/acmd/special.rs new file mode 100644 index 0000000000..b1a2b583bc --- /dev/null +++ b/fighters/falco/src/blaster/acmd/special.rs @@ -0,0 +1,46 @@ +use super::*; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } +} +unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_flythrowhi", game_flythrowhi); + agent.acmd("game_flythrowb", game_flythrowb); +} diff --git a/fighters/falco/src/blaster/mod.rs b/fighters/falco/src/blaster/mod.rs new file mode 100644 index 0000000000..093648b02a --- /dev/null +++ b/fighters/falco/src/blaster/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("falco_blaster"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/falco/src/illusion/acmd.rs b/fighters/falco/src/illusion/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/falco/src/illusion/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/falco/src/illusion/acmd/special.rs b/fighters/falco/src/illusion/acmd/special.rs new file mode 100644 index 0000000000..7997f8da0f --- /dev/null +++ b/fighters/falco/src/illusion/acmd/special.rs @@ -0,0 +1,12 @@ +use super::*; +unsafe extern "C" fn game_moveair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_moveair", game_moveair) +} diff --git a/fighters/falco/src/illusion/mod.rs b/fighters/falco/src/illusion/mod.rs new file mode 100644 index 0000000000..a902a7d099 --- /dev/null +++ b/fighters/falco/src/illusion/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("fa"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/falco/src/lib.rs b/fighters/falco/src/lib.rs index 8e2ddcc726..98202b569a 100644 --- a/fighters/falco/src/lib.rs +++ b/fighters/falco/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("falco"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/falco/src/opff.rs b/fighters/falco/src/opff.rs index 4ed5eaf7ff..e040b5ee31 100644 --- a/fighters/falco/src/opff.rs +++ b/fighters/falco/src/opff.rs @@ -89,8 +89,6 @@ pub unsafe fn falco_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("falco") - .on_line(Main, falco_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, falco_frame_wrapper); } diff --git a/fighters/falco/src/status.rs b/fighters/falco/src/status.rs index 9905e869cf..173a1de0b4 100644 --- a/fighters/falco/src/status.rs +++ b/fighters/falco/src/status.rs @@ -22,9 +22,9 @@ extern "C" fn falco_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - special_s::install(); - special_hi::install(); - special_lw::install(); - smashline::Agent::new("falco").on_start(falco_init).install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); + agent.on_start(falco_on_start); } diff --git a/fighters/falco/src/status/special_hi.rs b/fighters/falco/src/status/special_hi.rs index dc6b65dedd..9fbc449034 100644 --- a/fighters/falco/src/status/special_hi.rs +++ b/fighters/falco/src/status/special_hi.rs @@ -49,18 +49,8 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("falco") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status( - Main, - *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .status( - End, - *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND, - special_hi_bound_end, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status( Main,*FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_main,); + agent.status(End,*FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND,special_hi_bound_end,); } diff --git a/fighters/falco/src/status/special_lw.rs b/fighters/falco/src/status/special_lw.rs index 6f0c49287c..abc38ce565 100644 --- a/fighters/falco/src/status/special_lw.rs +++ b/fighters/falco/src/status/special_lw.rs @@ -449,21 +449,19 @@ unsafe extern "C" fn special_lw_end_exec(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("falco") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_exec) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end) - .status(Pre, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_pre) - .status(Init, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_init) - .status(Main, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_main) - .status(Exec, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_exec) - .status(End, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_end) - .status(Pre, statuses::falco::SPECIAL_LW_END, special_lw_end_pre) - .status(Main, statuses::falco::SPECIAL_LW_END, special_lw_end_main) - .status(Exec, statuses::falco::SPECIAL_LW_END, special_lw_end_exec) - .status(End, statuses::falco::SPECIAL_LW_END, special_lw_end_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_exec); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(Pre, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_pre); + agent.status(Init, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_init); + agent.status(Main, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_main); + agent.status(Exec, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_exec); + agent.status(End, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_end); + agent.status(Pre, statuses::falco::SPECIAL_LW_END, special_lw_end_pre); + agent.status(Main, statuses::falco::SPECIAL_LW_END, special_lw_end_main); + agent.status(Exec, statuses::falco::SPECIAL_LW_END, special_lw_end_exec); + agent.status(End, statuses::falco::SPECIAL_LW_END, special_lw_end_end); } diff --git a/fighters/falco/src/status/special_s.rs b/fighters/falco/src/status/special_s.rs index 910fbc4b18..a0b632f0b3 100644 --- a/fighters/falco/src/status/special_s.rs +++ b/fighters/falco/src/status/special_s.rs @@ -560,9 +560,7 @@ pub unsafe extern "C" fn special_s_air_control(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("falco") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_exec); +} \ No newline at end of file From ffa41856a7c8e71884dabd32c516b23545706392 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 12:35:16 -0400 Subject: [PATCH 076/172] Kirby's worse nightmare --- fighters/metaknight/src/acmd/aerials.rs | 280 +++++----- fighters/metaknight/src/acmd/ground.rs | 142 +++-- fighters/metaknight/src/acmd/mod.rs | 16 +- fighters/metaknight/src/acmd/other.rs | 44 +- fighters/metaknight/src/acmd/smashes.rs | 164 +++--- fighters/metaknight/src/acmd/specials.rs | 516 +++++++++---------- fighters/metaknight/src/acmd/throws.rs | 188 ++++--- fighters/metaknight/src/acmd/tilts.rs | 184 ++++--- fighters/metaknight/src/lib.rs | 8 +- fighters/metaknight/src/opff.rs | 6 +- fighters/metaknight/src/status/attack_100.rs | 6 +- fighters/metaknight/src/status/mod.rs | 6 +- fighters/metaknight/src/status/special_s.rs | 6 +- 13 files changed, 774 insertions(+), 792 deletions(-) diff --git a/fighters/metaknight/src/acmd/aerials.rs b/fighters/metaknight/src/acmd/aerials.rs index b655b6ff69..630923c803 100644 --- a/fighters/metaknight/src/acmd/aerials.rs +++ b/fighters/metaknight/src/acmd/aerials.rs @@ -1,40 +1,40 @@ use super::*; -unsafe extern "C" fn metaknight_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 7.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 30, 4.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 7.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 361, 100, 0, 30, 6.5, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 100, 0, 30, 4.0, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 361, 100, 0, 30, 6.5, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 361, 100, 0, 20, 3.5, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn metaknight_attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -54,239 +54,237 @@ unsafe extern "C" fn metaknight_attack_air_n_expression(agent: &mut L2CAgentBase } } -unsafe extern "C" fn metaknight_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // AIR - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 367, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // GROUND - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 5.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 6.5, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 4.0, 11.5, Some(0.0), Some(6.0), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 4.0, 11.5, Some(0.0), Some(6.0), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 110, 0, 65, 7.0, 0.0, 1.5, 9.0, Some(0.0), Some(8.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn metaknight_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 4, 0, 90, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 4, 0, 90, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 0, 90, 0, 180, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 0, 90, 0, 180, 0.9, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_air_f"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_air_f"), false, false); } } -unsafe extern "C" fn metaknight_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_metaknight_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_metaknight_rnd_attack")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_metaknight_attackhard_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_metaknight_attackhard_s03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_metaknight_attackair_f01")); - PLAY_SE(fighter, Hash40::new("se_metaknight_attackair_l01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_metaknight_attackair_f01")); + PLAY_SE(agent, Hash40::new("se_metaknight_attackair_l01")); } } -unsafe extern "C" fn metaknight_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 11.0, 9.0); + FT_DESIRED_RATE(agent, 11.0, 9.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 4.0, -11.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 16.5, -9.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(4.0), Some(-11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(16.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 4.0, -11.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 16.5, -9.5, Some(0.0), Some(11.0), Some(-12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(4.0), Some(-11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, -1.5, -6.5, Some(0.0), Some(16.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut handle: u64 = std::u64::MAX; frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), 5, 7, 0, 0, -150, 58, 0.73, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), 5, 7, 0, 0, -150, 58, 0.73, true); + LAST_EFFECT_SET_RATE(agent, 1.5); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn sound_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_metaknight_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_metaknight_rnd_attack")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_metaknight_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_metaknight_smash_s01")); } } -unsafe extern "C" fn metaknight_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0/4.0); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0/4.0); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.032), Some(-5.065), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 17.032, -5.065, Some(0.0), Some(14.107), Some(-10.134), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 14.107, -10.134, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.032), Some(-5.065), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 18.074, 0.844, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 17.032, -5.065, Some(0.0), Some(14.107), Some(-10.134), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 67, 128, 0, 30, 4.0, 0.0, 14.107, -10.134, Some(0.0), Some(17.059), Some(6.608), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 12, 0, 10, 0, 180, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 12, 0, 10, 0, 180, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-6.5), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, -4.0, Some(0.0), Some(-4.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -4.5, -9.5, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-6.5), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, 2.0, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -6.5, -4.0, Some(0.0), Some(-4.5), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 70, 108, 0, 30, 4.0, 0.0, -4.5, -9.5, Some(0.0), Some(-4.5), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn effect_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attackairn", metaknight_attack_air_n_game) - .acmd("expression_attackairn", metaknight_attack_air_n_expression) - .acmd("game_attackairf", metaknight_attack_air_f_game) - .acmd("effect_attackairf", metaknight_attack_air_f_effect) - .acmd("sound_attackairf", metaknight_attack_air_f_sound) - .acmd("game_attackairb", metaknight_attack_air_b_game) - .acmd("effect_attackairb", effect_attackairb) - .acmd("sound_attackairb", sound_attackairb) - .acmd("game_attackairhi", metaknight_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", metaknight_attack_air_lw_game) - .acmd("effect_attackairlw", effect_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/metaknight/src/acmd/ground.rs b/fighters/metaknight/src/acmd/ground.rs index d92275acda..b62c89e0ad 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -1,116 +1,116 @@ use super::*; -unsafe extern "C" fn game_attack100(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 26.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 26.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE); } } -unsafe extern "C" fn effect_attack100(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6, -1, 20, 165, 105, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6, -1, 20, 165, 105, 0.5, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.65, 0.7)); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, 25, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, 25, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.8, 0.65)); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6.5, -1, -165, 20, -80, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 1, 6.5, -1, -165, 20, -80, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 2, -205, 160, -145, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 6, 2, -205, 160, -145, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.7, 0.85)); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 6, 1, 0, -155, 105, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 6, 1, 0, -155, 105, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.7, 0.7)); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, -45, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 0, 7, 0, 90, 0, -45, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.85, 0.65)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 4, 4, -165, 20, -95, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), 2, 4, 4, -165, 20, -95, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_air_hi"), Hash40::new("top"), -2, 6, -4, -25, -30, -60, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_air_hi"), Hash40::new("top"), -2, 6, -4, -25, -30, -60, 1, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::set_scale_last(boma, &Vector3f::new(1.0, 0.5, 0.75)); } @@ -154,12 +154,12 @@ unsafe extern "C" fn effect_attack100(fighter: &mut L2CAgentBase) { // } // } -unsafe extern "C" fn sound_attack100start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack100start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_metaknight_attack100")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_metaknight_attack100")); // match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { // 0 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack100")), // 1 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack07")), @@ -168,37 +168,35 @@ unsafe extern "C" fn sound_attack100start(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn metaknight_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.5, 65, 107, 0, 65, 5.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 7.5, 70, 107, 0, 65, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 6.5, 75, 107, 0, 67, 3.5, 0.0, -9.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.5, 65, 107, 0, 65, 5.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 7.5, 70, 107, 0, 65, 4.0, 0.0, -6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 6.5, 75, 107, 0, 67, 3.5, 0.0, -9.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 5.5, 70, 107, 0, 65, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 5.5, 70, 107, 0, 65, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attack100", game_attack100) - .acmd("effect_attack100", effect_attack100) - .acmd("sound_attack100start", sound_attack100start) - .acmd("game_attackdash", metaknight_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack100", game_attack100); + agent.acmd("effect_attack100", effect_attack100); + agent.acmd("sound_attack100start", sound_attack100start); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/metaknight/src/acmd/mod.rs b/fighters/metaknight/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/metaknight/src/acmd/mod.rs +++ b/fighters/metaknight/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index d3713c1905..3dd6546cf2 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -116,7 +116,7 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 14.0); @@ -126,7 +126,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -144,7 +144,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -158,7 +158,7 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -173,7 +173,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -187,17 +187,15 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/metaknight/src/acmd/smashes.rs b/fighters/metaknight/src/acmd/smashes.rs index 401338ad8f..96f21a3693 100644 --- a/fighters/metaknight/src/acmd/smashes.rs +++ b/fighters/metaknight/src/acmd/smashes.rs @@ -1,170 +1,168 @@ use super::*; -unsafe extern "C" fn metaknight_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 112, 0, 30, 5.0, 0.0, 5.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 102, 0, 30, 4.5, 0.0, 5.0, 13.0, Some(0.0), Some(5.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 112, 0, 30, 5.0, 0.0, 5.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 102, 0, 30, 4.5, 0.0, 5.0, 13.0, Some(0.0), Some(5.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 30, 30, 5.5, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, -10.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 130, 100, 30, 30, 4.5, 0.0, 16.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, -10.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 175, 0, 65, 7.0, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, -10.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 175, 0, 65, 5.5, 0.0, 17.0, 8.6, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 175, 0, 65, 7.0, 0.0, 20.0, -3.8, Some(0.0), Some(20.0), Some(3.2), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.01, 10.0, -0.071, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_u_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_u_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1.0, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn metaknight_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 35, 80, 0, 50, 3.8, 0.0, 4.0, 9.0, Some(0.0), Some(9.8), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 35, 80, 0, 50, 3.8, 0.0, 4.0, 9.0, Some(0.0), Some(9.8), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 35, 86, 0, 50, 4.6, 0.0, 6.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_smash_d_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_smash_d_trace"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attacks4", metaknight_attack_s4_s_game) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attackhi4", metaknight_attack_hi4_game) - .acmd("effect_attackhi4", metaknight_attack_hi4_effect) - .acmd("game_attacklw4", metaknight_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/metaknight/src/acmd/specials.rs b/fighters/metaknight/src/acmd/specials.rs index 8a98214659..a7ce4a04a3 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -1,126 +1,126 @@ use super::*; -unsafe extern "C" fn metaknight_special_n_spin_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(-5.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 9.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialnspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(-5.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 9.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn metaknight_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 5.0, 90, 120, 0, 50, 12.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 1, Hash40::new("top"), 5.0, 90, 120, 0, 50, 12.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_tornado"), false, false); +unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_tornado"), false, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); } } -unsafe extern "C" fn metaknight_special_n_spin_ground_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialnspingroundeffect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); WorkModule::set_float(boma, 500.0, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_N_SPIN_WORK_FLOAT_GROUND_EFFECT_COUNTER); } } -unsafe extern "C" fn metaknight_special_n_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int(boma, 10, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_N_SPIN_WORK_INT_EFFECT_START_FRAME); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("metaknight_tornado_smoke_l"), Hash40::new("top"), 0, -4.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn metaknight_special_air_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_tornado"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_tornado"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_tornado_end"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.4, false); } } -unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); + if is_excute(agent) { + if agent.is_stick_backward() { + PostureModule::reverse_lr(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -129,7 +129,7 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -138,7 +138,7 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -147,56 +147,56 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 61, 0, 90, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); + if is_excute(agent) { + if agent.is_stick_backward() { + PostureModule::reverse_lr(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 84, 100, 68, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 80, 90, 0, 55, 7.7, 0.0, 3.5, -2.0, Some(0.0), Some(10.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 7.0, 80, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); GroundModule::set_passable_check(boma, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -205,7 +205,7 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -214,7 +214,7 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -222,326 +222,324 @@ unsafe extern "C" fn metaknight_special_hi_loop_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn metaknight_special_hi_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialhiloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 2.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 14.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 23.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop1"), Hash40::new("top"), 0, 0, -2.5, 4, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 22.0); - if is_excute(fighter){ - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(fighter.boma()); + if is_excute(agent){ + EFFECT_FOLLOW(agent, Hash40::new("metaknight_shuttleloop2"), Hash40::new("top"), 0, -25, -4, 1, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(agent.boma()); } frame(lua_state, 30.0); - if is_excute(fighter){ - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent){ + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_special_lw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_NO_HOP); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_air_lw_f"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn metaknight_special_lw_sub_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 8.5, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.4, 20.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_air_lw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_air_lw_f"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn metaknight_special_lw_sub_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 11.2, 0.0, 7.5, 6.0, Some(0.0), Some(7.5), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 53, 114, 0, 20, 7.5, 0.0, 6.4, 21.0, Some(0.0), Some(6.4), Some(-2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_lw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_lw_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn metaknight_special_lw_sub_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 5.5, 0.0, 6.5, -16.5, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_air_lw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); ArticleModule::change_motion(boma, *FIGHTER_METAKNIGHT_GENERATE_ARTICLE_MANTLE, smash::phx::Hash40::new("special_lw_b"), false, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn metaknight_special_lw_sub_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +unsafe extern "C" fn game_speciallwsubairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 11.2, 0.0, 7.5, -6.0, Some(0.0), Some(7.5), Some(-8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 114, 0, 20, 7.5, 0.0, 6.5, -21.0, Some(0.0), Some(6.5), Some(2.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } } -unsafe extern "C" fn metaknight_special_s_finish(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsfinish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 2.0); } } -unsafe extern "C" fn metaknight_special_s_drill(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); } } -unsafe extern "C" fn metaknight_special_s_drill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 2.0); for i in 1..8 { wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); } } frame(lua_state, 43.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_specialnspin", metaknight_special_n_spin_game) - .acmd("game_specialairnend", metaknight_special_n_end_game) - .acmd("game_specialnend", metaknight_special_n_end_game) - .acmd("effect_specialnend", metaknight_special_n_end_effect) - .acmd("effect_specialnspingroundeffect", metaknight_special_n_spin_ground_effect) - .acmd("effect_specialnstart", metaknight_special_n_start_effect) - .acmd("effect_specialairnend", metaknight_special_air_n_end_effect) - .acmd("game_specialhi", metaknight_special_hi_game) - .acmd("game_specialhiloop", metaknight_special_hi_loop_game) - .acmd("effect_specialhiloop", metaknight_special_hi_loop_effect) - .acmd("effect_specialhi", metaknight_special_hi_effect) - .acmd("game_speciallwf", metaknight_special_lw_f_game) - .acmd("game_speciallwsubf", metaknight_special_lw_sub_f_game) - .acmd("game_specialairlwf", metaknight_special_air_lw_f_game) - .acmd("game_speciallwsubairf", metaknight_special_lw_sub_air_f_game) - .acmd("game_speciallwb", metaknight_special_lw_b_game) - .acmd("game_speciallwsubb", metaknight_special_lw_sub_b_game) - .acmd("game_specialairlwb", metaknight_special_air_lw_b_game) - .acmd("game_speciallwsubairb", metaknight_special_lw_sub_air_b_game) - .acmd("game_specialairsfinish", metaknight_special_s_finish) - .acmd("game_specialsend", metaknight_special_s_finish) - .acmd("game_specialsdrill", metaknight_special_s_drill) - .acmd("effect_specialsdrill", metaknight_special_s_drill_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnspin", game_specialnspin); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("effect_specialnend", effect_specialnend); + agent.acmd("effect_specialnspingroundeffect", effect_specialnspingroundeffect); + agent.acmd("effect_specialnstart", effect_specialnstart); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhiloop", game_specialhiloop); + agent.acmd("effect_specialhiloop", effect_specialhiloop); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_speciallwf", game_speciallwf); + agent.acmd("game_speciallwsubf", game_speciallwsubf); + agent.acmd("game_specialairlwf", game_specialairlwf); + agent.acmd("game_speciallwsubairf", game_speciallwsubairf); + agent.acmd("game_speciallwb", game_speciallwb); + agent.acmd("game_speciallwsubb", game_speciallwsubb); + agent.acmd("game_specialairlwb", game_specialairlwb); + agent.acmd("game_speciallwsubairb", game_speciallwsubairb); + agent.acmd("game_specialairsfinish", game_specialairsfinish); + agent.acmd("game_specialsend", game_specialairsfinish); + agent.acmd("game_specialsdrill", game_specialsdrill); + agent.acmd("effect_specialsdrill", effect_specialsdrill); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/throws.rs b/fighters/metaknight/src/acmd/throws.rs index a46e019074..13eda22739 100644 --- a/fighters/metaknight/src/acmd/throws.rs +++ b/fighters/metaknight/src/acmd/throws.rs @@ -1,193 +1,191 @@ use super::*; -unsafe extern "C" fn metaknight_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.217); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.217); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn metaknight_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.18); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.18); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn metaknight_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-13.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-13.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.08); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.08); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn metaknight_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 65, 140, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 65, 140, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 6.0, 40, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 6.0, 40, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 6.0, 60, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 100, 0, 10, 4.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 6.0, 60, 100, 0, 10, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 100, 0, 10, 4.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 140, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 140, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 6.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 4.0, 0.0, 5.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 6.0, 0.0, 5.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 75, 100, 0, 10, 4.0, 0.0, 5.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 83, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 83, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } frame(lua_state, 39.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 150, 0, 85, 9.0, 0.0, 7.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 7.0, 65, 150, 0, 85, 9.0, 0.0, 7.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 45.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 60, 130, 0, 62, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 100, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 60, 130, 0, 62, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 100, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); for i in 0..8 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 10, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); } frame(lua_state, 73.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 200, 0, 60, 7.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 200, 0, 60, 7.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 2, 0); + CHECK_FINISH_CAMERA(agent, 2, 0); } frame(lua_state, 75.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 82.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_catch", metaknight_catch_game) - .acmd("game_catchdash", metaknight_catch_dash_game) - .acmd("game_catchturn", metaknight_catch_turn_game) - .acmd("game_throwf", metaknight_throw_f_game) - .acmd("game_throwb", metaknight_throw_b_game) - .acmd("game_throwhi", metaknight_throw_hi_game) - .acmd("game_throwlw", metaknight_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/metaknight/src/acmd/tilts.rs b/fighters/metaknight/src/acmd/tilts.rs index 50b9fe5cf6..2771991e80 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -1,184 +1,182 @@ use super::*; -unsafe extern "C" fn metaknight_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn metaknight_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 6.0, 0.0, 5.5, 8.5, Some(0.0), Some(5.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 6.0, 0.0, 5.5, 8.5, Some(0.0), Some(5.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn effect_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_s1_trace"), Hash40::new("top"), -0.0, 0, -0.5, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_s1_trace"), Hash40::new("top"), -0.0, 0, -0.5, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -unsafe extern "C" fn metaknight_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); +unsafe extern "C" fn metaknight_attack_s3_s2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 4.0, 0.0, 6.0, 7.5, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 3.6, 0.0, 5.0, 16.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 4.0, 0.0, 6.0, 7.5, Some(0.0), Some(4.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 32, 3.6, 0.0, 5.0, 16.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn metaknight_attack_s3_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn metaknight_attack_s3_s3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 6.0, 0.0, 15.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 5.0, 0.0, 7.2, 14.0, Some(0.0), Some(7.2), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 6.0, 0.0, 15.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 75, 0, 83, 5.0, 0.0, 7.2, 14.0, Some(0.0), Some(7.2), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn metaknight_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 6.2, 4.0, Some(0.0), Some(6.2), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 6.2, 4.0, Some(0.0), Some(6.2), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 6.0, 0.0, 15.7, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 20.5, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 95, 130, 0, 40, 5.0, 0.0, 25.2, 0.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 6.0, 0.0, 15.7, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 95, 140, 0, 48, 5.0, 0.0, 20.5, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 95, 130, 0, 40, 5.0, 0.0, 25.2, 0.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 95, 130, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 95, 140, 0, 48, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 95, 130, 0, 40, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn metaknight_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn metaknight_attack_hi3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_status_default_int64(boma, Hash40::new("mantle").hash as i64, Hash40::new("mantle_normal").hash as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn metaknight_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn metaknight_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 3.5, 0.0, 2.1, 8.0, Some(0.0), Some(2.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 2.2, 0.0, 1.3, 13.0, Some(0.0), Some(2.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 3.5, 0.0, 2.1, 8.0, Some(0.0), Some(2.5), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 40, 116, 0, 30, 2.2, 0.0, 1.3, 13.0, Some(0.0), Some(2.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.25, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("metaknight_lw3_sword"), Hash40::new("top"), -0.371, 1.549, 15.0, 95, 10, -0.153, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("metaknight_lw3_sword"), Hash40::new("top"), -0.371, 1.549, 15.0, 95, 10, -0.153, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); } } -pub fn install() { - smashline::Agent::new("metaknight") - .acmd("game_attacks3", metaknight_attack_s3_s_game) - .acmd("effect_attacks3", effect_attacks3) - .acmd("game_attacks3s2", metaknight_attack_s3_s2_game) - .acmd("game_attacks3s3", metaknight_attack_s3_s3_game) - .acmd("game_attackhi3", metaknight_attack_hi3_game) - .acmd("expression_attackhi3", metaknight_attack_hi3_expression) - .acmd("game_attacklw3", metaknight_attack_lw3_game) - .acmd("effect_attacklw3", effect_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", metaknight_attack_s3_s_game); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3s2", metaknight_attack_s3_s2_game); + agent.acmd("game_attacks3s3", metaknight_attack_s3_s3_game); + agent.acmd("game_attackhi3", metaknight_attack_hi3_game); + agent.acmd("expression_attackhi3", metaknight_attack_hi3_expression); + agent.acmd("game_attacklw3", metaknight_attack_lw3_game); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/metaknight/src/lib.rs b/fighters/metaknight/src/lib.rs index 5537dac979..186272bdb3 100644 --- a/fighters/metaknight/src/lib.rs +++ b/fighters/metaknight/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("metaknight"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/metaknight/src/opff.rs b/fighters/metaknight/src/opff.rs index afa8ef6015..4148048250 100644 --- a/fighters/metaknight/src/opff.rs +++ b/fighters/metaknight/src/opff.rs @@ -183,8 +183,6 @@ pub unsafe fn metaknight_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("metaknight") - .on_line(Main, metaknight_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, metaknight_frame_wrapper) } \ No newline at end of file diff --git a/fighters/metaknight/src/status/attack_100.rs b/fighters/metaknight/src/status/attack_100.rs index dabb507885..34ba3cb65d 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -86,8 +86,6 @@ unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterComm 0.into() } -pub fn install() { - smashline::Agent::new("metaknight") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main) } \ No newline at end of file diff --git a/fighters/metaknight/src/status/mod.rs b/fighters/metaknight/src/status/mod.rs index 0076d80451..dc3f430310 100644 --- a/fighters/metaknight/src/status/mod.rs +++ b/fighters/metaknight/src/status/mod.rs @@ -3,7 +3,7 @@ use super::*; mod special_s; mod attack_100; -pub fn install() { - special_s::install(); - attack_100::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + attack_100::install(agent); } \ No newline at end of file diff --git a/fighters/metaknight/src/status/special_s.rs b/fighters/metaknight/src/status/special_s.rs index aade60eb33..f872d7ebfe 100644 --- a/fighters/metaknight/src/status/special_s.rs +++ b/fighters/metaknight/src/status/special_s.rs @@ -15,8 +15,6 @@ pub unsafe extern "C" fn special_s_end_end(fighter: &mut L2CFighterCommon) -> L2 ret } -pub fn install() { - smashline::Agent::new("metaknight") - .status(End, *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END, special_s_end_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END, special_s_end_end); } \ No newline at end of file From b9c920fbc952d6a319f0fb26c8e0c261330ba498 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 12:35:54 -0400 Subject: [PATCH 077/172] MEWTWO! --- fighters/mewtwo/src/acmd/aerials.rs | 270 ++++++------ fighters/mewtwo/src/acmd/ground.rs | 102 +++-- fighters/mewtwo/src/acmd/mod.rs | 16 +- fighters/mewtwo/src/acmd/other.rs | 172 ++++---- fighters/mewtwo/src/acmd/smashes.rs | 176 ++++---- fighters/mewtwo/src/acmd/specials.rs | 144 +++---- fighters/mewtwo/src/acmd/throws.rs | 130 +++--- fighters/mewtwo/src/acmd/tilts.rs | 428 +++++++++---------- fighters/mewtwo/src/bindball/acmd.rs | 7 + fighters/mewtwo/src/bindball/acmd/special.rs | 12 + fighters/mewtwo/src/bindball/mod.rs | 9 + fighters/mewtwo/src/lib.rs | 8 +- fighters/mewtwo/src/opff.rs | 6 +- fighters/mewtwo/src/status.rs | 16 +- fighters/mewtwo/src/status/attack_air.rs | 10 +- fighters/mewtwo/src/status/fall.rs | 6 +- fighters/mewtwo/src/status/float.rs | 10 +- fighters/mewtwo/src/status/jump_aerial.rs | 6 +- fighters/mewtwo/src/status/special_n.rs | 6 +- 19 files changed, 762 insertions(+), 772 deletions(-) create mode 100644 fighters/mewtwo/src/bindball/acmd.rs create mode 100644 fighters/mewtwo/src/bindball/acmd/special.rs create mode 100644 fighters/mewtwo/src/bindball/mod.rs diff --git a/fighters/mewtwo/src/acmd/aerials.rs b/fighters/mewtwo/src/acmd/aerials.rs index cf9332181a..640f650786 100644 --- a/fighters/mewtwo/src/acmd/aerials.rs +++ b/fighters/mewtwo/src/acmd/aerials.rs @@ -1,147 +1,147 @@ use super::*; -unsafe extern "C" fn mewtwo_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 235, 100, 15, 20, 4.0, 0.0, 11.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, 4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 115, 100, 15, 20, 4.0, 0.0, 2.0, -6.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 2.0, 0.0, 7.0, 4.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 12.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 2.0, 0.0, 7.0, 4.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 87, 0, 60, 12.0, 0.0, 7.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 4.2, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 4.2, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 5.0, 10.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.2, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 5.0, 10.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 7.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 84, 96, 0, 43, 4.5, 0.0, 7.7, 9.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_f_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_attack_g"), Hash40::new("mewtwo_pk_attack_g"), Hash40::new("top"), 0, 7.7, 1.8, 15, 0, 30, 1.13, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.4); + frame(agent.lua_state_agent, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_attack_g"), Hash40::new("mewtwo_pk_attack_g"), Hash40::new("top"), 0, 7.7, 1.8, 15, 0, 30, 1.13, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.4); } - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - EffectModule::kill_kind(fighter.module_accessor, Hash40::new("mewtwo_pk_attack_g"), true, true); + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + EffectModule::kill_kind(agent.module_accessor, Hash40::new("mewtwo_pk_attack_g"), true, true); } } -unsafe extern "C" fn mewtwo_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (12.0 - 1.0) / 6.4); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 12.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 13.0, 361, 105, 0, 5, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 12.0, 361, 95, 0, 5, 4.1, -0.8, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 11.0, 361, 95, 0, 5, 3.8, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 13.0, 361, 105, 0, 5, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 12.0, 361, 95, 0, 5, 4.1, -0.8, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 11.0, 361, 95, 0, 5, 3.8, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 17.0); MotionModule::set_rate(boma, (37.0 - 17.0) / 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 0.84); + LAST_EFFECT_SET_RATE(agent, 0.84); } frame(lua_state, 17.5); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_01"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_02"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_03"), true, true); @@ -153,67 +153,67 @@ unsafe extern "C" fn mewtwo_attack_air_b_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (10.0 - 1.0) / 7.0); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 10.0, 55, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 11.0, 55, 93, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 12.0, 55, 103, 0, 13, 3.7, -0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 10.0, 55, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 11.0, 55, 93, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 12.0, 55, 103, 0, 13, 3.7, -0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 11.0); - if is_excute (fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 65, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 8.0, 65, 92, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 9.0, 65, 92, 0, 13, 3.7, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute (agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 65, 92, 0, 13, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 8.0, 65, 92, 0, 13, 4.1, 0.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 9.0, 65, 92, 0, 13, 3.7, -0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn mewtwo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), }; } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_01"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_02"), true, true); EffectModule::kill_kind(boma, Hash40::new("mewtwo_tail_attack_a_03"), true, true); @@ -225,55 +225,53 @@ unsafe extern "C" fn mewtwo_attack_air_hi_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 0.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn mewtwo_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (19.0 - 1.0) / 14.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 270, 62, 0, 12, 5.5, 0.0, -7.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 105, 0, 20, 7.5, 0.0, -5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 270, 62, 0, 12, 5.5, 0.0, -7.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 105, 0, 20, 7.5, 0.0, -5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attackairn", mewtwo_attack_air_n_game) - .acmd("game_attackairf", mewtwo_attack_air_f_game) - .acmd("effect_attackairf", mewtwo_attack_air_f_effect) - .acmd("game_attackairb", mewtwo_attack_air_b_game) - .acmd("effect_attackairb", mewtwo_attack_air_b_effect) - .acmd("game_attackairhi", mewtwo_attack_air_hi_game) - .acmd("effect_attackairhi", mewtwo_attack_air_hi_effect) - .acmd("expression_attackairhi", mewtwo_attack_air_hi_expression) - .acmd("game_attackairlw", mewtwo_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/mewtwo/src/acmd/ground.rs b/fighters/mewtwo/src/acmd/ground.rs index 3327732c25..91bce5ae6a 100644 --- a/fighters/mewtwo/src/acmd/ground.rs +++ b/fighters/mewtwo/src/acmd/ground.rs @@ -1,108 +1,106 @@ use super::*; -unsafe extern "C" fn mewtwo_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 3.5, 0.0, 11.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.5, 0.0, 11.8, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 3.5, 0.0, 11.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.5, 0.0, 11.8, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 83, 40, 0, 25, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); //Jab-Lock Hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 2.5, 1.0, 3.0, 2.0, Some(1.0), Some(3.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 2.5, 1.0, 3.0, 2.0, Some(1.0), Some(3.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn mewtwo_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 18.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 69, 0, 89, 5.5, 0.0, 10.5, 18.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.5, 3.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 54, 67, 0, 80, 5.5, 0.0, 8.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 57, 0, 80, 4.3, 0.0, 8.2, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 54, 67, 0, 80, 5.5, 0.0, 8.6, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 57, 0, 80, 4.3, 0.0, 8.2, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 21.0, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 60, 60, 0, 77, 4.5, 0.0, 8.6, 14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 60, 0, 77, 3.7, 0.0, 8.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 13.0, 21.0, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 60, 0, 77, 4.5, 0.0, 8.6, 14.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 60, 0, 77, 3.7, 0.0, 8.2, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.0); } frame(lua_state, 21.0); //43 - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("mewtwo_pk_attack_e"), Hash40::new("haver"), 1.9 * PostureModule::lr(boma), 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("mewtwo_pk_attack_e"), Hash40::new("haver"), 1.9 * PostureModule::lr(boma), 0, 0, 0, 0, 0, 0.9, true); EffectModule::enable_sync_init_pos_last(boma); //LAST_EFFECT_SET_RATE(fighter, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("mewtwo_pk_attack_e"), true, true); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attack11", mewtwo_attack_11_game) - .acmd("game_attack100end", mewtwo_attack_100_end_game) - .acmd("game_attackdash", mewtwo_attack_dash_game) - .acmd("effect_attackdash", mewtwo_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/mewtwo/src/acmd/mod.rs b/fighters/mewtwo/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/mewtwo/src/acmd/mod.rs +++ b/fighters/mewtwo/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/other.rs b/fighters/mewtwo/src/acmd/other.rs index 4e214c29d2..a63bb17bc4 100644 --- a/fighters/mewtwo/src/acmd/other.rs +++ b/fighters/mewtwo/src/acmd/other.rs @@ -1,211 +1,209 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::remove(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_ESCAPEAIRDUMMY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::remove(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_ESCAPEAIRDUMMY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/smashes.rs b/fighters/mewtwo/src/acmd/smashes.rs index 50007d1682..c03f605be5 100644 --- a/fighters/mewtwo/src/acmd/smashes.rs +++ b/fighters/mewtwo/src/acmd/smashes.rs @@ -1,183 +1,181 @@ use super::*; -unsafe extern "C" fn mewtwo_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 3.0, 0.0, 10.0, 9.0, Some(0.0), Some(9.2), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 6.4, 18.799999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 3.0, 0.0, 10.0, 9.0, Some(0.0), Some(9.2), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 6.4, 18.799999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 3.0, 0.0, 11.7, -6.0, Some(0.0), Some(11.7), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 4.0, 0.0, 5.2, -6.5, Some(0.0), Some(5.2), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 3.0, 0.0, 11.7, -6.0, Some(0.0), Some(11.7), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 368, 100, 90, 0, 4.0, 0.0, 5.2, -6.5, Some(0.0), Some(5.2), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); let hit1 = Vector2f { x: 0.0, y: 24.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 7, false); AttackModule::set_vec_target_pos(boma, 4, Hash40::new("top"), &hit1, 7, false); } frame(lua_state, 10.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, -5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, 5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 100, 40, 0, 3.5, 0.0, 14.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, -5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 170, 100, 18, 0, 4.6, 0.0, 22.0, 5.8, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 100, 40, 0, 3.5, 0.0, 14.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 270, 100, 5, 0, 4.0, 0.0, 23.6, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 5.2, 0.0, 23.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 80, 111, 0, 60, 6.4, 0.0, 22.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 5.2, 0.0, 23.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 90, 111, 0, 60, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn mewtwo_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1, 0, 1.3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1, 0, 1.3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); - EFFECT_FOLLOW_NO_STOP_FLIP(fighter, Hash40::new("mewtwo_pk_attack_a"), Hash40::new("mewtwo_pk_attack_a"), Hash40::new("top"), -2.5, 21.5, 0, 0, 0, 0, 0.95, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); + EFFECT_FOLLOW_NO_STOP_FLIP(agent, Hash40::new("mewtwo_pk_attack_a"), Hash40::new("mewtwo_pk_attack_a"), Hash40::new("top"), -2.5, 21.5, 0, 0, 0, 0, 0.95, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 7.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 11.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 7.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 55, 115, 0, 20, 11.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 4.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 5.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 4.5, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 55, 118, 0, 20, 5.0, 0.0, 4.0, 13.7, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attacks4hi", mewtwo_attack_s4_hi_game) - .acmd("game_attacks4", mewtwo_attack_s4_s_game) - .acmd("game_attacks4lw", mewtwo_attack_s4_lw_game) - .acmd("game_attackhi4", mewtwo_attack_hi4_game) - .acmd("effect_attackhi4", mewtwo_attack_hi4_effect) - .acmd("game_attacklw4", mewtwo_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mewtwo/src/acmd/specials.rs b/fighters/mewtwo/src/acmd/specials.rs index 9f615de05e..b188b1beb2 100644 --- a/fighters/mewtwo/src/acmd/specials.rs +++ b/fighters/mewtwo/src/acmd/specials.rs @@ -1,148 +1,134 @@ use super::*; -unsafe extern "C" fn mewtwo_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 7.4, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 10.2, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_G); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 280, 16, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 0.0, 361, 100, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 0, 1.0, 280, 50, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 7.4, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 10.2, 0.0, 8.4, 17.0, None, None, None, *FIGHTER_STATUS_KIND_MEWTWO_THROWN, *COLLISION_SITUATION_MASK_G); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 280, 16, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 0.0, 361, 100, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 0, 1.0, 280, 50, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_catch_only(boma, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, true, true); } wait(lua_state, 4.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } frame(lua_state, 20.0); for _ in 0..6 { wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_TARGET_OBJECT_ID); let target_group = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_THROWN_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_WORK_INT_THROWN_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), target, target_group, target_no); } } frame(lua_state, 32.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); - fighter.on_flag(*FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_GRAVITY_NORMAL); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_MEWTWO_REFLECTOR_KIND_REFLECTOR, *FIGHTER_REFLECTOR_GROUP_EXTEND); + agent.on_flag(*FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_GRAVITY_NORMAL); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn mewtwo_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1.5, 0, 2, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("havel"), -1.5, 0, 2, 0, 0, 0, 0.4, true, *EF_FLIP_YZ); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("mewtwo_nenriki"), Hash40::new("top"), 0, 9, 17, 0, 90, 0, 0.45, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("mewtwo_nenriki"), Hash40::new("top"), 0, 9, 17, 0, 90, 0, 0.45, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_pk_hand"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("mewtwo_nenriki"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_nenriki"), false, true); } } -unsafe extern "C" fn mewtwo_special_hi_start_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - GroundModule::set_correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + if is_excute(agent) { + GroundModule::set_correct(agent.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); } } -unsafe extern "C" fn mewtwo_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::clear_speed_all(boma); } } -unsafe extern "C" fn mewtwo_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_MEWTWO_CLIFF_HANG_DATA_SPECIAL_HI as u32); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn mewtwo_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_BINDBALL, false, -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(53.0-24.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(53.0-24.0)); } } -unsafe extern "C" fn mewtwo_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MEWTWO_GENERATE_ARTICLE_BINDBALL, false, -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(53.0-24.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(53.0-24.0)); } } -unsafe extern "C" fn bindball_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } -} - -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_specials", mewtwo_special_s_game) - .acmd("effect_specials", mewtwo_special_s_effect) - .acmd("game_specialhistart", mewtwo_special_hi_start_game) - .acmd("game_specialairhistart", mewtwo_special_air_hi_start_game) - .acmd("game_specialairhi", mewtwo_special_air_hi_game) - .acmd("game_speciallw", mewtwo_special_lw_game) - .acmd("game_specialairlw", mewtwo_special_air_lw_game) - .install(); - smashline::Agent::new("mewtwo_bindball") - .acmd("game_shoot", bindball_shoot_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/mewtwo/src/acmd/throws.rs b/fighters/mewtwo/src/acmd/throws.rs index ee3fe14c52..44eb33db20 100644 --- a/fighters/mewtwo/src/acmd/throws.rs +++ b/fighters/mewtwo/src/acmd/throws.rs @@ -1,124 +1,122 @@ use super::*; -unsafe extern "C" fn mewtwo_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 8.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mewtwo_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 11.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 11.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.5, 4.5, Some(0.0), Some(8.5), Some(11.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.5, 4.5, Some(0.0), Some(8.5), Some(11.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mewtwo_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 1.0); + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.5, -4.5, Some(0.0), Some(8.5), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.5, -4.5, Some(0.0), Some(8.5), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn mewtwo_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 80, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 90, 80, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 43.0); - FT_MOTION_RATE_RANGE(fighter, 43.0, 78.0, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 43.0, 78.0, 27.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 78.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn mewtwo_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 74, 57, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 74, 57, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail7"), 4.0, 80, 104, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail5"), 4.0, 80, 105, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail3"), 4.0, 80, 104, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail7"), 4.0, 80, 104, 0, 40, 3.9, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail5"), 4.0, 80, 105, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail3"), 4.0, 80, 104, 0, 40, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_TAIL); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 0); + CHECK_FINISH_CAMERA(agent, 13, 0); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.85); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.85); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_catch", mewtwo_catch_game) - .acmd("game_catchdash", mewtwo_catch_dash_game) - .acmd("game_catchturn", mewtwo_catch_turn_game) - .acmd("game_throwhi", mewtwo_throw_hi_game) - .acmd("game_throwlw", mewtwo_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index 4481f900e7..55eee1058f 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -1,361 +1,359 @@ use super::*; -unsafe extern "C" fn mewtwo_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.375); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.375); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 7.0, 361, 100, 0, 15, 4.4, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 9.0, 361, 100, 0, 15, 4.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail6"), 11.0, 361, 100, 0, 15, 3.7, 1.9, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn mewtwo_attack_s3_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("s_tail1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn mewtwo_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.714); + FT_MOTION_RATE(agent, 0.714); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 9.0, 80, 81, 0, 63, 5.0, 0.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail3"), 8.0, 85, 81, 0, 54, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail5"), 6.0, 65, 71, 0, 45, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 9.0, 80, 81, 0, 63, 5.0, 0.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail3"), 8.0, 85, 81, 0, 54, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail5"), 6.0, 65, 71, 0, 45, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail1"), 9.0, 65, 81, 0, 45, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail3"), 8.0, 65, 81, 0, 45, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail1"), 9.0, 65, 81, 0, 45, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail3"), 8.0, 65, 81, 0, 45, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("s_tail7"), 5.0, 65, 71, 0, 45, 3.5, 0.5, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn mewtwo_attack_hi3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 0.9); + LAST_EFFECT_SET_RATE(agent, 0.9); } } -unsafe extern "C" fn mewtwo_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_NORMAL); - HIT_NO(fighter, 13, *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_NORMAL); + HIT_NO(agent, 13, *HIT_STATUS_NORMAL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tail2"), 9.0, 80, 84, 0, 60, 4.3, -0.2, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("s_tail4"), 8.0, 80, 84, 0, 60, 4.0, 1.2, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("s_tail7"), 5.0, 90, 84, 0, 60, 3.8, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tail2"), 9.0, 80, 84, 0, 60, 4.3, -0.2, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("s_tail4"), 8.0, 80, 84, 0, 60, 4.0, 1.2, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("s_tail7"), 5.0, 90, 84, 0, 60, 3.8, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NO(fighter, 12, *HIT_STATUS_OFF); - HIT_NO(fighter, 13, *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NO(agent, 12, *HIT_STATUS_OFF); + HIT_NO(agent, 13, *HIT_STATUS_OFF); } } -unsafe extern "C" fn mewtwo_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn mewtwo_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let color = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + if is_excute(agent) { + let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(fighter, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), }; - LAST_EFFECT_SET_RATE(fighter, 1.3); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } } -unsafe extern "C" fn mewtwo_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("mewtwo") - .acmd("game_attacks3hi", mewtwo_attack_s3_hi_game) - .acmd("effect_attacks3hi", mewtwo_attack_s3_hi_effect) - .acmd("expression_attacks3hi", mewtwo_attack_s3_hi_expression) - .acmd("game_attacks3", mewtwo_attack_s3_s_game) - .acmd("effect_attacks3", mewtwo_attack_s3_s_effect) - .acmd("expression_attacks3", mewtwo_attack_s3_expression) - .acmd("game_attacks3lw", mewtwo_attack_s3_lw_game) - .acmd("effect_attacks3lw", mewtwo_attack_s3_lw_effect) - .acmd("expression_attacks3lw", mewtwo_attack_s3_lw_expression) - .acmd("game_attackhi3", mewtwo_attack_hi3_game) - .acmd("game_attacklw3", mewtwo_attack_lw3_game) - .acmd("expression_attacklw3", mewtwo_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/mewtwo/src/bindball/acmd.rs b/fighters/mewtwo/src/bindball/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/mewtwo/src/bindball/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/mewtwo/src/bindball/acmd/special.rs b/fighters/mewtwo/src/bindball/acmd/special.rs new file mode 100644 index 0000000000..3fb90fe50f --- /dev/null +++ b/fighters/mewtwo/src/bindball/acmd/special.rs @@ -0,0 +1,12 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} diff --git a/fighters/mewtwo/src/bindball/mod.rs b/fighters/mewtwo/src/bindball/mod.rs new file mode 100644 index 0000000000..ab450f643d --- /dev/null +++ b/fighters/mewtwo/src/bindball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("mewtwo_bindball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/mewtwo/src/lib.rs b/fighters/mewtwo/src/lib.rs index 5537dac979..cc57c21860 100644 --- a/fighters/mewtwo/src/lib.rs +++ b/fighters/mewtwo/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("mewtwo"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/mewtwo/src/opff.rs b/fighters/mewtwo/src/opff.rs index 4d58f2f6e6..4876c5b731 100644 --- a/fighters/mewtwo/src/opff.rs +++ b/fighters/mewtwo/src/opff.rs @@ -144,8 +144,6 @@ pub unsafe fn mewtwo_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("mewtwo") - .on_line(Main, mewtwo_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, mewtwo_frame_wrapper) } \ No newline at end of file diff --git a/fighters/mewtwo/src/status.rs b/fighters/mewtwo/src/status.rs index e09785eca8..49cd29c0a1 100644 --- a/fighters/mewtwo/src/status.rs +++ b/fighters/mewtwo/src/status.rs @@ -30,13 +30,11 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::mewtwo::FLOAT); } -pub fn install() { - jump_aerial::install(); - attack_air::install(); - float::install(); - fall::install(); - special_n::install(); - smashline::Agent::new("mewtwo") - .on_start(on_start) - .install(); +pub fn install(agent: &mut Agent) { + jump_aerial::install(agent); + attack_air::install(agent); + float::install(agent); + fall::install(agent); + special_n::install(agent); + agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/attack_air.rs b/fighters/mewtwo/src/status/attack_air.rs index fe4b3baa68..805842ce5f 100644 --- a/fighters/mewtwo/src/status/attack_air.rs +++ b/fighters/mewtwo/src/status/attack_air.rs @@ -52,10 +52,8 @@ pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CV fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("mewtwo") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/fall.rs b/fighters/mewtwo/src/status/fall.rs index b264cfa733..81f86afd6a 100644 --- a/fighters/mewtwo/src/status/fall.rs +++ b/fighters/mewtwo/src/status/fall.rs @@ -9,8 +9,6 @@ unsafe extern "C" fn mewtwo_fall_end(fighter: &mut L2CFighterCommon) -> L2CValue return smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_FALL)(fighter); } -pub fn install() { - Agent::new("mewtwo") - .status(End, *FIGHTER_STATUS_KIND_FALL, mewtwo_fall_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_FALL, mewtwo_fall_end); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/float.rs b/fighters/mewtwo/src/status/float.rs index c9edb385e5..1f44e3186f 100644 --- a/fighters/mewtwo/src/status/float.rs +++ b/fighters/mewtwo/src/status/float.rs @@ -29,10 +29,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("mewtwo") - .status(Pre, statuses::mewtwo::FLOAT, float_pre) - .status(Main, statuses::mewtwo::FLOAT, float_main) - .status(End, statuses::mewtwo::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::mewtwo::FLOAT, float_pre); + agent.status(Main, statuses::mewtwo::FLOAT, float_main); + agent.status(End, statuses::mewtwo::FLOAT, float_end); } diff --git a/fighters/mewtwo/src/status/jump_aerial.rs b/fighters/mewtwo/src/status/jump_aerial.rs index ff982eb8a8..e7ae736947 100644 --- a/fighters/mewtwo/src/status/jump_aerial.rs +++ b/fighters/mewtwo/src/status/jump_aerial.rs @@ -7,8 +7,6 @@ unsafe extern "C" fn mewtwo_jump_aerial_main(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - Agent::new("mewtwo") - .status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, mewtwo_jump_aerial_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, mewtwo_jump_aerial_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/special_n.rs b/fighters/mewtwo/src/status/special_n.rs index 0e6eee125c..6c98e6fb91 100644 --- a/fighters/mewtwo/src/status/special_n.rs +++ b/fighters/mewtwo/src/status/special_n.rs @@ -51,8 +51,6 @@ unsafe extern "C" fn special_n_cancel_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -pub fn install() { - Agent::new("mewtwo") - .status(Main, *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL, special_n_cancel_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL, special_n_cancel_main); } \ No newline at end of file From ebcc132ad6424f6fba50825f6ffcfdf854dba58a Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Sat, 23 Mar 2024 13:31:10 -0400 Subject: [PATCH 078/172] small fixes --- fighters/cloud/src/acmd/smashes.rs | 4 ++-- fighters/falco/src/acmd/aerials.rs | 4 ++-- fighters/falco/src/status.rs | 10 +++------- fighters/metaknight/src/opff.rs | 2 +- fighters/metaknight/src/status/attack_100.rs | 2 +- fighters/mewtwo/src/opff.rs | 2 +- fighters/reflet/src/opff.rs | 3 +-- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/fighters/cloud/src/acmd/smashes.rs b/fighters/cloud/src/acmd/smashes.rs index 5a39afeb64..8e56004493 100644 --- a/fighters/cloud/src/acmd/smashes.rs +++ b/fighters/cloud/src/acmd/smashes.rs @@ -43,7 +43,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn cloud_attack_s4_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -122,7 +122,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn cloud_attack_hi4_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { diff --git a/fighters/falco/src/acmd/aerials.rs b/fighters/falco/src/acmd/aerials.rs index 364b7ff41c..c22933c3cd 100644 --- a/fighters/falco/src/acmd/aerials.rs +++ b/fighters/falco/src/acmd/aerials.rs @@ -320,7 +320,7 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } -unsafe fn game_attackairhi(agent: &mut L2CAgentBase){ +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase){ let lua_state: u64 = agent.lua_state_agent; frame(lua_state, 9.0); if is_excute(agent) { @@ -388,5 +388,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("expression_attackairb", expression_attackairb); agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw) + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/falco/src/status.rs b/fighters/falco/src/status.rs index 173a1de0b4..e555bcf98a 100644 --- a/fighters/falco/src/status.rs +++ b/fighters/falco/src/status.rs @@ -14,17 +14,13 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn falco_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_FALCO { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { special_s::install(agent); special_hi::install(agent); special_lw::install(agent); - agent.on_start(falco_on_start); + agent.on_start(on_start); } diff --git a/fighters/metaknight/src/opff.rs b/fighters/metaknight/src/opff.rs index 4148048250..257759781a 100644 --- a/fighters/metaknight/src/opff.rs +++ b/fighters/metaknight/src/opff.rs @@ -184,5 +184,5 @@ pub unsafe fn metaknight_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - agent.on_line(Main, metaknight_frame_wrapper) + agent.on_line(Main, metaknight_frame_wrapper); } \ No newline at end of file diff --git a/fighters/metaknight/src/status/attack_100.rs b/fighters/metaknight/src/status/attack_100.rs index 34ba3cb65d..995563b93a 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -87,5 +87,5 @@ unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterComm } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main) + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/opff.rs b/fighters/mewtwo/src/opff.rs index 4876c5b731..db199ee4b9 100644 --- a/fighters/mewtwo/src/opff.rs +++ b/fighters/mewtwo/src/opff.rs @@ -145,5 +145,5 @@ pub unsafe fn mewtwo_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - agent.on_line(Main, mewtwo_frame_wrapper) + agent.on_line(Main, mewtwo_frame_wrapper); } \ No newline at end of file diff --git a/fighters/reflet/src/opff.rs b/fighters/reflet/src/opff.rs index 19729fa05b..ef73ec3a8b 100644 --- a/fighters/reflet/src/opff.rs +++ b/fighters/reflet/src/opff.rs @@ -137,6 +137,5 @@ pub unsafe fn reflet_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } pub fn install(agent: &mut Agent) { - agent.on_line(Main, reflet_frame_wrapper) - + agent.on_line(Main, reflet_frame_wrapper); } From e0462535ef0c290dbbb41e87bcd60562d176a220 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 14:40:17 -0400 Subject: [PATCH 079/172] Diddy Crate --- fighters/diddy/src/acmd/aerials.rs | 196 ++++++++++---------- fighters/diddy/src/acmd/ground.rs | 135 +++++++------- fighters/diddy/src/acmd/mod.rs | 16 +- fighters/diddy/src/acmd/other.rs | 160 ++++++++-------- fighters/diddy/src/acmd/smashes.rs | 172 +++++++++-------- fighters/diddy/src/acmd/specials.rs | 150 ++++++++------- fighters/diddy/src/acmd/throws.rs | 142 +++++++------- fighters/diddy/src/acmd/tilts.rs | 40 ++-- fighters/diddy/src/lib.rs | 8 +- fighters/diddy/src/opff.rs | 6 +- fighters/diddy/src/status.rs | 17 +- fighters/diddy/src/status/special_hi.rs | 8 +- fighters/diddy/src/status/special_n.rs | 26 +-- fighters/diddy/src/status/special_s.rs | 6 +- fighters/diddy/src/status/special_s_jump.rs | 6 +- 15 files changed, 530 insertions(+), 558 deletions(-) diff --git a/fighters/diddy/src/acmd/aerials.rs b/fighters/diddy/src/acmd/aerials.rs index d2368690bb..dc719c2191 100644 --- a/fighters/diddy/src/acmd/aerials.rs +++ b/fighters/diddy/src/acmd/aerials.rs @@ -1,149 +1,149 @@ use super::*; -unsafe extern "C" fn diddy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(7.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 75, 95, 0, 55, 3.5, 3.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 75, 95, 0, 55, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 60, 90, 0, 55, 3.0, 2.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 7.0, 60, 90, 0, 55, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 8.0/(41.0-30.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(41.0-30.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn diddy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 12.0, 361, 98, 0, 35, 3.5, 2.0, -0.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 98, 0, 35, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 12.0, 361, 98, 0, 35, 3.5, 2.0, -0.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 361, 95, 0, 35, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 9.0, 361, 95, 0, 35, 3.0, 0.0, -0.5, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 361, 95, 0, 35, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 3.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 9.0, 361, 95, 0, 35, 3.0, 0.0, -0.5, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 2.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 95, 0, 35, 3.0, 2.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn diddy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 3.0); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 104, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 104, 0, 30, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 104, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn diddy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6, -6.5, 195, 3, 25, 0.95, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 6, -6.5, 195, 3, 25, 0.95, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1, 9, -18.5, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1, 9, -18.5, 0, 0, 0, 1, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); } } -unsafe extern "C" fn diddy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 12.0, 361, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 12.0, 361, 90, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 90, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -163,16 +163,16 @@ unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn diddy_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.1); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } @@ -190,43 +190,41 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn diddy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.4); + FT_MOTION_RATE(agent, 0.4); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 90, 0, 25, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 270, 85, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 270, 90, 0, 25, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 270, 85, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.0, 270, 51, 0, 20, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.0, 270, 51, 0, 20, 4.0, 3.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 20, 5.0, 4.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attackairn", diddy_attack_air_n_game) - .acmd("game_attackairf", diddy_attack_air_f_game) - .acmd("game_attackairb", diddy_attack_air_b_game) - .acmd("effect_attackairb", diddy_attack_air_b_effect) - .acmd("game_attackairhi", diddy_attack_air_hi_game) - .acmd("expression_attackairhi", diddy_attack_air_hi_expression) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", diddy_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/diddy/src/acmd/ground.rs b/fighters/diddy/src/acmd/ground.rs index e51ba7d4d7..c7d352f825 100644 --- a/fighters/diddy/src/acmd/ground.rs +++ b/fighters/diddy/src/acmd/ground.rs @@ -1,125 +1,122 @@ use super::*; -unsafe extern "C" fn diddy_attack_11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 80, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn diddy_attack_12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn diddy_attack_13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 361, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 4.0, 4.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 361, 90, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 361, 90, 0, 50, 4.0, 4.0, 0.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - smash::app::lua_bind::KineticEnergy::reset_energy(fighter.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), fighter.module_accessor); - smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_mul(fighter.get_controller_energy(), 0.0); - smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_add(fighter.get_controller_energy(), 0.0); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + smash::app::lua_bind::KineticEnergy::reset_energy(agent.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), agent.module_accessor); + smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_mul(agent.get_controller_energy(), 0.0); + smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_add(agent.get_controller_energy(), 0.0); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 5.0); - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 75, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 75, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 9.0, 75, 70, 0, 65, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); + if agent.is_situation(*SITUATION_KIND_GROUND) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); } - if is_excute(fighter){ - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 90, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent){ + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 90, 80, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 90, 80, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter){ + if is_excute(agent){ AttackModule::clear_all(boma); } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_situation(*SITUATION_KIND_GROUND) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7, -0.5, 90, 90, 20, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 7, -0.5, 90, 90, 20, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1); } - frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind_s"), true, true); if boma.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attack11", diddy_attack_11) - .acmd("game_attack12", diddy_attack_12) - .acmd("game_attack13", diddy_attack_13) - .acmd("game_attackdash", diddy_attack_dash) - .acmd("effect_attackdash", effect_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/diddy/src/acmd/mod.rs b/fighters/diddy/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/diddy/src/acmd/mod.rs +++ b/fighters/diddy/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/diddy/src/acmd/other.rs b/fighters/diddy/src/acmd/other.rs index 14f4bc324b..4d9804dab1 100644 --- a/fighters/diddy/src/acmd/other.rs +++ b/fighters/diddy/src/acmd/other.rs @@ -1,183 +1,183 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_diddy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_diddy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_diddy_step_right_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_diddy_step_right_ll")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_diddy_step_left_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_diddy_step_left_ll")); } } -unsafe extern "C" fn diddy_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -194,18 +194,16 @@ unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", diddy_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealhil", game_appealhi) - .acmd("game_appealhir", game_appealhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealhil", game_appealhil); + agent.acmd("game_appealhir", game_appealhil); } diff --git a/fighters/diddy/src/acmd/smashes.rs b/fighters/diddy/src/acmd/smashes.rs index 227b982536..fce919a73f 100644 --- a/fighters/diddy/src/acmd/smashes.rs +++ b/fighters/diddy/src/acmd/smashes.rs @@ -1,185 +1,183 @@ use super::*; -unsafe extern "C" fn diddy_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 10, 100, 20, 0, 4.2, 0.0, 9.7, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 45, 100, 35, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 80, 100, 25, 0, 4.0, 4.8, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 22, 100, 42, 0, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 10, 100, 20, 0, 4.2, 0.0, 9.7, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 45, 100, 35, 0, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 80, 100, 25, 0, 4.0, 4.8, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 22, 100, 42, 0, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 100, 20, 0, 4.5, 0.0, 13.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 100, 20, 0, 4.5, 0.0, 13.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 3.0/(21.0-14.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 3.0/(21.0-14.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 46, 116, 0, 40, 5.0, 5.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 50, 116, 0, 40, 4.5, 1.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 9.0, 60, 116, 0, 40, 4.0, 0.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 46, 116, 0, 40, 5.0, 5.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 50, 116, 0, 40, 4.5, 1.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 9.0, 60, 116, 0, 40, 4.0, 0.0, 0.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn diddy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.5, 110, 100, 110, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 125, 100, 30, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.5, 95, 100, 50, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.5, 110, 100, 110, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 125, 100, 30, 0, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.5, 95, 100, 50, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.5, 130, 100, 25, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.5, 130, 100, 25, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 140, 100, 15, 0, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 140, 100, 65, 0, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 140, 100, 65, 0, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.5, 140, 100, 45, 0, 5.5, 5.0, -3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 80, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 140, 100, 80, 0, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 85, 148, 0, 55, 7.5, 4.5, 0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 6.0, 85, 148, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 85, 148, 0, 55, 7.5, 4.5, 0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 6.0, 85, 148, 0, 55, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 16.0, 361, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 361, 80, 0, 40, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 361, 80, 0, 40, 4.5, 5.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 16.0, 361, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 361, 80, 0, 40, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 361, 80, 0, 40, 4.5, 5.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 361, 80, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 80, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 35, 4.5, 5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 361, 80, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 80, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 80, 0, 35, 4.5, 5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attacks4", diddy_attack_s4_game) - .acmd("expression_attacks4", diddy_attack_s4_expression) - .acmd("game_attackhi4", diddy_attack_hi4_game) - .acmd("game_attacklw4", diddy_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/diddy/src/acmd/specials.rs b/fighters/diddy/src/acmd/specials.rs index 74810e754a..d3d9f92974 100644 --- a/fighters/diddy/src/acmd/specials.rs +++ b/fighters/diddy/src/acmd/specials.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn diddy_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::clear_speed_all(boma); KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } @@ -52,137 +52,135 @@ unsafe extern "C" fn game_specialsstickattack2(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsstick(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); //wait_loop_clear(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 2.0, 361, 50, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 2.0, 361, 50, 0, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DIDDY_SCRATCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DIDDY_SCRATCH, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DIDDY_SCRATCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 4.0, 0.0, 2.0, -4.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DIDDY_SCRATCH, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairsjump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.4); + FT_MOTION_RATE(agent, 0.4); } -unsafe extern "C" fn game_specialairskick(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); +unsafe extern "C" fn game_specialairskick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_special_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(31.0 - 1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn diddy_special_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(35.0 - 1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn diddy_special_air_n_cancel_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn diddy_special_air_n_cancel_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairncancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_specialairhistart", diddy_special_air_hi_start_game) - .acmd("game_specialsstickattack", game_specialsstickattack) - .acmd("game_specialsstickattack2", game_specialsstickattack2) - .acmd("game_specialsstick", game_specialsstick) - .acmd("game_specialairsjump", game_specialairsjump) - .acmd("game_specialairskick", game_specialairskick) - .acmd("game_specialncancel", diddy_special_n_cancel_game) - .acmd("effect_specialncancel", diddy_special_n_cancel_effect) - .acmd("sound_specialncancel", diddy_special_n_cancel_sound) - .acmd("expression_specialncancel", diddy_special_n_cancel_expression) - .acmd("game_specialairncancel", diddy_special_air_n_cancel_game) - .acmd("effect_specialairncancel", diddy_special_air_n_cancel_effect) - .acmd("sound_specialairncancel", diddy_special_air_n_cancel_sound) - .acmd("expression_specialairncancel", diddy_special_air_n_cancel_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialsstickattack", game_specialsstickattack); + agent.acmd("game_specialsstickattack2", game_specialsstickattack2); + agent.acmd("game_specialsstick", game_specialsstick); + agent.acmd("game_specialairsjump", game_specialairsjump); + agent.acmd("game_specialairskick", game_specialairskick); + agent.acmd("game_specialncancel", game_specialncancel); + agent.acmd("effect_specialncancel", effect_specialncancel); + agent.acmd("sound_specialncancel", sound_specialncancel); + agent.acmd("expression_specialncancel", expression_specialncancel); + agent.acmd("game_specialairncancel", game_specialairncancel); + agent.acmd("effect_specialairncancel", effect_specialairncancel); + agent.acmd("sound_specialairncancel", sound_specialairncancel); + agent.acmd("expression_specialairncancel", expression_specialairncancel); } diff --git a/fighters/diddy/src/acmd/throws.rs b/fighters/diddy/src/acmd/throws.rs index 288f8ad2a8..54e664a1b3 100644 --- a/fighters/diddy/src/acmd/throws.rs +++ b/fighters/diddy/src/acmd/throws.rs @@ -1,150 +1,148 @@ use super::*; -unsafe extern "C" fn diddy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(8.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn diddy_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn diddy_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-13.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 21.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 21.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 86, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 22, 18); + CHECK_FINISH_CAMERA(agent, 22, 18); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 8, 5, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-2.5, y: 9.0, z: -13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let release_position = Vector3f{ x:-2.5, y: 9.0, z: -15.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 75, 120, 0, 50, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 75, 120, 0, 50, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 2, 40); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 2, 40); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2.0); //FighterCutInManager::set_throw_finish_offset(boma, 0, 10.0, 0.0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:0.0, y: 27.0, z: -1.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 115, 53, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 115, 53, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.8); //FighterCutInManager::set_throw_finish_offset(boma, 0, 5, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_catch", diddy_catch_game) - .acmd("game_catchdash", diddy_catch_dash_game) - .acmd("game_catchturn", diddy_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/diddy/src/acmd/tilts.rs b/fighters/diddy/src/acmd/tilts.rs index db93e9e44e..613c4e0b8d 100644 --- a/fighters/diddy/src/acmd/tilts.rs +++ b/fighters/diddy/src/acmd/tilts.rs @@ -1,42 +1,40 @@ use super::*; -unsafe extern "C" fn diddy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 100, 105, 0, 45, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 100, 105, 0, 45, 4.0, 0.9, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 100, 105, 0, 45, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn diddy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 30, 2.5, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 55, 75, 0, 30, 3.0, 0.0, 3.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 65, 75, 0, 30, 4.0, 4.0, 2.5, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 30, 2.5, 0.0, 3.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 55, 75, 0, 30, 3.0, 0.0, 3.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 65, 75, 0, 30, 4.0, 4.0, 2.5, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("diddy") - .acmd("game_attackhi3", diddy_attack_hi3_game) - .acmd("game_attacklw3", diddy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/diddy/src/lib.rs b/fighters/diddy/src/lib.rs index 5537dac979..c041345d24 100644 --- a/fighters/diddy/src/lib.rs +++ b/fighters/diddy/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("diddy kong"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/diddy/src/opff.rs b/fighters/diddy/src/opff.rs index dc2a91107a..34b8671a40 100644 --- a/fighters/diddy/src/opff.rs +++ b/fighters/diddy/src/opff.rs @@ -194,8 +194,6 @@ pub unsafe fn diddy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("diddy") - .on_line(Main, diddy_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, diddy_frame_wrapper); } diff --git a/fighters/diddy/src/status.rs b/fighters/diddy/src/status.rs index a309a454b2..31cae2b882 100644 --- a/fighters/diddy/src/status.rs +++ b/fighters/diddy/src/status.rs @@ -43,13 +43,12 @@ extern "C" fn diddy_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - special_n::install(); - special_s::install(); - special_s_jump::install(); - special_hi::install(); - smashline::Agent::new("diddy") - .status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat) - .on_start(diddy_init) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_s_jump::install(agent); + special_hi::install(agent); + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat); + agent.on_start(diddy_init); + agent.install(); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_hi.rs b/fighters/diddy/src/status/special_hi.rs index 6c8b47e92a..c7a8cd0f90 100644 --- a/fighters/diddy/src/status/special_hi.rs +++ b/fighters/diddy/src/status/special_hi.rs @@ -17,9 +17,7 @@ pub unsafe extern "C" fn special_hi_upper_damage_main(fighter: &mut L2CFighterCo ret } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE, special_hi_charge_damage_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER_DAMAGE, special_hi_upper_damage_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE, special_hi_charge_damage_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_UPPER_DAMAGE, special_hi_upper_damage_main); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_n.rs b/fighters/diddy/src/status/special_n.rs index 7387eb62b9..f81593bb7d 100644 --- a/fighters/diddy/src/status/special_n.rs +++ b/fighters/diddy/src/status/special_n.rs @@ -240,20 +240,14 @@ unsafe extern "C" fn special_n_shoot_motion_helper(fighter: &mut L2CFighterCommo } } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main) - .install(); - smashline::Agent::new("diddy") - .status(Pre, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); - smashline::Agent::new("diddy") - .status(Pre, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre) - .status(Main, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main) - .status(End, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_main); + agent.status(Pre, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::diddy::SPECIAL_N_CANCEL, special_n_cancel_end); + agent.status(Pre, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre); + agent.status(Main, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main); + agent.status(End, statuses::diddy::SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_s.rs b/fighters/diddy/src/status/special_s.rs index 0f38acd293..ab9d529ffd 100644 --- a/fighters/diddy/src/status/special_s.rs +++ b/fighters/diddy/src/status/special_s.rs @@ -8,8 +8,6 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("diddy") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_s_jump.rs b/fighters/diddy/src/status/special_s_jump.rs index 2654a3a2a1..f75cc3ebff 100644 --- a/fighters/diddy/src/status/special_s_jump.rs +++ b/fighters/diddy/src/status/special_s_jump.rs @@ -102,8 +102,6 @@ unsafe extern "C" fn special_s_jump_main_loop(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("diddy") - .status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DIDDY_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } \ No newline at end of file From b427a80b19163ff768130a08ee9e0d824fc2488d Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 14:40:57 -0400 Subject: [PATCH 080/172] Peach Crate --- fighters/peach/src/acmd/aerials.rs | 182 +++++++++--------- fighters/peach/src/acmd/ground.rs | 86 ++++----- fighters/peach/src/acmd/mod.rs | 16 +- fighters/peach/src/acmd/other.rs | 146 +++++++------- fighters/peach/src/acmd/smashes.rs | 30 ++- fighters/peach/src/acmd/specials.rs | 176 +++++++++-------- fighters/peach/src/acmd/throws.rs | 176 +++++++++-------- fighters/peach/src/acmd/tilts.rs | 106 +++++----- fighters/peach/src/lib.rs | 8 +- fighters/peach/src/opff.rs | 6 +- fighters/peach/src/status/attack_air.rs | 10 +- fighters/peach/src/status/jump_aerial.rs | 12 +- fighters/peach/src/status/mod.rs | 17 +- fighters/peach/src/status/special_hi.rs | 10 +- fighters/peach/src/status/special_lw.rs | 10 +- fighters/peach/src/status/special_s.rs | 10 +- fighters/peach/src/status/uniq_float.rs | 6 +- fighters/peach/src/status/uniq_float_start.rs | 6 +- 18 files changed, 486 insertions(+), 527 deletions(-) diff --git a/fighters/peach/src/acmd/aerials.rs b/fighters/peach/src/acmd/aerials.rs index b719a4a2ee..f923f10d99 100644 --- a/fighters/peach/src/acmd/aerials.rs +++ b/fighters/peach/src/acmd/aerials.rs @@ -1,109 +1,109 @@ use super::*; -unsafe extern "C" fn peach_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 361, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 10.0, 361, 100, 0, 5, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn peach_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 80, 0, 50, 4.4, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.0, 361, 85, 0, 50, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 80, 0, 50, 4.4, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.0, 361, 85, 0, 50, 4.7, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn peach_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 95, 0, 30, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 95, 0, 30, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 10, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 85, 0, 10, 6.0, 0.0, 8.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn peach_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.333); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 4.5, 367, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, -3.0, Some(0.0), Some(19.0), Some(-9.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("bust"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("hip"), 4.5, 367, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); @@ -112,103 +112,101 @@ unsafe extern "C" fn peach_attack_air_hi_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(24.0), Some(-3.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(24.0), Some(-3.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.5, 0.0, 23.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(21.0), Some(8.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.5, 0.0, 23.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 100, 55, 0, 4.0, 0.0, 24.0, 3.0, Some(0.0), Some(21.0), Some(8.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(24.0), Some(-4.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(24.0), Some(-4.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, -4.0, Some(0.0), Some(21.0), Some(-9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("hip"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(21.0), Some(9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 79, 100, 0, 50, 5.2, 0.0, 24.0, 4.0, Some(0.0), Some(21.0), Some(9.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn peach_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_beams"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn peach_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); for _ in 0..3 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 22, 5.5, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 70, 30, 0, 22, 4.5, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 22, 5.5, 0.0, -1.0, 1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 70, 30, 0, 22, 4.5, 0.0, 4.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 6.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 5.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 6.5, 0.0, -1.0, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 75, 65, 0, 70, 5.5, 0.0, 4.0, -0.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attackairn", peach_attack_air_n_game) - .acmd("game_attackairf", peach_attack_air_f_game) - .acmd("game_attackairb", peach_attack_air_b_game) - .acmd("game_attackairhi", peach_attack_air_hi_game) - .acmd("expression_attackairhi", peach_attack_air_hi_expression) - .acmd("game_attackairlw", peach_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/peach/src/acmd/ground.rs b/fighters/peach/src/acmd/ground.rs index ef276ff3e5..1e4835826c 100644 --- a/fighters/peach/src/acmd/ground.rs +++ b/fighters/peach/src/acmd/ground.rs @@ -1,86 +1,84 @@ use super::*; -unsafe extern "C" fn peach_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 30, 2.5, 0.0, 9.0, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PEACH_BINTA, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn peach_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.0, 25, 22, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 25, 22, 0, 36, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 365, 22, 0, 36, 4.0, 0.0, 7.0, 10.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.0, 25, 22, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 25, 22, 0, 36, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 365, 22, 0, 36, 4.0, 0.0, 7.0, 10.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 65, 90, 0, 60, 4.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 90, 0, 60, 5.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 6.0, 65, 90, 0, 60, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 65, 90, 0, 60, 4.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 90, 0, 60, 5.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 6.0, 65, 90, 0, 60, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn peach_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("peach_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("peach_attack_impact"), Hash40::new("trans"), 0, 8, 10, 0, 90, 0, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 2, 7.5, 2, 11, 77, 16, 0.6, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 9, 2, 140, 120, -50, 0.6, true, *EF_FLIP_YZ, 0.4); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attack11", peach_attack_11_game) - .acmd("game_attackdash", peach_attack_dash_game) - .acmd("effect_attackdash", peach_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/peach/src/acmd/mod.rs b/fighters/peach/src/acmd/mod.rs index 1d5916e4dc..efc1b5718a 100644 --- a/fighters/peach/src/acmd/mod.rs +++ b/fighters/peach/src/acmd/mod.rs @@ -8,12 +8,12 @@ mod specials; mod tilts; mod throws; -pub fn install() { - aerials::install(); - ground::install(); - other::install(); - smashes::install(); - specials::install(); - tilts::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + ground::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + tilts::install(agent); + throws::install(agent); } \ No newline at end of file diff --git a/fighters/peach/src/acmd/other.rs b/fighters/peach/src/acmd/other.rs index 4735ec111e..0971d46cfe 100644 --- a/fighters/peach/src/acmd/other.rs +++ b/fighters/peach/src/acmd/other.rs @@ -1,183 +1,181 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_peach_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_peach_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn peach_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", peach_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/peach/src/acmd/smashes.rs b/fighters/peach/src/acmd/smashes.rs index b2a34c6411..fd09d93b96 100644 --- a/fighters/peach/src/acmd/smashes.rs +++ b/fighters/peach/src/acmd/smashes.rs @@ -1,39 +1,37 @@ use super::*; -unsafe extern "C" fn peach_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 100, 20, 0, 3.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 100, 20, 0, 3.5, -2.5, 2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, 7.5, Some(2.5), Some(2.0), Some(7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 100, 25, 0, 4.5, -2.5, 2.0, -7.5, Some(2.5), Some(2.0), Some(-7.5), 0.5, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 201, 0, 40, 4.5, 0.0, 1.8, 8.25, Some(0.0), Some(1.8), Some(-8.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 201, 0, 40, 4.5, 0.0, 1.8, 8.25, Some(0.0), Some(1.8), Some(-8.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attacklw4", peach_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/peach/src/acmd/specials.rs b/fighters/peach/src/acmd/specials.rs index a5a0ffbc15..9647751a8f 100644 --- a/fighters/peach/src/acmd/specials.rs +++ b/fighters/peach/src/acmd/specials.rs @@ -1,153 +1,153 @@ use super::*; -unsafe extern "C" fn peach_special_s_hit_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 55, 80, 0, 60, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); +unsafe extern "C" fn game_specialshitend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 55, 80, 0, 60, 7.7, 0.0, 5.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 6, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HIP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_SHIELD) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn peach_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); let hit1 = Vector2f { x: 6.0, y: 25.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 12, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 12, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 4.0, 81, 105, 0, 90, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 81, 105, 0, 90, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 4.0, 81, 105, 0, 90, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 81, 105, 0, 90, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn peach_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, false, 0); ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KASSAR, Hash40::new("special_hi_start"), false, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PEACH_STATUS_SPECIAL_HI_FLAG_MOVE_TRANS); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 88, 100, 160, 0, 5.0, 0.0, 5.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("head"), 3.0, 100, 100, 130, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 160, 0, 4.0, 0.0, 10.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 87, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 367, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("havel"), 1.0, 368, 100, 80, 0, 1.5, 2.0, 5.0, 3.5, Some(2.0), Some(2.5), Some(3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 2, 0, Hash40::new("havel"), 1.0, 368, 100, 70, 0, 5.0, 0.0, 6.5, 0.0, Some(0.0), Some(-1.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); let hit1 = Vector2f { x: 6.0, y: 25.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 12, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 12, false); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y), app::AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 3.0, 78, 95, 0, 72, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 72, 95, 0, 72, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 0, 0, Hash40::new("havel"), 3.0, 78, 95, 0, 72, 5.2, 0.0, 4.5, -2.0, Some(0.0), Some(4.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 72, 95, 0, 72, 3.0, 0.0, -1.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PARASOL); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn peach_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let item_kind = fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let item_kind = agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND); if item_kind == *ITEM_KIND_NONE { ArticleModule::generate_article(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_DAIKON, false, -1); } else if item_kind == *ITEM_KIND_BOMBHEI { @@ -159,51 +159,49 @@ unsafe extern "C" fn peach_special_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_GROUND) { + agent.change_status_req(*FIGHTER_STATUS_KIND_FALL, false); } } } -unsafe extern "C" fn peach_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("peach_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("peach_hikkonuki"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("peach_hikkonuki"), -1); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("peach_hikkonuki"), -1); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn peach_special_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_peach_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_peach_special_l02")); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_peach_special_l01")); - if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(fighter.module_accessor, 0) { - PLAY_SE(fighter, Hash40::new("vc_peach_appeal01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_peach_special_l01")); + if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE + && ItemModule::is_have_item(agent.module_accessor, 0) { + PLAY_SE(agent, Hash40::new("vc_peach_appeal01")); } } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_specialshitend", peach_special_s_hit_end_game) - .acmd("game_specialhistart", peach_special_hi_start_game) - .acmd("game_specialairhistart", peach_special_air_hi_start_game) - .acmd("game_speciallw", peach_special_lw_game) - .acmd("effect_speciallw", peach_special_lw_effect) - .acmd("sound_speciallw", peach_special_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialshitend", game_specialshitend); + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); } diff --git a/fighters/peach/src/acmd/throws.rs b/fighters/peach/src/acmd/throws.rs index f0c41305b9..e8cdedc80b 100644 --- a/fighters/peach/src/acmd/throws.rs +++ b/fighters/peach/src/acmd/throws.rs @@ -1,186 +1,184 @@ use super::*; -unsafe extern "C" fn peach_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn peach_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 4.0, Some(0.0), Some(8.5), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, 4.0, Some(0.0), Some(8.5), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn peach_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.5, -4.0, Some(0.0), Some(8.5), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 11.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 118, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 11.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 118, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_f"), false, -1.0); ArticleModule::set_rate(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, (16.0 - 1.0)/11.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 50, 0, 55, 4.5, 0.0, 7.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 50, 0, 55, 4.5, 0.0, 7.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 11, 5); + CHECK_FINISH_CAMERA(agent, 11, 5); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 36.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 36.0, 16.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { ArticleModule::set_rate(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, (16.0 - 1.0)/11.0); } } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 127, 84, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 127, 84, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_b"), false, -1.0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 10, 6.2, 0.0, 7.2, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 200, 0, 10, 6.2, 0.0, 7.2, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -10, 5); + CHECK_FINISH_CAMERA(agent, -10, 5); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.0, 50.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 35.0, 50.0, 8.0); + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 45.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - if IS_EXIST_ARTICLE(fighter, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { - if is_excute(fighter) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 65, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + if IS_EXIST_ARTICLE(agent, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, Hash40::new("throw_hi"), false, -1.0); } } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 80, 100, 20, 0, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 24); + CHECK_FINISH_CAMERA(agent, 0, 24); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_PEACH_GENERATE_ARTICLE_KINOPIO, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_catch", peach_catch_game) - .acmd("game_catchdash", peach_catch_dash_game) - .acmd("game_catchturn", peach_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/peach/src/acmd/tilts.rs b/fighters/peach/src/acmd/tilts.rs index 129254c1f6..6acba0a75d 100644 --- a/fighters/peach/src/acmd/tilts.rs +++ b/fighters/peach/src/acmd/tilts.rs @@ -1,101 +1,99 @@ use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 92, 82, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 97, 82, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 92, 82, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 92, 82, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 97, 82, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 92, 82, 0, 60, 5.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 92, 50, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 92, 50, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 92, 50, 0, 60, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 92, 50, 0, 60, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 92, 50, 0, 60, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 92, 50, 0, 60, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(9.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(9.0-1.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 115, 20, 0, 85, 4.0, 0.0, 6.5, 3.0, Some(0.0), Some(6.5), Some(-2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 110, 20, 0, 60, 4.0, 0.0, 13.5, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 115, 20, 0, 85, 4.0, 0.0, 6.5, 3.0, Some(0.0), Some(6.5), Some(-2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 110, 20, 0, 60, 4.0, 0.0, 13.5, 0.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 90, 90, 0, 60, 8.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 90, 90, 0, 60, 8.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 7.5, 0.0, 23.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 3.5, 0.0, 14.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 7.5, 0.0, 23.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 90, 80, 0, 70, 3.5, 0.0, 14.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("peach_attack_heart"), Hash40::new("top"), 0, 23.5, 0, 0, 90, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("peach_attack_hi3"), Hash40::new("top"), 0, 23.5, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + frame(agent.lua_state_agent, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("peach_attack_heart"), Hash40::new("top"), 0, 23.5, 0, 0, 90, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("peach_attack_hi3"), Hash40::new("top"), 0, 23.5, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 6.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 272, 87, 0, 75, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 272, 87, 0, 75, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 272, 87, 0, 75, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); // Air only - ATTACK(fighter, 3, 0, Hash40::new("legl"), 10.0, 80, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 10.0, 80, 75, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 80, 75, 0, 50, 4.0, 6.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } } -pub fn install() { - smashline::Agent::new("peach") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/peach/src/lib.rs b/fighters/peach/src/lib.rs index 7bb0378152..214e10123b 100644 --- a/fighters/peach/src/lib.rs +++ b/fighters/peach/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("peach"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/peach/src/opff.rs b/fighters/peach/src/opff.rs index 45feebfdc2..96bf79acf5 100644 --- a/fighters/peach/src/opff.rs +++ b/fighters/peach/src/opff.rs @@ -91,8 +91,6 @@ pub unsafe fn peach_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("peach") - .on_line(Main, peach_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, peach_frame_wrapper); } diff --git a/fighters/peach/src/status/attack_air.rs b/fighters/peach/src/status/attack_air.rs index 3ee7502640..2fb490bcea 100644 --- a/fighters/peach/src/status/attack_air.rs +++ b/fighters/peach/src/status/attack_air.rs @@ -107,10 +107,8 @@ unsafe extern "C" fn peach_attack_air_main_loop(fighter: &mut L2CFighterCommon) WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_init) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_exec) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_exec); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_main); } diff --git a/fighters/peach/src/status/jump_aerial.rs b/fighters/peach/src/status/jump_aerial.rs index f034b57522..b0064f4432 100644 --- a/fighters/peach/src/status/jump_aerial.rs +++ b/fighters/peach/src/status/jump_aerial.rs @@ -55,13 +55,7 @@ unsafe extern "C" fn peach_jump_aerial_main_loop(fighter: &mut L2CFighterCommon) } fighter.status_JumpAerial_Main() } -pub fn install() { - smashline::Agent::new("peach") - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, peach_jump_aerial_pre) - .status( - Main, - *FIGHTER_STATUS_KIND_JUMP_AERIAL, - peach_jump_aerial_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, peach_jump_aerial_pre); + agent.status(Main,*FIGHTER_STATUS_KIND_JUMP_AERIAL,peach_jump_aerial_main,); } diff --git a/fighters/peach/src/status/mod.rs b/fighters/peach/src/status/mod.rs index b8ad578397..92931ae11a 100644 --- a/fighters/peach/src/status/mod.rs +++ b/fighters/peach/src/status/mod.rs @@ -70,13 +70,12 @@ extern "C" fn peach_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("peach").on_start(peach_init).install(); - attack_air::install(); - jump_aerial::install(); - special_hi::install(); - special_s::install(); - special_lw::install(); - uniq_float_start::install(); - uniq_float::install(); +pub fn install(agent: &mut Agent) { + attack_air::install(agent); + jump_aerial::install(agent); + special_hi::install(agent); + special_s::install(agent); + special_lw::install(agent); + uniq_float_start::install(agent); + uniq_float::install(agent); } diff --git a/fighters/peach/src/status/special_hi.rs b/fighters/peach/src/status/special_hi.rs index 1f1c7fec4d..1f48986cb5 100644 --- a/fighters/peach/src/status/special_hi.rs +++ b/fighters/peach/src/status/special_hi.rs @@ -17,12 +17,6 @@ unsafe extern "C" fn special_hi_substatus(fighter: &mut L2CFighterCommon, param_ 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status( - Main, - *FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, - special_hi_air_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main,*FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_air_end_main); } diff --git a/fighters/peach/src/status/special_lw.rs b/fighters/peach/src/status/special_lw.rs index 830cd73466..7a0917be7c 100644 --- a/fighters/peach/src/status/special_lw.rs +++ b/fighters/peach/src/status/special_lw.rs @@ -71,10 +71,8 @@ unsafe extern "C" fn peach_special_lw_end(fighter: &mut L2CFighterCommon) -> L2C } 0.into() } -pub fn install() { - smashline::Agent::new("peach") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_end); } diff --git a/fighters/peach/src/status/special_s.rs b/fighters/peach/src/status/special_s.rs index b085ba7865..4faf6473b0 100644 --- a/fighters/peach/src/status/special_s.rs +++ b/fighters/peach/src/status/special_s.rs @@ -8,12 +8,6 @@ unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CV smashline::original_status(Main, fighter, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP)(fighter) } -pub fn install() { - smashline::Agent::new("peach") - .status( - Main, - *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, - special_s_jump_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main,*FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP,special_s_jump_main,); } diff --git a/fighters/peach/src/status/uniq_float.rs b/fighters/peach/src/status/uniq_float.rs index 32fa8ca79a..dd65f2b368 100644 --- a/fighters/peach/src/status/uniq_float.rs +++ b/fighters/peach/src/status/uniq_float.rs @@ -37,8 +37,6 @@ unsafe extern "C" fn uniq_float(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_main_common(fighter) } -pub fn install() { - Agent::new("peach") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float); } \ No newline at end of file diff --git a/fighters/peach/src/status/uniq_float_start.rs b/fighters/peach/src/status/uniq_float_start.rs index f001fb4ebf..2d234f634e 100644 --- a/fighters/peach/src/status/uniq_float_start.rs +++ b/fighters/peach/src/status/uniq_float_start.rs @@ -231,8 +231,6 @@ unsafe extern "C" fn uniq_float_start(fighter: &mut L2CFighterCommon) -> L2CValu peach_float_start_main_common(fighter) } -pub fn install() { - Agent::new("peach") - .status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start); } \ No newline at end of file From 3afd08284e5a98c86d7e5278db32849a63704e45 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 14:41:25 -0400 Subject: [PATCH 081/172] Wario Crate --- fighters/wario/src/acmd/aerials.rs | 474 ++++++++++++------------ fighters/wario/src/acmd/ground.rs | 134 ++++--- fighters/wario/src/acmd/mod.rs | 16 +- fighters/wario/src/acmd/other.rs | 138 ++++--- fighters/wario/src/acmd/smashes.rs | 198 +++++----- fighters/wario/src/acmd/specials.rs | 180 +++++---- fighters/wario/src/acmd/throws.rs | 364 +++++++++--------- fighters/wario/src/acmd/tilts.rs | 160 ++++---- fighters/wario/src/lib.rs | 8 +- fighters/wario/src/opff.rs | 6 +- fighters/wario/src/status.rs | 36 +- fighters/wario/src/status/special_hi.rs | 12 +- fighters/wario/src/status/special_s.rs | 10 +- 13 files changed, 852 insertions(+), 884 deletions(-) diff --git a/fighters/wario/src/acmd/aerials.rs b/fighters/wario/src/acmd/aerials.rs index fdda4fd29c..e930aa7bf9 100644 --- a/fighters/wario/src/acmd/aerials.rs +++ b/fighters/wario/src/acmd/aerials.rs @@ -1,502 +1,500 @@ use super::*; -unsafe extern "C" fn wario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.0, 40, 100, 0, 25, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 40, 100, 0, 25, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 40, 100, 0, 25, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); - ATK_POWER(fighter, 1, 3); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + ATK_POWER(agent, 1, 3); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 72, 100, 0, 65, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 16.0/(39.0-20.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 72, 100, 0, 65, 4.5, 0.0, 5.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0.7, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 16.0/(39.0-20.0)); } frame(lua_state, 39.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 9.0/(51.0-39.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 9.0/(51.0-39.0)); AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_landing_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 55, 85, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 80, 0, 30, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 55, 85, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 80, 0, 30, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 65, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 65, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 65, 0, 20, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 8.0 / (37.0 - 21.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 8.0 / (37.0 - 21.0)); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_landing_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0 / (16.0 - 1.0)); + FT_MOTION_RATE(agent, 11.0 / (16.0 - 1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 19.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 101, 0, 20, 4.6, 7.3, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 101, 0, 20, 4.6, 4.1, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 12.0, 361, 102, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 17.0, 19.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 101, 0, 20, 4.6, 7.3, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 101, 0, 20, 4.6, 4.1, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 12.0, 361, 102, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 6.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 4.2, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 6.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 105, 0, 20, 4.6, 4.2, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 361, 105, 0, 20, 5.0, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 28.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 28.0, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"),Hash40::new("top"), -0.9, 7.9, -0.5, 170, 30, 254, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter,0.9,0.5,0.9); - LAST_EFFECT_SET_RATE(fighter, 1.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"),Hash40::new("top"), -0.9, 7.9, -0.5, 170, 30, 254, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent,0.9,0.5,0.9); + LAST_EFFECT_SET_RATE(agent, 1.8); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"),false,false); } } -unsafe extern "C" fn wario_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_rise")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_rise")); } frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("vc_wario_attack07")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("vc_wario_attack07")); } frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_smash_s01")); } } -unsafe extern "C" fn wario_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // capsules used to avoid bad interpolation - ATTACK(fighter, 0, 0, Hash40::new("arml"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 70, 110, 0, 15, 5.0, 5.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 16.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 14.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 16.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 80, 94, 0, 45, 7.0, 0.0, 14.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn wario_landing_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landm"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.375); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.375); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 270, 75, 0, 50, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 270, 70, 0, 30, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 270, 75, 0, 50, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 270, 70, 0, 30, 5.75, 0.0, 1.8, 0.0, None,None,None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 95, 0, 30, 5.5, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 95, 0, 30, 5.5, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 1.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } } -unsafe extern "C" fn wario_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_machstamp"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter,1,1,0.625); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_machstamp"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent,1,1,0.625); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_machstamp"),false,true); } } -unsafe extern "C" fn wario_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump01")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_attackair_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_attackair_l01")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_007")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_007")); } } -unsafe extern "C" fn wario_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 30, 0, 70, 4.0, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 30, 0, 70, 4.0, 0.0, 3.0, -7.0, Some(0.0), Some(3.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_landing_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_landing03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_landing03")); } } -unsafe extern "C" fn wario_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT(agent, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_merikomi"),false,true); } } -unsafe extern "C" fn wario_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } //AttackAirLw2 is the upwards bounce// -unsafe extern "C" fn wario_attack_air_lw2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let speed_max=0.75; frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - SET_SPEED_EX(fighter, 0, 1.875, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1.875, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_max, 0.0 ); sv_kinetic_energy!( set_limit_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, speed_max, 0.0 ); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn wario_attack_air_lw2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 1, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 1, 0, 0, 0, 0, true); } } -unsafe extern "C" fn wario_attack_air_lw2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump02")); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attackairn", wario_attack_air_n_game) - .acmd("expression_landingairn", wario_landing_air_n_expression) - .acmd("game_attackairf", wario_attack_air_f_game) - .acmd("expression_landingairf", wario_landing_air_f_expression) - .acmd("game_attackairb", wario_attack_air_b_game) - .acmd("effect_attackairb", wario_attack_air_b_effect) - .acmd("sound_attackairb", wario_attack_air_b_sound) - .acmd("expression_attackairb", wario_attack_air_b_expression) - .acmd("game_attackairhi", wario_attack_air_hi_game) - .acmd("expression_attackairhi", wario_attack_air_hi_expression) - .acmd("expression_landingairhi", wario_landing_air_hi_expression) - .acmd("game_attackairlw", wario_attack_air_lw_game) - .acmd("effect_attackairlw", wario_attack_air_lw_effect) - .acmd("sound_attackairlw", wario_attack_air_lw_sound) - .acmd("expression_attackairlw", wario_attack_air_lw_expression) - .acmd("game_landingairlw", wario_landing_air_lw_game) - .acmd("sound_landingairlw", wario_landing_air_lw_sound) - .acmd("effect_landingairlw", wario_landing_air_lw_effect) - .acmd("expression_landingairlw", wario_landing_air_lw_expression) - .acmd("game_attackairlw2", wario_attack_air_lw2_game) - .acmd("effect_attackairlw2", wario_attack_air_lw2_effect) - .acmd("sound_attackairlw2", wario_attack_air_lw2_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_landingairn", expression_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_landingairf", expression_landingairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("expression_landingairhi", expression_landingairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("sound_landingairlw", sound_landingairlw); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); + agent.acmd("game_attackairlw2", game_attackairlw2); + agent.acmd("effect_attackairlw2", effect_attackairlw2); + agent.acmd("sound_attackairlw2", sound_attackairlw2); } diff --git a/fighters/wario/src/acmd/ground.rs b/fighters/wario/src/acmd/ground.rs index 47c8633bdd..0b0f03cd28 100644 --- a/fighters/wario/src/acmd/ground.rs +++ b/fighters/wario/src/acmd/ground.rs @@ -1,127 +1,125 @@ use super::*; -unsafe extern "C" fn wario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.429); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.429); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 76, 45, 0, 25, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // jab lock hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 6.3, 7.0, Some(0.0), Some(3.3), Some(7.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.0, 0.0, 5.6, 9.2, Some(0.0), Some(3.3), Some(9.2), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 361, 20, 0, 30, 3.5, 0.0, 4.0, 12.0, Some(0.0), Some(3.3), Some(12.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn wario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 79, 70, 0, 60, 3.8, 0.0, 8.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 6.0, 79, 70, 0, 60, 5.8, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 79, 70, 0, 60, 3.8, 0.0, 8.0, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 6.0, 79, 70, 0, 60, 5.8, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn wario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 90, 0, 60, 4.0, 0.0, 6.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 90, 0, 60, 4.0, 0.0, 5.0, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.5, 0.0, 5.0, 6.0, Some(0.0), Some(10.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.0, 0.0, 6.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 70, 97, 0, 60, 3.5, 0.0, 5.0, 6.0, Some(0.0), Some(10.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("wario_attack_dash"), Hash40::new("top"), 0, 4, 16, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("wario_attack_dash"), Hash40::new("top"), 0, 4, 16, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 9, 0, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attack11", wario_attack_11_game) - .acmd("game_attack12", wario_attack_12_game) - .acmd("expression_attack12", wario_attack_12_expression) - .acmd("game_attackdash", wario_attack_dash_game) - .acmd("effect_attackdash", wario_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/wario/src/acmd/mod.rs b/fighters/wario/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/wario/src/acmd/mod.rs +++ b/fighters/wario/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/wario/src/acmd/other.rs b/fighters/wario/src/acmd/other.rs index 3d6434ab4c..c638da9412 100644 --- a/fighters/wario/src/acmd/other.rs +++ b/fighters/wario/src/acmd/other.rs @@ -1,188 +1,186 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02")); + PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_wario_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_wario_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_wario_step_right_m")); } } -unsafe extern "C" fn wario_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", wario_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wario/src/acmd/smashes.rs b/fighters/wario/src/acmd/smashes.rs index 60438c2b06..ada4ec38fe 100644 --- a/fighters/wario/src/acmd/smashes.rs +++ b/fighters/wario/src/acmd/smashes.rs @@ -1,175 +1,173 @@ use super::*; -unsafe extern "C" fn wario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 20.0, 361, 80, 0, 25, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 80, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 20.0, 361, 80, 0, 25, 6.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 80, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 361, 80, 0, 25, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 361, 80, 0, 25, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.244); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.244); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("head"), 17.0, 95, 86, 0, 35, 7.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("head"), 17.0, 95, 86, 0, 35, 7.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 13); + if is_excute(agent) { + ATK_POWER(agent, 0, 13); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 275, 28, 0, 100, 6.5, 0.0, 7.0, -9.0, Some(0.0), Some(7.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 80, 80, 0, 25, 6.5, 0.0, 7.0, -7.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 275, 28, 0, 100, 6.5, 0.0, 7.0, -9.0, Some(0.0), Some(7.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 80, 80, 0, 25, 6.5, 0.0, 7.0, -7.0, Some(0.0), Some(7.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 13.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.0, 13.0, 5.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 15.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 13.0, 15.0, 3.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 33.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 33.0, 9.0); frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(agent.lua_state_agent, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn wario_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_attack07")); - PLAY_SE(fighter, Hash40::new("se_wario_smash_s01")); - } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(agent.lua_state_agent, 5.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + } + frame(agent.lua_state_agent, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_attack07")); + PLAY_SE(agent, Hash40::new("se_wario_smash_s01")); + } + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn wario_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attacks4", wario_attack_s4_s_game) - .acmd("game_attackhi4", wario_attack_hi4_game) - .acmd("game_attacklw4", wario_attack_lw4_game) - .acmd("effect_attacklw4", wario_attack_lw4_effect) - .acmd("sound_attacklw4", wario_attack_lw4_sound) - .acmd("expression_attacklw4", wario_attack_lw4_expression) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); +} \ No newline at end of file diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index ba4e0e66fe..9984ce2e01 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -1,127 +1,127 @@ use super::*; -unsafe extern "C" fn wario_special_n_bite_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..999{ wait(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn wario_special_air_n_bite_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnbite(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..999{ wait(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 2.0, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn wario_special_hi_jump_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 127, 100, 110, 0, 3.0, 0.0, 5.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 127, 110, 110, 0, 3.0, 0.0, 5.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 127, 100, 110, 0, 3.0, 0.0, 5.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 127, 110, 110, 0, 3.0, 0.0, 5.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 127, 100, 90, 0, 3.0, 0.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 115, 85, 130, 0, 3.0, 0.0, 6.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, 4.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.5, 145, 85, 130, 0, 3.0, 0.0, 12.0, -3.0, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, 7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, -7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 7.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, 7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 3.5, 0.0, 13.0, -7.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 65, 140, 0, 60, 7.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_HI_FLAG_DISABLE_MOTION_ANGLE); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -130,33 +130,33 @@ unsafe extern "C" fn wario_special_hi_jump_game(fighter: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } -unsafe extern "C" fn wario_special_hi_jump_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } @@ -176,61 +176,59 @@ unsafe extern "C" fn wario_special_hi_jump_expression(fighter: &mut L2CAgentBase // } // } -unsafe extern "C" fn wario_special_lw_lr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwlr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.6); + FT_MOTION_RATE(agent, 1.6); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 45, 68, 0, 50, 11.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 45, 68, 0, 50, 11.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 7.8); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_special_lw_flyr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwflyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 3.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 30.0, 50, 50, 0, 50, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 50, 50, 0, 50, 11.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_JUMP); WorkModule::on_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_CRITICAL_HIT); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); WorkModule::off_flag(boma, *FIGHTER_WARIO_STATUS_SPECIAL_LW_FLAG_CRITICAL_HIT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 80, 95, 0, 0, 7.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 80, 95, 0, 0, 7.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_NONE); } wait(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_specialnbite", wario_special_n_bite_game) - .acmd("game_specialairnbite", wario_special_air_n_bite_game) - .acmd("game_specialhijump", wario_special_hi_jump_game) - .acmd("expression_specialhijump", wario_special_hi_jump_expression) - .acmd("game_speciallwlr", wario_special_lw_lr_game) - .acmd("game_specialairlwlr", wario_special_lw_lr_game) - .acmd("game_speciallwflyr", wario_special_lw_flyr_game) - .acmd("game_specialairlwflyr", wario_special_lw_flyr_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnbite", game_specialnbite); + agent.acmd("game_specialairnbite", game_specialairnbite); + agent.acmd("game_specialhijump", game_specialhijump); + agent.acmd("expression_specialhijump", expression_specialhijump); + agent.acmd("game_speciallwlr", game_speciallwlr); + agent.acmd("game_specialairlwlr", game_speciallwlr); + agent.acmd("game_speciallwflyr", game_speciallwflyr); + agent.acmd("game_specialairlwflyr", game_speciallwflyr); } diff --git a/fighters/wario/src/acmd/throws.rs b/fighters/wario/src/acmd/throws.rs index 75b35c5a81..47759d0485 100644 --- a/fighters/wario/src/acmd/throws.rs +++ b/fighters/wario/src/acmd/throws.rs @@ -1,141 +1,141 @@ use super::*; -unsafe extern "C" fn wario_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 0.0, Some(0.0), Some(7.0), Some(10.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 11.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn wario_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 14.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn wario_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.7, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.7, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn wario_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.0); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_NONE, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_frame(boma.get_grabbed_opponent_boma(), 0.1, false); } wait(lua_state,1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 10.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } } -unsafe extern "C" fn wario_catch_attack_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.0, 7.25, 11.0, 260, 0, 0, 1.1, true); +unsafe extern "C" fn effect_catchattack(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.0, 7.25, 11.0, 260, 0, 0, 1.1, true); } } -unsafe extern "C" fn wario_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -2, 0); + CHECK_FINISH_CAMERA(agent, -2, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 21.0/(55.0-30.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 21.0/(55.0-30.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } pub const THROWHI_FRAME_FALL: f32 = 48.0; pub const THROWHI_FRAME_LAND: f32 = 55.0; -unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { CameraModule::set_enable_camera(boma,true,0); CameraModule::set_enable_update_pos(boma,*CAMERA_UPDATE_POS_Y as u8,0); - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 3); + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 3); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 80, 80, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 80, 80, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } //Affect hitbox size based on scale let opponent = boma.get_grabbed_opponent_boma(); @@ -165,9 +165,9 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { //Add rate based on item status let mut addRate = 0.0; - if opponentScale != PostureModule::scale(fighter.boma()) + if opponentScale != PostureModule::scale(agent.boma()) { - addRate = if {opponentScale > PostureModule::scale(fighter.boma())} {0.25} else {-0.25}; + addRate = if {opponentScale > PostureModule::scale(agent.boma())} {0.25} else {-0.25}; } let leadHead = WorkModule::is_flag(opponent, *FIGHTER_INSTANCE_WORK_ID_FLAG_METAL) || WorkModule::is_flag(opponent, *FIGHTER_INSTANCE_WORK_ID_FLAG_GOLD); @@ -177,26 +177,26 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { let rise_speedUp = 0.75; frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, factorRate*rise_speedUp); - if is_excute(fighter) { + FT_MOTION_RATE(agent, factorRate*rise_speedUp); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } //Going up// frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("throw"), 8.0, 50, 70, 0, 100, 5.5*factorSize, 0.0, -5.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("throw"), 8.0, 50, 70, 0, 100, 5.5*factorSize, 0.0, -5.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, THROWHI_FRAME_FALL); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); KineticModule::suspend_energy(boma,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); @@ -204,230 +204,228 @@ unsafe extern "C" fn wario_throw_hi_game(fighter: &mut L2CAgentBase) { let speed = Vector3f { x: 0.0, y: -3.75, z: 0.0 }; KineticModule::add_speed(boma, &speed); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("rot"), 8.0*factorPower, 50, 70, 0, 100, 6.0*factorSize, 0.0, 0.0, 0.0, Some(0.0), Some(2.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("rot"), 8.0*factorPower, 50, 70, 0, 100, 6.0*factorSize, 0.0, 0.0, 0.0, Some(0.0), Some(2.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, THROWHI_FRAME_LAND+1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0*factorPower, 270, 90, 0, 15, 2.5*factorSize, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0*factorPower, 270, 90, 0, 15, 2.5*factorSize, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("rot"), 7.0, 65, 95, 0, 85, 8.25*factorSize, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("rot"), 7.0, 65, 95, 0, 85, 8.25*factorSize, 0.0, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); StatusModule::set_situation_kind(boma, SituationKind(*SITUATION_KIND_GROUND), false); - CHECK_FINISH_CAMERA(fighter, 9, 0); + CHECK_FINISH_CAMERA(agent, 9, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 3.0, y: -3.0, z: 0.0}); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); let opponent = boma.get_grabbed_opponent_boma(); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn wario_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let opponent = boma.get_grabbed_opponent_boma(); let opponentScale = PostureModule::scale(opponent); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, -0.4, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_landing_smoke"), Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, -0.4, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 3, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 2, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 3, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 2, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 4, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); - LAST_EFFECT_SET_RATE(fighter,1.25); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 5, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter,1.25); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 4, 0, 0, -90, 0, 1, true, *EF_FLIP_YZ, 1); + LAST_EFFECT_SET_RATE(agent,1.25); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("wario_attack_air_n"), Hash40::new("wario_attack_air_n"), Hash40::new("rot"), 0, 5, 0, 0, -90, 0, (opponentScale+0.4), true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent,1.25); } frame(lua_state, THROWHI_FRAME_FALL+1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), 0, 20, 0, 90, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), 0, 20, 0, 90, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } frame(lua_state, THROWHI_FRAME_LAND+3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn wario_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_wario_jump02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_wario_jump02")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 32.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, THROWHI_FRAME_FALL-5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_wario_006")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_wario_006")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, THROWHI_FRAME_LAND); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_heavy_hit_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_heavy_hit_l")); } } -unsafe extern "C" fn wario_throw_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 13); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 13); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, THROWHI_FRAME_FALL); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, THROWHI_FRAME_LAND); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn wario_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 14, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 14, 3); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 7.5, y: 1.0, z: 0.0}); } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 32.0/(55.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 32.0/(55.0-13.0)); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 55.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn wario_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } //frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn wario_throw_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_wario_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_wario_rnd_attack")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn wario_throw_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - lua_args!(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + lua_args!(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); smash::app::sv_animcmd::FT_ATTACK_ABS_CAMERA_QUAKE(lua_state); - fighter.clear_lua_stack(); + agent.clear_lua_stack(); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_catch", wario_catch_game) - .acmd("game_catchdash", wario_catch_dash_game) - .acmd("game_catchturn", wario_catch_turn_game) - .acmd("game_catchattack", wario_catch_attack_game) - .acmd("effect_catchattack", wario_catch_attack_effect) - .acmd("game_throwlw", wario_throw_lw_game) - .acmd("game_throwhi", wario_throw_hi_game) - .acmd("effect_throwhi", wario_throw_hi_effect) - .acmd("sound_throwhi", wario_throw_hi_sound) - .acmd("expression_throwhi", wario_throw_hi_expression) - .acmd("game_throwf", wario_throw_f_game) - .acmd("effect_throwf", wario_throw_f_effect) - .acmd("sound_throwf", wario_throw_f_sound) - .acmd("expression_throwf", wario_throw_f_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("effect_catchattack", effect_catchattack); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + agent.acmd("sound_throwf", sound_throwf); + agent.acmd("expression_throwf", expression_throwf); } diff --git a/fighters/wario/src/acmd/tilts.rs b/fighters/wario/src/acmd/tilts.rs index 3a7b5ac60a..51c3a989d0 100644 --- a/fighters/wario/src/acmd/tilts.rs +++ b/fighters/wario/src/acmd/tilts.rs @@ -1,156 +1,154 @@ use super::*; -unsafe extern "C" fn wario_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.0, 361, 106, 0, 20, 5.7, 2.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 361, 106, 0, 20, 3.0, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/5.0); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 10.0, 90, 89, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 10.0, 90, 89, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 97, 89, 0, 65, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 6.0, 90, 50, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 6.0, 90, 50, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 100, 50, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 45, 0, 35, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 65, 45, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 4.5, 5.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 2.5, 11.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 65, 45, 0, 35, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 65, 45, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 4.5, 5.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.0, 67, 45, 0, 45, 2.5, 11.0, -1.0, 0.0, None, None, None, 1.1, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn wario_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 3, 8.5, -3.0, 20, -15, 0, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 3, 8.5, -3.0, 20, -15, 0, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("arml"), 9.5, -1.0, 0.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("arml"), 9.5, -1.0, 0.0, 0, 0, 0, 1.0, true); } frame(lua_state, 7.0); } -pub fn install() { - smashline::Agent::new("wario") - .acmd("game_attacks3hi", wario_attack_s3_hi_game) - .acmd("game_attacks3", wario_attack_s3_s_game) - .acmd("game_attacks3lw", wario_attack_s3_lw_game) - .acmd("game_attackhi3", wario_attack_hi3_game) - .acmd("game_attacklw3", wario_attack_lw3_game) - .acmd("effect_attacklw3", wario_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/wario/src/lib.rs b/fighters/wario/src/lib.rs index 8e2ddcc726..2057eebe39 100644 --- a/fighters/wario/src/lib.rs +++ b/fighters/wario/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("wario"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/wario/src/opff.rs b/fighters/wario/src/opff.rs index c32706f591..afd3d548e5 100644 --- a/fighters/wario/src/opff.rs +++ b/fighters/wario/src/opff.rs @@ -112,8 +112,6 @@ pub unsafe fn wario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("wario") - .on_line(Main, wario_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, wario_frame_wrapper); } diff --git a/fighters/wario/src/status.rs b/fighters/wario/src/status.rs index c710fc43b8..43e035471c 100644 --- a/fighters/wario/src/status.rs +++ b/fighters/wario/src/status.rs @@ -146,25 +146,19 @@ unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2 return false.into(); } -pub fn install() { - special_s::install(); - special_hi::install(); - - smashline::Agent::new("wario") - .on_start(wario_init) - .status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec) - .status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end) - .status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre) - .status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init) - .status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main) - .status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit) - .status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end) - .status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec) - .status( - End, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - wario_landing_attack_end, - ) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec) - .install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); + + agent.on_start(wario_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init); + agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main); + agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit); + agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec); + agent.status(End,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,wario_landing_attack_end,); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec); } diff --git a/fighters/wario/src/status/special_hi.rs b/fighters/wario/src/status/special_hi.rs index 4a79ca6094..6081fbafff 100644 --- a/fighters/wario/src/status/special_hi.rs +++ b/fighters/wario/src/status/special_hi.rs @@ -47,13 +47,7 @@ pub unsafe extern "C" fn fall_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Fall() } -pub fn install() { - smashline::Agent::new("wario") - .status( - Main, - *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP, - special_hi_jump_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_FALL, fall_pre) - .install(); +pub fn install(agent: &mut Agent) { + agent.status( Main,*FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP,special_hi_jump_main,); + agent.status(Pre, *FIGHTER_STATUS_KIND_FALL, fall_pre); } diff --git a/fighters/wario/src/status/special_s.rs b/fighters/wario/src/status/special_s.rs index bbf815472a..bab7c16003 100644 --- a/fighters/wario/src/status/special_s.rs +++ b/fighters/wario/src/status/special_s.rs @@ -14,12 +14,6 @@ pub unsafe extern "C" fn special_s_escape_start_exit(weapon: &mut L2CWeaponCommo 0.into() } -pub fn install() { - smashline::Agent::new("wario_wariobike") - .status( - Exit, - *WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START, - special_s_escape_start_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Exit,*WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START,special_s_escape_start_exit,); } From 56485458eac8ff20a6a2864bdcf78a852b931674 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 16:03:07 -0400 Subject: [PATCH 082/172] My nightmare --- fighters/bayonetta/src/acmd/aerials.rs | 460 ++++++------ fighters/bayonetta/src/acmd/ground.rs | 272 ++++--- fighters/bayonetta/src/acmd/mod.rs | 16 +- fighters/bayonetta/src/acmd/other.rs | 668 ++++++++---------- fighters/bayonetta/src/acmd/smashes.rs | 2 +- fighters/bayonetta/src/acmd/specials.rs | 592 ++++++++-------- fighters/bayonetta/src/acmd/throws.rs | 136 ++-- fighters/bayonetta/src/acmd/tilts.rs | 332 +++++---- fighters/bayonetta/src/lib.rs | 8 +- fighters/bayonetta/src/opff.rs | 6 +- fighters/bayonetta/src/specialbullet/acmd.rs | 7 + .../src/specialbullet/acmd/special.rs | 28 + fighters/bayonetta/src/specialbullet/mod.rs | 9 + fighters/bayonetta/src/status/attack.rs | 7 +- fighters/bayonetta/src/status/attackair.rs | 13 +- fighters/bayonetta/src/status/batwithin.rs | 6 +- fighters/bayonetta/src/status/escape.rs | 8 +- fighters/bayonetta/src/status/jumpaerial.rs | 6 +- fighters/bayonetta/src/status/mod.rs | 18 +- fighters/bayonetta/src/status/specialairs.rs | 16 +- fighters/bayonetta/src/status/specialn.rs | 18 +- fighters/bayonetta/src/status/specials.rs | 24 +- fighters/bayonetta/src/wickedweavearm/acmd.rs | 7 + .../src/wickedweavearm/acmd/special.rs | 215 ++++++ fighters/bayonetta/src/wickedweavearm/mod.rs | 9 + fighters/bayonetta/src/wickedweaveleg/acmd.rs | 7 + .../src/wickedweaveleg/acmd/special.rs | 64 ++ fighters/bayonetta/src/wickedweaveleg/mod.rs | 9 + 28 files changed, 1617 insertions(+), 1346 deletions(-) create mode 100644 fighters/bayonetta/src/specialbullet/acmd.rs create mode 100644 fighters/bayonetta/src/specialbullet/acmd/special.rs create mode 100644 fighters/bayonetta/src/specialbullet/mod.rs create mode 100644 fighters/bayonetta/src/wickedweavearm/acmd.rs create mode 100644 fighters/bayonetta/src/wickedweavearm/acmd/special.rs create mode 100644 fighters/bayonetta/src/wickedweavearm/mod.rs create mode 100644 fighters/bayonetta/src/wickedweaveleg/acmd.rs create mode 100644 fighters/bayonetta/src/wickedweaveleg/acmd/special.rs create mode 100644 fighters/bayonetta/src/wickedweaveleg/mod.rs diff --git a/fighters/bayonetta/src/acmd/aerials.rs b/fighters/bayonetta/src/acmd/aerials.rs index 88afe8531d..db3f979e40 100644 --- a/fighters/bayonetta/src/acmd/aerials.rs +++ b/fighters/bayonetta/src/acmd/aerials.rs @@ -1,86 +1,86 @@ use super::*; -unsafe extern "C" fn bayonetta_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.5, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.5, 3.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.5); - FT_MOTION_RATE_RANGE(fighter, 20.5, 23.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 20.5, 23.0, 2.0); frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 40.0, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 48, 102, 0, 35, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 48, 102, 0, 35, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 8.0, 48, 102, 0, 35, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 23.0, 40.0, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 48, 102, 0, 35, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 48, 102, 0, 35, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 8.0, 48, 102, 0, 35, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 40, 0, 70, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 70, 40, 0, 70, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 70, 40, 0, 70, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 40, 0, 70, 4.3, -2.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 70, 40, 0, 70, 3.9, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 70, 40, 0, 70, 3.8, 1.5, 0.0, 1.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); //29faf - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); //29faf + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_CHECK_HOLD); } frame(lua_state, 43.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), false); AttackModule::clear_all(boma); //clear ba hitbox } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 70.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn bayonetta_attack_air_n_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.0, 361, 65, 0, 30, 4.8, 3.0, 0.0, 1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 361, 65, 0, 30, 3.3, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, -6.0, Some(0.0), Some(14.0), Some(-66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, 2.0, Some(0.0), Some(-26.799999), Some(54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); +unsafe extern "C" fn game_attackairnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.0, 361, 65, 0, 30, 4.8, 3.0, 0.0, 1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 361, 65, 0, 30, 3.3, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, -6.0, Some(0.0), Some(14.0), Some(-66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, 2.0, Some(0.0), Some(-26.799999), Some(54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 7, false); AttackModule::clear(boma, 8, false); AttackModule::clear(boma, 9, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, 6.0, Some(0.0), Some(14.0), Some(66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, -13.0, Some(0.0), Some(11.0), Some(-73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ATTACK(fighter, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, -2.0, Some(0.0), Some(-26.799999), Some(-54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); + if is_excute(agent) { + ATTACK(agent, 7, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 14.0, 6.0, Some(0.0), Some(14.0), Some(66.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 8, 1, Hash40::new("top"), 0.5, 361, 0, 0, 0, 2.5, 0.0, 11.0, -13.0, Some(0.0), Some(11.0), Some(-73.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ATTACK(agent, 9, 1, Hash40::new("top"), 0.5, 330, 0, 0, 0, 2.5, 0.0, 3.2, -2.0, Some(0.0), Some(-26.799999), Some(-54.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 7, 12, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 8, 15, 4); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), 9, 3, 4); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 7, false); AttackModule::clear(boma, 8, false); AttackModule::clear(boma, 9, false); @@ -88,348 +88,348 @@ unsafe extern "C" fn bayonetta_attack_air_n_hold_game(fighter: &mut L2CAgentBase } -unsafe extern "C" fn bayonetta_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.5, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 5.5, 2.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 11.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 2.5, 0.0, 9.2, 3.2, Some(0.0), Some(9.2), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 2.5, 0.0, 14.8, 3.2, Some(0.0), Some(14.8), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 3.0, 66, 10, 0, 68, 1.8, 0.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 7.0, 11.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 2.5, 0.0, 9.2, 3.2, Some(0.0), Some(9.2), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 2.5, 0.0, 14.8, 3.2, Some(0.0), Some(14.8), Some(7.5), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 5.0, 0.0, 12.0, 5.0, Some(0.0), Some(12.0), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 3.0, 66, 10, 0, 68, 1.8, 0.0, 0.0, 0.0, Some(5.0), Some(0.0), Some(0.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 1); } frame(lua_state, 11.0);//7 - FT_MOTION_RATE_RANGE(fighter, 11.0, 31.0, 19.0); //26 faf - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.0, 31.0, 19.0); //26 faf + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 31.0);//25 - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 36.0); //35 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_f2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, false, true, 10, 3, 10, 0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 9.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 3.5, 0.0, 9.5, 6.0, Some(0.0), Some(9.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 3.5, 0.0, 14.5, 6.0, Some(0.0), Some(14.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 7.0, 9.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 67, 10, 0, 62, 3.5, 0.0, 9.5, 6.0, Some(0.0), Some(9.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 52, 10, 0, 60, 3.5, 0.0, 14.5, 6.0, Some(0.0), Some(14.5), Some(11.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 79, 10, 0, 68, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 79, 10, 0, 56, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(15.0), 1.1, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 2); } frame(lua_state, 9.0);//10 - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0);//11 - FT_MOTION_RATE_RANGE(fighter, 10.0, 35.0, 15.0); //26 - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); + FT_MOTION_RATE_RANGE(agent, 10.0, 35.0, 15.0); //26 + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_F_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 39.0); //35 - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_f3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 2.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 10, 3, 10, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 2.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 11.5, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 11.5, 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.5); //7 - FT_MOTION_RATE_RANGE(fighter, 11.5, 16.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 3.6, -4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.1, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.6, 6.95, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 11.5, 16.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 3.6, -4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.1, 1.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 55, 70, 0, 60, 4.6, 6.95, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); VarModule::set_int(boma.object(), vars::bayonetta::instance::FAIR_STATE, 0); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 20.0); //15 - FT_MOTION_RATE_RANGE(fighter, 20.0, 45.0, 17.0); //37 + FT_MOTION_RATE_RANGE(agent, 20.0, 45.0, 17.0); //37 frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10, 3, 10, 5, true); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 8.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 10, 3, 10, 5, true); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 40, 120, 0, 20, 3.6, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 40, 120, 0, 15, 4.2, 6.8, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 50, 120, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 50, 70, 0, 40, 1.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 40, 120, 0, 20, 3.6, 0.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 40, 120, 0, 15, 4.2, 6.8, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 50, 120, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 50, 70, 0, 40, 1.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 26.0); //15 - FT_MOTION_RATE_RANGE(fighter, 26.0, 45.0, 16.0);//31 + FT_MOTION_RATE_RANGE(agent, 26.0, 45.0, 16.0);//31 frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn bayonetta_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.45); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20, 3, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.45); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20, 3, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); //8 - FT_MOTION_RATE_RANGE(fighter, 10.0, 20.3, 5.55); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 10.0, 20.3, 5.55); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 101, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.3);//14 - FT_MOTION_RATE_RANGE(fighter, 20.3, 28.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 20.3, 28.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 4.2, 6.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.6, 2.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 55, 82, 0, 50, 3.2, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 28.0);//17 - FT_MOTION_RATE_RANGE(fighter, 28.0, 37.0, 13.0); //28 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 28.0, 37.0, 13.0); //28 + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_CHECK_HOLD); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), false); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 0, 14.6, -0.1, 0, -55, -90, 1.14, true); - LAST_EFFECT_SET_RATE(fighter, 0.84); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 0, 14.6, -0.1, 0, -55, -90, 1.14, true); + LAST_EFFECT_SET_RATE(agent, 0.84); } - frame(fighter.lua_state_agent, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, false, true); + frame(agent.lua_state_agent, 29.0); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, false, true); } } -unsafe extern "C" fn bayonetta_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn bayonetta_attack_air_hi_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhihold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 1.5, 48, 45, 0, 25, 3.5, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } -unsafe extern "C" fn bayonetta_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 25.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 25.0, 15.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_KEEP_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -3.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 70, 120, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 70, 120, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 270, 40, 0, 45, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 7.0, 70, 100, 50, 0, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 9.0, 270, 100, 85, 0, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 9.0, 230, 100, 85, 0, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 7.0, 70, 100, 50, 0, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 9.0, 270, 100, 85, 0, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 9.0, 230, 100, 85, 0, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 33.0); - FT_MOTION_RATE_RANGE(fighter, 33.0, 43.0, 8.0); //48 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 33.0, 43.0, 8.0); //48 + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, -5.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 50, 50, 0, 30, 4.0, 5.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_STATUS_ATTACK_AIR_FLAG_LANDING_DISABLE_ATTACK); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 3, 0, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 3, 0, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 127, 0, 75, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(13.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -437,20 +437,18 @@ unsafe extern "C" fn bayonetta_landing_air_lw_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attackairn", bayonetta_attack_air_n_game) - .acmd("game_attackairnhold", bayonetta_attack_air_n_hold_game) - .acmd("game_attackairf", bayonetta_attack_air_f_game) - .acmd("game_attackairf2", bayonetta_attack_air_f2_game) - .acmd("game_attackairf3", bayonetta_attack_air_f3_game) - .acmd("game_attackairb", bayonetta_attack_air_b_game) - .acmd("expression_attackairb", bayonetta_attack_air_b_expression) - .acmd("game_attackairhi", bayonetta_attack_air_hi_game) - .acmd("effect_attackairhi", bayonetta_attack_air_hi_effect) - .acmd("expression_attackairhi", bayonetta_attack_air_hi_expression) - .acmd("game_attackairhihold", bayonetta_attack_air_hi_hold_game) - .acmd("game_attackairlw", bayonetta_attack_air_lw_game) - .acmd("game_landingairlw", bayonetta_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairnhold", game_attackairnhold); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf2", game_attackairf2); + agent.acmd("game_attackairf3", game_attackairf3); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairhihold", game_attackairhihold); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/bayonetta/src/acmd/ground.rs b/fighters/bayonetta/src/acmd/ground.rs index 29affc235d..e80cbdd75e 100644 --- a/fighters/bayonetta/src/acmd/ground.rs +++ b/fighters/bayonetta/src/acmd/ground.rs @@ -1,112 +1,112 @@ use super::*; -unsafe extern "C" fn bayonetta_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 3.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); //5 - FT_MOTION_RATE_RANGE(fighter, 9.0, 13.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 13.0, 3.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 52, 10, 0, 35, 3.5, 0.0, 10.0, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 58, 10, 0, 35, 3.5, 0.0, 10.0, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 64, 10, 0, 32, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 52, 10, 0, 35, 3.5, 0.0, 10.0, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 58, 10, 0, 35, 3.5, 0.0, 10.0, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 64, 10, 0, 32, 4.0, 0.0, 10.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 5.0, 3.0, Some(0.0), Some(5.0), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 13.0); //8 - FT_MOTION_RATE_RANGE(fighter, 13.0, 27.0, 12.0);//20f - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 27.0, 12.0);//20f + if is_excute(agent) { AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn bayonetta_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 5.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 52, 10, 0, 40, 3.0, 0.0, 10.8, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 58, 10, 0, 40, 3.2, 0.0, 10.6, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 64, 10, 0, 40, 4.0, 0.0, 10.3, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.0, 0.0, 4.5, 6.0, Some(0.0), Some(4.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 52, 10, 0, 40, 3.0, 0.0, 10.8, 3.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 58, 10, 0, 40, 3.2, 0.0, 10.6, 7.2, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 64, 10, 0, 40, 4.0, 0.0, 10.3, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.0, 0.0, 4.5, 6.0, Some(0.0), Some(4.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 1.0, false); AttackModule::set_down_only(boma, 3, true); } frame(lua_state, 12.0);//10 - FT_MOTION_RATE_RANGE(fighter, 12.0, 27.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 12.0, 27.0, 10.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 27.0);//20f - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, false, 10); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 5.0, 57, 101, 0, 57, 4.0, 0.0, 0.0, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 5.0, 57, 101, 0, 57, 4.0, 0.0, 0.0, 2.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 57, 101, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -114,152 +114,150 @@ unsafe extern "C" fn bayonetta_attack_13_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_attack_100_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..99 { frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); } - wait_loop_clear(fighter); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + wait_loop_clear(agent); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); //loc.imp._Unwind_Resume(); } } -unsafe extern "C" fn bayonetta_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), true); GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 90, 100, 30, 0, 3.0, 0.0, 6.0, 23.5, Some(0.0), Some(6.0), Some(8.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 90, 100, 20, 0, 4.5, 0.0, 11.0, 22.5, Some(0.0), Some(11.0), Some(9.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 90, 100, 30, 0, 3.0, 0.0, 6.0, 23.5, Some(0.0), Some(6.0), Some(8.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 90, 100, 20, 0, 4.5, 0.0, 11.0, 22.5, Some(0.0), Some(11.0), Some(9.5), 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 136, 0, 60, 6.5, 0.0, 8.5, 6.8, Some(0.0), Some(8.5), Some(13.8), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 136, 0, 60, 6.5, 0.0, 8.5, 6.8, Some(0.0), Some(8.5), Some(13.8), 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); } frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 18/(41-30)); + FT_MOTION_RATE(agent, 18/(41-30)); } -unsafe extern "C" fn bayonetta_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.5, 10.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.5, 10.5); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); } frame(lua_state, 16.5); - FT_MOTION_RATE_RANGE(fighter, 16.5, 27.0, 11.5); + FT_MOTION_RATE_RANGE(agent, 16.5, 27.0, 11.5); frame(lua_state, 17.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 5.0, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 5.0, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 56, 75, 0, 75, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 4.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 4.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 56, 60, 0, 60, 1.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 28.0); - FT_MOTION_RATE_RANGE(fighter, 28.0, 43.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 28.0, 43.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attack11", bayonetta_attack_11_game) - .acmd("game_attack12", bayonetta_attack_12_game) - .acmd("game_attack13", bayonetta_attack_13_game) - .acmd("game_attack100", bayonetta_attack_100_game) - .acmd("game_attack100end", bayonetta_attack_100_end_game) - .acmd("game_attackdash", bayonetta_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100", game_attack100); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/bayonetta/src/acmd/mod.rs b/fighters/bayonetta/src/acmd/mod.rs index 6312b876a0..4ef668d792 100644 --- a/fighters/bayonetta/src/acmd/mod.rs +++ b/fighters/bayonetta/src/acmd/mod.rs @@ -8,12 +8,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 3351ccce10..0b206702dc 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -1,589 +1,564 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_bayonetta_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_bayonetta_step_right_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); +unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); } frame(lua_state, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } wait(lua_state, 40.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); +unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - VisibilityModule::set_int64(fighter.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); } - frame(fighter.lua_state_agent, 9.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + frame(agent.lua_state_agent, 9.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } wait(lua_state, 40.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } -unsafe extern "C" fn bayonetta_wickedweavearm_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn bayonetta_wickedweavearm_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ModelModule::set_scale(boma, 0.96); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } -unsafe extern "C" fn bayonetta_wickedweaveleg_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn bayonetta_wickedweaveleg_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } - -unsafe extern "C" fn bayonetta_specialn_bullet_move_charge_bullet_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn bayonetta_specialn_bullet_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); - if is_excute(fighter) { - if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_n_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapen(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_escapef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); } } -unsafe extern "C" fn escape_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeb(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn down_left_taunt_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 175.0); - if is_excute(fighter) { - StatusModule::change_status_request(fighter.module_accessor, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 175.0); + if is_excute(agent) { + StatusModule::change_status_request(agent.module_accessor, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } } -unsafe extern "C" fn side_taunt_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 144/(90-1)); +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 144/(90-1)); } -unsafe extern "C" fn up_taunt_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 210/(100-1)); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 210/(100-1)); } -unsafe extern "C" fn sound_appealhi (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appealhil (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("vc_bayonetta_appeal01")); - sv_animcmd::PLAY_DAMAGESTOP(fighter.lua_state_agent); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("vc_bayonetta_appeal01")); + sv_animcmd::PLAY_DAMAGESTOP(agent.lua_state_agent); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h02")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_s")); } frame(lua_state, 38.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, Hash40::new("vc_bayonetta_appeal01_02")); - sv_animcmd::PLAY_DAMAGESTOP(fighter.lua_state_agent); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("vc_bayonetta_appeal01_02")); + sv_animcmd::PLAY_DAMAGESTOP(agent.lua_state_agent); } frame(lua_state, 41.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_appeal_h03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_appeal_h03")); } frame(lua_state, 45.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_m")); } } -unsafe extern "C" fn sound_appeallwr(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01")); +unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 21.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01")); } - frame(fighter.lua_state_agent, 40.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_02")); + frame(agent.lua_state_agent, 40.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_02")); } - frame(fighter.lua_state_agent, 50.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_03")); + frame(agent.lua_state_agent, 50.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_03")); } - frame(fighter.lua_state_agent, 67.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_bayonetta_win08")); + frame(agent.lua_state_agent, 67.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_bayonetta_win08")); } - frame(fighter.lua_state_agent, 90.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_step_right_m")); - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_04")); + frame(agent.lua_state_agent, 90.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_m")); + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_04")); } - frame(fighter.lua_state_agent, 106.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_05")); + frame(agent.lua_state_agent, 106.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_05")); } - frame(fighter.lua_state_agent, 127.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win01_06")); + frame(agent.lua_state_agent, 127.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win01_06")); } } -unsafe extern "C" fn sound_appeallwl(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win02_02")); +unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 20.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win02_02")); } - frame(fighter.lua_state_agent, 55.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_win02_03")); + frame(agent.lua_state_agent, 55.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_win02_03")); } - frame(fighter.lua_state_agent, 85.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_bayonetta_win09")); + frame(agent.lua_state_agent, 85.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_bayonetta_win09")); } } @@ -613,13 +588,13 @@ unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn just_shield_off_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 1, true); let rate = WorkModule::get_float(boma, *WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_FLOAT_MOTION_RATE); - LAST_EFFECT_SET_RATE(fighter, rate); + LAST_EFFECT_SET_RATE(agent, rate); } // if fighter.get_int(*WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_INT_COSTUME_KIND) == *FIGHTER_BAYONETTA_COSTUME_KIND_BAYONETTA_1 { // if is_excute(fighter) { @@ -630,67 +605,52 @@ unsafe extern "C" fn just_shield_off_effect(fighter: &mut L2CAgentBase) { // EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin_bat2"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); // } // } - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("bayonetta_batwithin_change"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("bayonetta_batwithin_change"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn just_shield_off_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_batwithin02")); +unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_batwithin02")); let rng = app::sv_math::rand(hash40("fighter"), 6) as i32; if rng >= 2 { match rng { - 2 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l02")), - 3 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l03")), - 4 => PLAY_SE(fighter, Hash40::new("vc_bayonetta_special_l04")), - _ => PLAY_SE(fighter, Hash40::new("vc_bayonetta_win09")), + 2 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l02")), + 3 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l03")), + 4 => PLAY_SE(agent, Hash40::new("vc_bayonetta_special_l04")), + _ => PLAY_SE(agent, Hash40::new("vc_bayonetta_win09")), } } } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_escapen", escape_n_game) - .acmd("game_escapef", escape_f_game) - .acmd("game_escapeb", escape_b_game) - .acmd("game_appeallwl", down_left_taunt_game) - .acmd("game_appealsr", side_taunt_game) - .acmd("game_appealsl", side_taunt_game) - .acmd("game_appealhir", up_taunt_game) - .acmd("game_appealhil", up_taunt_game) - .acmd("sound_appealhir", sound_appealhi) - .acmd("sound_appealhil", sound_appealhi) - .acmd("sound_appeallwr", sound_appeallwr) - .acmd("sound_appeallwl", sound_appeallwl) - .acmd("game_catchattack", game_catchattack) - .acmd("effect_justshieldoff", just_shield_off_effect) - .acmd("sound_justshieldoff", just_shield_off_sound) - .install(); - smashline::Agent::new("bayonetta_wickedweavearm") - .acmd("game_attacks4", bayonetta_wickedweavearm_attack_s4_game) - .acmd("game_attacks4lw", bayonetta_wickedweavearm_attack_s4_lw_game) - .acmd("game_attacks4hi",bayonetta_wickedweavearm_attack_s4_hi_game) - .acmd("game_attackhi4", bayonetta_wickedweavearm_attack_hi4_game) - .install(); - smashline::Agent::new("bayonetta_wickedweaveleg") - .acmd("game_attacklw4", bayonetta_wickedweaveleg_attack_lw4_game) - .install(); - smashline::Agent::new("bayonetta_specialn_bullet") - .acmd("game_movechargebullet", bayonetta_specialn_bullet_move_charge_bullet_game) - .acmd("game_move", bayonetta_specialn_bullet_move_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_escapen", game_escapen); + agent.acmd("game_escapef", game_escapef); + agent.acmd("game_escapeb", game_escapeb); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("game_appealsl", game_appealsr); + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhir); + agent.acmd("sound_appealhir", sound_appealhil); + agent.acmd("sound_appealhil", sound_appealhil); + agent.acmd("sound_appeallwr", sound_appeallwr); + agent.acmd("sound_appeallwl", sound_appeallwl); + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("effect_justshieldoff", effect_justshieldoff); + agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/bayonetta/src/acmd/smashes.rs b/fighters/bayonetta/src/acmd/smashes.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/bayonetta/src/acmd/smashes.rs +++ b/fighters/bayonetta/src/acmd/smashes.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index f203022e8f..668b0c1054 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -1,508 +1,506 @@ use super::*; -unsafe extern "C" fn bayonetta_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnstarth(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 30.0, 15.0);//van + 1 + FT_MOTION_RATE_RANGE(agent, 1.0, 30.0, 15.0);//van + 1 } -unsafe extern "C" fn bayonetta_special_n_charge_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnchargef(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.65); //van + FT_MOTION_RATE(agent, 1.65); //van } -unsafe extern "C" fn bayonetta_special_n_end_h_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnendh(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 58.0, 25.0);//32 > 26 + FT_MOTION_RATE_RANGE(agent, 1.0, 58.0, 25.0);//32 > 26 } -unsafe extern "C" fn bayonetta_special_n_end_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnendf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 48.0, 25.0);//32 > 26 + FT_MOTION_RATE_RANGE(agent, 1.0, 48.0, 25.0);//32 > 26 } -unsafe extern "C" fn bayonetta_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); GroundModule::set_correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 42, 8, 0, 95, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 42, 8, 0, 95, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 8.0, 47, 8, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 8.0, 47, 8, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.5, 50, 8, 0, 79, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.5, 50, 8, 0, 79, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); //57faf - FT_MOTION_RATE_RANGE(fighter, 40.0, 62.0, 17.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 40.0, 62.0, 17.0); + if is_excute(agent) { AttackModule::clear_all(boma); //fighter.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); //fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); } } -unsafe extern "C" fn bayonetta_special_s_edge_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsedge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_WALL_CHECK); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 10, 0, 20, 0, false); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 62, 8, 0, 69, 4.0, 0.0, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); + agent.set_int(*FIGHTER_BAYONETTA_SHOOTING_STEP_WAIT_END, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_SHOOTING_STEP); //fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 24.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_s_edge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsedge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_heelslide_burst"), Hash40::new("kneer"), 9.5, 0, 0, 0, 90, 0, 1.1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_heelslide_burst"), Hash40::new("kneer"), 9.5, 0, 0, 0, 90, 0, 1.1, true); EffectModule::enable_sync_init_pos_last(boma); - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_PARTICLE_SET_COLOR(fighter, 1.5, 0.095, 0.163); } - else {LAST_PARTICLE_SET_COLOR(fighter, 0.048, 0.452, 1); } + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_PARTICLE_SET_COLOR(agent, 1.5, 0.095, 0.163); } + else {LAST_PARTICLE_SET_COLOR(agent, 0.048, 0.452, 1); } } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("bayonetta_heelslide_burst"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("bayonetta_heelslide_burst"), false, false); } } -unsafe extern "C" fn bayonetta_special_s_edge_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsedge(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn bayonetta_special_s_edge_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialsedge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn bayonetta_special_s_hold_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsholdend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 34.5, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 2, 0, 0, 0, false); - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 70, 8, 0, 50, 4.0, 0.5, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 1.0, 34.5, 11.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 2, 0, 0, 0, false); + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 70, 8, 0, 50, 4.0, 0.5, 0.0, 0.0, Some(-8.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); - AttackModule::clear_all(fighter.module_accessor); + AttackModule::clear_all(agent.module_accessor); //fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_END_SPECIAL_S); } frame(lua_state, 34.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 37.5); - FT_MOTION_RATE_RANGE(fighter, 37.5, 40.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 5.0, 98, 66, 0, 60, 4.8, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 98, 66, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("waist"), 5.0, 90, 66, 0, 60, 3.9, 0.0, -0.9, -1.1, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 37.5, 40.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 5.0, 98, 66, 0, 60, 4.8, 1.2, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 98, 66, 0, 60, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("waist"), 5.0, 90, 66, 0, 60, 3.9, 0.0, -0.9, -1.1, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 44.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 44.0, 2.0); frame(lua_state, 44.0); - FT_MOTION_RATE_RANGE(fighter, 44.0, 61.0, 15.0); //35 faf kick - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 44.0, 61.0, 15.0); //35 faf kick + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn bayonetta_special_air_s_u_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 6.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 6.5); + if is_excute(agent) { JostleModule::set_status(boma, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 5, 0, 20, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 5); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 5, 0, 20, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 5); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 65, 27, 0, 72, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 65, 27, 0, 72, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 70, 27, 0, 66, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 70, 27, 0, 66, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 47, 100, 70, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 47, 100, 70, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.7, 47, 100, 65, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.7, 47, 100, 65, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.7, 51, 100, 50, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.7, 51, 100, 50, 0, 4.5, 4.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } JostleModule::set_status(boma, true); AttackModule::clear_all(boma); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 32.0); //28 - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { //filters out bullet hits - CancelModule::enable_cancel(fighter.module_accessor); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { //filters out bullet hits + CancelModule::enable_cancel(agent.module_accessor); } } frame(lua_state, 38.0); //32 - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_air_s_u_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 13.0, 12.1, -21.1, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.15); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 13.8, 13.5, -21, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.15); - } - frame(fighter.lua_state_agent, 26.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("bayonetta_afterburner_line2"), -1); +unsafe extern "C" fn effect_specialairsu(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 13.0, 12.1, -21.1, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.15); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 13.8, 13.5, -21, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.15); + } + frame(agent.lua_state_agent, 26.0); + if is_excute(agent) { + EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, -1); + EFFECT_DETACH_KIND(agent, Hash40::new("bayonetta_afterburner_line2"), -1); } } -unsafe extern "C" fn bayonetta_special_air_s_u_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn bayonetta_shootinglegl_atk_on_special_air_s_u_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if !fighter.is_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_DISABLE_ROOT_ATTACK) { - ATTACK(fighter, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_00 as u64, 0, Hash40::new("top"), 0.5, 340, 100, 0, 10, 3.5, 0.0, 4.5, -0.5, Some(0.0), Some(4.5), Some(3.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); +unsafe extern "C" fn game_shootinglegl_atkon_specialairsu(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !agent.is_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_DISABLE_ROOT_ATTACK) { + ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_00 as u64, 0, Hash40::new("top"), 0.5, 340, 100, 0, 10, 3.5, 0.0, 4.5, -0.5, Some(0.0), Some(4.5), Some(3.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); } - ATTACK(fighter, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01 as u64, 0, Hash40::new("top"), 0.5, 340, 0, 0, 0, 2.5, 0.0, 2.5, 3.0, Some(0.0), Some(-18.0), Some(59.4), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x36db1a34c9), FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01, 6, 4.05); + ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01 as u64, 0, Hash40::new("top"), 0.5, 340, 0, 0, 0, 2.5, 0.0, 2.5, 3.0, Some(0.0), Some(-18.0), Some(59.4), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01, 6, 4.05); } } -unsafe extern "C" fn bayonetta_special_air_s_d_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.5, 86, 35, 0, 95, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.5, 86, 35, 0, 95, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.5, 86, 35, 0, 95, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.5, 86, 35, 0, 95, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear_all(boma); - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_LANDING_FALL_SPECIAL); + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_FLAG_WALL_CHECK); + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_LANDING_FALL_SPECIAL); VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn bayonetta_special_air_s_d_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 0, 7, 45, -6, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 0.85); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 0, 7, 45, -5, 0, 1.1, true); +unsafe extern "C" fn effect_specialairsd(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 0, 7, 45, -6, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 0.85); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 0, 7, 45, -5, 0, 1.1, true); } } -unsafe extern "C" fn bayonetta_special_air_s_d_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairsd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn bayonetta_special_air_s_d_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsdlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } } -unsafe extern "C" fn bayonetta_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, false, false, true, 20, 0, 15, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, true, 20); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, true, 20); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.0, 0.0, 4.5, 0.0, Some(0.0), Some(12.5), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.5, 0.0, 5.5, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.0, 0.0, 4.5, 0.0, Some(0.0), Some(12.5), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 368, 10, 0, 0, 3.5, 0.0, 5.5, 5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 0.5, y: 33.0}, 11, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: -0.3, y: 33.0}, 11, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 4.3, 0.0, 18.2, 0.5, Some(0.0), Some(20.4), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 2.6, 0.0, 16.0, 0.5, Some(0.0), Some(23.7), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 4.3, 0.0, 18.2, 0.5, Some(0.0), Some(20.4), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 368, 10, 0, 0, 2.6, 0.0, 16.0, 0.5, Some(0.0), Some(23.7), Some(0.5), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("head"), &Vector2f{x: 0.0, y: 15.5}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("head"), &Vector2f{x: 0.0, y: 14.5}, 10, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 22, 35, 0, 40, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 22, 35, 0, 40, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 42, 55, 0, 45, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 42, 55, 0, 45, 4.6, 0.0, 23.1, 0.0, Some(0.0), Some(18.4), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2bfb02b69a), true); - if !VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), true); + if !VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { VarModule::inc_int(boma.object(), vars::bayonetta::instance::NUM_RECOVERY_RESOURCE_USED); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { - CancelModule::enable_cancel(fighter.module_accessor); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { + CancelModule::enable_cancel(agent.module_accessor); } } frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn bayonetta_special_hi_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.86, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 0.82, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); + frame(agent.lua_state_agent, 11.0); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.86, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 0.82, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_REUSE) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.7); } } - frame(fighter.lua_state_agent, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); - EffectModule::kill_kind(fighter.module_accessor, Hash40::new("bayonetta_afterburner_line2"), false, true); + frame(agent.lua_state_agent, 22.0); + if is_excute(agent) { + EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); + EffectModule::kill_kind(agent.module_accessor, Hash40::new("bayonetta_afterburner_line2"), false, true); } - frame(fighter.lua_state_agent, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, false, true); - EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, false, true); + frame(agent.lua_state_agent, 24.0); + if is_excute(agent) { + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, false, true); + EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, false, true); } } -unsafe extern "C" fn bayonetta_special_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_bayonetta_rnd_attack01")); - PLAY_SE(fighter, Hash40::new("se_bayonetta_special_h01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_bayonetta_rnd_attack01")); + PLAY_SE(agent, Hash40::new("se_bayonetta_special_h01")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_attackair_f02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_attackair_f02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_bayonetta_special_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_bayonetta_special_h02")); } } -unsafe extern "C" fn bayonetta_special_lw (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 4.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 1.3); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 4.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 1.3); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 4.0); //5 - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 4.0); //5 + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } - fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); - SEARCH(fighter, 0, 0, Hash40::new("top"), 11.5, -2.0, 10.0, 0.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); + agent.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); + SEARCH(agent, 0, 0, Hash40::new("top"), 11.5, -2.0, 10.0, 0.0, None, None, None, *COLLISION_KIND_MASK_ATTACK, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_BODY_HEAD, false); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); //9 - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), true); + FT_MOTION_RATE(agent, 1.0); //9 + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 31.0, 7.0); //15 - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + FT_MOTION_RATE_RANGE(agent, 21.0, 31.0, 7.0); //15 + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_WITCH_TIME); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 31.0);//22 - if fighter.is_situation(*SITUATION_KIND_GROUND) { - FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 28.0); - } else { FT_MOTION_RATE_RANGE(fighter, 31.0, 66.0, 23.0); } - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2ea0f68425), false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 28.0); + } else { FT_MOTION_RATE_RANGE(agent, 31.0, 66.0, 23.0); } + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); } frame(lua_state, 44.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); + if is_excute(agent) { + agent.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_LW_FLAG_ENABLE_NEXT_NO_COMP); } } //faf 50/45 -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_specialnstarth", bayonetta_special_n_start_game) - .acmd("game_specialnstartf", bayonetta_special_n_start_game) - .acmd("game_specialairnstarth", bayonetta_special_n_start_game) - .acmd("game_specialairnstartf", bayonetta_special_n_start_game) - .acmd("game_specialnchargef", bayonetta_special_n_charge_game) - .acmd("game_specialnchargeh", bayonetta_special_n_charge_game) - .acmd("game_specialairnchargef", bayonetta_special_n_charge_game) - .acmd("game_specialairnchargeh", bayonetta_special_n_charge_game) - .acmd("game_specialnendh", bayonetta_special_n_end_h_game) - .acmd("game_specialnendf", bayonetta_special_n_end_f_game) - .acmd("game_specialairnendh", bayonetta_special_n_end_h_game) - .acmd("game_specialairnendf", bayonetta_special_n_end_f_game) - .acmd("game_specials", bayonetta_special_s_game) - .acmd("game_specialsedge", bayonetta_special_s_edge_game) - .acmd("effect_specialsedge", bayonetta_special_s_edge_effect) - .acmd("sound_specialsedge", bayonetta_special_s_edge_sound) - .acmd("expression_specialsedge", bayonetta_special_s_edge_expression) - .acmd("game_specialsholdend", bayonetta_special_s_hold_end_game) - .acmd("game_specialairsu", bayonetta_special_air_s_u_game) - .acmd("effect_specialairsu", bayonetta_special_air_s_u_effect) - .acmd("expression_specialairsu", bayonetta_special_air_s_u_expression) - .acmd("game_shootinglegl_atkon_specialairsu", bayonetta_shootinglegl_atk_on_special_air_s_u_game) - .acmd("game_specialairsd", bayonetta_special_air_s_d_game) - .acmd("effect_specialairsd", bayonetta_special_air_s_d_effect) - .acmd("expression_specialairsd", bayonetta_special_air_s_d_expression) - .acmd("game_specialairsdlanding", bayonetta_special_air_s_d_landing_game) - .acmd("game_specialairhi", bayonetta_special_hi_game) - .acmd("game_specialhi", bayonetta_special_hi_game) - .acmd("effect_specialairhi", bayonetta_special_hi_effect) - .acmd("effect_specialhi", bayonetta_special_hi_effect) - .acmd("sound_specialhi", bayonetta_special_hi_sound) - .acmd("sound_specialairhi", bayonetta_special_hi_sound) - .acmd("game_speciallw", bayonetta_special_lw) - .acmd("game_specialairlw", bayonetta_special_lw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstarth", game_specialnstarth); + agent.acmd("game_specialnstartf", game_specialnstarth); + agent.acmd("game_specialairnstarth", game_specialnstarth); + agent.acmd("game_specialairnstartf", game_specialnstarth); + agent.acmd("game_specialnchargef", game_specialnchargef); + agent.acmd("game_specialnchargeh", game_specialnchargef); + agent.acmd("game_specialairnchargef", game_specialnchargef); + agent.acmd("game_specialairnchargeh", game_specialnchargef); + agent.acmd("game_specialnendh", game_specialnendh); + agent.acmd("game_specialnendf", game_specialnendf); + agent.acmd("game_specialairnendh", game_specialnendh); + agent.acmd("game_specialairnendf", game_specialnendf); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsedge", game_specialsedge); + agent.acmd("effect_specialsedge", effect_specialsedge); + agent.acmd("sound_specialsedge", sound_specialsedge); + agent.acmd("expression_specialsedge", expression_specialsedge); + agent.acmd("game_specialsholdend", game_specialsholdend); + agent.acmd("game_specialairsu", game_specialairsu); + agent.acmd("effect_specialairsu", effect_specialairsu); + agent.acmd("expression_specialairsu", expression_specialairsu); + agent.acmd("game_shootinglegl_atkon_specialairsu", game_shootinglegl_atkon_specialairsu); + agent.acmd("game_specialairsd", game_specialairsd); + agent.acmd("effect_specialairsd", effect_specialairsd); + agent.acmd("expression_specialairsd", expression_specialairsd); + agent.acmd("game_specialairsdlanding", game_specialairsdlanding); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("effect_specialhi", effect_specialairhi); + agent.acmd("sound_specialhi", sound_specialhi); + agent.acmd("sound_specialairhi", sound_specialhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/bayonetta/src/acmd/throws.rs b/fighters/bayonetta/src/acmd/throws.rs index 18bdd63aef..6aa8b177dc 100644 --- a/fighters/bayonetta/src/acmd/throws.rs +++ b/fighters/bayonetta/src/acmd/throws.rs @@ -1,46 +1,46 @@ use super::*; -unsafe extern "C" fn bayonetta_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn bayonetta_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn bayonetta_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -60,90 +60,88 @@ unsafe extern "C" fn bayonetta_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 165, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 165, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 55, 160, 0, 30, 6.0, 0.0, 10.0, 5.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 55, 160, 0, 30, 6.0, 0.0, 10.0, 5.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 14, 7); + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 50.0, 28.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 50.0, 28.0); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.5, 85, 78, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.5, 85, 78, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 80, 170, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 18); + CHECK_FINISH_CAMERA(agent, 8, 18); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 16.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 81, 170, 0, 26, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 81, 170, 0, 26, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 68, 140, 0, 60, 6.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 68, 140, 0, 60, 6.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 0); + CHECK_FINISH_CAMERA(agent, 15, 0); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 41.0, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 21.0, 41.0, 16.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_catch", bayonetta_catch_game) - .acmd("game_catchdash", bayonetta_catch_dash_game) - .acmd("game_catchturn", bayonetta_catch_turn_game) - .acmd("game_throwf", bayonetta_throw_f_game) - .acmd("game_throwhi", bayonetta_throw_hi_game) - .acmd("game_throwlw", bayonetta_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/bayonetta/src/acmd/tilts.rs b/fighters/bayonetta/src/acmd/tilts.rs index d1c0ca4f5f..79ba82e09f 100644 --- a/fighters/bayonetta/src/acmd/tilts.rs +++ b/fighters/bayonetta/src/acmd/tilts.rs @@ -1,146 +1,146 @@ use super::*; -unsafe extern "C" fn bayonetta_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 22.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 22.0, 4.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 62, 15, 0, 55, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 50, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 50, 4.0, 5.5, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0, 52, 15, 0, 45, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 35, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 35, 4.0, 4.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 62, 15, 0, 55, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 50, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 50, 4.0, 5.5, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0, 52, 15, 0, 45, 4.0, 2.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 70, 15, 0, 35, 4.0, 0.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 75, 15, 0, 35, 4.0, 4.0, 1.0, 3.0, None, None, None, 1.1, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 46.0, 16.0); //25 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 26.0, 46.0, 16.0); //25 + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 6.0); AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } } -unsafe extern "C" fn bayonetta_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 45.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn bayonetta_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.75, 9.0); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.75, 9.0); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 16.75); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.75); - FT_MOTION_RATE_RANGE(fighter, 18.75, 20.5, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 62, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 4.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 18.75, 20.5, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 62, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 0.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 67, 52, 0, 77, 5.0, 4.0, 0.0, -3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.5); - FT_MOTION_RATE_RANGE(fighter, 20.5, 47.0, 14.0); //28faf - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.5, 47.0, 14.0); //28faf + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); - fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); + agent.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -unsafe extern "C" fn bayonetta_attack_s3_s2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); +unsafe extern "C" fn expression_attacks32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn bayonetta_attack_s3_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks33(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 20.0, 9.0); - if is_excute(fighter) { - KineticModule::clear_speed_energy_id(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 9.0); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 6.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 21.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 21.5, 1.0); frame(lua_state, 21.5); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.0); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 5.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 0.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 87, 63, 0, 75, 5.5, 5.0, 0.0, 3.0, None, None, None, 1.2, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 25.0); - FT_MOTION_RATE_RANGE(fighter, 25.0, 53.0, 22.0); //38 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 25.0, 53.0, 22.0); //38 + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); @@ -148,155 +148,153 @@ unsafe extern "C" fn bayonetta_attack_s3_s3_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn bayonetta_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 6.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 10, 5, true); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 110, 100, 100, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 123, 100, 110, 0, 3.2, 0.9, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 128, 100, 128, 0, 3.8, 3.85, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 110, 100, 100, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 123, 100, 110, 0, 3.2, 0.9, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 128, 100, 128, 0, 3.8, 3.85, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 108, 27, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 128, 27, 0, 65, 3.2, 1.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 138, 27, 0, 75, 3.8, 4.6, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 108, 27, 0, 60, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 128, 27, 0, 65, 3.2, 1.0, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 138, 27, 0, 75, 3.8, 4.6, 0.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.0, 94, 64, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.4, 6.3, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.0, 94, 64, 0, 85, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 3.2, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.4, 6.3, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.4); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.8, 6.7, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("armr"), 6.0, 94, 64, 0, 85, 4.8, 6.7, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 25.0, 8.0); //30 + FT_MOTION_RATE_RANGE(agent, 20.0, 25.0, 8.0); //30 frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn bayonetta_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let facing = PostureModule::lr(boma); frame(lua_state, 6.0); - if is_excute(fighter) { - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_attack_arc4_red"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } - else {EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_attack_arc4_blue"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {EFFECT_FOLLOW(agent, Hash40::new("bayonetta_attack_arc4_red"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } + else {EFFECT_FOLLOW(agent, Hash40::new("bayonetta_attack_arc4_blue"), Hash40::new("top"), 1.5, 14.1, -0.55, -90.0, 56, 20, 1.15, true); } + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("bayonetta_butterfly_walk"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("bayonetta_butterfly_walk"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.5); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 26, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 26, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_beretta_rotation"), Hash40::new("haver"), 0, 0, 0, -10, -60, -10, 1, true); - if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_EFFECT_SET_COLOR(fighter, 1, 0.118, 0.118); } - else {LAST_EFFECT_SET_COLOR(fighter, 0.059, 0.38, 1); } + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("bayonetta_beretta_rotation"), Hash40::new("haver"), 0, 0, 0, -10, -60, -10, 1, true); + if WorkModule::get_int(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_COSTUME_KIND) == 2 {LAST_EFFECT_SET_COLOR(agent, 1, 0.118, 0.118); } + else {LAST_EFFECT_SET_COLOR(agent, 0.059, 0.38, 1); } } frame(lua_state, 36.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("bayonetta_beretta_rotation"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("bayonetta_beretta_rotation"), true, true); } } -unsafe extern "C" fn bayonetta_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 15, 5, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, false, 10); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, false, 10); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, false, false, false, 10, 3, 15, 5, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, false, false, false, 10); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, false, false, false, 10); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.5); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0);//26faf - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 85, 63, 0, 71, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0);//26faf + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 85, 63, 0, 71, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 90, 60, 0, 71, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_MOTION_STOP); WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); } } -unsafe extern "C" fn bayonetta_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 5.7, 3.55, 1.5, 2.4, 3, 2, 1.29, true); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 5.7, 3.55, 1.5, 2.4, 3, 2, 1.29, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 5.7, 0, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 5.7, 0, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn bayonetta_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("bayonetta") - .acmd("game_attacks3", bayonetta_attack_s3_s_game) - .acmd("expression_attacks3", bayonetta_attack_s3_s_expression) - .acmd("game_attacks32", bayonetta_attack_s3_s2_game) - .acmd("expression_attacks32", bayonetta_attack_s3_s2_expression) - .acmd("game_attacks33", bayonetta_attack_s3_s3_game) - .acmd("game_attackhi3", bayonetta_attack_hi3_game) - .acmd("effect_attackhi3", bayonetta_attack_hi3_effect) - .acmd("game_attacklw3", bayonetta_attack_lw3_game) - .acmd("effect_attacklw3", bayonetta_attack_lw3_effect) - .acmd("expression_attacklw3", bayonetta_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks32", game_attacks32); + agent.acmd("expression_attacks32", expression_attacks32); + agent.acmd("game_attacks33", game_attacks33); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/bayonetta/src/lib.rs b/fighters/bayonetta/src/lib.rs index 8e2ddcc726..2b51b24a74 100644 --- a/fighters/bayonetta/src/lib.rs +++ b/fighters/bayonetta/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("bayonetta"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/bayonetta/src/opff.rs b/fighters/bayonetta/src/opff.rs index baababa933..60ef08a17c 100644 --- a/fighters/bayonetta/src/opff.rs +++ b/fighters/bayonetta/src/opff.rs @@ -152,8 +152,6 @@ pub unsafe fn bayonetta_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("bayonetta") - .on_line(Main, bayonetta_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, bayonetta_frame_wrapper); } \ No newline at end of file diff --git a/fighters/bayonetta/src/specialbullet/acmd.rs b/fighters/bayonetta/src/specialbullet/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/bayonetta/src/specialbullet/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/specialbullet/acmd/special.rs b/fighters/bayonetta/src/specialbullet/acmd/special.rs new file mode 100644 index 0000000000..c9ec4df0a9 --- /dev/null +++ b/fighters/bayonetta/src/specialbullet/acmd/special.rs @@ -0,0 +1,28 @@ +use super::*; + +unsafe extern "C" fn game_movechargebullet(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); + if is_excute(agent) { + if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } + AttackModule::enable_safe_pos(boma); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_movechargebullet", game_movechargebullet); + agent.acmd("game_move", game_move); +} diff --git a/fighters/bayonetta/src/specialbullet/mod.rs b/fighters/bayonetta/src/specialbullet/mod.rs new file mode 100644 index 0000000000..4248a186ad --- /dev/null +++ b/fighters/bayonetta/src/specialbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index 7e0a54cad5..f108bfbac1 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -1,7 +1,6 @@ use super::*; use globals::*; - // FIGHTER_STATUS_KIND_ATTACK // @@ -15,8 +14,6 @@ unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); } \ No newline at end of file diff --git a/fighters/bayonetta/src/status/attackair.rs b/fighters/bayonetta/src/status/attackair.rs index 5550ebf1f3..8fd9b75d4e 100644 --- a/fighters/bayonetta/src/status/attackair.rs +++ b/fighters/bayonetta/src/status/attackair.rs @@ -1,7 +1,6 @@ use super::*; use globals::*; - // FIGHTER_STATUS_KIND_ATTACK_AIR // @@ -67,13 +66,7 @@ unsafe extern "C" fn fair_motion(fighter: &mut L2CFighterCommon) -> L2CValue { false.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F, - attack_air_f_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F,attack_air_f_main,); } diff --git a/fighters/bayonetta/src/status/batwithin.rs b/fighters/bayonetta/src/status/batwithin.rs index 2303da122a..850ac86fc8 100644 --- a/fighters/bayonetta/src/status/batwithin.rs +++ b/fighters/bayonetta/src/status/batwithin.rs @@ -24,8 +24,6 @@ unsafe extern "C" fn batwithin_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN, batwithin_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN, batwithin_end); } diff --git a/fighters/bayonetta/src/status/escape.rs b/fighters/bayonetta/src/status/escape.rs index c7b7955ddb..de53e347b7 100644 --- a/fighters/bayonetta/src/status/escape.rs +++ b/fighters/bayonetta/src/status/escape.rs @@ -21,9 +21,7 @@ unsafe extern "C" fn escape_b_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_F, escape_f_end) - .status(End, *FIGHTER_STATUS_KIND_ESCAPE_B, escape_b_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_F, escape_f_end); + agent.status(End, *FIGHTER_STATUS_KIND_ESCAPE_B, escape_b_end); } diff --git a/fighters/bayonetta/src/status/jumpaerial.rs b/fighters/bayonetta/src/status/jumpaerial.rs index fc1f766d7d..53067e28bd 100644 --- a/fighters/bayonetta/src/status/jumpaerial.rs +++ b/fighters/bayonetta/src/status/jumpaerial.rs @@ -21,8 +21,6 @@ unsafe extern "C" fn jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_end); } diff --git a/fighters/bayonetta/src/status/mod.rs b/fighters/bayonetta/src/status/mod.rs index a22a708e79..05e7f27caf 100644 --- a/fighters/bayonetta/src/status/mod.rs +++ b/fighters/bayonetta/src/status/mod.rs @@ -9,13 +9,13 @@ mod specialn; mod specials; mod jumpaerial; -pub fn install() { - attack::install(); - batwithin::install(); - escape::install(); - attackair::install(); - specialairs::install(); - specialn::install(); - specials::install(); - jumpaerial::install(); +pub fn install(agent: &mut Agent) { + attack::install(agent); + batwithin::install(agent); + escape::install(agent); + attackair::install(agent); + specialairs::install(agent); + specialn::install(agent); + specials::install(agent); + jumpaerial::install(agent); } \ No newline at end of file diff --git a/fighters/bayonetta/src/status/specialairs.rs b/fighters/bayonetta/src/status/specialairs.rs index a79f2f4ac7..3ac4521fde 100644 --- a/fighters/bayonetta/src/status/specialairs.rs +++ b/fighters/bayonetta/src/status/specialairs.rs @@ -240,17 +240,7 @@ unsafe fn joint_rotator(fighter: &mut L2CFighterCommon, frame: f32, joint: Hash4 } } -pub fn install() { - smashline::Agent::new("bayonetta") - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, - bayonetta_specialairs_d_main, - ) - .status( - Main, - *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U, - bayonetta_specialairs_u_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D,bayonetta_specialairs_d_main,); + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U,bayonetta_specialairs_u_main,); } diff --git a/fighters/bayonetta/src/status/specialn.rs b/fighters/bayonetta/src/status/specialn.rs index 1e6bee9937..aa6dd9483d 100644 --- a/fighters/bayonetta/src/status/specialn.rs +++ b/fighters/bayonetta/src/status/specialn.rs @@ -223,15 +223,13 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -pub fn install() { - smashline::Agent::new("bayonetta") +pub fn install(agent: &mut Agent) { //.on_start(bayonetta_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init) - .status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main) - .status(Pre, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_pre) - .status(Main, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_main) - .status(End, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_end) - .install(); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init); + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_end); } diff --git a/fighters/bayonetta/src/status/specials.rs b/fighters/bayonetta/src/status/specials.rs index ce8770e11e..2bbb0795e4 100644 --- a/fighters/bayonetta/src/status/specials.rs +++ b/fighters/bayonetta/src/status/specials.rs @@ -164,19 +164,13 @@ unsafe extern "C" fn bayonetta_special_s_slow_hit(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("bayonetta") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_end) - .install(); - smashline::Agent::new("bayonetta") - .status(Pre, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_pre) - .status(Main, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_main) - .status(End, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_end) - .install(); - smashline::Agent::new("bayonetta") - .status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_pre) - .status(Main, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_main) - .status(End, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_end); + agent.status(Pre, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_end); + agent.status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_end); } \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweavearm/acmd/special.rs b/fighters/bayonetta/src/wickedweavearm/acmd/special.rs new file mode 100644 index 0000000000..c556723a83 --- /dev/null +++ b/fighters/bayonetta/src/wickedweavearm/acmd/special.rs @@ -0,0 +1,215 @@ +use super::*; + +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { +VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); +} +frame(lua_state, 8.0); +if is_excute(agent) { +VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); +} +frame(lua_state, 9.0); +if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +frame(lua_state, 12.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +frame(lua_state, 13.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +wait(lua_state, 2.0); +if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +wait(lua_state, 5.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +wait(lua_state, 38.0); +if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } +} + +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); +} +frame(lua_state, 8.0); +if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); +} +frame(lua_state, 9.0); +if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +frame(lua_state, 12.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +frame(lua_state, 13.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +wait(lua_state, 2.0); +if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +wait(lua_state, 5.0); +if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); +} +wait(lua_state, 40.0); +if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +} +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); +} +frame(agent.lua_state_agent, 8.0); +if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); +} +frame(agent.lua_state_agent, 9.0); +if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +frame(lua_state, 12.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +frame(lua_state, 13.0); +if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +wait(lua_state, 2.0); +if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +wait(lua_state, 5.0); +if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); +} +wait(lua_state, 40.0); +if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +} +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); +} +frame(lua_state, 8.0); +if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +frame(lua_state, 10.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +frame(lua_state, 11.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 12.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 13.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 13.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 15.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 16.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 19.0); +if is_excute(agent) { + ModelModule::set_scale(boma, 0.96); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); +} +wait(lua_state, 6.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +frame(lua_state, 51.0); +if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +} + + +pub fn install(agent: &mut Agent) { +agent.acmd("game_attacks4", game_attacks4); +agent.acmd("game_attacks4lw", game_attacks4lw); +agent.acmd("game_attacks4hi",game_attacks4hi); +agent.acmd("game_attackhi4", game_attackhi4); +} diff --git a/fighters/bayonetta/src/wickedweavearm/mod.rs b/fighters/bayonetta/src/wickedweavearm/mod.rs new file mode 100644 index 0000000000..de12da99cd --- /dev/null +++ b/fighters/bayonetta/src/wickedweavearm/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta_wickedweavearm"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd.rs b/fighters/bayonetta/src/wickedweaveleg/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/bayonetta/src/wickedweaveleg/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs b/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs new file mode 100644 index 0000000000..121247d606 --- /dev/null +++ b/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs @@ -0,0 +1,64 @@ +use super::*; + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); +} +frame(lua_state, 14.0); +if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); +} +frame(lua_state, 16.0); +if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); +} +wait(lua_state, 1.0); +if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); +} +wait(lua_state, 5.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +frame(lua_state, 41.0); +if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); +} +} +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); + +frame(lua_state, 4.0); +if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); +} +frame(lua_state, 8.0); +if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); +} +frame(lua_state, 29.0); +if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); +} +frame(lua_state, escape_air_cancel_frame); +if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +} +} +pub fn install(agent: &mut Agent) { +agent.acmd("game_attacklw4", game_attacklw4); +} diff --git a/fighters/bayonetta/src/wickedweaveleg/mod.rs b/fighters/bayonetta/src/wickedweaveleg/mod.rs new file mode 100644 index 0000000000..596a69823d --- /dev/null +++ b/fighters/bayonetta/src/wickedweaveleg/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("bayonetta_wickedweaveleg"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From a8b59ef4ac5943e272cbbba880b5a963b8d471d2 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 16:31:14 -0400 Subject: [PATCH 083/172] Pit Crate --- fighters/pit/src/acmd/aerials.rs | 266 ++++++++++++------------- fighters/pit/src/acmd/ground.rs | 104 +++++----- fighters/pit/src/acmd/mod.rs | 16 +- fighters/pit/src/acmd/other.rs | 175 +++++++--------- fighters/pit/src/acmd/smashes.rs | 88 ++++---- fighters/pit/src/acmd/specials.rs | 156 +++++++-------- fighters/pit/src/acmd/throws.rs | 112 +++++------ fighters/pit/src/acmd/tilts.rs | 88 ++++---- fighters/pit/src/arrow/acmd.rs | 7 + fighters/pit/src/arrow/acmd/special.rs | 22 ++ fighters/pit/src/arrow/mod.rs | 9 + fighters/pit/src/lib.rs | 8 +- fighters/pit/src/opff.rs | 6 +- fighters/pit/src/status/mod.rs | 6 +- fighters/pit/src/status/special_hi.rs | 16 +- fighters/pit/src/status/special_s.rs | 10 +- 16 files changed, 538 insertions(+), 551 deletions(-) create mode 100644 fighters/pit/src/arrow/acmd.rs create mode 100644 fighters/pit/src/arrow/acmd/special.rs create mode 100644 fighters/pit/src/arrow/mod.rs diff --git a/fighters/pit/src/acmd/aerials.rs b/fighters/pit/src/acmd/aerials.rs index ff9c5b5b06..39993fb529 100644 --- a/fighters/pit/src/acmd/aerials.rs +++ b/fighters/pit/src/acmd/aerials.rs @@ -1,268 +1,266 @@ use super::*; -unsafe extern "C" fn pit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 1.5, 363, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, 6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("bowr"), 1.5, 80, 40, 0, 34, 4.0, 0.0, -6.5, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 10.5, 0.0, 9.5, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 100, 0, 60, 10.5, 0.0, 9.5, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pit_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_atk_air_n"), Hash40::new("swordr2"), 0, 0, 0, -90, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, -0.8, 0, 180, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0.8, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_atk_air_n"), Hash40::new("swordr2"), 0, 0, 0, -90, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, -0.8, 0, 180, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0.8, 0, 0, 90, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_atk_air_n"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_atk_air_n"), true, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_pit_sword1"), Hash40::new("tex_pit_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_pit_sword1"), Hash40::new("tex_pit_sword2"), 3, Hash40::new("swordr1"), 0.0, 1.0, -0.2, Hash40::new("swordr1"), 0.0, 11.4, -1.2, true, Hash40::new("null"), Hash40::new("swordr1"), 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 9, 5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 27.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn pit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 48, 0, 20, 3.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 2.0, 345, 48, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 135, 0, 26, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 361, 142, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 135, 0, 26, 3.5, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(22.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 361, 142, 0, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 11.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 66, 93, 0, 31, 3.5, 0.0, 6.2, -13.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 43, 96, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 10.0, 11.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 66, 93, 0, 31, 3.5, 0.0, 6.2, -13.0, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 43, 96, 0, 31, 3.7, 0.0, 6.2, -18.9, Some(0.0), Some(6.2), Some(-15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 78, 0, 22, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 78, 0, 22, 3.5, 0.0, 6.2, -16.4, Some(0.0), Some(6.2), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 1, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pit_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordl"), 0, 0, 0, 180, 90, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -6, 0, 180, 0, 0.8, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), false, false); } } -unsafe extern "C" fn pit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 13.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 3.3, 0.0, 11.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, -5.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 3.3, 0.0, 11.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, -5.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 365, 100, 36, 0, 4.0, 0.0, 17.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, -5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 68, 126, 0, 50, 4.5, 0.0, 17.0, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 75, 81, 0, 41, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 75, 81, 0, 41, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 75, 81, 0, 41, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 0, 0, Hash40::new("arml"), 11.0, 270, 69, 0, 61, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 11.0, 270, 69, 0, 61, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 270, 70, 0, 14, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("bowl"), 11.0, 270, 70, 0, 14, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 75, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 75, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 10.0, 75, 80, 0, 40, 3.5, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pit_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attackairn", pit_attack_air_n_game) - .acmd("effect_attackairn", pit_attack_air_n_effect) - .acmd("game_attackairf", pit_attack_air_f_game) - .acmd("game_attackairb", pit_attack_air_b_game) - .acmd("effect_attackairb", pit_attack_air_b_effect) - .acmd("game_attackairhi", pit_attack_air_hi_game) - .acmd("game_attackairlw", pit_attack_air_lw_game) - .acmd("expression_attackairlw", pit_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pit/src/acmd/ground.rs b/fighters/pit/src/acmd/ground.rs index 5e31bc8267..3c3e53e205 100644 --- a/fighters/pit/src/acmd/ground.rs +++ b/fighters/pit/src/acmd/ground.rs @@ -1,102 +1,100 @@ use super::*; -unsafe extern "C" fn pit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn pit_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 3.0, 361, 15, 0, 20, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn pit_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 5.5, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 5.0, 5.5, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 361, 20, 0, 28, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowl"), 2.0, 361, 20, 0, 28, 3.2, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowl"), 2.0, 361, 15, 0, 20, 3.2, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 5.5); - FT_MOTION_RATE_RANGE(fighter, 5.5, 7.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 5.5, 7.0, 1.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn pit_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 4.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + FT_MOTION_RATE_RANGE(agent, 3.0, 4.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 70, 100, 0, 60, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("bowr"), 4.0, 70, 100, 0, 60, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 32.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 32.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn pit_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.37); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 70, 96, 0, 30, 3.5, 0.0, 4.5, 13.0, Some(0.0), Some(7.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.37); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attack11", pit_attack_11_game) - .acmd("game_attack12", pit_attack_12_game) - .acmd("game_attack13", pit_attack_13_game) - .acmd("game_attackdash", pit_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", pit_attack_11_game); + agent.acmd("game_attack12", pit_attack_12_game); + agent.acmd("game_attack13", pit_attack_13_game); + agent.acmd("game_attackdash", pit_attack_dash_game); } diff --git a/fighters/pit/src/acmd/mod.rs b/fighters/pit/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/pit/src/acmd/mod.rs +++ b/fighters/pit/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pit/src/acmd/other.rs b/fighters/pit/src/acmd/other.rs index 156088623c..19dbec85d0 100644 --- a/fighters/pit/src/acmd/other.rs +++ b/fighters/pit/src/acmd/other.rs @@ -1,211 +1,188 @@ use super::*; -unsafe extern "C" fn pit_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pit_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pit_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_pit_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_pit_step_left_m")); } } -unsafe extern "C" fn pit_bowarrow_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_turndash", pit_turn_dash_game) - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("pit_bowarrow") - .acmd("game_fly", pit_bowarrow_fly_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pit/src/acmd/smashes.rs b/fighters/pit/src/acmd/smashes.rs index 1cbd561367..69675e1228 100644 --- a/fighters/pit/src/acmd/smashes.rs +++ b/fighters/pit/src/acmd/smashes.rs @@ -1,92 +1,90 @@ use super::*; -unsafe extern "C" fn pit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 20, 0, 6.0, 0.0, 7.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 35, 100, 53, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 0, 100, 15, 0, 6.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 10.0, 361, 124, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 10.0, 361, 124, 0, 42, 6.0, 0.0, 7.5, 13.5, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pit_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 365, 100, 20, 40, 5.0, 0.0, 26.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 120, 100, 20, 40, 5.5, 0.0, 24.0, -6.0, Some(0.0), Some(24.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 367, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 105, 100, 33, 40, 5.5, 0.0, 24.0, 7.0, Some(0.0), Some(24.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 115, 100, 35, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 115, 100, 25, 40, 5.5, 0.0, 18.0, -5.5, Some(0.0), Some(18.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); let hitVec = Vector2f { x: 0.0, y: 24.5 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 123, 100, 140, 0, 6.0, 0.0, 14.0, 9.0, Some(0.0), Some(12.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 98, 100, 20, 0, 5.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 120, 100, 50, 0, 6.0, 0.0, 24.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 6.0, 0.0, 34.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 2, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, 6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 3, 2, Hash40::new("top"), 8.0, 89, 111, 0, 66, 7.0, 0.0, 31.0, -6.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attacks4", pit_attack_s4_s_game) - .acmd("game_attackhi4", pit_attack_hi4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/pit/src/acmd/specials.rs b/fighters/pit/src/acmd/specials.rs index 06d7fd3ad0..51b3fdd9fa 100644 --- a/fighters/pit/src/acmd/specials.rs +++ b/fighters/pit/src/acmd/specials.rs @@ -1,10 +1,10 @@ use super::*; -unsafe extern "C" fn pit_special_n_fire_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnfires(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stop_rise = Vector3f{x: 1.0, y: 0.0, z: 1.0}; KineticModule::mul_speed(boma, &stop_rise, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); let hop_vec = Vector3f{ x: 0.0, y: 1.0, z: 0.0 }; @@ -13,11 +13,11 @@ unsafe extern "C" fn pit_special_n_fire_s_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_special_n_fire_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnfirehi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stop_rise = Vector3f{x: 1.0, y: 0.0, z: 1.0}; KineticModule::mul_speed(boma, &stop_rise, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); let hop_vec = Vector3f{ x: 0.0, y: 1.0, z: 0.0 }; @@ -26,140 +26,138 @@ unsafe extern "C" fn pit_special_n_fire_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_CLIFF_FALL_ONOFF); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MTRANS_AIR_UNABLE); } } -unsafe extern "C" fn pit_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 80, 63, 0, 102, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); } } -unsafe extern "C" fn pit_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_MOVE_FRONT); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_GRAVITY_ONOFF); } } -unsafe extern "C" fn pit_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); - fighter.set_back_cliff_hangdata(10.0, 8.0); - fighter.set_front_cliff_hangdata(15.0, 8.0); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + agent.set_back_cliff_hangdata(10.0, 8.0); + agent.set_front_cliff_hangdata(15.0, 8.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 6.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: -0.5, y: 1.75, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 53, 0, 94, 6.0, 0.0, 13.0, 9.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_PIT_REFLECTOR_KIND_SPECIAL_S, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_S); AttackModule::clear_all(boma); if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { WorkModule::off_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_S_WORK_ID_FLAG_HIT); } } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.83); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.83); + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } -unsafe extern "C" fn pit_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallwstartl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT_FOLLOW(fighter, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_guardian_shield"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn pit_special_lw_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_speciallwendl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let facing = PostureModule::lr(boma); let rot1 = if facing > 0.0 { 240 } else { 300 }; let rot2 = if facing > 0.0 { 120 } else { 60 }; - EFFECT(fighter, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianf"), 2.0 * facing, 1, 0, 0, rot1, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("pit_guardian_shield_end"), Hash40::new("virtualguardianb"), 2.0 * facing, 1, 0, 0, rot2, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_guardian_shield"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_guardian_shield"), false, false); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_specialairnfires", pit_special_n_fire_s_game) - .acmd("game_specialairnfirehi", pit_special_n_fire_hi_game) - .acmd("game_specialsstart", pit_special_s_start_game) - .acmd("game_specialsend", pit_special_s_end_game) - .acmd("game_specialairsstart", pit_special_air_s_start_game) - .acmd("game_specialairsend", pit_special_air_s_end_game) - .acmd("effect_speciallwstartl", pit_special_lw_start_effect) - .acmd("effect_speciallwstartr", pit_special_lw_start_effect) - .acmd("effect_specialairlwstartl", pit_special_lw_start_effect) - .acmd("effect_specialairlwstartr", pit_special_lw_start_effect) - .acmd("effect_speciallwendl", pit_special_lw_end_effect) - .acmd("effect_speciallwendr", pit_special_lw_end_effect) - .acmd("effect_specialairlwendl", pit_special_lw_end_effect) - .acmd("effect_specialairlwendr", pit_special_lw_end_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairnfires", game_specialairnfires); + agent.acmd("game_specialairnfirehi", game_specialairnfirehi); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); + agent.acmd("effect_speciallwstartr", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); + agent.acmd("effect_specialairlwstartr", effect_speciallwstartl); + agent.acmd("effect_speciallwendl", effect_speciallwendl); + agent.acmd("effect_speciallwendr", effect_speciallwendl); + agent.acmd("effect_specialairlwendl", effect_speciallwendl); + agent.acmd("effect_specialairlwendr", effect_speciallwendl); } diff --git a/fighters/pit/src/acmd/throws.rs b/fighters/pit/src/acmd/throws.rs index 3ffbb0cd3c..f2b4e7917f 100644 --- a/fighters/pit/src/acmd/throws.rs +++ b/fighters/pit/src/acmd/throws.rs @@ -1,119 +1,117 @@ use super::*; -unsafe extern "C" fn pit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pit_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pit_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 180, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 10, 6.0, 0.0, 12.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn pit_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 90, 72, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 21.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_catch", pit_catch_game) - .acmd("game_catchdash", pit_catch_dash_game) - .acmd("game_catchturn", pit_catch_turn_game) - .acmd("game_throwf", pit_throw_f_game) - .acmd("game_throwhi", pit_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pit/src/acmd/tilts.rs b/fighters/pit/src/acmd/tilts.rs index e8b46a565b..121ab10c4e 100644 --- a/fighters/pit/src/acmd/tilts.rs +++ b/fighters/pit/src/acmd/tilts.rs @@ -1,91 +1,89 @@ use super::*; -unsafe extern "C" fn pit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 86, 0, 42, 4.0, 0.0, 7.5, 15.0, Some(0.0), Some(7.5), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.3, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 270, 100, 40, 0, 4.0, 0.0, 24.0, 2.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 365, 100, 85, 0, 4.0, 0.0, 24.0, 2.3, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); let hitVec = Vector2f { x: 3.8, y: 23.5 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hitVec, 10, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 72, 48, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 72, 48, 0, 71, 6.0, 0.0, 23.5, 6.0, Some(0.0), Some(20.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 34.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.0, 34.0, 11.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 40, 0, 71, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 40, 0, 71, 3.5, 0.0, 3.0, 19.5, Some(0.0), Some(5.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 30.0, 17.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 30.0, 17.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("pit_atk_wind"), Hash40::new("top"), -7, 6, 7, -12, -42, 168, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("pit_atk_wind"), Hash40::new("top"), -7, 6, 7, -12, -42, 168, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("pit_sword"), Hash40::new("swordr2"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("pit_sword"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("pit_atk_wind"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("pit_sword"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("pit_atk_wind"), true, true); } } -pub fn install() { - smashline::Agent::new("pit") - .acmd("game_attacks3", pit_attack_s3_s_game) - .acmd("game_attackhi3", pit_attack_hi3_game) - .acmd("game_attacklw3", pit_attack_lw3_game) - .acmd("effect_attacklw3", pit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pit/src/arrow/acmd.rs b/fighters/pit/src/arrow/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/pit/src/arrow/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/pit/src/arrow/acmd/special.rs b/fighters/pit/src/arrow/acmd/special.rs new file mode 100644 index 0000000000..3f61b72c4d --- /dev/null +++ b/fighters/pit/src/arrow/acmd/special.rs @@ -0,0 +1,22 @@ +use super::*; +unsafe extern "C" fn pit_bowarrow_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", pit_bowarrow_fly_game); +} diff --git a/fighters/pit/src/arrow/mod.rs b/fighters/pit/src/arrow/mod.rs new file mode 100644 index 0000000000..25dc1a499a --- /dev/null +++ b/fighters/pit/src/arrow/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("pit_arrow"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/pit/src/lib.rs b/fighters/pit/src/lib.rs index 7bb0378152..8d0278ba63 100644 --- a/fighters/pit/src/lib.rs +++ b/fighters/pit/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pit"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/pit/src/opff.rs b/fighters/pit/src/opff.rs index 560237ca24..de97612dd6 100644 --- a/fighters/pit/src/opff.rs +++ b/fighters/pit/src/opff.rs @@ -97,8 +97,6 @@ pub unsafe fn pit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pit") - .on_line(Main, pit_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pit_frame_wrapper); } diff --git a/fighters/pit/src/status/mod.rs b/fighters/pit/src/status/mod.rs index 015e4dfd14..afabf459a5 100644 --- a/fighters/pit/src/status/mod.rs +++ b/fighters/pit/src/status/mod.rs @@ -4,7 +4,7 @@ use smashline::*; mod special_s; mod special_hi; -pub fn install() { - special_s::install(); - special_hi::install(); +pub fn install(agent: &mut Agent) { + special_s::install(agent); + special_hi::install(agent); } diff --git a/fighters/pit/src/status/special_hi.rs b/fighters/pit/src/status/special_hi.rs index 28ab68fef6..1ef80bdd74 100644 --- a/fighters/pit/src/status/special_hi.rs +++ b/fighters/pit/src/status/special_hi.rs @@ -74,17 +74,7 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("pit") - .status( - Pre, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_pre, - ) - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre,*FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_pre,); + agent.status(Main,*FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_main,); } diff --git a/fighters/pit/src/status/special_s.rs b/fighters/pit/src/status/special_s.rs index 4a586dc923..07b0acdfba 100644 --- a/fighters/pit/src/status/special_s.rs +++ b/fighters/pit/src/status/special_s.rs @@ -9,12 +9,6 @@ pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L ret } -pub fn install() { - smashline::Agent::new("pit") - .status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END, - special_s_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main,*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END,special_s_end_main,) } From 88ff353aac7feb5081e8bdd8d7b3ee94a6cc4559 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 17:02:05 -0400 Subject: [PATCH 084/172] Brawler crate --- fighters/miifighter/src/acmd/aerials.rs | 182 ++-- fighters/miifighter/src/acmd/ground.rs | 96 +- fighters/miifighter/src/acmd/mod.rs | 16 +- fighters/miifighter/src/acmd/other.rs | 156 ++- fighters/miifighter/src/acmd/smashes.rs | 20 +- fighters/miifighter/src/acmd/specials.rs | 1208 +++++++++++----------- fighters/miifighter/src/acmd/throws.rs | 174 ++-- fighters/miifighter/src/acmd/tilts.rs | 100 +- fighters/miifighter/src/lib.rs | 9 +- fighters/miifighter/src/opff.rs | 6 +- fighters/miifighter/src/status.rs | 7 +- 11 files changed, 980 insertions(+), 994 deletions(-) diff --git a/fighters/miifighter/src/acmd/aerials.rs b/fighters/miifighter/src/acmd/aerials.rs index 3b66aa8a92..6bd7d7056c 100644 --- a/fighters/miifighter/src/acmd/aerials.rs +++ b/fighters/miifighter/src/acmd/aerials.rs @@ -1,190 +1,188 @@ use super::*; -unsafe extern "C" fn miifighter_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.4, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.4, 2.0); frame(lua_state, 1.4); - FT_MOTION_RATE_RANGE(fighter, 1.4, 2.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.4, 2.0, 1.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 361, 95, 0, 30, 3.5, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 95, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 361, 95, 0, 30, 3.5, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 30.0, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 30.0, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 25, 3.0, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miifighter_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 366, 30, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 366, 30, 0, 50, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 366, 30, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 5.0, 75, 30, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.7, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 75, 30, 0, 70, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 75, 30, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 6.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miifighter_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 5.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 50, 100, 0, 26, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 50, 100, 0, 26, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 13.0, 361, 100, 0, 26, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miifighter_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.5, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.5, 5.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 75, 90, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 75, 90, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 75, 90, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 75, 90, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.5); - FT_MOTION_RATE_RANGE(fighter, 11.5, 13.0, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 11.5, 13.0, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miifighter_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn miifighter_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 270, 69, 0, 10, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 270, 69, 0, 10, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 270, 69, 0, 10, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 270, 69, 0, 10, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 13.0, 270, 80, 0, 40, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 270, 80, 0, 40, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 13.0, 270, 80, 0, 40, 4.0, 2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 270, 80, 0, 40, 4.7, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attackairn", miifighter_attack_air_n_game) - .acmd("game_attackairf", miifighter_attack_air_f_game) - .acmd("game_attackairb", miifighter_attack_air_b_game) - .acmd("game_attackairhi", miifighter_attack_air_hi_game) - .acmd("expression_attackairhi", miifighter_attack_air_hi_expression,) - .acmd("game_attackairlw", miifighter_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/ground.rs b/fighters/miifighter/src/acmd/ground.rs index bf23f592a7..69f7c5cda4 100644 --- a/fighters/miifighter/src/acmd/ground.rs +++ b/fighters/miifighter/src/acmd/ground.rs @@ -1,100 +1,98 @@ use super::*; -unsafe extern "C" fn miifighter_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.0, 361, 25, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 2.0, 361, 15, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn miifighter_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.5, 0.0, 7.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 7.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.5, 0.0, 7.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn miifighter_attack_100end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 45, 130, 0, 65, 3.5, 0.0, 7.0, 11.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 2.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 65, 3.5, 5.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 45, 130, 0, 65, 3.5, 0.0, 7.0, 11.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 6.5, 6.5, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 45, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 45, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 60, 80, 0, 60, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 70, 90, 0, 40, 3.25, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 2.9, 7.2, 7.2); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attack11", miifighter_attack_11_game) - .acmd("game_attack12", miifighter_attack_12_game) - .acmd("game_attack100end", miifighter_attack_100end_game) - .acmd("game_attackdash", miifighter_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/miifighter/src/acmd/mod.rs b/fighters/miifighter/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/miifighter/src/acmd/mod.rs +++ b/fighters/miifighter/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index 3cd1d89b7b..8c429b2cfb 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -1,195 +1,193 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miifighter/src/acmd/smashes.rs b/fighters/miifighter/src/acmd/smashes.rs index ef55659823..e98839d8c2 100644 --- a/fighters/miifighter/src/acmd/smashes.rs +++ b/fighters/miifighter/src/acmd/smashes.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miifighter_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn miifighter_attack_hi4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -49,7 +49,7 @@ unsafe extern "C" fn miifighter_attack_s4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -69,12 +69,10 @@ unsafe extern "C" fn miifighter_attack_lw4_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attackhi4", miifighter_attack_hi4_game) - .acmd("game_attacks4", miifighter_attack_s4_game) - .acmd("game_attacks4hi", miifighter_attack_s4_game) - .acmd("game_attacks4lw", miifighter_attack_s4_game) - .acmd("game_attacklw4", miifighter_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miifighter/src/acmd/specials.rs b/fighters/miifighter/src/acmd/specials.rs index 8f4f44698f..c0f100a2e6 100644 --- a/fighters/miifighter/src/acmd/specials.rs +++ b/fighters/miifighter/src/acmd/specials.rs @@ -1,954 +1,954 @@ use super::*; -unsafe extern "C" fn miifighter_special_n2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_PULL_FINISH_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_n2_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); +unsafe extern "C" fn game_specialn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); } frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miifighter_special_air_n2_finish_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); +unsafe extern "C" fn game_specialairn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); } frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 68.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miifighter_special_s1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_air_s1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); +unsafe extern "C" fn game_specialairs1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: 0.3, y: 0.5, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: -0.3, y: 0.7, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: 0.85, y: 3.0, z: 0.0}); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING); } frame(lua_state, 48.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_CONTROL_X); } } -unsafe extern "C" fn miifighter_special_air_s2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); +unsafe extern "C" fn game_specialairs2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); } } -unsafe extern "C" fn miifighter_special_hi11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn miifighter_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); } } -unsafe extern "C" fn miifighter_special_hi12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 3.0); - if is_excute(fighter) { - if fighter.is_prev_situation(*SITUATION_KIND_GROUND) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); + if is_excute(agent) { + if agent.is_prev_situation(*SITUATION_KIND_GROUND) { PostureModule::add_pos(boma, &Vector3f::new(0.0, 0.2, 0.0)); } } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 8.5, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.5, 2.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.5); - FT_MOTION_RATE_RANGE(fighter, 8.5, 11.0, 3.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && fighter.is_stick_backward() { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); + FT_MOTION_RATE_RANGE(agent, 8.5, 11.0, 3.0); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && agent.is_stick_backward() { + PostureModule::reverse_lr(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); } HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let fall_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); - let fall_acl_y_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); - sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); - sv_kinetic_energy!(set_accel_y_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let fall_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); + let fall_acl_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); + sv_kinetic_energy!(set_accel_y_mul, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); } } -unsafe extern "C" fn miifighter_special_hi12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_tenchi_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_tenchi_arc"), -1); } } -unsafe extern "C" fn miifighter_special_hi12_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_special_c1_h01")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_h01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_h01")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_h01")); } } -unsafe extern "C" fn miifighter_special_hi12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn miifighter_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); } } -unsafe extern "C" fn miifighter_special_air_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); } } -unsafe extern "C" fn miifighter_special_lw1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(fighter.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_lw1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_windwave"), Hash40::new("top"), &Vector3f::new(0.0, 0.0, 10.0), &Vector3f::zero(), 0.4, false, 0, 0, 0, 0, 0, false, false); EffectModule::set_rate(boma, eff_handle as u32, 0.4); - VarModule::set_int64(fighter.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); + VarModule::set_int64(agent.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.4); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miifighter_sidekick_hold"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_hold"), true, true); } frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(fighter.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miifighter_sidekick_flash"), true, true); - LANDING_EFFECT(fighter, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_SCALE_W(fighter, 0.6, 1.1, 0.6); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_flash"), true, true); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 1.1, 0.6); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn miifighter_special_lw1_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_attack03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_attack03")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miifighter_smash_s03")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_l03")); - PLAY_SE(fighter, Hash40::new("se_miifighter_special_s03")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_miifighter_special_c2_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_smash_s03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_l03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miifighter_special_c2_s02")); } } -unsafe extern "C" fn miifighter_special_lw1_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); }; frame(lua_state, 13.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - AREA_WIND_2ND_arg10(fighter, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + AREA_WIND_2ND_arg10(agent, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); } wait(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } wait(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } frame(lua_state, 52.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn miifighter_special_air_lw1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn miifighter_special_air_lw1_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miifighter_special_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_special_l02")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miifighter_rnd_special_c1_l01")); - PLAY_SE(fighter, Hash40::new("se_miifighter_final06")); - PLAY_SE(fighter, Hash40::new("se_miifighter_final06")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_l01")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); } } -unsafe extern "C" fn miifighter_special_lw1_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); - app::sv_kinetic_energy::clear_speed(fighter.lua_state_agent); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); + app::sv_kinetic_energy::clear_speed(agent.lua_state_agent); KineticModule::clear_speed_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); - SET_SPEED_EX(fighter, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + SET_SPEED_EX(agent, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } -unsafe extern "C" fn miifighter_special_lw1_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..24 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); } wait(lua_state, 2.0); } } -unsafe extern "C" fn miifighter_special_lw1_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallw1landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - SET_SPEED_EX(fighter, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + SET_SPEED_EX(agent, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn miifighter_special_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_pistonpunch_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); } } -unsafe extern "C" fn miifighter_special_air_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("miifighter_pistonpunch_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(fighter, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); } } -unsafe extern "C" fn miifighter_special_lw2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.5, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(fighter, 1.5, 2.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 43.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); } frame(lua_state, 43.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn miifighter_special_air_lw2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 1.5, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(fighter, 1.5, 2.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 43.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(fighter, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + SEARCH(agent, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); } frame(lua_state, 43.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn miifighter_special_air_lw2_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); +unsafe extern "C" fn game_specialairlw2kick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* let dive_speed_x_modifier_stick_mul = 0.5; let dive_speed_y_modifier_stick_mul = 0.5; @@ -958,217 +958,215 @@ unsafe extern "C" fn miifighter_special_air_lw2_kick_game(fighter: &mut L2CAgent let mut dive_speed_y_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_y_modifier_stick_mul, dive_speed_y_modifier_stick_mul * 0.5); SET_SPEED_EX(fighter, -3.0 + dive_speed_x_modifier, -2.5 + dive_speed_y_modifier, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); */ - SET_SPEED_EX(fighter, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_air_lw2_auto_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); +unsafe extern "C" fn game_specialairlw2autoattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_lw3_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw3catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 4.0, 8.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 8.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { //SEARCH(fighter, 0, 0, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *COLLISION_KIND_MASK_ALL, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); GrabModule::set_rebound(boma, true); - CATCH(fighter, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.2); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn miifighter_special_lw3_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(fighter); +unsafe extern "C" fn game_speciallw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 66, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_CATCH_STOP(fighter, 5, 1); + FT_CATCH_STOP(agent, 5, 1); //CHECK_FINISH_CAMERA(fighter, 14, 0); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); if opponent_boma.is_fighter() { VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn miifighter_special_air_lw3_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_COUNTER_THROW_FLAG_THROW_AFTER_LANDING); - WHOLE_HIT(fighter, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(fighter); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_CATCH_STOP(fighter, 5, 1); + FT_CATCH_STOP(agent, 5, 1); //CHECK_FINISH_CAMERA(fighter, 14, 0); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_special_air_lw3_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 101); - FLASH(fighter, 1, 1, 1, 0); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + COL_PRI(agent, 101); + FLASH(agent, 1, 1, 1, 0); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 3.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 12.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_specialn2start", miifighter_special_n2_start_game) - .acmd("game_specialairn2start", miifighter_special_n2_start_game) - .acmd("game_specialn2finish", miifighter_special_n2_finish_game) - .acmd("game_specialairn2finish", miifighter_special_air_n2_finish_game) - .acmd("game_specials1end", miifighter_special_s1_end_game) - .acmd("game_specialairs1end", miifighter_special_air_s1_end_game) - .acmd("game_specialairs2start", miifighter_special_air_s2_start_game) - .acmd("game_specialhi1", miifighter_special_hi11_game) - .acmd("effect_specialhi1", miifighter_special_hi1_effect) - .acmd("effect_specialairhi1", miifighter_special_hi1_effect) - .acmd("game_specialhi12", miifighter_special_hi12_game) - .acmd("game_specialairhi12", miifighter_special_hi12_game) - .acmd("effect_specialhi12", miifighter_special_hi12_effect) - .acmd("effect_specialairhi12", miifighter_special_hi12_effect) - .acmd("sound_specialhi12", miifighter_special_hi12_sound) - .acmd("sound_specialairhi12", miifighter_special_hi12_sound) - .acmd("expression_specialhi12", miifighter_special_hi12_expression) - .acmd("expression_specialairhi12", miifighter_special_hi12_expression) - .acmd("game_specialhi2", miifighter_special_hi2_game) - .acmd("game_specialairhi2", miifighter_special_air_hi2_game) - .acmd("game_speciallw1", miifighter_special_lw1_game) - .acmd("effect_speciallw1", miifighter_special_lw1_effect) - .acmd("sound_speciallw1", miifighter_special_lw1_sound) - .acmd("expression_speciallw1", miifighter_special_lw1_expression) - .acmd("effect_specialairlw1", miifighter_special_air_lw1_effect) - .acmd("sound_specialairlw1", miifighter_special_air_lw1_sound) - .acmd("game_speciallw1loop", miifighter_special_lw1_loop_game) - .acmd("effect_speciallw1loop", miifighter_special_lw1_loop_effect) - .acmd("game_speciallw1landing", miifighter_special_lw1_landing_game) - .acmd("game_specialhi3", miifighter_special_hi3_game) - .acmd("game_specialairhi3", miifighter_special_hi3_game) - .acmd("effect_specialhi3", miifighter_special_hi3_effect) - .acmd("effect_specialairhi3", miifighter_special_air_hi3_effect) - .acmd("game_speciallw2start", miifighter_special_lw2_start_game) - .acmd("game_specialairlw2start", miifighter_special_air_lw2_start_game) - .acmd("game_specialairlw2kick", miifighter_special_air_lw2_kick_game) - .acmd("game_specialairlw2autoattack", miifighter_special_air_lw2_auto_attack_game) - .acmd("game_speciallw3catch", miifighter_special_lw3_catch_game) - .acmd("game_specialairlw3catch", miifighter_special_lw3_catch_game) - .acmd("game_speciallw3throw", miifighter_special_lw3_throw_game) - .acmd("game_specialairlw3throw", miifighter_special_air_lw3_throw_game) - .acmd("effect_specialairlw3throw", miifighter_special_air_lw3_throw_effect) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialn2start", game_specialn2start); + agent.acmd("game_specialairn2start", game_specialn2start); + agent.acmd("game_specialn2finish", game_specialn2finish); + agent.acmd("game_specialairn2finish", game_specialairn2finish); + agent.acmd("game_specials1end", game_specials1end); + agent.acmd("game_specialairs1end", game_specialairs1end); + agent.acmd("game_specialairs2start", game_specialairs2start); + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + agent.acmd("game_specialhi12", game_specialhi12); + agent.acmd("game_specialairhi12", game_specialhi12); + agent.acmd("effect_specialhi12", effect_specialhi12); + agent.acmd("effect_specialairhi12", effect_specialhi12); + agent.acmd("sound_specialhi12", sound_specialhi12); + agent.acmd("sound_specialairhi12", sound_specialhi12); + agent.acmd("expression_specialhi12", expression_specialhi12); + agent.acmd("expression_specialairhi12", expression_specialhi12); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_speciallw1", game_speciallw1); + agent.acmd("effect_speciallw1", effect_speciallw1); + agent.acmd("sound_speciallw1", sound_speciallw1); + agent.acmd("expression_speciallw1", expression_speciallw1); + agent.acmd("effect_specialairlw1", effect_specialairlw1); + agent.acmd("sound_specialairlw1", sound_specialairlw1); + agent.acmd("game_speciallw1loop", game_speciallw1loop); + agent.acmd("effect_speciallw1loop", effect_speciallw1loop); + agent.acmd("game_speciallw1landing", game_speciallw1landing); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("effect_specialhi3", effect_specialhi3); + agent.acmd("effect_specialairhi3", effect_specialairhi3); + agent.acmd("game_speciallw2start", game_speciallw2start); + agent.acmd("game_specialairlw2start", game_specialairlw2start); + agent.acmd("game_specialairlw2kick", game_specialairlw2kick); + agent.acmd("game_specialairlw2autoattack", game_specialairlw2autoattack); + agent.acmd("game_speciallw3catch", game_speciallw3catch); + agent.acmd("game_specialairlw3catch", game_speciallw3catch); + agent.acmd("game_speciallw3throw", game_speciallw3throw); + agent.acmd("game_specialairlw3throw", game_specialairlw3throw); + agent.acmd("effect_specialairlw3throw", effect_specialairlw3throw); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/throws.rs b/fighters/miifighter/src/acmd/throws.rs index 41abc4aee0..e9f12488a2 100644 --- a/fighters/miifighter/src/acmd/throws.rs +++ b/fighters/miifighter/src/acmd/throws.rs @@ -1,180 +1,178 @@ use super::*; -unsafe extern "C" fn miifighter_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miifighter_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 4.0, Some(0.0), Some(6.6), Some(9.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miifighter_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, -4.0, Some(0.0), Some(6.6), Some(-14.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 16.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 42, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 16.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 42, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 6, 1); - CHECK_FINISH_CAMERA(fighter, 23, 11); + CHECK_FINISH_CAMERA(agent, 23, 11); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 39.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 39.0, 20.0); + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: 0.0, z: 13.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 70, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 130, 0, 50, 4.0, 0.0, 12.0, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 130, 0, 50, 4.0, 0.0, 12.0, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 9); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 10, 5, 0); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 30.0, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 11.0, 30.0, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 95, 80, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 95, 80, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 8, 1); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 21); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.9); //FighterCutInManager::set_throw_finish_offset(boma, 2, 8, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: 10.0, z: 5.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 72, 65, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 72, 65, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 1.0, 361, 40, 0, 80, 6.0, -3.5, 2.0, -4.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 1.0, 361, 40, 0, 80, 6.0, -3.5, 2.0, -4.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1.0, 17.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1.0, 17.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:-1.0, y: -2.0, z: 4.0 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_catch", miifighter_catch_game) - .acmd("game_catchdash", miifighter_catch_dash_game) - .acmd("game_catchturn", miifighter_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miifighter/src/acmd/tilts.rs b/fighters/miifighter/src/acmd/tilts.rs index f851bf4358..fef6548ab5 100644 --- a/fighters/miifighter/src/acmd/tilts.rs +++ b/fighters/miifighter/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miifighter_attack_s3_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -15,7 +15,7 @@ unsafe extern "C" fn miifighter_attack_s3_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -30,7 +30,7 @@ unsafe extern "C" fn miifighter_attack_s3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -46,93 +46,91 @@ unsafe extern "C" fn miifighter_attack_s3_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miifighter_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 5.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 95, 105, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miifighter_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 3.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 77, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 80, 90, 0, 45, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 85, 90, 0, 45, 4.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 77, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 80, 90, 0, 45, 3.5, 0.0, 0.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 85, 90, 0, 45, 4.0, 5.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn miifighter_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("miifighter") - .acmd("game_attacks3hi", miifighter_attack_s3_hi_game) - .acmd("game_attacks3", miifighter_attack_s3_game) - .acmd("game_attacks3lw", miifighter_attack_s3_lw_game) - .acmd("game_attackhi3", miifighter_attack_hi3_game) - .acmd("game_attacklw3", miifighter_attack_lw3_game) - .acmd("expression_attacklw3", miifighter_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/miifighter/src/lib.rs b/fighters/miifighter/src/lib.rs index 0d1508b9f2..258293c288 100644 --- a/fighters/miifighter/src/lib.rs +++ b/fighters/miifighter/src/lib.rs @@ -41,7 +41,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miifighter"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + } \ No newline at end of file diff --git a/fighters/miifighter/src/opff.rs b/fighters/miifighter/src/opff.rs index fdadac75f3..0af03e9aa4 100644 --- a/fighters/miifighter/src/opff.rs +++ b/fighters/miifighter/src/opff.rs @@ -174,8 +174,6 @@ pub unsafe fn miifighter_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("miifighter") - .on_line(Main, miifighter_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miifighter_frame_wrapper); } \ No newline at end of file diff --git a/fighters/miifighter/src/status.rs b/fighters/miifighter/src/status.rs index 2c35a47d8a..469f973f13 100644 --- a/fighters/miifighter/src/status.rs +++ b/fighters/miifighter/src/status.rs @@ -13,8 +13,7 @@ unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("miifighter") - .status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main); + agent.on_start(on_start); } \ No newline at end of file From 81b7b0fd5d7acfb1fc24b22cfed3bc0302be9419 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Sat, 23 Mar 2024 17:31:33 -0400 Subject: [PATCH 085/172] adjustments --- fighters/diddy/src/lib.rs | 2 +- fighters/miifighter/src/status.rs | 1 - fighters/pit/src/status/special_s.rs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fighters/diddy/src/lib.rs b/fighters/diddy/src/lib.rs index c041345d24..04ceecb264 100644 --- a/fighters/diddy/src/lib.rs +++ b/fighters/diddy/src/lib.rs @@ -39,7 +39,7 @@ use utils::{ use smashline::*; pub fn install() { - let agent = &mut Agent::new("diddy kong"); + let agent = &mut Agent::new("diddy"); acmd::install(agent); status::install(agent); opff::install(agent); diff --git a/fighters/miifighter/src/status.rs b/fighters/miifighter/src/status.rs index 469f973f13..e491edc9bd 100644 --- a/fighters/miifighter/src/status.rs +++ b/fighters/miifighter/src/status.rs @@ -15,5 +15,4 @@ unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main); - agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/pit/src/status/special_s.rs b/fighters/pit/src/status/special_s.rs index 07b0acdfba..01202f41f2 100644 --- a/fighters/pit/src/status/special_s.rs +++ b/fighters/pit/src/status/special_s.rs @@ -10,5 +10,5 @@ pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L } pub fn install(agent: &mut Agent) { - agent.status(Main,*FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END,special_s_end_main,) + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END, special_s_end_main); } From 407f540c0055be8b6c6ad1f02702c45e20acd970 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 17:55:25 -0400 Subject: [PATCH 086/172] HDR hate child --- fighters/miiswordsman/src/acmd/aerials.rs | 240 ++- fighters/miiswordsman/src/acmd/ground.rs | 116 +- fighters/miiswordsman/src/acmd/mod.rs | 16 +- fighters/miiswordsman/src/acmd/other.rs | 357 ++-- fighters/miiswordsman/src/acmd/smashes.rs | 208 ++- fighters/miiswordsman/src/acmd/specials.rs | 1576 ++++++++--------- fighters/miiswordsman/src/acmd/throws.rs | 172 +- fighters/miiswordsman/src/acmd/tilts.rs | 100 +- fighters/miiswordsman/src/chakram/acmd.rs | 7 + .../miiswordsman/src/chakram/acmd/special.rs | 88 + fighters/miiswordsman/src/chakram/mod.rs | 9 + fighters/miiswordsman/src/lib.rs | 8 +- .../miiswordsman/src/lightshuriken/acmd.rs | 7 + .../src/lightshuriken/acmd/special.rs | 90 + .../miiswordsman/src/lightshuriken/mod.rs | 9 + fighters/miiswordsman/src/opff.rs | 10 +- fighters/miiswordsman/src/status.rs | 49 +- fighters/miiswordsman/src/tornado/acmd.rs | 7 + .../miiswordsman/src/tornado/acmd/special.rs | 20 + fighters/miiswordsman/src/tornado/mod.rs | 9 + 20 files changed, 1601 insertions(+), 1497 deletions(-) create mode 100644 fighters/miiswordsman/src/chakram/acmd.rs create mode 100644 fighters/miiswordsman/src/chakram/acmd/special.rs create mode 100644 fighters/miiswordsman/src/chakram/mod.rs create mode 100644 fighters/miiswordsman/src/lightshuriken/acmd.rs create mode 100644 fighters/miiswordsman/src/lightshuriken/acmd/special.rs create mode 100644 fighters/miiswordsman/src/lightshuriken/mod.rs create mode 100644 fighters/miiswordsman/src/tornado/acmd.rs create mode 100644 fighters/miiswordsman/src/tornado/acmd/special.rs create mode 100644 fighters/miiswordsman/src/tornado/mod.rs diff --git a/fighters/miiswordsman/src/acmd/aerials.rs b/fighters/miiswordsman/src/acmd/aerials.rs index 9509ee7291..b37950b805 100644 --- a/fighters/miiswordsman/src/acmd/aerials.rs +++ b/fighters/miiswordsman/src/acmd/aerials.rs @@ -1,231 +1,229 @@ use super::*; -unsafe extern "C" fn attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.44); // 6F startup + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.44); // 6F startup } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 361, 56, 0, 59, 3.2, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 57, 0, 62, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 361, 58, 0, 62, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 59, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 361, 56, 0, 59, 3.2, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 57, 0, 62, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 361, 58, 0, 62, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 80, 90, 0, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 80, 90, 0, 44, 3.3, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 18.0/(38.0-22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 18.0/(38.0-22.0)); AttackModule::clear_all(boma); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.77); // 10F startup + FT_MOTION_RATE(agent, 0.77); // 10F startup } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 4.0, 66, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 9.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 4.0, 367, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 4.0, 66, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 3.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 9.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 75, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 3.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 80, 100, 35, 0, 4.0, -0.5, 9.4, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 75, 100, 35, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 9.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 50, 130, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 2.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 50, 130, 0, 50, 4.5, -1.0, 9.5, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 50, 130, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } // Motion rates for this were done this way to best replicate previous hitbox coverage -unsafe extern "C" fn attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 109, 0, 10, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 361, 109, 0, 10, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5) + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5) } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(37.0-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(37.0-12.0)); AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -unsafe extern "C" fn attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.88); // 10F startup + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.88); // 10F startup } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 77, 98, 0, 29, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 80, 96, 0, 30, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 78, 0, 21, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 80, 78, 0, 21, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 220, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 250, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 365, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 365, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 220, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 250, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 365, 100, 30, 18, 4.0, 0.0, 3.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 365, 100, 12, 18, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 275, 85, 0, 23, 4.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attackairn", attack_air_n_game) - .acmd("game_attackairf", attack_air_f_game) - .acmd("game_attackairb", attack_air_b_game) - .acmd("expression_attackairb", attack_air_b_expression) - .acmd("game_attackairhi", attack_air_hi_game) - .acmd("game_attackairlw", attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/miiswordsman/src/acmd/ground.rs b/fighters/miiswordsman/src/acmd/ground.rs index a7bd4580de..c759efe274 100644 --- a/fighters/miiswordsman/src/acmd/ground.rs +++ b/fighters/miiswordsman/src/acmd/ground.rs @@ -1,125 +1,123 @@ use super::*; -unsafe extern "C" fn attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 25, 0, 27, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(8.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 25, 0, 27, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(8.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 2.5, 0.0, 5.5, 7.8, Some(0.0), Some(5.5), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Launching hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 78, 20, 0, 30, 3.5, 0.0, 6.2, 10.0, Some(0.0), Some(6.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 78, 20, 0, 30, 3.5, 0.0, 6.2, 10.0, Some(0.0), Some(6.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Locking hitboxes - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 25, 0, 30, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 25, 0, 30, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 180, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 15, 0, 25, 3.5, 0.0, 4.2, 10.0, Some(0.0), Some(4.2), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 30, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 30, 70, 0, 70, 3.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 30, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 30, 70, 0, 70, 3.0, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 30, 70, 0, 70, 3.0, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Body/Sword Hitboxes - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.5, 361, 80, 0, 50, 3.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 50, 3.25, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.5, 361, 80, 0, 50, 3.25, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } } -unsafe extern "C" fn attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attack11", attack_11_game) - .acmd("game_attack12", attack_12_game) - .acmd("game_attack13", attack_13_game) - .acmd("game_attackdash", attack_dash_game) - .acmd("expression_attackdash", attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/miiswordsman/src/acmd/mod.rs b/fighters/miiswordsman/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/miiswordsman/src/acmd/mod.rs +++ b/fighters/miiswordsman/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 4c2845ff59..55ed27dc3a 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -2,179 +2,155 @@ use super::*; use smash::app::sv_battle_object; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); } } - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } - -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_miiswordsman_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miiswordsman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miiswordsman_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miiswordsman_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miiswordsman_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miiswordsman_step_left_m")); } } - -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } - -unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - -} - // #[acmd_script( agent = "miiswordsman_tornadoshot", script = "game_fly" , category = ACMD_GAME , low_priority)] // unsafe fn miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBase) { // let lua_state = fighter.lua_state_agent; @@ -190,29 +166,28 @@ unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBas // ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); // } // } - -unsafe extern "C" fn miiswordsman_wave_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miiswordsman_wave_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn miiswordsman_wave_fly_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miiswordsman_wave_fly_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let mut lead_wave : u32 = std::u32::MAX; let mut wave_2 : u32 = std::u32::MAX; let mut wave_3 : u32 = std::u32::MAX; - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_hikari_syuriken"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; EffectModule::set_rate(boma, lead_wave, 0.7); @@ -221,17 +196,17 @@ unsafe extern "C" fn miiswordsman_wave_fly_effect(fighter: &mut L2CAgentBase) { EffectModule::set_alpha(boma, wave_2, 0.4); //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, lead_wave, 0.000001); EffectModule::set_rate(boma, wave_2, 0.000001); EffectModule::set_alpha(boma, wave_2, 0.4); @@ -239,181 +214,81 @@ unsafe extern "C" fn miiswordsman_wave_fly_effect(fighter: &mut L2CAgentBase) { EffectModule::set_rate(boma, wave_3, 0.7); EffectModule::set_alpha(boma, wave_3, 0.4); if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, wave_3, 0.000001); if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } for _ in 0..i32::MAX { wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if GroundModule::ray_check( - fighter.module_accessor, - &Vector2f{ x: PostureModule::pos_x(fighter.module_accessor), y: PostureModule::pos_y(fighter.module_accessor)}, + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { - FOOT_EFFECT(fighter, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.3); - FOOT_EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); } } } } - -unsafe extern "C" fn miiswordsman_chakram_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - // Tap Input - if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ - if is_excute(fighter) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - } - // Hold Input - else{ - if is_excute(fighter) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - } -} - -unsafe extern "C" fn miiswordsman_chakram_fly_normal_sub_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn miiswordsman_chakram_fly_flick_sub_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn miiswordsman_chakram_hop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - } -} - -unsafe extern "C" fn miiswordsman_chakram_stick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - -} - -unsafe extern "C" fn miiswordsman_chakram_stick_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 142.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("miiswordsman_chakram") - .acmd("game_fly", miiswordsman_chakram_fly_game) - .acmd("game_flynormalsub", miiswordsman_chakram_fly_normal_sub_game) - .acmd("game_flyflicksub", miiswordsman_chakram_fly_flick_sub_game) - //.acmd("game_hop", miiswordsman_chakram_hop_game) - .acmd("game_stick", miiswordsman_chakram_stick_game) - .acmd("effect_stick", miiswordsman_chakram_stick_effect) - .install(); - smashline::Agent::new("miiswordsman_tornadoshot") - .acmd("game_fly", miiswordsman_tornadoshot_fly_game) - .install(); - smashline::Agent::new("miiswordsman_lightshuriken") - .acmd("game_fly", miiswordsman_wave_fly_game) - .acmd("effect_fly", miiswordsman_wave_fly_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miiswordsman/src/acmd/smashes.rs b/fighters/miiswordsman/src/acmd/smashes.rs index ccf7536270..efe78872ee 100644 --- a/fighters/miiswordsman/src/acmd/smashes.rs +++ b/fighters/miiswordsman/src/acmd/smashes.rs @@ -1,208 +1,206 @@ use super::*; -unsafe extern "C" fn miiswordsman_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.0, 4.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 361, 104, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 361, 104, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 16.0, 361, 104, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 361, 104, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 361, 104, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 16.0, 361, 104, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(12.5-0.0)); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(12.5-0.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0/(13.0-12.0)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 8.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 5.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 2.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0/(13.0-12.0)); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 8.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 5.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 2.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 12.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 130, 100, 120, 0, 3.5, 0.0, 18.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 18.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 17.8, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 130, 100, 120, 0, 3.5, 0.0, 18.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 18.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 120, 0, 3.5, 0.0, 17.8, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - + } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 115, 100, 120, 0, 3.5, 0.0, 21.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 120, 100, 100, 0, 3.5, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 150, 100, 50, 0, 3.5, 0.0, 28.0, 1.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 115, 100, 120, 0, 3.5, 0.0, 21.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 120, 100, 100, 0, 3.5, 0.0, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 150, 100, 50, 0, 3.5, 0.0, 28.0, 1.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 16.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 19.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 22.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 16.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 19.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 22.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 9.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 104, 100, 90, 0, 3.5, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 110, 100, 40, 0, 3.5, 0.0, 9.5, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 116, 100, 20, 0, 3.5, 0.0, 9.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 3.0/(21.0-19.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 13.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 9.0, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(21.0-19.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 17.0, 7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 13.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 9.0, 11.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 23.5, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 25.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 26.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 23.5, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 25.0, 6.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 26.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 25.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 28.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 31.0, -11.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 25.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 28.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 98, 107, 0, 58, 4.0, 0.0, 31.0, -11.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 19.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 20.0, -10.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 22.0, -13.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 19.0, -7.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 20.0, -10.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 22.0, -13.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 15.0, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 14.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 13.0, -12.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 15.0, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 14.0, -9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 13.0, -12.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 12.5, -2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 10.0, -4.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 8.0, -6.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 12.5, -2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 10.0, -4.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 95, 107, 0, 58, 4.0, 0.0, 8.0, -6.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 29.0/(58.0-26.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 29.0/(58.0-26.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); app::sv_animcmd::execute(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 60.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 10); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 10); } } -unsafe extern "C" fn miiswordsman_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 27, 60, 0, 78, 4.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 27, 60, 0, 78, 4.0, 0.0, 4.5, 3.0, Some(0.0), Some(4.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 32, 57, 0, 71, 4.0, 0.0, 5.0, -3.0, Some(0.0), Some(5.0), Some(-18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 32, 57, 0, 71, 4.0, 0.0, 5.0, -3.0, Some(0.0), Some(5.0), Some(-18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attacks4", miiswordsman_attack_s4_s_game) - .acmd("game_attackhi4", miiswordsman_attack_hi4_game) - .acmd("expression_attackhi4", miiswordsman_attack_hi4_expression) - .acmd("game_attacklw4", miiswordsman_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs index 3a4a5bfb0d..c8fbb799d1 100644 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ b/fighters/miiswordsman/src/acmd/specials.rs @@ -1,159 +1,159 @@ use super::*; -unsafe extern "C" fn miiswordsman_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 17.0, 14.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 14.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_TORNADOSHOT, false, 0); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 48.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 48.0, 17.0); frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miiswordsman_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 9.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - if fighter.is_situation(*SITUATION_KIND_GROUND) { + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 9.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if agent.is_situation(*SITUATION_KIND_GROUND) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); } else { - let x_vel = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); - app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); + let x_vel = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); + app::sv_kinetic_energy::set_stable_speed(agent.lua_state_agent); } } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); if boma.is_button_on(Buttons::Special) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 17.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 17.0, 13.0); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); } } // light - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } // heavy else { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, false, 0); ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 33.0, 36.0, 10.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 33.0, 36.0, 10.0); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miiswordsman_special_n2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 14.2); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4.0); } } -unsafe extern "C" fn miiswordsman_special_n2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); - PLAY_SE(fighter, Hash40::new("se_miiswordsman_special_l03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_l03")); } } -unsafe extern "C" fn miiswordsman_special_n2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 0, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 0, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } else { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 35.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 20); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 20); } } @@ -161,160 +161,160 @@ unsafe extern "C" fn miiswordsman_special_n2_expression(fighter: &mut L2CAgentBa // ======================================== BLURRING BLADE ======================================== // ================================================================================================ -unsafe extern "C" fn miiswordsman_special_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let turn = fighter.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if turn { - REVERSE_LR(fighter); + REVERSE_LR(agent); } } for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 33.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let sfx = if fighter.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; let offset = if turn { -10.0 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 80.0, 26.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miiswordsman_special_air_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let turn = fighter.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); + if is_excute(agent) { let flip = if turn { -1.0 } else { 1.0 }; - SET_SPEED_EX(fighter, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if turn { - REVERSE_LR(fighter); + REVERSE_LR(agent); } } for _ in 0..2 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 2.0); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 33.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.0, 0.0)); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let sfx = if fighter.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; let offset = if turn { -9.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 80.0, 26.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } // ================================================================================================== // ======================================== AIRBORNE ASSAULT ======================================== // ================================================================================================== -unsafe extern "C" fn miiswordsman_special_s1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); } } -unsafe extern "C" fn miiswordsman_special_air_s1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); } } -unsafe extern "C" fn miiswordsman_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { } } -unsafe extern "C" fn miiswordsman_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { } @@ -342,136 +342,136 @@ unsafe fn miiswordsman_special_s1_hit_game(fighter: &mut L2CAgentBase) { // ======================================== GALE STAB ========================================== // ============================================================================================= -unsafe extern "C" fn miiswordsman_special_s2_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specials2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 10.0); - if is_excute(fighter) { - MotionModule::set_rate(fighter.module_accessor, 0.5); + if is_excute(agent) { + MotionModule::set_rate(agent.module_accessor, 0.5); } } -unsafe extern "C" fn miiswordsman_special_s2_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn miiswordsman_special_s2_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { // Vanilla Effects //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); //EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); //EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_blastwind_stab"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); // Sword Trail //AFTER_IMAGE4_ON_WORK_arg29(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); //LAST_EFFECT_SET_RATE(fighter, 1.4); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); } } -unsafe extern "C" fn miiswordsman_special_air_s2_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairs2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 10.0); - if is_excute(fighter) { - MotionModule::set_rate(fighter.module_accessor, 0.5); + if is_excute(agent) { + MotionModule::set_rate(agent.module_accessor, 0.5); } } -unsafe extern "C" fn miiswordsman_special_air_s2_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn miiswordsman_special_air_s2_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { // Vanilla Effects //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(fighter, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); // Sword Trail @@ -479,34 +479,34 @@ unsafe extern "C" fn miiswordsman_special_air_s2_attack_effect(fighter: &mut L2C } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); //LAST_EFFECT_SET_RATE(fighter, 1.4); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); } } @@ -515,20 +515,20 @@ unsafe extern "C" fn miiswordsman_special_air_s2_attack_effect(fighter: &mut L2C // ======================================== CHAKRAM ============================================ // ============================================================================================= -unsafe extern "C" fn miiswordsman_special_s3_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -537,31 +537,31 @@ unsafe extern "C" fn miiswordsman_special_s3_1_game(fighter: &mut L2CAgentBase) } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } -unsafe extern "C" fn miiswordsman_special_s3_1_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -570,31 +570,31 @@ unsafe extern "C" fn miiswordsman_special_s3_1_hi_game(fighter: &mut L2CAgentBas } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } -unsafe extern "C" fn miiswordsman_special_s3_1_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -603,31 +603,31 @@ unsafe extern "C" fn miiswordsman_special_s3_1_lw_game(fighter: &mut L2CAgentBas } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } -unsafe extern "C" fn miiswordsman_special_air_s3_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -636,31 +636,31 @@ unsafe extern "C" fn miiswordsman_special_air_s3_1_game(fighter: &mut L2CAgentBa } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } -unsafe extern "C" fn miiswordsman_special_air_s3_1_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -669,31 +669,31 @@ unsafe extern "C" fn miiswordsman_special_air_s3_1_hi_game(fighter: &mut L2CAgen } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } } -unsafe extern "C" fn miiswordsman_special_air_s3_1_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let end_frame = MotionModule::end_frame(boma); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.27); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); } @@ -702,12 +702,12 @@ unsafe extern "C" fn miiswordsman_special_air_s3_1_lw_game(fighter: &mut L2CAgen } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } @@ -717,96 +717,96 @@ unsafe extern "C" fn miiswordsman_special_air_s3_1_lw_game(fighter: &mut L2CAgen // ======================================== STONE SCABBARD ======================================== // ============================================================================================= -unsafe extern "C" fn miiswordsman_special_hi1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.7); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.7); } } -unsafe extern "C" fn miiswordsman_special_air_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let addSpeed = Vector3f { x: 0.0, y: 0.5, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // Tip - ATTACK(fighter, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Middle - ATTACK(fighter, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Hilt - ATTACK(fighter, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_ROKET_UNDER_DISABLE_CONTROL_X); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } -unsafe extern "C" fn miiswordsman_special_air_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } @@ -814,104 +814,104 @@ unsafe extern "C" fn miiswordsman_special_air_hi1_end_game(fighter: &mut L2CAgen // ======================================== SKYWARD SLASH DASH ======================================== // ==================================================================================================== -unsafe extern "C" fn miiswordsman_special_hi2_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.6); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 2.5); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); } else{ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } -unsafe extern "C" fn miiswordsman_special_hi2_hold_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2holdair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 0.6); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 2.5); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); } else{ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } -unsafe extern "C" fn miiswordsman_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for _ in 0..5 { frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { // Charged //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } // Uncharged else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { - let h_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - let v_speed = KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let h_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let v_speed = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; //let angle_calc = v_speed / h_speed as f32; //println!("Angle: {}", angle_calc); @@ -930,96 +930,96 @@ unsafe extern "C" fn miiswordsman_special_hi2_game(fighter: &mut L2CAgentBase) { // Charged //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } // Uncharged else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 1.3, 1.23, 0.65); - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 1.3, 1.23, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); } - else if fighter.is_situation(*SITUATION_KIND_AIR) { - EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); + else if agent.is_situation(*SITUATION_KIND_AIR) { + EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_sdash_hit"), -1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_sdash_hit"), -1); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_sdash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_sdash"), false, true); } } -unsafe extern "C" fn miiswordsman_special_hi2_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.8); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); } } } -unsafe extern "C" fn miiswordsman_special_hi2_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.8); + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); } - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { + FT_MOTION_RATE(agent, 0.5); } } } @@ -1028,143 +1028,143 @@ unsafe extern "C" fn miiswordsman_special_hi2_fall_game(fighter: &mut L2CAgentBa // ======================================== HERO'S SPIN ======================================== // ============================================================================================= -unsafe extern "C" fn miiswordsman_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); + if is_excute(agent) { + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_air_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); +unsafe extern "C" fn game_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let start_speed = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 39.0, 47.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 39.0, 47.0, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } @@ -1175,52 +1175,52 @@ unsafe extern "C" fn miiswordsman_special_air_hi3_game(fighter: &mut L2CAgentBas // ======================================== KINESIS BLADE ======================================== // =============================================================================================== -unsafe extern "C" fn miiswordsman_special_lw1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 47.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); } frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 15.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 47.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); } frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } // Kinesis Blade - Charge Storage @@ -1298,144 +1298,144 @@ unsafe extern "C" fn miiswordsman_special_air_lw1_hit_game(fighter: &mut L2CAgen // Kinesis Blade - 1 Charge -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level +unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } } -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level +unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } } // Kinesis Blade - 2 Charges -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 68.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 73.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 68.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 73.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } @@ -1444,130 +1444,130 @@ unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(fighter: &mut L2C // ======================================== DEFLECTING DRAFT / SHOCK SPELL ======================================== // ================================================================================================================ -unsafe extern "C" fn miiswordsman_special_lw2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 12.0, 16.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 16.0); + if is_excute(agent) { if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); + VarModule::on_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); } } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 23.0, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE_RANGE(agent, 16.0, 23.0, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); } } -unsafe extern "C" fn miiswordsman_special_lw2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } - EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.65); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let mut offset = 0; - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); - if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); + if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { offset = 13; - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(fighter, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(fighter, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 10.5); - if is_excute(fighter) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); } - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - let hold = if VarModule::is_flag(fighter.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_smokescreen"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.84, 0.17); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_smokescreen"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.84, 0.17); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_paralysis"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder_flash"), true, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_hit_elec"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_paralysis"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder_flash"), true, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_hit_elec"), -1); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miiswordsman_reflect_sword"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_reflect_sword"), false, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_reflect1"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, true); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_reflect1"), -1); } } -unsafe extern "C" fn miiswordsman_special_lw2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miiswordsman_special_c2_l01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_c2_l01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); } frame(lua_state, 10.5); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_m")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); } } @@ -1576,74 +1576,74 @@ unsafe extern "C" fn miiswordsman_special_lw2_sound(fighter: &mut L2CAgentBase) // ======================================== HURRICANE HEAVE ======================================================= // ================================================================================================================ -unsafe extern "C" fn miiswordsman_special_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_lw3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: 4.0, y: 5.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: 0.0, y: 17.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { //REVERSE_LR(fighter); //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -6.0, y: 15.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //REVERSE_LR(fighter); //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -12.0, y: 0.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); } @@ -1656,111 +1656,111 @@ unsafe extern "C" fn miiswordsman_special_lw3_end_game(fighter: &mut L2CAgentBas } */ frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_air_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - sv_kinetic_energy!(set_speed_mul_2nd, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - sv_kinetic_energy!(set_speed_mul_2nd, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(fighter, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miiswordsman_special_air_lw3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.790); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); //WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); } } -unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: 4.0, y: 5.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: 0.0, y: 17.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { //REVERSE_LR(fighter); //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -6.0, y: 15.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //REVERSE_LR(fighter); //AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -12.0, y: 0.0}; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); } @@ -1773,80 +1773,78 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(fighter: &mut L2C } */ frame(lua_state, 21.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK(fighter, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_specialn1", miiswordsman_special_n1_game) - .acmd("game_specialairn1", miiswordsman_special_n1_game) - .acmd("game_specialn2", miiswordsman_special_n2_game) - .acmd("game_specialairn2", miiswordsman_special_n2_game) - .acmd("effect_specialn2", miiswordsman_special_n2_effect) - .acmd("effect_specialairn2", miiswordsman_special_n2_effect) - .acmd("sound_specialn2", miiswordsman_special_n2_sound) - .acmd("sound_specialairn2", miiswordsman_special_n2_sound) - .acmd("expression_specialn2", miiswordsman_special_n2_expression) - .acmd("expression_specialairn2", miiswordsman_special_n2_expression) - .acmd("game_specialn3end", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endturn", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endmax", miiswordsman_special_n3_end_game) - .acmd("game_specialn3endmaxturn", miiswordsman_special_n3_end_game) - .acmd("game_specialairn3end", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endturn", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endmax", miiswordsman_special_air_n3_end_game) - .acmd("game_specialairn3endmaxturn", miiswordsman_special_air_n3_end_game) - .acmd("game_specials1start", miiswordsman_special_s1_start_game) - .acmd("game_specialairs1start", miiswordsman_special_air_s1_start_game) - .acmd("game_specials1", miiswordsman_special_s1_game) - .acmd("game_specialairs1", miiswordsman_special_air_s1_game) - .acmd("game_specials2dash", miiswordsman_special_s2_dash_game) - .acmd("game_specials2attack", miiswordsman_special_s2_attack_game) - .acmd("effect_specials2attack", miiswordsman_special_s2_attack_effect) - .acmd("game_specialairs2dash", miiswordsman_special_air_s2_dash_game) - .acmd("game_specialairs2attack", miiswordsman_special_air_s2_attack_game) - .acmd("effect_specialairs2attack", miiswordsman_special_air_s2_attack_effect) - .acmd("game_specials3_1", miiswordsman_special_s3_1_game) - .acmd("game_specials3_1hi", miiswordsman_special_s3_1_hi_game) - .acmd("game_specials3_1lw", miiswordsman_special_s3_1_lw_game) - .acmd("game_specialairs3_1", miiswordsman_special_air_s3_1_game) - .acmd("game_specialairs3_1hi", miiswordsman_special_air_s3_1_hi_game) - .acmd("game_specialairs3_1lw", miiswordsman_special_air_s3_1_lw_game) - .acmd("game_specialhi1start", miiswordsman_special_hi1_start_game) - .acmd("game_specialairhi1", miiswordsman_special_air_hi1_game) - .acmd("game_specialhi1end", miiswordsman_special_hi1_end_game) - .acmd("game_specialairhi1end", miiswordsman_special_air_hi1_end_game) - .acmd("game_specialhi2hold", miiswordsman_special_hi2_hold_game) - .acmd("game_specialhi2holdair", miiswordsman_special_hi2_hold_air_game) - .acmd("game_specialhi2", miiswordsman_special_hi2_game) - .acmd("effect_specialhi2", miiswordsman_special_hi2_effect) - .acmd("game_specialhi2landing", miiswordsman_special_hi2_landing_game) - .acmd("game_specialhi2fall", miiswordsman_special_hi2_fall_game) - .acmd("game_specialhi3", miiswordsman_special_hi3_game) - .acmd("game_specialairhi3", miiswordsman_special_air_hi3_game) - .acmd("game_speciallw1hit", miiswordsman_special_lw1_hit_game) - .acmd("game_specialairlw1hit", miiswordsman_special_air_lw1_hit_game) - //.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game) - //.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game) - //.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game) - //.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game) - .acmd("game_speciallw2", miiswordsman_special_lw2_game) - .acmd("game_specialairlw2", miiswordsman_special_lw2_game) - .acmd("effect_speciallw2", miiswordsman_special_lw2_effect) - .acmd("effect_specialairlw2", miiswordsman_special_lw2_effect) - .acmd("sound_speciallw2", miiswordsman_special_lw2_sound) - .acmd("sound_specialairlw2", miiswordsman_special_lw2_sound) - .acmd("game_speciallw3", miiswordsman_special_lw3_game) - //.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game) - .acmd("game_specialairlw3", miiswordsman_special_air_lw3_game) - .acmd("game_specialairlw3end", miiswordsman_special_air_lw3_end_game) - //.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialn3endturn", game_specialn3end); + agent.acmd("game_specialn3endmax", game_specialn3end); + agent.acmd("game_specialn3endmaxturn", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialairn3end); + agent.acmd("game_specialairn3endturn", game_specialairn3end); + agent.acmd("game_specialairn3endmax", game_specialairn3end); + agent.acmd("game_specialairn3endmaxturn", game_specialairn3end); + agent.acmd("game_specials1start", game_specials1start); + agent.acmd("game_specialairs1start", game_specialairs1start); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("game_specials2dash", game_specials2dash); + agent.acmd("game_specials2attack", game_specials2attack); + agent.acmd("effect_specials2attack", effect_specials2attack); + agent.acmd("game_specialairs2dash", game_specialairs2dash); + agent.acmd("game_specialairs2attack", game_specialairs2attack); + agent.acmd("effect_specialairs2attack", effect_specialairs2attack); + agent.acmd("game_specials3_1", game_specials3_1); + agent.acmd("game_specials3_1hi", game_specials3_1hi); + agent.acmd("game_specials3_1lw", game_specials3_1lw); + agent.acmd("game_specialairs3_1", game_specialairs3_1); + agent.acmd("game_specialairs3_1hi", game_specialairs3_1hi); + agent.acmd("game_specialairs3_1lw", game_specialairs3_1lw); + agent.acmd("game_specialhi1start", game_specialhi1start); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialhi1end", game_specialhi1end); + agent.acmd("game_specialairhi1end", game_specialairhi1end); + agent.acmd("game_specialhi2hold", game_specialhi2hold); + agent.acmd("game_specialhi2holdair", game_specialhi2holdair); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + agent.acmd("game_specialhi2landing", game_specialhi2landing); + agent.acmd("game_specialhi2fall", game_specialhi2fall); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialairhi3); + agent.acmd("game_speciallw1hit", game_speciallw1hit); + agent.acmd("game_specialairlw1hit", game_specialairlw1hit); + //.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game) + //.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game) + //.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game) + //.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game) + agent.acmd("game_speciallw2", game_speciallw2); + agent.acmd("game_specialairlw2", game_speciallw2); + agent.acmd("effect_speciallw2", effect_speciallw2); + agent.acmd("effect_specialairlw2", effect_speciallw2); + agent.acmd("sound_speciallw2", sound_speciallw2); + agent.acmd("sound_specialairlw2", sound_speciallw2); + agent.acmd("game_speciallw3", game_speciallw3); + //.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game) + agent.acmd("game_specialairlw3", game_specialairlw3); + agent.acmd("game_specialairlw3end", game_specialairlw3end); + agent//.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) } \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/throws.rs b/fighters/miiswordsman/src/acmd/throws.rs index 71288b6730..81a161a39c 100644 --- a/fighters/miiswordsman/src/acmd/throws.rs +++ b/fighters/miiswordsman/src/acmd/throws.rs @@ -1,109 +1,109 @@ use super::*; -unsafe extern "C" fn miiswordsman_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(7.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miiswordsman_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miiswordsman_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-12.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn throwf_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 45, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 40, 100, 0, 70, 5.0, 0.0, 9.0, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 40, 100, 0, 70, 5.0, 0.0, 9.0, 10.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA(fighter, 13, 1); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 5, 0, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn throwb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 5.0, 3.8, -1.2, 1.5, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 4.5, -3.0, 0.0, 1.0, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 5.0, 3.8, -1.2, 1.5, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 110, 100, 0, 70, 4.5, -3.0, 0.0, 1.0, None, None, None, 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); //CHECK_FINISH_CAMERA(fighter, 12, 5); @@ -111,76 +111,74 @@ unsafe extern "C" fn throwb_game(fighter: &mut L2CAgentBase) { //FighterCutInManager::set_throw_finish_offset(boma, 5, 2, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } -unsafe extern "C" fn throwhi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 84, 205, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 84, 205, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 122, 0, 30, 4.0, 0.0, 21.0, -1.0, Some(0.0), Some(30.0), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 122, 0, 30, 4.0, 0.0, 21.0, -1.0, Some(0.0), Some(30.0), Some(-1.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); //CHECK_FINISH_CAMERA(fighter, 2, 27); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 0, 15, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } } -unsafe extern "C" fn throwlw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 80, 115, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 80, 115, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 150, 0, 30, 4.5, -7.0, 3.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 150, 0, 30, 4.5, -7.0, 3.0, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KNEE); AttackModule::set_catch_only_all(boma, true, false); //CHECK_FINISH_CAMERA(fighter, 5, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, -3, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_catch", miiswordsman_catch_game) - .acmd("game_catchdash", miiswordsman_catch_dash_game) - .acmd("game_catchturn", miiswordsman_catch_turn_game) - .acmd("game_throwf", throwf_game) - .acmd("game_throwb", throwb_game) - .acmd("game_throwhi", throwhi_game) - .acmd("game_throwlw", throwlw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miiswordsman/src/acmd/tilts.rs b/fighters/miiswordsman/src/acmd/tilts.rs index ffab0737d3..2d8e581068 100644 --- a/fighters/miiswordsman/src/acmd/tilts.rs +++ b/fighters/miiswordsman/src/acmd/tilts.rs @@ -2,93 +2,91 @@ use super::*; // New animation -unsafe extern "C" fn attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 4.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 3.5/(11.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 3.5/(11.0-9.0)); + if is_excute(agent) { // Body hitboxes - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 87, 50, 0, 60, 4.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 72, 45, 0, 60, 3.5, 0.0, 4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 87, 50, 0, 60, 4.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.5); - FT_MOTION_RATE(fighter, 24.5/(37.0-10.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 24.5/(37.0-10.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x26769bd1de), 0, 30, 8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 8); } } -unsafe extern "C" fn attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 76, 90, 0, 68, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 80, 93, 0, 68, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.5, 80, 94, 0, 68, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.5, 82, 98, 0, 68, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 76, 90, 0, 68, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 80, 93, 0, 68, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.5, 80, 94, 0, 68, 3.5, 0.0, 6.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.5, 82, 98, 0, 68, 3.5, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 70, 66, 0, 53, 3.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 85, 67, 0, 53, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 90, 68, 0, 52, 3.0, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 70, 66, 0, 53, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 70, 66, 0, 53, 3.0, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 85, 67, 0, 53, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 90, 68, 0, 52, 3.0, 0.0, 10.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 9.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 9.0, 7.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("miiswordsman") - .acmd("game_attacks3", attack_s3_game) - .acmd("expression_attacks3", attack_s3_expression) - .acmd("game_attackhi3", attack_hi3_game) - .acmd("game_attacklw3", attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miiswordsman/src/chakram/acmd.rs b/fighters/miiswordsman/src/chakram/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/acmd/special.rs b/fighters/miiswordsman/src/chakram/acmd/special.rs new file mode 100644 index 0000000000..dd336fbc30 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/acmd/special.rs @@ -0,0 +1,88 @@ +use super::*; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + // Tap Input + if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + } + // Hold Input + else{ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + } +} +unsafe extern "C" fn game_flynormalsub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn game_flyflicksub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn miiswordsman_chakram_hop_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + } +} + +unsafe extern "C" fn game_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } + +} + +unsafe extern "C" fn effect_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 142.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_flynormalsub", game_flynormalsub); + agent.acmd("game_flyflicksub", game_flyflicksub); + //.acmd("game_hop", miiswordsman_chakram_hop_game); + agent.acmd("game_stick", game_stick); + agent.acmd("effect_stick", effect_stick); +} diff --git a/fighters/miiswordsman/src/chakram/mod.rs b/fighters/miiswordsman/src/chakram/mod.rs new file mode 100644 index 0000000000..6869cd648b --- /dev/null +++ b/fighters/miiswordsman/src/chakram/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_chakram"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/lib.rs b/fighters/miiswordsman/src/lib.rs index a79ec350f2..a6cf78f815 100644 --- a/fighters/miiswordsman/src/lib.rs +++ b/fighters/miiswordsman/src/lib.rs @@ -40,7 +40,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miiswordsman"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/lightshuriken/acmd.rs b/fighters/miiswordsman/src/lightshuriken/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/miiswordsman/src/lightshuriken/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/lightshuriken/acmd/special.rs b/fighters/miiswordsman/src/lightshuriken/acmd/special.rs new file mode 100644 index 0000000000..a53b648752 --- /dev/null +++ b/fighters/miiswordsman/src/lightshuriken/acmd/special.rs @@ -0,0 +1,90 @@ +use super::*; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); +} +frame(lua_state, 18.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); +} +} +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); +let mut lead_wave : u32 = std::u32::MAX; +let mut wave_2 : u32 = std::u32::MAX; +let mut wave_3 : u32 = std::u32::MAX; +if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); + lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, lead_wave, 0.7); + + wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_2, 0.7); + EffectModule::set_alpha(boma, wave_2, 0.4); + //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } +} +wait(lua_state, 4.0); +if is_excute(agent) { + EffectModule::set_rate(boma, lead_wave, 0.000001); + EffectModule::set_rate(boma, wave_2, 0.000001); + EffectModule::set_alpha(boma, wave_2, 0.4); + wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_3, 0.7); + EffectModule::set_alpha(boma, wave_3, 0.4); + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } +} +wait(lua_state, 4.0); +if is_excute(agent) { + EffectModule::set_rate(boma, wave_3, 0.000001); + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } +} +for _ in 0..i32::MAX { + wait(lua_state, 4.0); + if is_excute(agent) { + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } +} +} + +pub fn install(agent: &mut Agent) { +agent.acmd("game_fly", game_fly); +agent.acmd("effect_fly", effect_fly); +} diff --git a/fighters/miiswordsman/src/lightshuriken/mod.rs b/fighters/miiswordsman/src/lightshuriken/mod.rs new file mode 100644 index 0000000000..459467c7a1 --- /dev/null +++ b/fighters/miiswordsman/src/lightshuriken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_lightshurken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/opff.rs b/fighters/miiswordsman/src/opff.rs index 3ffef13f4d..37d6cc01c8 100644 --- a/fighters/miiswordsman/src/opff.rs +++ b/fighters/miiswordsman/src/opff.rs @@ -297,11 +297,7 @@ pub extern "C" fn tornadoshot_frame(weapon: &mut L2CFighterBase) { } } -pub fn install() { - smashline::Agent::new("miiswordsman") - .on_line(Main, miiswordsman_frame_wrapper) - .install(); - smashline::Agent::new("miiswordsman_tornadoshot") - .on_line(Main, tornadoshot_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miiswordsman_frame_wrapper); + agent.on_line(Main, tornadoshot_frame); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status.rs index 6759f37e84..4efc9410bc 100644 --- a/fighters/miiswordsman/src/status.rs +++ b/fighters/miiswordsman/src/status.rs @@ -1284,30 +1284,27 @@ pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) - 0.into() } -pub fn install() { - smashline::Agent::new("miiswordsman") - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold) - .status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw) - .status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main) - .status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end) - .status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end) - .install(); - smashline::Agent::new("miiswordsman_chakram") - .status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end); + agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); + agent.status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop); + agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornado/acmd.rs b/fighters/miiswordsman/src/tornado/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/miiswordsman/src/tornado/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornado/acmd/special.rs b/fighters/miiswordsman/src/tornado/acmd/special.rs new file mode 100644 index 0000000000..97a3bb4cbd --- /dev/null +++ b/fighters/miiswordsman/src/tornado/acmd/special.rs @@ -0,0 +1,20 @@ +use super::*; +unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", miiswordsman_tornadoshot_fly_game); +} diff --git a/fighters/miiswordsman/src/tornado/mod.rs b/fighters/miiswordsman/src/tornado/mod.rs new file mode 100644 index 0000000000..d834d6b0b1 --- /dev/null +++ b/fighters/miiswordsman/src/tornado/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miiswordfighter_tornado"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 8385d18468d38068b77934374c4b292b56c5244c Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 18:24:22 -0400 Subject: [PATCH 087/172] BACKSLASH --- fighters/shulk/src/acmd/aerials.rs | 218 ++++++++++++------------ fighters/shulk/src/acmd/ground.rs | 98 ++++++----- fighters/shulk/src/acmd/mod.rs | 16 +- fighters/shulk/src/acmd/other.rs | 182 ++++++++++---------- fighters/shulk/src/acmd/smashes.rs | 220 ++++++++++++------------- fighters/shulk/src/acmd/specials.rs | 104 ++++++------ fighters/shulk/src/acmd/throws.rs | 140 ++++++++-------- fighters/shulk/src/acmd/tilts.rs | 90 +++++----- fighters/shulk/src/lib.rs | 10 +- fighters/shulk/src/opff.rs | 6 +- fighters/shulk/src/status.rs | 12 +- fighters/shulk/src/status/special_n.rs | 6 +- fighters/shulk/src/status/special_s.rs | 8 +- fighters/shulk/src/vtable_hook.rs | 2 +- 14 files changed, 547 insertions(+), 565 deletions(-) diff --git a/fighters/shulk/src/acmd/aerials.rs b/fighters/shulk/src/acmd/aerials.rs index 0ac6d9676e..5b811cb878 100644 --- a/fighters/shulk/src/acmd/aerials.rs +++ b/fighters/shulk/src/acmd/aerials.rs @@ -1,105 +1,105 @@ use super::*; -unsafe extern "C" fn shulk_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_DESIRED_RATE(fighter, 11.0, 9.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 11.0, 9.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_DESIRED_RATE(fighter, 18.0, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 10.0, 68, 100, 0, 50, 3.6, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 7.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 13.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, 18.0, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 10.0, 68, 100, 0, 50, 3.6, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 7.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 8.5, 58, 100, 0, 42, 4.0, 13.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn shulk_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 6.0, 3.0); + FT_DESIRED_RATE(agent, 6.0, 3.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, 5.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 8.5, 58, 70, 0, 70, 4.0, 12.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 10.0, 361, 104, 0, 46, 4.0, 5.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 8.5, 58, 70, 0, 70, 4.0, 12.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn shulk_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 17.0, 15.0); + FT_DESIRED_RATE(agent, 17.0, 15.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.5, 361, 95, 0, 35, 2.75, -1.0, 0.7, 0.0, Some(-1.0), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.5, 361, 95, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -5.5, Some(0.0), Some(8.0), Some(-0.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.5, 361, 95, 0, 35, 2.75, -1.0, 0.7, 0.0, Some(-1.0), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.5, 361, 95, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -5.5, Some(0.0), Some(8.0), Some(-0.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.5, 361, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -7.5, Some(0.0), Some(8.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.5, 361, 90, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 8.0, -7.5, Some(0.0), Some(8.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 9.5, -18.5, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.5, 361, 100, 0, 35, 3.6, 0.0, 9.5, -18.5, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 361, 85, 0, 35, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(10.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 361, 85, 0, 35, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(10.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 3.6, 0.0, 9.5, -17.0, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(9.5), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 3.6, 0.0, 9.5, -17.0, Some(0.0), Some(9.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 361, 70, 0, 40, 2.6, 0.0, 9.5, -32.0, Some(0.0), Some(9.5), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -126,122 +126,120 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 11.0, 6.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 11.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.5, 367, 90, 40, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 4.5, 90, 90, 45, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 367, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.5, 367, 90, 40, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 2.0, 0.0, 24.799999, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.5, 90, 90, 60, 0, 5.0, 0.0, 17.5, 0.0, Some(0.0), Some(17.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 4.5, 90, 90, 45, 0, 5.0, 0.0, 20.5, 0.0, Some(0.0), Some(17.299999), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - FT_DESIRED_RATE(fighter, 7.0, 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 7.0, 4.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 88, 90, 0, 40, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 88, 90, 0, 40, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 88, 90, 0, 40, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 88, 90, 0, 40, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 88, 80, 0, 35, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 88, 80, 0, 35, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 88, 80, 0, 35, 3.5, 0.0, 20.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 88, 80, 0, 35, 2.0, 0.0, 39.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 78.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn shulk_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 12.0, 10.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 12.0, 10.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 2.5); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 367, 100, 45, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 160, 100, 20, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 367, 100, 45, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 160, 100, 20, 0, 5.3, 0.0, 4.0, 0.8, Some(0.0), Some(1.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - FT_DESIRED_RATE(fighter, 6.0, 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 6.0, 4.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.2); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 270, 90, 0, 15, 6.2, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 270, 90, 0, 15, 6.2, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 270, 85, 0, 50, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.5, 270, 85, 0, 55, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 270, 85, 0, 50, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.5, 270, 85, 0, 55, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.5, 270, 53, 0, 30, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 10.5, 270, 54, 0, 30, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.5, 270, 53, 0, 30, 6.2, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.5, 270, 54, 0, 30, 3.7, 0.0, -14.0, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 361, 75, 0, 55, 3.2, 0.0, -14.8, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, -1.0, 0.8, Some(0.0), Some(-1.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 75, 0, 50, 5.4, 0.0, 5.0, 0.8, Some(0.0), Some(5.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 361, 75, 0, 55, 3.2, 0.0, -14.8, 0.8, Some(0.0), Some(4.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attackairn", shulk_attack_air_n_game) - .acmd("game_attackairf", shulk_attack_air_f_game) - .acmd("game_attackairb", shulk_attack_air_b_game) - .acmd("expression_attackairb", expression_attackairb) - .acmd("game_attackairhi", shulk_attack_air_hi_game) - .acmd("game_attackairlw", shulk_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/shulk/src/acmd/ground.rs b/fighters/shulk/src/acmd/ground.rs index e7832e4748..d76970fae9 100644 --- a/fighters/shulk/src/acmd/ground.rs +++ b/fighters/shulk/src/acmd/ground.rs @@ -1,102 +1,100 @@ use super::*; -unsafe extern "C" fn shulk_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.5); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.0, 361, 10, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.0, 361, 10, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 361, 10, 0, 35, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 2.0, 361, 10, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //jablock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.0, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 10, 0, 25, 2.0, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn shulk_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 361, 10, 0, 40, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 40, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 35, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 361, 10, 0, 40, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 40, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.5, 361, 10, 0, 35, 3.8, 4.5, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn shulk_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 4.65, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 9.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 4.65, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 50, 100, 0, 60, 3.5, 9.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0, 11.0); + FT_DESIRED_RATE(agent, 14.0, 11.0); frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, 28.0, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 361, 95, 0, 35, 3.7, 0.0, 7.4, 11.6, Some(0.0), Some(7.4), Some(6.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 70, 95, 0, 35, 3.1, 0.0, 7.4, 18.8, Some(0.0), Some(7.4), Some(7.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, 28.0, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 361, 95, 0, 35, 3.7, 0.0, 7.4, 11.6, Some(0.0), Some(7.4), Some(6.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 70, 95, 0, 35, 3.1, 0.0, 7.4, 18.8, Some(0.0), Some(7.4), Some(7.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attack11", shulk_attack_11_game) - .acmd("game_attack12", shulk_attack_12_game) - .acmd("game_attack13", shulk_attack_13_game) - .acmd("game_attackdash", shulk_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/shulk/src/acmd/mod.rs b/fighters/shulk/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/shulk/src/acmd/mod.rs +++ b/fighters/shulk/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/shulk/src/acmd/other.rs b/fighters/shulk/src/acmd/other.rs index e68b073c19..b0b6c37f9d 100644 --- a/fighters/shulk/src/acmd/other.rs +++ b/fighters/shulk/src/acmd/other.rs @@ -1,198 +1,198 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_shulk_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_shulk_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 19.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_shulk_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_shulk_step_left_l")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_shulk_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_shulk_step_right_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.143); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.143); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } @@ -241,20 +241,18 @@ unsafe extern "C" fn sound_win2b_us_en(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_win2", effect_win2) - .acmd("sound_win2a_us_en", sound_win2a_us_en) - .acmd("sound_win2b_us_en", sound_win2b_us_en) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_win2", effect_win2); + agent.acmd("sound_win2a_us_en", sound_win2a_us_en); + agent.acmd("sound_win2b_us_en", sound_win2b_us_en); } diff --git a/fighters/shulk/src/acmd/smashes.rs b/fighters/shulk/src/acmd/smashes.rs index b17520594f..f61f360813 100644 --- a/fighters/shulk/src/acmd/smashes.rs +++ b/fighters/shulk/src/acmd/smashes.rs @@ -1,203 +1,203 @@ use super::*; -unsafe extern "C" fn shulk_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.476); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.476); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 6.0, 78, 100, 35, 0, 2.0, 11.0, 0.0, 2.0, Some(4.0), Some(0.0), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 6.0, 10, 100, 35, 0, 2.0, 11.0, 0.0, -0.5, Some(4.0), Some(0.0), Some(-0.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordr"), 6.0, 40, 100, 35, 0, 4.0, -2.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 361, 110, 0, 30, 4.0, 8.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 12.5, 361, 115, 0, 30, 3.0, 21.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.244); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.244); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 90, 40, 70, 0, 4.3, 0.0, 12.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 60, 0, 3.9, 0.0, 17.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 40, 70, 0, 4.3, 0.0, 12.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 60, 0, 3.9, 0.0, 17.0, 0.5, Some(0.0), Some(10.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 110, 100, 90, 0, 3.7, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 3.5, 0.0, 35.3, 0.9, Some(0.0), Some(7.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 5.0, 0.0, 16.0, 0.9, Some(0.0), Some(9.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 3.5, 0.0, 35.3, 0.9, Some(0.0), Some(7.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 15.0, 90, 100, 0, 40, 5.0, 0.0, 16.0, 0.9, Some(0.0), Some(9.0), Some(0.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 14.5, 75, 90, 0, 50, 4.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 14.5, 65, 90, 0, 50, 4.4, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.5, 75, 90, 0, 50, 4.5, 0.0, 7.4, 12.5, Some(0.0), Some(7.4), Some(4.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 4.1, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 3.8, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 14.5, 75, 90, 0, 50, 4.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 14.5, 65, 90, 0, 50, 4.4, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.5, 75, 90, 0, 50, 4.5, 0.0, 7.4, 12.5, Some(0.0), Some(7.4), Some(4.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 4.1, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordr"), 11.5, 361, 90, 0, 50, 3.8, 20.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -237,7 +237,7 @@ unsafe extern "C" fn shulk_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_lw4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -251,7 +251,7 @@ unsafe extern "C" fn shulk_attack_lw4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_attack_lw4_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -285,15 +285,13 @@ unsafe extern "C" fn shulk_attack_lw4_expression(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attacks4hi", shulk_attack_s4_hi_game) - .acmd("game_attacks4", shulk_attack_s4_s_game) - .acmd("game_attacks4lw", shulk_attack_s4_lw_game) - .acmd("game_attackhi4", shulk_attack_hi4_game) - .acmd("game_attacklw4", shulk_attack_lw4_game) - .acmd("effect_attacklw4", shulk_attack_lw4_effect) - .acmd("sound_attacklw4", shulk_attack_lw4_sound) - .acmd("expression_attacklw4", shulk_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/shulk/src/acmd/specials.rs b/fighters/shulk/src/acmd/specials.rs index 4d13cfbe36..efd07e19c8 100644 --- a/fighters/shulk/src/acmd/specials.rs +++ b/fighters/shulk/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn shulk_special_n_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -25,7 +25,7 @@ unsafe extern "C" fn shulk_special_n_start_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -85,7 +85,7 @@ unsafe extern "C" fn shulk_special_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -133,7 +133,7 @@ unsafe extern "C" fn shulk_special_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_air_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -180,7 +180,7 @@ unsafe extern "C" fn shulk_special_air_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -224,67 +224,67 @@ unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma,*FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma,*FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ADD_SHIFT_RESERVE_INPUT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 78, 100, 140, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 3.8, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 91, 100, 135, 0, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 100, 78, 0, 3.2, 0.0, 20.0, 7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 86, 100, 80, 0, 4.5, 0.0, 20.0, 16.0, Some(0.0), Some(4.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 100, 78, 0, 3.2, 0.0, 20.0, 7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 86, 100, 80, 0, 4.5, 0.0, 20.0, 16.0, Some(0.0), Some(4.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 52, 100, 43, 0, 3.2, 0.0, 18.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 43, 0, 3.2, 0.0, 18.0, 16.0, Some(0.0), Some(10.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 52, 100, 43, 0, 3.2, 0.0, 18.0, 7.0, Some(0.0), Some(10.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 43, 0, 3.2, 0.0, 18.0, 16.0, Some(0.0), Some(10.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_ADD_SHIFT_INPUT); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_FALL); WorkModule::on_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_CONTROL); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07),*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma,*FIGHTER_SHULK_STATUS_SPECIAL_HI_FLAG_IS_ENABLE_ADD_SHIFT_INPUT); } } -unsafe extern "C" fn shulk_special_lw_attack_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -308,7 +308,7 @@ unsafe extern "C" fn shulk_special_lw_attack_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn shulk_special_lw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 0.8); @@ -326,22 +326,20 @@ unsafe extern "C" fn shulk_special_lw_f_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("effect_specialnstart", shulk_special_n_start_effect) - .acmd("effect_specialairnstart", shulk_special_n_start_effect) - .acmd("game_specials", shulk_special_s_game) - .acmd("game_specialairs", shulk_special_s_game) - .acmd("effect_specials", shulk_special_s_effect) - .acmd("effect_specialairs", shulk_special_air_s_effect) - .acmd("sound_specials", shulk_special_s_sound) - .acmd("sound_specialairs", shulk_special_s_sound) - .acmd("expression_specials", expression_specials) - .acmd("expression_specialairs", expression_specials) - .acmd("game_specialhi", shulk_special_hi_game) - .acmd("game_specialairhi", shulk_special_hi_game) - .acmd("game_speciallwattack", shulk_special_lw_attack_game) - .acmd("game_specialairlwattack", shulk_special_lw_attack_game) - .acmd("game_speciallwf", shulk_special_lw_f_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specialnstart", effect_specialnstart); + agent.acmd("effect_specialairnstart", effect_specialnstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("game_speciallwattack", game_speciallwattack); + agent.acmd("game_specialairlwattack", game_speciallwattack); + agent.acmd("game_speciallwf", game_speciallwf) } diff --git a/fighters/shulk/src/acmd/throws.rs b/fighters/shulk/src/acmd/throws.rs index b5be8cb90f..81ed97339f 100644 --- a/fighters/shulk/src/acmd/throws.rs +++ b/fighters/shulk/src/acmd/throws.rs @@ -1,31 +1,31 @@ use super::*; -unsafe extern "C" fn shulk_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn shulk_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn shulk_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,115 +65,113 @@ unsafe extern "C" fn shulk_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn shulk_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 95, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 45, 95, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 4); + CHECK_FINISH_CAMERA(agent, 15, 4); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 135, 95, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 135, 95, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 3.0, 25, 100, 65, 0, 5.0, 12.0, 0.0, 1.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -9, 3); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -9, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 30, 3.0, 0.0, 31.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 120, 0, 30, 3.0, 0.0, 31.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 19); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 19); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 60, 108, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 60, 108, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 0, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 0, 5.0, 0.0, 4.0, 4.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_catch", shulk_catch_game) - .acmd("game_catchdash", shulk_catch_dash_game) - .acmd("game_catchturn", shulk_catch_turn_game) - .acmd("game_throwf", shulk_throw_f_game) - .acmd("game_throwb", shulk_throw_b_game) - .acmd("game_throwhi", shulk_throw_hi_game) - .acmd("game_throwlw", shulk_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/shulk/src/acmd/tilts.rs b/fighters/shulk/src/acmd/tilts.rs index 3ce01e7b0c..9a641a9e74 100644 --- a/fighters/shulk/src/acmd/tilts.rs +++ b/fighters/shulk/src/acmd/tilts.rs @@ -1,81 +1,79 @@ use super::*; -unsafe extern "C" fn shulk_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 5.0, 2.0); + FT_DESIRED_RATE(agent, 5.0, 2.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 0.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.5, 361, 92, 0, 30, 3.2, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 9.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 14.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 0.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordr"), 13.5, 361, 92, 0, 30, 3.5, 5.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.5, 361, 92, 0, 30, 3.2, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 9.5, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordr"), 12.0, 361, 92, 0, 30, 3.5, 14.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0, 9.0); + FT_DESIRED_RATE(agent, 14.0, 9.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 80, 0, 70, 3.8, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 85, 80, 0, 70, 3.8, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 85, 80, 0, 70, 3.8, 0.0, 2.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 14.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 107, 75, 0, 65, 5.0, 0.0, 10.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn shulk_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 9.0, 7.0); + FT_DESIRED_RATE(agent, 9.0, 7.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.5, 0.0, 9.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.0, 0.0, 14.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 70, 90, 0, 45, 3.0, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.5, 0.0, 9.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.5, 80, 90, 0, 45, 3.0, 0.0, 14.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("shulk") - .acmd("game_attacks3", shulk_attack_s3_s_game) - .acmd("game_attackhi3", shulk_attack_hi3_game) - .acmd("game_attacklw3", shulk_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/shulk/src/lib.rs b/fighters/shulk/src/lib.rs index 4e823553ab..dbec1261aa 100644 --- a/fighters/shulk/src/lib.rs +++ b/fighters/shulk/src/lib.rs @@ -40,8 +40,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - vtable_hook::install(); - opff::install(); + let agent = &mut Agent::new("shulk"); + acmd::install(agent); + status::install(agent); + vtable_hook::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/shulk/src/opff.rs b/fighters/shulk/src/opff.rs index f826d031b6..24bde763c6 100644 --- a/fighters/shulk/src/opff.rs +++ b/fighters/shulk/src/opff.rs @@ -88,8 +88,6 @@ pub unsafe fn shulk_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("shulk") - .on_line(Main, shulk_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shulk_frame_wrapper); } diff --git a/fighters/shulk/src/status.rs b/fighters/shulk/src/status.rs index 86bfa65bd4..f7aab4bc92 100644 --- a/fighters/shulk/src/status.rs +++ b/fighters/shulk/src/status.rs @@ -3,12 +3,12 @@ use super::*; mod special_n; mod special_s; -pub fn install() { - smashline::Agent::new("shulk") - .on_start(shulk_init) - .install(); - special_n::install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + smashline::Agent::new("shulk"); + agent.on_start(shulk_init); + agent.install(); + special_n::install(agent); + special_s::install(agent); } extern "C" fn shulk_init(fighter: &mut L2CFighterCommon) { diff --git a/fighters/shulk/src/status/special_n.rs b/fighters/shulk/src/status/special_n.rs index f042ef6493..54a9c5e6d3 100644 --- a/fighters/shulk/src/status/special_n.rs +++ b/fighters/shulk/src/status/special_n.rs @@ -33,8 +33,6 @@ unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -pub fn install() { - smashline::Agent::new("shulk") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, shulk_special_n_pre) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, shulk_special_n_pre); } \ No newline at end of file diff --git a/fighters/shulk/src/status/special_s.rs b/fighters/shulk/src/status/special_s.rs index 6443156190..7d5580530d 100644 --- a/fighters/shulk/src/status/special_s.rs +++ b/fighters/shulk/src/status/special_s.rs @@ -145,9 +145,7 @@ unsafe extern "C" fn shulk_special_s_main_loop(fighter: &mut L2CFighterCommon) - return 0.into(); } -pub fn install() { - smashline::Agent::new("shulk") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_pre,) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_pre,); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_main); } \ No newline at end of file diff --git a/fighters/shulk/src/vtable_hook.rs b/fighters/shulk/src/vtable_hook.rs index 61f23ba119..55544bb08d 100644 --- a/fighters/shulk/src/vtable_hook.rs +++ b/fighters/shulk/src/vtable_hook.rs @@ -73,7 +73,7 @@ pub unsafe extern "C" fn shulk_check_valid_arts_statuses(fighter: &mut Fighter) } } -pub fn install() { +pub fn install(agent: &mut Agent) { skyline::install_hooks!( shulk_check_valid_arts_statuses, ); From fbc2a03c89afdf13f1920747905b4486a8e4b48b Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 19:27:55 -0400 Subject: [PATCH 088/172] PT crate --- fighters/pfushigisou/src/acmd/aerials.rs | 184 +++++++++-------- fighters/pfushigisou/src/acmd/ground.rs | 104 +++++----- fighters/pfushigisou/src/acmd/mod.rs | 16 +- fighters/pfushigisou/src/acmd/other.rs | 170 ++++++++-------- fighters/pfushigisou/src/acmd/smashes.rs | 127 ++++++------ fighters/pfushigisou/src/acmd/specials.rs | 94 +++++---- fighters/pfushigisou/src/acmd/throws.rs | 72 ++++--- fighters/pfushigisou/src/acmd/tilts.rs | 108 +++++----- fighters/pfushigisou/src/lib.rs | 8 +- fighters/pfushigisou/src/opff.rs | 6 +- fighters/pfushigisou/src/status.rs | 6 +- fighters/plizardon/src/acmd/aerials.rs | 220 ++++++++++----------- fighters/plizardon/src/acmd/ground.rs | 92 +++++---- fighters/plizardon/src/acmd/mod.rs | 16 +- fighters/plizardon/src/acmd/other.rs | 218 ++++++++++---------- fighters/plizardon/src/acmd/smashes.rs | 140 +++++++------ fighters/plizardon/src/acmd/specials.rs | 114 ++++++----- fighters/plizardon/src/acmd/throws.rs | 72 ++++--- fighters/plizardon/src/acmd/tilts.rs | 202 ++++++++++--------- fighters/plizardon/src/lib.rs | 8 +- fighters/plizardon/src/opff.rs | 6 +- fighters/plizardon/src/status.rs | 11 +- fighters/plizardon/src/status/special_s.rs | 6 +- fighters/pzenigame/src/acmd/aerials.rs | 158 ++++++++------- fighters/pzenigame/src/acmd/ground.rs | 92 +++++---- fighters/pzenigame/src/acmd/mod.rs | 16 +- fighters/pzenigame/src/acmd/other.rs | 158 ++++++++------- fighters/pzenigame/src/acmd/smashes.rs | 120 ++++++----- fighters/pzenigame/src/acmd/specials.rs | 80 ++++---- fighters/pzenigame/src/acmd/throws.rs | 68 ++++--- fighters/pzenigame/src/acmd/tilts.rs | 118 ++++++----- fighters/pzenigame/src/lib.rs | 8 +- fighters/pzenigame/src/opff.rs | 6 +- fighters/pzenigame/src/status.rs | 14 +- 34 files changed, 1393 insertions(+), 1445 deletions(-) diff --git a/fighters/pfushigisou/src/acmd/aerials.rs b/fighters/pfushigisou/src/acmd/aerials.rs index d724e9bafd..d44f3cfcf2 100644 --- a/fighters/pfushigisou/src/acmd/aerials.rs +++ b/fighters/pfushigisou/src/acmd/aerials.rs @@ -1,46 +1,46 @@ use super::*; -unsafe extern "C" fn pfushigisou_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 35, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("leafb2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("leaff2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("leafr2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("leafl2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 25, 0, 35, 5.5, 0.0, 5.0, 0.0, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("leafb2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("leaff2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("leafr2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("leafl2"), 1.0, 367, 25, 0, 45, 5.5, -1.0, 1.5, 1.5, None, None, None, 0.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("leafb2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("leaff2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("leafr2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("leafl2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("leafb2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("leaff2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("leafr2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("leafl2"), 2.0, 361, 200, 0, 30, 6.5, -1.0, 1.5, 1.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pfushigisou_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); /* frame(lua_state, 2.0); if is_excute(fighter) { @@ -54,153 +54,151 @@ unsafe extern "C" fn pfushigisou_landing_air_n_game(fighter: &mut L2CAgentBase) } -unsafe extern "C" fn pfushigisou_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 361, 55, 0, 50, 3.6, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 11.0, 70, 55, 0, 60, 4.0, 1.0, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 12.0, 70, 55, 0, 60, 3.0, 2.8, -0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 13.0, 80, 55, 0, 60, 3.5, 4.0, -0.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 361, 55, 0, 50, 3.6, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 11.0, 70, 55, 0, 60, 4.0, 1.0, -0.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 12.0, 70, 55, 0, 60, 3.0, 2.8, -0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 13.0, 80, 55, 0, 60, 3.5, 4.0, -0.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pfushigisou_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("weapon") as i64, hash40("weapon_normal") as i64); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn pfushigisou_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 4.0, 76, 27, 0, 30, 4.5, 0.3, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 4.0, 76, 27, 0, 30, 4.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 4.0, 76, 27, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 4.0, 76, 27, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 4.0, 76, 27, 0, 30, 4.5, 0.3, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 4.0, 76, 27, 0, 30, 4.0, 0.8, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 4.0, 76, 27, 0, 30, 3.5, 1.2, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 4.0, 76, 27, 0, 30, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("vinel2"), 6.0, 55, 133, 0, 25, 5.0, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 6.0, 55, 133, 0, 25, 4.5, 0.8, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("vinel4"), 6.0, 361, 133, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("vinel5"), 6.0, 361, 133, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("vinel2"), 6.0, 55, 133, 0, 25, 5.0, 0.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 6.0, 55, 133, 0, 25, 4.5, 0.8, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("vinel4"), 6.0, 361, 133, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("vinel5"), 6.0, 361, 133, 0, 25, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pfushigisou_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.813); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.813); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 12.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - HIT_NODE(fighter, Hash40::new("flower"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 90, 72, 0, 64, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + HIT_NODE(agent, Hash40::new("flower"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 90, 72, 0, 64, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 270, 52, 0, 31, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 270, 52, 0, 31, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 270, 70, 0, 30, 2.5, 0.0, 5.5, -3.5, Some(0.0), Some(5.5), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pfushigisou_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - SET_SPEED_EX(fighter, 0, 0.3, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.3, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 270, 80, 0, 27, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 270, 62, 0, 17, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 270, 80, 0, 27, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 270, 62, 0, 17, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 270, 82, 0, 9, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 270, 62, 0, 8, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 270, 82, 0, 9, 5.0, 0.0, -13.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 270, 62, 0, 8, 10.0, 0.0, -14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attackairn", pfushigisou_attack_air_n_game) - .acmd("game_landingairn", pfushigisou_landing_air_n_game) - .acmd("game_attackairf", pfushigisou_attack_air_f_game) - .acmd("expression_attackairf", pfushigisou_attack_air_f_expression) - .acmd("game_attackairb", pfushigisou_attack_air_b_game) - .acmd("game_attackairhi", pfushigisou_attack_air_hi_game) - .acmd("game_attackairlw", pfushigisou_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pfushigisou/src/acmd/ground.rs b/fighters/pfushigisou/src/acmd/ground.rs index 8633a47876..9160749e8e 100644 --- a/fighters/pfushigisou/src/acmd/ground.rs +++ b/fighters/pfushigisou/src/acmd/ground.rs @@ -1,110 +1,108 @@ use super::*; -unsafe extern "C" fn pfushigisou_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 2.3, 0.0, 3.6, 12.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 6.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 2.3, 0.0, 3.6, 9.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 2.3, 0.0, 3.6, 12.5, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.8, 0.0, 3.6, 16.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn pfushigisou_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.6, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 3.6, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.6, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 3.0, 0.0, 3.6, 17.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pfusigisou_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.3, 5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.3, 5.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.7, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.7, 6.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 74, 57, 0, 80, 5.5, 0.0, 4.9, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 3.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 3.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 2.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 6.0, 2.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.2, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 73, 50, 0, 45, 4.0, 0.0, 5.2, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attack11", pfushigisou_attack_11_game) - .acmd("game_attack12", pfushigisou_attack_12_game) - .acmd("game_attackdash", pfusigisou_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pfushigisou/src/acmd/mod.rs b/fighters/pfushigisou/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/pfushigisou/src/acmd/mod.rs +++ b/fighters/pfushigisou/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pfushigisou/src/acmd/other.rs b/fighters/pfushigisou/src/acmd/other.rs index 402ec36688..ed6d259450 100644 --- a/fighters/pfushigisou/src/acmd/other.rs +++ b/fighters/pfushigisou/src/acmd/other.rs @@ -1,208 +1,206 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_f_left_l"), Hash40::new("se_pfushigisou_step_f_right_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_f_left_l"), Hash40::new("se_pfushigisou_step_f_right_l")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_b_left_l"), Hash40::new("se_pfushigisou_step_b_right_l")); - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_f_right_l"), Hash40::new("se_pfushigisou_step_f_left_l")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_b_left_l"), Hash40::new("se_pfushigisou_step_b_right_l")); + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_f_right_l"), Hash40::new("se_pfushigisou_step_f_left_l")); } frame(lua_state, 27.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_pfushigisou_step_b_right_m"), Hash40::new("se_pfushigisou_step_b_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_pfushigisou_step_b_right_m"), Hash40::new("se_pfushigisou_step_b_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pfushigisou/src/acmd/smashes.rs b/fighters/pfushigisou/src/acmd/smashes.rs index 2d2156a7e7..abbec567ba 100644 --- a/fighters/pfushigisou/src/acmd/smashes.rs +++ b/fighters/pfushigisou/src/acmd/smashes.rs @@ -1,135 +1,134 @@ use super::*; -unsafe extern "C" fn pfushigisou_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 361, 89, 0, 45, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 89, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("flower"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 13.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("flower"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 13.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 82, 72, 0, 73, 7.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn pfushigisou_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 0.750); + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 83, 0, 40, 5.0, 0.0, 3.5, 3.8, Some(0.0), Some(3.5), Some(-5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 2.3, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 3.0, -22.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 83, 0, 40, 5.0, 0.0, 3.5, 3.8, Some(0.0), Some(3.5), Some(-5.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner3"), 11.0, 34, 89, 0, 45, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 2.3, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 30, 83, 0, 50, 5.0, 0.0, 3.0, -22.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attacks4hi", pfushigisou_attack_s4_hi_game) - .acmd("game_attacks4", pfushigisou_attack_s4_s_game) - .acmd("game_attacks4lw", pfushigisou_attack_s4_lw_game) - .acmd("game_attackhi4", pfushigisou_attack_hi4_game) - .acmd("game_attacklw4", pfushigisou_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + } diff --git a/fighters/pfushigisou/src/acmd/specials.rs b/fighters/pfushigisou/src/acmd/specials.rs index bbcc41a7a3..68f95a2f7e 100644 --- a/fighters/pfushigisou/src/acmd/specials.rs +++ b/fighters/pfushigisou/src/acmd/specials.rs @@ -1,102 +1,100 @@ use super::*; -unsafe extern "C" fn pfushigisou_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_LEAFCUTTER, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } } -unsafe extern "C" fn pfushigisou_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_LEAFCUTTER, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.900); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.900); } frame(lua_state, 49.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } } -unsafe extern "C" fn pfushigisou_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_FLAG_SET_ANGLE); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 3.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.2, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 3.8, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_VINE, false, 0); ArticleModule::set_visibility_whole(boma, *FIGHTER_PFUSHIGISOU_GENERATE_ARTICLE_VINE, false, app::ArticleOperationTarget(0)); WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_SET_MAP_COLL_OFFSET); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PFUSHIGISOU_STATUS_SPECIAL_HI_FLAG_SET_ANGLE); - ATTACK(fighter, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("viner2"), 10.0, 50, 80, 0, 50, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("viner3"), 10.0, 50, 80, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("viner4"), 10.0, 50, 80, 0, 50, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("viner5"), 10.0, 50, 80, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("viner5"), 13.0, 50, 87, 0, 70, 5.5, 8.8, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_specials", pfushigisou_special_s_game) - .acmd("game_specialairs", pfushigisou_special_air_s_game) - .acmd("game_specialhi", pfushigisou_special_hi_game) - .acmd("game_specialairhi", pfushigisou_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/pfushigisou/src/acmd/throws.rs b/fighters/pfushigisou/src/acmd/throws.rs index a6fd4b5632..f1da1aa97b 100644 --- a/fighters/pfushigisou/src/acmd/throws.rs +++ b/fighters/pfushigisou/src/acmd/throws.rs @@ -1,78 +1,76 @@ use super::*; -unsafe extern "C" fn pfushigisou_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.923); + FT_MOTION_RATE(agent, 0.923); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(20.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 0.0, Some(0.0), Some(5.0), Some(20.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pfushigisou_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(19.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(19.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pfushigisou_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.8, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-22.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.8, 0.0, 5.0, -4.0, Some(0.0), Some(5.0), Some(-22.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_catch", pfushigisou_catch_game) - .acmd("game_catchdash", pfushigisou_catch_dash_game) - .acmd("game_catchturn", pfushigisou_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/pfushigisou/src/acmd/tilts.rs b/fighters/pfushigisou/src/acmd/tilts.rs index 2fcede0396..f9e70a828d 100644 --- a/fighters/pfushigisou/src/acmd/tilts.rs +++ b/fighters/pfushigisou/src/acmd/tilts.rs @@ -1,108 +1,106 @@ use super::*; -unsafe extern "C" fn pfushigisou_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 3.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 4.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.0, 0.0, 4.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 130, 20, 0, 15, 3.5, 0.0, 3.0, 16.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 3.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.5, 0.0, 4.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 20, 20, 0, 15, 4.0, 0.0, 4.5, 1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 130, 20, 0, 15, 3.5, 0.0, 3.0, 16.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 5.0, 0.0, 3.5, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 6.0, 0.0, 4.0, 6.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 136, 0, 55, 5.0, 0.0, 3.5, 17.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 88, 105, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 88, 105, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, -0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 9.0, 88, 105, 0, 40, 6.0, 1.4, -1.5, 0.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -7.0, Some(0.0), Some(4.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -2.5, Some(0.0), Some(4.0), Some(2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 105, 0, 40, 4.0, 0.0, 4.0, -2.5, Some(0.0), Some(4.0), Some(2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pfushigisou_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("vinel2"), 5.5, 30, 65, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("vinel3"), 5.5, 30, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.2, 22.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("vinel2"), 5.5, 30, 65, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("vinel3"), 5.5, 30, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.5, 100, 100, 0, 50, 4.5, 0.0, 3.2, 22.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .acmd("game_attacks3", pfushigisou_attack_s3_s_game) - .acmd("game_attackhi3", pfushigisou_attack_hi3_game) - .acmd("game_attacklw3", pfushigisou_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pfushigisou/src/lib.rs b/fighters/pfushigisou/src/lib.rs index b72753b9f1..e9c09d37c3 100644 --- a/fighters/pfushigisou/src/lib.rs +++ b/fighters/pfushigisou/src/lib.rs @@ -40,7 +40,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pfushigisou"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/pfushigisou/src/opff.rs b/fighters/pfushigisou/src/opff.rs index a02a0d7858..05f2de0c39 100644 --- a/fighters/pfushigisou/src/opff.rs +++ b/fighters/pfushigisou/src/opff.rs @@ -70,8 +70,6 @@ pub unsafe fn pfushigisou_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pfushigisou") - .on_line(Main, pfushigisou_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pfushigisou_frame_wrapper); } diff --git a/fighters/pfushigisou/src/status.rs b/fighters/pfushigisou/src/status.rs index 737a42f23e..2988605c87 100644 --- a/fighters/pfushigisou/src/status.rs +++ b/fighters/pfushigisou/src/status.rs @@ -13,8 +13,6 @@ unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) } -pub fn install() { - smashline::Agent::new("pfushigisou") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/plizardon/src/acmd/aerials.rs b/fighters/plizardon/src/acmd/aerials.rs index 508855e306..c26abb81ad 100644 --- a/fighters/plizardon/src/acmd/aerials.rs +++ b/fighters/plizardon/src/acmd/aerials.rs @@ -1,221 +1,219 @@ use super::*; -unsafe extern "C" fn plizardon_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("fire"), 11.0, 60, 90, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 9.0, 60, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 9.0, 60, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("fire"), 11.0, 60, 90, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 9.0, 60, 100, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 9.0, 60, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn plizardon_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("plizardon_atk_fire_air"), Hash40::new("fire"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("plizardon_atk_fire_air"), Hash40::new("fire"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("plizardon_atk_fire_air"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("plizardon_atk_fire_air"), false, false); } } -unsafe extern "C" fn plizardon_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 10.0, 361, 95, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 361, 95, 0, 35, 3.8, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 13.0, 361, 100, 0, 45, 4.7, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 10.0, 361, 95, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 361, 95, 0, 35, 3.8, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 13.0, 361, 100, 0, 45, 4.7, 7.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn plizardon_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 1, 0, 3.7, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 1, 0, 3.7, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("plizardon_scratch2_l"), Hash40::new("plizardon_scratch2_r"), Hash40::new("top"), 0, 10, 9, 40, 70, -90, 1.2, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 0.25, 2.0, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 10.0, 1.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 10.0, 1.0, 1.0); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("plizardon_scratch2_l"), Hash40::new("plizardon_scratch2_r"), Hash40::new("top"), 0, 10, 9, 40, 70, -90, 1.2, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 0.25, 2.0, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 10.0, 1.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_purple"), Hash40::new("havel"), 1.5, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 10.0, 1.0, 1.0); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } } -unsafe extern "C" fn plizardon_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, -18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 11.0, 361, 100, 0, 30, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail2"), 11.0, 361, 100, 0, 30, 4.0, 2.0, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 30, 4.0, 0.0, 1.0, -18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 11.0, 361, 100, 0, 30, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail2"), 11.0, 361, 100, 0, 30, 4.0, 2.0, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("hip"), 11.0, 361, 100, 0, 30, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, -0.5, -19.0, Some(0.0), Some(9.5), Some(-25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail4"), 14.0, 361, 100, 0, 30, 4.0, -1.3, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, -0.5, -19.0, Some(0.0), Some(9.5), Some(-25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail4"), 14.0, 361, 100, 0, 30, 4.0, -1.3, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, 9.5, -25.0, Some(0.0), Some(20.0), Some(-19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 30, 5.0, 0.0, 9.5, -25.0, Some(0.0), Some(20.0), Some(-19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn plizardon_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.800); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.800); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck2"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck2"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 6.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 7.0, -0.7, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("neck2"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("neck"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 6.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 85, 114, 0, 40, 7.0, -0.7, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("neck2"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("neck"), 10.0, 85, 114, 0, 40, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn plizardon_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn plizardon_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.750); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.750); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 90, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.0, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 270, 70, 0, 17, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 100, 0, 20, 4.5, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 100, 0, 20, 4.5, 0.0, -5.0, 0.0, Some(0.0), Some(-6.5), Some(0.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 5.5, 0.0, 3.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attackairn", plizardon_attack_air_n_game) - .acmd("effect_attackairn", plizardon_attack_air_n_effect) - .acmd("game_attackairf", plizardon_attack_air_f_game) - .acmd("effect_attackairf", plizardon_attack_air_f_effect) - .acmd("game_attackairb", plizardon_attack_air_b_game) - .acmd("game_attackairhi", plizardon_attack_air_hi_game) - .acmd("expression_attackairhi", plizardon_attack_air_hi_expression) - .acmd("game_attackairlw", plizardon_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/plizardon/src/acmd/ground.rs b/fighters/plizardon/src/acmd/ground.rs index 1ff386ce53..e27f785e63 100644 --- a/fighters/plizardon/src/acmd/ground.rs +++ b/fighters/plizardon/src/acmd/ground.rs @@ -1,15 +1,15 @@ use super::*; -unsafe extern "C" fn plizardon_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.4, 0.0, 8.0, 4.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.4, 0.0, 8.0, 8.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 180, 25, 0, 24, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.4, 0.0, 8.0, 4.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.4, 0.0, 8.0, 8.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 180, 25, 0, 24, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 2.6, 0.0, 8.0, 12.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); @@ -17,84 +17,82 @@ unsafe extern "C" fn plizardon_attack_11_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn plizardon_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(1.1, 0.0, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.8, 0.0, 8.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.8, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 3.2, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(15.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 30, 0, 20, 2.8, 0.0, 8.0, 5.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 361, 28, 0, 20, 2.8, 0.0, 8.0, 9.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 361, 25, 0, 20, 3.2, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(15.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn plizardon_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 130, 0, 60, 5.0, 0.0, 6.5, 6.5, Some(0.0), Some(6.5), Some(16.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 130, 0, 60, 5.0, 0.0, 6.5, 6.5, Some(0.0), Some(6.5), Some(16.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr5"), 5.0, 60, 130, 0, 60, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 13.0, 45, 44, 0, 102, 4.5, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 13.0, 55, 44, 0, 102, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 13.0, 45, 44, 0, 102, 4.5, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("trans"), 13.0, 55, 44, 0, 102, 4.0, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 10.0, 55, 27, 0, 98, 4.0, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 10.0, 70, 27, 0, 98, 3.5, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("trans"), 10.0, 55, 27, 0, 98, 4.0, 0.0, 7.7, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("trans"), 10.0, 70, 27, 0, 98, 3.5, 0.0, 7.7, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attack11", plizardon_attack_11_game) - .acmd("game_attack12", plizardon_attack_12_game) - .acmd("game_attack13", plizardon_attack_13_game) - .acmd("game_attackdash", plizardon_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/plizardon/src/acmd/mod.rs b/fighters/plizardon/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/plizardon/src/acmd/mod.rs +++ b/fighters/plizardon/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/plizardon/src/acmd/other.rs b/fighters/plizardon/src/acmd/other.rs index d0c557b13c..9cadc5647c 100644 --- a/fighters/plizardon/src/acmd/other.rs +++ b/fighters/plizardon/src/acmd/other.rs @@ -1,252 +1,250 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} } } -unsafe extern "C" fn plizardon_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 0, 80, 70, 0, 10.0, 0.0, 17.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_plizardon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_plizardon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_plizardon_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_plizardon_step_right_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_plizardon_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_plizardon_step_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_appeallwr", plizardon_appeal_lw_r_game) - .acmd("game_appeallwl", plizardon_appeal_lw_l_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("expression_landingheavy", expression_landingheavy) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("expression_landingheavy", expression_landingheavy); } diff --git a/fighters/plizardon/src/acmd/smashes.rs b/fighters/plizardon/src/acmd/smashes.rs index 0dbf53342f..9ccc1e2af0 100644 --- a/fighters/plizardon/src/acmd/smashes.rs +++ b/fighters/plizardon/src/acmd/smashes.rs @@ -1,138 +1,136 @@ use super::*; -unsafe extern "C" fn plizardon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("wingl2"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("wingl2"), *HIT_STATUS_XLU); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 10.0, Some(0.0), Some(5.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 3.5, Some(0.0), Some(5.0), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 14.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("trans"), 19.0, 45, 89, 0, 60, 6.0, 0.0, 5.0, 3.5, Some(0.0), Some(5.0), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 14.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("trans"), 16.4, 45, 89, 0, 60, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn plizardon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("top"), 5.0, 110, 100, 100, 0, 6.0, 0.0, 9.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); - ATTACK(fighter, 1, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 1.5, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingl2"), 5.0, 368, 100, 0, 0, 5.0, 3.5, -1.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 280, 100, 32, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("bust"), 5.0, 368, 100, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); + ATTACK(agent, 1, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 1.5, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingl2"), 5.0, 368, 100, 0, 0, 5.0, 3.5, -1.5, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 280, 100, 32, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("bust"), 5.0, 368, 100, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); let hit1 = Vector2f { x: 0.0, y: 18.0 }; AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &hit1, 8, false); AttackModule::set_vec_target_pos(boma, 2, smash::phx::Hash40::new("top"), &hit1, 8, false); AttackModule::set_vec_target_pos(boma, 4, smash::phx::Hash40::new("top"), &hit1, 8, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 320, 100, 42, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 320, 100, 42, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("wingl4"), 5.0, 340, 100, 60, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("wingl4"), 5.0, 340, 100, 60, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("wingl4"), 5.0, 368, 100, 0, 0, 4.2, 7.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); let hit2 = Vector2f { x: 0.0, y: 18.0 }; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &hit2, 8, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("wingr2"), 11.0, 83, 130, 0, 40, 5.5, 3.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("wingr4"), 11.0, 83, 130, 0, 40, 5.0, 2.7, -2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("wingr7"), 11.0, 83, 130, 0, 40, 4.5, 6.5, 0.0, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 11.0, 83, 130, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("wingr2"), 11.0, 83, 130, 0, 40, 5.5, 3.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("wingr4"), 11.0, 83, 130, 0, 40, 5.0, 2.7, -2.0, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("wingr7"), 11.0, 83, 130, 0, 40, 4.5, 6.5, 0.0, 6.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 11.0, 83, 130, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, 21.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 6.0, 0.0, 5.0, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 33, 85, 0, 40, 10.0, 0.0, 5.5, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attacks4", plizardon_attack_s4_s_game) - .acmd("game_attackhi4", plizardon_attack_hi4_game) - .acmd("game_attacklw4", plizardon_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/plizardon/src/acmd/specials.rs b/fighters/plizardon/src/acmd/specials.rs index 9e294b7d55..511c6dce06 100644 --- a/fighters/plizardon/src/acmd/specials.rs +++ b/fighters/plizardon/src/acmd/specials.rs @@ -1,57 +1,57 @@ use super::*; -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -69,7 +69,7 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -77,57 +77,57 @@ unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 100, 100, 120, 0, 5.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 100, 80, 0, 4.5, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 65, 100, 115, 0, 6.0, 0.0, 5.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 4.8, 0.0, 11.0, -0.5, Some(0.0), Some(7.0), Some(-2.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 2.8, 0.0, 10.0, 5.5, Some(0.0), Some(6.0), Some(4.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 100, 80, 0, 2.8, 0.0, 16.0, 2.0, Some(0.0), Some(14.0), Some(1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 100, 100, 0, 3.0, 0.0, 12.5, -4.5, Some(0.0), Some(8.5), Some(-6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 150, 0, 70, 10.0, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { sv_kinetic_energy!( reset_energy, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, @@ -145,7 +145,7 @@ unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0 @@ -153,9 +153,7 @@ unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/plizardon/src/acmd/throws.rs b/fighters/plizardon/src/acmd/throws.rs index ea28a08e1a..5737d8ebf7 100644 --- a/fighters/plizardon/src/acmd/throws.rs +++ b/fighters/plizardon/src/acmd/throws.rs @@ -1,70 +1,70 @@ use super::*; -unsafe extern "C" fn plizardon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn plizardon_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 6.0, 5.0, Some(0.0), Some(6.0), Some(15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 6.0, 5.0, Some(0.0), Some(6.0), Some(15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn plizardon_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 5.6, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 5.6, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn plizardon_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -99,11 +99,9 @@ unsafe extern "C" fn plizardon_throw_hi_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_catch", plizardon_catch_game) - .acmd("game_catchdash", plizardon_catch_dash_game) - .acmd("game_catchturn", plizardon_catch_turn_game) - .acmd("game_throwhi", plizardon_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/plizardon/src/acmd/tilts.rs b/fighters/plizardon/src/acmd/tilts.rs index 7075146a0d..3b88a4f6d9 100644 --- a/fighters/plizardon/src/acmd/tilts.rs +++ b/fighters/plizardon/src/acmd/tilts.rs @@ -1,188 +1,186 @@ use super::*; -unsafe extern "C" fn plizardon_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 8.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 3.0, 19.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 2.5, 16.700001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 3.0, 19.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 2.5, 16.700001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); - ATTACK(fighter, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("tail4"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 78, 90, 0, 50, 8.0, 0.0, 13.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 3.0, 0.0, 20.0, 3.0, Some(0.0), Some(27.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, 7.0, Some(0.0), Some(30.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, -1.0, Some(0.0), Some(30.0), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 78, 90, 0, 50, 8.0, 0.0, 13.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 3.0, 0.0, 20.0, 3.0, Some(0.0), Some(27.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, 7.0, Some(0.0), Some(30.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 84, 90, 0, 50, 4.0, 0.0, 30.0, -1.0, Some(0.0), Some(30.0), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 2); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn plizardon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 60, 0, 60, 5.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 80, 60, 0, 60, 4.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 60, 0, 60, 5.0, 0.0, 5.0, 7.0, Some(0.0), Some(5.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 80, 60, 0, 60, 4.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(22.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn plizardon_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 4, 3, 0, 10, 0, 1, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 0.7, 0.4, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 4, 3, 0, 10, 0, 1, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 0.7, 0.4, 0.9); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 4, 20, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.65); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 4, 20, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.65); } } -pub fn install() { - smashline::Agent::new("plizardon") - .acmd("game_attacks3hi", plizardon_attack_s3_hi_game) - .acmd("game_attacks3", plizardon_attack_s3_s_game) - .acmd("game_attacks3lw", plizardon_attack_s3_lw_game) - .acmd("game_attackhi3", plizardon_attack_hi3_game) - .acmd("expression_attackhi3", plizardon_attack_hi3_expression) - .acmd("game_attacklw3", plizardon_attack_lw3_game) - .acmd("effect_attacklw3", plizardon_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/plizardon/src/lib.rs b/fighters/plizardon/src/lib.rs index 7bb0378152..0f8d287bb3 100644 --- a/fighters/plizardon/src/lib.rs +++ b/fighters/plizardon/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("plizardon"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/plizardon/src/opff.rs b/fighters/plizardon/src/opff.rs index 331ede113c..e8b5b88f67 100644 --- a/fighters/plizardon/src/opff.rs +++ b/fighters/plizardon/src/opff.rs @@ -99,8 +99,6 @@ pub unsafe fn plizardon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("plizardon") - .on_line(Main, plizardon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, plizardon_frame_wrapper); } diff --git a/fighters/plizardon/src/status.rs b/fighters/plizardon/src/status.rs index 1216eeeddd..2f49f8b895 100644 --- a/fighters/plizardon/src/status.rs +++ b/fighters/plizardon/src/status.rs @@ -37,10 +37,9 @@ unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) } -pub fn install() { - smashline::Agent::new("plizardon") - .on_start(plizardon_init) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(plizardon_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.install(); + special_s::install(agent); } diff --git a/fighters/plizardon/src/status/special_s.rs b/fighters/plizardon/src/status/special_s.rs index fda31ae795..46954650ab 100644 --- a/fighters/plizardon/src/status/special_s.rs +++ b/fighters/plizardon/src/status/special_s.rs @@ -8,8 +8,6 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("plizardon") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); } diff --git a/fighters/pzenigame/src/acmd/aerials.rs b/fighters/pzenigame/src/acmd/aerials.rs index ba977de86e..1873d33c28 100644 --- a/fighters/pzenigame/src/acmd/aerials.rs +++ b/fighters/pzenigame/src/acmd/aerials.rs @@ -1,170 +1,168 @@ use super::*; -unsafe extern "C" fn pzenigame_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.850); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.850); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 11.0, 35, 90, 0, 32, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("bust"), 11.0, 35, 90, 0, 32, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 361, 90, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 361, 90, 0, 35, 6.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pzenigame_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 4.0, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 4.0, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 48, 96, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 7.5, Some(0.0), Some(5.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 48, 94, 0, 50, 3.5, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pzenigame_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 80, 0, 35, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -5.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 65, 15, 0, 60, 4.2, 0.0, 5.0, -9.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 5.8, 0.0, 5.0, -5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 6.0, 0.0, 5.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 5.8, 0.0, 5.0, -5.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 40, 115, 0, 55, 6.0, 0.0, 5.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pzenigame_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn pzenigame_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 4.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 7.0, 60, 110, 0, 45, 3.5, -2.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 3.5, -2.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 4.5, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 7.0, 65, 110, 0, 45, 3.5, -2.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn pzenigame_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn pzenigame_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.2, 0.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.4, 0.0, -1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.6, 0.0, -4.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.2, 0.0, 1.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.4, 0.0, -1.5, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 0, 35, 4.6, 0.0, -4.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 6.0, 0.0, -4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 50, 90, 0, 50, 6.0, 0.0, -4.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attackairn", pzenigame_attack_air_n_game) - .acmd("game_attackairf", pzenigame_attack_air_f_game) - .acmd("game_attackairb", pzenigame_attack_air_b_game) - .acmd("game_landingairb", pzenigame_landing_air_b_game) - .acmd("game_attackairhi", pzenigame_attack_air_hi_game) - .acmd("expression_attackairhi", pzenigame_attack_air_hi_expression) - .acmd("game_attackairlw", pzenigame_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pzenigame/src/acmd/ground.rs b/fighters/pzenigame/src/acmd/ground.rs index 9110961a02..759f1f9817 100644 --- a/fighters/pzenigame/src/acmd/ground.rs +++ b/fighters/pzenigame/src/acmd/ground.rs @@ -1,91 +1,89 @@ use super::*; -unsafe extern "C" fn pzenigame_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.5, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.8, 0.0, 5.0, 7.2, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.5, 0.0, 5.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 20, 0, 25, 1.8, 0.0, 5.0, 7.2, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 180, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 20, 2.2, 0.0, 5.0, 9.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn pzenigame_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.2, -1.5, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.5, 1.2, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 1.5, 361, 20, 0, 25, 2.8, 4.0, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.2, -1.5, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 361, 25, 0, 25, 2.5, 1.2, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 1.5, 361, 20, 0, 25, 2.8, 4.0, -0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn pzenigame_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.2, -1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.5, 1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.8, 5.0, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.2, -1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.5, 1.5, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 4.0, 361, 110, 0, 40, 3.8, 5.0, 2.0, 0.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_TAIL); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pzenigame_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 45, 4.2, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.45); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 100, 0, 45, 4.2, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.45); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.83); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 66, 45, 0, 70, 3.5, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 66, 45, 0, 70, 3.5, 0.0, 5.5, 2.0, Some(0.0), Some(5.5), Some(3.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attack11", pzenigame_attack_11_game) - .acmd("game_attack12", pzenigame_attack_12_game) - .acmd("game_attack13", pzenigame_attack_13_game) - .acmd("game_attackdash", pzenigame_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pzenigame/src/acmd/mod.rs b/fighters/pzenigame/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/pzenigame/src/acmd/mod.rs +++ b/fighters/pzenigame/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/pzenigame/src/acmd/other.rs b/fighters/pzenigame/src/acmd/other.rs index d717ec8b2c..e9dcb61fe7 100644 --- a/fighters/pzenigame/src/acmd/other.rs +++ b/fighters/pzenigame/src/acmd/other.rs @@ -1,122 +1,122 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -132,17 +132,17 @@ unsafe extern "C" fn dash_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn runbrake_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbrake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -155,7 +155,7 @@ unsafe extern "C" fn runbrake_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn runbrakel_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbrakel(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -168,7 +168,7 @@ unsafe extern "C" fn runbrakel_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn runbraker_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_runbraker(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -181,7 +181,7 @@ unsafe extern "C" fn runbraker_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turnrun_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_turnrun(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -202,7 +202,7 @@ unsafe extern "C" fn turnrun_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turnrunbrake_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_turnrunbrake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -211,50 +211,48 @@ unsafe extern "C" fn turnrunbrake_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("effect_dash", dash_effect) - .acmd("sound_dash", dash_sound) - .acmd("effect_runbrake", runbrake_effect) - .acmd("effect_runbrakel", runbrakel_effect) - .acmd("effect_runbraker", runbraker_effect) - .acmd("effect_turnrun", turnrun_effect) - .acmd("effect_turnrunbrake", turnrunbrake_effect) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("effect_dash", effect_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("effect_runbrake", effect_runbrake); + agent.acmd("effect_runbrakel", effect_runbrakel); + agent.acmd("effect_runbraker", effect_runbraker); + agent.acmd("effect_turnrun", effect_turnrun); + agent.acmd("effect_turnrunbrake", effect_turnrunbrake); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pzenigame/src/acmd/smashes.rs b/fighters/pzenigame/src/acmd/smashes.rs index d22764709a..f82c342b3a 100644 --- a/fighters/pzenigame/src/acmd/smashes.rs +++ b/fighters/pzenigame/src/acmd/smashes.rs @@ -1,122 +1,120 @@ use super::*; -unsafe extern "C" fn pzenigame_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } } -unsafe extern "C" fn pzenigame_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } } -unsafe extern "C" fn pzenigame_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 3.5, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 3.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 2.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 3.5, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 3.2, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 2.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); } } -unsafe extern "C" fn pzenigame_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.600); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.600); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.2, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.0, 0.0, 3.8, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.8, 0.0, 3.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.5, 0.0, 3.2, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.2, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 4.0, 0.0, 3.8, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.8, 0.0, 3.5, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 28, 83, 0, 50, 3.5, 0.0, 3.2, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.2, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.0, 0.0, 3.8, -10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.8, 0.0, 3.5, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.5, 0.0, 3.2, -19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.2, 0.0, 4.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 4.0, 0.0, 3.8, -10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.8, 0.0, 3.5, -15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 28, 78, 0, 50, 3.5, 0.0, 3.2, -19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attacks4hi", pzenigame_attack_s4_hi_game) - .acmd("game_attacks4", pzenigame_attack_s4_s_game) - .acmd("game_attacks4lw", pzenigame_attack_s4_lw_game) - .acmd("game_attacklw4", pzenigame_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pzenigame/src/acmd/specials.rs b/fighters/pzenigame/src/acmd/specials.rs index 4e80ceba8b..6d831522b0 100644 --- a/fighters/pzenigame/src/acmd/specials.rs +++ b/fighters/pzenigame/src/acmd/specials.rs @@ -1,91 +1,89 @@ use super::*; -unsafe extern "C" fn pzenigame_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 24.0/(43.0-9.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + FT_MOTION_RATE(agent, 24.0/(43.0-9.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } frame(lua_state, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn pzenigame_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 24.0/(43.0-9.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + FT_MOTION_RATE(agent, 24.0/(43.0-9.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 40, 0, 9.0, 0.0, 1.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } frame(lua_state, 18.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 117, 0, 60, 10.0, 0.0, 1.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_specialhi", pzenigame_special_hi_game) - .acmd("game_specialairhi", pzenigame_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/pzenigame/src/acmd/throws.rs b/fighters/pzenigame/src/acmd/throws.rs index c7a031a55a..825b0e9aae 100644 --- a/fighters/pzenigame/src/acmd/throws.rs +++ b/fighters/pzenigame/src/acmd/throws.rs @@ -1,74 +1,72 @@ use super::*; -unsafe extern "C" fn pzenigame_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pzenigame_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn pzenigame_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.1, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.1, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-14.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_catch", pzenigame_catch_game) - .acmd("game_catchdash", pzenigame_catch_dash_game) - .acmd("game_catchturn", pzenigame_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } diff --git a/fighters/pzenigame/src/acmd/tilts.rs b/fighters/pzenigame/src/acmd/tilts.rs index 99361804a8..00515bb24e 100644 --- a/fighters/pzenigame/src/acmd/tilts.rs +++ b/fighters/pzenigame/src/acmd/tilts.rs @@ -1,124 +1,122 @@ use super::*; -unsafe extern "C" fn pzenigame_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn pzenigame_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn pzenigame_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("tail2"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("tail2"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(fighter, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("tail1"), 6.0, 361, 100, 0, 20, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 1, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 3.0, 0.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + ATTACK(agent, 2, 0, Hash40::new("tail2"), 6.0, 361, 100, 0, 20, 4.0, 4.2, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn pzenigame_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 6.0, 88, 90, 0, 50, 5.0, 1.7, 0.7, 0.7, Some(1.7), Some(0.7), Some(0.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 6.0, 88, 90, 0, 50, 5.2, 1.7, 1.2, 1.2, Some(1.7), Some(1.2), Some(1.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 88, 90, 0, 50, 4.0, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 6.0, 88, 90, 0, 50, 5.0, 1.7, 0.7, 0.7, Some(1.7), Some(0.7), Some(0.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 6.0, 88, 90, 0, 50, 5.2, 1.7, 1.2, 1.2, Some(1.7), Some(1.2), Some(1.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 88, 90, 0, 50, 4.0, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn pzenigame_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 3.5, 0.0, 3.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 2.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 3.5, 0.0, 3.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.0, 0.0, 3.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 2.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 38, 75, 0, 53, 4.5, 0.0, 3.4, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_WATER); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .acmd("game_attacks3hi", pzenigame_attack_s3_hi_game) - .acmd("game_attacks3", pzenigame_attack_s3_s_game) - .acmd("game_attacks3lw", pzenigame_attack_s3_lw_game) - .acmd("game_attackhi3", pzenigame_attack_hi3_game) - .acmd("game_attacklw3", pzenigame_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pzenigame/src/lib.rs b/fighters/pzenigame/src/lib.rs index 7bb0378152..68790d9a57 100644 --- a/fighters/pzenigame/src/lib.rs +++ b/fighters/pzenigame/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("pzenigame"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/pzenigame/src/opff.rs b/fighters/pzenigame/src/opff.rs index 97ad7f0699..230b50cfb2 100644 --- a/fighters/pzenigame/src/opff.rs +++ b/fighters/pzenigame/src/opff.rs @@ -106,8 +106,6 @@ pub unsafe fn pzenigame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("pzenigame") - .on_line(Main, pzenigame_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pzenigame_frame_wrapper); } diff --git a/fighters/pzenigame/src/status.rs b/fighters/pzenigame/src/status.rs index 4e99adcd09..a3f83c9921 100644 --- a/fighters/pzenigame/src/status.rs +++ b/fighters/pzenigame/src/status.rs @@ -21,14 +21,8 @@ unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) } -pub fn install() { - smashline::Agent::new("pzenigame") - .status(End, *FIGHTER_STATUS_KIND_RUN, end_run) - .status( - Main, - *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP, - pzenigame_special_s_loop_main, - ) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_RUN, end_run); + agent.status(Main,*FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP,pzenigame_special_s_loop_main); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } From 8b4e3787c21eff17de115b40fd7487205ec68a71 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 20:52:04 -0400 Subject: [PATCH 089/172] My nightmare pt2 (sorry if i fucked this up) --- fighters/tantan/src/acmd/aerials.rs | 532 +++++++------ fighters/tantan/src/acmd/ground.rs | 110 ++- fighters/tantan/src/acmd/mod.rs | 16 +- fighters/tantan/src/acmd/other.rs | 711 +++--------------- fighters/tantan/src/acmd/smashes.rs | 269 ++++--- fighters/tantan/src/acmd/specials.rs | 265 ++++--- fighters/tantan/src/acmd/throws.rs | 92 ++- fighters/tantan/src/acmd/tilts.rs | 306 ++++---- fighters/tantan/src/lib.rs | 8 +- fighters/tantan/src/opff.rs | 14 +- fighters/tantan/src/status.rs | 116 +-- fighters/tantan/src/tantan_beam/acmd.rs | 7 + .../tantan/src/tantan_beam/acmd/special.rs | 44 ++ fighters/tantan/src/tantan_beam/mod.rs | 9 + fighters/tantan/src/tantan_punch1/acmd.rs | 7 + .../tantan/src/tantan_punch1/acmd/special.rs | 185 +++++ fighters/tantan/src/tantan_punch1/mod.rs | 9 + fighters/tantan/src/tantan_punch2/acmd.rs | 7 + .../tantan/src/tantan_punch2/acmd/special.rs | 104 +++ fighters/tantan/src/tantan_punch2/mod.rs | 9 + fighters/tantan/src/tantan_punch3/acmd.rs | 7 + .../tantan/src/tantan_punch3/acmd/special.rs | 120 +++ fighters/tantan/src/tantan_punch3/mod.rs | 9 + fighters/tantan/src/tantan_ring/acmd.rs | 7 + .../tantan/src/tantan_ring/acmd/special.rs | 53 ++ fighters/tantan/src/tantan_ring/mod.rs | 9 + 26 files changed, 1504 insertions(+), 1521 deletions(-) create mode 100644 fighters/tantan/src/tantan_beam/acmd.rs create mode 100644 fighters/tantan/src/tantan_beam/acmd/special.rs create mode 100644 fighters/tantan/src/tantan_beam/mod.rs create mode 100644 fighters/tantan/src/tantan_punch1/acmd.rs create mode 100644 fighters/tantan/src/tantan_punch1/acmd/special.rs create mode 100644 fighters/tantan/src/tantan_punch1/mod.rs create mode 100644 fighters/tantan/src/tantan_punch2/acmd.rs create mode 100644 fighters/tantan/src/tantan_punch2/acmd/special.rs create mode 100644 fighters/tantan/src/tantan_punch2/mod.rs create mode 100644 fighters/tantan/src/tantan_punch3/acmd.rs create mode 100644 fighters/tantan/src/tantan_punch3/acmd/special.rs create mode 100644 fighters/tantan/src/tantan_punch3/mod.rs create mode 100644 fighters/tantan/src/tantan_ring/acmd.rs create mode 100644 fighters/tantan/src/tantan_ring/acmd/special.rs create mode 100644 fighters/tantan/src/tantan_ring/mod.rs diff --git a/fighters/tantan/src/acmd/aerials.rs b/fighters/tantan/src/acmd/aerials.rs index e067dc71ac..3987c73370 100644 --- a/fighters/tantan/src/acmd/aerials.rs +++ b/fighters/tantan/src/acmd/aerials.rs @@ -1,442 +1,440 @@ use super::*; -unsafe extern "C" fn tantan_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn tantan_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.571); + FT_MOTION_RATE(agent, 0.571); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 2, false); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 41.0, 14.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 41.0, 14.0); frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); } } -unsafe extern "C" fn tantan_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackair_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackair_l01")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_smash_h01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_smash_h01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); } } -unsafe extern "C" fn tantan_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn tantan_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn tantan_attack_air_n_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - FT_MOTION_RATE(fighter, 3.0/(3.0-1.0)); - frame(fighter.lua_state_agent, 3.0); - FT_MOTION_RATE(fighter, 1.0); - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.4, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.25, 361, 67, 0, 37, 2.75, -1.5, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - AttackModule::clear_all(fighter.module_accessor); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); + frame(agent.lua_state_agent, 3.0); + FT_MOTION_RATE(agent, 1.0); + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(agent.lua_state_agent, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.4, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.25, 361, 67, 0, 37, 2.75, -1.5, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(agent.lua_state_agent, 16.0); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + AttackModule::clear_all(agent.module_accessor); } } -unsafe extern "C" fn tantan_attack_air_n_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.7, -8, -10, 0, 0, 1.1, false); //LAST_EFFECT_SET_RATE(fighter, 1.5); - let lr = PostureModule::lr(fighter.module_accessor); - if is_excute(fighter) { + let lr = PostureModule::lr(agent.module_accessor); + if is_excute(agent) { if(lr>=0.0){ - EFFECT_FLW_POS(fighter, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), 1, -1.75, 0, 13, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter, 3, 1.2, 0.5); + EFFECT_FLW_POS(agent, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), 1, -1.75, 0, 13, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent, 3, 1.2, 0.5); } else{ - EFFECT_FLW_POS(fighter, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), -1, 1.75, 0, 13, 0, 0, 0.9, true); - LAST_EFFECT_SET_COLOR(fighter, 3, 1.2, 0.5); + EFFECT_FLW_POS(agent, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), -1, 1.75, 0, 13, 0, 0, 0.9, true); + LAST_EFFECT_SET_COLOR(agent, 3, 1.2, 0.5); } } } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7.5, 8.0, 0, 0, 0, 0.9, true, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.3); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7.5, 8.0, 0, 0, 0, 0.9, true, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.3); //EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_speedline"), true, true); } } -unsafe extern "C" fn tantan_attack_air_n_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("vc_tantan_attack02")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); } } -unsafe extern "C" fn tantan_attack_air_n_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_n_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairn(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_landing_air_n_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn sound_landingairn(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_n_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); +unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn tantan_attack_air_f_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(fighter.lua_state_agent, 10.0); - FT_MOTION_RATE(fighter, 1.0/(12.0-10.0)); - frame(fighter.lua_state_agent, 12.0); - FT_MOTION_RATE(fighter, 1.0); - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 13.75, 361, 100, 0, 25, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(agent.lua_state_agent, 10.0); + FT_MOTION_RATE(agent, 1.0/(12.0-10.0)); + frame(agent.lua_state_agent, 12.0); + FT_MOTION_RATE(agent, 1.0); + frame(agent.lua_state_agent, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 13.75, 361, 100, 0, 25, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(fighter.lua_state_agent, 16.0); - if is_excute(fighter) { + frame(agent.lua_state_agent, 16.0); + if is_excute(agent) { //Sweetspot ground spike// - ATTACK(fighter, 0, 0, Hash40::new("footl"), 15.0, 274, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 274, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Sweetspot semispike// - ATTACK(fighter, 2, 0, Hash40::new("footl"), 15.0, 1, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 15.0, 1, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, -1.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, -1.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + wait(agent.lua_state_agent, 3.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } - frame(fighter.lua_state_agent, 45.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + frame(agent.lua_state_agent, 45.0); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_f_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 10.5, 2.0, 180, -150 , 90, 0.83, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 10.5, 2.0, 180, -150 , 90, 0.83, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); - LAST_EFFECT_SET_RATE(fighter, 2); + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); + LAST_EFFECT_SET_RATE(agent, 2); } } -unsafe extern "C" fn tantan_attack_air_f_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("se_tantan_swing_s01")); - PLAY_SE(fighter, Hash40::new("se_common_swing_09")); + PLAY_SE(agent, Hash40::new("se_common_swing_09")); } - frame(fighter.lua_state_agent, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); + frame(agent.lua_state_agent, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); if (app::sv_math::rand(hash40("fighter"), 3) == 0) { - PLAY_SE(fighter, Hash40::new("vc_tantan_punch_03")); + PLAY_SE(agent, Hash40::new("vc_tantan_punch_03")); } } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_swing_l01")); + frame(agent.lua_state_agent, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } } -unsafe extern "C" fn tantan_attack_air_f_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 11.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(agent.lua_state_agent, 15.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_f_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { +unsafe extern "C" fn effect_landingairf(agent: &mut L2CAgentBase) { + if is_excute(agent) { //LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_landing_air_f_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn sound_landingairf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 3.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_f_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn tantan_attack_air_b_game(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.5, 42, 98, 0, 42, 3.75, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.5, 42, 98, 0, 42, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.5, 42, 98, 0, 42, 3.75, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.5, 42, 98, 0, 42, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + wait(agent.lua_state_agent, 3.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } - frame(fighter.lua_state_agent, 31.0); - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + frame(agent.lua_state_agent, 31.0); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_attack_air_b_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 8.1, -6, -151, 47, 2.9, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 8.1, -6, -151, 47, 2.9, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.5); //EffectModule::enable_sync_init_pos_last(fighter.module_accessor); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11.5, -14, 0, 0, 0, 0.9, false, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.3); + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11.5, -14, 0, 0, 0, 0.9, false, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.3); } } -unsafe extern "C" fn tantan_attack_air_b_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackair_h01")); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackair_h01")); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { if (app::sv_math::rand(hash40("fighter"), 3) == 0) { - PLAY_SE(fighter, Hash40::new("vc_tantan_punch_04")); + PLAY_SE(agent, Hash40::new("vc_tantan_punch_04")); } } } -unsafe extern "C" fn tantan_attack_air_b_expression(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 6.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn tantan_landing_air_b_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_landingairb(agent: &mut L2CAgentBase) { + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_landing_air_b_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); +unsafe extern "C" fn sound_landingairb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 3.0); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_landing_air_b_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_landingairb(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackairhi", tantan_attack_air_hi_game) - .acmd("expression_attackairhi", tantan_attack_air_hi_expression) - .acmd("game_attackairlw", tantan_attack_air_lw_game) - .acmd("effect_attackairlw", tantan_attack_air_lw_effect) - .acmd("sound_attackairlw", tantan_attack_air_lw_sound) - .acmd("game_landingairlw", tantan_landing_air_lw_game) - .acmd("expression_landingairlw", tantan_landing_air_lw_expression) - .acmd("game_attackairn", tantan_attack_air_n_game) - .acmd("effect_attackairn", tantan_attack_air_n_effect) - .acmd("sound_attackairn", tantan_attack_air_n_sound) - .acmd("expression_attackairn", tantan_attack_air_n_expression) - .acmd("effect_landingairn", tantan_landing_air_n_effect) - .acmd("sound_landingairn", tantan_landing_air_n_sound) - .acmd("expression_landingairn", tantan_landing_air_n_expression) - .acmd("game_attackairf", tantan_attack_air_f_game) - .acmd("effect_attackairf", tantan_attack_air_f_effect) - .acmd("sound_attackairf", tantan_attack_air_f_sound) - .acmd("expression_attackairf", tantan_attack_air_f_expression) - .acmd("effect_landingairf", tantan_landing_air_f_effect) - .acmd("sound_landingairf", tantan_landing_air_f_sound) - .acmd("expression_landingairf", tantan_landing_air_f_expression) - .acmd("game_attackairb", tantan_attack_air_b_game) - .acmd("effect_attackairb", tantan_attack_air_b_effect) - .acmd("sound_attackairb", tantan_attack_air_b_sound) - .acmd("expression_attackairb", tantan_attack_air_b_expression) - .acmd("effect_landingairb", tantan_landing_air_b_effect) - .acmd("sound_landingairb", tantan_landing_air_b_sound) - .acmd("expression_landingairb", tantan_landing_air_b_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("effect_landingairn", effect_landingairn); + agent.acmd("sound_landingairn", sound_landingairn); + agent.acmd("expression_landingairn", expression_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("effect_landingairf", effect_landingairf); + agent.acmd("sound_landingairf", sound_landingairf); + agent.acmd("expression_landingairf", expression_landingairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("effect_landingairb", effect_landingairb); + agent.acmd("sound_landingairb", sound_landingairb); + agent.acmd("expression_landingairb", expression_landingairb); } diff --git a/fighters/tantan/src/acmd/ground.rs b/fighters/tantan/src/acmd/ground.rs index 73b5a91c9f..2b526e9f31 100644 --- a/fighters/tantan/src/acmd/ground.rs +++ b/fighters/tantan/src/acmd/ground.rs @@ -1,24 +1,24 @@ use super::*; -unsafe extern "C" fn tantan_attack_attack11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.5); } - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 0.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 3.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 2.75, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 6.5, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 0.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 2.7, 361, 35, 0, 10, 3.0, 3.25, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 2.75, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.7, 361, 35, 0, 10, 3.0, 6.5, 0.0, 0.0, None,None,None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.7, 361, 16, 0, 31, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.7, 361, 16, 0, 31, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); @@ -27,104 +27,102 @@ unsafe extern "C" fn tantan_attack_attack11_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 4, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn tantan_attack_attack12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 4.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 60, 40, 0, 15, 3.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4, 80, 40, 0, 15, 4.0, 0.0, 4.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4, 93, 40, 0, 15, 4.0, 0.0, 4.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 60, 40, 0, 15, 3.5, 0.0, 4.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 80, 40, 0, 15, 4.0, 0.0, 4.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 93, 40, 0, 15, 4.0, 0.0, 4.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn tantan_attack_attack13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(13.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 5.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(13.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 361, 90, 0, 60, 5.5, 0.0, 9.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.98 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 6.5, 9.0, 1.5); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 40, 50, 0, 81, 4.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 40, 50, 0, 81, 4.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 40, 50, 0, 81, 4.0, 0.0, 0.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.0, 40, 80, 0, 55, 4.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 40, 80, 0, 55, 4.0, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 40, 80, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 2.9, 7.2, 7.2); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attack11", tantan_attack_attack11_game) - .acmd("game_attack12", tantan_attack_attack12_game) - .acmd("game_attack13", tantan_attack_attack13_game) - .acmd("game_attackdash", tantan_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/tantan/src/acmd/mod.rs b/fighters/tantan/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/tantan/src/acmd/mod.rs +++ b/fighters/tantan/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/tantan/src/acmd/other.rs b/fighters/tantan/src/acmd/other.rs index a2bb0fdede..0d37520d23 100644 --- a/fighters/tantan/src/acmd/other.rs +++ b/fighters/tantan/src/acmd/other.rs @@ -1,752 +1,223 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); + PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_tantan_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn effect_attacklegsjumpaerial(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklegsjumpaerialb(agent: &mut L2CAgentBase) { } - //Ram Ram attacks// -unsafe extern "C" fn ramram_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; - let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; - frame(lua_state, reboundFrame); - //Rebound hitbox - if is_excute(fighter) { - if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ramram_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ramram_game_attacklonghold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -//Fly controls when RamRam gets sent outwards - -unsafe extern "C" fn ramram_game_attackfly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - //Rebound hitbox - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} -//Fire ramram - -unsafe extern "C" fn ramram_game_attacks4fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - //Scoop for the first few frames, then send back and down - frame(lua_state, 1.0); - if is_excute(fighter) { - //Rebound hitbox - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - frame(lua_state, 14.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn megawatt_game_attacklonghold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - frame(lua_state, 14.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn arm_attack_end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackshortendr1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 8.0); if (armType==2) && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND) { - VarModule::on_flag(fighter.battle_object, vars::tantan::status::ARMS_ATTACK_CANCEL); - } -} - -unsafe extern "C" fn dragon_game_attackshort(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_game_attacklong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - frame(lua_state, 7.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; - frame(lua_state, clearFrame); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_game_attackdragonshootlong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } - } - //Dragon Beam linker - frame(lua_state, 6.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; - let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; - let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; - let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; - ATTACK(fighter, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); - - } - } - frame(lua_state, 9.0); - if is_excute(fighter) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - AttackModule::set_power(boma, 0,16.0, false); - } - } - frame(lua_state, 15.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_effect_attackdragonshootlong(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); - LAST_EFFECT_SET_COLOR(fighter,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); - EffectModule::enable_sync_init_pos_last(boma); - } -} - -unsafe extern "C" fn dragon_special_hi_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); - STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); - } - frame(lua_state, 2.0); - if is_excute(agent) { - let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; - PLAY_SE(agent, sfx); - } -} - -unsafe extern "C" fn dragonbeam_game_shoot(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let damage = if is_dragonized {9.0} else {6.0}; - let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - let range = if is_dragonized {30.0} else {25.0}; - let size = if is_dragonized {2.8} else {1.3}; - - ATTACK(fighter, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::disable_tip(boma); - } -} - -unsafe extern "C" fn dragonbeam_effect_beam(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; - let offset = if is_dragonized {-1.0} else {-2.5}; - EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); - } -} - -pub fn install() { - smashline::Agent::new("tantan_punch2") - .acmd("game_attackshort", megawatt_game_attackshort) - .acmd("game_attacklong", megawatt_game_attacklong) - .acmd("game_attacklonghold", megawatt_game_attacklonghold) - .install(); - smashline::Agent::new("tantan_beam") - .acmd("game_shoot", dragonbeam_game_shoot) - .acmd("game_bigshoot", dragonbeam_game_shoot) - .acmd("effect_beam", dragonbeam_effect_beam) - .acmd("effect_bigbeam", dragonbeam_effect_beam) - .install(); - smashline::Agent::new("tantan_punch3") - .acmd("game_attackshort", ramram_game_attackshort) - .acmd("game_attacklong", ramram_game_attacklong) - .acmd("game_attacklonghold", ramram_game_attacklonghold) - .install(); - smashline::Agent::new("tantan_punch1") - .acmd("game_attackshort", dragon_game_attackshort) - .acmd("game_attacklong", dragon_game_attacklong) - .acmd( - "game_attackdragonshootlong", - dragon_game_attackdragonshootlong, - ) - .acmd( - "effect_attackdragonshootlong", - dragon_effect_attackdragonshootlong, - ) - .acmd("game_specialairhiattack", dragon_special_hi_attack_game) - .acmd( - "game_specialairhiattackdragon", - dragon_special_hi_attack_game, - ) - .acmd("sound_attackbeamloop", dragon_sound_attackbeamloop) - .install(); - smashline::Agent::new("tantan_ring") - .acmd("game_attackfly", ramram_game_attackfly) - .acmd("game_attacks4fly", ramram_game_attacks4fly) - .install(); - smashline::Agent::new("tantan") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_attacklegsjumpaerialf", effect_attacklegsjumpaerial) - .acmd("effect_attacklegsjumpaerialb", effect_attacklegsjumpaerial) - .acmd("game_attackshortendr1", arm_attack_end) - .acmd("game_attackshortendrb1", arm_attack_end) - .acmd("game_attackshortendrb3", arm_attack_end) - .acmd("game_attacklongendr1", arm_attack_end) - .acmd("game_attacklongendrb1", arm_attack_end) - .acmd("game_attacklongendrb3", arm_attack_end) - .install(); + VarModule::on_flag(agent.battle_object, vars::tantan::status::ARMS_ATTACK_CANCEL); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_attacklegsjumpaerialf", effect_attacklegsjumpaerialb); + agent.acmd("effect_attacklegsjumpaerialb", effect_attacklegsjumpaerialb); + agent.acmd("game_attackshortendr1", game_attackshortendr1); + agent.acmd("game_attackshortendrb1", game_attackshortendr1); + agent.acmd("game_attackshortendrb3", game_attackshortendr1); + agent.acmd("game_attacklongendr1", game_attackshortendr1); + agent.acmd("game_attacklongendrb1", game_attackshortendr1); + agent.acmd("game_attacklongendrb3", game_attackshortendr1); } diff --git a/fighters/tantan/src/acmd/smashes.rs b/fighters/tantan/src/acmd/smashes.rs index 76cb5383ff..19312266c0 100644 --- a/fighters/tantan/src/acmd/smashes.rs +++ b/fighters/tantan/src/acmd/smashes.rs @@ -1,86 +1,86 @@ use super::*; -unsafe extern "C" fn tantan_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 4.0/(6.0-4.0)); + FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut is_dragonized = false; let mut is_doubledragon = false; let mut damage = 11.0; @@ -88,29 +88,29 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { let mut ranges = [18.0,22.0,25.0,29.0,31.0]; let mut size = 1.3; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 8.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 8.0, 5.0); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 4.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - FT_MOTION_RATE_RANGE(fighter, 16.0, 18.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 18.0, 7.0); } } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); if (is_doubledragon && is_dragonized) { damage = 17.5; @@ -118,7 +118,7 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { ranges = [10.0,20.0,27.0,34.0,41.0]; size = 5.0; - ATTACK(fighter, 0, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, 6.0, 0.0, 0.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, 6.0, 0.0, 0.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else if is_dragonized { damage = 15.0; @@ -135,103 +135,103 @@ unsafe extern "C" fn tantan_attack_s4_game(fighter: &mut L2CAgentBase) { for i in 0..5{ range = ranges[i]; if (is_doubledragon && is_dragonized) { - ATTACK(fighter, 1, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, size, 0.0, 0.0, -range, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("throw"), damage, 361, 75, 0, 60, size, 0.0, 0.0, -range, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else{ - ATTACK(fighter, 2, 0, Hash40::new("pl1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("pl1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); if is_doubledragon { - ATTACK(fighter, 3, 0, Hash40::new("pr1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("pr1_gimmickc"), damage, 361, 75, 0, 60, size*1.2, 0.0, 0.0, 0.0, Some(range), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } AttackModule::disable_tip(boma); wait(lua_state, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { if !(is_doubledragon && is_dragonized) { AttackModule::clear(boma,2,false); AttackModule::clear(boma,3,false); } } frame(lua_state, 26.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - FT_MOTION_RATE_RANGE(fighter, 39.0, 48.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 39.0, 48.0, 16.0); frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn tantan_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut effect_l: u64 = 0; let mut effect_r: u64 = 0; let mut is_dragonized = false; let mut is_doubledragon = false; frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("sys_sscope_hold"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("sys_sscope_hold"),false,false); } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - EFFECT(fighter, Hash40::new("tantan_final_shot"), Hash40::new("pl1_muzzle"), 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("tantan_final_shot"), Hash40::new("pl1_muzzle"), 0, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("tantan_final_punch"), Hash40::new("pl1_muzzle_eff"), 3.0, 0, 0.0, 180, 0, 180, 0.75, false); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_final_punch"), Hash40::new("throw"), -0.045, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter,1.5); + EFFECT_FOLLOW(agent, Hash40::new("tantan_final_punch"), Hash40::new("throw"), -0.045, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent,1.5); effect_l = EffectModule::get_last_handle(boma); } else { let size = if is_dragonized {1.15} else {1.0}; - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pl1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); - LAST_EFFECT_SET_RATE(fighter,0.75); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pl1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); + LAST_EFFECT_SET_RATE(agent,0.75); effect_l = EffectModule::get_last_handle(boma); if is_dragonized { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_wepon_shot1"), Hash40::new("pl1_gimmickc"), -1.0, 0, 0, 0, 0, -90, 1.0, true); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.75, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon_shot1"), Hash40::new("pl1_gimmickc"), -1.0, 0, 0, 0, 0, -90, 1.0, true); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.75, 1.0); } if is_doubledragon { - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pr1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); - LAST_EFFECT_SET_RATE(fighter,0.75); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_beam1_body"), Hash40::new("pr1_gimmickc"), -2.5, 0, 0, 0, 0, 180, size, true); + LAST_EFFECT_SET_RATE(agent,0.75); effect_r = EffectModule::get_last_handle(boma); } } } if is_dragonized && is_doubledragon { frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 0.75); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 1.375); - EFFECT_DETACH_KIND(fighter,Hash40::new("tantan_final_punch"),-1) + EFFECT_DETACH_KIND(agent,Hash40::new("tantan_final_punch"),-1) } } else{ frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 0.375); EffectModule::set_rate(boma, effect_r as u32, 0.375); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { EffectModule::set_rate(boma, effect_l as u32, 1.1); EffectModule::set_rate(boma, effect_r as u32, 1.1); } @@ -239,57 +239,57 @@ unsafe extern "C" fn tantan_attack_s4_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn tantan_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut is_dragonized = false; let mut is_doubledragon = false; frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_beam_ready")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; if is_dragonized && is_doubledragon { - PLAY_SE(fighter, Hash40::new("vc_tantan_final02")); + PLAY_SE(agent, Hash40::new("vc_tantan_final02")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_punch_long")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_punch_long")); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; if is_dragonized && is_doubledragon { - PLAY_STATUS(fighter, Hash40::new("se_tantan_final02")); + PLAY_STATUS(agent, Hash40::new("se_tantan_final02")); } else { - PLAY_SE(fighter, sfx); + PLAY_SE(agent, sfx); } } } -unsafe extern "C" fn tantan_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //rbkind_76_dragonbeam ControlModule::set_rumble(boma, Hash40::new("rbkind_76_dragonbeam2"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn tantan_attack_s4_charge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); /* let is_doubledragon = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0; @@ -300,56 +300,51 @@ unsafe extern "C" fn tantan_attack_s4_charge_effect(fighter: &mut L2CAgentBase) for i in 1..i32::MAX{ frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); } wait(lua_state, 5.0); - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("pl1_gimmickc"), 3, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("pl1_gimmickc"), 3, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, true); } } -unsafe extern "C" fn tantan_attack_s4_charge_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); } } -unsafe extern "C" fn tantan_attack_s4_charge_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - fighter.clear_lua_stack(); - lua_args!(fighter,*MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.6, -1, 0.8, 0.8, -1, Hash40::new("invalid")); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent,*MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.6, -1, 0.8, 0.8, -1, Hash40::new("invalid")); smash::app::sv_module_access::physics(lua_state); - fighter.pop_lua_stack(1); + agent.pop_lua_stack(1); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackhi4", tantan_attack_hi4_game) - .acmd("game_attacklw4", tantan_attack_lw4_game) - .acmd("game_attacks4", tantan_attack_s4_game) - .acmd("effect_attacks4", tantan_attack_s4_effect) - .acmd("sound_attacks4", tantan_attack_s4_sound) - .acmd("expression_attacks4", tantan_attack_s4_expression) - .acmd("effect_attacks4charge", tantan_attack_s4_charge_effect) - .acmd("sound_attacks4charge", tantan_attack_s4_charge_sound) - .acmd( - "expression_attacks4charge", - tantan_attack_s4_charge_expression, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("sound_attacks4charge", sound_attacks4charge); + agent.acmd("expression_attacks4charge",expression_attacks4charge,); } diff --git a/fighters/tantan/src/acmd/specials.rs b/fighters/tantan/src/acmd/specials.rs index 796b3d1e9e..eb0d41a7a2 100644 --- a/fighters/tantan/src/acmd/specials.rs +++ b/fighters/tantan/src/acmd/specials.rs @@ -1,36 +1,36 @@ use super::*; -unsafe extern "C" fn tantan_special_n_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 1.0); if(armType == 1){ - FT_MOTION_RATE(fighter, 1.35); + FT_MOTION_RATE(agent, 1.35); } else if (armType==2) { - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } else if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { AttackModule::set_power_mul(boma, 1.1); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr5"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr5"), *HIT_STATUS_XLU); if(armType == 1){ - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 13.0, 60, 95, 0, 50, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 13.0, 60, 95, 0, 50, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 13.0, 60, 95, 0, 50, 2.5, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 13.0, 60, 95, 0, 50, 5.0, 3.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } else if(armType == 2){ - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 8.5, 361, 85, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.5, 361, 85, 0, 45, 3.5, 3.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 8.5, 361, 85, 0, 45, 2.5, 1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.5, 361, 85, 0, 45, 3.5, 3.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } else { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); @@ -39,280 +39,275 @@ unsafe extern "C" fn tantan_special_n_air_game(fighter: &mut L2CAgentBase) { let powerFactor = if is_dragonized {1.15} else {1.0}; let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - ATTACK(fighter, 0, 0, Hash40::new("armr5"), 10.25*powerFactor, 45, 100, 0, 45, 2.5*sizeFactor, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.25*powerFactor, 45, 100, 0, 45, 4.5*sizeFactor, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr5"), 10.25*powerFactor, 45, 100, 0, 45, 2.5*sizeFactor, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.25*powerFactor, 45, 100, 0, 45, 4.5*sizeFactor, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn tantan_special_n_air_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_jump_line_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("tantan_jump_line_l"), false, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if(armType==1){ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n2"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n2"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); } else if (armType==2){ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n3"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n3"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("tantan_atk_air_n1"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("tantan_atk_air_n1"), Hash40::new("top"), 0, 10, 4, 0, 0, 0, 1.2, true); if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { - LAST_EFFECT_SET_COLOR(fighter,1.0,0.5,0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("pr1_gimmickc"), 0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter,1.5); + LAST_EFFECT_SET_COLOR(agent,1.0,0.5,0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("pr1_gimmickc"), 0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent,1.5); } } } frame(lua_state, 22.0); { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_damage_fire_fly"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_damage_fire_fly"), -1); } } -unsafe extern "C" fn tantan_special_n_air_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); if(armType==1){ frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n02")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n02")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); } } else if (armType==2){ frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n03")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n03")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); } } else{ frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attackair_n01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attackair_n01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); } } } -unsafe extern "C" fn tantan_special_n_air_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if(armType==1){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_76_megabolthit"), 10); + RUMBLE_HIT(agent, Hash40::new("rbkind_76_megabolthit"), 10); } else if (armType==2){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 12); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 12); } else{ - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 9); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 9); } } } -unsafe extern "C" fn tantan_special_n_air_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 5.0); if (armType!=2) { //Additional landing lag for using Dragon/Megawatt - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); if (armType==0){ frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } //Landing lag frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { CancelModule::enable_cancel(boma); } } -unsafe extern "C" fn tantan_special_n_air_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_special_n_air_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_LANDING_SE(fighter, Hash40::new("se_tantan_landing02")); + if is_excute(agent) { + PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } -unsafe extern "C" fn tantan_special_n_air_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn tantan_special_hi_air_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let angle = WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("tantan_jump_air"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180.0+angle, 0, 1, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1.3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("tantan_jump_air"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180.0+angle, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1.3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } if !WorkModule::is_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_IS_SPECIAL_HI_AIR_PHYSICS) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_hook_wind"), Hash40::new("handl"), -0.2, -0.03, -0.03, 180, 180, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_hook_wind"), Hash40::new("handl"), -0.2, -0.03, -0.03, 180, 180, 0, 1, true); } } frame(lua_state, 2.0); if !WorkModule::is_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_IS_SPECIAL_HI_AIR_PHYSICS) { - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_wepon_ringwind"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 2); } } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_wepon_ringwind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_wepon_ringwind"), false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_hook_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("tantan_hook_wind"), false, true); } } -unsafe extern "C" fn tantan_special_hi_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let bReverseFrame = if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND) {2.0} else {4.0}; +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let bReverseFrame = if agent.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND) {2.0} else {4.0}; frame(lua_state, bReverseFrame); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_TANTAN_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-5.0)); + FT_MOTION_RATE(agent, 5.0/(8.0-5.0)); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_TANTAN_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 23.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } //Right arm charging punch// -unsafe extern "C" fn tantan_special_s_charge_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4charger(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); } if armType==1 { frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attack02_charge")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack02_charge")); } } else if armType==2 { frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_tantan_attack03_charge")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack03_charge")); } } else{ frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_beam_ready")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); } } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_specialairn", tantan_special_n_air_game) - .acmd("effect_specialairn", tantan_special_n_air_effect) - .acmd("sound_specialairn", tantan_special_n_air_sound) - .acmd("expression_specialairn", tantan_special_n_air_expression) - .acmd("game_specialairnend", tantan_special_n_air_end_game) - .acmd("effect_specialairnend", tantan_special_n_air_end_effect) - .acmd("sound_specialairnend", tantan_special_n_air_end_sound) - .acmd( - "expression_specialairnend", - tantan_special_n_air_end_expression, - ) - .acmd("effect_specialairhi", tantan_special_hi_air_effect) - .acmd("effect_specialairhi2", tantan_special_hi_air_effect) - .acmd("game_specialairhistart", tantan_special_hi_air_game) - .acmd("game_specialairhistart2", tantan_special_hi_air_game) - .acmd("sound_attacks4charger", tantan_special_s_charge_sound) - .acmd("sound_attacks4chargerb", tantan_special_s_charge_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("effect_specialairn", effect_specialairn); + agent.acmd("sound_specialairn", sound_specialairn); + agent.acmd("expression_specialairn", expression_specialairn); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("sound_specialairnend", sound_specialairnend); + agent.acmd("expression_specialairnend",expression_specialairnend,); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("effect_specialairhi2", effect_specialairhi); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialairhistart2", game_specialairhistart); + agent.acmd("sound_attacks4charger", sound_attacks4charger); + agent.acmd("sound_attacks4chargerb", sound_attacks4charger); } diff --git a/fighters/tantan/src/acmd/throws.rs b/fighters/tantan/src/acmd/throws.rs index da9c72c731..d89d82e9e6 100644 --- a/fighters/tantan/src/acmd/throws.rs +++ b/fighters/tantan/src/acmd/throws.rs @@ -1,88 +1,86 @@ use super::*; -unsafe extern "C" fn tantan_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(15.0-1.0)); - if is_excute(fighter) { - FighterAreaModuleImpl::enable_fix_jostle_area(fighter.module_accessor, 3.5, 3.5); + FT_MOTION_RATE(agent, 6.0/(15.0-1.0)); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(agent.module_accessor, 3.5, 3.5); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); - wait(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + game_CaptureCutCommon(agent); + wait(agent.lua_state_agent, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn tantan_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_06")); } wait(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_06")); } } -unsafe extern "C" fn tantan_catch_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); } } -unsafe extern "C" fn tantan_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 80, 88, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 80, 88, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("toer"), 2.0, 45, 130, 0, 30, 5.0, 1.0, 1.0, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 2.0, 45, 130, 0, 30, 5.0, 1.0, 1.0, 1.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 10); + CHECK_FINISH_CAMERA(agent, 15, 10); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_catch", tantan_catch_game) - .acmd("sound_catch", tantan_catch_sound) - .acmd("expression_catch", tantan_catch_expression) - .acmd("game_throwhi", tantan_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("sound_catch", sound_catch); + agent.acmd("expression_catch", expression_catch); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/tantan/src/acmd/tilts.rs b/fighters/tantan/src/acmd/tilts.rs index 9af7aca337..cd7fac4e0c 100644 --- a/fighters/tantan/src/acmd/tilts.rs +++ b/fighters/tantan/src/acmd/tilts.rs @@ -1,187 +1,187 @@ use super::*; -unsafe extern "C" fn tantan_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let kbg = 95; let bkb = 85; frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("legr"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legr"), 6.0, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 6.0, 96, kbg, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 7.5, 96, kbg, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 6.5, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 6.5, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("legr"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 6.5, 93, kbg+5, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("legr"), 5.0, 93, kbg+5, 0, bkb, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 93, kbg+5, 0, bkb, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 6.5, 93, kbg+5, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; let mut sfx_level = *ATTACK_SOUND_LEVEL_M; let mut sizeFactor = 1.0; let mut powerFactor = 1.0; frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml5"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml4"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml3"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml2"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml1"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_OFF); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml5"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml4"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml3"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml2"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml1"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_OFF); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_OFF); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter,13.0,24.0,8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent,13.0,24.0,8.0); + if is_excute(agent) { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); let bigScale = WorkModule::get_param_float(boma,hash40("param_private"),hash40("arm_l_big_scale")); let sizeFactor = if is_dragonized {bigScale} else {1.0}; let powerFactor = if is_dragonized {1.15} else {1.0}; let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 90, 85, 0, 40, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 90, 85, 0, 40, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 10.0*powerFactor, 70, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 10.0*powerFactor, 70, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter,1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 361, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent,1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("pl1_gimmickc"), 8.0*powerFactor, 361, 85, 0, 50, 2.9*sizeFactor, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_level, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml5"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml4"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml2"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml1"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml5"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml4"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml2"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml1"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn tantan_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let is_dragonized = WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L); let scale = if is_dragonized {1.5} else {1.25}; //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("pl1_have"), 0, 0, 0, 0, 90, 0, 1.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 2.5, 10, 0, 0, 0, scale, true); - LAST_EFFECT_SET_SCALE_W(fighter,1.5,1,1); - LAST_EFFECT_SET_RATE(fighter,0.55); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 2.5, 10, 0, 0, 0, scale, true); + LAST_EFFECT_SET_SCALE_W(agent,1.5,1,1); + LAST_EFFECT_SET_RATE(agent,0.55); if is_dragonized { - LAST_EFFECT_SET_COLOR(fighter,0.25,1.0,0.375); - EFFECT_FOLLOW(fighter, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter,2.0); + LAST_EFFECT_SET_COLOR(agent,0.25,1.0,0.375); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("pl1_have"), 0, 0, 0, 0, 180, 0, 1, true); + LAST_EFFECT_SET_RATE(agent,2.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter,Hash40::new("tantan_dragon_attack_fire"),false,false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent,Hash40::new("tantan_dragon_attack_fire"),false,false); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("tantan_punch_end"), Hash40::new("arml1"), -1, -0.2, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_punch_end"), Hash40::new("arml1"), -1, -0.2, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn tantan_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_punch_long")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_punch_long")); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let sfx = if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) {Hash40::new("se_tantan_attack01_doragon_smash")} else {Hash40::new("se_tantan_attack01_long")}; - PLAY_SE(fighter, sfx); + PLAY_SE(agent, sfx); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attack01_catch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_catch")); } } -unsafe extern "C" fn tantan_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut powerFactor = 1.0; - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_76_dragonarm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackss"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn tantan_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); let motion = MotionModule::motion_kind(boma); @@ -189,10 +189,10 @@ unsafe extern "C" fn tantan_attack_s3_game(fighter: &mut L2CAgentBase) { let isLow = motion == Hash40::new("attack_s3_lw").hash; let damageBonus = if (!isHigh && !isLow) {0.0} else {0.5}; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); if (isHigh) {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false);} @@ -200,105 +200,103 @@ unsafe extern "C" fn tantan_attack_s3_game(fighter: &mut L2CAgentBase) { {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false);} } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn tantan_attack_s3hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_attack_s3lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn tantan_attack_s3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_tantan_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackhard_h01")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_tantan_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); } } -unsafe extern "C" fn tantan_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -pub fn install() { - smashline::Agent::new("tantan") - .acmd("game_attackhi3", tantan_attack_hi3_game) - .acmd("game_attacklw3", tantan_attack_lw3_game) - .acmd("effect_attacklw3", tantan_attack_lw3_effect) - .acmd("sound_attacklw3", tantan_attack_lw3_sound) - .acmd("expression_attacklw3", tantan_attack_lw3_expression) - .acmd("game_attacks3hi", tantan_attack_s3_game) - .acmd("game_attacks3", tantan_attack_s3_game) - .acmd("game_attacks3lw", tantan_attack_s3_game) - .acmd("effect_attacks3hi", tantan_attack_s3hi_effect) - .acmd("effect_attacks3", tantan_attack_s3_effect) - .acmd("effect_attacks3lw", tantan_attack_s3lw_effect) - .acmd("sound_attacks3hi", tantan_attack_s3_sound) - .acmd("sound_attacks3", tantan_attack_s3_sound) - .acmd("sound_attacks3lw", tantan_attack_s3_sound) - .acmd("expression_attacks3hi", tantan_attack_s3_expression) - .acmd("expression_attacks3", tantan_attack_s3_expression) - .acmd("expression_attacks3lw", tantan_attack_s3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("sound_attacks3hi", sound_attacks3hi); + agent.acmd("sound_attacks3", sound_attacks3hi); + agent.acmd("sound_attacks3lw", sound_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3hi); + agent.acmd("expression_attacks3", expression_attacks3hi); + agent.acmd("expression_attacks3lw", expression_attacks3hi); } diff --git a/fighters/tantan/src/lib.rs b/fighters/tantan/src/lib.rs index 8e2ddcc726..9e8603d4ef 100644 --- a/fighters/tantan/src/lib.rs +++ b/fighters/tantan/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("tantan"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/tantan/src/opff.rs b/fighters/tantan/src/opff.rs index 39bafda49f..7374832021 100644 --- a/fighters/tantan/src/opff.rs +++ b/fighters/tantan/src/opff.rs @@ -38,7 +38,7 @@ unsafe fn recoil_cancel(boma: &mut BattleObjectModuleAccessor,status: i32,situat unsafe fn arms_switch_during_normals(boma: &mut BattleObjectModuleAccessor, cat1: i32, status_kind: i32, situation_kind: i32, motion_kind: u64) { if [*FIGHTER_STATUS_KIND_ATTACK_S3, *FIGHTER_STATUS_KIND_ATTACK_HI3, *FIGHTER_STATUS_KIND_ATTACK_LW3, *FIGHTER_STATUS_KIND_ATTACK_AIR, *FIGHTER_STATUS_KIND_ATTACK_DASH, *FIGHTER_STATUS_KIND_ATTACK_S4, *FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) - || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ + || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ if !boma.is_in_hitlag() { if boma.is_cat_flag(Cat1::SpecialLw) { WorkModule::on_flag(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_CHANGE_PUNCH_R); @@ -143,12 +143,8 @@ unsafe extern "C" fn dragon_frame(weapon: &mut L2CFighterBase) { AttackModule::set_power_mul(boma, 1.15); } } -pub fn install() { - smashline::Agent::new("tantan") - .on_line(Main, tantan_frame_wrapper) - .install(); - - smashline::Agent::new("tantan_punch1") - .on_line(Main, dragon_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tantan_frame_wrapper); + agent.on_line(Main, dragon_frame); + agent.install(); } diff --git a/fighters/tantan/src/status.rs b/fighters/tantan/src/status.rs index 616a7e640d..096df389f7 100644 --- a/fighters/tantan/src/status.rs +++ b/fighters/tantan/src/status.rs @@ -317,89 +317,35 @@ unsafe extern "C" fn tantan_special_hi_air_reach_exec(fighter: &mut L2CFighterCo fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); return 0.into(); } -pub fn install() { - smashline::Agent::new("tantan") - .on_start(tantan_init) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat) - .status( - Main, - *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, - tantan_attack_jump_aerial_main, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, - tantan_attack_landing_exec, - ) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec) - .status( - Pre, - *FIGHTER_STATUS_KIND_ATTACK_S4_START, - tantan_attack_s4_start_pre, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4_START, - tantan_attack_s4_start_main, - ) - .status( - Pre, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_pre, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_main, - ) - .status( - Exec, - *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, - tantan_attack_s4_hold_exec, - ) - .status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre) - .status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end) - .status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre) - .status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_PULL, - tantan_catch_pull_main, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec) - .status( - Main, - *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, - tantan_landing_air_main, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND, - tantan_special_hi_exec, - ) - .status( - Pre, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, - tantan_special_hi_air_pre, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, - tantan_special_hi_air_exec, - ) - .status( - Exec, - *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH, - tantan_special_hi_air_reach_exec, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(tantan_init); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat); + agent.status(Main,*FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL,tantan_attack_jump_aerial_main,); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT,tantan_attack_landing_exec,); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec); + agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_pre,); + agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_main,); + agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_pre,); + agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_main,); + agent.status(Exec,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_exec,); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main); + agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,tantan_catch_pull_main,); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec); + agent.status(Main,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,tantan_landing_air_main,); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND,tantan_special_hi_exec,); + agent.status(Pre,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_pre,); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_exec,); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH,tantan_special_hi_air_reach_exec); } diff --git a/fighters/tantan/src/tantan_beam/acmd.rs b/fighters/tantan/src/tantan_beam/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/tantan/src/tantan_beam/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_beam/acmd/special.rs b/fighters/tantan/src/tantan_beam/acmd/special.rs new file mode 100644 index 0000000000..95040dc3ba --- /dev/null +++ b/fighters/tantan/src/tantan_beam/acmd/special.rs @@ -0,0 +1,44 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let damage = if is_dragonized {9.0} else {6.0}; + let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; + let range = if is_dragonized {30.0} else {25.0}; + let size = if is_dragonized {2.8} else {1.3}; + + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::disable_tip(boma); + } +} +unsafe extern "C" fn effect_beam(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; + let offset = if is_dragonized {-1.0} else {-2.5}; + EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_bigshoot", game_bigshoot); + agent.acmd("effect_beam", effect_beam); + agent.acmd("effect_bigbeam", effect_bigbeam); +} diff --git a/fighters/tantan/src/tantan_beam/mod.rs b/fighters/tantan/src/tantan_beam/mod.rs new file mode 100644 index 0000000000..e83b3a97bc --- /dev/null +++ b/fighters/tantan/src/tantan_beam/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_beam"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch1/acmd.rs b/fighters/tantan/src/tantan_punch1/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/tantan/src/tantan_punch1/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch1/acmd/special.rs b/fighters/tantan/src/tantan_punch1/acmd/special.rs new file mode 100644 index 0000000000..d93c1fdb60 --- /dev/null +++ b/fighters/tantan/src/tantan_punch1/acmd/special.rs @@ -0,0 +1,185 @@ +use super::*; +unsafe extern "C" fn dragon_game_attackshort(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); +} +frame(lua_state, 2.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); +} + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; +frame(lua_state, clearFrame); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +unsafe extern "C" fn dragon_game_attacklong(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); +} +frame(lua_state, 2.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); +} +frame(lua_state, 4.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } +} +frame(lua_state, 7.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } +} +frame(lua_state, 9.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } +} + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; +frame(lua_state, clearFrame); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +unsafe extern "C" fn dragon_game_attackdragonshootlong(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); +} +frame(lua_state, 1.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); +} +frame(lua_state, 4.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } +} + //Dragon Beam linker +frame(lua_state, 6.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; + let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; + let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; + let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); + } +} +frame(lua_state, 9.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + AttackModule::set_power(boma, 0,16.0, false); + } +} +frame(lua_state, 15.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +unsafe extern "C" fn dragon_effect_attackdragonshootlong(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); +} +frame(lua_state, 14.0); +if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); + EffectModule::enable_sync_init_pos_last(boma); +} +} + +unsafe extern "C" fn dragon_special_hi_attack_game(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 1.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); +} +frame(lua_state, 9.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); + STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); +} +frame(lua_state, 2.0); +if is_excute(agent) { + let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; + PLAY_SE(agent, sfx); +} +} +pub fn install(agent: &mut Agent) { +agent.acmd("game_attackshort", dragon_game_attackshort); +agent.acmd("game_attacklong", dragon_game_attacklong); +agent.acmd("game_attackdragonshootlong",dragon_game_attackdragonshootlong,); +agent.acmd("effect_attackdragonshootlong",dragon_effect_attackdragonshootlong,); +agent.acmd("game_specialairhiattack", dragon_special_hi_attack_game); +agent.acmd("game_specialairhiattackdragon",dragon_special_hi_attack_game,); +agent.acmd("sound_attackbeamloop", dragon_sound_attackbeamloop); +} diff --git a/fighters/tantan/src/tantan_punch1/mod.rs b/fighters/tantan/src/tantan_punch1/mod.rs new file mode 100644 index 0000000000..622845add8 --- /dev/null +++ b/fighters/tantan/src/tantan_punch1/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch1"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch2/acmd.rs b/fighters/tantan/src/tantan_punch2/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/tantan/src/tantan_punch2/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch2/acmd/special.rs b/fighters/tantan/src/tantan_punch2/acmd/special.rs new file mode 100644 index 0000000000..d73ff24823 --- /dev/null +++ b/fighters/tantan/src/tantan_punch2/acmd/special.rs @@ -0,0 +1,104 @@ +use super::*; +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); +} +frame(lua_state, 1.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); +} + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; +frame(lua_state, clearFrame-2.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { +let lua_state = agent.lua_state_agent; +let boma = agent.boma(); + +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); +} +frame(lua_state, 1.0); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); +} +frame(lua_state, 4.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } +} +frame(lua_state, 14.0); +if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } +} + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; +frame(lua_state, clearFrame-2.0); +if is_excute(agent) { + AttackModule::clear_all(boma); +} +} +pub fn install(agent: &mut Agent) { +agent.acmd("game_attackshort", game_attackshort); +agent.acmd("game_attacklong", game_attacklong); +agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/tantan_punch2/mod.rs b/fighters/tantan/src/tantan_punch2/mod.rs new file mode 100644 index 0000000000..455494dcc1 --- /dev/null +++ b/fighters/tantan/src/tantan_punch2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch3/acmd.rs b/fighters/tantan/src/tantan_punch3/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/tantan/src/tantan_punch3/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch3/acmd/special.rs b/fighters/tantan/src/tantan_punch3/acmd/special.rs new file mode 100644 index 0000000000..3805a59609 --- /dev/null +++ b/fighters/tantan/src/tantan_punch3/acmd/special.rs @@ -0,0 +1,120 @@ +use super::*; +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; + let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; + frame(lua_state, reboundFrame); + //Rebound hitbox + if is_excute(agent) { + if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +//Fly controls when RamRam gets sent outwards +pub fn install(agent: &mut Agent) { +agent.acmd("game_attackshort", game_attackshort); +agent.acmd("game_attacklong", game_attacklong); +agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/tantan_punch3/mod.rs b/fighters/tantan/src/tantan_punch3/mod.rs new file mode 100644 index 0000000000..70f95fca76 --- /dev/null +++ b/fighters/tantan/src/tantan_punch3/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_punch3"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_ring/acmd.rs b/fighters/tantan/src/tantan_ring/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/tantan/src/tantan_ring/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_ring/acmd/special.rs b/fighters/tantan/src/tantan_ring/acmd/special.rs new file mode 100644 index 0000000000..744b485500 --- /dev/null +++ b/fighters/tantan/src/tantan_ring/acmd/special.rs @@ -0,0 +1,53 @@ +use super::*; +unsafe extern "C" fn game_attackfly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +//Fire ramram +unsafe extern "C" fn game_attacks4fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //Scoop for the first few frames, then send back and down + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackfly", game_attackfly); + agent.acmd("game_attacks4fly", game_attacks4fly); +} diff --git a/fighters/tantan/src/tantan_ring/mod.rs b/fighters/tantan/src/tantan_ring/mod.rs new file mode 100644 index 0000000000..a7facdd2ea --- /dev/null +++ b/fighters/tantan/src/tantan_ring/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("tantan_ring"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 6deca42f424bc6109709d491d97ce67ccd676fc0 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 22:08:38 -0400 Subject: [PATCH 090/172] Chrom crate --- fighters/chrom/src/acmd/aerials.rs | 188 +++--- fighters/chrom/src/acmd/ground.rs | 42 +- fighters/chrom/src/acmd/mod.rs | 16 +- fighters/chrom/src/acmd/other.rs | 176 +++-- fighters/chrom/src/acmd/smashes.rs | 136 ++-- fighters/chrom/src/acmd/specials.rs | 990 ++++++++++++++-------------- fighters/chrom/src/acmd/throws.rs | 32 +- fighters/chrom/src/acmd/tilts.rs | 138 ++-- fighters/chrom/src/lib.rs | 7 +- fighters/chrom/src/opff.rs | 6 +- fighters/chrom/src/status.rs | 6 +- 11 files changed, 860 insertions(+), 877 deletions(-) diff --git a/fighters/chrom/src/acmd/aerials.rs b/fighters/chrom/src/acmd/aerials.rs index 821d6e9c1a..74e8846192 100644 --- a/fighters/chrom/src/acmd/aerials.rs +++ b/fighters/chrom/src/acmd/aerials.rs @@ -1,200 +1,198 @@ use super::*; -unsafe extern "C" fn chrom_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 4.0, 100, 50, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 100, 50, 0, 50, 4.0, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 4.0, 100, 50, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 55, 110, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 55, 110, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 55, 110, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 55, 110, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 55, 110, 0, 50, 4.0, 2.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.1); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn chrom_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.545); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.545); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 45, 95, 0, 43, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 45, 95, 0, 43, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 45, 95, 0, 43, 3.0, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 45, 95, 0, 43, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 45, 95, 0, 43, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn chrom_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0 , 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 42, 100, 0, 34, 3.5, 0.0, 0.0 , 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 42, 95, 0, 34, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn chrom_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 7.0, 65, 110, 0, 45, 2.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 65, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 7.0, 65, 110, 0, 45, 2.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 65, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 65, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 7.0, 80, 110, 0, 42, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 80, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 7.0, 80, 110, 0, 42, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 80, 110, 0, 45, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 80, 110, 0, 45, 3.5, 0.0, 0.0, 8.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn chrom_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 270, 70, 0, 50, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 4.5, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 12.0, 270, 76, 0, 10, 3.5, 0.0, 0.0, 9.0, None, None, None, 1.05, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); // Second frame of dair may have interpolation issues } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.0, 0.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.5, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.0, 0.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 67, 90, 0, 55, 3.0, 1.5, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); // First to fourth frame of sourspot may have interpolation issues } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attackairn", chrom_attack_air_n_game) - .acmd("game_attackairf", chrom_attack_air_f_game) - .acmd("expression_attackairf", chrom_attack_air_f_expression) - .acmd("game_attackairb", chrom_attack_air_b_game) - .acmd("game_attackairhi", chrom_attack_air_hi_game) - .acmd("game_attackairlw", chrom_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/chrom/src/acmd/ground.rs b/fighters/chrom/src/acmd/ground.rs index d5ee6e3b69..d298635731 100644 --- a/fighters/chrom/src/acmd/ground.rs +++ b/fighters/chrom/src/acmd/ground.rs @@ -1,43 +1,41 @@ use super::*; -unsafe extern "C" fn chrom_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 64, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 64, 60, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 64, 60, 0, 50, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 11.0, 43, 91, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 11.0, 43, 91, 0, 65, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 43, 91, 0, 65, 3.0, 0.0, 0.0, 8.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attack11", chrom_attack_11_game) - .acmd("game_attackdash", chrom_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/chrom/src/acmd/mod.rs b/fighters/chrom/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/chrom/src/acmd/mod.rs +++ b/fighters/chrom/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index 497c0e1f3c..ab60e583b2 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -1,214 +1,212 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_chrom_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_chrom_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_chrom_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_chrom_step_right_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn chrom_appeallw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::AppealHi) { - VarModule::on_flag(fighter.battle_object, vars::chrom::instance::TRAIL_EFFECT); + VarModule::on_flag(agent.battle_object, vars::chrom::instance::TRAIL_EFFECT); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_appeallwl", chrom_appeallw_game) - .acmd("game_appeallwr", chrom_appeallw_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwl); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/chrom/src/acmd/smashes.rs b/fighters/chrom/src/acmd/smashes.rs index b6a51b1fa7..1319786270 100644 --- a/fighters/chrom/src/acmd/smashes.rs +++ b/fighters/chrom/src/acmd/smashes.rs @@ -1,149 +1,147 @@ use super::*; -unsafe extern "C" fn chrom_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 3.0/(13.2-10.0)); + FT_MOTION_RATE(agent, 3.0/(13.2-10.0)); frame(lua_state, 13.2); - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 17.0, 361, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 17.0, 361, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 17.0, 361, 83, 0, 60, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn chrom_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 98, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 90, 98, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 98, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 90, 98, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0/(6.1-5.0)); + FT_MOTION_RATE(agent, 1.0/(6.1-5.0)); frame(lua_state, 6.1); - FT_MOTION_RATE(fighter, 3.0/(8.5-6.1)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 50, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 3.0/(8.5-6.1)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 50, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 50, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.5); - FT_MOTION_RATE(fighter, 1.0/(9.0-8.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(9.0-8.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 45, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 45, 90, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 45, 90, 0, 42, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attacks4", chrom_attack_s4_s_game) - .acmd("expression_attacks4", chrom_attack_s4_s_expression) - .acmd("game_attackhi4", chrom_attack_hi4_game) - .acmd("game_attacklw4", chrom_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/chrom/src/acmd/specials.rs b/fighters/chrom/src/acmd/specials.rs index 934f2739f9..3403457294 100644 --- a/fighters/chrom/src/acmd/specials.rs +++ b/fighters/chrom/src/acmd/specials.rs @@ -3,920 +3,920 @@ use super::*; //Need to match up explosion effect more accurately -unsafe extern "C" fn chrom_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 2.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 2.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_n_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } //All levels need to match hitbox placements of level 1 Neutral B -unsafe extern "C" fn chrom_special_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 80, 70, 0, 60, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 80, 70, 0, 60, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.625); + FT_MOTION_RATE(agent, 0.625); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 2.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.5); + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_air_n_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn chrom_special_air_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 65, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 65, 70, 0, 60, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_air_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 272, 50, 0, 15, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 272, 50, 0, 15, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 5.0, 272, 75, 0, 35, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 5.0, 272, 75, 0, 35, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 272, 50, 0, 60, 15, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 272, 50, 0, 60, 15, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 272, 75, 0, 60, 35, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 272, 75, 0, 60, 35, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); + COL_NORMAL(agent); } } -unsafe extern "C" fn chrom_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairs4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("chrom_sword_green"), false, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); + COL_NORMAL(agent); } } -unsafe extern "C" fn game_specialhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 91, 100, 155, 0, 4.8, 0.0, 5.0, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 89, 100, 155, 0, 4.8, 0.0, 5.0, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 90, 100, 140, 0, 4.8, 0.0, 12.5, 8.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 91, 100, 140, 0, 4.8, 0.0, 12.5, 18.0, None, None, None, 1.3, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_JUMP); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_CONTROL); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME_INIT); WorkModule::set_float(boma, 4.0, *FIGHTER_ROY_STATUS_SPECIAL_HI_WORK_FLOAT_SLIDEGAP_RECOVER_FRAME); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 1.0, 367, 100, 50, 0, 4.0, 0.0, 10.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 7, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn game_specialhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, -20); KineticModule::clear_speed_all(boma); - ADD_SPEED_NO_LIMIT(fighter, 0, -6); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 70, 30, 0, 120, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 270, 102, 0, 40, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ADD_SPEED_NO_LIMIT(agent, 0, -6); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 70, 30, 0, 120, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 270, 102, 0, 40, 8.0, 0.0, 14.0, 9.0, Some(0.0), Some(7.0), Some(9.0), 0.2, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_no_finish_camera(boma, 1, true, false); //AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.5, 270, 102, 0, 40, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 4.5, 70, 50, 0, 0, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.5, 270, 102, 0, 40, 4.8, 0.0, 6.8, -1.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { - ADD_SPEED_NO_LIMIT(fighter, 0, -1.5); + if is_excute(agent) { + ADD_SPEED_NO_LIMIT(agent, 0, -1.5); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 68.0, 39.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } } -unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -927,45 +927,43 @@ unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_specialnend", chrom_special_n_end_game) - .acmd("expression_specialnend", chrom_special_n_end_expression) - .acmd("game_specialnend2", chrom_special_n_end2_game) - .acmd("game_specialnend3", chrom_special_n_end3_game) - .acmd("game_specialairnend", chrom_special_air_n_end_game) - .acmd("expression_specialairnend", chrom_special_air_n_end_expression) - .acmd("game_specialairnend2", chrom_special_air_n_end2_game) - .acmd("game_specialairnend3", chrom_special_air_n_end3_game) - .acmd("effect_specials1", chrom_special_s1_effect) - .acmd("effect_specialairs1", chrom_special_air_s1_effect) - .acmd("effect_specials2hi", chrom_special_s2_hi_effect) - .acmd("effect_specialairs2hi", chrom_special_air_s2_hi_effect) - .acmd("effect_specials2lw", chrom_special_s2_lw_effect) - .acmd("effect_specialairs2lw", chrom_special_air_s2_lw_effect) - .acmd("effect_specials3hi", chrom_special_s3_hi_effect) - .acmd("effect_specialairs3hi", chrom_special_air_s3_hi_effect) - .acmd("effect_specials3s", chrom_special_s3_s_effect) - .acmd("effect_specialairs3s", chrom_special_air_s3_s_effect) - .acmd("effect_specials3lw", chrom_special_s3_lw_effect) - .acmd("effect_specialairs3lw", chrom_special_air_s3_lw_effect) - .acmd("effect_specials4hi", chrom_special_s4_hi_effect) - .acmd("effect_specialairs4hi", chrom_special_air_s4_hi_effect) - .acmd("effect_specials4s", chrom_special_s4_s_effect) - .acmd("effect_specialairs4s", chrom_special_air_s4_s_effect) - .acmd("effect_specials4lw", chrom_special_s4_lw_effect) - .acmd("effect_specialairs4lw", chrom_special_air_s4_lw_effect) - .acmd("game_specialhi2", game_specialhi2) - .acmd("game_specialairhi2", game_specialairhi2) - .acmd("game_specialhi3", game_specialhi3) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwhit", game_speciallwhit) - .acmd("game_specialairlwhit", game_speciallwhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("expression_specialnend", expression_specialnend); + agent.acmd("game_specialnend2", game_specialnend2); + agent.acmd("game_specialnend3", game_specialnend3); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("expression_specialairnend", expression_specialairnend); + agent.acmd("game_specialairnend2", game_specialairnend2); + agent.acmd("game_specialairnend3", game_specialairnend3); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specialairs1); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specialairs2hi); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specialairs2lw); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specialairs3hi); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specialairs3s); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specialairs3lw); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specialairs4hi); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specialairs4s); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specialairs4lw); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } diff --git a/fighters/chrom/src/acmd/throws.rs b/fighters/chrom/src/acmd/throws.rs index 8185359437..237f4e56ba 100644 --- a/fighters/chrom/src/acmd/throws.rs +++ b/fighters/chrom/src/acmd/throws.rs @@ -1,27 +1,27 @@ use super::*; -unsafe extern "C" fn chrom_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn chrom_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn chrom_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn chrom_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,10 +65,8 @@ unsafe extern "C" fn chrom_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_catch", chrom_catch_game) - .acmd("game_catchdash", chrom_catch_dash_game) - .acmd("game_catchturn", chrom_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/tilts.rs b/fighters/chrom/src/acmd/tilts.rs index 8ec14b28d4..6cb3c8cbca 100644 --- a/fighters/chrom/src/acmd/tilts.rs +++ b/fighters/chrom/src/acmd/tilts.rs @@ -1,128 +1,126 @@ use super::*; -unsafe extern "C" fn chrom_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(7.5-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.5-1.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); } frame(lua_state, 7.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 11.0, 40, 108, 0, 45, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 11.0, 40, 108, 0, 45, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 108, 0, 45, 3.5, 0.0, 0.0, 8.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0/(11.0-10.25)); + FT_MOTION_RATE(agent, 1.0/(11.0-10.25)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.5-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.5-1.0)); frame(lua_state, 5.5); - FT_MOTION_RATE(fighter, 1.0/(6.0-5.5)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 4.0, 5.0, -2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 5.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0/(6.0-5.5)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 4.0, 5.0, -2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 5.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 110, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 110, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 110, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 75, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 75, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 75, 100, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 75, 100, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 100, 0, 50, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn chrom_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn chrom_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 30, 40, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 24, 40, 0, 66, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 102, 40, 0, 75, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 75, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 30, 40, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 24, 40, 0, 66, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 102, 40, 0, 75, 3.5, 0.0, 0.0, 8.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 30, 40, 0, 75, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CHROM_HIT, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("chrom") - .acmd("game_attacks3", chrom_attack_s3_s_game) - .acmd("expression_attacks3", chrom_attack_s3_s_expression) - .acmd("game_attackhi3", chrom_attack_hi3_game) - .acmd("expression_attackhi3", chrom_attack_hi3_expression) - .acmd("game_attacklw3", chrom_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/chrom/src/lib.rs b/fighters/chrom/src/lib.rs index 69c57e700e..6b855cdc51 100644 --- a/fighters/chrom/src/lib.rs +++ b/fighters/chrom/src/lib.rs @@ -38,7 +38,8 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + acmd::install(agent); let agent = &mut Agent::new("chrom"); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/chrom/src/opff.rs b/fighters/chrom/src/opff.rs index 9149e10b9e..d8a0f61f21 100644 --- a/fighters/chrom/src/opff.rs +++ b/fighters/chrom/src/opff.rs @@ -246,8 +246,6 @@ pub unsafe extern "C" fn chrom_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFi sword_length(&mut *(fighter.module_accessor)); } -pub fn install() { - smashline::Agent::new("chrom") - .on_line(Main, chrom_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, chrom_frame_wrapper); } diff --git a/fighters/chrom/src/status.rs b/fighters/chrom/src/status.rs index 93d499ad7e..f78ee9461c 100644 --- a/fighters/chrom/src/status.rs +++ b/fighters/chrom/src/status.rs @@ -84,8 +84,6 @@ pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -pub fn install() { - smashline::Agent::new("chrom") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file From 40728f59aa9f559acfeb915d1cb72ba6c969db7e Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 22:36:44 -0400 Subject: [PATCH 091/172] Incineroar crate --- fighters/gaogaen/src/acmd/aerials.rs | 170 ++-- fighters/gaogaen/src/acmd/ground.rs | 118 ++- fighters/gaogaen/src/acmd/mod.rs | 16 +- fighters/gaogaen/src/acmd/other.rs | 166 ++-- fighters/gaogaen/src/acmd/smashes.rs | 98 ++- fighters/gaogaen/src/acmd/specials.rs | 949 +++++++++++----------- fighters/gaogaen/src/acmd/throws.rs | 572 +++++++------ fighters/gaogaen/src/acmd/tilts.rs | 174 ++-- fighters/gaogaen/src/lib.rs | 8 +- fighters/gaogaen/src/opff.rs | 6 +- fighters/gaogaen/src/status.rs | 6 +- fighters/gaogaen/src/status/attack_lw4.rs | 12 +- fighters/gaogaen/src/status/special_n.rs | 8 +- 13 files changed, 1136 insertions(+), 1167 deletions(-) diff --git a/fighters/gaogaen/src/acmd/aerials.rs b/fighters/gaogaen/src/acmd/aerials.rs index 751739e7d1..d496910125 100644 --- a/fighters/gaogaen/src/acmd/aerials.rs +++ b/fighters/gaogaen/src/acmd/aerials.rs @@ -1,189 +1,187 @@ use super::*; -unsafe extern "C" fn gaogaen_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 106, 0, 25, 9.0, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 50, 106, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 12.0, 50, 106, 0, 25, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 106, 0, 25, 9.0, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 50, 106, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 12.0, 50, 106, 0, 25, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 55, 100, 0, 30, 6.5, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("head"), 9.0, 55, 100, 0, 30, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 100, 0, 30, 6.5, 0.0, 6.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 55, 100, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("head"), 9.0, 55, 100, 0, 30, 3.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gaogaen_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, -3.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 13.0, 361, 101, 0, 30, 5.5, -11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 50, 73, 0, 55, 4.5, -3.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 13.0, 361, 101, 0, 30, 5.5, -11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 9.0, 35, 90, 0, 36, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame (lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gaogaen_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 50, 100, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 11.0, 50, 100, 0, 40, 4.2, 2.1, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 45, 104, 0, 45, 5.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 50, 100, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 11.0, 50, 100, 0, 40, 4.2, 2.1, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 45, 104, 0, 45, 5.2, 5.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gaogaen_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 65, 85, 0, 65, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 71, 85, 0, 65, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 65, 85, 0, 65, 5.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 71, 85, 0, 65, 5.0, 6.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(12.75-12.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(12.75-12.0)); } frame(lua_state, 12.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.0-12.75)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.75)); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn gaogaen_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gaogaen_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 270, 100, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 290, 67, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 270, 100, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 290, 67, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 15.0, 270, 52, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 290, 34, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 270, 52, 0, 30, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 290, 34, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 361, 70, 0, 50, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 361, 70, 0, 50, 5.4, 0.0, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 70, 0, 50, 5.8, 0.0, 8.2, 0.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attackairn", gaogaen_attack_air_n_game) - .acmd("game_attackairf", gaogaen_attack_air_f_game) - .acmd("game_attackairb", gaogaen_attack_air_b_game) - .acmd("game_attackairhi", gaogaen_attack_air_hi_game) - .acmd("expression_attackairhi", gaogaen_attack_air_hi_expression) - .acmd("game_attackairlw", gaogaen_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gaogaen/src/acmd/ground.rs b/fighters/gaogaen/src/acmd/ground.rs index c242ce1dc5..10ccb68f91 100644 --- a/fighters/gaogaen/src/acmd/ground.rs +++ b/fighters/gaogaen/src/acmd/ground.rs @@ -1,129 +1,127 @@ use super::*; -unsafe extern "C" fn gaogaen_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 180, 10, 0, 25, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 180, 10, 0, 25, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SLAP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn gaogaen_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 6.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 78, 35, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 3.0, 78, 35, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 78, 35, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 3.0, 78, 35, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 78, 35, 0, 30, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame(boma, 3, 2.0, false); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 25, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(7.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn gaogaen_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 1, 0, Hash40::new("waist"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 5, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 1, 0, Hash40::new("waist"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 7.0, 361, 88, 0, 40, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 4, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); + ATTACK(agent, 5, 0, Hash40::new("arml"), 7.0, 361, 88, 0, 40, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ELBOW); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -unsafe extern "C" fn gaogaen_attack_13_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn gaogaen_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.91); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.91); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 50, 81, 0, 70, 6.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 50, 81, 0, 70, 6.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 85, 70, 0, 70, 5.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 85, 70, 0, 70, 5.0, 3.5, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attack11", gaogaen_attack_11_game) - .acmd("game_attack12", gaogaen_attack_12_game) - .acmd("game_attack13", gaogaen_attack_13_game) - .acmd("expression_attack13", gaogaen_attack_13_expression) - .acmd("game_attackdash", gaogaen_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gaogaen/src/acmd/mod.rs b/fighters/gaogaen/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/gaogaen/src/acmd/mod.rs +++ b/fighters/gaogaen/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index 96bb186426..343e078d94 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -3,203 +3,201 @@ use super::*; use smash::app::BattleObjectModuleAccessor; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_gaogaen_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gaogaen_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_gaogaen_step_left_ll"), Hash40::new("se_gaogaen_step_right_ll")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_gaogaen_step_left_ll"), Hash40::new("se_gaogaen_step_right_ll")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gaogaen/src/acmd/smashes.rs b/fighters/gaogaen/src/acmd/smashes.rs index 0318e4824b..834725a6c3 100644 --- a/fighters/gaogaen/src/acmd/smashes.rs +++ b/fighters/gaogaen/src/acmd/smashes.rs @@ -1,75 +1,75 @@ use super::*; -unsafe extern "C" fn gaogaen_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 16.0, 361, 84, 0, 65, 3.0, 0.0, 0.6, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 361, 84, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 20.0, 361, 79, 0, 65, 6.0, 9.0, 1.8, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 16.0, 361, 84, 0, 65, 3.0, 0.0, 0.6, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 361, 84, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 20.0, 361, 79, 0, 65, 6.0, 9.0, 1.8, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -unsafe extern "C" fn gaogaen_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 17.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 17.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 17.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 88, 63, 0, 94, 5.5, 5.4, -0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 88, 63, 0, 94, 3.6, 3.4, 0.0, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -unsafe extern "C" fn gaogaen_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); JostleModule::set_status(boma, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let top_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; ModelModule::joint_global_position(boma, Hash40::new("top"), top_pos, false); let hip_pos = &mut Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; @@ -82,43 +82,41 @@ unsafe extern "C" fn gaogaen_attack_lw4_game(fighter: &mut L2CAgentBase) { &Vector2f::zero(), ground, true).is_null() { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 3.0, 270, 100, 250, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, -4.0, -3.0, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 1.5, -5.5, 3.5, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 270, 100, 50, 0, 5.4, 7.0, -8.0, 7.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 5.4, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 5.4, 0.0, 5.0, 9.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 2.4, 0.0, 2.0, 11.0, Some(0.0), Some(2.0), Some(-6.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 270, 62, 0, 103, 2.4, 0.0, 2.0, 11.0, Some(0.0), Some(2.0), Some(-6.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attacks4", gaogaen_attack_s4_s_game) - .acmd("game_attackhi4", gaogaen_attack_hi4_game) - .acmd("game_attacklw4", gaogaen_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gaogaen/src/acmd/specials.rs b/fighters/gaogaen/src/acmd/specials.rs index 42b3b225ca..3719e95227 100644 --- a/fighters/gaogaen/src/acmd/specials.rs +++ b/fighters/gaogaen/src/acmd/specials.rs @@ -1,35 +1,35 @@ use super::*; -unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 3 } else { 0 }; - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.0, 7.0, 0.0, 10.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 45, 42 + kbg, 0, 85, 5.8, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 5.4, 0.0, 11.0, -4.0, Some(0.0), Some(11.0), Some(-4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 4.6, 0.0, 8.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 3 } else { 0 }; + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 9.0, 0.0, 10.0, 7.0, 0.0, 10.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 42 + kbg, 0, 85, 5.8, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 5.4, 0.0, 11.0, -4.0, Some(0.0), Some(11.0), Some(-4.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 45, 45 + kbg, 0, 80, 4.6, 0.0, 8.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - HIT_NODE(fighter, Hash40::new("body"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("body"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); } else { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_START_ROTATION); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_RESET_ALL(fighter); + if is_excute(agent) { + HIT_RESET_ALL(agent); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -38,14 +38,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 11.0, -2.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 11.0, 4.0, Some(0.0), Some(11.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 11.0, -2.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -54,14 +54,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 15.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -70,14 +70,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 23.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -86,15 +86,15 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 29.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -103,14 +103,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 37.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -119,14 +119,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 42.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -135,14 +135,14 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 50.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 3.8, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 45, 35 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -151,30 +151,30 @@ unsafe extern "C" fn gaogaen_special_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 56.0); - if is_excute(fighter) { - let kbg = if fighter.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + let kbg = if agent.is_situation(*SITUATION_KIND_GROUND) { 5 } else { 0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 45 + kbg, 0, 85, 4.2, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 3.8, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 45, 45 + kbg, 0, 80, 4.2, 0.0, 8.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 15, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_END_ROTATION); } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_N_FLAG_REQUEST_GRAVITY_DEFAULT); } } -unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_START); VarModule::off_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB); VarModule::off_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB); @@ -182,11 +182,11 @@ unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::get_stick_y(boma) < -0.5 { VarModule::on_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB); VarModule::on_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB); @@ -197,168 +197,168 @@ unsafe extern "C" fn gaogaen_special_s_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); // Spawn the special windboxes if an alternate grab is detected if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG Grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 20, 100, 80, 0, 5.0, 0.0, 5.0, 2.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 20, 100, 80, 0, 5.0, 0.0, 5.0, 2.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } } // Otherwise produce the normal windbox else{ // Original Windbox - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 80, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // Regular grab windbox - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // Spawn the air grab/OTG grab box if we've detected we hit the windbox if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 4.0, 2.0, Some(0.0), Some(4.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 4.0, 2.0, Some(0.0), Some(4.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { // Clear windbox and spawn the grab AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(15.0), Some(6.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_A); + CATCH(agent, 0, Hash40::new("top"), 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(15.0), Some(6.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_A); } } // If the regular grab, then just clear the original windbox and spawn the grabbox else{ // Clear original windbox AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if !VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } GrabModule::set_rebound(boma, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); } } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_END); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } frame(lua_state, 74.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); } } -unsafe extern "C" fn gaogaen_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); for _ in 0..8{ - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } @@ -366,164 +366,164 @@ unsafe extern "C" fn gaogaen_special_s_start_effect(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn gaogaen_special_air_s_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_START); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 0.0, 350, 100, 30, 0, 5.0, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_G); - CATCH(fighter, 1, Hash40::new("top"), 2.5, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(9.5), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(8.0), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_G); + CATCH(agent, 1, Hash40::new("top"), 2.5, 0.0, 8.0, 2.0, Some(0.0), Some(8.0), Some(9.5), *FIGHTER_STATUS_KIND_SWING_GAOGAEN_CATCHED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 35.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_MOVE_END); } frame(lua_state, 44.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } frame(lua_state, 74.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn gaogaen_special_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_THROW_ROPE); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 95.0); } -unsafe extern "C" fn gaogaen_special_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_catch"), Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.9, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_catch"), Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.9, true, *EF_FLIP_YZ); // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } frame(lua_state, 6.0); for _ in 0..12{ - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } wait(lua_state, 2.0); } frame(lua_state, 31.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 180, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); for _ in 0..8{ - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab effects if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.35, true); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); } } } @@ -531,258 +531,258 @@ unsafe extern "C" fn gaogaen_special_s_throw_effect(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn gaogaen_special_s_lariat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); +unsafe extern "C" fn game_specialslariat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); // OTG/Anti-air grab throw boxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 15, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 15, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 77, 100, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 77, 100, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } // Regular grab else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } AttackModule::set_force_reaction(boma, 0, true, true); WorkModule::set_float(boma, 9.0, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLOAT_LARIAT_HIT_FRAME); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // OTG/Anti-air grab hitboxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 15.0, 15, 0, 0, 80, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 15.0, 15, 0, 0, 80, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 15.0, 105, 35, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 15.0, 105, 35, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } // Regular grab else{ - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } //CHECK_FINISH_CAMERA(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB) || VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB) { - FT_MOTION_RATE_RANGE(fighter, 20.0, 50.0, 26.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 50.0, 26.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn gaogaen_special_air_s_lariat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairslariat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 145, 474, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_force_reaction(boma, 0, true, true); WorkModule::set_float(boma, 9.0, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLOAT_LARIAT_HIT_FRAME); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 20.0, 145, 40, 0, 88, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 2, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); //CHECK_FINISH_CAMERA(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn gaogaen_special_s_shoulder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); +unsafe extern "C" fn game_specialsshoulder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 179, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 179, 0, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 105, 280, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 105, 280, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } } // Regular grab else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } AttackModule::set_force_reaction(boma, 0, true, true); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // OTG/Anti-air grab hitboxes if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_ALTERNATE_GRAB) { // OTG grab if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_GROUND_GRAB){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } // Anti-air grab else if VarModule::is_flag(boma.object(), vars::gaogaen::instance::IS_SPECIAL_S_AIR_GRAB){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BODY); } } // Regular grab else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA_IF_NOT_HP_MODE(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 45.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn gaogaen_special_air_s_shoulder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialairsshoulder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 100, 100, 0, 72, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); AttackModule::set_force_reaction(boma, 0, true, true); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 105, 34, 0, 128, 6.0, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 1, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { //CHECK_FINISH_CAMERA_IF_NOT_HP_MODE(fighter, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_DAMAGE_CUT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_FLAG_ENABLE_GRAVITY); } frame(lua_state, 45.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_S_WORK_ID_FLAG_AIR_CONTROL); } } -unsafe extern "C" fn gaogaen_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); //FT_MOTION_RATE(fighter, 6.0/(6.0-4.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_MOTION_RATE(fighter, 1.0); - SA_SET(fighter, *SITUATION_KIND_AIR); + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -790,182 +790,182 @@ unsafe extern "C" fn gaogaen_special_hi_start_game(fighter: &mut L2CAgentBase) { AttackModule::set_force_reaction(boma, 4, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.9); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.9); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); - FT_MOTION_RATE(fighter, 4.0/(6.0-4.0)); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 11.99); + FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 81, 1, 0, 82, 7.0, 0.0, 9.0, 2.0, None, None, None, 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 87, 1, 0, 81, 7.0, 0.0, 9.0, 2.0, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 1, 0, 80, 4.5, 0.0, 11.5, 2.0, Some(0.0), Some(11.5), Some(3.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 78, 1, 0, 90, 2.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(5.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 90, 1, 0, 91, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(6.0), 1.4, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.9); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.9); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 66, 5, 0, 58, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 45, 5, 0, 49, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 30, 5, 0, 34, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 5, 5, 0, 30, 3.0, 1.0, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 0.7, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_special_air_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire2"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire2"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::SHOULD_CROSS_CHOP_DIVE_EARLY) { - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("bust"), 0.0, 0.0, 0.0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("bust"), 0.0, 0.0, 0.0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, -2, -111, -28, 77, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, 0, -48, 23, 71, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, -2, -111, -28, 77, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 14.5, 0, -48, 23, 71, 1.2, true, *EF_FLIP_YZ); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_chop_line_start"), Hash40::new("trans"), 0, 22, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_chop_line_start"), Hash40::new("trans"), 0, 22, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn gaogaen_special_air_hi_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhiturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 5.0/(3.0 - 1.0)); + FT_MOTION_RATE(agent, 5.0/(3.0 - 1.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 3.0); if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - FT_MOTION_RATE(fighter, 6.0/(6.0 - 3.0)); + FT_MOTION_RATE(agent, 6.0/(6.0 - 3.0)); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ VarModule::off_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL); VarModule::on_flag(boma.object(), vars::common::instance::UP_SPECIAL_CANCEL); @@ -977,11 +977,11 @@ unsafe extern "C" fn gaogaen_special_air_hi_turn_game(fighter: &mut L2CAgentBase } } -unsafe extern "C" fn gaogaen_special_air_hi_turn_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhiturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { // if VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ // EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); // LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 1.5); @@ -1002,122 +1002,111 @@ unsafe extern "C" fn gaogaen_special_air_hi_turn_effect(fighter: &mut L2CAgentBa // } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::gaogaen::status::IS_INPUT_CROSS_CHOP_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 8, 5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 8, 5, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_special_air_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 70, 100, 0, 50, 7.0, 0.0, 12.0, 1.0, Some(0.0), Some(7.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 100, 0, 50, 7.0, 0.0, 12.0, 1.0, Some(0.0), Some(7.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.423); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.423); WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_HI_FLAG_DISABLE_OPPONENT_PASSIVE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 175, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 54, 48, 0, 135, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(3.0), Some(4.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 175, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 54, 48, 0, 135, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(3.0), Some(4.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 100, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 100, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 80, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 80, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 60, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 60, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 312, 100, 40, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 312, 100, 40, 0, 6.0, 0.0, 8.0, 2.0, Some(0.0), Some(6.0), Some(3.5), 1.15, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } -unsafe extern "C" fn gaogaen_special_hi_bound_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhibound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.8, 361, 72, 0, 89, 8.0, 0.0, 4.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 361, 80, 0, 85, 9.0, 0.0, 5.5, 10.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.8, 361, 72, 0, 89, 8.0, 0.0, 4.0, 8.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 361, 80, 0, 85, 9.0, 0.0, 5.5, 10.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn gaogaen_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.25); + FT_MOTION_RATE(agent, 0.25); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_LW_FLAG_STANCE_START); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_STATUS_SPECIAL_LW_FLAG_STANCE_END); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 32.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_specialn", gaogaen_special_n_game) - .acmd("game_specialairn", gaogaen_special_n_game) - .acmd("game_specialsstart", gaogaen_special_s_start_game) - .acmd("effect_specialsstart", gaogaen_special_s_start_effect) - .acmd("game_specialairsstart", gaogaen_special_air_s_start_game) - .acmd("game_specialsthrow", gaogaen_special_s_throw_game) - .acmd("game_specialairsthrow", gaogaen_special_s_throw_game) - .acmd("effect_specialsthrow", gaogaen_special_s_throw_effect) - .acmd("game_specialslariat", gaogaen_special_s_lariat_game) - .acmd("game_specialairslariat", gaogaen_special_air_s_lariat_game) - .acmd("game_specialsshoulder", gaogaen_special_s_shoulder_game) - .acmd( - "game_specialairsshoulder", - gaogaen_special_air_s_shoulder_game, - ) - .acmd("game_specialhistart", gaogaen_special_hi_start_game) - .acmd("game_specialairhistart", gaogaen_special_air_hi_start_game) - .acmd( - "effect_specialairhistart", - gaogaen_special_air_hi_start_effect, - ) - .acmd("game_specialairhiturn", gaogaen_special_air_hi_turn_game) - .acmd( - "effect_specialairhiturn", - gaogaen_special_air_hi_turn_effect, - ) - .acmd("game_specialairhifall", gaogaen_special_air_hi_fall_game) - .acmd("game_specialhibound", gaogaen_special_hi_bound_game) - .acmd("game_speciallwstart", gaogaen_special_lw_start_game) - .acmd("game_specialairlwstart", gaogaen_special_lw_start_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("game_specialairsthrow", game_specialsthrow); + agent.acmd("effect_specialsthrow", effect_specialsthrow); + agent.acmd("game_specialslariat", game_specialslariat); + agent.acmd("game_specialairslariat", game_specialairslariat); + agent.acmd("game_specialsshoulder", game_specialsshoulder); + agent.acmd("game_specialairsshoulder",game_specialairsshoulder,); + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("effect_specialairhistart",effect_specialairhistart,); + agent.acmd("game_specialairhiturn", game_specialairhiturn); + agent.acmd("effect_specialairhiturn",effect_specialairhiturn,); + agent.acmd("game_specialairhifall", game_specialairhifall); + agent.acmd("game_specialhibound", game_specialhibound); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); } \ No newline at end of file diff --git a/fighters/gaogaen/src/acmd/throws.rs b/fighters/gaogaen/src/acmd/throws.rs index 8610a3da71..814bd29234 100644 --- a/fighters/gaogaen/src/acmd/throws.rs +++ b/fighters/gaogaen/src/acmd/throws.rs @@ -1,584 +1,582 @@ use super::*; -unsafe extern "C" fn gaogaen_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = -1.0 * grab_y; if grab_y > 0.0 { z_mod = 3.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, 13.4 - z_mod, Some(0.0), Some(10.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 11.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, 5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, 4, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, 5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, 4, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_catchdash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = 0.0; if grab_y > 0.0 { z_mod = 4.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 9.0, 11.6 - z_mod, Some(0.0), Some(9.0), Some(2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catchdash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 9.0, 3.5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 8.5, 2.5, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 9.0, 3.5, rot_right, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 8.5, 2.5, rot_left, -225, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_catchturn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); ControlModule::clear_command(boma, true); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 13.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let mut z_mod = 0.0; if grab_y > 0.0 { z_mod = 3.0 * grab_y; } else if grab_y < 0.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 - z_mod, Some(0.0), Some(10.0), Some(-2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 20, 10, 0, 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 - z_mod, Some(0.0), Some(10.0), Some(-2.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 + z_mod, Some(0.0), Some(10.0), Some(-2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, (grab_y * 8.0) + 11.0, -16.9 + z_mod, Some(0.0), Some(10.0), Some(-2.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gaogaen_catchturn_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - let grab_y = VarModule::get_float(fighter.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); + if is_excute(agent) { + let grab_y = VarModule::get_float(agent.battle_object, vars::gaogaen::status::ANGLE_GRAB_STICK_Y); let rot_right = 0 - ((grab_y * 50.0) as i32); let rot_left = 180 + ((grab_y * 50.0) as i32); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, -7, rot_right, 135, 0, 1.2, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, -8, rot_left, -45, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 0, 11.0, -7, rot_right, 135, 0, 1.2, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_chop_arc"), Hash40::new("gaogaen_chop_arc"), Hash40::new("trans"), 7, 10.5, -8, rot_left, -45, 0, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 64, 0, 82, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 40, 64, 0, 82, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 4.0, 30, 63, 0, 100, 8.0, -3.0, 7.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 4.0, 30, 63, 0, 100, 8.0, -3.0, 7.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 6.0, 30, 62, 0, 100, 8.0, -4.5, 14.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 6.0, 30, 62, 0, 100, 8.0, -4.5, 14.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 42.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 8.0, 30, 61, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 8.0, 30, 61, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 48.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("hip"), 10.0, 30, 60, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("hip"), 10.0, 30, 60, 0, 100, 8.0, -6.0, 22.0, 0.0, Some(1.0), Some(6.0), Some(0.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - CHECK_FINISH_CAMERA(fighter, 16, 15); + CHECK_FINISH_CAMERA(agent, 16, 15); } frame(lua_state, 58.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn gaogaen_throw_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -3, 0, 180, -90, 0, 1.6, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -3, 0, 180, -90, 0, 1.6, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1, 0, 180, -90, 0, 1.8, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1, 0, 180, -90, 0, 1.8, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -2, 0, 180, 0, 0, 1.7, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, -2, 0, 180, 0, 0, 1.7, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 0, 0, 180, 0, 0, 2, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 0, 0, 180, 0, 0, 2, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 43.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1.5, 0, 180, 0, 0, 2.3, true, *EF_FLIP_YZ, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("rot"), 0, 1.5, 0, 180, 0, 0, 2.3, true, *EF_FLIP_YZ, 1.0); } frame(lua_state, 58.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 59.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 13, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 360, true, 0.7); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 13, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 360, true, 0.7); + LAST_EFFECT_SET_RATE(agent, 0.6); } } -unsafe extern "C" fn gaogaen_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } // Kill throw if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 40, 490, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 40, 490, 0, 20, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } // Techchase throw else{ - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 0.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 15.0/(16.0-11.0)); + FT_MOTION_RATE(agent, 15.0/(16.0-11.0)); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { // Kill throw if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } // Techchase throw else{ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 32, 80, 0, 60, 7.0, 0.0, 2.7, 2.6, Some(0.0), Some(2.7), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -4, 5); + CHECK_FINISH_CAMERA(agent, -4, 5); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &Vector3f{x: 2.439, y: -6.660, z: -5.0}, false, false); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 31.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {1.0} else {26.0/(52.0 - 15.0)}); - REVERSE_LR(fighter); + if is_excute(agent) { + FT_MOTION_RATE(agent, if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {1.0} else {26.0/(52.0 - 15.0)}); + REVERSE_LR(agent); } } -unsafe extern "C" fn gaogaen_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, 13.0, 20.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } frame(lua_state, 27.0); frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("sys_bomb_b"), Hash40::new("top"), 10, 0, -5.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_b"), Hash40::new("top"), 10, 0, -5.0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ // Incin Buster - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 14.0, 45, 20, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } else { // Normal throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 88, 79, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 88, 79, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 33.0/(22.0-10.0)); + FT_MOTION_RATE(agent, 33.0/(22.0-10.0)); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { //FT_CATCH_STOP(fighter, 14, 1); - CHECK_FINISH_CAMERA(fighter, 1, 20); + CHECK_FINISH_CAMERA(agent, 1, 20); let hitlag = if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {4.5} else {3.0}; let sound = if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {*COLLISION_SOUND_ATTR_HEAVY} else {*COLLISION_SOUND_ATTR_PUNCH}; - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 88, 70, 0, 65, 7.0, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(0.0), hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 88, 70, 0, 65, 7.0, 0.0, 10.0, 0.0, Some(0.0), Some(10.0), Some(0.0), hitlag, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn gaogaen_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("waist"), 0.0, 0.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("waist"), 0.0, 0.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 32, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 32, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("gaogaen_throw_hi"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("gaogaen_throw_hi"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(fighter, Hash40::new("gaogaen_revenge_start"), Hash40::new("top"), -2, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("gaogaen_revenge_start"), Hash40::new("top"), -2, 10, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn gaogaen_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("vc_gaogaen_appeal_l01")); + PLAY_SE(agent, Hash40::new("vc_gaogaen_appeal_l01")); } else { - PLAY_SEQUENCE(fighter, Hash40::new("seq_gaogaen_rnd_attack")); + PLAY_SEQUENCE(agent, Hash40::new("seq_gaogaen_rnd_attack")); } } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_kick_hit_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_kick_hit_m")); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_gaogaen_rnd_attackappeal01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_gaogaen_rnd_attackappeal01")); } } } -unsafe extern "C" fn gaogaen_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); VarModule::off_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { VarModule::on_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK); } - if is_excute(fighter) { + if is_excute(agent) { let bkb = if WorkModule::is_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_REVENGE) { 50 } else { 70 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 47, 0, bkb, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 68, 47, 0, bkb, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 12, 1); - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 12, 1); + CHECK_FINISH_CAMERA(agent, 8, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn gaogaen_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("bust"), 0.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("arml"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 1.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("armr"), 7.0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("gaogaen_belt_fire_appeal"), Hash40::new("feeler"), 0, 3, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT(fighter, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT(agent, Hash40::new("sys_hit_fire"), Hash40::new("top"), 0.0, 8.0, 10.0, 0, 0, 0, 0.35, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.25); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 24, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 24, 0, 90, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 21, 0, 90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); + if is_excute(agent) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -10, 21, 0, 90, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.5); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_catch", gaogaen_catch_game) - .acmd("effect_catch", gaogaen_catch_effect) - .acmd("game_catchturn", gaogaen_catchturn_game) - .acmd("effect_catchturn", gaogaen_catchturn_effect) - .acmd("game_catchdash", gaogaen_catchdash_game) - .acmd("effect_catchdash", gaogaen_catchdash_effect) - .acmd("game_throwf", gaogaen_throw_f_game) - .acmd("effect_throwf", gaogaen_throw_f_effect) - .acmd("game_throwb", gaogaen_throw_b_game) - .acmd("effect_throwb", gaogaen_throw_b_effect) - .acmd("game_throwhi", gaogaen_throw_hi_game) - .acmd("effect_throwhi", gaogaen_throw_hi_effect) - .acmd("sound_throwhi", gaogaen_throw_hi_sound) - .acmd("game_throwlw", gaogaen_throw_lw_game) - .acmd("effect_throwlw", gaogaen_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("effect_catch", effect_catch); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("effect_catchturn", effect_catchturn); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("effect_catchdash", effect_catchdash); + agent.acmd("game_throwf", game_throwf); + agent.acmd("effect_throwf", effect_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } diff --git a/fighters/gaogaen/src/acmd/tilts.rs b/fighters/gaogaen/src/acmd/tilts.rs index a933f9c2f5..b0ee5aad41 100644 --- a/fighters/gaogaen/src/acmd/tilts.rs +++ b/fighters/gaogaen/src/acmd/tilts.rs @@ -1,172 +1,170 @@ use super::*; -unsafe extern "C" fn gaogaen_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 12.0, 31, 88, 0, 54, 4.5, -1.0, -1.8, 1.4, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 31, 88, 0, 54, 3.4, 0.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 13.0, 31, 88, 0, 54, 4.5, 3.4, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gaogaen_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 4.5, 8.0, 7, 0, 0, 1.0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 4.5, 8.0, 7, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn gaogaen_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.1, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 86, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 86, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 86, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 86, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 1.2, 3.8); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 9.0, 94, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 94, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 9.0, 94, 55, 0, 90, 4.8, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 94, 55, 0, 90, 3.6, 1.8, 0.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.1, 3.8); } } -unsafe extern "C" fn gaogaen_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 89, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 93, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 97, 42, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 89, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 93, 42, 0, 90, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 97, 42, 0, 80, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); JostleModule::set_status(boma, true); } } -pub fn install() { - smashline::Agent::new("gaogaen") - .acmd("game_attacks3hi", gaogaen_attack_s3_hi_game) - .acmd("effect_attacks3hi", gaogaen_attack_s3_hi_effect) - .acmd("game_attacks3", gaogaen_attack_s3_s_game) - .acmd("effect_attacks3", gaogaen_attack_s3_s_effect) - .acmd("game_attacks3lw", gaogaen_attack_s3_lw_game) - .acmd("effect_attacks3lw", gaogaen_attack_s3_lw_effect) - .acmd("game_attackhi3", gaogaen_attack_hi3_game) - .acmd("game_attacklw3", gaogaen_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gaogaen/src/lib.rs b/fighters/gaogaen/src/lib.rs index 7bb0378152..b1f2edb1c9 100644 --- a/fighters/gaogaen/src/lib.rs +++ b/fighters/gaogaen/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("gaogaen"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); } diff --git a/fighters/gaogaen/src/opff.rs b/fighters/gaogaen/src/opff.rs index d531e0cfa8..2384babe0a 100644 --- a/fighters/gaogaen/src/opff.rs +++ b/fighters/gaogaen/src/opff.rs @@ -263,8 +263,6 @@ pub fn gaogaen_opff(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModul } } -pub fn install() { - smashline::Agent::new("gaogaen") - .on_line(Main, gaogaen_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gaogaen_frame_wrapper); } diff --git a/fighters/gaogaen/src/status.rs b/fighters/gaogaen/src/status.rs index a8d303b562..6dd690475d 100644 --- a/fighters/gaogaen/src/status.rs +++ b/fighters/gaogaen/src/status.rs @@ -4,7 +4,7 @@ use globals::*; mod attack_lw4; mod special_n; -pub fn install() { - attack_lw4::install(); - special_n::install(); +pub fn install(agent: &mut Agent) { + attack_lw4::install(agent); + special_n::install(agent); } diff --git a/fighters/gaogaen/src/status/attack_lw4.rs b/fighters/gaogaen/src/status/attack_lw4.rs index 81c3422fac..f79c674164 100644 --- a/fighters/gaogaen/src/status/attack_lw4.rs +++ b/fighters/gaogaen/src/status/attack_lw4.rs @@ -65,13 +65,7 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo } 0.into() } -pub fn install() { - smashline::Agent::new("gaogaen") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main) - .status( - MapCorrection, - *FIGHTER_STATUS_KIND_ATTACK_LW4, - attack_lw4_map_correction, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection,*FIGHTER_STATUS_KIND_ATTACK_LW4,attack_lw4_map_correction,); } diff --git a/fighters/gaogaen/src/status/special_n.rs b/fighters/gaogaen/src/status/special_n.rs index 1368b124a0..802140304d 100644 --- a/fighters/gaogaen/src/status/special_n.rs +++ b/fighters/gaogaen/src/status/special_n.rs @@ -92,9 +92,7 @@ pub unsafe extern "C" fn exec_special_n(fighter: &mut L2CFighterCommon) -> L2CVa // } // return 0.into() -pub fn install() { - smashline::Agent::new("gaogaen") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, gaogaen_special_n_pre) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, exec_special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, gaogaen_special_n_pre); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, exec_special_n); } From c5e9b465d4efe2790068419ddec6339d84e03967 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Sat, 23 Mar 2024 22:57:06 -0400 Subject: [PATCH 092/172] adjustments --- fighters/chrom/src/lib.rs | 3 +- fighters/miiswordsman/src/acmd/specials.rs | 2 +- fighters/miiswordsman/src/status.rs | 1 - fighters/shulk/src/acmd/specials.rs | 2 +- fighters/tantan/src/beam/acmd.rs | 46 +++++ .../tantan/src/{tantan_beam => beam}/mod.rs | 0 fighters/tantan/src/lib.rs | 12 ++ fighters/tantan/src/punch1/acmd.rs | 191 ++++++++++++++++++ .../src/{tantan_punch1 => punch1}/mod.rs | 0 fighters/tantan/src/punch2/acmd.rs | 108 ++++++++++ .../src/{tantan_punch2 => punch2}/mod.rs | 0 fighters/tantan/src/punch3/acmd.rs | 123 +++++++++++ .../src/{tantan_punch3 => punch3}/mod.rs | 0 fighters/tantan/src/ring/acmd.rs | 55 +++++ .../tantan/src/{tantan_ring => ring}/mod.rs | 0 fighters/tantan/src/tantan_beam/acmd.rs | 7 - .../tantan/src/tantan_beam/acmd/special.rs | 44 ---- fighters/tantan/src/tantan_punch1/acmd.rs | 7 - .../tantan/src/tantan_punch1/acmd/special.rs | 185 ----------------- fighters/tantan/src/tantan_punch2/acmd.rs | 7 - .../tantan/src/tantan_punch2/acmd/special.rs | 104 ---------- fighters/tantan/src/tantan_punch3/acmd.rs | 7 - .../tantan/src/tantan_punch3/acmd/special.rs | 120 ----------- fighters/tantan/src/tantan_ring/acmd.rs | 7 - .../tantan/src/tantan_ring/acmd/special.rs | 53 ----- 25 files changed, 539 insertions(+), 545 deletions(-) create mode 100644 fighters/tantan/src/beam/acmd.rs rename fighters/tantan/src/{tantan_beam => beam}/mod.rs (100%) create mode 100644 fighters/tantan/src/punch1/acmd.rs rename fighters/tantan/src/{tantan_punch1 => punch1}/mod.rs (100%) create mode 100644 fighters/tantan/src/punch2/acmd.rs rename fighters/tantan/src/{tantan_punch2 => punch2}/mod.rs (100%) create mode 100644 fighters/tantan/src/punch3/acmd.rs rename fighters/tantan/src/{tantan_punch3 => punch3}/mod.rs (100%) create mode 100644 fighters/tantan/src/ring/acmd.rs rename fighters/tantan/src/{tantan_ring => ring}/mod.rs (100%) delete mode 100644 fighters/tantan/src/tantan_beam/acmd.rs delete mode 100644 fighters/tantan/src/tantan_beam/acmd/special.rs delete mode 100644 fighters/tantan/src/tantan_punch1/acmd.rs delete mode 100644 fighters/tantan/src/tantan_punch1/acmd/special.rs delete mode 100644 fighters/tantan/src/tantan_punch2/acmd.rs delete mode 100644 fighters/tantan/src/tantan_punch2/acmd/special.rs delete mode 100644 fighters/tantan/src/tantan_punch3/acmd.rs delete mode 100644 fighters/tantan/src/tantan_punch3/acmd/special.rs delete mode 100644 fighters/tantan/src/tantan_ring/acmd.rs delete mode 100644 fighters/tantan/src/tantan_ring/acmd/special.rs diff --git a/fighters/chrom/src/lib.rs b/fighters/chrom/src/lib.rs index 6b855cdc51..349bd73679 100644 --- a/fighters/chrom/src/lib.rs +++ b/fighters/chrom/src/lib.rs @@ -38,7 +38,8 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(agent); let agent = &mut Agent::new("chrom"); + let agent = &mut Agent::new("chrom"); + acmd::install(agent); opff::install(agent); status::install(agent); agent.install(); diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs index c8fbb799d1..4989008747 100644 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ b/fighters/miiswordsman/src/acmd/specials.rs @@ -1846,5 +1846,5 @@ pub fn install(agent: &mut Agent) { //.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game) agent.acmd("game_specialairlw3", game_specialairlw3); agent.acmd("game_specialairlw3end", game_specialairlw3end); - agent//.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) + //.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status.rs index 4efc9410bc..d7d0fc2a16 100644 --- a/fighters/miiswordsman/src/status.rs +++ b/fighters/miiswordsman/src/status.rs @@ -1306,5 +1306,4 @@ pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end); agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); agent.status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop); - agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/shulk/src/acmd/specials.rs b/fighters/shulk/src/acmd/specials.rs index efd07e19c8..f1948d03c8 100644 --- a/fighters/shulk/src/acmd/specials.rs +++ b/fighters/shulk/src/acmd/specials.rs @@ -341,5 +341,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairhi", game_specialhi); agent.acmd("game_speciallwattack", game_speciallwattack); agent.acmd("game_specialairlwattack", game_speciallwattack); - agent.acmd("game_speciallwf", game_speciallwf) + agent.acmd("game_speciallwf", game_speciallwf); } diff --git a/fighters/tantan/src/beam/acmd.rs b/fighters/tantan/src/beam/acmd.rs new file mode 100644 index 0000000000..babe99708c --- /dev/null +++ b/fighters/tantan/src/beam/acmd.rs @@ -0,0 +1,46 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let damage = if is_dragonized {9.0} else {6.0}; + let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; + let range = if is_dragonized {30.0} else {25.0}; + let size = if is_dragonized {2.8} else {1.3}; + + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::disable_tip(boma); + } +} + +unsafe extern "C" fn effect_beam(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let mut is_dragonized = false; + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + } + let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; + let offset = if is_dragonized {-1.0} else {-2.5}; + EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_bigshoot", game_shoot); + agent.acmd("effect_beam", effect_beam); + agent.acmd("effect_bigbeam", effect_beam); +} diff --git a/fighters/tantan/src/tantan_beam/mod.rs b/fighters/tantan/src/beam/mod.rs similarity index 100% rename from fighters/tantan/src/tantan_beam/mod.rs rename to fighters/tantan/src/beam/mod.rs diff --git a/fighters/tantan/src/lib.rs b/fighters/tantan/src/lib.rs index 9e8603d4ef..2b0a046028 100644 --- a/fighters/tantan/src/lib.rs +++ b/fighters/tantan/src/lib.rs @@ -7,6 +7,12 @@ pub mod acmd; pub mod status; pub mod opff; +mod punch1; +mod punch2; +mod punch3; +mod beam; +mod ring; + use smash::{ lib::{ L2CValue, @@ -44,4 +50,10 @@ pub fn install() { opff::install(agent); status::install(agent); agent.install(); + + punch1::install(); + punch2::install(); + punch3::install(); + beam::install(); + ring::install(); } diff --git a/fighters/tantan/src/punch1/acmd.rs b/fighters/tantan/src/punch1/acmd.rs new file mode 100644 index 0000000000..d70c66e103 --- /dev/null +++ b/fighters/tantan/src/punch1/acmd.rs @@ -0,0 +1,191 @@ +use super::*; + +unsafe extern "C" fn dragon_game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn dragon_game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn dragon_game_attackdragonshootlong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + } + } + //Dragon Beam linker + frame(lua_state, 6.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; + let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; + let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; + let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; + ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); + AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else + { + AttackModule::set_power(boma, 0,16.0, false); + } + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn dragon_effect_attackdragonshootlong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); + LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); + EffectModule::enable_sync_init_pos_last(boma); + } +} + +unsafe extern "C" fn dragon_special_hi_attack_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); + STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); + } + frame(lua_state, 2.0); + if is_excute(agent) { + let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; + PLAY_SE(agent, sfx); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", dragon_game_attackshort); + agent.acmd("game_attacklong", dragon_game_attacklong); + agent.acmd("game_attackdragonshootlong",dragon_game_attackdragonshootlong,); + agent.acmd("effect_attackdragonshootlong",dragon_effect_attackdragonshootlong,); + agent.acmd("game_specialairhiattack", dragon_special_hi_attack_game); + agent.acmd("game_specialairhiattackdragon",dragon_special_hi_attack_game,); + agent.acmd("sound_attackbeamloop", dragon_sound_attackbeamloop); +} diff --git a/fighters/tantan/src/tantan_punch1/mod.rs b/fighters/tantan/src/punch1/mod.rs similarity index 100% rename from fighters/tantan/src/tantan_punch1/mod.rs rename to fighters/tantan/src/punch1/mod.rs diff --git a/fighters/tantan/src/punch2/acmd.rs b/fighters/tantan/src/punch2/acmd.rs new file mode 100644 index 0000000000..ec6c6e14a7 --- /dev/null +++ b/fighters/tantan/src/punch2/acmd.rs @@ -0,0 +1,108 @@ +use super::*; + +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + frame(lua_state, 14.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; + frame(lua_state, clearFrame-2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/tantan_punch2/mod.rs b/fighters/tantan/src/punch2/mod.rs similarity index 100% rename from fighters/tantan/src/tantan_punch2/mod.rs rename to fighters/tantan/src/punch2/mod.rs diff --git a/fighters/tantan/src/punch3/acmd.rs b/fighters/tantan/src/punch3/acmd.rs new file mode 100644 index 0000000000..65d6a63aee --- /dev/null +++ b/fighters/tantan/src/punch3/acmd.rs @@ -0,0 +1,123 @@ +use super::*; + +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; + let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; + frame(lua_state, reboundFrame); + //Rebound hitbox + if is_excute(agent) { + if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + AttackModule::enable_safe_pos(boma); + AttackModule::disable_tip(boma); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ + AttackModule::clear_all(boma); + } + else{ + //Rebound hitbox + ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); + //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); + } + } + let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +//Fly controls when RamRam gets sent outwards +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + agent.acmd("game_attacklonghold", game_attacklonghold); +} diff --git a/fighters/tantan/src/tantan_punch3/mod.rs b/fighters/tantan/src/punch3/mod.rs similarity index 100% rename from fighters/tantan/src/tantan_punch3/mod.rs rename to fighters/tantan/src/punch3/mod.rs diff --git a/fighters/tantan/src/ring/acmd.rs b/fighters/tantan/src/ring/acmd.rs new file mode 100644 index 0000000000..94c81f2c2f --- /dev/null +++ b/fighters/tantan/src/ring/acmd.rs @@ -0,0 +1,55 @@ +use super::*; + +unsafe extern "C" fn game_attackfly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +//Fire ramram +unsafe extern "C" fn game_attacks4fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //Scoop for the first few frames, then send back and down + frame(lua_state, 1.0); + if is_excute(agent) { + //Rebound hitbox + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::clear(boma,1,false); + } + let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) + && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) + {7.0} else {6.0}; + frame(lua_state, clearFrame); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackfly", game_attackfly); + agent.acmd("game_attacks4fly", game_attacks4fly); +} diff --git a/fighters/tantan/src/tantan_ring/mod.rs b/fighters/tantan/src/ring/mod.rs similarity index 100% rename from fighters/tantan/src/tantan_ring/mod.rs rename to fighters/tantan/src/ring/mod.rs diff --git a/fighters/tantan/src/tantan_beam/acmd.rs b/fighters/tantan/src/tantan_beam/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/tantan/src/tantan_beam/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_beam/acmd/special.rs b/fighters/tantan/src/tantan_beam/acmd/special.rs deleted file mode 100644 index 95040dc3ba..0000000000 --- a/fighters/tantan/src/tantan_beam/acmd/special.rs +++ /dev/null @@ -1,44 +0,0 @@ -use super::*; -unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let damage = if is_dragonized {9.0} else {6.0}; - let sfx_level = if is_dragonized {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - let range = if is_dragonized {30.0} else {25.0}; - let size = if is_dragonized {2.8} else {1.3}; - - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, 75, 0, 70, size, 0.0, 0.0, 2.0, Some(0.0), Some(0.0), Some(range), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sfx_level, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::disable_tip(boma); - } -} -unsafe extern "C" fn effect_beam(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let mut is_dragonized = false; - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - } - let effect = if is_dragonized {Hash40::new("tantan_dragon_beam2_body")} else {Hash40::new("tantan_dragon_beam1_body")}; - let offset = if is_dragonized {-1.0} else {-2.5}; - EFFECT_FOLLOW(agent, effect, Hash40::new("top"), 0, 0, offset, 0, 90, 180, 1, true); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_shoot", game_shoot); - agent.acmd("game_bigshoot", game_bigshoot); - agent.acmd("effect_beam", effect_beam); - agent.acmd("effect_bigbeam", effect_bigbeam); -} diff --git a/fighters/tantan/src/tantan_punch1/acmd.rs b/fighters/tantan/src/tantan_punch1/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/tantan/src/tantan_punch1/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch1/acmd/special.rs b/fighters/tantan/src/tantan_punch1/acmd/special.rs deleted file mode 100644 index d93c1fdb60..0000000000 --- a/fighters/tantan/src/tantan_punch1/acmd/special.rs +++ /dev/null @@ -1,185 +0,0 @@ -use super::*; -unsafe extern "C" fn dragon_game_attackshort(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 0.7, 3.1, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); -} -frame(lua_state, 2.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 8.0, 45, 87, 0, 50, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); -} - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {12.0} else {9.0}; -frame(lua_state, clearFrame); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -unsafe extern "C" fn dragon_game_attacklong(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 0.7, 3.1, 0.5, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); -} -frame(lua_state, 2.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 12.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); -} -frame(lua_state, 4.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("have"), 16.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } -} -frame(lua_state, 7.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } -} -frame(lua_state, 9.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - ATTACK(agent, 0, 0, Hash40::new("have"), 13.0, 45, 78, 0, 40, 2.9, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } -} - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {15.0} else {11.0}; -frame(lua_state, clearFrame); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -unsafe extern "C" fn dragon_game_attackdragonshootlong(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 0.7, 5.4, 0.5, 0.3, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); -} -frame(lua_state, 1.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 13.8, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); -} -frame(lua_state, 4.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, 45, 78, 0, 40, 3.2, 5.4, 0.5, 0.3, Some(1.0), Some(0.5), Some(0.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - } -} - //Dragon Beam linker -frame(lua_state, 6.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - let angle: u64 = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {45} else {361}; - let kbg = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {70} else {0}; - let fkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {0} else {10}; - let bkb = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR) {40} else {60}; - ATTACK(agent, 0, 0, Hash40::new("have"), 16.75, angle, kbg, fkb, bkb, 3.2, 3.1, 0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_CHANGE_HIT_EFFECT); - AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); - } -} -frame(lua_state, 9.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else - { - AttackModule::set_power(boma, 0,16.0, false); - } -} -frame(lua_state, 15.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -unsafe extern "C" fn dragon_effect_attackdragonshootlong(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("tantan_wepon1_wind_big"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("tantan_wepon_ringwind"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.6, true); - LAST_EFFECT_SET_COLOR(agent,1.0,0.8,0.25); - EffectModule::enable_sync_init_pos_last(boma); -} -frame(lua_state, 14.0); -if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("tantan_dragon_eye_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); - EffectModule::enable_sync_init_pos_last(boma); -} -} - -unsafe extern "C" fn dragon_special_hi_attack_game(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(-6.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 1.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("have"), 12.75, angle, 73, 0, 56, 4.5, 3.0, 0.0, 0.3, Some(0.0), Some(0.0), Some(0.3), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_TANTAN_PUNCH01, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 9.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_tantan_attack01_short")); - STOP_SE(agent, Hash40::new("se_tantan_attack01_long")); -} -frame(lua_state, 2.0); -if is_excute(agent) { - let sfx = if WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE) {Hash40::new("se_tantan_attack01_beam_max")} else {Hash40::new("se_tantan_attack01_beam")}; - PLAY_SE(agent, sfx); -} -} -pub fn install(agent: &mut Agent) { -agent.acmd("game_attackshort", dragon_game_attackshort); -agent.acmd("game_attacklong", dragon_game_attacklong); -agent.acmd("game_attackdragonshootlong",dragon_game_attackdragonshootlong,); -agent.acmd("effect_attackdragonshootlong",dragon_effect_attackdragonshootlong,); -agent.acmd("game_specialairhiattack", dragon_special_hi_attack_game); -agent.acmd("game_specialairhiattackdragon",dragon_special_hi_attack_game,); -agent.acmd("sound_attackbeamloop", dragon_sound_attackbeamloop); -} diff --git a/fighters/tantan/src/tantan_punch2/acmd.rs b/fighters/tantan/src/tantan_punch2/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/tantan/src/tantan_punch2/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch2/acmd/special.rs b/fighters/tantan/src/tantan_punch2/acmd/special.rs deleted file mode 100644 index d73ff24823..0000000000 --- a/fighters/tantan/src/tantan_punch2/acmd/special.rs +++ /dev/null @@ -1,104 +0,0 @@ -use super::*; -unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); -} -frame(lua_state, 1.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 13.0, 55, 92, 0, 50, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); -} - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {19.0} else {17.0}; -frame(lua_state, clearFrame-2.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("center"), 19.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - frame(lua_state, 14.0); - if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("center"), 17.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {21.0}; - frame(lua_state, clearFrame-2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} -unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 0.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); -} -frame(lua_state, 1.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_megabolt"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); -} -frame(lua_state, 4.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("center"), 22.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } -} -frame(lua_state, 14.0); -if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - ATTACK(agent, 0, 0, Hash40::new("center"), 20.0, 55, 75, 0, 60, 3.7, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH02, *ATTACK_REGION_PUNCH); - } -} - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {23.0} else {20.0}; -frame(lua_state, clearFrame-2.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -} -pub fn install(agent: &mut Agent) { -agent.acmd("game_attackshort", game_attackshort); -agent.acmd("game_attacklong", game_attacklong); -agent.acmd("game_attacklonghold", game_attacklonghold); -} diff --git a/fighters/tantan/src/tantan_punch3/acmd.rs b/fighters/tantan/src/tantan_punch3/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/tantan/src/tantan_punch3/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_punch3/acmd/special.rs b/fighters/tantan/src/tantan_punch3/acmd/special.rs deleted file mode 100644 index 3805a59609..0000000000 --- a/fighters/tantan/src/tantan_punch3/acmd/special.rs +++ /dev/null @@ -1,120 +0,0 @@ -use super::*; -unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 5.0, 70, 95, 0, 40, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2.5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {8.0} else {6.0}; - let reboundFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {5.0} else {4.0}; - frame(lua_state, reboundFrame); - //Rebound hitbox - if is_excute(agent) { - if (!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 6.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} -unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 10.0, 70, 69, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 4.0); - if is_excute(agent) { - if(WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} -unsafe extern "C" fn game_attacklonghold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 0.7, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - AttackModule::enable_safe_pos(boma); - AttackModule::disable_tip(boma); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 12.0, 368, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 368, 0, 10, 60, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 24, false, *BATTLE_OBJECT_ID_INVALID as u32); - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("cakram1"), &Vector2f{x: 14.0, y: 1.0}, 6, false); - AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - frame(lua_state, 7.0); - if is_excute(agent) { - if (WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_BOUND)){ - AttackModule::clear_all(boma); - } - else{ - //Rebound hitbox - ControlModule::set_rumble(boma, Hash40::new("rbkind_76_hotling"), 20, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 13.8, 90, 0, 10, 60, 3.0, 0.0, 2.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_PUNCH); - //AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); - } - } - let clearFrame = if(!WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_AIR)) {10.0} else {9.0}; - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -//Fly controls when RamRam gets sent outwards -pub fn install(agent: &mut Agent) { -agent.acmd("game_attackshort", game_attackshort); -agent.acmd("game_attacklong", game_attacklong); -agent.acmd("game_attacklonghold", game_attacklonghold); -} diff --git a/fighters/tantan/src/tantan_ring/acmd.rs b/fighters/tantan/src/tantan_ring/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/tantan/src/tantan_ring/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/tantan_ring/acmd/special.rs b/fighters/tantan/src/tantan_ring/acmd/special.rs deleted file mode 100644 index 744b485500..0000000000 --- a/fighters/tantan/src/tantan_ring/acmd/special.rs +++ /dev/null @@ -1,53 +0,0 @@ -use super::*; -unsafe extern "C" fn game_attackfly(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - //Rebound hitbox - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} -//Fire ramram -unsafe extern "C" fn game_attacks4fly(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - //Scoop for the first few frames, then send back and down - frame(lua_state, 1.0); - if is_excute(agent) { - //Rebound hitbox - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_attackfly", game_attackfly); - agent.acmd("game_attacks4fly", game_attacks4fly); -} From 485451ed3f88c9db8a602347e06a89a47d5a520b Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 23:27:45 -0400 Subject: [PATCH 093/172] Greninja crate --- fighters/gekkouga/src/acmd/aerials.rs | 230 ++++++++++++------------ fighters/gekkouga/src/acmd/ground.rs | 60 +++---- fighters/gekkouga/src/acmd/mod.rs | 16 +- fighters/gekkouga/src/acmd/other.rs | 196 ++++++++++---------- fighters/gekkouga/src/acmd/smashes.rs | 94 +++++----- fighters/gekkouga/src/acmd/specials.rs | 2 +- fighters/gekkouga/src/acmd/throws.rs | 140 +++++++-------- fighters/gekkouga/src/acmd/tilts.rs | 240 ++++++++++++------------- fighters/gekkouga/src/lib.rs | 13 +- fighters/gekkouga/src/opff.rs | 6 +- fighters/gekkouga/src/shuriken/acmd.rs | 14 ++ fighters/gekkouga/src/shuriken/mod.rs | 9 + 12 files changed, 509 insertions(+), 511 deletions(-) create mode 100644 fighters/gekkouga/src/shuriken/acmd.rs create mode 100644 fighters/gekkouga/src/shuriken/mod.rs diff --git a/fighters/gekkouga/src/acmd/aerials.rs b/fighters/gekkouga/src/acmd/aerials.rs index e408569ac9..bc9b6f78dc 100644 --- a/fighters/gekkouga/src/acmd/aerials.rs +++ b/fighters/gekkouga/src/acmd/aerials.rs @@ -1,251 +1,249 @@ use super::*; -unsafe extern "C" fn gekkouga_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 11.0, 65, 82, 0, 45, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 11.0, 65, 82, 0, 45, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 69, 85, 0, 40, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 69, 85, 0, 40, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_NONE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gekkouga_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact_air"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.57, true); - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact_air"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.57, true); + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } } -unsafe extern "C" fn gekkouga_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 60, 80, 0, 50, 3.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 60, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 60, 80, 0, 50, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 4.25, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 3.5, 0.0, -11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 60, 80, 0, 50, 3.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 60, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 60, 80, 0, 50, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 4.25, 0.0, -7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 45, 103, 0, 30, 3.5, 0.0, -11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gekkouga_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_sword"), Hash40::new("haver"), -0.0, 0, 0, 180, -90, 0, 1.075, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_sword"), Hash40::new("haver"), -0.0, 0, 0, 180, -90, 0, 1.075, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - effect!(fighter, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_gekkouga_sword1"), Hash40::new("tex_gekkouga_sword1"), 4, Hash40::new("haver"), 0, -1.7, 0, Hash40::new("haver"), -0.0, -13.0, 0, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 180, -90, 0, 1.1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1001); - fighter.pop_lua_stack(0); + if is_excute(agent) { + effect!(agent, *MA_MSC_CMD_EFFECT_AFTER_IMAGE3_ON, Hash40::new("tex_gekkouga_sword1"), Hash40::new("tex_gekkouga_sword1"), 4, Hash40::new("haver"), 0, -1.7, 0, Hash40::new("haver"), -0.0, -13.0, 0, true, Hash40::new("null"), Hash40::new("haver"), 0, 0, 0, 180, -90, 0, 1.1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_BLEND_SRC_ONE, 1001); + agent.pop_lua_stack(0); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_sword"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_sword"), false, false); } } -unsafe extern "C" fn gekkouga_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("footr"), 3.0, 367, 100, 0, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 35, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 35, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 3.0, 367, 100, 0, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 35, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 35, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("footr"), 3.0, 80, 100, 80, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 75, 100, 110, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 3.0, 65, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 3.0, 80, 100, 80, 0, 5.5, 0.0, -1.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 75, 100, 110, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 3.0, 65, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("footr"), 2.5, 365, 100, 0, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 40, 100, 105, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 2.5, 35, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footr"), 2.5, 365, 100, 0, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 40, 100, 105, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 2.5, 35, 100, 140, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("footr"), 2.5, 80, 100, 80, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 2.5, 75, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 2.5, 65, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 2.5, 80, 100, 80, 0, 5.5, 0.0, -1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 2.5, 75, 100, 100, 0, 4.3, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 2.5, 65, 100, 130, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 6.0, 55, 90, 0, 60, 5.8, 0.0, -1.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 55, 90, 0, 60, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 6.0, 55, 90, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 55, 90, 0, 60, 5.8, 0.0, -1.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 55, 90, 0, 60, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 6.0, 55, 90, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gekkouga_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); for _ in 0..5 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.3, 367, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.3, 365, 80, 0, 45, 5.5, 0.0, 24.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.3, 367, 80, 0, 45, 5.5, 0.0, 17.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 18.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 18.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 78, 162, 0, 56, 6.0, 0.0, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn gekkouga_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 270, 95, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 270, 95, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 270, 85, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 270, 85, 0, 20, 4.3, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 75, 0, 75, 5.2, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 75, 0, 75, 5.2, 0.0, 0.1, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attackairn", gekkouga_attack_air_n_game) - .acmd("effect_attackairn", gekkouga_attack_air_n_effect) - .acmd("game_attackairf", gekkouga_attack_air_f_game) - .acmd("effect_attackairf", gekkouga_attack_air_f_effect) - .acmd("game_attackairb", gekkouga_attack_air_b_game) - .acmd("game_attackairhi", gekkouga_attack_air_hi_game) - .acmd("game_attackairlw", gekkouga_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gekkouga/src/acmd/ground.rs b/fighters/gekkouga/src/acmd/ground.rs index 3b9cde051e..ff48f9e4e4 100644 --- a/fighters/gekkouga/src/acmd/ground.rs +++ b/fighters/gekkouga/src/acmd/ground.rs @@ -1,60 +1,58 @@ use super::*; -unsafe extern "C" fn gekkouga_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 55, 80, 0, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 65, 60, 0, 90, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 8.0, 75, 40, 0, 90, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 55, 80, 0, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 65, 60, 0, 90, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 8.0, 75, 40, 0, 90, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gekkouga_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 4.5, 0, -30, 190, 1.1, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.3); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 3, 4.5, 0, -30, 190, 1.1, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.3); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 12.5, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 12.5, 0, 0, 0, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_water_impact"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_water_impact"), false, false); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attackdash", gekkouga_attack_dash_game) - .acmd("effect_attackdash", gekkouga_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/gekkouga/src/acmd/mod.rs b/fighters/gekkouga/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/gekkouga/src/acmd/mod.rs +++ b/fighters/gekkouga/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/gekkouga/src/acmd/other.rs b/fighters/gekkouga/src/acmd/other.rs index 81c3f952ad..87314e6c69 100644 --- a/fighters/gekkouga/src/acmd/other.rs +++ b/fighters/gekkouga/src/acmd/other.rs @@ -1,238 +1,222 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} } } -unsafe extern "C" fn gekkouga_jump_aerial_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_jumpaerialback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_GEKKOUGA_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_BOUND){ let bounce_speed_mul = Vector3f { x: 1.0, y: 0.75, z: 1.0 }; KineticModule::mul_speed(boma, &bounce_speed_mul, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_GEKKOUGA_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_BOUND); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); } frame(lua_state, 11.0); // Effectively F13 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_gekkouga_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gekkouga_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_gekkouga_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_gekkouga_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_gekkouga_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_gekkouga_step_left_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn gekkouga_shuriken_shot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 75, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("gekkouga_shuriken") - .acmd("game_shot", gekkouga_shuriken_shot_game) - .install(); - smashline::Agent::new("gekkouga") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_jumpaerialback", gekkouga_jump_aerial_b_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) {; + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_jumpaerialback", game_jumpaerialback); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gekkouga/src/acmd/smashes.rs b/fighters/gekkouga/src/acmd/smashes.rs index 61c8a713e5..7cfae12021 100644 --- a/fighters/gekkouga/src/acmd/smashes.rs +++ b/fighters/gekkouga/src/acmd/smashes.rs @@ -1,100 +1,98 @@ use super::*; -unsafe extern "C" fn gekkouga_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0, 361, 105, 0, 35, 3.0, 0.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 361, 105, 0, 35, 3.5, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0, 361, 105, 0, 35, 3.0, 0.0, -1.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gekkouga_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 90, 0, 30, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 10, 0, 40, 5.0, 0.0, 17.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 275, 10, 0, 40, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 90, 0, 30, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 10, 0, 40, 5.0, 0.0, 17.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 275, 10, 0, 40, 5.5, 0.0, 27.0, 0.0, None, None, None, 1.15, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 14.0, 90, 108, 0, 30, 6.5, 0.0, 27.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 14.0, 90, 108, 0, 30, 6.5, 0.0, 27.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 4.7, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("haver"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 1, Hash40::new("havel"), 11.0, 44, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 10.0, 40, 113, 0, 30, 4.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(-12.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 10.0, 40, 113, 0, 30, 4.0, 0.0, 7.0, 12.0, Some(0.0), Some(7.0), Some(-12.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gekkouga_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("havel"), 13.0, 30, 99, 0, 32, 4.0, 0.0, -8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("havel"), 11.0, 30, 99, 0, 32, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(-2.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, 13.0, Some(-2.0), Some(3.0), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, -13.0, Some(-2.0), Some(3.0), Some(-13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, 13.0, Some(-2.0), Some(3.0), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 30, 99, 0, 32, 3.3, 0.0, 3.0, -13.0, Some(-2.0), Some(3.0), Some(-13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attacks4", gekkouga_attack_s4_s_game) - .acmd("game_attackhi4", gekkouga_attack_hi4_game) - .acmd("game_attacklw4", gekkouga_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gekkouga/src/acmd/specials.rs b/fighters/gekkouga/src/acmd/specials.rs index 51d08b427d..4c4e84ab87 100644 --- a/fighters/gekkouga/src/acmd/specials.rs +++ b/fighters/gekkouga/src/acmd/specials.rs @@ -1,4 +1,4 @@ use super::*; -pub fn install() {} +pub fn install(agent: &mut Agent) {} diff --git a/fighters/gekkouga/src/acmd/throws.rs b/fighters/gekkouga/src/acmd/throws.rs index 5425aeaa70..15d2301daf 100644 --- a/fighters/gekkouga/src/acmd/throws.rs +++ b/fighters/gekkouga/src/acmd/throws.rs @@ -1,137 +1,135 @@ use super::*; -unsafe extern "C" fn gekkouga_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 0.0, Some(0.0), Some(6.0), Some(17.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gekkouga_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, 4.0, Some(0.0), Some(6.0), Some(16.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gekkouga_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-24.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(-24.55), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn gekkouga_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 67, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 67, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 5.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 5.0, 0.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_throw_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 15.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gekkouga_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 73, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 65, 73, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 7, 1); - CHECK_FINISH_CAMERA(fighter, 5, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 7, 1); + CHECK_FINISH_CAMERA(agent, 5, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_catch", gekkouga_catch_game) - .acmd("game_catchdash", gekkouga_catch_dash_game) - .acmd("game_catchturn", gekkouga_catch_turn_game) - .acmd("game_throwf", gekkouga_throw_f_game) - .acmd("expression_throwf", gekkouga_throw_f_expression) - .acmd("game_throwlw", gekkouga_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("expression_throwf", expression_throwf); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gekkouga/src/acmd/tilts.rs b/fighters/gekkouga/src/acmd/tilts.rs index 94335931eb..f0c449ceba 100644 --- a/fighters/gekkouga/src/acmd/tilts.rs +++ b/fighters/gekkouga/src/acmd/tilts.rs @@ -1,26 +1,26 @@ use super::*; -unsafe extern "C" fn gekkouga_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 9.0); @@ -36,193 +36,191 @@ unsafe extern "C" fn gekkouga_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn gekkouga_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn gekkouga_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 361, 56, 0, 50, 4.0, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 361, 90, 0, 52, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.75); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.75); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn gekkouga_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.5, 8, 30, -60, -10, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.5, 8, 30, -60, -10, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 3.5, 15.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 3.5, 15.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn gekkouga_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("s_tongue5"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("s_tongue7"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("s_tongue9"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("s_tongue5"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("s_tongue7"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("s_tongue9"), 7.0, 80, 72, 0, 69, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn gekkouga_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("gekkouga_attack_hi"), Hash40::new("gekkouga_attack_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_XY); - EFFECT_FLW_POS(fighter, Hash40::new("gekkouga_splash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gekkouga_attack_hi"), Hash40::new("gekkouga_attack_hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_XY); + EFFECT_FLW_POS(agent, Hash40::new("gekkouga_splash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.9, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_COLOR(fighter, 2, 2, 2); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.75, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_COLOR(fighter, 1.4, 1.4, 1.4); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.55, true, *EF_FLIP_YZ, 0.4); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.8, 0.8); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.3, true, *EF_FLIP_YZ, 0.3); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.6, 0.6); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.9, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_COLOR(agent, 2, 2, 2); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.75, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_COLOR(agent, 1.4, 1.4, 1.4); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.55, true, *EF_FLIP_YZ, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.8, 0.8); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("gekkouga_attack_arc"), Hash40::new("gekkouga_attack_arc"), Hash40::new("top"), -2, 13, 1.5, 152, -35, 97, 0.3, true, *EF_FLIP_YZ, 0.3); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.6, 0.6); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_spin_wind_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("gekkouga_attack_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_attack_arc"), true, true); } } -unsafe extern "C" fn gekkouga_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn gekkouga_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 80, 0, 62, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 77, 80, 0, 62, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 85, 59, 0, 66, 5.0, 6.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 80, 0, 62, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 77, 80, 0, 62, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 85, 59, 0, 66, 5.0, 6.0, -1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } } -unsafe extern "C" fn gekkouga_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 2.5, 2, -7.0, 0, 0, 0, 1.4, true, *EF_FLIP_YZ); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 2.5, 2, -7.0, 0, 0, 0, 1.4, true, *EF_FLIP_YZ); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5.5, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 15.0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 15.0, 0, 0, 0, 1.0, true); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .acmd("game_attacks3hi", gekkouga_attack_s3_hi_game) - .acmd("effect_attacks3hi", gekkouga_attack_s3_hi_effect) - .acmd("game_attacks3", gekkouga_attack_s3_s_game) - .acmd("effect_attacks3", gekkouga_attack_s3_s_effect) - .acmd("game_attacks3lw", gekkouga_attack_s3_lw_game) - .acmd("effect_attacks3lw", gekkouga_attack_s3_lw_effect) - .acmd("game_attackhi3", gekkouga_attack_hi3_game) - .acmd("effect_attackhi3", gekkouga_attack_hi3_effect) - .acmd("expression_attackhi3", gekkouga_attack_hi3_expression) - .acmd("game_attacklw3", gekkouga_attack_lw3_game) - .acmd("effect_attacklw3", gekkouga_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/gekkouga/src/lib.rs b/fighters/gekkouga/src/lib.rs index 7bcc1676ad..2b6c28b1ee 100644 --- a/fighters/gekkouga/src/lib.rs +++ b/fighters/gekkouga/src/lib.rs @@ -6,7 +6,7 @@ pub mod acmd; //pub mod status; pub mod opff; - +mod shuriken; use smash::{ lib::{ L2CValue, @@ -38,7 +38,10 @@ use utils::{ }; use smashline::*; -pub fn install() { - acmd::install(); - opff::install(); -} +pub fn install(agent: &mut Agent) { + acmd::install(agent); + opff::install(agent); + agent.install(); + + shuriken::install(); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/opff.rs b/fighters/gekkouga/src/opff.rs index 814c3d5b69..f16e5bc630 100644 --- a/fighters/gekkouga/src/opff.rs +++ b/fighters/gekkouga/src/opff.rs @@ -105,8 +105,6 @@ pub unsafe fn gekkouga_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("gekkouga") - .on_line(Main, gekkouga_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gekkouga_frame_wrapper) } diff --git a/fighters/gekkouga/src/shuriken/acmd.rs b/fighters/gekkouga/src/shuriken/acmd.rs new file mode 100644 index 0000000000..35b5be6d02 --- /dev/null +++ b/fighters/gekkouga/src/shuriken/acmd.rs @@ -0,0 +1,14 @@ +use super::*; +unsafe extern "C" fn game_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); +if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); +} + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shot", game_shot); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/shuriken/mod.rs b/fighters/gekkouga/src/shuriken/mod.rs new file mode 100644 index 0000000000..11ac88fa03 --- /dev/null +++ b/fighters/gekkouga/src/shuriken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("gekkouga_shuriken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From a6ba14fec2a51bd0d46c54379615d8a93285498f Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Sat, 23 Mar 2024 23:49:08 -0400 Subject: [PATCH 094/172] amogus --- fighters/kirby/src/opff/copy.rs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/fighters/kirby/src/opff/copy.rs b/fighters/kirby/src/opff/copy.rs index f8c61ca5be..32be997de7 100644 --- a/fighters/kirby/src/opff/copy.rs +++ b/fighters/kirby/src/opff/copy.rs @@ -635,6 +635,25 @@ unsafe fn knife_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, s } } +// Richter's Knife land cancel +unsafe fn knife_lc(boma: &mut BattleObjectModuleAccessor) { + if boma.is_status(*FIGHTER_KIRBY_STATUS_KIND_RICHTER_SPECIAL_N) + && VarModule::is_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL) + && boma.is_situation(*SITUATION_KIND_GROUND) { + // remove the unthrown knife from richter's hand + if (2.0..13.0).contains(&boma.motion_frame()) + && ArticleModule::is_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE){ + ArticleModule::remove_exist(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + + let landing_lag = 10.0; // amount of frames until richter can act when landing + let rate = 27.0 / landing_lag; + MotionModule::change_motion(boma, Hash40::new("landing_heavy"), 0.0, rate, false, 0.0, false, false); + VarModule::off_flag(boma.object(), vars::richter::instance::SPECIAL_N_LAND_CANCEL); + EffectModule::kill_kind(boma, Hash40::new("sys_sp_flash"), true, true); + } +} + // Toon Link's Bow Drift unsafe fn heros_bow_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat2: i32, stick_y: f32) { if status_kind == *FIGHTER_KIRBY_STATUS_KIND_TOONLINK_SPECIAL_N { @@ -1078,7 +1097,10 @@ pub unsafe fn kirby_copy_handler(fighter: &mut L2CFighterCommon, boma: &mut Batt // Simon 0x43 => axe_drift(boma, status_kind, situation_kind, cat[1], stick_y), // Richter - 0x44 => knife_drift(boma, status_kind, situation_kind, cat[1], stick_y), + 0x44 => { + knife_drift(boma, status_kind, situation_kind, cat[1], stick_y); + knife_lc(boma); + }, // Toon Link 0x2E => heros_bow_drift(boma, status_kind, situation_kind, cat[1], stick_y), // Young Link From 18381bd1208450f50ffbda7c2b7d3f06a15166d1 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sun, 24 Mar 2024 00:04:44 -0400 Subject: [PATCH 095/172] Bowser jr. crate --- fighters/koopajr/src/acmd/aerials.rs | 200 +++++++++--------- fighters/koopajr/src/acmd/ground.rs | 82 ++++--- fighters/koopajr/src/acmd/mod.rs | 16 +- fighters/koopajr/src/acmd/other.rs | 186 ++++++++-------- fighters/koopajr/src/acmd/smashes.rs | 168 ++++++++------- fighters/koopajr/src/acmd/specials.rs | 175 +++++++-------- fighters/koopajr/src/acmd/throws.rs | 94 ++++---- fighters/koopajr/src/acmd/tilts.rs | 114 +++++----- fighters/koopajr/src/cannonball/acmd.rs | 24 +++ fighters/koopajr/src/cannonball/mod.rs | 9 + fighters/koopajr/src/lib.rs | 11 +- fighters/koopajr/src/opff.rs | 14 +- fighters/koopajr/src/status.rs | 15 +- .../koopajr/src/status/special_hi_damage.rs | 6 +- .../koopajr/src/status/special_hi_escape.rs | 6 +- fighters/koopajr/src/status/special_s_jump.rs | 7 +- 16 files changed, 556 insertions(+), 571 deletions(-) create mode 100644 fighters/koopajr/src/cannonball/acmd.rs create mode 100644 fighters/koopajr/src/cannonball/mod.rs diff --git a/fighters/koopajr/src/acmd/aerials.rs b/fighters/koopajr/src/acmd/aerials.rs index e537420269..abf0cc4261 100644 --- a/fighters/koopajr/src/acmd/aerials.rs +++ b/fighters/koopajr/src/acmd/aerials.rs @@ -1,216 +1,214 @@ use super::*; -unsafe extern "C" fn koopajr_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.5/(6.0-1.0)); + FT_MOTION_RATE(agent, 2.5/(6.0-1.0)); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 4.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("clownarml1"), 8.0, 60, 85, 0, 60, 6.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 3.5, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("clownarml1"), 6.5, 361, 88, 0, 40, 5.5, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 19.0/(35.0-20.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 19.0/(35.0-20.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopajr_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0/(4.0-1.0)); + FT_MOTION_RATE(agent, 2.0/(4.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 11.0, 361, 105, 0, 33, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 3.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 11.0, 361, 105, 0, 33, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 3.5, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 105, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 8.0, 48, 102, 0, 33, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 8.0, 48, 102, 0, 33, 5.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 7.0, 48, 102, 0, 33, 5.0, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopajr_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); } } -unsafe extern "C" fn koopajr_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(11.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(11.0-1.0)); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); // f9 ingame - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 13.0, 361, 96, 0, 30, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 2.2, 0.0, 0.0, 0.0, Some(-6.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 5.0, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 13.0, 361, 96, 0, 30, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 2.2, 0.0, 0.0, 0.0, Some(-6.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarmr1"), 10.0, 361, 91, 0, 20, 5.0, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); // f12 ingame - FT_MOTION_RATE(fighter, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarmr1"), 10.0, 361, 101, 0, 20, 5.2, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarmr1"), 10.0, 361, 101, 0, 20, 5.2, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.6); // f18 ingame - FT_MOTION_RATE(fighter, 20.0/(29.0-15.6)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(29.0-15.6)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); // f38 ingame - FT_MOTION_RATE(fighter, 0.833); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.833); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopajr_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_HAMMER, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("neck"), 9.0, 74, 115, 0, 50, 3.0, 1.5, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 74, 115, 0, 50, 3.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("neck"), 9.0, 74, 115, 0, 50, 3.0, 1.5, 0.0, 0.0, Some(-1.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn koopajr_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn koopajr_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 38.0/(60.0-15.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.2, 0.0, 4.0, -2.0, Some(0.0), Some(4.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.0, 0.0, -2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 38.0/(60.0-15.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.2, 0.0, 4.0, -2.0, Some(0.0), Some(4.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 290, 100, 20, 0, 4.0, 0.0, -2.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 1, 8.0, false); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 68.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopajr_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); JostleModule::set_status(boma, true); } } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attackairn", koopajr_attack_air_n_game) - .acmd("game_attackairf", koopajr_attack_air_f_game) - .acmd("game_landingairf", koopajr_landing_air_f_game) - .acmd("game_attackairb", koopajr_attack_air_b_game) - .acmd("game_attackairhi", koopajr_attack_air_hi_game) - .acmd("expression_attackairhi", koopajr_attack_air_hi_expression) - .acmd("game_attackairlw", koopajr_attack_air_lw_game) - .acmd("game_landingairlw", koopajr_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/koopajr/src/acmd/ground.rs b/fighters/koopajr/src/acmd/ground.rs index 5619f2f919..c991bab67a 100644 --- a/fighters/koopajr/src/acmd/ground.rs +++ b/fighters/koopajr/src/acmd/ground.rs @@ -1,90 +1,88 @@ use super::*; -unsafe extern "C" fn koopajr_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 6.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.6, 0.0, 6.0, 14.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn koopajr_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.3, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.4, 0.0, 6.3, 12.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 4.0, 0.0, 6.3, 17.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.0, 0.0, 6.3, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 3.4, 0.0, 6.3, 12.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 25, 0, 25, 4.0, 0.0, 6.3, 17.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn koopajr_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 30, 10, 0, 50, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 34, 10, 0, 45, 4.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 30, 10, 0, 50, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 34, 10, 0, 45, 4.0, 0.0, 8.0, 13.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 32, 10, 0, 40, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 32, 10, 0, 40, 4.0, 0.0, 8.0, 9.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 65, 10, 0, 20, 4.0, 0.0, 8.0, 14.0, Some(0.0), Some(8.0), Some(8.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 80, 0, 85, 5.0, 0.0, 8.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue3"), 4.0, 75, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 80, 0, 85, 5.0, 0.0, 8.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue3"), 4.0, 75, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attack11", koopajr_attack_11_game) - .acmd("game_attack12", koopajr_attack_12_game) - .acmd("game_attackdash", koopajr_attack_dash_game) - .install(); +pub fn agentnstall(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/koopajr/src/acmd/mod.rs b/fighters/koopajr/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/koopajr/src/acmd/mod.rs +++ b/fighters/koopajr/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/koopajr/src/acmd/other.rs b/fighters/koopajr/src/acmd/other.rs index d501e6c8a2..aa62173e1c 100644 --- a/fighters/koopajr/src/acmd/other.rs +++ b/fighters/koopajr/src/acmd/other.rs @@ -1,229 +1,227 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn special_hi_jr_escape_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhijrescape(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); if !WorkModule::is_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE) { frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } else { frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_specialhijrescape", special_hi_jr_escape_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_specialhijrescape", game_specialhijrescape); } diff --git a/fighters/koopajr/src/acmd/smashes.rs b/fighters/koopajr/src/acmd/smashes.rs index 31706507e3..232c5bcccb 100644 --- a/fighters/koopajr/src/acmd/smashes.rs +++ b/fighters/koopajr/src/acmd/smashes.rs @@ -1,187 +1,185 @@ use super::*; -unsafe extern "C" fn koopajr_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 3.5, 16.0, Some(0.0), Some(7.5), Some(17.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 4.5, 9.1, Some(0.0), Some(9.0), Some(10.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 3.5, 16.0, Some(0.0), Some(7.5), Some(17.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 4.5, 9.1, Some(0.0), Some(9.0), Some(10.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 4.5, 16.5, Some(0.0), Some(6.5), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 4.5, 16.5, Some(0.0), Some(6.5), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 6.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 10.0, -5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 5.5, -7.0, Some(0.0), Some(5.5), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 10.0, -5.0, Some(0.0), Some(10.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 102, 100, 80, 0, 5.0, 0.0, 5.5, -7.0, Some(0.0), Some(5.5), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 120, 100, 18, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.3, 190, 100, 20, 0, 3.0, 0.0, 21.0, -4.0, Some(0.0), Some(19.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.3, 140, 100, 50, 0, 4.5, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 18, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.3, 190, 100, 20, 0, 3.0, 0.0, 21.0, -4.0, Some(0.0), Some(19.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.3, 140, 100, 50, 0, 4.5, 0.0, 18.0, -4.0, Some(0.0), Some(16.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 120, 100, 35, 0, 5.0, 0.0, 19.0, -4.0, Some(0.0), Some(17.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 120, 100, 35, 0, 5.0, 0.0, 19.0, -4.0, Some(0.0), Some(17.0), Some(7.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 173, 0, 38, 6.0, 0.0, 24.5, -4.0, Some(0.0), Some(22.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 173, 0, 38, 6.0, 0.0, 24.5, -4.0, Some(0.0), Some(22.5), Some(5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.588); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.588); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, 12.5, Some(0.0), Some(6.5), Some(12.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, -12.0, Some(0.0), Some(6.5), Some(-12.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 44, 82, 0, 41, 4.5, 0.0, 3.5, 0.0, Some(0.0), Some(4.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, 12.5, Some(0.0), Some(6.5), Some(12.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 44, 82, 0, 41, 5.2, 0.0, 3.5, -12.0, Some(0.0), Some(6.5), Some(-12.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 44, 82, 0, 41, 4.5, 0.0, 3.5, 0.0, Some(0.0), Some(4.5), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.880); + FT_MOTION_RATE(agent, 0.880); } } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attacks4hi", koopajr_attack_s4_hi_game) - .acmd("game_attacks4", koopajr_attack_s4_s_game) - .acmd("game_attacks4lw", koopajr_attack_s4_lw_game) - .acmd("game_attackhi4", koopajr_attack_hi4_game) - .acmd("game_attacklw4", koopajr_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopajr/src/acmd/specials.rs b/fighters/koopajr/src/acmd/specials.rs index 837fb651bc..a39ece404b 100644 --- a/fighters/koopajr/src/acmd/specials.rs +++ b/fighters/koopajr/src/acmd/specials.rs @@ -28,11 +28,11 @@ unsafe fn koopajr_remainclown_special_air_hi_clownfall_game(weapon: &mut L2CAgen // ATTACK(weapon,0, 0, Hash40::new("top"), 13.0, 55, 70, 0, 85, 14.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB) -unsafe extern "C" fn koopajr_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_CANNONBALL) { WorkModule::on_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL); } @@ -42,168 +42,143 @@ unsafe extern "C" fn koopajr_special_n_shoot_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_special_n_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_specialnshoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_N_FLAG_FAIL) { - EFFECT(fighter, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("koopajr_cannon_miss"), Hash40::new("clowntongue2"), 3, 0, 0, 0, 0, -90, 0.5, 0, 0, 0, 0, 0, 0, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } else { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0 } else { 2 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } } } -unsafe extern "C" fn koopajr_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { ArticleModule::generate_article(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MECHAKOOPA, false, 0); - VarModule::on_flag(fighter.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); + VarModule::on_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); } } } -unsafe extern "C" fn koopajr_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownhip"), 4.0, 80, 95, 0, 60, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn koopajr_special_s_spin_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 361, 65, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 361, 65, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn koopajr_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); JostleModule::set_status(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 3.6, 0.0, 1.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownhip"), 2.0, 55, 100, 0, 65, 1.5, 0.0, 3.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn koopajr_special_air_s_spin_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsspin(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_SPIN_TURN_JUMP); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 361, 70, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 361, 70, 0, 60, 5.2, 0.0, 6.0, 6.0, Some(0.0), Some(6.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_KOOPAJR_STATUS_SPECIAL_S_FLAG_NORMAL_GRAVITY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } } -unsafe extern "C" fn koopajr_cannonball_hop_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - let mut keep_hitbox = false; - - if WorkModule::is_flag(weapon.module_accessor, *WEAPON_KOOPAJR_CANNONBALL_INSTANCE_WORK_ID_FLAG_HIT_WALL) { - keep_hitbox = true; - PostureModule::reverse_lr(boma); - } - if is_excute(weapon) { - ATTACK(weapon,0,0,Hash40::new("top"),1.0,48,52,0,90,3.8,0.0,0.0,0.0,None,None,None,1.0,0.0,*ATTACK_SETOFF_KIND_THRU,*ATTACK_LR_CHECK_F,false,8,0.0,0,true,false,false,false,false,*COLLISION_SITUATION_MASK_GA,*COLLISION_CATEGORY_MASK_ALL,*COLLISION_PART_MASK_ALL,false,Hash40::new("collision_attr_normal"),*ATTACK_SOUND_LEVEL_L,*COLLISION_SOUND_ATTR_PUNCH,*ATTACK_REGION_OBJECT); - } - frame(lua_state, 1.0); - if is_excute(weapon) { - if !keep_hitbox { - AttackModule::clear_all(boma); - } - } -} - -unsafe extern "C" fn game_specialhijrrise(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhijrrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPAJR_STATUS_SPECIAL_HI_SHOOT_FLAG_ACTION); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialhijrfall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhijrfall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("koopajr_cannonball") - .acmd("game_hop", koopajr_cannonball_hop_game) - .install(); - smashline::Agent::new("koopajr") - .acmd("game_specialnshoot", koopajr_special_n_shoot_game) - .acmd("game_specialairnshoot", koopajr_special_n_shoot_game) - .acmd("effect_specialnshoot", koopajr_special_n_shoot_effect) - .acmd("game_speciallw", koopajr_special_lw_game) - .acmd("game_specialairlw", koopajr_special_lw_game) - .acmd("game_specials", koopajr_special_s_game) - .acmd("game_specialsspin", koopajr_special_s_spin_game) - .acmd("game_specialairs", koopajr_special_air_s_game) - .acmd("game_specialairsspin", koopajr_special_air_s_spin_game) - .acmd("game_specialhijrrise", game_specialhijrrise) - .acmd("game_specialhijrfall", game_specialhijrfall) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("effect_specialnshoot", effect_specialnshoot); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsspin", game_specialsspin); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsspin", game_specialairsspin); + agent.acmd("game_specialhijrrise", game_specialhijrrise); + agent.acmd("game_specialhijrfall", game_specialhijrfall); } diff --git a/fighters/koopajr/src/acmd/throws.rs b/fighters/koopajr/src/acmd/throws.rs index 8061f75ede..9c556b3e0b 100644 --- a/fighters/koopajr/src/acmd/throws.rs +++ b/fighters/koopajr/src/acmd/throws.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn koopajr_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 7.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(14.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn koopajr_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -47,7 +47,7 @@ unsafe extern "C" fn koopajr_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -67,62 +67,60 @@ unsafe extern "C" fn koopajr_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn koopajr_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 85, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 85, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 10); + CHECK_FINISH_CAMERA(agent, 20, 10); } frame(lua_state, 24.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn koopajr_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 275, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MAGICHAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 361, 100, 30, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_catch_only_all(fighter.module_accessor, true, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 361, 100, 30, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_catch_only_all(agent.module_accessor, true, false); } frame(lua_state, 50.0); - FT_MOTION_RATE_RANGE(fighter, 50.0, 78.0, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(fighter.module_accessor); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + FT_MOTION_RATE_RANGE(agent, 50.0, 78.0, 14.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(agent.module_accessor); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } frame(lua_state, 78.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_catch", koopajr_catch_game) - .acmd("game_catchdash", koopajr_catch_dash_game) - .acmd("game_catchturn", koopajr_catch_turn_game) - .acmd("game_throwb", koopajr_throw_b_game) - .acmd("game_throwlw", koopajr_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopajr/src/acmd/tilts.rs b/fighters/koopajr/src/acmd/tilts.rs index f80f63aa75..640f91a382 100644 --- a/fighters/koopajr/src/acmd/tilts.rs +++ b/fighters/koopajr/src/acmd/tilts.rs @@ -1,118 +1,116 @@ use super::*; -unsafe extern "C" fn koopajr_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 5.0, 8.5, 0.0, 0.0, Some(10.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 95, 75, 0, 90, 4.5, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 5.0, 8.5, 0.0, 0.0, Some(10.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 8.0, 95, 75, 0, 90, 4.0, 0.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 95, 75, 0, 90, 4.5, 0.0, 5.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopajr_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 2.0, 20, 30, 0, 20, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 2.0, 367, 30, 0, 20, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 2.0, 160, 30, 0, 20, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clownhip"), 6.0, 30, 60, 0, 77, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 5.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clownhip"), 6.0, 30, 60, 0, 77, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 4.0, 3.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clowntongue2"), 6.0, 30, 60, 0, 77, 5.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("koopajr") - .acmd("game_attacks3hi", koopajr_attack_s3_hi_game) - .acmd("game_attacks3", koopajr_attack_s3_s_game) - .acmd("game_attacks3lw", koopajr_attack_s3_lw_game) - .acmd("game_attackhi3", koopajr_attack_hi3_game) - .acmd("game_attacklw3", koopajr_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/koopajr/src/cannonball/acmd.rs b/fighters/koopajr/src/cannonball/acmd.rs new file mode 100644 index 0000000000..117f3d12c7 --- /dev/null +++ b/fighters/koopajr/src/cannonball/acmd.rs @@ -0,0 +1,24 @@ +use super::*; +unsafe extern "C" fn game_hop(weapon: &mut L2CAgentBase) { + let lua_state = weapon.lua_state_agent; + let boma = weapon.boma(); + let mut keep_hitbox = false; + + if WorkModule::is_flag(weapon.module_accessor, *WEAPON_KOOPAJR_CANNONBALL_INSTANCE_WORK_ID_FLAG_HIT_WALL) { + keep_hitbox = true; + PostureModule::reverse_lr(boma); + } + if is_excute(weapon) { + ATTACK(weapon,0,0,Hash40::new("top"),1.0,48,52,0,90,3.8,0.0,0.0,0.0,None,None,None,1.0,0.0,*ATTACK_SETOFF_KIND_THRU,*ATTACK_LR_CHECK_F,false,8,0.0,0,true,false,false,false,false,*COLLISION_SITUATION_MASK_GA,*COLLISION_CATEGORY_MASK_ALL,*COLLISION_PART_MASK_ALL,false,Hash40::new("collision_attr_normal"),*ATTACK_SOUND_LEVEL_L,*COLLISION_SOUND_ATTR_PUNCH,*ATTACK_REGION_OBJECT); + } + frame(lua_state, 1.0); + if is_excute(weapon) { + if !keep_hitbox { + AttackModule::clear_all(boma); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hop", game_hop); +} diff --git a/fighters/koopajr/src/cannonball/mod.rs b/fighters/koopajr/src/cannonball/mod.rs new file mode 100644 index 0000000000..842d91ff86 --- /dev/null +++ b/fighters/koopajr/src/cannonball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("koopajr_cannonball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopajr/src/lib.rs b/fighters/koopajr/src/lib.rs index 5537dac979..a3a9679d52 100644 --- a/fighters/koopajr/src/lib.rs +++ b/fighters/koopajr/src/lib.rs @@ -6,7 +6,7 @@ pub mod acmd; pub mod status; pub mod opff; - +mod cannonball; use smash::{ lib::{ L2CValue, @@ -39,7 +39,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("koopajr"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + + cannonball::install(); } \ No newline at end of file diff --git a/fighters/koopajr/src/opff.rs b/fighters/koopajr/src/opff.rs index dcc467dcdf..8854895f10 100644 --- a/fighters/koopajr/src/opff.rs +++ b/fighters/koopajr/src/opff.rs @@ -161,14 +161,8 @@ pub unsafe fn koopajr_weapon_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) //} } -pub fn install() { - smashline::Agent::new("koopajr") - .on_line(Main, koopajr_frame_wrapper) - .install(); - smashline::Agent::new("koopajr_remainclown") - .on_line(Main, koopajr_weapon_remainclown_frame) - .install(); - smashline::Agent::new("koopajr_cannonball") - .on_line(Main, koopajr_weapon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopajr_frame_wrapper); + agent.on_line(Main, koopajr_weapon_remainclown_frame); + agent.on_line(Main, koopajr_weapon_frame_wrapper); } diff --git a/fighters/koopajr/src/status.rs b/fighters/koopajr/src/status.rs index ea4bb8a732..7a58272752 100644 --- a/fighters/koopajr/src/status.rs +++ b/fighters/koopajr/src/status.rs @@ -42,12 +42,11 @@ unsafe extern "C" fn koopajr_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - special_s_jump::install(); - special_hi_escape::install(); - special_hi_damage::install(); - smashline::Agent::new("koopajr") - .on_start(koopajr_init) - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + special_s_jump::install(agent); + special_hi_escape::install(agent); + special_hi_damage::install(agent); + agent.on_start(koopajr_init); + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end); + agent.install(); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_hi_damage.rs b/fighters/koopajr/src/status/special_hi_damage.rs index 040570b760..f5972e1df4 100644 --- a/fighters/koopajr/src/status/special_hi_damage.rs +++ b/fighters/koopajr/src/status/special_hi_damage.rs @@ -21,8 +21,6 @@ pub unsafe extern "C" fn special_hi_damage_end_main(fighter: &mut L2CFighterComm 1.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Main, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END, special_hi_damage_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END, special_hi_damage_end_main); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_hi_escape.rs b/fighters/koopajr/src/status/special_hi_escape.rs index 73b8ec961a..2fee653579 100644 --- a/fighters/koopajr/src/status/special_hi_escape.rs +++ b/fighters/koopajr/src/status/special_hi_escape.rs @@ -10,8 +10,6 @@ pub unsafe extern "C" fn pre_special_hi_escape(fighter: &mut L2CFighterCommon) - return 1.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, pre_special_hi_escape) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, pre_special_hi_escape); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_s_jump.rs b/fighters/koopajr/src/status/special_s_jump.rs index 109267b312..d13c7a2f77 100644 --- a/fighters/koopajr/src/status/special_s_jump.rs +++ b/fighters/koopajr/src/status/special_s_jump.rs @@ -1,7 +1,6 @@ use super::*; use globals::*; // status script import - // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP @@ -14,8 +13,6 @@ pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("koopajr") - .status(Init, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_init); } \ No newline at end of file From fc1b3b631f1f53b0582d11813626c7a04c0ccb76 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sun, 24 Mar 2024 00:42:27 -0400 Subject: [PATCH 096/172] persona! --- fighters/jack/src/acmd/aerials.rs | 440 +++++++++++++-------------- fighters/jack/src/acmd/ground.rs | 182 ++++++----- fighters/jack/src/acmd/mod.rs | 16 +- fighters/jack/src/acmd/other.rs | 89 +++--- fighters/jack/src/acmd/smashes.rs | 244 ++++++++------- fighters/jack/src/acmd/specials.rs | 210 +++++++------ fighters/jack/src/acmd/throws.rs | 58 ++-- fighters/jack/src/acmd/tilts.rs | 412 +++++++++++++------------ fighters/jack/src/fire/acmd.rs | 15 + fighters/jack/src/fire/mod.rs | 9 + fighters/jack/src/lib.rs | 11 +- fighters/jack/src/opff.rs | 6 +- fighters/jack/src/status/dispatch.rs | 8 +- fighters/jack/src/status/doyle.rs | 6 +- fighters/jack/src/status/summon.rs | 8 +- 15 files changed, 851 insertions(+), 863 deletions(-) create mode 100644 fighters/jack/src/fire/acmd.rs create mode 100644 fighters/jack/src/fire/mod.rs diff --git a/fighters/jack/src/acmd/aerials.rs b/fighters/jack/src/acmd/aerials.rs index 190df45d16..ed56b292a8 100644 --- a/fighters/jack/src/acmd/aerials.rs +++ b/fighters/jack/src/acmd/aerials.rs @@ -1,409 +1,409 @@ use super::*; -unsafe extern "C" fn jack_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(10.0-1.0)); + FT_MOTION_RATE(agent, 8.0/(10.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 56, 87, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 56, 87, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 56, 87, 0, 47, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 56, 87, 0, 47, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 9.0, 56, 87, 0, 47, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("throw"), 3.0, 52, 139, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("throw"), 3.0, 52, 139, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 7.0, 361, 76, 0, 31, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 7.0, 361, 76, 0, 31, 3.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("throw"), 2.0, 361, 139, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("throw"), 2.0, 361, 139, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 28.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE(fighter, 15.0/(51.0-28.0)); + FT_MOTION_RATE(agent, 15.0/(51.0-28.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn jack_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_attack_arc3"), Hash40::new("top"), 0, 9, 0, 0, 180, -90, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_attack_arc3"), Hash40::new("top"), 0, 9, 0, 0, 180, -90, 0.7, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_front"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_front"), true, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); } } -unsafe extern "C" fn jack_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 10); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); } } -unsafe extern "C" fn jack_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_n"), 0); +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_n"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } -unsafe extern "C" fn jack_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 5.0/(9.0-7.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(9.0-7.0)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 40, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 40, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 40, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 40, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100, 40, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 4.0, 80, 35, 0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 4.0, 80, 35, 0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } else{ // Air-only - ATTACK(fighter, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 50, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 50, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 367, 100,50, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 4.0, 367, 100, 50, 0, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 367, 100, 50, 0, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 367, 100,50, 0, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneer"), 4.0, 80, 35,0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 4.0, 74, 35, 0, 35, 3.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 4.0, 82, 35, 0, 35, 3.5, 3.2, 0.0, 0.0, Some(3.2), Some(-0.5), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneer"), 4.0, 80, 35,0, 35, 4.0, 4.2, -0.7, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 361, 110, 0, 58, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 58, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 17.0, 0.0, Some(0.0), Some(16.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 361, 110, 0, 58, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 361, 110, 0, 58, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 9.0, 361, 110, 0, 58, 3.5, 0.0, 17.0, 0.0, Some(0.0), Some(16.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 361, 125, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 361, 125, 0, 40, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 361, 125, 0, 40, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 361, 125, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 361, 125, 0, 40, 3.5, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 361, 125, 0, 40, 4.0, 4.4, -0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 27.0/(39.0-17.0)); + FT_MOTION_RATE(agent, 27.0/(39.0-17.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn jack_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_f"), 0); +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_f"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } -unsafe extern "C" fn jack_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 4.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 45, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 45, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 45, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 7.5, -10.0, Some(0.0), Some(5.5), Some(-8.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 10.5, -12.5, Some(0.0), Some(15.0), Some(-12.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("top"), 14.0, 45, 87, 0, 58, 5.0, 0.0, 16.5, -12.0, Some(0.0), Some(20.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 29.0/(32.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 29.0/(32.0-9.0)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } else{ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 43, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 43, 95, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 11.0, 43, 95, 0, 50, 3.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn jack_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn jack_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_b"), 0); +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_b"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } } -unsafe extern "C" fn jack_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); //Air only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 1.5, 367, 87, 0, 44, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 1.5, 367, 87, 0, 44, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 1.5, 367, 87, 0, 44, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //Ground only - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 1.5, 367, 30, 0, 33, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 4.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 1.5, 367, 30, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 1.5, 367, 30, 0, 33, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 20.0, 1.5, Some(0.0), Some(24.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 80, 106, 0, 50, 5.0, 0.0, 20.0, 1.5, Some(0.0), Some(24.0), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 80, 130, 0, 53, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 23.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 21.0/(40.0-23.0)); + FT_MOTION_RATE(agent, 21.0/(40.0-23.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn jack_landing_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_hi"), 0); +unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_hi"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } -unsafe extern "C" fn jack_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 8.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 8.0/(12.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0/(12.5-12.0)); + FT_MOTION_RATE(agent, 1.0/(12.5-12.0)); frame(lua_state, 12.5); - FT_MOTION_RATE(fighter, 1.0/(13.0-12.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.5)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 367, 64, 0, 37, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 367, 64, 0, 37, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 5.0, 367, 64, 0, 37, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 10.0, 361, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 10.0, 361, 100, 0, 40, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 10.0, 361, 100, 0, 40, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 2.5, 0.0, -1.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 3.0, 0.0, 2.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 2.5, 0.0, -1.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 10.0, 38, 50, 0, 47, 3.0, 0.0, 2.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 1, Hash40::new("top"), 10.0, 270, 96, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("top"), 10.0, 270, 96, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 4, 1, Hash40::new("top"), 10.0, 270, 58, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 1, Hash40::new("top"), 10.0, 270, 58, 0, 35, 5.0, 0.0, 2.0, 1.0, Some(0.0), Some(-4.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } else{ /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("knife"), 7.0, 325, 75, 0, 25, 3.5, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 47.0/(47.0-9.0)); + FT_MOTION_RATE(agent, 47.0/(47.0-9.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -411,54 +411,52 @@ unsafe extern "C" fn jack_attack_air_lw_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn jack_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 10.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 6); } frame(lua_state, 15.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } } -unsafe extern "C" fn jack_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let landing_frame_joker = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_lw"), 0); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, landing_frame_arsene/landing_frame_joker); + FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attackairn", jack_attack_air_n_game) - .acmd("effect_attackairn", jack_attack_air_n_effect) - .acmd("expression_attackairn", jack_attack_air_n_expression) - .acmd("game_landingairn", jack_landing_air_n_game) - .acmd("game_attackairf", jack_attack_air_f_game) - .acmd("game_landingairf", jack_landing_air_f_game) - .acmd("game_attackairb", jack_attack_air_b_game) - .acmd("expression_attackairb", jack_attack_air_b_expression) - .acmd("game_landingairb", jack_landing_air_b_game) - .acmd("game_attackairhi", jack_attack_air_hi_game) - .acmd("game_landingairhi", jack_landing_air_hi_game) - .acmd("game_attackairlw", jack_attack_air_lw_game) - .acmd("expression_attackairlw", jack_attack_air_lw_expression) - .acmd("game_landingairlw", jack_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_landingairhi", game_landingairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/jack/src/acmd/ground.rs b/fighters/jack/src/acmd/ground.rs index 3316d44c4a..b8a19cb1f7 100644 --- a/fighters/jack/src/acmd/ground.rs +++ b/fighters/jack/src/acmd/ground.rs @@ -1,202 +1,200 @@ use super::*; -unsafe extern "C" fn jack_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 4.0, 0.0, 7.5, 12.5, Some(0.0), Some(7.5), Some(15.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 3.0, 0.0, 5.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 30, 0, 32, 4.0, 0.0, 7.5, 12.5, Some(0.0), Some(7.5), Some(15.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 7.5, Some(0.0), Some(7.5), Some(10.8), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 5, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 10.8, Some(0.0), Some(7.5), Some(14.7), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 7.5, Some(0.0), Some(7.5), Some(10.8), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 5, 1, Hash40::new("top"), 1.0, 361, 30, 0, 33, 3.0, 0.0, 7.5, 10.8, Some(0.0), Some(7.5), Some(14.7), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn jack_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 13.0, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 30, 0, 25, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 30, 0, 25, 3.0, 0.0, 6.0, 13.0, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 30, 0, 25, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 4, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 10.5, Some(0.0), Some(8.0), Some(15.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 5, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(18.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 10.5, Some(0.0), Some(8.0), Some(15.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 5, 1, Hash40::new("top"), 1.0, 75, 30, 0, 25, 2.5, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(18.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn jack_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 13.5, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 5.0, 361, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 80, 0, 60, 3.0, 0.0, 8.0, 13.5, Some(0.0), Some(8.0), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 5.0, 361, 80, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 1.6, 361, 135, 0, 65, 3.5, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(14.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 1, Hash40::new("top"), 1.6, 361, 135, 0, 65, 3.5, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(14.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } frame(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 27.0/(28.0-6.0)); + FT_MOTION_RATE(agent, 27.0/(28.0-6.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); } else{ - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 7.0); JostleModule::set_status(boma, false); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 4.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 75, 66, 0, 75, 3.5, 4.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 85, 50, 0, 80, 3.5, 0.0, 3.2, 0.0, Some(0.0), Some(3.2), Some(8.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 5.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 82, 66, 0, 75, 3.0, 5.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 17.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 23.0/(38.0-17.0)); + FT_MOTION_RATE(agent, 23.0/(38.0-17.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn jack_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -1.5, 0, 0, 0, 0.8, 0, 0, 1.5, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -1.5, 0, 0, 0, 0.8, 0, 0, 1.5, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1); } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_attack_line"), Hash40::new("top"), 0, 4, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_attack_line"), Hash40::new("top"), 0, 4, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("jack_attack_line2"), Hash40::new("top"), 7, 2, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_attack_line2"), Hash40::new("top"), 7, 2, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("jack_attack_line2"), Hash40::new("top"), -7, 2, -2, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("jack_attack_line2"), Hash40::new("top"), -7, 2, -2, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 6, 0, -2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 6, 0, -2.5, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 8, 0, -2.5, 0, 0, 0, 0.45, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 8, 0, -2.5, 0, 0, 0, 0.45, 0, 0, 1.5, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 7, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 7, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); } } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); } } } -unsafe extern "C" fn jack_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attack11", jack_attack_11_game) - .acmd("game_attack12", jack_attack_12_game) - .acmd("game_attack13", jack_attack_13_game) - .acmd("game_attackdash", jack_attack_dash_game) - .acmd("effect_attackdash", jack_attack_dash_effect) - .acmd("expression_attackdash", jack_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/jack/src/acmd/mod.rs b/fighters/jack/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/jack/src/acmd/mod.rs +++ b/fighters/jack/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 02ee59fc6a..cf024410f5 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -116,35 +116,35 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_appeal_hi_l_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhil(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn jack_appeal_hi_r_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhir(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn jack_appeal_s_l_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealsl(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn jack_appeal_s_r_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealsr(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn jack_appeal_lw_l_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeallwl(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -152,7 +152,7 @@ unsafe extern "C" fn jack_appeal_lw_l_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn jack_appeal_lw_r_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeallwr(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -160,7 +160,7 @@ unsafe extern "C" fn jack_appeal_lw_r_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 12.0); @@ -170,7 +170,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -197,18 +197,7 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { } } - -unsafe extern "C" fn jack_fire_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 200, 0, 25, 8.5, 0.0, 1.5, 0.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -223,7 +212,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -237,14 +226,14 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_attack_lw3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 8.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n01")); } } -unsafe extern "C" fn jack_attack_lw3_sound_ex(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw3_ex(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 10.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); @@ -259,29 +248,23 @@ unsafe extern "C" fn jack_attack_lw3_sound_ex(agent: &mut L2CAgentBase) { } } - -pub fn install() { - smashline::Agent::new("jack_fire") - .acmd("game_hit", jack_fire_hit_game) - .install(); - smashline::Agent::new("jack") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_appealhil", jack_appeal_hi_l_game) - .acmd("game_appealhir", jack_appeal_hi_r_game) - .acmd("game_appealsl", jack_appeal_s_l_game) - .acmd("game_appealsr", jack_appeal_s_r_game) - .acmd("game_appeallwl", jack_appeal_lw_l_game) - .acmd("game_appeallwr", jack_appeal_lw_r_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_attacklw3", jack_attack_lw3_sound) - .acmd("sound_attacklw3_ex", jack_attack_lw3_sound_ex) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_appealhil", game_appealhil); + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealsl", game_appealsl); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", turn_dash_game); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_attacklw3", sound_attacklw3); + agent.acmd("sound_attacklw3_ex", sound_attacklw3_ex); } diff --git a/fighters/jack/src/acmd/smashes.rs b/fighters/jack/src/acmd/smashes.rs index f7b566a1f1..fc283ccf50 100644 --- a/fighters/jack/src/acmd/smashes.rs +++ b/fighters/jack/src/acmd/smashes.rs @@ -1,64 +1,64 @@ use super::*; -unsafe extern "C" fn jack_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 8.0/(15.5-7.0)); + FT_MOTION_RATE(agent, 8.0/(15.5-7.0)); frame(lua_state, 15.5); - FT_MOTION_RATE(fighter, 1.0/(16.0-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0/(16.0-15.5)); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(11.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(8.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 16.0, 11.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 16.0, 11.0, Some(0.0), Some(12.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 112, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("knife"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 10.0, 13.0, Some(0.0), Some(6.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 10.0, 13.0, Some(0.0), Some(6.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(9.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(10.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(9.5), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 120, 0, 40, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 5.0, 0.0, 8.5, 10.0, Some(0.0), Some(10.5), Some(10.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 14.0, 15.5, Some(0.0), Some(6.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 361, 180, 0, 50, 3.0, 0.0, 12.0, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_NONE); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 9.0, 13.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 112, 0, 40, 4.0, 0.0, 9.0, 13.0, Some(0.0), Some(6.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::clear_all(boma); } } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 42.0/(57.0-19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 42.0/(57.0-19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { } @@ -66,177 +66,175 @@ unsafe extern "C" fn jack_attack_s4_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn jack_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn jack_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 3.0/(7.0-2.0)); + FT_MOTION_RATE(agent, 3.0/(7.0-2.0)); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 3.0/(12.0-8.0)); + FT_MOTION_RATE(agent, 3.0/(12.0-8.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 7.0, 8.0, Some(0.0), Some(13.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 83, 116, 0, 43, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 7.0, 8.0, Some(0.0), Some(13.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 83, 116, 0, 43, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 12.0, 83, 116, 0, 43, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.5, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 83, 122, 0, 43, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("knife"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("armr"), 3.0, 83, 180, 0, 59, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.5, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 83, 122, 0, 43, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("knife"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("armr"), 3.0, 83, 180, 0, 59, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 7.0, 3.0, Some(0.0), Some(12.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 83, 122, 0, 43, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, Some(0.0), Some(16.0), Some(9.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 83, 116, 0, 43, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 3.0, 83, 180, 0, 59, 5.0, 0.0, 28.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 47.0/(60.0-18.0)); + FT_MOTION_RATE(agent, 47.0/(60.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 7.0); app::sv_animcmd::execute(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 1.0, 4.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 32, 106, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 13.0, 32, 106, 0, 30, 3.5, 1.0, 4.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 4.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 38, 250, 0, 44, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 4.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 32, 108, 0, 30, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 32, 108, 0, 30, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 38, 250, 0, 44, 4.0, 0.0, 6.5, 6.5, Some(0.0), Some(4.0), Some(15.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 1.0, 4.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 30, 106, 0, 35, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("knife"), 13.0, 30, 106, 0, 35, 3.5, 1.0, 4.5, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 4.5, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 30, 250, 0, 44, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 1.5, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 4.5, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 13.0, 30, 108, 0, 35, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 30, 108, 0, 35, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 30, 250, 0, 44, 4.0, 0.0, 6.0, -8.0, Some(0.0), Some(3.0), Some(-15.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } } wait(lua_state, 2.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 40.0/(54.0-18.0)); + FT_MOTION_RATE(agent, 40.0/(54.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attacks4", jack_attack_s4_s_game) - .acmd("expression_attacks4", jack_attack_s4_s_expression) - .acmd("game_attackhi4", jack_attack_hi4_game) - .acmd("expression_attackhi4", jack_attack_hi4_expression) - .acmd("game_attacklw4", jack_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/jack/src/acmd/specials.rs b/fighters/jack/src/acmd/specials.rs index fc90fbfbab..81340ea9a9 100644 --- a/fighters/jack/src/acmd/specials.rs +++ b/fighters/jack/src/acmd/specials.rs @@ -1,58 +1,58 @@ use super::*; -unsafe extern "C" fn jack_special_airn_down_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairndown(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); for _ in 0..20 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 80, 0, 25, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-20.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.2, 55, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 45, 0, 0, 29, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-45.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } } - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.6, 50, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-22.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.8, 55, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 5, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 3, 5, 4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 50, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-22.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(-2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.8, 55, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.8, 45, 0, 0, 0, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(-50.0), Some(2.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 5, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 5, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 3, 5, 4); } } - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 6.0); @@ -60,82 +60,82 @@ unsafe extern "C" fn jack_special_airn_down_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn jack_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, Hash40::new("special_hi"), false, 0.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_JACK_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); - ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); + ENABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); - ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); + ENABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 20.0); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("throw"), 3.0, 1.5, 1.5, 0.7, Some(1.5), Some(-15.0), Some(-6.4), *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); - SEARCH(fighter, 1, 0, Hash40::new("throw"), 5.5, 1.5, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); - SEARCH(fighter, 2, 0, Hash40::new("throw"), 5.5, 1.2, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 1.5, 1.5, 0.7, Some(1.5), Some(-15.0), Some(-6.4), *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + SEARCH(agent, 1, 0, Hash40::new("throw"), 5.5, 1.5, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); + SEARCH(agent, 2, 0, Hash40::new("throw"), 5.5, 1.2, 1.5, 0.7, None, None, None, *COLLISION_KIND_MASK_HSR, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - SET_SEARCH_SIZE_EXIST(fighter, 2, 8); + if is_excute(agent) { + SET_SEARCH_SIZE_EXIST(agent, 2, 8); } frame(lua_state, 23.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + UNABLE_AREA(agent, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); } } -unsafe extern "C" fn jack_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_JACK_STATUS_SPECIAL_HI_FLAG_REVERSE_LR); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_JACK_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); // AreaModule::reset_area(boma, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); // ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); @@ -143,91 +143,89 @@ unsafe extern "C" fn jack_special_air_hi_game(fighter: &mut L2CAgentBase) { // ENABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 70, 60, 0, 60, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 70,60, 0, 60, 6.5, 0.0, 22.0, 3.2, Some(0.0), Some(38.0), Some(10.6), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 70, 60, 0, 60, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 70,60, 0, 60, 6.5, 0.0, 22.0, 3.2, Some(0.0), Some(38.0), Some(10.6), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 255, 15, 0, 70, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 255, 15, 0, 70, 6.5, 1.5, 2.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - SET_SEARCH_SIZE_EXIST(fighter, 2, 8); + if is_excute(agent) { + SET_SEARCH_SIZE_EXIST(agent, 2, 8); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { // UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH_ADD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WIREROPE, *WEAPON_JACK_WIREROPE_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); // UNABLE_AREA(fighter, *FIGHTER_JACK_AREA_KIND_ITEM_CATCH); } } -unsafe extern "C" fn jack_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, -1, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, -1, 0.6, true); } } else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, 1, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_wire_line"), Hash40::new("throw"), 0, 0, 0, 115.5, 0, 1, 0.6, true); } } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("sys_smash_flash"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("jack_wire_line"), false, true); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("jack_wire_line"), false, true); } } -unsafe extern "C" fn jack_special_air_hi_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhif(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::mul_speed(boma, &Vector3f::new(0.8, 1.0, 1.0), *FIGHTER_KINETIC_ENERGY_ID_STOP); ArticleModule::change_motion(boma, *FIGHTER_JACK_GENERATE_ARTICLE_WING, Hash40::new("special_hi2_f"), false, 0.0); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 34.0); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_JACK_STATUS_SPECIAL_HI2_FLAG_APPEAR_DOYLE); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_specialairndown", jack_special_airn_down_game) - .acmd("game_specialhi", jack_special_hi_game) - .acmd("game_specialairhi", jack_special_air_hi_game) - .acmd("effect_specialairhi", jack_special_air_hi_effect) - .acmd("game_specialairhif", jack_special_air_hi_f_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairndown", game_specialairndown); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_specialairhif", game_specialairhif); } diff --git a/fighters/jack/src/acmd/throws.rs b/fighters/jack/src/acmd/throws.rs index f7992855d5..bdcf30a07e 100644 --- a/fighters/jack/src/acmd/throws.rs +++ b/fighters/jack/src/acmd/throws.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn jack_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.1, 0.0, Some(0.0), Some(8.1), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.1, 0.0, Some(0.0), Some(8.1), Some(9.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn jack_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn jack_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -64,31 +64,29 @@ unsafe extern "C" fn jack_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 134, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 134, 85, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -7, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -7, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_catch", jack_catch_game) - .acmd("game_catchdash", jack_catch_dash_game) - .acmd("game_catchturn", jack_catch_turn_game) - .acmd("game_throwb", jack_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 54a7894255..2454ae6df6 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -1,385 +1,381 @@ use super::*; -unsafe extern "C" fn jack_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 105, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 105, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 105, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 35, 61, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 35, 61, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 35, 61, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 35, 61, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 35, 61, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 19.0/(35.0-18.0)); + FT_MOTION_RATE(agent, 19.0/(35.0-18.0)); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(9.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(9.0-1.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"),2.0, 115, 100, 80, 0, 2.5, -1.0, 0.0, 0.0, Some(1.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 1.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 3.3, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"),2.0, 115, 100, 80, 0, 2.5, -1.0, 0.0, 0.0, Some(1.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 1.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("knife"), 2.0, 115, 100, 80, 0, 2.0, 0.0, 3.3, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("knife"), 5.0, 90, 116, 0, 75, 5.0, 0.0, 1.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 90, 116, 0, 75, 5.0, 0.0, 1.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ - ATTACK(fighter, 2, 1, Hash40::new("knife"), 5.0, 90, 144, 0, 55, 5.0, 0.0, 1.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("knife"), 5.0, 90, 144, 0, 55, 5.0, 0.0, 1.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 27.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 27.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_hi3_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3 (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 as u64, *EFFECT_AXIS_X, 0.0 as u64, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_jack_sword1"), Hash40::new("tex_jack_sword2"), 4, Hash40::new("knife"), 0.0, 0.25, 0.15, Hash40::new("knife"), 0.0, 5.8, 0.0, true, Hash40::new("jack_knife"), Hash40::new("knife"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 as u64, *EFFECT_AXIS_X, 0.0 as u64, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 180, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_front"), Hash40::new("knife"), 0, 0, 0, 0, 180, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_front"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("jack_knife_spin"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 0); + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_front"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("jack_knife_spin"), Hash40::new("knife"), 0, 0, 0, 0, 0, 0, 1, true); } if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_lightning"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_lightning"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("jack_knife_spin"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_spin"), false, true); } } -unsafe extern "C" fn jack_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("knife"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 35, 35, 0,60, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 35, 0,60, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 4, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("jack_gun_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 4, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("jack_gun_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn jack_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_attack_lw3_ex_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if fighter.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { - FT_MOTION_RATE(fighter, 8.0/(7.0-1.0)); + if agent.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 16.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 12.0, 16.0, 2.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 0, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(fighter, 1, 4, 4); - FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(fighter, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn jack_attack_lw3_ex_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn jack_attack_lw3_ex_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn jack_doyle_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); } } -pub fn install() { - smashline::Agent::new("jack") - .acmd("game_attacks3hi", jack_attack_s3_hi_game) - .acmd("game_attacks3", jack_attack_s3_s_game) - .acmd("game_attacks3lw", jack_attack_s3_lw_game) - .acmd("game_attackhi3", jack_attack_hi3_game) - .acmd("effect_attackhi3", jack_attack_hi3_effect) - .acmd("expression_attackhi3", jack_attack_hi3_expression) - .acmd("game_attacklw3", jack_attack_lw3_game) - .acmd("effect_attacklw3", jack_attack_lw3_effect) - .acmd("expression_attacklw3", jack_attack_lw3_expression) - .acmd("game_attacklw3_ex", jack_attack_lw3_ex_game) - .acmd("effect_attacklw3_ex", jack_attack_lw3_ex_effect) - .acmd("expression_attacklw3_ex", jack_attack_lw3_ex_expression) - .install(); - smashline::Agent::new("jack_doyle") - .acmd("effect_attacklw3", jack_doyle_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); + agent.acmd("game_attacklw3_ex", game_attacklw3_ex); + agent.acmd("effect_attacklw3_ex", effect_attacklw3_ex); + agent.acmd("expression_attacklw3_ex", expression_attacklw3_ex); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/jack/src/fire/acmd.rs b/fighters/jack/src/fire/acmd.rs new file mode 100644 index 0000000000..df4e679d03 --- /dev/null +++ b/fighters/jack/src/fire/acmd.rs @@ -0,0 +1,15 @@ +use super::*; +unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 200, 0, 25, 8.5, 0.0, 1.5, 0.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } +} + + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hit", game_hit); +} diff --git a/fighters/jack/src/fire/mod.rs b/fighters/jack/src/fire/mod.rs new file mode 100644 index 0000000000..f5ade3389c --- /dev/null +++ b/fighters/jack/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("jack"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 8e2ddcc726..3e574e7699 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -6,7 +6,7 @@ pub mod acmd; pub mod status; pub mod opff; - +mod fire; use smash::{ lib::{ L2CValue, @@ -39,7 +39,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("jack"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + + install::fire(); } diff --git a/fighters/jack/src/opff.rs b/fighters/jack/src/opff.rs index 0f2c4ea144..f6aa0a99e2 100644 --- a/fighters/jack/src/opff.rs +++ b/fighters/jack/src/opff.rs @@ -185,8 +185,6 @@ pub unsafe fn jack_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("jack") - .on_line(Main, jack_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, jack_frame_wrapper); } diff --git a/fighters/jack/src/status/dispatch.rs b/fighters/jack/src/status/dispatch.rs index 1cb47a810c..7de9abac4d 100644 --- a/fighters/jack/src/status/dispatch.rs +++ b/fighters/jack/src/status/dispatch.rs @@ -83,9 +83,7 @@ unsafe extern "C" fn jack_dispatch_main_loop(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("jack") - .status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_pre) - .status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_main); } diff --git a/fighters/jack/src/status/doyle.rs b/fighters/jack/src/status/doyle.rs index 8b7d1d44f0..df370ec563 100644 --- a/fighters/jack/src/status/doyle.rs +++ b/fighters/jack/src/status/doyle.rs @@ -8,8 +8,6 @@ pub unsafe extern "C" fn entry_main(weapon: &mut L2CWeaponCommon) -> L2CValue { smashline::original_status(Main, weapon, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY)(weapon) } -pub fn install() { - smashline::Agent::new("jack_doyle") - .status(Main, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY, entry_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_JACK_DOYLE_STATUS_KIND_ENTRY, entry_main); } diff --git a/fighters/jack/src/status/summon.rs b/fighters/jack/src/status/summon.rs index 76d748bda0..bb5b82252a 100644 --- a/fighters/jack/src/status/summon.rs +++ b/fighters/jack/src/status/summon.rs @@ -91,9 +91,7 @@ unsafe extern "C" fn jack_summon_main_loop(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("jack") - .status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_pre) - .status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_main); } From 794059dfb617c0b4f8a85dbb378b0da76972561b Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sun, 24 Mar 2024 01:11:09 -0400 Subject: [PATCH 097/172] Mythra crate --- fighters/elight/src/acmd/aerials.rs | 240 ++- fighters/elight/src/acmd/ground.rs | 116 +- fighters/elight/src/acmd/mod.rs | 16 +- fighters/elight/src/acmd/other.rs | 186 ++- fighters/elight/src/acmd/smashes.rs | 12 +- fighters/elight/src/acmd/specials.rs | 1452 ++++++++--------- fighters/elight/src/acmd/throws.rs | 48 +- fighters/elight/src/acmd/tilts.rs | 160 +- fighters/elight/src/bushin/acmd.rs | 61 + fighters/elight/src/bushin/mod.rs | 9 + fighters/elight/src/lib.rs | 9 +- fighters/elight/src/opff.rs | 6 +- fighters/elight/src/status.rs | 17 +- fighters/elight/src/status/special_hi.rs | 12 +- .../elight/src/status/special_hi_attack.rs | 16 +- .../elight/src/status/special_hi_finish.rs | 10 +- .../elight/src/status/special_hi_finish2.rs | 10 +- fighters/elight/src/status/special_hi_jump.rs | 12 +- 18 files changed, 1182 insertions(+), 1210 deletions(-) create mode 100644 fighters/elight/src/bushin/acmd.rs create mode 100644 fighters/elight/src/bushin/mod.rs diff --git a/fighters/elight/src/acmd/aerials.rs b/fighters/elight/src/acmd/aerials.rs index 83656f118f..e88cd18860 100644 --- a/fighters/elight/src/acmd/aerials.rs +++ b/fighters/elight/src/acmd/aerials.rs @@ -1,56 +1,56 @@ use super::*; -unsafe extern "C" fn elight_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 120, 50, 80, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 6.0, -4.0, 5.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 120, 50, 80, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 4.0, -4.0, 12.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 367, 50, 50, 0, 6.0, -4.0, 5.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 5.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 12.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 10.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 5.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 12.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 118, 0, 48, 4.0, -4.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 361, 118, 0, 48, 10.0, 0.0, 10.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -59,28 +59,28 @@ unsafe extern "C" fn elight_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } frame(lua_state, 72.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_landingairn(fighter: &mut L2CAgentBase) {} +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) {} -unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -89,15 +89,15 @@ unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 50, 65, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.5, 2.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 50, 65, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 9.0, 50, 65, 0, 55, 3.5, 2.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 7.0, 50, 65, 0, 55, 3.0, 2.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -105,29 +105,29 @@ unsafe extern "C" fn elight_attack_air_f_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn elight_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -136,55 +136,55 @@ unsafe extern "C" fn elight_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 77, 65, 0, 60, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.5, 72, 65, 0, 60, 2.5, 0.0, 13.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 18.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 79.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -193,30 +193,30 @@ unsafe extern "C" fn elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, 0.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, -1.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, -2.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, -3.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 81, 75, 0, 50, 4.0, -1.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 3.5, -2.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 6.0, 76, 75, 0, 50, 2.5, -3.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -225,36 +225,36 @@ unsafe extern "C" fn elight_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.8); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 75.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -263,15 +263,15 @@ unsafe extern "C" fn elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 11.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 50, 70, 0, 60, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 7.0, 60, 70, 0, 60, 2.5, 11.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -279,30 +279,28 @@ unsafe extern "C" fn elight_attack_air_lw_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 72.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attackairn", elight_attack_air_n_game) - .acmd("game_landingairn", game_landingairn) - .acmd("game_attackairf", elight_attack_air_f_game) - .acmd("game_attackairb", elight_attack_air_b_game) - .acmd("game_attackairhi", elight_attack_air_hi_game) - .acmd("game_attackairlw", elight_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/elight/src/acmd/ground.rs b/fighters/elight/src/acmd/ground.rs index 0d0de7c7b5..4430acaa38 100644 --- a/fighters/elight/src/acmd/ground.rs +++ b/fighters/elight/src/acmd/ground.rs @@ -1,33 +1,33 @@ use super::*; -unsafe extern "C" fn elight_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -36,31 +36,31 @@ unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 75, 100, 30, 5, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -69,31 +69,31 @@ unsafe extern "C" fn elight_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn elight_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.78); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -102,38 +102,36 @@ unsafe extern "C" fn elight_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 70, 55, 0, 70, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 361, 55, 0, 70, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attack11", elight_attack_11_game) - .acmd("game_attack12", elight_attack_12_game) - .acmd("game_attackdash", elight_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/elight/src/acmd/mod.rs b/fighters/elight/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/elight/src/acmd/mod.rs +++ b/fighters/elight/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/elight/src/acmd/other.rs b/fighters/elight/src/acmd/other.rs index 4b1030e658..e4dfa56545 100644 --- a/fighters/elight/src/acmd/other.rs +++ b/fighters/elight/src/acmd/other.rs @@ -1,212 +1,210 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_elight_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_elight_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_elight_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_elight_step_left_l")); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn just_shield_off_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ColorBlendModule::set_disable_camera_depth_influence(boma, true); - COL_PRI(fighter, 250); - FLASH(fighter, 0, 0.1, 0.6, 0.8); - fighter.clear_lua_stack(); - lua_args!(fighter, -1, 0, 0); - sv_animcmd::FLASH_SET_DIRECTION(fighter.lua_state_agent); - EFFECT(fighter, Hash40::new("elight_foresight2"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_foresight_lensflare"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("elight_foresight_body"), Hash40::new("hip"), 2, 0, 0, 0, 0, 90, 1, true); + COL_PRI(agent, 250); + FLASH(agent, 0, 0.1, 0.6, 0.8); + agent.clear_lua_stack(); + lua_args!(agent, -1, 0, 0); + sv_animcmd::FLASH_SET_DIRECTION(agent.lua_state_agent); + EFFECT(agent, Hash40::new("elight_foresight2"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_foresight_lensflare"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_foresight_body"), Hash40::new("hip"), 2, 0, 0, 0, 0, 90, 1, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 6, 0, 0.1, 0.6, 0); + if is_excute(agent) { + FLASH_FRM(agent, 6, 0, 0.1, 0.6, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); ColorBlendModule::set_disable_camera_depth_influence(boma, false); } } -unsafe extern "C" fn just_shield_off_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rand = sv_math::rand(hash40("fighter"), 10); if rand < 3 { - PLAY_SEQUENCE(fighter, Hash40::new("seq_elight_rnd_foresight")); + PLAY_SEQUENCE(agent, Hash40::new("seq_elight_rnd_foresight")); } - PLAY_SE(fighter, Hash40::new("se_elight_escapeforesight01")); + PLAY_SE(agent, Hash40::new("se_elight_escapeforesight01")); } } -pub fn install() { - smashline::Agent::new("elight") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_justshieldoff", just_shield_off_effect) - .acmd("sound_justshieldoff", just_shield_off_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_justshieldoff", effect_justshieldoff); + agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/elight/src/acmd/smashes.rs b/fighters/elight/src/acmd/smashes.rs index 1b468c35ee..6179e8a574 100644 --- a/fighters/elight/src/acmd/smashes.rs +++ b/fighters/elight/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn elight_attack_s4_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -69,7 +69,7 @@ unsafe extern "C" fn elight_attack_s4_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn elight_attack_lw4_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -139,9 +139,7 @@ unsafe extern "C" fn elight_attack_lw4_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attacks4", elight_attack_s4_game) - .acmd("game_attacklw4", elight_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index 54f94aed88..18c4661d96 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1,20 +1,20 @@ use super::*; -unsafe fn manage_sword_motion(fighter: &mut L2CAgentBase, motion: Hash40) { +unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { let exists = { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); - app::sv_animcmd::IS_EXIST_ARTICLE(fighter.lua_state_agent) + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); + app::sv_animcmd::IS_EXIST_ARTICLE(agent.lua_state_agent) }; if !exists { return; } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial( - fighter.module_accessor, + agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, motion, @@ -29,17 +29,17 @@ unsafe fn manage_sword_motion(fighter: &mut L2CAgentBase, motion: Hash40) { ); } - if MotionModule::is_changing(fighter.module_accessor) && is_excute(fighter) { - fighter.on_flag(*FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); + if MotionModule::is_changing(agent.module_accessor) && is_excute(agent) { + agent.on_flag(*FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } -unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -47,138 +47,138 @@ unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 12.0, 8.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 6.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 6.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 12.0, 8.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 6.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 6.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 9.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 10.0, 8.0, Some(0.0), Some(10.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 4.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 4.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 10, 0, 5.0, 0.0, 10.0, 8.0, Some(0.0), Some(10.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 5.0, 0.0, 4.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 5.0, 0.0, 4.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 7.0, 16.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 11.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 10.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 20, 10, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 11.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 95, 100, 20, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 10.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 11.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 6.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 6.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 20, 10, 3.5, 0.0, 6.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 11.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 95, 100, 20, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 100, 100, 20, 10, 6.0, 0.0, 6.0, 15.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 90, 100, 20, 10, 6.0, 0.0, 6.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(16.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 3.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 15.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 18.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 3.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 15.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 42, 84, 0, 75, 2.8, 18.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{; - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 15.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 4.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 15.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 6.0, 42, 84, 0, 75, 2.8, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 42, 84, 0, 75, 7.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 38.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 46.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -186,14 +186,14 @@ unsafe extern "C" fn game_specialn (fighter: &mut L2CAgentBase) { } } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -201,189 +201,189 @@ unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 10.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 110, 100, 20, 10, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 20, 0, 7.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 12.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 100, 100, 20, 15, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 50, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 11.0, 5.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 15, 100, 20, 15, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 100, 100, 20, 15, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 50, 10, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 11.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 11.0, 5.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 100, 100, 20, 15, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 50, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 15, 100, 20, 15, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 100, 100, 20, 15, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 50, 10, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 17.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 2.0, 366, 100, 50, 20, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 2.0, 15, 100, 20, 15, 6.0, 0.0, 7.0, 22.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 6, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 6, 2.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 6.0, 0.0, 8.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 13.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 14.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 50, 0, 5.0, 0.0, 6.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.0); } frame(lua_state, 37.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_ALL, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 47.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 52.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -395,11 +395,11 @@ unsafe extern "C" fn game_specialn2 (fighter: &mut L2CAgentBase) { // for SOME reason, full charge aerial neutral b would crash if i did the above script as a multiscript install // so we need to reimplement the aerial version too /shrug -unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); } } @@ -407,177 +407,177 @@ unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 100, 50, 10, 7.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 100, 15, 0, 2.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(20.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 10.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 90, 100, 60, 20, 5.0, 0.0, 5.0, 20.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); + if is_excute(agent) { + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK1); } frame(lua_state, 12.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 13.0, 8.0, Some(0.0), Some(13.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 4.0, 1.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 3.5, 8.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 366, 100, 80, 0, 2.8, 14.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 7.0, 8.0, Some(0.0), Some(7.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 13.0, 8.0, Some(0.0), Some(13.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 4.0, 0.0, 1.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 3.5, 0.0, 8.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 366, 100, 80, 0, 2.8, 0.0, 14.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 90, 100, 30, 10, 5.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 100, 80, 10, 5.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(24.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 28.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 4.0, 2.5, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 3.5, 7.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 12.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 2.0, 90, 100, 10, 0, 2.8, 15.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 11.0, 10.0, Some(0.0), Some(11.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 4.0, 0.0, 2.5, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 3.5, 0.0, 7.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 12.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.0, 90, 100, 10, 0, 2.8, 0.0, 15.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 80, 0, 5.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(22.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(fighter.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.0); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 3.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 8.5, 42, 78, 0, 55, 2.8, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 4.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 8.5, 42, 78, 0, 55, 2.8, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 42, 78, 0, 55, 7.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(26.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, /*ID*/ 0, false); AttackModule::clear(boma, /*ID*/ 1, false); AttackModule::clear(boma, /*ID*/ 2, false); AttackModule::clear(boma, /*ID*/ 3, false); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 52.0); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ @@ -585,222 +585,222 @@ unsafe extern "C" fn game_specialairn2 (fighter: &mut L2CAgentBase) { } } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn effect_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn game_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - manage_sword_motion(fighter, Hash40::new("to_open")); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + manage_sword_motion(agent, Hash40::new("to_open")); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 24.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); } frame(lua_state, 25.0); - manage_sword_motion(fighter, Hash40::new("to_close")); + manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn game_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); } - manage_sword_motion(fighter, Hash40::new("to_open")); + manage_sword_motion(agent, Hash40::new("to_open")); frame(lua_state, 23.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 24.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 25.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 26.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 27.0); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 29.0); - manage_sword_motion(fighter, Hash40::new("to_close")); + manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn effect_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT(fighter, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn effect_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT(fighter, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn sound_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_elight_special_h01_rand")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_elight_special_h01_rand")); } frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_elight_special_h02_01_shot")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_elight_special_h02_01_shot")); } } -unsafe extern "C" fn sound_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_elight_special_h02_rand")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_elight_special_h02_rand")); } frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_elight_special_h03_shot")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_elight_special_h03_shot")); } } -unsafe extern "C" fn expression_specialairhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn expression_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); } } -unsafe extern "C" fn expression_specialairhi2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn expression_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } frame(lua_state, 27.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); } } -unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); - let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); - if PostureModule::lr(fighter.module_accessor) > 0.0 { + if is_excute(agent) { + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); + let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); + if PostureModule::lr(agent.module_accessor) > 0.0 { angle *= -1.0; } angle = 80.0 - angle.to_degrees() / 2.0; if angle < 0.0 { angle += 360.0; } - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); @@ -808,11 +808,11 @@ unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); @@ -820,479 +820,405 @@ unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::clear(fighter.module_accessor, 2, false); - AttackModule::clear(fighter.module_accessor, 3, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::clear(agent.module_accessor, 2, false); + AttackModule::clear(agent.module_accessor, 3, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - notify_event_msc_cmd!(fighter, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 10.0); - manage_sword_motion(fighter, Hash40::new("to_close")); + manage_sword_motion(agent, Hash40::new("to_close")); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_light"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_light"), false, false); } } -unsafe extern "C" fn game_specialsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } } -unsafe extern "C" fn effect_specialsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialsstart (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn effect_specialairsstart (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairsstart (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn game_specials (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.7); - JostleModule::set_status(fighter.module_accessor, false); - VarModule::off_flag(fighter.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + JostleModule::set_status(agent.module_accessor, false); + VarModule::off_flag(agent.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 30, 100, 40, 35, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 35, 100, 40, 25, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 2.0); - if is_excute(fighter) { - WorkModule::set_int(fighter.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); - if ArticleModule::get_num(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); + if is_excute(agent) { + WorkModule::set_int(agent.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); + if ArticleModule::get_num(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); + ArticleModule::set_rate(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); } - VisibilityModule::set_whole(fighter.module_accessor, false); + VisibilityModule::set_whole(agent.module_accessor, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (22.0-18.0)/1.0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 3.0); } - if is_excute(fighter) { - WorkModule::off_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); } } -unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(fighter.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } frame(lua_state, 36.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn effect_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(fighter.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } } -unsafe extern "C" fn expression_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_79_slashlarge"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashlarge"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_79_slashsmall"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashsmall"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn sound_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rand = sv_math::rand(hash40("fighter"), 6) as i32; let rand1 = sv_math::rand(hash40("fighter"), 2) as i32; if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R) { if rand1 == 0 { //if you hold taunt, do foresight voicelines - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_escapeforesight01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight01")); } else if rand1 == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_escapeforesight02")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight02")); } } else { //else just run the normal voice pool if rand == 0 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_special_s01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_s01")); } else if rand == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack04")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack04")); } else if rand == 2 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack05")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack05")); } else if rand == 3 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack06")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack06")); } else if rand == 4 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_attack09")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack09")); } else if rand == 5 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_elight_special_l05")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_l05")); } } } frame(lua_state, 2.0); - if is_excute(fighter) { //slash noise - PLAY_SE(fighter, Hash40::new("se_elight_special_s02_end")); + if is_excute(agent) { //slash noise + PLAY_SE(agent, Hash40::new("se_elight_special_s02_end")); } } -unsafe extern "C" fn effect_specialsend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); +unsafe extern "C" fn effect_specialsend (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } } -unsafe extern "C" fn effect_specialairsend (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -0.3); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); +unsafe extern "C" fn effect_specialairsend (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } - -unsafe extern "C" fn game_specials5(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - VisibilityModule::set_whole(fighter.module_accessor, false); - } -} - -unsafe extern "C" fn effect_specials5(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(fighter, -1); - EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, -24, -43, 0.4, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_elight_sword4"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 19.5, 0.0, -0.08, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - } - frame(lua_state, 4.0); - if is_excute(fighter) { - //EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - //EFFECT(fighter, Hash40::new("elight_photon_start"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_appeal_spark"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.7); - EFFECT_FOLLOW(fighter, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FLW_UNSYNC_VIS(fighter, Hash40::new("elight_photon_slash5"), Hash40::new("top"), 0, 0, -3, 0, 0, -2, 0.9, false); - LAST_EFFECT_SET_RATE(fighter, 1.7); - EFFECT(fighter, Hash40::new("elight_photon_slash5_light"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("elight_photon_slash5"), -1); - AFTER_IMAGE_OFF(fighter, 3); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("elight_photon_vanish"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_sword"), true, true); - } -} - -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); - - frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); -} - -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("elight_bunshin") - .acmd("game_specialairs5", game_specials5) - .acmd("game_specials5", game_specials5) - .acmd("effect_specialairs5", effect_specials5) - .acmd("effect_specials5", effect_specials5) - .install(); - smashline::Agent::new("elight") - .acmd("game_specialn", game_specialn) - .acmd("game_specialairn", game_specialn) - .acmd("game_specialn2", game_specialn2) - .acmd("game_specialairn2", game_specialairn2) - .acmd("effect_specialhistart", effect_specialhistart) - .acmd("game_specialairhi1", game_specialairhi1) - .acmd("game_specialairhi2", game_specialairhi2) - .acmd("effect_specialairhi1", effect_specialairhi1) - .acmd("effect_specialairhi2", effect_specialairhi2) - .acmd("sound_specialairhi1", sound_specialairhi1) - .acmd("sound_specialairhi2", sound_specialairhi2) - .acmd("expression_specialairhi1", expression_specialairhi1) - .acmd("expression_specialairhi2", expression_specialairhi2) - .acmd("game_specialairhijump", game_specialairhijump) - .acmd("effect_specialairhijump", effect_specialairhijump) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specialsstart", game_specialsstart) - .acmd("effect_specialsstart", effect_specialsstart) - .acmd("effect_specialairsstart", effect_specialairsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("effect_specials", effect_specials) - .acmd("effect_specialairs", effect_specialairs) - .acmd("expression_specials", expression_specials) - .acmd("expression_specialairs", expression_specials) - .acmd("sound_specials", sound_specials) - .acmd("sound_specialairs", sound_specials) - .acmd("effect_specialsend", effect_specialsend) - .acmd("effect_specialairsend", effect_specialairsend) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialairn2); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi1", effect_specialairhi1); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("sound_specialairhi1", sound_specialairhi1); + agent.acmd("sound_specialairhi2", sound_specialairhi2); + agent.acmd("expression_specialairhi1", expression_specialairhi1); + agent.acmd("expression_specialairhi2", expression_specialairhi2); + agent.acmd("game_specialairhijump", game_specialairhijump); + agent.acmd("effect_specialairhijump", effect_specialairhijump); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialsstart", game_specialairsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialairsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("expression_specials", expression_specials); + agent.acmd("expression_specialairs", expression_specials); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialairsend); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/elight/src/acmd/throws.rs b/fighters/elight/src/acmd/throws.rs index 2dc06afbc5..8ecc5c0bcb 100644 --- a/fighters/elight/src/acmd/throws.rs +++ b/fighters/elight/src/acmd/throws.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn elight_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -21,7 +21,7 @@ unsafe extern "C" fn elight_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn elight_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn elight_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn elight_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -69,18 +69,18 @@ unsafe extern "C" fn elight_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 70, 90, 0, 75, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 70, 90, 0, 75, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } @@ -89,23 +89,23 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.2); //FighterCutInManager::set_throw_finish_offset(boma, 0, 0, 0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } @@ -116,11 +116,9 @@ unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_catch", elight_catch_game) - .acmd("game_catchdash", elight_catch_dash_game) - .acmd("game_catchturn", elight_catch_turn_game) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/elight/src/acmd/tilts.rs b/fighters/elight/src/acmd/tilts.rs index 1ec83226f9..bbf0ab2830 100644 --- a/fighters/elight/src/acmd/tilts.rs +++ b/fighters/elight/src/acmd/tilts.rs @@ -1,50 +1,50 @@ use super::*; -unsafe extern "C" fn elight_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(9.6-9.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(9.6-9.0)); } frame(lua_state, 9.6); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(10.0-9.6)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(10.0-9.6)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 65, 75, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 6.0, 70, 75, 0, 52, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -53,25 +53,25 @@ unsafe extern "C" fn elight_attack_s3_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 30.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -80,29 +80,29 @@ unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-8.0)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(10.0-8.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(10.0-8.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.5, 86, 75, 0, 65, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 5.5, 80, 75, 0, 65, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -111,18 +111,18 @@ unsafe extern "C" fn elight_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 38.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -131,17 +131,17 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(6.25-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(6.25-6.0)); } frame(lua_state, 6.25); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(7.0-6.25)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(7.0-6.25)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 6.5, 79, 65, 0, 75, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 3.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 6.0, 93, 75, 0, 70, 2.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); /* // Hitboxes 5-7 are copies of 2, 3, and 4 ATTACK(fighter, 5, 0, Hash40::new("sword2"), 4.0, 77, 65, 0, 80, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -150,34 +150,34 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { */ } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* ATTACK(fighter, 5, 0, Hash40::new("top"), 4.0, 77, 65, 0, 80, 3.0, 0.0, 2.0, 4.0, Some(0.0), Some(2.0), Some(8.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 93, 75, 0, 75, 2.5, 0.0, 2.0, 13.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); ATTACK(fighter, 7, 0, Hash40::new("top"), 3.0, 93, 75, 0, 75, 2.0, 0.0, 2.0, 16.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); */ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { /* AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); */ - FT_MOTION_RATE(fighter, 1.0/(9.5-9.0)); + FT_MOTION_RATE(agent, 1.0/(9.5-9.0)); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.0/(10.0-9.5)); + FT_MOTION_RATE(agent, 1.0/(10.0-9.5)); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -186,20 +186,18 @@ unsafe extern "C" fn elight_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -pub fn install() { - smashline::Agent::new("elight") - .acmd("game_attacks3", elight_attack_s3_s_game) - .acmd("game_attackhi3", elight_attack_hi3_game) - .acmd("game_attacklw3", elight_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/elight/src/bushin/acmd.rs b/fighters/elight/src/bushin/acmd.rs new file mode 100644 index 0000000000..8bf0335c58 --- /dev/null +++ b/fighters/elight/src/bushin/acmd.rs @@ -0,0 +1,61 @@ +use super::*; +unsafe extern "C" fn game_specialairs5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + VisibilityModule::set_whole(agent.module_accessor, false); + } +} +unsafe extern "C" fn effect_specialairs5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -1); + EFFECT(agent, Hash40::new("elight_photon_appear"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, -24, -43, 0.4, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword4"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 19.5, 0.0, -0.08, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + } + frame(lua_state, 4.0); + if is_excute(agent) { + //EFFECT(fighter, Hash40::new("elight_photon_appear"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + //EFFECT(fighter, Hash40::new("elight_photon_start"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_appeal_spark"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.7); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("elight_photon_speedline"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_slash5"), Hash40::new("top"), 0, 0, -3, 0, 0, -2, 0.9, false); + LAST_EFFECT_SET_RATE(agent, 1.7); + EFFECT(agent, Hash40::new("elight_photon_slash5_light"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("elight_photon_slash5"), -1); + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("throw"), 0, 0, -12.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + //EFFECT_OFF_KIND(fighter, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairs5", game_specialairs5); + agent.acmd("game_specials5", game_specialairs5); + agent.acmd("effect_specialairs5", effect_specialairs5); + agent.acmd("effect_specials5", effect_specialairs5); +} diff --git a/fighters/elight/src/bushin/mod.rs b/fighters/elight/src/bushin/mod.rs new file mode 100644 index 0000000000..9efe9dcee7 --- /dev/null +++ b/fighters/elight/src/bushin/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("elight_bushin"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/elight/src/lib.rs b/fighters/elight/src/lib.rs index 2c30b5e383..674bcdcd7b 100644 --- a/fighters/elight/src/lib.rs +++ b/fighters/elight/src/lib.rs @@ -6,7 +6,7 @@ pub mod acmd; pub mod status; pub mod opff; - +mod bushin; use skyline::nro::NroInfo; use smash::{ lib::{ @@ -40,9 +40,10 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("elight"); + acmd::install(agent); + status::install(agent); + opff::install(agent); // Disables Foresight skyline::patching::Patch::in_text(0xa28e78).nop(); diff --git a/fighters/elight/src/opff.rs b/fighters/elight/src/opff.rs index 0a628328c6..a38aa13d44 100644 --- a/fighters/elight/src/opff.rs +++ b/fighters/elight/src/opff.rs @@ -89,8 +89,6 @@ pub unsafe extern "C" fn elight_frame_wrapper(fighter: &mut smash::lua2cpp::L2CF side_special_landing_lag(fighter); } -pub fn install() { - smashline::Agent::new("elight") - .on_line(Main, elight_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, elight_frame_wrapper); } diff --git a/fighters/elight/src/status.rs b/fighters/elight/src/status.rs index c417e9e933..6eb076c6cd 100644 --- a/fighters/elight/src/status.rs +++ b/fighters/elight/src/status.rs @@ -101,13 +101,12 @@ extern "C" fn elight_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - special_hi_attack::install(); - special_hi_jump::install(); - special_hi_finish::install(); - special_hi_finish2::install(); - special_hi::install(); - smashline::Agent::new("elight") - .on_start(elight_init) - .install(); +pub fn install(agent: &mut Agent) { + special_hi_attack::install(agent); + special_hi_jump::install(agent); + special_hi_finish::install(agent); + special_hi_finish2::install(agent); + special_hi::install(agent); + agent.on_start(elight_init); + agent.install(); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi.rs b/fighters/elight/src/status/special_hi.rs index edb536acd4..26254b7e8e 100644 --- a/fighters/elight/src/status/special_hi.rs +++ b/fighters/elight/src/status/special_hi.rs @@ -102,11 +102,9 @@ unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_exec); } diff --git a/fighters/elight/src/status/special_hi_attack.rs b/fighters/elight/src/status/special_hi_attack.rs index 04f571a648..e3d0d43a1d 100644 --- a/fighters/elight/src/status/special_hi_attack.rs +++ b/fighters/elight/src/status/special_hi_attack.rs @@ -98,13 +98,11 @@ unsafe extern "C" fn special_hi_attack2_end(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_pre) - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_main) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_end) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_pre); + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_main); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1, special_hi_attack1_end); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2, special_hi_attack2_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_finish.rs b/fighters/elight/src/status/special_hi_finish.rs index 13a9d242ff..317e172b0b 100644 --- a/fighters/elight/src/status/special_hi_finish.rs +++ b/fighters/elight/src/status/special_hi_finish.rs @@ -157,10 +157,8 @@ unsafe extern "C" fn special_hi_finish_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH, special_hi_finish_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_finish2.rs b/fighters/elight/src/status/special_hi_finish2.rs index 654cec1bdb..d2c61aab4c 100644 --- a/fighters/elight/src/status/special_hi_finish2.rs +++ b/fighters/elight/src/status/special_hi_finish2.rs @@ -77,10 +77,8 @@ unsafe extern "C" fn special_hi_finish2_end(fighter: &mut L2CFighterCommon) -> L 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_pre) - .status(Main, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_main) - .status(End, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_pre); + agent.status(Main, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_main); + agent.status(End, statuses::elight::SPECIAL_HI_FINISH2, special_hi_finish2_end); } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi_jump.rs b/fighters/elight/src/status/special_hi_jump.rs index db12daf630..7f7f24186b 100644 --- a/fighters/elight/src/status/special_hi_jump.rs +++ b/fighters/elight/src/status/special_hi_jump.rs @@ -154,11 +154,9 @@ unsafe extern "C" fn special_hi_jump_exec(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -pub fn install() { - smashline::Agent::new("elight") - .status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_pre) - .status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main) - .status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end) - .status(Exec, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_pre); + agent.status(Main, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); + agent.status(End, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end); + agent.status(Exec, *FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exec); } \ No newline at end of file From e0a5a9286eef2f516299e49738903ab736c6be0b Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Sun, 24 Mar 2024 22:07:17 -0400 Subject: [PATCH 098/172] misc changes for crates --- fighters/jack/src/status.rs | 9 ++++----- fighters/koopajr/src/acmd/ground.rs | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fighters/jack/src/status.rs b/fighters/jack/src/status.rs index 9ac761ee05..a04b0dd03f 100644 --- a/fighters/jack/src/status.rs +++ b/fighters/jack/src/status.rs @@ -73,9 +73,8 @@ extern "C" fn jack_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - dispatch::install(); - doyle::install(); - summon::install(); - smashline::Agent::new("jack").on_start(jack_init).install(); +pub fn install(agent: &mut Agent) { + dispatch::install(agent); + doyle::install(agent); + summon::install(agent); } diff --git a/fighters/koopajr/src/acmd/ground.rs b/fighters/koopajr/src/acmd/ground.rs index c991bab67a..5d9ca30460 100644 --- a/fighters/koopajr/src/acmd/ground.rs +++ b/fighters/koopajr/src/acmd/ground.rs @@ -81,7 +81,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } -pub fn agentnstall(agent: &mut Agent) { +pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attackdash", game_attackdash); From ad4f7ad7bad2b7ba9d79fd801736a283473fa701 Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Sun, 24 Mar 2024 22:41:56 -0400 Subject: [PATCH 099/172] Shotos crate --- fighters/ken/src/acmd/aerials.rs | 236 ++++---- fighters/ken/src/acmd/finals.rs | 402 +++++++------- fighters/ken/src/acmd/ground.rs | 230 ++++---- fighters/ken/src/acmd/mod.rs | 18 +- fighters/ken/src/acmd/other.rs | 160 +++--- fighters/ken/src/acmd/smashes.rs | 182 +++--- fighters/ken/src/acmd/specials/mod.rs | 12 +- .../ken/src/acmd/specials/special_command.rs | 170 +++--- fighters/ken/src/acmd/specials/special_hi.rs | 344 ++++++------ fighters/ken/src/acmd/specials/special_lw.rs | 132 +++-- fighters/ken/src/acmd/specials/special_n.rs | 524 +++++------------- fighters/ken/src/acmd/specials/special_s.rs | 268 +++++---- fighters/ken/src/acmd/throws.rs | 174 +++--- fighters/ken/src/acmd/tilts.rs | 346 ++++++------ fighters/ken/src/hadoken/acmd.rs | 224 ++++++++ fighters/ken/src/hadoken/mod.rs | 9 + fighters/ken/src/lib.rs | 14 +- fighters/ken/src/opff.rs | 8 +- fighters/ken/src/shinryuken/acmd.rs | 43 ++ fighters/ken/src/shinryuken/mod.rs | 9 + fighters/ken/src/status.rs | 35 +- fighters/ken/src/status/finals.rs | 8 +- fighters/ken/src/status/special_cmd4.rs | 8 +- fighters/ken/src/status/special_hi.rs | 10 +- fighters/ken/src/status/special_lw.rs | 14 +- fighters/ken/src/status/special_n.rs | 8 +- fighters/ken/src/status/special_s.rs | 18 +- fighters/ryu/src/acmd/aerials.rs | 288 +++++----- fighters/ryu/src/acmd/finals.rs | 15 +- fighters/ryu/src/acmd/ground.rs | 424 +++++++------- fighters/ryu/src/acmd/mod.rs | 18 +- fighters/ryu/src/acmd/other.rs | 164 +++--- fighters/ryu/src/acmd/smashes.rs | 233 ++++---- fighters/ryu/src/acmd/specials/mod.rs | 12 +- .../ryu/src/acmd/specials/special_command.rs | 12 +- fighters/ryu/src/acmd/specials/special_hi.rs | 378 +++++++------ fighters/ryu/src/acmd/specials/special_lw.rs | 54 +- fighters/ryu/src/acmd/specials/special_n.rs | 362 ++++++------ fighters/ryu/src/acmd/specials/special_s.rs | 342 ++++++------ fighters/ryu/src/acmd/throws.rs | 174 +++--- fighters/ryu/src/acmd/tilts.rs | 368 ++++++------ fighters/ryu/src/hadoken/acmd.rs | 224 ++++++++ fighters/ryu/src/hadoken/mod.rs | 9 + fighters/ryu/src/lib.rs | 14 +- fighters/ryu/src/opff.rs | 8 +- fighters/ryu/src/shinkuhadoken/acmd.rs | 21 + fighters/ryu/src/shinkuhadoken/mod.rs | 9 + fighters/ryu/src/status.rs | 28 +- fighters/ryu/src/status/finals.rs | 8 +- fighters/ryu/src/status/special_cmd4.rs | 8 +- fighters/ryu/src/status/special_lw.rs | 10 +- fighters/ryu/src/status/special_s.rs | 18 +- hdr-macros/Cargo.lock | 180 ++++++ 53 files changed, 3676 insertions(+), 3311 deletions(-) create mode 100644 fighters/ken/src/hadoken/acmd.rs create mode 100644 fighters/ken/src/hadoken/mod.rs create mode 100644 fighters/ken/src/shinryuken/acmd.rs create mode 100644 fighters/ken/src/shinryuken/mod.rs create mode 100644 fighters/ryu/src/hadoken/acmd.rs create mode 100644 fighters/ryu/src/hadoken/mod.rs create mode 100644 fighters/ryu/src/shinkuhadoken/acmd.rs create mode 100644 fighters/ryu/src/shinkuhadoken/mod.rs create mode 100644 hdr-macros/Cargo.lock diff --git a/fighters/ken/src/acmd/aerials.rs b/fighters/ken/src/acmd/aerials.rs index ab79ba3cf4..b90605ceb6 100644 --- a/fighters/ken/src/acmd/aerials.rs +++ b/fighters/ken/src/acmd/aerials.rs @@ -1,41 +1,41 @@ use super::*; -unsafe extern "C" fn ken_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5 * dmg, 361, 100, 0, 20, 2.5, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * dmg, 361, 100, 0, 20, 2.5, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5 * dmg, 361, 100, 0, 20, 2.5, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * dmg, 361, 100, 0, 20, 2.5, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 361, 90, 0, 20, 2.0, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.5 * dmg, 361, 90, 0, 20, 2.0, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 361, 90, 0, 20, 2.0, 0.0, 7.5, 10.5, Some(0.0), Some(8.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.5 * dmg, 361, 90, 0, 20, 2.0, 0.0, 5.5, -0.7, Some(0.0), Some(5.5), Some(-3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); @@ -43,42 +43,42 @@ unsafe extern "C" fn ken_attack_air_n_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn ken_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 * dmg, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 * dmg, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0 * dmg, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 * dmg, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * dmg, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 17.0 / (36.0 - 15.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0 / (36.0 - 15.0)); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); @@ -86,184 +86,182 @@ unsafe extern "C" fn ken_attack_air_f_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn ken_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (9.0-6.0)/5.0); } frame(lua_state, 9.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0 * dmg, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ken_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn ken_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 9.0 * dmg, 78, 70, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -55, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -55, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 20, 8, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.5); } } -unsafe extern "C" fn ken_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 33.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attackairn", ken_attack_air_n_game) - .acmd("game_attackairf", ken_attack_air_f_game) - .acmd("game_attackairb", ken_attack_air_b_game) - .acmd("effect_attackairb", ken_attack_air_b_effect) - .acmd("game_attackairhi", ken_attack_air_hi_game) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("game_attackairlw", ken_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ken/src/acmd/finals.rs b/fighters/ken/src/acmd/finals.rs index db8f8bb789..749a408b02 100644 --- a/fighters/ken/src/acmd/finals.rs +++ b/fighters/ken/src/acmd/finals.rs @@ -1,191 +1,191 @@ use super::*; -unsafe extern "C" fn game_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); frame(lua_state, 1.0); - if is_excute(fighter) { - CHECK_VALID_FINAL_START_CAMERA(fighter, 0, 0, 20, 0, 0, 0); - SLOW_OPPONENT(fighter, 10.0, 70.0); + if is_excute(agent) { + CHECK_VALID_FINAL_START_CAMERA(agent, 0, 0, 20, 0, 0, 0); + SLOW_OPPONENT(agent, 10.0, 70.0); } if !boma.is_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { frame(lua_state, 5.0); - if is_excute(fighter) { - FT_SET_FINAL_FEAR_FACE(fighter, 40); - REQ_FINAL_START_CAMERA(fighter, Hash40::new("d04final.nuanmb"), true); - FT_START_CUTIN(fighter); + if is_excute(agent) { + FT_SET_FINAL_FEAR_FACE(agent, 40); + REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final.nuanmb"), true); + FT_START_CUTIN(agent); } } else { - if is_excute(fighter) { - FT_START_CUTIN(fighter); + if is_excute(agent) { + FT_START_CUTIN(agent); } - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, 0); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 0, 0); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); } } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 15.0, y: 0.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 0.0}, 5, false); } } else { if(PostureModule::scale(boma) <= 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 20.0, y: 0.0}, 2, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 20.0, y: 0.0}, 2, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 5.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 4.0}, 10, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); frame(lua_state, 25.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 12.0, y: 5.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 15.0, y: 20.0}, 5, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 28.0, y: 5.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 37.0, y: 10.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 15.0, y: 1.0}, 9, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 19.0, y: 5.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 4.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 13.0, y: 7.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 37.0, y: 4.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 37.0, y: 7.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 20.0, y: 2.0}, 13, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 20.0, y: 4.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 55.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 13.0, y: 8.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 13.0, y: 10.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 46.0, y: 8.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 46.0, y: 12.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 22.0, y: 4.0}, 10, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 22.0, y: 7.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 14.0, y: 8.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 16.0, y: 10.0}, 15, false); } } else { if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 44.0, y: 8.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 52.0, y: 10.0}, 15, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 22.0, y: 4.0}, 14, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 26.0, y: 5.0}, 15, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 76.0); - if is_excute(fighter) { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); + if is_excute(agent) { + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); } // PostureModule::scale(boma, 0); @@ -193,338 +193,306 @@ unsafe extern "C" fn game_final(fighter: &mut L2CAgentBase) { // PostureModule::scale(boma); // 0x16e550(0, 0.5); wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); SlowModule::clear_whole(boma); } } -unsafe extern "C" fn game_finalhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); +unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.65); frame(lua_state, 1.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 60, 0, 9.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 60, 0, 9.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 50, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 50, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 367, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 80, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } else{ if(PostureModule::scale(boma) < 0.5){ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 40, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } else{ - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.3, 80, 100, 60, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.3, 80, 100, 60, 0, 10.0, 0.0, 12.0, 10.0, Some(0.0), Some(12.0), Some(14.0), 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL02, *ATTACK_REGION_KICK); } } } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); } - if is_excute(fighter) { - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 10, 0); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + if is_excute(agent) { + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_OFFSET, 10, 0); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); } - if is_excute(fighter) { + if is_excute(agent) { SlowModule::set_whole(boma, 2, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 85, 82, 0, 96, 10.0, 0.0, 17.0, 10.0, Some(0.0), Some(17.0), Some(15.0), 5.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL03, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 85, 82, 0, 96, 10.0, 0.0, 17.0, 10.0, Some(0.0), Some(17.0), Some(15.0), 5.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL03, *ATTACK_REGION_KICK); AttackModule::set_force_reaction(boma, 0, true, false); boma.set_int(*FIGHTER_RYU_FINAL_CAMERA_OFFSET_7, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); // FILL_SCREEN_MODEL_COLOR(fighter, 1, 0, 1, 1, 1, 0, 0, 0, 0.9, 1.7, EffectScreenLayer:*CHAR, *EFFECT_SCREEN_PRIO_FINAL); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); SlowModule::clear_whole(boma); - CANCEL_FILL_SCREEN(fighter, 1, 10); + CANCEL_FILL_SCREEN(agent, 1, 10); } frame(lua_state, 68.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); boma.set_int(*FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); } } -unsafe extern "C" fn game_final_com2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_com2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } } -unsafe extern "C" fn game_final_hit1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 55.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hit4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hit4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 64.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.2, 45, 150, 40, 0, 9.0, 0.0, 11.0, 8.0, Some(0.0), Some(11.0), Some(10.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("ken_final_shippu_hit_rush")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("ken_final_shippu_hit_rush")); } } -unsafe extern "C" fn game_final_hitfinal(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final_hitfinal(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); } } -unsafe extern "C" fn game_final2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0 / (13.0 - 1.0)); + FT_MOTION_RATE(agent, 1.0 / (13.0 - 1.0)); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 8.0 / (36.0 - 13.0)); - if is_excute(fighter) { - CHECK_VALID_FINAL_START_CAMERA(fighter, 0, 0, 20, 0, 0, 0); - SLOW_OPPONENT(fighter, 10.0, 70.0); + FT_MOTION_RATE(agent, 8.0 / (36.0 - 13.0)); + if is_excute(agent) { + CHECK_VALID_FINAL_START_CAMERA(agent, 0, 0, 20, 0, 0, 0); + SLOW_OPPONENT(agent, 10.0, 70.0); } if !boma.is_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { frame(lua_state, 10.0); - if is_excute(fighter) { - FT_START_CUTIN(fighter); - FT_SET_FINAL_FEAR_FACE(fighter, 40); - REQ_FINAL_START_CAMERA(fighter, Hash40::new("d04final2.nuanmb"), true); + if is_excute(agent) { + FT_START_CUTIN(agent); + FT_SET_FINAL_FEAR_FACE(agent, 40); + REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final2.nuanmb"), true); } } else { - if is_excute(fighter) { + if is_excute(agent) { // PostureModule::scale(boma, 3, 0); // 0x16e550(1760657085, 1.8); - CAM_ZOOM_IN_arg5(fighter, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); - FT_START_CUTIN(fighter); + CAM_ZOOM_IN_arg5(agent, 1.8, 0.0, PostureModule::scale(boma) * 3.0, 0.0, 0.0); + FT_START_CUTIN(agent); } frame(lua_state, 40.0); - if is_excute(fighter) { - CAM_ZOOM_OUT(fighter); + if is_excute(agent) { + CAM_ZOOM_OUT(agent); } } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + FT_MOTION_RATE(agent, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 100, 48, 17, 11.0, 0.0, 8.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_uniq_effect_all(boma, true, false); AttackModule::set_damage_shake_scale(boma, 0.18); } if(PostureModule::scale(boma) > 1.4){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 6.0, y: 0.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 6.0, y: 0.0}, 5, false); } } else { if(PostureModule::scale(boma) <= 0.5){ - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 11.0, y: 0.0}, 2, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 11.0, y: 0.0}, 2, false); } } else { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 4.0, y: 5.0}, 5, false); AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &Vector2f{x: 6.0, y: 4.0}, 10, false); } } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 52.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - camera!(fighter, *MA_MSC_CMD_CAMERA_CAM_RECT, 40, -40, 20, 0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + camera!(agent, *MA_MSC_CMD_CAMERA_CAM_RECT, 40, -40, 20, 0); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ADJUST_SHINRYUKEN_POS); } frame(lua_state, 90.0); } -unsafe extern "C" fn ken_shinryuken_game_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 110, 120, 130, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - frame(lua_state, 52.0); - if is_excute(fighter) { - boma.on_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.9, 110, 85, 70, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.9, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - frame(lua_state, 90.0); - if is_excute(fighter) { - boma.off_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); - AttackModule::clear_all(boma); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, 50.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn ken_shinryuken_effect_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 51.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); EffectModule::set_scale_last(boma, &Vector3f::new(0.6, 0.36, 0.6)); } frame(lua_state, 97.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_final_shinryuken_beam"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); } } -pub fn install() { - smashline::Agent::new("ken_shinryuken") - .acmd("game_final", ken_shinryuken_game_final) - .acmd("effect_final", ken_shinryuken_effect_final) - .install(); - smashline::Agent::new("ken") - .acmd("game_final", game_final) - .acmd("game_finalair", game_final) - .acmd("game_finalhit", game_finalhit) - .acmd("game_finalhit_com", game_finalhit) - .acmd("game_final_com2", game_final_com2) - .acmd("game_final_hit1", game_final_hit1) - .acmd("game_final_hit2", game_final_hit2) - .acmd("game_final_hit3", game_final_hit3) - .acmd("game_final_hit4", game_final_hit4) - .acmd("game_final_hitfinal", game_final_hitfinal) - .acmd("game_final2", game_final2) - .acmd("game_finalair2", game_final2) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); + agent.acmd("game_finalair", game_final); + agent.acmd("game_finalhit", game_finalhit); + agent.acmd("game_finalhit_com", game_finalhit); + agent.acmd("game_final_com2", game_final_com2); + agent.acmd("game_final_hit1", game_final_hit1); + agent.acmd("game_final_hit2", game_final_hit2); + agent.acmd("game_final_hit3", game_final_hit3); + agent.acmd("game_final_hit4", game_final_hit4); + agent.acmd("game_final_hitfinal", game_final_hitfinal); + agent.acmd("game_final2", game_final2); + agent.acmd("game_finalair2", game_final2); } diff --git a/fighters/ken/src/acmd/ground.rs b/fighters/ken/src/acmd/ground.rs index 5ac5ec0f67..4c1067fe2e 100644 --- a/fighters/ken/src/acmd/ground.rs +++ b/fighters/ken/src/acmd/ground.rs @@ -1,203 +1,201 @@ use super::*; -unsafe extern "C" fn game_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } frame(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // it's here this early to make light jab --> heavy jab feel like the other target combos - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 180, 25, 8, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 105, 25, 10, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 180, 25, 8, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 105, 25, 10, 25, 3.5, 0.0, 12.5, 9.0, Some(0.0), Some(7.5), Some(9.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 18.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 18.0, 8.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 10.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 10.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn sound_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_punch_m")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_punch_m")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_m")); } } -unsafe extern "C" fn expression_attack11w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn game_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 80, 15, 0, 38, 4.0, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 80, 15, 0, 38, 4.0, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 80, 15, 0, 38, 4.0, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 80, 15, 0, 38, 4.0, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 1, 14.5, 4.5, -5, -13, 109, 0.7, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.6); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11.5, 15, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 1, 14.5, 4.5, -5, -13, 109, 0.7, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.6); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11.5, 15, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false, 0.7); } } -unsafe extern "C" fn sound_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_punch_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_punch_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_l")); } } -unsafe extern "C" fn expression_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ken_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0 * dmg, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0 * dmg, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0 * dmg, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0 * dmg, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attack11w", game_attack11w) - .acmd("effect_attack11w", effect_attack11w) - .acmd("sound_attack11w", sound_attack11w) - .acmd("expression_attack11w", expression_attack11w) - .acmd("game_attack11s", game_attack11s) - .acmd("game_attack11nears", game_attack11s) - .acmd("game_attack12", game_attack11s) - .acmd("effect_attack11s", effect_attack11s) - .acmd("effect_attack11nears", effect_attack11s) - .acmd("effect_attack12", effect_attack11s) - .acmd("sound_attack11s", sound_attack11s) - .acmd("sound_attack11nears", sound_attack11s) - .acmd("sound_attack12", sound_attack11s) - .acmd("expression_attack11s", expression_attack11s) - .acmd("expression_attack11nears", expression_attack11s) - .acmd("expression_attack12", expression_attack11s) - .acmd("game_attackdash", ken_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11w", game_attack11w); + agent.acmd("effect_attack11w", effect_attack11w); + agent.acmd("sound_attack11w", sound_attack11w); + agent.acmd("expression_attack11w", expression_attack11w); + agent.acmd("game_attack11s", game_attack11s); + agent.acmd("game_attack11nears", game_attack11s); + agent.acmd("game_attack12", game_attack11s); + agent.acmd("effect_attack11s", effect_attack11s); + agent.acmd("effect_attack11nears", effect_attack11s); + agent.acmd("effect_attack12", effect_attack11s); + agent.acmd("sound_attack11s", sound_attack11s); + agent.acmd("sound_attack11nears", sound_attack11s); + agent.acmd("sound_attack12", sound_attack11s); + agent.acmd("expression_attack11s", expression_attack11s); + agent.acmd("expression_attack11nears", expression_attack11s); + agent.acmd("expression_attack12", expression_attack11s); + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/ken/src/acmd/mod.rs b/fighters/ken/src/acmd/mod.rs index fbf138c7dc..3c8323a05d 100644 --- a/fighters/ken/src/acmd/mod.rs +++ b/fighters/ken/src/acmd/mod.rs @@ -8,13 +8,13 @@ mod throws; mod ground; mod finals; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); - finals::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); + finals::install(agent); } diff --git a/fighters/ken/src/acmd/other.rs b/fighters/ken/src/acmd/other.rs index 5fd0c5e04f..9491de1d85 100644 --- a/fighters/ken/src/acmd/other.rs +++ b/fighters/ken/src/acmd/other.rs @@ -1,196 +1,194 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ken_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ken_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn ken_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ken_turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sound_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { - PLAY_SE(fighter, Hash40::new("se_ken_guard")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { + PLAY_SE(agent, Hash40::new("se_ken_guard")); } } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", ken_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_guarddamage", sound_guarddamage) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", damageflyhi_sound); + agent.acmd("sound_damageflylw", damageflylw_sound); + agent.acmd("sound_damageflyn", damageflyn_sound); + agent.acmd("sound_damageflyroll", damageflyroll_sound); + agent.acmd("sound_damageflytop", damageflytop_sound); + agent.acmd("sound_dash", dash_sound); + agent.acmd("game_turndash", ken_turn_dash_game); + agent.acmd("game_escapeair", escape_air_game); + agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("sound_guarddamage", sound_guarddamage); } diff --git a/fighters/ken/src/acmd/smashes.rs b/fighters/ken/src/acmd/smashes.rs index e9aa3cd571..387e7ed5fa 100644 --- a/fighters/ken/src/acmd/smashes.rs +++ b/fighters/ken/src/acmd/smashes.rs @@ -1,180 +1,178 @@ use super::*; -unsafe extern "C" fn ken_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0 * dmg, 361, 103, 0, 28, 3.0, 0.0, 12.5, 2.3, Some(0.0), Some(11.5), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 16.0 * dmg, 361, 102, 0, 28, 3.3, 3.5, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 * dmg, 361, 103, 0, 28, 3.0, 0.0, 12.5, 2.3, Some(0.0), Some(11.5), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 16.0 * dmg, 361, 102, 0, 28, 3.3, 3.5, 0.0, 0.0, Some(7.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 11.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 11.0, 1.0); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handl"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 13.5, 83, 86, 0, 32, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 15.8, 83, 95, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 24.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 13.0, 24.0, 21.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 53.0, 19.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 53.0, 19.0); } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 7, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 7, 10, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), -2, 13, -2, 16, -30, 76, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), -2, 13, -2, 16, -30, 76, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 360.0, true, 0.65); } } -unsafe extern "C" fn expression_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); - AREA_WIND_2ND_arg10(fighter, 0, 0.8, 110, 8, 0.8, 0, 4, 32, 8, 80); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + AREA_WIND_2ND_arg10(agent, 0, 0.8, 110, 8, 0.8, 0, 4, 32, 8, 80); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn ken_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal");; let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0 * dmg, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0 * dmg, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0 * dmg, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 1, 1.5, 0, 180, 180, -5, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 1, 1.5, 0, 180, 180, -5, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_ALPHA(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_ALPHA(agent, 0.7); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attacks4", ken_attack_s4_s_game) - .acmd("game_attackhi4", game_attackhi4) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", ken_attack_lw4_game) - .acmd("effect_attacklw4", effect_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ken/src/acmd/specials/mod.rs b/fighters/ken/src/acmd/specials/mod.rs index 863b5c50da..a91a2bc69d 100644 --- a/fighters/ken/src/acmd/specials/mod.rs +++ b/fighters/ken/src/acmd/specials/mod.rs @@ -5,10 +5,10 @@ mod special_lw; mod special_n; mod special_s; -pub fn install() { - special_command::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + special_command::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/ken/src/acmd/specials/special_command.rs b/fighters/ken/src/acmd/specials/special_command.rs index acef58c87d..4939227ef1 100644 --- a/fighters/ken/src/acmd/specials/special_command.rs +++ b/fighters/ken/src/acmd/specials/special_command.rs @@ -1,113 +1,113 @@ use super::*; -unsafe extern "C" fn game_attackcommand1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 75, 80, 0, 10, 4.0, 0.0, 13.5, 6.5, Some(0.0), Some(8.5), Some(6.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + if is_excute(Agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 80, 0, 10, 4.0, 0.0, 13.5, 6.5, Some(0.0), Some(8.5), Some(6.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MeterModule::watch_damage(fighter.battle_object, false); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { MeterModule::watch_damage(fighter.battle_object, true); ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 63, 30, 0, 40, 3.5, 0.0, 6.0, 7.0, Some(0.0), Some(17.8), Some(9.5), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MeterModule::watch_damage(fighter.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackcommand2(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(Agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(Agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); // HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 11.0); if is_excute(fighter) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackcommand3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 12.0, 30, 80, 0, 35, 3.0, 6.3, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.25); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 12.0, 30, 80, 0, 35, 3.0, 6.3, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.25); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); if is_excute(fighter) { @@ -115,99 +115,97 @@ unsafe extern "C" fn game_attackcommand3(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 4.0, 366, 100, 30, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(Agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 14.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 12.0 / (46.0 - 28.0)); + FT_MOTION_RATE(agent, 12.0 / (46.0 - 28.0)); frame(lua_state, 46.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -28, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc"), Hash40::new("ken_attack_arc"), Hash40::new("top"), 0, 10.5, 0, -28, 0, 5, 1.3, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.75); } } -unsafe extern "C" fn sound_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_smash_s01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ken_rnd_attack_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_smash_s01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ken_rnd_attack_ll")); } } -unsafe extern "C" fn expression_attackcommand4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attackcommand1", game_attackcommand1) - .acmd("game_attackcommand2", game_attackcommand2) - .acmd("game_attackcommand3", game_attackcommand3) - .acmd("game_attackcommand4", game_attackcommand4) - .acmd("effect_attackcommand4", effect_attackcommand4) - .acmd("sound_attackcommand4", sound_attackcommand4) - .acmd("expression_attackcommand4", expression_attackcommand4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackcommand1", game_attackcommand1); + agent.acmd("game_attackcommand2", game_attackcommand2); + agent.acmd("game_attackcommand3", game_attackcommand3); + agent.acmd("game_attackcommand4", game_attackcommand4); + agent.acmd("effect_attackcommand4", effect_attackcommand4); + agent.acmd("sound_attackcommand4", sound_attackcommand4); + agent.acmd("expression_attackcommand4", expression_attackcommand4); } diff --git a/fighters/ken/src/acmd/specials/special_hi.rs b/fighters/ken/src/acmd/specials/special_hi.rs index 6cd0801443..e3eea55e50 100644 --- a/fighters/ken/src/acmd/specials/special_hi.rs +++ b/fighters/ken/src/acmd/specials/special_hi.rs @@ -1,317 +1,315 @@ use super::*; -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_S { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 90, 100, 90, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 54, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 54, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 80, 100, 100, 0, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(9.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 112, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.5, 80, 107, 0, 76, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.5, 80, 107, 0, 76, 6.0, 4.0, -0.4, 0.0, Some(-3.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialairhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if MotionModule::motion_kind(agent.module_accessor) == hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } } frame(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_S { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 105, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 2.1, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 80, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 100, 100, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.8, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.8, 95, 10, 0, 95, 4.6, 0.0, 14.5, 7.1, Some(0.0), Some(12.5), Some(8.1), 1.22, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) - && MotionModule::motion_kind(fighter.module_accessor) != hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) + && MotionModule::motion_kind(agent.module_accessor) != hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.6, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.6, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.6, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.6, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } else { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W || boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 80, 121, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 80, 121, 0, 78, 5.5, 4.0, -0.4, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 80, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_SHORYU, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 5.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); } else { - let id = EffectModule::req_follow(fighter.module_accessor, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID, id as i32); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + let id = EffectModule::req_follow(agent.module_accessor, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID, id as i32); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), -3, 2, 2, 5, 0, -5, 1, false); } } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_syoryuken_firearc"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_savingattack_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_syoryuken_firearc"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("ken_savingattack_aura"), -1); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ryu_syoryuken_arc"), true, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 21.0); - if is_excute(fighter) { - let id = VarModule::get_int(fighter.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID) as u32; - EffectModule::kill(fighter.module_accessor, id, true, true); + if is_excute(agent) { + let id = VarModule::get_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID) as u32; + EffectModule::kill(agent.module_accessor, id, true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } -unsafe extern "C" fn game_specialhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialairhicommand", game_specialairhi) - .acmd("game_specialairhiend", game_specialairhiend) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialhicommand", game_specialhi) - .acmd("game_specialhifall", game_specialhifall) - .acmd("effect_specialhi", effect_specialhi) - .acmd("effect_specialhicommand", effect_specialhi) - .acmd("effect_specialairhi", effect_specialhi) - .acmd("effect_specialairhicommand", effect_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhicommand", game_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhicommand", game_specialhi); + agent.acmd("game_specialhifall", game_specialhifall); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialhicommand", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("effect_specialairhicommand", effect_specialhi); } diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index 14f2eb05ef..37469a8c1b 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn game_speciallwinstall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { } @@ -47,106 +47,104 @@ unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_speciallwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 6.0 / 2.0); - if is_excute(fighter) { +unsafe extern "C" fn game_speciallwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 6.0 / 2.0); + if is_excute(agent) { GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 6 + MeterModule::level(agent.battle_object) >= 6 ); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - MeterModule::drain_direct(fighter.battle_object, 0.5 * MeterModule::meter_per_level(fighter.battle_object)); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + MeterModule::drain_direct(agent.battle_object, 0.5 * MeterModule::meter_per_level(agent.battle_object)); } else { - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0 / (26.0 - 18.0)); + FT_MOTION_RATE(agent, 1.0 / (26.0 - 18.0)); } -unsafe extern "C" fn effect_speciallwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); +unsafe extern "C" fn effect_speciallwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn game_specialairlwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 6.0 / 2.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.75); +unsafe extern "C" fn game_specialairlwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 6.0 / 2.0); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.75); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 6 + MeterModule::level(agent.battle_object) >= 6 ); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairlwstepf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); +unsafe extern "C" fn effect_specialairlwstepf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.0, true); } } -unsafe extern "C" fn effect_speciallwstart(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { // stub } -unsafe extern "C" fn effect_specialairlwstart(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairlwstart(agent: &mut L2CAgentBase) { // stub } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_speciallwinstall", game_speciallwinstall) - .acmd("effect_speciallwinstall", effect_speciallwinstall) - .acmd("sound_speciallwinstall", sound_speciallwinstall) - .acmd("expression_speciallwinstall", expression_speciallwinstall) - .acmd("game_speciallwstepf", game_speciallwstepf) - .acmd("effect_speciallwstepf", effect_speciallwstepf) - .acmd("game_specialairlwstepf", game_specialairlwstepf) - .acmd("effect_specialairlwstepf", effect_specialairlwstepf) - .acmd("effect_speciallwstart", effect_speciallwstart) - .acmd("effect_specialairlwstart", effect_specialairlwstart) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwinstall", game_speciallwinstall); + agent.acmd("effect_speciallwinstall", effect_speciallwinstall); + agent.acmd("sound_speciallwinstall", sound_speciallwinstall); + agent.acmd("expression_speciallwinstall", expression_speciallwinstall); + agent.acmd("game_speciallwstepf", game_speciallwstepf); + agent.acmd("effect_speciallwstepf", effect_speciallwstepf); + agent.acmd("game_specialairlwstepf", game_specialairlwstepf); + agent.acmd("effect_specialairlwstepf", effect_specialairlwstepf); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("effect_specialairlwstart", effect_specialairlwstart); } diff --git a/fighters/ken/src/acmd/specials/special_n.rs b/fighters/ken/src/acmd/specials/special_n.rs index f3f04c7ca4..c54b1b0b9b 100644 --- a/fighters/ken/src/acmd/specials/special_n.rs +++ b/fighters/ken/src/acmd/specials/special_n.rs @@ -1,527 +1,303 @@ use super::*; -unsafe extern "C" fn ken_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); // checking SITUATION_KIND_AIR so we don't get a ground hadouken on the 1 frame of landing // I could just rewrite the status script to prevent this but thats a lot. - if is_excute(fighter) && !boma.is_prev_situation(*SITUATION_KIND_AIR) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 2.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) && !boma.is_prev_situation(*SITUATION_KIND_AIR) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 2.0 * MeterModule::damage_gain_mul(agent.battle_object)); } } frame(lua_state, 14.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 36.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn ken_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 0.7 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 0.7 * MeterModule::damage_gain_mul(agent.battle_object)); } } frame(lua_state, 15.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 15.0, 70.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 70.0, 36.0); } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn sound_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n02")); } } else{ if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n01")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n01")); } } else { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_command_success")); - PLAY_SE(fighter, Hash40::new("se_ken_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_command_success")); + PLAY_SE(agent, Hash40::new("se_ken_special_n01")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n03")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_ken_special_n01_command")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_ken_special_n01_command")); } } } } -unsafe extern "C" fn effect_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 4.0); if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 11.5, 14.5, 0, 0, 0, 1, true); + if is_excute(agent) { + COL_NORMAL(agent); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 11.5, 14.5, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("ken_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("ken_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } for _ in 0..6 { wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } wait(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } } else{ frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn effect_specialairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } if !boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { frame(lua_state, 4.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); + if is_excute(agent) { + COL_NORMAL(agent); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 6, 11, 30, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } } else { frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn game_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::enable_safe_pos(boma); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); - VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); - } else { - VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); - } - } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } - if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { - let lr = PostureModule::lr(owner_module_accessor); - GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); - KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - else{ - GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); - } -} - -unsafe extern "C" fn effect_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); - } else { - EFFECT_FOLLOW(fighter, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); - } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } - } -} - -unsafe extern "C" fn sound_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n04")); - } -} - -unsafe extern "C" fn game_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - fighter.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) - } - - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { - let lr = PostureModule::lr(owner_module_accessor); - GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); - KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); - } - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - wait(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); - } -} - -unsafe extern "C" fn effect_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - } -} - -unsafe extern "C" fn game_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn effect_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - } - } -} - -unsafe extern "C" fn sound_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_special_n04")); - } -} -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_specialn", ken_special_n_game) - .acmd("game_specialairn", ken_special_air_n_game) - .acmd("sound_specialn", sound_specialn) - .acmd("sound_specialairn", sound_specialn) - .acmd("effect_specialn", effect_specialn) - .acmd("effect_specialairn", effect_specialairn) - .install(); - smashline::Agent::new("ken_hadoken") - .acmd("game_movew", game_movewms) - .acmd("game_movem", game_movewms) - .acmd("game_moves", game_movewms) - .acmd("effect_movew", effect_movewms) - .acmd("effect_movem", effect_movewms) - .acmd("effect_moves", effect_movewms) - .acmd("sound_movew", sound_movewms) - .acmd("sound_movem", sound_movewms) - .acmd("sound_moves", sound_movewms) - .acmd("game_movespw", game_movespwms) - .acmd("game_movespm", game_movespwms) - .acmd("game_movesps", game_movespwms) - .acmd("game_movespw_last", game_movespwms_last) - .acmd("game_movespm_last", game_movespwms_last) - .acmd("game_movesps_last", game_movespwms_last) - .acmd("effect_movespw", effect_movespwms) - .acmd("effect_movespm", effect_movespwms) - .acmd("effect_movesps", effect_movespwms) - .acmd("effect_movespw_last", effect_movespwms_last) - .acmd("effect_movespm_last", effect_movespwms_last) - .acmd("effect_movesps_last", effect_movespwms_last) - .acmd("sound_movespw", sound_movespwms) - .acmd("sound_movespm", sound_movespwms) - .acmd("sound_movesps", sound_movespwms) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialairn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialairn); } diff --git a/fighters/ken/src/acmd/specials/special_s.rs b/fighters/ken/src/acmd/specials/special_s.rs index b7c00b23dc..0a33a66f78 100644 --- a/fighters/ken/src/acmd/specials/special_s.rs +++ b/fighters/ken/src/acmd/specials/special_s.rs @@ -1,82 +1,82 @@ use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 3.5, 8.5, 8.5); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.5, 8.5, 4.5); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * dmg, 0, 50, 100, 0, 4.5, 0.0, 9.0, 4.5, Some(0.0), Some(9.0), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * dmg, 0, 50, 100, 0, 4.5, 0.0, 9.0, 4.5, Some(0.0), Some(9.0), Some(4.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 3.0, 9.0, 3.0); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } wait(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.6); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - MeterModule::watch_damage(fighter.battle_object, true); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - } else if fighter.is_situation(*SITUATION_KIND_GROUND) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 12.5, 6.25, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * dmg, 365, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0 * dmg, 45, 160, 0, 26, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + } else if agent.is_situation(*SITUATION_KIND_GROUND) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 12.5, 6.25, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * dmg, 365, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0 * dmg, 31, 100, 59, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 45, 0, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0 * dmg, 31, 100, 59, 0, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 2, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -85,24 +85,24 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { AttackModule::set_size(boma, 2, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 12.5, -12.5, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 8.5, -6.25, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - } else if fighter.is_situation(*SITUATION_KIND_GROUND) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 12.5, -12.5, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0 * dmg, 45, 120, 0, 30, 3.5, 0.0, 8.5, -6.25, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + } else if agent.is_situation(*SITUATION_KIND_GROUND) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 363, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0 * dmg, 55, 100, 59, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 9, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); @@ -110,167 +110,165 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5 * dmg, 75, 69, 0, 72, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } else if boma.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { // no finisher } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0 * dmg, 50, 150, 0, 50, 4.0, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(-3.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } if (boma.is_situation(*SITUATION_KIND_GROUND)) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10.5, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10.5, 6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn effect_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 3.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND) && boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } - if is_excute(fighter) { + if is_excute(agent) { // FOOT_EFFECT_FLIP(fighter, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); // LAST_EFFECT_SET_RATE(fighter, 1.1); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("legl"), 0, 0, 0, 0, 0, 0, 1.0, true); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -unsafe extern "C" fn effect_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); if boma.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND) { - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("ken_tatsumaki_smoke_r"), Hash40::new("ken_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("game_specialsend", game_specialsend) - .acmd("game_specialairsend", game_specialsend) - .acmd("effect_specialsstart", effect_specialsstart) - .acmd("effect_specialairsstart", effect_specialsstart) - .acmd("effect_specials", effect_specials) - .acmd("effect_specialairs", effect_specials) - .acmd("effect_specialsend", effect_specialsend) - .acmd("effect_specialairsend", effect_specialsend) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialairs", effect_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialsend); } diff --git a/fighters/ken/src/acmd/throws.rs b/fighters/ken/src/acmd/throws.rs index 94bb4a7bda..194b5a8311 100644 --- a/fighters/ken/src/acmd/throws.rs +++ b/fighters/ken/src/acmd/throws.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn ken_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(7.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ken_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn ken_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ken_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,112 +64,112 @@ unsafe extern "C" fn ken_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 7); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 8.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 8.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 39, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 39, 73, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 7); + CHECK_FINISH_CAMERA(agent, 14, 7); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 10.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 10.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 42.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 77, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 77, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 6.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 6.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 91, 192, 0, 49, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 91, 192, 0, 49, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 2.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 4.0, 91, 130, 0, 60, 4.3, 4.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.8, 2.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.7, -0.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 4.0, 91, 130, 0, 60, 4.3, 4.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.8, 2.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 4.0, 91, 130, 0, 60, 3.7, -0.8, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 20); + CHECK_FINISH_CAMERA(agent, 0, 20); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::add(fighter.battle_object, 1.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::add(agent.battle_object, 1.0 * MeterModule::damage_gain_mul(agent.battle_object)); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } @@ -213,17 +213,15 @@ unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_catch", ken_catch_game) - .acmd("game_catchdash", ken_catch_dash_game) - .acmd("game_catchturn", ken_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .acmd("effect_throwhi", effect_throwhi) - .acmd("sound_throwhi", sound_throwhi) - .acmd("expression_throwhi", expression_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); } diff --git a/fighters/ken/src/acmd/tilts.rs b/fighters/ken/src/acmd/tilts.rs index 6e4b157bc1..0317cf45be 100644 --- a/fighters/ken/src/acmd/tilts.rs +++ b/fighters/ken/src/acmd/tilts.rs @@ -1,42 +1,42 @@ use super::*; -unsafe extern "C" fn game_attacks3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 2.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.8 * dmg, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.8 * dmg, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.8 * dmg, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.8 * dmg, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } @@ -84,302 +84,300 @@ unsafe extern "C" fn expression_attacks3w(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 38, 104, 0, 47, 3.0, 0.0, 12.5, 2.0, Some(0.0), Some(12.5), Some(2.7), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 38, 104, 0, 47, 3.4, 0.0, 12.5, 8.6, Some(0.0), Some(12.5), Some(6.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 38, 104, 0, 47, 3.0, 0.0, 12.5, 2.0, Some(0.0), Some(12.5), Some(2.7), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 38, 104, 0, 47, 3.4, 0.0, 12.5, 8.6, Some(0.0), Some(12.5), Some(6.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn game_attackhi3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 3.0); + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // GROUND ONLY // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground - ATTACK(fighter, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); // AIR ONLY // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage - ATTACK(fighter, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); // HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); // GROUND - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0 * dmg, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); // AIR - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 3.0 * dmg, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 4.0 * dmg, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ken_attack_arc2"), Hash40::new("ken_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn sound_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ken_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ken_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ken_attack06")); } } -unsafe extern "C" fn expression_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -pub fn install() { - smashline::Agent::new("ken") - .acmd("game_attacks3w", game_attacks3w) - .acmd("game_attacknearw", game_attacks3w) - .acmd("effect_attacks3w", effect_attacks3w) - .acmd("effect_attacknearw", effect_attacks3w) - .acmd("sound_attacks3w", sound_attacks3w) - .acmd("sound_attacknearw", sound_attacks3w) - .acmd("expression_attacks3w", expression_attacks3w) - .acmd("expression_attacknearw", expression_attacks3w) - .acmd("game_attacks3s", game_attacks3s) - .acmd("effect_attacks3s", effect_attacks3s) - .acmd("game_attackhi3w", game_attackhi3w) - .acmd("game_attacklw3w", game_attacklw3w) - .acmd("game_attacklw3s", game_attacklw3s) - .acmd("game_attackhi3s", game_attackhi3s) - .acmd("effect_attackhi3s", effect_attackhi3s) - .acmd("sound_attackhi3s", sound_attackhi3s) - .acmd("expression_attackhi3s", expression_attackhi3s) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3w", game_attacks3w); + agent.acmd("game_attacknearw", game_attacks3w); + agent.acmd("effect_attacks3w", effect_attacks3w); + agent.acmd("effect_attacknearw", effect_attacks3w); + agent.acmd("sound_attacks3w", sound_attacks3w); + agent.acmd("sound_attacknearw", sound_attacks3w); + agent.acmd("expression_attacks3w", expression_attacks3w); + agent.acmd("expression_attacknearw", expression_attacks3w); + agent.acmd("game_attacks3s", game_attacks3s); + agent.acmd("effect_attacks3s", effect_attacks3s); + agent.acmd("game_attackhi3w", game_attackhi3w); + agent.acmd("game_attacklw3w", game_attacklw3w); + agent.acmd("game_attacklw3s", game_attacklw3s); + agent.acmd("game_attackhi3s", game_attackhi3s); + agent.acmd("effect_attackhi3s", effect_attackhi3s); + agent.acmd("sound_attackhi3s", sound_attackhi3s); + agent.acmd("expression_attackhi3s", expression_attackhi3s); } diff --git a/fighters/ken/src/hadoken/acmd.rs b/fighters/ken/src/hadoken/acmd.rs new file mode 100644 index 0000000000..b196c224b2 --- /dev/null +++ b/fighters/ken/src/hadoken/acmd.rs @@ -0,0 +1,224 @@ +use super::*; +unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::enable_safe_pos(boma); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); + VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); + } else { + VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); + } + } + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + else{ + GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } + wait(lua_state, 6.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } +} + +unsafe extern "C" fn effect_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); + } + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } + } +} + +unsafe extern "C" fn sound_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) + } + + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + wait(lua_state, 9.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); + } +} + +unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } + } +} + +unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + } +} + +unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + } + } +} + +unsafe extern "C" fn sound_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movew", game_movewms); + agent.acmd("game_movem", game_movewms); + agent.acmd("game_moves", game_movewms); + agent.acmd("effect_movew", effect_movewms); + agent.acmd("effect_movem", effect_movewms); + agent.acmd("effect_moves", effect_movewms); + agent.acmd("sound_movew", sound_movewms); + agent.acmd("sound_movem", sound_movewms); + agent.acmd("sound_moves", sound_movewms); + agent.acmd("game_movespw", game_movespwms); + agent.acmd("game_movespm", game_movespwms); + agent.acmd("game_movesps", game_movespwms); + agent.acmd("game_movespw_last", game_movespwms_last); + agent.acmd("game_movespm_last", game_movespwms_last); + agent.acmd("game_movesps_last", game_movespwms_last); + agent.acmd("effect_movespw", effect_movespwms); + agent.acmd("effect_movespm", effect_movespwms); + agent.acmd("effect_movesps", effect_movespwms); + agent.acmd("effect_movespw_last", effect_movespwms_last); + agent.acmd("effect_movespm_last", effect_movespwms_last); + agent.acmd("effect_movesps_last", effect_movespwms_last); + agent.acmd("sound_movespw", sound_movespwms); + agent.acmd("sound_movespm", sound_movespwms); + agent.acmd("sound_movesps", sound_movespwms); +} \ No newline at end of file diff --git a/fighters/ken/src/hadoken/mod.rs b/fighters/ken/src/hadoken/mod.rs new file mode 100644 index 0000000000..e51c1a9223 --- /dev/null +++ b/fighters/ken/src/hadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ken_hadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ken/src/lib.rs b/fighters/ken/src/lib.rs index 8e2ddcc726..87fc62df9b 100644 --- a/fighters/ken/src/lib.rs +++ b/fighters/ken/src/lib.rs @@ -6,6 +6,8 @@ pub mod acmd; pub mod status; pub mod opff; +mod hadoken; +mod shinryuken; use smash::{ lib::{ @@ -38,8 +40,14 @@ use utils::{ }; use smashline::*; + pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ken"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + install::hadoken; + install::shinryuken; } diff --git a/fighters/ken/src/opff.rs b/fighters/ken/src/opff.rs index 43d28ac029..d27413d50c 100644 --- a/fighters/ken/src/opff.rs +++ b/fighters/ken/src/opff.rs @@ -63,11 +63,9 @@ extern "Rust" { fn shotos_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); } -pub fn install() { - smashline::Agent::new("ken") - .on_line(Main, ken_frame_wrapper) - .on_line(Main, ken_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ken_frame_wrapper); + agent.on_line(Main, ken_meter); } unsafe extern "C" fn ken_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { diff --git a/fighters/ken/src/shinryuken/acmd.rs b/fighters/ken/src/shinryuken/acmd.rs new file mode 100644 index 0000000000..726dd2707d --- /dev/null +++ b/fighters/ken/src/shinryuken/acmd.rs @@ -0,0 +1,43 @@ +use super::*; +unsafe extern "C" fn ken_shinryuken_game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 110, 120, 130, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + frame(lua_state, 52.0); + if is_excute(agent) { + boma.on_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.9, 110, 85, 70, 0, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.9, 367, 100, 100, 0, 11.0, 0.0, 50.0, 8.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + frame(lua_state, 90.0); + if is_excute(agent) { + boma.off_flag(*WEAPON_KEN_SHINRYUKEN_INSTANCE_WORK_ID_FLAG_ADD_ATTACK); + AttackModule::clear_all(boma); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, -10.0, 8.0, Some(0.0), Some(50.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 90, 59, 0, 100, 11.0, 0.0, 50.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn ken_shinryuken_effect_final(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + frame(lua_state, 51.0); + if is_excute(fighter) { + EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); + EffectModule::set_scale_last(boma, &Vector3f::new(0.6, 0.36, 0.6)); + } + frame(lua_state, 97.0); + if is_excute(fighter) { + EFFECT_DETACH_KIND(fighter, Hash40::new("ken_final_shinryuken_beam"), -1); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", ken_shinryuken_game_final); + agent.acmd("effect_final", ken_shinryuken_effect_final); +} \ No newline at end of file diff --git a/fighters/ken/src/shinryuken/mod.rs b/fighters/ken/src/shinryuken/mod.rs new file mode 100644 index 0000000000..757246c127 --- /dev/null +++ b/fighters/ken/src/shinryuken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ken_shinryuken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ken/src/status.rs b/fighters/ken/src/status.rs index 606cc9ce6b..0452ed2e0d 100644 --- a/fighters/ken/src/status.rs +++ b/fighters/ken/src/status.rs @@ -7,7 +7,6 @@ mod special_hi; mod special_lw; mod special_n; mod special_s; - utils::import_noreturn!(common::shoto_status::{ fgc_end_dashback, ryu_idkwhatthisis2 @@ -638,22 +637,20 @@ pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValu fgc_landing_main(fighter) } -pub fn install() { - finals::install(); - special_cmd4::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); - - smashline::Agent::new("ken") - .on_start(ken_init) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); +pub fn install(agent: &mut Agent) { + finals::install(agent); + special_cmd4::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); + + agent.on_start(ken_init); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); } diff --git a/fighters/ken/src/status/finals.rs b/fighters/ken/src/status/finals.rs index 519d84043d..9ba673d229 100644 --- a/fighters/ken/src/status/finals.rs +++ b/fighters/ken/src/status/finals.rs @@ -43,9 +43,7 @@ pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2); } diff --git a/fighters/ken/src/status/special_cmd4.rs b/fighters/ken/src/status/special_cmd4.rs index c7b943b463..48c692f571 100644 --- a/fighters/ken/src/status/special_cmd4.rs +++ b/fighters/ken/src/status/special_cmd4.rs @@ -71,9 +71,7 @@ pub unsafe extern "C" fn ken_attack_command_4_main_loop(fighter: &mut L2CFighter 0.into() } -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_pre) - .status(Main, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_pre); + agent.status(Main, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_main); } diff --git a/fighters/ken/src/status/special_hi.rs b/fighters/ken/src/status/special_hi.rs index be659e9a75..36417804b8 100644 --- a/fighters/ken/src/status/special_hi.rs +++ b/fighters/ken/src/status/special_hi.rs @@ -25,10 +25,8 @@ pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> return 0.into(); } -pub fn install() { - smashline::Agent::new("ken") - .status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, end_special_hi_jump) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, end_special_hi_jump) - .status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, end_special_hi_jump) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, end_special_hi_jump); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, end_special_hi_jump); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, end_special_hi_jump); } diff --git a/fighters/ken/src/status/special_lw.rs b/fighters/ken/src/status/special_lw.rs index 4657fa4700..77cb987146 100644 --- a/fighters/ken/src/status/special_lw.rs +++ b/fighters/ken/src/status/special_lw.rs @@ -2,14 +2,12 @@ use super::*; use globals::*; use smashline::*; -pub fn install() { - smashline::Agent::new("ken") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init) - .status(Pre, statuses::ken::INSTALL, special_lw_install_pre) - .status(Main, statuses::ken::INSTALL, special_lw_install_main) - .status(End, statuses::ken::INSTALL, special_lw_install_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init); + agent.status(Pre, statuses::ken::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ken::INSTALL, special_lw_install_main); + agent.status(End, statuses::ken::INSTALL, special_lw_install_end); } // FIGHTER_STATUS_KIND_SPECIAL_LW // diff --git a/fighters/ken/src/status/special_n.rs b/fighters/ken/src/status/special_n.rs index 32b68aa3ce..32fe164f92 100644 --- a/fighters/ken/src/status/special_n.rs +++ b/fighters/ken/src/status/special_n.rs @@ -2,11 +2,9 @@ use super::*; use globals::*; use smashline::*; -pub fn install() { - smashline::Agent::new("ken") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command); } // FIGHTER_STATUS_KIND_SPECIAL_N // diff --git a/fighters/ken/src/status/special_s.rs b/fighters/ken/src/status/special_s.rs index f7c316962f..2ed9744614 100644 --- a/fighters/ken/src/status/special_s.rs +++ b/fighters/ken/src/status/special_s.rs @@ -29,18 +29,8 @@ pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP)(fighter) } -pub fn install() { - smashline::Agent::new("ken") - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - init_special_s_command, - ) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - init_special_s_loop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND,init_special_s_command,); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP,init_special_s_loop,); } diff --git a/fighters/ryu/src/acmd/aerials.rs b/fighters/ryu/src/acmd/aerials.rs index 2a67d67ee2..672077e19e 100644 --- a/fighters/ryu/src/acmd/aerials.rs +++ b/fighters/ryu/src/acmd/aerials.rs @@ -1,267 +1,265 @@ use super::*; -unsafe extern "C" fn ryu_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 100, 0, 20, 4.3, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 4.2, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 90, 0, 13, 3.0, 0.0, 8.7, -1.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + MeterModule::watch_damage(agent.battle_object, false); + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 61, 56, 0, 82, 4.3, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 61, 56, 0, 82, 4.0, 0.0, 5.5, 10.6, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 70, 25, 0, 65, 3.8, 0.0, 5.3, 0.5, Some(0.0), Some(5.3), Some(10.6), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 17.0 / (36.0 - 15.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0 / (36.0 - 15.0)); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn ryu_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (9.0-6.0)/5.0); } frame(lua_state, 9.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.0, 361, 115, 0, 20, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 11.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn ryu_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), Hash40::new("top"), 2.0, 10.0, 0.0, 0, 0, 0, 1.5, false, *EF_FLIP_YZ, 0.6); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 9.5, -6, -8, 140, -20, 1, true, *EF_FLIP_YZ, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn ryu_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 366, 100, 20, 0, 5.0, 0.0, 15.0, 5.1, Some(0.0), Some(16.5), Some(5.1), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 366, 100, 20, 0, 5.0, 0.0, 15.0, 5.1, Some(0.0), Some(16.5), Some(5.1), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 75, 172, 0, 0, 6.0, 0.0, 17.0, 4.0, Some(0.0), Some(18.5), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 75, 172, 0, 0, 6.0, 0.0, 17.0, 4.0, Some(0.0), Some(18.5), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 300, 66, 0, 10, 3.0, 0.0, 3.0, 9.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 48, 80, 0, 20, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 87, 14, 0, 60, 4.4, 0.0, 3.0, 9.5, Some(0.0), Some(8.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 33.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attackairn", ryu_attack_air_n_game) - .acmd("game_attackairf", ryu_attack_air_f_game) - .acmd("expression_attackairf", ryu_attack_air_f_expression) - .acmd("game_attackairb", ryu_attack_air_b_game) - .acmd("effect_attackairb", ryu_attack_air_b_effect) - .acmd("game_attackairhi", ryu_attack_air_hi_game) - .acmd("game_attackairlw", ryu_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ryu/src/acmd/finals.rs b/fighters/ryu/src/acmd/finals.rs index 1e8ad26beb..8e1a256fbb 100644 --- a/fighters/ryu/src/acmd/finals.rs +++ b/fighters/ryu/src/acmd/finals.rs @@ -134,14 +134,9 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ryu_shinkuhadoken") - .acmd("game_move", game_move) - .install(); - smashline::Agent::new("ryu") - .acmd("game_final", game_final) - .acmd("game_finalair", game_final) - .acmd("game_finalhit", game_finalhit) - .acmd("game_finalairhit", game_finalhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); + agent.acmd("game_finalair", game_final); + agent.acmd("game_finalhit", game_finalhit); + agent.acmd("game_finalairhit", game_finalhit); } diff --git a/fighters/ryu/src/acmd/ground.rs b/fighters/ryu/src/acmd/ground.rs index ca5875bf33..ece3607b58 100644 --- a/fighters/ryu/src/acmd/ground.rs +++ b/fighters/ryu/src/acmd/ground.rs @@ -1,357 +1,349 @@ use super::*; -unsafe extern "C" fn ryu_attack_11_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 5, 0, Hash40::new("top"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 6.0, 6.5, Some(0.0), Some(6.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 6.0, 6.5, Some(0.0), Some(6.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 12, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // ground - ATTACK(fighter, 1, 0, Hash40::new("arml"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 4.0, 180, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); // air - ATTACK(fighter, 3, 0, Hash40::new("arml"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handl"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handl"), 4.0, 361, 12, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A , *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - FT_MOTION_RATE_RANGE(fighter, 5.0, 8.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 5.0, 8.0, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_11_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 12.2, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 12.2, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn ryu_attack_11_w_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack11w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_punch_m")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ryu_rnd_attack_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_punch_m")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ryu_rnd_attack_m")); } } -unsafe extern "C" fn ryu_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr") , 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr") , 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0, 361, 25, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 10.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 7.0, 10.0, 10.0); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12.0, 4.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 12.0, 4.5, 0, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 360, false, 0.3); } } -unsafe extern "C" fn ryu_attack_12_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_s")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_s")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack02")); } } -unsafe extern "C" fn ryu_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 4.0, 0.0, 12.0, 7.5, Some(0.0), Some(12.0), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 3.0, 0.0, 7.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 4.0, 0.0, 12.0, 7.5, Some(0.0), Some(12.0), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 53, 65, 0, 60, 3.0, 0.0, 7.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 23.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 23.0, 8.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 26.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 12.5, 0, 10, 0, 170, 0.82, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), 0, 12.5, 0, 10, 0, 170, 0.82, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.75, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 13.75, 10, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn ryu_attack_13_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack08")); } } -unsafe extern "C" fn game_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.0); +unsafe extern "C" fn game_attack11s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 80, 15, 0, 38, 3.5, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 80, 15, 0, 38, 3.5, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 80, 15, 0, 38, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 80, 15, 0, 38, 3.5, 1.7, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 80, 15, 0, 38, 3.5, 2.3, 0.0, 0.0, None, None, None, 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 80, 15, 0, 38, 3.0, 0.0, 9.0, 8.0, Some(0.0), Some(9.0), Some(11.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack11s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11nears(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("trans"), 0, 14, -3, 0, 0, 0, 0.7, true, *EF_FLIP_YZ, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("armr"), 3.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, false, 0.4); } } -unsafe extern "C" fn game_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); // HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), -2, 12, 3, 30, -20, -170, 1.1, true, *EF_FLIP_YZ, 0.35); - LAST_EFFECT_SET_RATE(fighter, 1.35); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc"), Hash40::new("ryu_attack_arc"), Hash40::new("top"), -2, 12, 3, 30, -20, -170, 1.1, true, *EF_FLIP_YZ, 0.35); + LAST_EFFECT_SET_RATE(agent, 1.35); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sound_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_ryu_rnd_attack_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SEQUENCE(agent, Hash40::new("seq_ryu_rnd_attack_l")); } } -unsafe extern "C" fn expression_attack12s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack12s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.95); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 50, 65, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 50, 65, 0, 80, 4.2, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 80, 60, 0, 80, 3.7, 5.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attack11w", ryu_attack_11_w_game) - .acmd("effect_attack11w", ryu_attack_11_w_effect) - .acmd("sound_attack11w", ryu_attack_11_w_sound) - - .acmd("game_attack12", ryu_attack_12_game) - .acmd("effect_attack12", ryu_attack_12_effect) - .acmd("sound_attack12", ryu_attack_12_sound) - - .acmd("game_attack13", ryu_attack_13_game) - .acmd("effect_attack13", ryu_attack_13_effect) - .acmd("sound_attack13", ryu_attack_13_sound) - - .acmd("game_attack11s", game_attack11s) - .acmd("game_attack11nears", game_attack11s) - .acmd("effect_attack11s", effect_attack11s) - .acmd("effect_attack11nears", effect_attack11s) - - .acmd("game_attack12s", game_attack12s) - .acmd("effect_attack12s", effect_attack12s) - .acmd("sound_attack12s", sound_attack12s) - .acmd("expression_attack12s", expression_attack12s) - - - .acmd("game_attackdash", game_attackdash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11w", game_attack11w); + agent.acmd("effect_attack11w", effect_attack11w); + agent.acmd("sound_attack11w", sound_attack11w); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("sound_attack12", sound_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("sound_attack13", sound_attack13); + agent.acmd("game_attack11s", game_attack11s); + agent.acmd("game_attack11nears", game_attack11s); + agent.acmd("effect_attack11s", effect_attack11nears); + agent.acmd("effect_attack11nears", effect_attack11nears); + agent.acmd("game_attack12s", game_attack12s); + agent.acmd("effect_attack12s", effect_attack12s); + agent.acmd("sound_attack12s", sound_attack12s); + agent.acmd("expression_attack12s", expression_attack12s); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ryu/src/acmd/mod.rs b/fighters/ryu/src/acmd/mod.rs index 7bf1c091a8..5cbd77b66f 100644 --- a/fighters/ryu/src/acmd/mod.rs +++ b/fighters/ryu/src/acmd/mod.rs @@ -8,13 +8,13 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - finals::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + finals::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/ryu/src/acmd/other.rs b/fighters/ryu/src/acmd/other.rs index cc09f4a8e0..a9b31f51ba 100644 --- a/fighters/ryu/src/acmd/other.rs +++ b/fighters/ryu/src/acmd/other.rs @@ -1,195 +1,193 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ryu_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ryu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn ryu_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sound_guarddamage(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { - PLAY_SE(fighter, Hash40::new("se_ryu_guard")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF) { + PLAY_SE(agent, Hash40::new("se_ryu_guard")); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", ryu_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("sound_guarddamage", sound_guarddamage) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_guarddamage", sound_guarddamage); } diff --git a/fighters/ryu/src/acmd/smashes.rs b/fighters/ryu/src/acmd/smashes.rs index 4344798a82..ad3b8aea3f 100644 --- a/fighters/ryu/src/acmd/smashes.rs +++ b/fighters/ryu/src/acmd/smashes.rs @@ -1,219 +1,216 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 10.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.0, 0.0, 9.5, 8.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.3, 0.0, 9.5, 4.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.6, 0.0, 12.0, 2.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.0, 0.0, 9.5, 8.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.3, 0.0, 9.5, 4.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 367, 100, 30, 0, 3.6, 0.0, 12.0, 2.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.5, 0.0, 9.5, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.8, 0.0, 9.5, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 4.1, 0.0, 12.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.5, 0.0, 9.5, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 3.8, 0.0, 9.5, 4.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 98, 0, 26, 4.1, 0.0, 12.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 27.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_attack_line"), Hash40::new("ryu_attack_line"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.25, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_attack_line"), Hash40::new("ryu_attack_line"), Hash40::new("top"), -5, 9.5, 1, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.25, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.75, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 9.5, 8.75, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn effect_attacks4charge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); } for _ in 0..34 { wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); } } } -unsafe extern "C" fn sound_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_smash_s01")); - PLAY_SE(fighter, Hash40::new("vc_ryu_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_smash_s01")); + PLAY_SE(agent, Hash40::new("vc_ryu_smash_s01")); } wait(lua_state, 38.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ryu_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ryu_step_left_m")); } } -unsafe extern "C" fn expression_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - AREA_WIND_2ND_arg10(fighter, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); + AREA_WIND_2ND_arg10(agent, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.4, 83, 95, 0, 30, 5.3, 0.0, 9.0, 8.5, None, None, None, 1.22, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.4, 83, 95, 0, 30, 5.3, 0.0, 9.0, 8.5, None, None, None, 1.22, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.5, 83, 86, 0, 32, 4.3, -2.0, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.5, 83, 86, 0, 32, 4.3, -2.0, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 83, 86, 0, 32, 4.8, 0.0, 21.5, 5.0, Some(0.0), Some(17.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 83, 86, 0, 32, 4.8, 0.0, 21.5, 5.0, Some(0.0), Some(17.0), Some(6.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 35, 47, 0, 50, 3.6, 0.0, 2.5, 12.0, Some(0.0), Some(3.0), Some(8.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -6, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 80, 50, 0, 50, 2.5, 0.0, 3.0, 2.5, Some(0.0), Some(3.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("effect_attacks4charge", effect_attacks4charge) - .acmd("sound_attacks4", sound_attacks4) - .acmd("expression_attacks4", expression_attacks4) - - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/ryu/src/acmd/specials/mod.rs b/fighters/ryu/src/acmd/specials/mod.rs index 863b5c50da..a91a2bc69d 100644 --- a/fighters/ryu/src/acmd/specials/mod.rs +++ b/fighters/ryu/src/acmd/specials/mod.rs @@ -5,10 +5,10 @@ mod special_lw; mod special_n; mod special_s; -pub fn install() { - special_command::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); +pub fn install(agent: &mut Agent) { + special_command::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/ryu/src/acmd/specials/special_command.rs b/fighters/ryu/src/acmd/specials/special_command.rs index 0437c35ee4..41e7770557 100644 --- a/fighters/ryu/src/acmd/specials/special_command.rs +++ b/fighters/ryu/src/acmd/specials/special_command.rs @@ -175,11 +175,9 @@ unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attackcommand4", game_attackcommand4) - .acmd("effect_attackcommand4", effect_attackcommand4) - .acmd("sound_attackcommand4", sound_attackcommand4) - .acmd("expression_attackcommand4", expression_attackcommand4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackcommand4", game_attackcommand4); + agent.acmd("effect_attackcommand4", effect_attackcommand4); + agent.acmd("sound_attackcommand4", sound_attackcommand4); + agent.acmd("expression_attackcommand4", expression_attackcommand4); } diff --git a/fighters/ryu/src/acmd/specials/special_hi.rs b/fighters/ryu/src/acmd/specials/special_hi.rs index 619d0dbb4e..16f2b537ba 100644 --- a/fighters/ryu/src/acmd/specials/special_hi.rs +++ b/fighters/ryu/src/acmd/specials/special_hi.rs @@ -1,323 +1,321 @@ use super::*; -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 80, 49, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 80, 49, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 60, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 60, 0, 80, 5.0, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 80, 57, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 80, 107, 0, 84, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.0, 80, 107, 0, 84, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 80, 107, 0, 84, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 80, 107, 0, 84, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 70, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + MeterModule::watch_damage(agent.battle_object, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialairhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + if MotionModule::motion_kind(agent.module_accessor) == hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } } frame(lua_state, 4.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - } else if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 80, 58, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_REVERSE_LR); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_DECIDE_STRENGTH); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 105, 100, 125, 0, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + } else if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 80, 58, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 80, 69, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 80, 69, 0, 80, 4.6, 0.0, 10.0, 7.6, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); } else { - if MotionModule::motion_kind(fighter.module_accessor) != hash40("special_hi_command") { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if MotionModule::motion_kind(agent.module_accessor) != hash40("special_hi_command") { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 64, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag( *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::watch_damage(fighter.battle_object, false); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 82, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 82, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag( *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_HI_FLAG_JUMP); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::watch_damage(agent.battle_object, false); + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 80, 126, 0, 82, 5.5, 4.0, -0.4, 0.0, Some(-4.0), Some(-0.4), Some(0.0), 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.5, 80, 126, 0, 82, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W - || fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W + || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 5.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 60, 6.0, 4.0, -0.4, 0.0, None, None, None, 1.25, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); AttackModule::clear_all(boma); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_specialhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn effect_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 17, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), -6.5, 5, 0, 5, 0, -25, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syoryuken_arc"), Hash40::new("trans"), -6.5, 5, 0, 5, 0, -25, 1, false); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), -1); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("top"), 10, 8, 3, -100, 160, 0, 1.4, false, *EF_FLIP_NONE); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ryu_syoryuken_arc"), -1); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("top"), 10, 8, 3, -100, 160, 0, 1.4, false, *EF_FLIP_NONE); + LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("ryu_syoryuken_arc"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("ryu_syoryuken_arc"), true, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 22.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 32.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialairhi", game_specialairhi) - .acmd("game_specialairhicommand", game_specialairhi) - .acmd("game_specialairhiend", game_specialairhiend) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialhicommand", game_specialhi) - .acmd("game_specialhifall", game_specialhifall) - .acmd("effect_specialhi", effect_specialhi) - .acmd("effect_specialairhi", effect_specialhi) - .acmd("effect_specialhicommand", effect_specialhi) - .acmd("effect_specialairhicommand", effect_specialhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhicommand", game_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhicommand", game_specialhi); + agent.acmd("game_specialhifall", game_specialhifall); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialhi); + agent.acmd("effect_specialhicommand", effect_specialhi); + agent.acmd("effect_specialairhicommand", effect_specialhi); } diff --git a/fighters/ryu/src/acmd/specials/special_lw.rs b/fighters/ryu/src/acmd/specials/special_lw.rs index 5600cc1aae..a08a6f77be 100644 --- a/fighters/ryu/src/acmd/specials/special_lw.rs +++ b/fighters/ryu/src/acmd/specials/special_lw.rs @@ -1,32 +1,32 @@ use super::*; -unsafe extern "C" fn game_speciallwstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL) { VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL, - MeterModule::level(fighter.battle_object) >= 4 + MeterModule::level(agent.battle_object) >= 4 ); - MeterModule::drain_direct(fighter.battle_object, 1.0 * MeterModule::meter_per_level(fighter.battle_object)); + MeterModule::drain_direct(agent.battle_object, 1.0 * MeterModule::meter_per_level(agent.battle_object)); } else { - VarModule::off_flag(fighter.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::shotos::status::IS_ENABLE_MAGIC_SERIES_CANCEL); } - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_ENABLE_SPECIAL_LW_INSTALL); } } -unsafe extern "C" fn game_speciallwinstall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { @@ -140,17 +140,15 @@ unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_speciallwstart", game_speciallwstart) - .acmd("game_specialairlwstart", game_speciallwstart) - .acmd("game_speciallwinstall", game_speciallwinstall) - .acmd("effect_speciallwinstall", effect_speciallwinstall) - .acmd("sound_speciallwinstall", sound_speciallwinstall) - .acmd("expression_speciallwinstall", expression_speciallwinstall) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwturn", game_speciallwturn) - .acmd("game_specialairlwturn", game_speciallwturn) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_speciallwstart); + agent.acmd("game_speciallwinstall", game_speciallwinstall); + agent.acmd("effect_speciallwinstall", effect_speciallwinstall); + agent.acmd("sound_speciallwinstall", sound_speciallwinstall); + agent.acmd("expression_speciallwinstall", expression_speciallwinstall); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwturn", game_speciallwturn); + agent.acmd("game_specialairlwturn", game_speciallwturn); } diff --git a/fighters/ryu/src/acmd/specials/special_n.rs b/fighters/ryu/src/acmd/specials/special_n.rs index b34e177d42..e46564b806 100644 --- a/fighters/ryu/src/acmd/specials/special_n.rs +++ b/fighters/ryu/src/acmd/specials/special_n.rs @@ -1,161 +1,161 @@ use super::*; -unsafe extern "C" fn game_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); frame(lua_state, 10.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if boma.is_button_on(Buttons::Guard | Buttons::GuardHold) - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) && !ArticleModule::is_exist(boma, *FIGHTER_RYU_GENERATE_ARTICLE_HADOKEN) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED); } else { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); - if fighter.kind() != *FIGHTER_KIND_KIRBY - && !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::add(fighter.battle_object, 2.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SHOOT); + if agent.kind() != *FIGHTER_KIND_KIRBY + && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::add(agent.battle_object, 2.0 * MeterModule::damage_gain_mul(agent.battle_object)); } } } frame(lua_state, 14.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 18.0); - } else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 26.0); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 18.0); + } else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 26.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 58.0, 31.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 58.0, 31.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_SPECIAL_FALL); } frame(lua_state, 58.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND) { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 11, -7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 4.0); - if !fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + if !agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_FLAG_FAILED) { + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_hold"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, true); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } else { - FLASH(fighter, 0.392, 1, 1, 0.353); + FLASH(agent, 0.392, 1, 1, 0.353); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } frame(lua_state, 11.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_N_INT_TYPE) == 0 { + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_shot"), Hash40::new("top"), 0, 11.5, 10, 0, 0, 0, 1, true); } } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("ryu_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("ryu_hadoken_smoke"), Hash40::new("top"), 8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } for _ in 0..6 { wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 3.0); - if is_excute(fighter) - && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) + && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } else{ frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 12, 0, -4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("throw"), 0, 0, 0, 90, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } } // RYU_HADOUKEN -unsafe extern "C" fn game_movewms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL, VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) ); VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) ); @@ -167,73 +167,73 @@ unsafe extern "C" fn game_movewms(fighter: &mut L2CAgentBase) { VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); } wait(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); } - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.13); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); } } -unsafe extern "C" fn effect_movemws(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_movemws(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if fighter.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + if is_excute(agent) { + if agent.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("ryu_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { // LAST_EFFECT_SET_COLOR(fighter, 2.0, 2.0, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -0.5, 0, 0, 0, 1.25, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 1.5, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -0.5, 0, 0, 0, 1.25, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 1.5, false); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); } } } -unsafe extern "C" fn game_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((fighter.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); +unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL, VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) ); VarModule::set_flag( - fighter.battle_object, + agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) ); @@ -241,106 +241,84 @@ unsafe extern "C" fn game_movespwms(fighter: &mut L2CAgentBase) { MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - fighter.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } wait(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); } } -unsafe extern "C" fn effect_movespwms(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); } else { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); } } } -unsafe extern "C" fn game_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } } } -unsafe extern "C" fn effect_movespwms_last(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); +unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialn", game_specialn) - .acmd("game_specialairn", game_specialn) - .acmd("effect_specialn", effect_specialn) - .acmd("effect_specialairn", effect_specialn) - .install(); - smashline::Agent::new("ryu_hadoken") - .acmd("game_movew", game_movewms) - .acmd("game_movem", game_movewms) - .acmd("game_moves", game_movewms) - .acmd("effect_movew", effect_movemws) - .acmd("effect_movem", effect_movemws) - .acmd("effect_moves", effect_movemws) - .acmd("game_movespw", game_movespwms) - .acmd("game_movespm", game_movespwms) - .acmd("game_movesps", game_movespwms) - .acmd("effect_movespw", effect_movespwms) - .acmd("effect_movespm", effect_movespwms) - .acmd("effect_movesps", effect_movespwms) - .acmd("game_movespw_last", game_movespwms_last) - .acmd("game_movespm_last", game_movespwms_last) - .acmd("game_movesps_last", game_movespwms_last) - .acmd("effect_movespw_last", effect_movespwms_last) - .acmd("effect_movespm_last", effect_movespwms_last) - .acmd("effect_movesps_last", effect_movespwms_last) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); } diff --git a/fighters/ryu/src/acmd/specials/special_s.rs b/fighters/ryu/src/acmd/specials/special_s.rs index 5cb46eac79..0aeb4f51e1 100644 --- a/fighters/ryu/src/acmd/specials/special_s.rs +++ b/fighters/ryu/src/acmd/specials/special_s.rs @@ -1,91 +1,91 @@ use super::*; -unsafe extern "C" fn game_specialsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 3.5, 8.5, 8.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if is_excute(agent) { + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.5, 3.0, 9.0, 3.0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_REFLECTOR, *COLLISION_KIND_REFLECTOR, 0, hash40("top"), 11.0, 0.0, 11.0, 7.0, 0.0, 11.0, -7.0, 0.0, 0.0, 1, false, 0.0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); } } frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 0.5); - fighter.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); + FT_MOTION_RATE(agent, 0.5); + agent.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_LOOP_COUNT) > 2 { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - MeterModule::watch_damage(fighter.battle_object, true); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 12.5, 12.5, Some(0.0), Some(12.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 71, 0, 80, 3.5, 0.0, 8.5, 6.25, Some(0.0), Some(8.5), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); AttackModule::set_size(boma, 1, 0.1); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.5, 366, 100, 70, 0, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - MeterModule::watch_damage(fighter.battle_object, true); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 67, 40, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 50, 56, 0, 80, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(-2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_target_category(boma, 1, *COLLISION_CATEGORY_MASK_NO_IF as u32); AttackModule::set_size(boma, 0, 0.1); @@ -93,206 +93,204 @@ unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_INT_START_SITUATION) == *SITUATION_KIND_GROUND { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_REFLECTOR_GROUP_HOMERUNBAT); } if VarModule::is_flag(boma.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 12.5, -11.0, Some(0.0), Some(12.5), Some(12.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 75, 70, 0, 85, 3.5, 0.0, 8.5, -5.5, Some(0.0), Some(8.5), Some(6.25), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 6.0); - if fighter.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { - FT_MOTION_RATE_RANGE(fighter, 6.0, 31.0, 12.0); + if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W { + FT_MOTION_RATE_RANGE(agent, 6.0, 31.0, 12.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn ryu_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ryu_special_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 1.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND){ - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_FLAG_COMMAND){ + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -unsafe extern "C" fn ryu_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ryu_special_s_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if fighter.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ - LANDING_EFFECT_FLIP(fighter, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + if agent.is_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_S_FLAG_GROUND){ + LANDING_EFFECT_FLIP(agent, Hash40::new("ryu_tatsumaki_smoke_r"), Hash40::new("ryu_tatsumaki_smoke_l"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } } } -unsafe extern "C" fn ryu_special_air_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ryu_special_air_s_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT(fighter, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 14, 10.5, 3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn ryu_special_air_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ryu_special_air_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 1.7); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ryu_savingattack_line_r"), Hash40::new("ryu_savingattack_line_l"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.1, false, *EF_FLIP_NONE); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); - EFFECT_FOLLOW(fighter, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("hip"), -2, 0, 0, 0, 0, 0, 1.4, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("neck"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handl"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneel"), 4, 0, 0, 0, 0, 0, 1.1, true); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("kneer"), 4, 0, 0, 0, 0, 0, 1.1, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 1.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 1.7); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 0.95, 0.522, 0.051, 0.7); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 0.95, 0.522, 0.051, 0.7); } } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_specialsstart", game_specialsstart) - .acmd("game_specialairsstart", game_specialsstart) - .acmd("game_specials", game_specials) - .acmd("game_specialairs", game_specials) - .acmd("game_specialsend", game_specialsend) - .acmd("game_specialairsend", game_specialsend) - .acmd("effect_specials", ryu_special_s_effect) - .acmd("effect_specialsend", ryu_special_s_end_effect) - .acmd("effect_specialairsend", ryu_special_air_s_end_effect) - .acmd("effect_specialairs", ryu_special_air_s_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairsend", game_specialsend); + agent.acmd("effect_specials", ryu_special_s_effect); + agent.acmd("effect_specialsend", ryu_special_s_end_effect); + agent.acmd("effect_specialairsend", ryu_special_air_s_end_effect); + agent.acmd("effect_specialairs", ryu_special_air_s_effect); } diff --git a/fighters/ryu/src/acmd/throws.rs b/fighters/ryu/src/acmd/throws.rs index 93374973ba..b93fe85d84 100644 --- a/fighters/ryu/src/acmd/throws.rs +++ b/fighters/ryu/src/acmd/throws.rs @@ -1,33 +1,33 @@ use super::*; -unsafe extern "C" fn ryu_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.200); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.200); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(9.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn ryu_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -47,7 +47,7 @@ unsafe extern "C" fn ryu_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -67,128 +67,126 @@ unsafe extern "C" fn ryu_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 7); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 8.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 8.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 39, 64, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 39, 64, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 15, 4); + if is_excute(agent) { + agent.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); + CHECK_FINISH_CAMERA(agent, 15, 4); } frame(lua_state, 23.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::add(fighter.battle_object, 11.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::add(agent.battle_object, 11.0 * MeterModule::damage_gain_mul(agent.battle_object)); } wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 50, 100, 40, 100, 4.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 0); + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - MeterModule::add(fighter.battle_object, 6.0 * MeterModule::damage_gain_mul(fighter.battle_object)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + MeterModule::add(agent.battle_object, 6.0 * MeterModule::damage_gain_mul(agent.battle_object)); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 75, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 75, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 20); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 27.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 2.6, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.7, 5.3, 0.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 2.6, -1.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.7, 5.3, 0.5, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_catch", ryu_catch_game) - .acmd("game_catchdash", ryu_catch_dash_game) - .acmd("game_catchturn", ryu_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .acmd("game_throwhi", game_throwhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/ryu/src/acmd/tilts.rs b/fighters/ryu/src/acmd/tilts.rs index 3a906df071..3b010ab8f4 100644 --- a/fighters/ryu/src/acmd/tilts.rs +++ b/fighters/ryu/src/acmd/tilts.rs @@ -1,37 +1,37 @@ use super::*; -unsafe extern "C" fn game_attacks3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); +unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 2.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 2.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.8, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.8, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.8, 65, 46, 0, 62, 3.8, 0.0, 11.0, 6.5, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.8, 85, 46, 0, 62, 3.8, 0.0, 11.0, 12.0, Some(0.0), Some(11.0), Some(5.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.5, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } @@ -78,294 +78,288 @@ unsafe extern "C" fn expression_attacks3w(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 270, 100, 15, 0, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 3.0, 270, 100, 15, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 270, 100, 15, 0, 4.2, 0.0, 11.0, 10.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 270, 100, 15, 0, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 3.0, 270, 100, 15, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 270, 100, 15, 0, 4.2, 0.0, 11.0, 10.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.0, 46, 90, 0, 60, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 6.0, 46, 90, 0, 60, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 46, 90, 0, 60, 4.2, 0.0, 7.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.0, 46, 90, 0, 60, 3.0, 1.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 6.0, 46, 90, 0, 60, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 46, 90, 0, 60, 4.2, 0.0, 7.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 20, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - let attr = if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { Hash40::new("collision_attr_elec") } else { Hash40::new("collision_attr_normal") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 84, 39, 0, 33, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(15.1), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 90, 52, 0, 50, 4.6, 0.0, 16.0, 5.4, Some(0.0), Some(12.6), Some(5.4), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 15.0, 3.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + FT_MOTION_RATE_RANGE(agent, 8.0, 15.0, 3.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 21.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); // HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // GROUND - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 3.0, 80, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); // AIR - ATTACK(fighter, 3, 0, Hash40::new("legr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footr"), 3.0, 280, 120, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 4.0, 90, 82, 0, 59, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn effect_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 12, 7, -90, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true, 0.5); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 7, 5, -90, 0, 0, 0.8, true, *EF_FLIP_YZ, 0.15); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 9.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("ryu_attack_arc2"), Hash40::new("ryu_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("ryu_attack_arc2"), Hash40::new("ryu_attack_arc2"), Hash40::new("top"), 0, 13.5, 10.0, 0, -14, -90, 0.8, true, *EF_FLIP_YZ, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn sound_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_ryu_swing_kick_l")); - PLAY_SE(fighter, Hash40::new("vc_ryu_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ryu_swing_kick_l")); + PLAY_SE(agent, Hash40::new("vc_ryu_attack06")); } } -unsafe extern "C" fn expression_attackhi3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attacklw3w(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); +unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); // GROUND ONLY // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground - ATTACK(fighter, 0, 0, Hash40::new("legl"), 1.6, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 1.6, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 1.6, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); // AIR ONLY // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage - ATTACK(fighter, 3, 0, Hash40::new("legl"), 1.6, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -unsafe extern "C" fn game_attacklw3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - fighter.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } -pub fn install() { - smashline::Agent::new("ryu") - .acmd("game_attacks3w", game_attacks3w) - .acmd("game_attacknearw", game_attacks3w) - .acmd("effect_attacks3w", effect_attacks3w) - .acmd("sound_attacks3w", sound_attacks3w) - .acmd("expression_attacks3w", expression_attacks3w) - - .acmd("game_attacks3s", game_attacks3s) - .acmd("game_attackhi3w", game_attackhi3w) - - .acmd("game_attackhi3s", game_attackhi3s) - .acmd("effect_attackhi3s", effect_attackhi3s) - .acmd("sound_attackhi3s", sound_attackhi3s) - .acmd("expression_attackhi3s", expression_attackhi3s) - - .acmd("game_attacklw3w", game_attacklw3w) - .acmd("game_attacklw3s", game_attacklw3s) - - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3w", game_attacks3w); + agent.acmd("game_attacknearw", game_attacks3w); + agent.acmd("effect_attacks3w", effect_attacks3w); + agent.acmd("sound_attacks3w", sound_attacks3w); + agent.acmd("expression_attacks3w", expression_attacks3w); + agent.acmd("game_attacks3s", game_attacks3s); + agent.acmd("game_attackhi3w", game_attackhi3w); + agent.acmd("game_attackhi3s", game_attackhi3s); + agent.acmd("effect_attackhi3s", effect_attackhi3s); + agent.acmd("sound_attackhi3s", sound_attackhi3s); + agent.acmd("expression_attackhi3s", expression_attackhi3s); + agent.acmd("game_attacklw3w", game_attacklw3w); + agent.acmd("game_attacklw3s", game_attacklw3s); } diff --git a/fighters/ryu/src/hadoken/acmd.rs b/fighters/ryu/src/hadoken/acmd.rs new file mode 100644 index 0000000000..b196c224b2 --- /dev/null +++ b/fighters/ryu/src/hadoken/acmd.rs @@ -0,0 +1,224 @@ +use super::*; +unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::enable_safe_pos(boma); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); + VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); + } else { + VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); + } + } + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + else{ + GroundModule::set_rhombus_offset(boma, &Vector2f{x: 0.0, y: 0.0}); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } + wait(lua_state, 6.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 0, 10, 0, 45, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 60, 10, 0, 65, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); + } + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); + } +} + +unsafe extern "C" fn effect_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if !boma.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ken_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, false); + } + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ken_hadoken_bullethand_l"), Hash40::new("ken_hadoken_bullethand_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("top"), 0, -5.0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } + } +} + +unsafe extern "C" fn sound_movewms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_USE_EX_SPECIAL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) + ); + VarModule::set_flag( + agent.battle_object, + vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, + VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) + ); + if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { + MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) + } + + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + if (VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR)) { + let lr = PostureModule::lr(owner_module_accessor); + GroundModule::set_rhombus_offset(boma, &Vector2f{x: -4.0 * lr, y: 3.0}); + KineticModule::reflect_speed(boma, &Vector3f{x: 0.26, y: lr * 0.97, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + VarModule::off_flag(owner_module_accessor.object(), vars::shotos::instance::IS_CURRENT_HADOKEN_AIR); + } + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + wait(lua_state, 9.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); + } +} + +unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); + EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); + } else { + EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); + } + } +} + +unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + } +} + +unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); + } + } +} + +unsafe extern "C" fn sound_movespwms(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_ken_special_n04")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movew", game_movewms); + agent.acmd("game_movem", game_movewms); + agent.acmd("game_moves", game_movewms); + agent.acmd("effect_movew", effect_movewms); + agent.acmd("effect_movem", effect_movewms); + agent.acmd("effect_moves", effect_movewms); + agent.acmd("sound_movew", sound_movewms); + agent.acmd("sound_movem", sound_movewms); + agent.acmd("sound_moves", sound_movewms); + agent.acmd("game_movespw", game_movespwms); + agent.acmd("game_movespm", game_movespwms); + agent.acmd("game_movesps", game_movespwms); + agent.acmd("game_movespw_last", game_movespwms_last); + agent.acmd("game_movespm_last", game_movespwms_last); + agent.acmd("game_movesps_last", game_movespwms_last); + agent.acmd("effect_movespw", effect_movespwms); + agent.acmd("effect_movespm", effect_movespwms); + agent.acmd("effect_movesps", effect_movespwms); + agent.acmd("effect_movespw_last", effect_movespwms_last); + agent.acmd("effect_movespm_last", effect_movespwms_last); + agent.acmd("effect_movesps_last", effect_movespwms_last); + agent.acmd("sound_movespw", sound_movespwms); + agent.acmd("sound_movespm", sound_movespwms); + agent.acmd("sound_movesps", sound_movespwms); +} \ No newline at end of file diff --git a/fighters/ryu/src/hadoken/mod.rs b/fighters/ryu/src/hadoken/mod.rs new file mode 100644 index 0000000000..a23c598292 --- /dev/null +++ b/fighters/ryu/src/hadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ryu_hadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ryu/src/lib.rs b/fighters/ryu/src/lib.rs index 8e2ddcc726..5f36e8f1ee 100644 --- a/fighters/ryu/src/lib.rs +++ b/fighters/ryu/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +mod hadoken; +mod shinkuhadoken; + use smash::{ lib::{ L2CValue, @@ -39,7 +42,12 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("ryu"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + hadoken::install(); + shinkuhadoken::insall(); } diff --git a/fighters/ryu/src/opff.rs b/fighters/ryu/src/opff.rs index 0a9fe75583..ae145743d5 100644 --- a/fighters/ryu/src/opff.rs +++ b/fighters/ryu/src/opff.rs @@ -64,11 +64,9 @@ extern "Rust" { fn shotos_common(fighter: &mut smash::lua2cpp::L2CFighterCommon); } -pub fn install() { - smashline::Agent::new("ryu") - .on_line(Main, ryu_frame_wrapper) - .on_line(Main, ryu_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, ryu_frame_wrapper); + agent.on_line(Main, ryu_meter); } unsafe extern "C" fn ryu_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { diff --git a/fighters/ryu/src/shinkuhadoken/acmd.rs b/fighters/ryu/src/shinkuhadoken/acmd.rs new file mode 100644 index 0000000000..6718fc7edc --- /dev/null +++ b/fighters/ryu/src/shinkuhadoken/acmd.rs @@ -0,0 +1,21 @@ +use super::*; +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 75, 0, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + // ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 80, 0, 35.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(agent.lua_state_agent, 90.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + } + wait(agent.lua_state_agent, 6.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } +} +pub fn install(agent: &mut Agent) { +agent.acmd("game_move", game_move); +} \ No newline at end of file diff --git a/fighters/ryu/src/shinkuhadoken/mod.rs b/fighters/ryu/src/shinkuhadoken/mod.rs new file mode 100644 index 0000000000..3d3ab27dc1 --- /dev/null +++ b/fighters/ryu/src/shinkuhadoken/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ryu_shinkuhadoken"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/ryu/src/status.rs b/fighters/ryu/src/status.rs index f1a646eb26..c2e708b762 100644 --- a/fighters/ryu/src/status.rs +++ b/fighters/ryu/src/status.rs @@ -29,22 +29,20 @@ extern "C" { fn status_end_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; } -pub fn install() { - smashline::Agent::new("ryu") - .on_start(ryu_init) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) +pub fn install(agent: &mut Agent) { + agent.on_start(ryu_init); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); // .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); - finals::install(); - special_cmd4::install(); - special_lw::install(); - special_s::install(); + agenr.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); + finals::install(agent); + special_cmd4::install(agent); + special_lw::install(agent); + special_s::install(agent); } extern "C" fn ryu_init(fighter: &mut L2CFighterCommon) { diff --git a/fighters/ryu/src/status/finals.rs b/fighters/ryu/src/status/finals.rs index a419fd810a..9ba673d229 100644 --- a/fighters/ryu/src/status/finals.rs +++ b/fighters/ryu/src/status/finals.rs @@ -43,9 +43,7 @@ pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final) - .status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2); } diff --git a/fighters/ryu/src/status/special_cmd4.rs b/fighters/ryu/src/status/special_cmd4.rs index 9972656e41..4543ea2bf7 100644 --- a/fighters/ryu/src/status/special_cmd4.rs +++ b/fighters/ryu/src/status/special_cmd4.rs @@ -79,9 +79,7 @@ pub unsafe extern "C" fn ryu_attack_command_4_main_loop(fighter: &mut L2CFighter 0.into() } -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_pre) - .status(Main, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_pre); + agent.status(Main, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_main); } diff --git a/fighters/ryu/src/status/special_lw.rs b/fighters/ryu/src/status/special_lw.rs index 743535ba65..142fb92b48 100644 --- a/fighters/ryu/src/status/special_lw.rs +++ b/fighters/ryu/src/status/special_lw.rs @@ -2,12 +2,10 @@ use super::*; use globals::*; use smashline::*; -pub fn install() { - smashline::Agent::new("ryu") - .status(Pre, statuses::ryu::INSTALL, special_lw_install_pre) - .status(Main, statuses::ryu::INSTALL, special_lw_install_main) - .status(End, statuses::ryu::INSTALL, special_lw_install_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ryu::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ryu::INSTALL, special_lw_install_main); + agent.status(End, statuses::ryu::INSTALL, special_lw_install_end); } unsafe extern "C" fn special_lw_install_pre(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/ryu/src/status/special_s.rs b/fighters/ryu/src/status/special_s.rs index 3b11dcdde2..8cf6369901 100644 --- a/fighters/ryu/src/status/special_s.rs +++ b/fighters/ryu/src/status/special_s.rs @@ -29,18 +29,8 @@ pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP)(fighter) } -pub fn install() { - smashline::Agent::new("ryu") - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, - init_special_s_command, - ) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status( - Init, - *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, - init_special_s_loop, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status( Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND,init_special_s_command,); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status( Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP,init_special_s_loop,); } diff --git a/hdr-macros/Cargo.lock b/hdr-macros/Cargo.lock new file mode 100644 index 0000000000..6dcb0f56b1 --- /dev/null +++ b/hdr-macros/Cargo.lock @@ -0,0 +1,180 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "array-init" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" + +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + +[[package]] +name = "binrw" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab81d22cbd2d745852348b2138f3db2103afa8ce043117a374581926a523e267" +dependencies = [ + "array-init", + "binrw_derive", + "bytemuck", +] + +[[package]] +name = "binrw_derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b019a3efebe7f453612083202887b6f1ace59e20d010672e336eea4ed5be97" +dependencies = [ + "either", + "owo-colors", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytemuck" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "diff-struct" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30a0f0aafc8da0d598388b1897310646f45f47f17e31d581b4390f9dd88e826" +dependencies = [ + "diff_derive", + "serde", +] + +[[package]] +name = "diff_derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f9c37d395456d9c1785499421c6288931b6e3dbc2500acb95b8adaa0e69db3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "hash40" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c76fa4f247c50db43ae8b86975fc923ab9170b2cb242ce90231e0caca81352b5" +dependencies = [ + "bimap", + "binrw", + "byteorder", + "diff-struct", + "lazy_static", + "serde", +] + +[[package]] +name = "hdr-macros" +version = "0.1.0" +dependencies = [ + "hash40", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "proc-macro2" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" From ddeb0a888fee04e2ede26e0cfa031f2656df1b87 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sun, 24 Mar 2024 23:54:33 -0400 Subject: [PATCH 100/172] misc crates 2 --- fighters/elight/src/acmd/specials.rs | 2 +- fighters/gekkouga/src/opff.rs | 2 +- fighters/jack/src/acmd/tilts.rs | 5 +- fighters/jack/src/fire/acmd.rs | 56 +++++++++++++++++-- fighters/jack/src/lib.rs | 4 +- .../ken/src/acmd/specials/special_command.rs | 26 ++++----- fighters/ken/src/lib.rs | 5 +- fighters/ryu/src/lib.rs | 2 +- fighters/ryu/src/status.rs | 2 +- 9 files changed, 75 insertions(+), 29 deletions(-) diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index 18c4661d96..ab41c58e4d 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1219,6 +1219,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairs", sound_specials); agent.acmd("effect_specialsend", effect_specialsend); agent.acmd("effect_specialairsend", effect_specialairsend); - agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialn", game_specialn); agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/gekkouga/src/opff.rs b/fighters/gekkouga/src/opff.rs index f16e5bc630..d0c9f92704 100644 --- a/fighters/gekkouga/src/opff.rs +++ b/fighters/gekkouga/src/opff.rs @@ -106,5 +106,5 @@ pub unsafe fn gekkouga_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } pub fn install(agent: &mut Agent) { - agent.on_line(Main, gekkouga_frame_wrapper) + agent.on_line(Main, gekkouga_frame_wrapper); } diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 2454ae6df6..523a0e6023 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -1,5 +1,4 @@ use super::*; - unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -343,7 +342,7 @@ unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn jack_doyle_attack_lw3_effect(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -377,5 +376,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attacklw3_ex", game_attacklw3_ex); agent.acmd("effect_attacklw3_ex", effect_attacklw3_ex); agent.acmd("expression_attacklw3_ex", expression_attacklw3_ex); - agent.acmd("effect_attacklw3", effect_attacklw3); } + diff --git a/fighters/jack/src/fire/acmd.rs b/fighters/jack/src/fire/acmd.rs index df4e679d03..72fff391d8 100644 --- a/fighters/jack/src/fire/acmd.rs +++ b/fighters/jack/src/fire/acmd.rs @@ -1,15 +1,59 @@ use super::*; -unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 1.0); + if agent.is_flag(*FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { + FT_MOTION_RATE(agent, 8.0/(7.0-1.0)); + } + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 8.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 200, 0, 25, 8.5, 0.0, 1.5, 0.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - AttackModule::set_poison_param(boma, 0, 361, 45, 1.0, false); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); } -} + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + FT_MOTION_RATE_RANGE(agent, 12.0, 16.0, 2.0); + frame(lua_state, 16.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 20, 0, 20, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 35, 50, 0, 60, 2.5, 0.0, 7.0, 5.0, Some(0.0), Some(2.0), Some(18.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-1.0), Some(26.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 7.0, 5.0, Some(0.0), Some(-4.0), Some(34.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_jack_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_JACK_SHOT, *ATTACK_REGION_OBJECT); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 0, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW(agent, 1, 4, 4); + FT_SHOOTING_ATTACK_GROUND_CHECK_NEW_arg5(agent, 2, 4, 4, Hash40::new("jack_gun_hit2"), Hash40::new("se_jack_special_n02")); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} pub fn install(agent: &mut Agent) { - agent.acmd("game_hit", game_hit); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 3e574e7699..13feb7ff48 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -6,7 +6,9 @@ pub mod acmd; pub mod status; pub mod opff; + mod fire; + use smash::{ lib::{ L2CValue, @@ -44,5 +46,5 @@ pub fn install() { opff::install(agent); status::install(agent); - install::fire(); + fire::install(); } diff --git a/fighters/ken/src/acmd/specials/special_command.rs b/fighters/ken/src/acmd/specials/special_command.rs index 4939227ef1..c8b1d9caa7 100644 --- a/fighters/ken/src/acmd/specials/special_command.rs +++ b/fighters/ken/src/acmd/specials/special_command.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { let boma = agent.boma(); let mut attr = Hash40::new("collision_attr_normal"); let mut dmg = 1.0; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { attr = Hash40::new("collision_attr_fire"); dmg = 1.10; } @@ -14,7 +14,7 @@ unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 12.0); - if is_excute(Agent) { + if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, true); ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 75, 80, 0, 10, 4.0, 0.0, 13.5, 6.5, Some(0.0), Some(8.5), Some(6.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); @@ -22,18 +22,18 @@ unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { frame(lua_state, 13.0); if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 15.0); if is_excute(agent) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 63, 30, 0, 40, 3.5, 0.0, 6.0, 7.0, Some(0.0), Some(17.8), Some(9.5), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 63, 30, 0, 40, 3.5, 0.0, 6.0, 7.0, Some(0.0), Some(17.8), Some(9.5), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); if is_excute(agent) { @@ -54,9 +54,9 @@ unsafe extern "C" fn game_attackcommand2(agent: &mut L2CAgentBase) { boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(Agent) { + if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, true); - ATTACK(Agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 103, 0, 41, 4.5, 0.0, 15.0, 13.3, Some(0.0), Some(11.0), Some(6.4), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); // HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); @@ -66,7 +66,7 @@ unsafe extern "C" fn game_attackcommand2(agent: &mut L2CAgentBase) { boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MeterModule::watch_damage(agent.battle_object, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); @@ -110,7 +110,7 @@ unsafe extern "C" fn game_attackcommand3(agent: &mut L2CAgentBase) { MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } } @@ -135,7 +135,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(Agent) { + if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_BRANCH); @@ -143,8 +143,8 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { frame(lua_state, 14.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footr"), 14.0, 65, 103, 0, 28, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 17.0); diff --git a/fighters/ken/src/lib.rs b/fighters/ken/src/lib.rs index 87fc62df9b..901b965e3a 100644 --- a/fighters/ken/src/lib.rs +++ b/fighters/ken/src/lib.rs @@ -6,6 +6,7 @@ pub mod acmd; pub mod status; pub mod opff; + mod hadoken; mod shinryuken; @@ -48,6 +49,6 @@ pub fn install() { status::install(agent); agent.install(); - install::hadoken; - install::shinryuken; + hadoken::install(); + shinryuken::install(); } diff --git a/fighters/ryu/src/lib.rs b/fighters/ryu/src/lib.rs index 5f36e8f1ee..2722fdd513 100644 --- a/fighters/ryu/src/lib.rs +++ b/fighters/ryu/src/lib.rs @@ -49,5 +49,5 @@ pub fn install() { agent.install(); hadoken::install(); - shinkuhadoken::insall(); + shinkuhadoken::install(); } diff --git a/fighters/ryu/src/status.rs b/fighters/ryu/src/status.rs index c2e708b762..e250572785 100644 --- a/fighters/ryu/src/status.rs +++ b/fighters/ryu/src/status.rs @@ -38,7 +38,7 @@ pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); // .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - agenr.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); finals::install(agent); special_cmd4::install(agent); special_lw::install(agent); From c35c67f8b8b1be80b33e496eb3aa3162dbfa667d Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Mon, 25 Mar 2024 00:11:44 -0400 Subject: [PATCH 101/172] adjustments --- fighters/elight/src/acmd/specials.rs | 10 +++++----- fighters/gekkouga/src/lib.rs | 3 ++- fighters/jack/src/acmd/tilts.rs | 21 --------------------- fighters/jack/src/doyle/acmd.rs | 26 ++++++++++++++++++++++++++ fighters/jack/src/doyle/mod.rs | 9 +++++++++ fighters/jack/src/lib.rs | 2 ++ 6 files changed, 44 insertions(+), 27 deletions(-) create mode 100644 fighters/jack/src/doyle/acmd.rs create mode 100644 fighters/jack/src/doyle/mod.rs diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index ab41c58e4d..b5a8d6c5dc 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1126,7 +1126,7 @@ unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialsend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1160,7 +1160,7 @@ unsafe extern "C" fn effect_specialsend (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairsend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1180,7 +1180,7 @@ unsafe extern "C" fn effect_specialairsend (agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } -unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); @@ -1219,6 +1219,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairs", sound_specials); agent.acmd("effect_specialsend", effect_specialsend); agent.acmd("effect_specialairsend", effect_specialairsend); - agent.acmd("game_specialn", game_specialn); - agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/gekkouga/src/lib.rs b/fighters/gekkouga/src/lib.rs index 2b6c28b1ee..b3fca39df1 100644 --- a/fighters/gekkouga/src/lib.rs +++ b/fighters/gekkouga/src/lib.rs @@ -38,7 +38,8 @@ use utils::{ }; use smashline::*; -pub fn install(agent: &mut Agent) { +pub fn install() { + let agent = &mut Agent::new("gekkouga"); acmd::install(agent); opff::install(agent); agent.install(); diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 523a0e6023..f6cb1b62ab 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -342,27 +342,6 @@ unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_doyle_attack_lw3_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 13.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); diff --git a/fighters/jack/src/doyle/acmd.rs b/fighters/jack/src/doyle/acmd.rs new file mode 100644 index 0000000000..8f59069e4c --- /dev/null +++ b/fighters/jack/src/doyle/acmd.rs @@ -0,0 +1,26 @@ +use super::*; + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacklw3", effect_attacklw3); +} \ No newline at end of file diff --git a/fighters/jack/src/doyle/mod.rs b/fighters/jack/src/doyle/mod.rs new file mode 100644 index 0000000000..24f72bd3d5 --- /dev/null +++ b/fighters/jack/src/doyle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("jack_doyle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 13feb7ff48..2aeeb2d5a0 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -7,6 +7,7 @@ pub mod acmd; pub mod status; pub mod opff; +mod doyle; mod fire; use smash::{ @@ -46,5 +47,6 @@ pub fn install() { opff::install(agent); status::install(agent); + doyle::install(); fire::install(); } From e6758cc7b64c924d38d71ade798b2c25b0d2b8f6 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Mon, 25 Mar 2024 00:11:44 -0400 Subject: [PATCH 102/172] adjustments adjustments --- fighters/bayonetta/src/acmd/other.rs | 246 ------------------ fighters/bayonetta/src/lib.rs | 6 + fighters/bayonetta/src/wickedweavearm/acmd.rs | 216 ++++++++++++++- .../src/wickedweavearm/acmd/special.rs | 215 --------------- fighters/bayonetta/src/wickedweaveleg/acmd.rs | 65 ++++- .../src/wickedweaveleg/acmd/special.rs | 64 ----- fighters/elight/src/acmd/specials.rs | 10 +- fighters/gekkouga/src/lib.rs | 3 +- fighters/jack/src/acmd/tilts.rs | 21 -- fighters/jack/src/doyle/acmd.rs | 26 ++ fighters/jack/src/doyle/mod.rs | 9 + fighters/jack/src/lib.rs | 2 + fighters/ken/src/status/special_lw.rs | 2 +- fighters/ryu/src/status/special_lw.rs | 2 +- 14 files changed, 327 insertions(+), 560 deletions(-) delete mode 100644 fighters/bayonetta/src/wickedweavearm/acmd/special.rs delete mode 100644 fighters/bayonetta/src/wickedweaveleg/acmd/special.rs create mode 100644 fighters/jack/src/doyle/acmd.rs create mode 100644 fighters/jack/src/doyle/mod.rs diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 0b206702dc..704e099687 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -153,252 +153,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - } - frame(lua_state, 9.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 38.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); - } - frame(lua_state, 9.0); - if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - } - wait(lua_state, 40.0); - if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_s4_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(agent.lua_state_agent, 8.0); - if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); - } - frame(agent.lua_state_agent, 9.0); - if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 12.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 13.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - } - wait(lua_state, 40.0); - if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweavearm_attack_hi4_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 8.0); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ModelModule::set_scale(boma, 0.96); - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 51.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} - -unsafe extern "C" fn bayonetta_wickedweaveleg_attack_lw4_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); - } - frame(lua_state, 14.0); - if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); - } - frame(lua_state, 16.0); - if is_excute(agent) { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - } -} unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/bayonetta/src/lib.rs b/fighters/bayonetta/src/lib.rs index 2b51b24a74..d39fa83b87 100644 --- a/fighters/bayonetta/src/lib.rs +++ b/fighters/bayonetta/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +mod wickedweavearm; +mod wickedweaveleg; + use smash::{ lib::{ L2CValue, @@ -44,4 +47,7 @@ pub fn install() { opff::install(agent); status::install(agent); agent.install(); + + wickedweavearm::install(); + wickedweaveleg::install(); } diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs index 0f1919d170..ac40c20fee 100644 --- a/fighters/bayonetta/src/wickedweavearm/acmd.rs +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -1,7 +1,217 @@ use super::*; -mod special; +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 38.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + } + frame(lua_state, 9.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + wait(lua_state, 40.0); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(agent.lua_state_agent, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + } + frame(agent.lua_state_agent, 9.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 13.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + /* Air-only */ + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + wait(lua_state, 40.0); + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 8.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ModelModule::set_scale(boma, 0.96); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attacks4hi",game_attacks4hi); + agent.acmd("game_attackhi4", game_attackhi4); +} diff --git a/fighters/bayonetta/src/wickedweavearm/acmd/special.rs b/fighters/bayonetta/src/wickedweavearm/acmd/special.rs deleted file mode 100644 index c556723a83..0000000000 --- a/fighters/bayonetta/src/wickedweavearm/acmd/special.rs +++ /dev/null @@ -1,215 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { -VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); -} -frame(lua_state, 8.0); -if is_excute(agent) { -VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); -} -frame(lua_state, 9.0); -if is_excute(agent) { - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -frame(lua_state, 12.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(15.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 25.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -frame(lua_state, 13.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 361, 105, 0, 34, 5.5, 0.0, 16.0, 7.0, Some(0.0), Some(12.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 361, 100, 0, 35, 10.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -wait(lua_state, 2.0); -if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 361, 100, 0, 35, 9.0, 0.0, 11.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -wait(lua_state, 5.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -wait(lua_state, 38.0); -if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } -} - -unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); -} -frame(lua_state, 8.0); -if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); -} -frame(lua_state, 9.0); -if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -frame(lua_state, 12.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -frame(lua_state, 13.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -wait(lua_state, 2.0); -if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -wait(lua_state, 5.0); -if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); -} -wait(lua_state, 40.0); -if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -} -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); -} -frame(agent.lua_state_agent, 8.0); -if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); -} -frame(agent.lua_state_agent, 9.0); -if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -frame(lua_state, 12.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -frame(lua_state, 13.0); -if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - /* Air-only */ - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -wait(lua_state, 2.0); -if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 15.0, 49, 100, 0, 35, 9.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -wait(lua_state, 5.0); -if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); -} -wait(lua_state, 40.0); -if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -} -unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); -} -frame(lua_state, 8.0); -if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -frame(lua_state, 10.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 38, 9.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -frame(lua_state, 11.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 10.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 12.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 89, 90, 0, 36, 10.5, 0.0, 15.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 13.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 20.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 13.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 25.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 15.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 30.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 16.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 89, 90, 0, 32, 10.5, 0.0, 36.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -frame(lua_state, 19.0); -if is_excute(agent) { - ModelModule::set_scale(boma, 0.96); - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 89, 90, 0, 32, 10.0, 0.0, 32.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); -} -wait(lua_state, 6.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -frame(lua_state, 51.0); -if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -} - - -pub fn install(agent: &mut Agent) { -agent.acmd("game_attacks4", game_attacks4); -agent.acmd("game_attacks4lw", game_attacks4lw); -agent.acmd("game_attacks4hi",game_attacks4hi); -agent.acmd("game_attackhi4", game_attackhi4); -} diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd.rs b/fighters/bayonetta/src/wickedweaveleg/acmd.rs index 0f1919d170..e7b8faf22c 100644 --- a/fighters/bayonetta/src/wickedweaveleg/acmd.rs +++ b/fighters/bayonetta/src/wickedweaveleg/acmd.rs @@ -1,7 +1,66 @@ use super::*; -mod special; +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); + } + frame(lua_state, 14.0); + if is_excute(agent) { + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + } + frame(lua_state, 16.0); + if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + } +} + +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); + + frame(lua_state, 4.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); + } + frame(lua_state, 29.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + } + frame(lua_state, escape_air_cancel_frame); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_attacklw4", game_attacklw4); +} diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs b/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs deleted file mode 100644 index 121247d606..0000000000 --- a/fighters/bayonetta/src/wickedweaveleg/acmd/special.rs +++ /dev/null @@ -1,64 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); -} -frame(lua_state, 14.0); -if is_excute(agent) { - VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); -} -frame(lua_state, 16.0); -if is_excute(agent) { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 273, 10, 0, 150, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 270, 63, 0, 10, 9.0, 0.0, 28.0, 16.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); -} -wait(lua_state, 1.0); -if is_excute(agent) { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 273, 10, 0, 150, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 270, 63, 0, 10, 12.0, 0.0, 8.0, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); -} -wait(lua_state, 5.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -frame(lua_state, 41.0); -if is_excute(agent) { - WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVELEG_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); -} -} -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); -let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - -frame(lua_state, 4.0); -if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); -} -frame(lua_state, 8.0); -if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); -} -frame(lua_state, 29.0); -if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); -} -frame(lua_state, escape_air_cancel_frame); -if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); -} -} -pub fn install(agent: &mut Agent) { -agent.acmd("game_attacklw4", game_attacklw4); -} diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index ab41c58e4d..b5a8d6c5dc 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1126,7 +1126,7 @@ unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialsend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1160,7 +1160,7 @@ unsafe extern "C" fn effect_specialsend (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairsend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1180,7 +1180,7 @@ unsafe extern "C" fn effect_specialairsend (agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } -unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); @@ -1219,6 +1219,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairs", sound_specials); agent.acmd("effect_specialsend", effect_specialsend); agent.acmd("effect_specialairsend", effect_specialairsend); - agent.acmd("game_specialn", game_specialn); - agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/gekkouga/src/lib.rs b/fighters/gekkouga/src/lib.rs index 2b6c28b1ee..b3fca39df1 100644 --- a/fighters/gekkouga/src/lib.rs +++ b/fighters/gekkouga/src/lib.rs @@ -38,7 +38,8 @@ use utils::{ }; use smashline::*; -pub fn install(agent: &mut Agent) { +pub fn install() { + let agent = &mut Agent::new("gekkouga"); acmd::install(agent); opff::install(agent); agent.install(); diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 523a0e6023..f6cb1b62ab 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -342,27 +342,6 @@ unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn jack_doyle_attack_lw3_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 13.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); diff --git a/fighters/jack/src/doyle/acmd.rs b/fighters/jack/src/doyle/acmd.rs new file mode 100644 index 0000000000..8f59069e4c --- /dev/null +++ b/fighters/jack/src/doyle/acmd.rs @@ -0,0 +1,26 @@ +use super::*; + +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("jack_doyle_magic_flash"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("top"), 2, 10, 11, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("jack_doyle_magic_flash2"), Hash40::new("handl"), 2, 0, 0, 0, 0, 0, 0.07, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacklw3", effect_attacklw3); +} \ No newline at end of file diff --git a/fighters/jack/src/doyle/mod.rs b/fighters/jack/src/doyle/mod.rs new file mode 100644 index 0000000000..24f72bd3d5 --- /dev/null +++ b/fighters/jack/src/doyle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("jack_doyle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 13feb7ff48..2aeeb2d5a0 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -7,6 +7,7 @@ pub mod acmd; pub mod status; pub mod opff; +mod doyle; mod fire; use smash::{ @@ -46,5 +47,6 @@ pub fn install() { opff::install(agent); status::install(agent); + doyle::install(); fire::install(); } diff --git a/fighters/ken/src/status/special_lw.rs b/fighters/ken/src/status/special_lw.rs index 77cb987146..1861050fae 100644 --- a/fighters/ken/src/status/special_lw.rs +++ b/fighters/ken/src/status/special_lw.rs @@ -96,7 +96,7 @@ unsafe extern "C" fn special_lw_install_main_loop(fighter: &mut L2CFighterCommon } if fighter.is_situation(*SITUATION_KIND_AIR) { // TODO: replace these with actual params - let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut FighterKineticEnergyGravity; + let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; smash::app::lua_bind::FighterKineticEnergyGravity::set_accel(fighter_gravity, -0.03); smash::app::lua_bind::FighterKineticEnergyGravity::set_stable_speed(fighter_gravity, -1.6); } diff --git a/fighters/ryu/src/status/special_lw.rs b/fighters/ryu/src/status/special_lw.rs index 142fb92b48..b94e3166a4 100644 --- a/fighters/ryu/src/status/special_lw.rs +++ b/fighters/ryu/src/status/special_lw.rs @@ -75,7 +75,7 @@ unsafe extern "C" fn special_lw_install_main_loop(fighter: &mut L2CFighterCommon } if fighter.is_situation(*SITUATION_KIND_AIR) { // TODO: replace these with actual params - let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut FighterKineticEnergyGravity; + let fighter_gravity = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::FighterKineticEnergyGravity; smash::app::lua_bind::FighterKineticEnergyGravity::set_accel(fighter_gravity, -0.03); smash::app::lua_bind::FighterKineticEnergyGravity::set_stable_speed(fighter_gravity, -1.6); } From d09bb173eda9353392478102b803d292da2d3296 Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 08:04:03 -0500 Subject: [PATCH 103/172] random cleanup will do more later --- fighters/bayonetta/src/acmd/aerials.rs | 7 +- fighters/bayonetta/src/acmd/ground.rs | 114 +++++------ fighters/bayonetta/src/acmd/other.rs | 117 +---------- fighters/bayonetta/src/acmd/smashes.rs | 1 - fighters/bayonetta/src/acmd/specials.rs | 4 +- fighters/bayonetta/src/acmd/throws.rs | 32 ++- fighters/bayonetta/src/lib.rs | 5 + fighters/bayonetta/src/specialbullet/acmd.rs | 7 - .../src/specialbullet/acmd/special.rs | 28 --- .../bayonetta/src/specialn_bullet/acmd.rs | 30 +++ .../{specialbullet => specialn_bullet}/mod.rs | 2 +- fighters/chrom/src/acmd/aerials.rs | 10 +- fighters/chrom/src/acmd/ground.rs | 4 +- fighters/chrom/src/acmd/other.rs | 88 +-------- fighters/chrom/src/acmd/smashes.rs | 5 +- fighters/chrom/src/acmd/specials.rs | 28 +-- fighters/chrom/src/lib.rs | 3 +- fighters/cloud/src/acmd/other.rs | 87 +------- fighters/cloud/src/lib.rs | 3 +- fighters/diddy/src/acmd/other.rs | 88 +-------- fighters/diddy/src/lib.rs | 3 +- fighters/elight/src/acmd/other.rs | 89 +-------- fighters/elight/src/lib.rs | 12 +- fighters/falco/src/acmd/other.rs | 185 ++++-------------- fighters/falco/src/acmd/smashes.rs | 1 + fighters/falco/src/blaster/acmd.rs | 7 - .../special.rs => blaster_bullet/acmd.rs} | 29 +-- .../src/{blaster => blaster_bullet}/mod.rs | 2 +- fighters/falco/src/illusion/acmd.rs | 14 +- fighters/falco/src/illusion/acmd/special.rs | 12 -- fighters/falco/src/illusion/mod.rs | 2 +- fighters/falco/src/lib.rs | 9 + fighters/gaogaen/src/acmd/other.rs | 87 +------- fighters/gaogaen/src/lib.rs | 6 +- fighters/gekkouga/src/acmd/other.rs | 89 +-------- fighters/gekkouga/src/lib.rs | 7 +- fighters/ike/src/acmd/other.rs | 89 +-------- fighters/ike/src/lib.rs | 5 +- .../ike/src/sword/{acmd/other.rs => acmd.rs} | 0 fighters/ike/src/sword/acmd/mod.rs | 8 - fighters/jack/src/acmd/other.rs | 89 +-------- fighters/jack/src/fire/mod.rs | 2 +- fighters/jack/src/lib.rs | 6 +- fighters/koopajr/src/lib.rs | 10 +- 44 files changed, 338 insertions(+), 1088 deletions(-) delete mode 100644 fighters/bayonetta/src/specialbullet/acmd.rs delete mode 100644 fighters/bayonetta/src/specialbullet/acmd/special.rs create mode 100644 fighters/bayonetta/src/specialn_bullet/acmd.rs rename fighters/bayonetta/src/{specialbullet => specialn_bullet}/mod.rs (60%) delete mode 100644 fighters/falco/src/blaster/acmd.rs rename fighters/falco/src/{blaster/acmd/special.rs => blaster_bullet/acmd.rs} (58%) rename fighters/falco/src/{blaster => blaster_bullet}/mod.rs (62%) delete mode 100644 fighters/falco/src/illusion/acmd/special.rs rename fighters/ike/src/sword/{acmd/other.rs => acmd.rs} (100%) delete mode 100644 fighters/ike/src/sword/acmd/mod.rs diff --git a/fighters/bayonetta/src/acmd/aerials.rs b/fighters/bayonetta/src/acmd/aerials.rs index db3f979e40..2e659a91e2 100644 --- a/fighters/bayonetta/src/acmd/aerials.rs +++ b/fighters/bayonetta/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -47,7 +46,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairnhold(agent: &mut L2CAgentBase) { @@ -85,7 +83,6 @@ unsafe extern "C" fn game_attackairnhold(agent: &mut L2CAgentBase) { AttackModule::clear(boma, 8, false); AttackModule::clear(boma, 9, false); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -440,15 +437,19 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("game_attackairnhold", game_attackairnhold); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("game_attackairf2", game_attackairf2); agent.acmd("game_attackairf3", game_attackairf3); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("game_attackairhihold", game_attackairhihold); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/bayonetta/src/acmd/ground.rs b/fighters/bayonetta/src/acmd/ground.rs index e80cbdd75e..09f7171bd5 100644 --- a/fighters/bayonetta/src/acmd/ground.rs +++ b/fighters/bayonetta/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -118,64 +117,64 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); for _ in 0..99 { - frame(lua_state, 1.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); - //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); + frame(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, true, 10, 0, 3, 0, false); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2b7cb92b79), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_ARM, true, true, true, 10); + //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); + } + wait_loop_clear(agent); agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + //loc.imp._Unwind_Resume(); } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CHECK_COMBO_NUM); - } - wait_loop_clear(agent); - agent.on_flag(*FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - //loc.imp._Unwind_Resume(); -} } unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { @@ -259,5 +258,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack13", game_attack13); agent.acmd("game_attack100", game_attack100); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 704e099687..f03ef0ff51 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -316,32 +241,6 @@ unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.7, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -382,19 +281,22 @@ unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); agent.acmd("game_escapen", game_escapen); agent.acmd("game_escapef", game_escapef); agent.acmd("game_escapeb", game_escapeb); + agent.acmd("game_appeallwl", game_appeallwl); agent.acmd("game_appealsr", game_appealsr); agent.acmd("game_appealsl", game_appealsr); @@ -404,7 +306,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_appealhil", sound_appealhil); agent.acmd("sound_appeallwr", sound_appeallwr); agent.acmd("sound_appeallwl", sound_appeallwl); - agent.acmd("game_catchattack", game_catchattack); + + agent.acmd("effect_justshieldoff", effect_justshieldoff); agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/bayonetta/src/acmd/smashes.rs b/fighters/bayonetta/src/acmd/smashes.rs index 4c4e84ab87..3370df1a53 100644 --- a/fighters/bayonetta/src/acmd/smashes.rs +++ b/fighters/bayonetta/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; pub fn install(agent: &mut Agent) {} diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index 668b0c1054..15e8097278 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnstarth(agent: &mut L2CAgentBase) { @@ -481,6 +480,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialnendf", game_specialnendf); agent.acmd("game_specialairnendh", game_specialnendh); agent.acmd("game_specialairnendf", game_specialnendf); + agent.acmd("game_specials", game_specials); agent.acmd("game_specialsedge", game_specialsedge); agent.acmd("effect_specialsedge", effect_specialsedge); @@ -495,12 +495,14 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairsd", effect_specialairsd); agent.acmd("expression_specialairsd", expression_specialairsd); agent.acmd("game_specialairsdlanding", game_specialairsdlanding); + agent.acmd("game_specialairhi", game_specialairhi); agent.acmd("game_specialhi", game_specialairhi); agent.acmd("effect_specialairhi", effect_specialairhi); agent.acmd("effect_specialhi", effect_specialairhi); agent.acmd("sound_specialhi", sound_specialhi); agent.acmd("sound_specialairhi", sound_specialhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/bayonetta/src/acmd/throws.rs b/fighters/bayonetta/src/acmd/throws.rs index 6aa8b177dc..eaf3e9bce5 100644 --- a/fighters/bayonetta/src/acmd/throws.rs +++ b/fighters/bayonetta/src/acmd/throws.rs @@ -60,6 +60,32 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.6, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.7, 361, 100, 30, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -84,7 +110,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { } frame(lua_state, 50.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -141,7 +166,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/bayonetta/src/lib.rs b/fighters/bayonetta/src/lib.rs index d39fa83b87..3979103def 100644 --- a/fighters/bayonetta/src/lib.rs +++ b/fighters/bayonetta/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod specialn_bullet; mod wickedweavearm; mod wickedweaveleg; @@ -40,6 +43,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("bayonetta"); @@ -48,6 +52,7 @@ pub fn install() { status::install(agent); agent.install(); + specialn_bullet::install(); wickedweavearm::install(); wickedweaveleg::install(); } diff --git a/fighters/bayonetta/src/specialbullet/acmd.rs b/fighters/bayonetta/src/specialbullet/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/bayonetta/src/specialbullet/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/bayonetta/src/specialbullet/acmd/special.rs b/fighters/bayonetta/src/specialbullet/acmd/special.rs deleted file mode 100644 index c9ec4df0a9..0000000000 --- a/fighters/bayonetta/src/specialbullet/acmd/special.rs +++ /dev/null @@ -1,28 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_movechargebullet(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} -unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); - if is_excute(agent) { - if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); - } - AttackModule::enable_safe_pos(boma); - } -} -pub fn install(agent: &mut Agent) { - agent.acmd("game_movechargebullet", game_movechargebullet); - agent.acmd("game_move", game_move); -} diff --git a/fighters/bayonetta/src/specialn_bullet/acmd.rs b/fighters/bayonetta/src/specialn_bullet/acmd.rs new file mode 100644 index 0000000000..c38bebee15 --- /dev/null +++ b/fighters/bayonetta/src/specialn_bullet/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_movechargebullet(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 45, 200, 0, 15, 1.6, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_02, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let bayo_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let max_repeat = bayo_boma.get_param_int("param_special_n", "add_fire_max"); + if is_excute(agent) { + if WorkModule::get_int(bayo_boma, *FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_N_INT_ADD_FIRE_COUNT) == max_repeat { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 5, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 40, 0, 15, 1.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.3, 0.0, 0, true, false, true, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_OBJECT); + } + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_movechargebullet", game_movechargebullet); + agent.acmd("game_move", game_move); +} diff --git a/fighters/bayonetta/src/specialbullet/mod.rs b/fighters/bayonetta/src/specialn_bullet/mod.rs similarity index 60% rename from fighters/bayonetta/src/specialbullet/mod.rs rename to fighters/bayonetta/src/specialn_bullet/mod.rs index 4248a186ad..2ae6017d19 100644 --- a/fighters/bayonetta/src/specialbullet/mod.rs +++ b/fighters/bayonetta/src/specialn_bullet/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("bayonetta"); + let agent = &mut Agent::new("bayonetta_specialn_bullet"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/aerials.rs b/fighters/chrom/src/acmd/aerials.rs index 74e8846192..c5671ecd4c 100644 --- a/fighters/chrom/src/acmd/aerials.rs +++ b/fighters/chrom/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -36,7 +35,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -69,7 +67,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -111,7 +108,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -143,7 +139,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -185,14 +180,17 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/chrom/src/acmd/ground.rs b/fighters/chrom/src/acmd/ground.rs index d298635731..1206c4fae7 100644 --- a/fighters/chrom/src/acmd/ground.rs +++ b/fighters/chrom/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -15,7 +14,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -32,10 +30,10 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index ab60e583b2..0b5aed94a8 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -197,16 +122,19 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_appeallwl", game_appeallwl); agent.acmd("game_appeallwr", game_appeallwl); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/chrom/src/acmd/smashes.rs b/fighters/chrom/src/acmd/smashes.rs index 1319786270..1edb704f8e 100644 --- a/fighters/chrom/src/acmd/smashes.rs +++ b/fighters/chrom/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -24,7 +23,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -94,7 +92,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -142,6 +139,8 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/chrom/src/acmd/specials.rs b/fighters/chrom/src/acmd/specials.rs index 3403457294..b0c158438e 100644 --- a/fighters/chrom/src/acmd/specials.rs +++ b/fighters/chrom/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; //Need to match up explosion effect more accurately @@ -21,7 +20,6 @@ unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { @@ -78,7 +76,6 @@ unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { @@ -106,7 +103,6 @@ unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { @@ -132,7 +128,6 @@ unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { @@ -192,7 +187,6 @@ unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { @@ -230,7 +224,6 @@ unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { @@ -258,7 +251,6 @@ unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { @@ -286,7 +278,6 @@ unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { @@ -311,7 +302,6 @@ unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs2hi(agent: &mut L2CAgentBase) { @@ -336,7 +326,6 @@ unsafe extern "C" fn effect_specialairs2hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { @@ -364,7 +353,6 @@ unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs2lw(agent: &mut L2CAgentBase) { @@ -392,7 +380,6 @@ unsafe extern "C" fn effect_specialairs2lw(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { @@ -420,7 +407,6 @@ unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs3hi(agent: &mut L2CAgentBase) { @@ -448,7 +434,6 @@ unsafe extern "C" fn effect_specialairs3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { @@ -473,7 +458,6 @@ unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs3s(agent: &mut L2CAgentBase) { @@ -498,7 +482,6 @@ unsafe extern "C" fn effect_specialairs3s(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { @@ -526,7 +509,6 @@ unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs3lw(agent: &mut L2CAgentBase) { @@ -554,7 +536,6 @@ unsafe extern "C" fn effect_specialairs3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { @@ -582,7 +563,6 @@ unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs4hi(agent: &mut L2CAgentBase) { @@ -610,7 +590,6 @@ unsafe extern "C" fn effect_specialairs4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { @@ -638,7 +617,6 @@ unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs4s(agent: &mut L2CAgentBase) { @@ -666,7 +644,6 @@ unsafe extern "C" fn effect_specialairs4s(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { @@ -718,7 +695,6 @@ unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); COL_NORMAL(agent); } - } unsafe extern "C" fn effect_specialairs4lw(agent: &mut L2CAgentBase) { @@ -770,7 +746,6 @@ unsafe extern "C" fn effect_specialairs4lw(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); COL_NORMAL(agent); } - } unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { @@ -941,6 +916,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_specialairnend", expression_specialairnend); agent.acmd("game_specialairnend2", game_specialairnend2); agent.acmd("game_specialairnend3", game_specialairnend3); + agent.acmd("effect_specials1", effect_specials1); agent.acmd("effect_specialairs1", effect_specialairs1); agent.acmd("effect_specials2hi", effect_specials2hi); @@ -959,9 +935,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairs4s", effect_specialairs4s); agent.acmd("effect_specials4lw", effect_specials4lw); agent.acmd("effect_specialairs4lw", effect_specialairs4lw); + agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("game_specialairhi2", game_specialairhi2); agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); agent.acmd("game_speciallwhit", game_speciallwhit); diff --git a/fighters/chrom/src/lib.rs b/fighters/chrom/src/lib.rs index 349bd73679..cd2502d225 100644 --- a/fighters/chrom/src/lib.rs +++ b/fighters/chrom/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -36,6 +36,7 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("chrom"); diff --git a/fighters/cloud/src/acmd/other.rs b/fighters/cloud/src/acmd/other.rs index ef12ffbcd9..229ac90b28 100644 --- a/fighters/cloud/src/acmd/other.rs +++ b/fighters/cloud/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -189,14 +114,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/cloud/src/lib.rs b/fighters/cloud/src/lib.rs index 4d6a5fd27f..0d4aec1155 100644 --- a/fighters/cloud/src/lib.rs +++ b/fighters/cloud/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; use smash::{ lib::{ @@ -36,6 +36,7 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("cloud"); diff --git a/fighters/diddy/src/acmd/other.rs b/fighters/diddy/src/acmd/other.rs index 4d9804dab1..8fecf771fd 100644 --- a/fighters/diddy/src/acmd/other.rs +++ b/fighters/diddy/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -195,15 +120,18 @@ unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealhil", game_appealhil); agent.acmd("game_appealhir", game_appealhil); } diff --git a/fighters/diddy/src/lib.rs b/fighters/diddy/src/lib.rs index 04ceecb264..207df3548b 100644 --- a/fighters/diddy/src/lib.rs +++ b/fighters/diddy/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("diddy"); diff --git a/fighters/elight/src/acmd/other.rs b/fighters/elight/src/acmd/other.rs index e4dfa56545..b822d5f0d5 100644 --- a/fighters/elight/src/acmd/other.rs +++ b/fighters/elight/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -197,14 +121,17 @@ unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_justshieldoff", effect_justshieldoff); agent.acmd("sound_justshieldoff", sound_justshieldoff); } diff --git a/fighters/elight/src/lib.rs b/fighters/elight/src/lib.rs index 674bcdcd7b..d7b26baac4 100644 --- a/fighters/elight/src/lib.rs +++ b/fighters/elight/src/lib.rs @@ -4,9 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + mod bushin; + use skyline::nro::NroInfo; use smash::{ lib::{ @@ -38,12 +42,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("elight"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); + agent.install(); + + bunshin::install(); // Disables Foresight skyline::patching::Patch::in_text(0xa28e78).nop(); diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index 3fe6952772..ff722a3cd6 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -148,65 +73,6 @@ unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn falco_blaster_bullet_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - -} - -unsafe extern "C" fn sound_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); - } - -} - -unsafe extern "C" fn sound_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("falco")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); - } - -} - -unsafe extern "C" fn sound_escapen(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); - } - -} - unsafe extern "C" fn sound_passivewalljump(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); @@ -215,7 +81,6 @@ unsafe extern "C" fn sound_passivewalljump(fighter: &mut L2CAgentBase) { PLAY_SE(fighter, Hash40::new("se_falco_jump02")); PLAY_SE(fighter, Hash40::new("vc_falco_passive")); } - } unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { @@ -233,6 +98,16 @@ unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { } } +unsafe extern "C" fn sound_escapeair(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 3.0); + if is_excute(fighter) { + PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); + PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + } +} + unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -246,18 +121,42 @@ unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } + +unsafe extern "C" fn sound_escapeairslide(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 3.0); + if is_excute(fighter) { + PLAY_SE(fighter, Hash40::new("falco")); + PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + } +} + +unsafe extern "C" fn sound_escapen(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 1.0); + if is_excute(fighter) { + PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); + PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + } +} + pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); - agent.acmd("sound_escapeair", sound_escapeair); - agent.acmd("sound_escapeairslide", sound_escapeairslide); - agent.acmd("sound_escapen", sound_escapen); + agent.acmd("sound_passivewalljump", sound_passivewalljump); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("sound_escapeair", sound_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_escapeairslide", sound_escapeairslide); + agent.acmd("sound_escapen", sound_escapen); } diff --git a/fighters/falco/src/acmd/smashes.rs b/fighters/falco/src/acmd/smashes.rs index 3afcef09f4..e0623fd75a 100644 --- a/fighters/falco/src/acmd/smashes.rs +++ b/fighters/falco/src/acmd/smashes.rs @@ -106,5 +106,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/falco/src/blaster/acmd.rs b/fighters/falco/src/blaster/acmd.rs deleted file mode 100644 index 0f1919d170..0000000000 --- a/fighters/falco/src/blaster/acmd.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod special; - -pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file diff --git a/fighters/falco/src/blaster/acmd/special.rs b/fighters/falco/src/blaster_bullet/acmd.rs similarity index 58% rename from fighters/falco/src/blaster/acmd/special.rs rename to fighters/falco/src/blaster_bullet/acmd.rs index b1a2b583bc..6f64e83dd5 100644 --- a/fighters/falco/src/blaster/acmd/special.rs +++ b/fighters/falco/src/blaster_bullet/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -24,23 +25,25 @@ unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { } } unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } } unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; + let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); - } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); + } } pub fn install(agent: &mut Agent) { - agent.acmd("game_fly", game_fly); - agent.acmd("game_flythrowhi", game_flythrowhi); - agent.acmd("game_flythrowb", game_flythrowb); + agent.acmd("game_fly", game_fly); + + agent.acmd("game_flythrowhi", game_flythrowhi); + + agent.acmd("game_flythrowb", game_flythrowb); } diff --git a/fighters/falco/src/blaster/mod.rs b/fighters/falco/src/blaster_bullet/mod.rs similarity index 62% rename from fighters/falco/src/blaster/mod.rs rename to fighters/falco/src/blaster_bullet/mod.rs index 093648b02a..86dba5b5e2 100644 --- a/fighters/falco/src/blaster/mod.rs +++ b/fighters/falco/src/blaster_bullet/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("falco_blaster"); + let agent = &mut Agent::new("falco_blaster_bullet"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/falco/src/illusion/acmd.rs b/fighters/falco/src/illusion/acmd.rs index 0f1919d170..ab6d88691b 100644 --- a/fighters/falco/src/illusion/acmd.rs +++ b/fighters/falco/src/illusion/acmd.rs @@ -1,7 +1,13 @@ use super::*; -mod special; - +unsafe extern "C" fn game_moveair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_moveair", game_moveair); +} diff --git a/fighters/falco/src/illusion/acmd/special.rs b/fighters/falco/src/illusion/acmd/special.rs deleted file mode 100644 index 7997f8da0f..0000000000 --- a/fighters/falco/src/illusion/acmd/special.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::*; -unsafe extern "C" fn game_moveair(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 60, 0, 68, 4.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - } -} -pub fn install(agent: &mut Agent) { - agent.acmd("game_moveair", game_moveair) -} diff --git a/fighters/falco/src/illusion/mod.rs b/fighters/falco/src/illusion/mod.rs index a902a7d099..77c9df33ac 100644 --- a/fighters/falco/src/illusion/mod.rs +++ b/fighters/falco/src/illusion/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("fa"); + let agent = &mut Agent::new("falco_illusion"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/falco/src/lib.rs b/fighters/falco/src/lib.rs index 98202b569a..7020500b8d 100644 --- a/fighters/falco/src/lib.rs +++ b/fighters/falco/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +// articles + +mod blaster_bullet; +mod illusion; + use smash::{ lib::{ L2CValue, @@ -37,6 +42,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("falco"); @@ -44,4 +50,7 @@ pub fn install() { opff::install(agent); status::install(agent); agent.install(); + + blaster_bullet::install(); + illusion::install(); } diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index 343e078d94..3e9b49948d 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -3,57 +3,7 @@ use super::*; use smash::app::BattleObjectModuleAccessor; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -93,31 +43,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -190,14 +115,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gaogaen/src/lib.rs b/fighters/gaogaen/src/lib.rs index b1f2edb1c9..32cc939ec2 100644 --- a/fighters/gaogaen/src/lib.rs +++ b/fighters/gaogaen/src/lib.rs @@ -4,8 +4,9 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + use smash::{ lib::{ @@ -37,11 +38,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("gaogaen"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/gekkouga/src/acmd/other.rs b/fighters/gekkouga/src/acmd/other.rs index 87314e6c69..bce4503143 100644 --- a/fighters/gekkouga/src/acmd/other.rs +++ b/fighters/gekkouga/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_jumpaerialback(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -208,15 +132,18 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) {; - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_jumpaerialback", game_jumpaerialback); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/gekkouga/src/lib.rs b/fighters/gekkouga/src/lib.rs index b3fca39df1..f98e1c4e46 100644 --- a/fighters/gekkouga/src/lib.rs +++ b/fighters/gekkouga/src/lib.rs @@ -4,9 +4,13 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles + mod shuriken; + use smash::{ lib::{ L2CValue, @@ -37,6 +41,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("gekkouga"); diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index cef5febfb9..99713e191b 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -279,18 +203,21 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appeallwl", sound_appeallwl); agent.acmd("sound_appeallwr", sound_appeallwr); agent.acmd("game_appeallwl", game_appeallw); agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ike/src/lib.rs b/fighters/ike/src/lib.rs index f4d0d9004a..3e13e442e5 100644 --- a/fighters/ike/src/lib.rs +++ b/fighters/ike/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod sword; @@ -39,6 +41,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("ike"); diff --git a/fighters/ike/src/sword/acmd/other.rs b/fighters/ike/src/sword/acmd.rs similarity index 100% rename from fighters/ike/src/sword/acmd/other.rs rename to fighters/ike/src/sword/acmd.rs diff --git a/fighters/ike/src/sword/acmd/mod.rs b/fighters/ike/src/sword/acmd/mod.rs deleted file mode 100644 index f9d06fb11d..0000000000 --- a/fighters/ike/src/sword/acmd/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ - -use super::*; - -mod other; - -pub fn install(agent: &mut Agent) { - other::install(agent); -} diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index cf024410f5..389dab7817 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_appealhil(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -249,22 +174,26 @@ unsafe extern "C" fn sound_attacklw3_ex(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_appealhil", game_appealhil); agent.acmd("game_appealhir", game_appealhir); agent.acmd("game_appealsl", game_appealsl); agent.acmd("game_appealsr", game_appealsr); agent.acmd("game_appeallwl", game_appeallwl); agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", turn_dash_game); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_attacklw3", sound_attacklw3); agent.acmd("sound_attacklw3_ex", sound_attacklw3_ex); } diff --git a/fighters/jack/src/fire/mod.rs b/fighters/jack/src/fire/mod.rs index f5ade3389c..da7ddbd79b 100644 --- a/fighters/jack/src/fire/mod.rs +++ b/fighters/jack/src/fire/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("jack"); + let agent = &mut Agent::new("jack_fire"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/jack/src/lib.rs b/fighters/jack/src/lib.rs index 2aeeb2d5a0..bedca640ef 100644 --- a/fighters/jack/src/lib.rs +++ b/fighters/jack/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod doyle; mod fire; @@ -40,12 +42,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("jack"); acmd::install(agent); opff::install(agent); status::install(agent); + agent.install(); doyle::install(); fire::install(); diff --git a/fighters/koopajr/src/lib.rs b/fighters/koopajr/src/lib.rs index a3a9679d52..c345a920c7 100644 --- a/fighters/koopajr/src/lib.rs +++ b/fighters/koopajr/src/lib.rs @@ -4,9 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + mod cannonball; + use smash::{ lib::{ L2CValue, @@ -37,12 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("koopajr"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); + agent.install(); cannonball::install(); } \ No newline at end of file From bfac5700762bbd9cc19e4a06588af900f9509e2d Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 08:15:29 -0500 Subject: [PATCH 104/172] interesting --- .../elight/src/{bushin => bunshin}/acmd.rs | 0 .../elight/src/{bushin => bunshin}/mod.rs | 2 +- fighters/elight/src/lib.rs | 2 +- fighters/reflet/src/acmd/other.rs | 88 ++----------------- fighters/reflet/src/lib.rs | 14 ++- fighters/reflet/src/thunder/mod.rs | 2 +- 6 files changed, 23 insertions(+), 85 deletions(-) rename fighters/elight/src/{bushin => bunshin}/acmd.rs (100%) rename fighters/elight/src/{bushin => bunshin}/mod.rs (64%) diff --git a/fighters/elight/src/bushin/acmd.rs b/fighters/elight/src/bunshin/acmd.rs similarity index 100% rename from fighters/elight/src/bushin/acmd.rs rename to fighters/elight/src/bunshin/acmd.rs diff --git a/fighters/elight/src/bushin/mod.rs b/fighters/elight/src/bunshin/mod.rs similarity index 64% rename from fighters/elight/src/bushin/mod.rs rename to fighters/elight/src/bunshin/mod.rs index 9efe9dcee7..a64a9d7115 100644 --- a/fighters/elight/src/bushin/mod.rs +++ b/fighters/elight/src/bunshin/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("elight_bushin"); + let agent = &mut Agent::new("elight_bunshin"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/elight/src/lib.rs b/fighters/elight/src/lib.rs index d7b26baac4..396ed8eb04 100644 --- a/fighters/elight/src/lib.rs +++ b/fighters/elight/src/lib.rs @@ -9,7 +9,7 @@ pub mod status; // articles -mod bushin; +mod bunshin; use skyline::nro::NroInfo; use smash::{ diff --git a/fighters/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index c650fb3d19..141978fad5 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -170,13 +94,15 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/reflet/src/lib.rs b/fighters/reflet/src/lib.rs index 2c38acffe5..00f13c2702 100644 --- a/fighters/reflet/src/lib.rs +++ b/fighters/reflet/src/lib.rs @@ -3,8 +3,15 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +mod gigafire; +mod thunder; +mod elwind; use smash::{ lib::{ @@ -36,6 +43,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("reflet"); @@ -43,4 +51,8 @@ pub fn install() { status::install(agent); opff::install(agent); agent.install(); + + gigafire::install(); + thunder::install(); + elwind::install(); } \ No newline at end of file diff --git a/fighters/reflet/src/thunder/mod.rs b/fighters/reflet/src/thunder/mod.rs index a65c112871..5cd1daa939 100644 --- a/fighters/reflet/src/thunder/mod.rs +++ b/fighters/reflet/src/thunder/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("reflet_gigafire"); + let agent = &mut Agent::new("reflet_thunder"); acmd::install(agent); agent.install(); } From 0fc65b12e4f8887dbe2dcf893d3d99e8db604396 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Mon, 25 Mar 2024 10:31:13 -0400 Subject: [PATCH 105/172] Demon mode --- fighters/demon/src/acmd/aerials.rs | 170 +++--- fighters/demon/src/acmd/ground.rs | 630 +++++++++---------- fighters/demon/src/acmd/jabs.rs | 306 +++++----- fighters/demon/src/acmd/mod.rs | 18 +- fighters/demon/src/acmd/other.rs | 269 +++------ fighters/demon/src/acmd/smashes.rs | 160 +++-- fighters/demon/src/acmd/specials.rs | 700 +++++++++++----------- fighters/demon/src/acmd/throws.rs | 218 +++---- fighters/demon/src/acmd/tilts.rs | 208 ++++--- fighters/demon/src/blaster/acmd.rs | 20 + fighters/demon/src/blaster/mod.rs | 9 + fighters/demon/src/lib.rs | 12 +- fighters/demon/src/opff.rs | 6 +- fighters/demon/src/status.rs | 362 +---------- fighters/demon/src/status/attack.rs | 56 ++ fighters/demon/src/status/attack_air.rs | 14 + fighters/demon/src/status/attack_combo.rs | 166 +++++ fighters/demon/src/status/dash.rs | 31 + fighters/demon/src/status/dash_back.rs | 26 + fighters/demon/src/status/landing.rs | 16 + fighters/demon/src/status/turn_dash.rs | 24 + fighters/demon/src/status/wait.rs | 46 ++ 22 files changed, 1734 insertions(+), 1733 deletions(-) create mode 100644 fighters/demon/src/blaster/acmd.rs create mode 100644 fighters/demon/src/blaster/mod.rs create mode 100644 fighters/demon/src/status/attack.rs create mode 100644 fighters/demon/src/status/attack_air.rs create mode 100644 fighters/demon/src/status/attack_combo.rs create mode 100644 fighters/demon/src/status/dash.rs create mode 100644 fighters/demon/src/status/dash_back.rs create mode 100644 fighters/demon/src/status/landing.rs create mode 100644 fighters/demon/src/status/turn_dash.rs create mode 100644 fighters/demon/src/status/wait.rs diff --git a/fighters/demon/src/acmd/aerials.rs b/fighters/demon/src/acmd/aerials.rs index 70e1b97f87..0efc1c5a07 100644 --- a/fighters/demon/src/acmd/aerials.rs +++ b/fighters/demon/src/acmd/aerials.rs @@ -1,170 +1,168 @@ use super::*; -unsafe extern "C" fn demon_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 280, 75, 0, 70, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 10.0, 300, 86, 0, 7, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 280, 75, 0, 70, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 10.0, 300, 86, 0, 7, 4.5, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 8.0, 65, 85, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 6.0, 65, 85, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn demon_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 45, 64, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 9.0, 45, 64, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 45, 64, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 9.0, 45, 64, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 11.0, 45, 75, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toel"), 11.0, 45, 75, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 45, 70, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 8.0, 45, 70, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 45, 70, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 8.0, 45, 70, 0, 40, 3.5, 1.75, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 8.0, 45, 70, 0, 40, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toel"), 8.0, 45, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn demon_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); MotionModule::set_rate(boma, (7.5-6.0)/2.0); } } frame(lua_state, 7.5); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, (8.0-7.5)/1.0); } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ MotionModule::set_rate(boma, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0,Hash40::new("legr"), 14.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0,Hash40::new("kneer"), 16.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0,Hash40::new("toer"), 16.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0,Hash40::new("legr"), 14.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0,Hash40::new("kneer"), 16.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0,Hash40::new("toer"), 16.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0,Hash40::new("legr"), 10.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0,Hash40::new("kneer"), 10.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0,Hash40::new("toer"), 10.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0,Hash40::new("legr"), 10.0, 40, 74, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0,Hash40::new("kneer"), 10.0, 40, 74, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0,Hash40::new("toer"), 10.0, 40, 74, 0, 40, 3.0, -0.3, -1.0, 1.2, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn demon_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 3.0, 3.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 3.0, 3.5, 1.0); frame(lua_state, 3.5); - FT_MOTION_RATE_RANGE(fighter, 3.5, 4.0, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toer"), 11.0, 77, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 3.5, 4.0, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toer"), 11.0, 77, 83, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 77, 83, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 77, 75, 0, 50, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("toer"), 8.0, 77, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 75, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 8.0, 75, 70, 0, 50, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 75, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 77, 75, 0, 50, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("toer"), 8.0, 77, 75, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackairn", demon_attackairn) - .acmd("game_attackairf", demon_attackairf) - .acmd("game_attackairb", demon_attackairb) - .acmd("game_attackairhi", demon_attackairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); } diff --git a/fighters/demon/src/acmd/ground.rs b/fighters/demon/src/acmd/ground.rs index 4e60db6fd5..389d50827f 100644 --- a/fighters/demon/src/acmd/ground.rs +++ b/fighters/demon/src/acmd/ground.rs @@ -1,48 +1,48 @@ use super::*; -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0.05); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.5, 0.0, 12.0, 6.0, Some(0.0), Some(2.5), Some(1.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.5, 0.0, 12.0, 6.0, Some(0.0), Some(2.5), Some(1.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 16.0, 44, 62, 0, 65, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); //ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 44, 57, 0, 65, 2.6, 1.0, 2.6, 1.8, Some(-1.0), Some(2.6), Some(1.8), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 14.0, 44, 57, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); //AttackModule::set_down_only(boma, 4, true); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); //AttackModule::clear(boma, 4); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, -1.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 2.5, 0.5, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 10.0, 94, 70, 0, 84, 4.5, 0.5, -1.0, -1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 10.0, 94, 70, 0, 84, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); @@ -50,110 +50,112 @@ unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn kazuya_left_splits_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(1.0, 0.0, 0.0)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 13.0, 275, 40, 0, 95, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 275, 40, 0, 95, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 13.0, 275, 40, 0, 95, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legl"), 13.0, 84, 40, 0, 78, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 13.0, 84, 40, 0, 78, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legl"), 13.0, 84, 40, 0, 78, 4.2, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 5, 10.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 1.1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2, 0.0, 0.0)); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - shield!(fighter, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); } } -unsafe extern "C" fn kazuya_triple_spin_kicks_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Triple Spin Kicks + +unsafe extern "C" fn game_attackstand21(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 3.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 11.0, 10.5, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 12.0, 2.0, Some(0.0), Some(11.5), Some(7.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 10, 40, 100, 0, 4.0, 0.0, 14.0, 3.0, Some(0.0), Some(13.0), Some(9.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 11.0, 10.5, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 0, 50, 60, 0, 4.0, 0.0, 12.0, 2.0, Some(0.0), Some(11.5), Some(7.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 10, 40, 100, 0, 4.0, 0.0, 14.0, 3.0, Some(0.0), Some(13.0), Some(9.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); AttackModule::clear_all(boma); @@ -162,56 +164,56 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_1_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand22(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ KineticModule::add_speed(boma, &Vector3f::new(-0.1, 0.0, 0.0)); //FT_MOTION_RATE(fighter, 9.0/(15.0-2.0)); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.25, 3.0, Some(0.0), Some(4.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.5, 3.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.25, 3.0, Some(0.0), Some(4.0), Some(7.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.5, 3.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.5, 12.0, Some(0.0), Some(4.4), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(7.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 2.0, 0.0, 4.5, 12.0, Some(0.0), Some(4.4), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 65, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 15, 100, 30, 0, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(7.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_2_FLAG_CHECK_STEP); @@ -219,35 +221,35 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_2_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand23(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 2.0, 0.0, 4.5, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 40, 0, 4.0, 0.0, 7.75, 3.0, Some(0.0), Some(6.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 2.0, 0.0, 4.5, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 40, 0, 4.0, 0.0, 5.75, 3.0, Some(0.0), Some(4.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 40, 0, 4.0, 0.0, 7.75, 3.0, Some(0.0), Some(6.2), Some(11.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 19.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 19.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.0); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_2_FLAG_CHECK_STEP); @@ -255,58 +257,60 @@ unsafe extern "C" fn kazuya_triple_spin_kicks_3_game(fighter: &mut L2CAgentBase) } } -unsafe extern "C" fn kazuya_triple_spin_kicks_4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand24(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if VarModule::is_flag(boma.object(), vars::demon::instance::SPINNING_DEMON){ - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 8.0); } - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SPINNING_DEMON){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.5, 44, 70, 0, 75, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 2.0, 0.0, 13.0, 12.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 11.0, 4.0, Some(0.0), Some(12.0), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 4.0, 0.0, 12.5, 4.0, Some(0.0), Some(13.5), Some(12.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.5, 53, 86, 0, 83, 3.0, 0.0, 7.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kazuya_tsunami_kick_1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Tsunami Kick + +unsafe extern "C" fn game_attackstand31(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 6.0, 90, 120, 61, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 12.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, Some(0.0), Some(4.2), Some(3.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 6.0, 90, 120, 61, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 90, 120, 61, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 12.0, 4.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 90, 120, 61, 0, 3.5, 0.0, 14.0, 8.0, Some(0.0), Some(4.2), Some(3.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 7.0, false); @@ -315,217 +319,225 @@ unsafe extern "C" fn kazuya_tsunami_kick_1_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 5, 7.0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 5, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //JostleModule::set_push_speed_x_overlap_rate_status(boma, 0.0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_3_FLAG_CHECK_STEP); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 23.0); - FT_MOTION_RATE_RANGE(fighter, 23.0, 36.0, 12.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 23.0, 36.0, 12.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_tsunami_kick_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackstand32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 6.0, 115, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 42.0-20.0, 15.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 42.0-20.0, 15.0); } } -unsafe extern "C" fn kazuya_stature_smash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Stature Smash + +unsafe extern "C" fn game_attackstand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 12.0-2.0, 8.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 12.0-2.0, 8.0); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 8.0, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 7.0, 9.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(7.0), Some(9.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 8.0, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 7.0, 9.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(7.0), Some(9.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 6.5, 5.5, Some(0.0), Some(6.4), Some(5.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 4.5, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(4.5), Some(6.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.7); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.7); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 2.0, 0.0, 6.5, 5.5, Some(0.0), Some(6.4), Some(5.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.6, 0.0, 4.5, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 0, 2, 0, 35, 3.2, 0.0, 9.5, 1.5, Some(0.0), Some(4.5), Some(6.5), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.7); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.7); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 39.0, 21.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 39.0, 21.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 39.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_flash_tornado_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Flash Tornado + +unsafe extern "C" fn game_attackstand5(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SLAUGHTER_HIGH_KICK){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 62, 65, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 62, 65, 0, 70, 5.2, 0.0, 13.5, 5.5, Some(0.0), Some(16.72), Some(10.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 62, 65, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 62, 65, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 62, 65, 0, 70, 5.2, 0.0, 13.5, 5.5, Some(0.0), Some(16.72), Some(10.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 46, 70, 0, 60, 4.0, 0.0, 9.5, 4.5, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 13.0, 46, 80, 0, 55, 5.2, 0.0, 10.5, 5.5, Some(0.0), Some(13.72), Some(10.5), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 11.0, 46, 70, 0, 60, 3.0, 2.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 1.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 13.0, 46, 80, 0, 55, 3.5, 6.0, 0.0, 0.0, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 46, 70, 0, 60, 4.0, 0.0, 9.5, 4.5, None, None, None, 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 13.0, 46, 80, 0, 55, 5.2, 0.0, 10.5, 5.5, Some(0.0), Some(13.72), Some(10.5), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::SLAUGHTER_HIGH_KICK){ - FT_DESIRED_RATE(fighter, 35.0-15.0, 18.0); + FT_DESIRED_RATE(agent, 35.0-15.0, 18.0); } } } -unsafe extern "C" fn kazuya_jump_side_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Jumping Side Kick + +unsafe extern "C" fn game_attackstand6(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_KEEP_SITUATION_AIR); //WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_IGNORE_CHANGE_FALL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 5.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 48, 65, 0, 72, 3.0, 0.0, 11.5, 8.0, Some(0.0), Some(3.0), Some(3.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 5.0, 6.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 12.0, 48, 65, 0, 72, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 48, 65, 0, 72, 3.0, 0.0, 11.5, 8.0, Some(0.0), Some(3.0), Some(3.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 48, 65, 0, 72, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_KEEP_SITUATION_AIR); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); //WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_STAND_6_FLAG_IGNORE_CHANGE_FALL); } } -unsafe extern "C" fn kazuya_crouch_jab_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Crouch Jab + +unsafe extern "C" fn game_attacksquat2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 2.0, 0.0, 9.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.4, 0.0, 9.0, 12.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 3.0, 0.0, 3.0, 5.0, Some(0.0), Some(3.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 2.0, 0.0, 9.0, 13.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.4, 0.0, 9.0, 12.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 77, 12, 0, 40, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 3.0, 0.0, 3.0, 5.0, Some(0.0), Some(3.0), Some(12.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 0, true); AttackModule::set_add_reaction_frame_revised(boma, 1, 16.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 16.0, false); @@ -533,86 +545,90 @@ unsafe extern "C" fn kazuya_crouch_jab_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 0, 22.0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO_INPUT); } } -unsafe extern "C" fn kazuya_crouching_spin_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Crouching Spin Kick + +unsafe extern "C" fn game_attacksquat3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 5.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 78, 20, 0, 80, 4.0, 0.0, 0.0, -0.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 0.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 4.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 78, 20, 0, 80, 4.0, 0.0, 0.0, -0.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 0.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 78, 20, 0, 80, 4.5, 4.0, 0.0, -2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); //AttackModule::set_add_reaction_frame_revised(boma, 0, 10.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 10.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 10.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.5); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 35.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 35.0, 14.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn kazuya_demon_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Demon God Fist + +unsafe extern "C" fn game_attacksquat4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(23.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); //ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.25, 13.0, Some(0.0), Some(6.25), Some(18.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD){ KineticModule::add_speed(boma, &Vector3f::new(1.0, 0.0, 0.0)); } AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD){ KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0.0, 0.0)); } - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 2.0, 0.0, 11.25, 9.0, None, None, None, 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 2.0, 0.0, 11.25, 9.0, None, None, None, 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down2"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 65, 50, 0, 40, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 2.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKSQUAT4, *ATTACK_REGION_PUNCH); AttackModule::set_attack_level(boma, 2, 2 as u8); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); @@ -623,27 +639,25 @@ unsafe extern "C" fn kazuya_demon_god_fist_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 2, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackdash", game_attackdash) - .acmd("game_attackstand1", kazuya_left_splits_kick_game) - .acmd("game_attackstand21", kazuya_triple_spin_kicks_1_game) - .acmd("game_attackstand22", kazuya_triple_spin_kicks_2_game) - .acmd("game_attackstand23", kazuya_triple_spin_kicks_3_game) - .acmd("game_attackstand24", kazuya_triple_spin_kicks_4_game) - .acmd("game_attackstand31", kazuya_tsunami_kick_1_game) - .acmd("game_attackstand32", kazuya_tsunami_kick_2_game) - .acmd("game_attackstand4", kazuya_stature_smash_game) - .acmd("game_attackstand5", kazuya_flash_tornado_game) - .acmd("game_attackstand6", kazuya_jump_side_kick_game) - .acmd("game_attacksquat2", kazuya_crouch_jab_game) - .acmd("game_attacksquat3", kazuya_crouching_spin_kick_game) - .acmd("game_attacksquat4", kazuya_demon_god_fist_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attackstand1", game_attackstand1); + agent.acmd("game_attackstand21", game_attackstand21); + agent.acmd("game_attackstand22", game_attackstand22); + agent.acmd("game_attackstand23", game_attackstand23); + agent.acmd("game_attackstand24", game_attackstand24); + agent.acmd("game_attackstand31", game_attackstand31); + agent.acmd("game_attackstand32", game_attackstand32); + agent.acmd("game_attackstand4", game_attackstand4); + agent.acmd("game_attackstand5", game_attackstand5); + agent.acmd("game_attackstand6", game_attackstand6); + agent.acmd("game_attacksquat2", game_attacksquat2); + agent.acmd("game_attacksquat3", game_attacksquat3); + agent.acmd("game_attacksquat4", game_attacksquat4); } diff --git a/fighters/demon/src/acmd/jabs.rs b/fighters/demon/src/acmd/jabs.rs index 84f1162955..e4f1893e2b 100644 --- a/fighters/demon/src/acmd/jabs.rs +++ b/fighters/demon/src/acmd/jabs.rs @@ -1,27 +1,27 @@ use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ MotionModule::change_motion(boma, Hash40::new("flash_punch"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_DESIRED_RATE(fighter, 6.0-2.0, 2.0); + if is_excute(agent) { + FT_DESIRED_RATE(agent, 6.0-2.0, 2.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 4, false); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); @@ -29,13 +29,13 @@ unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 2, 2.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.3); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.3); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.3); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); @@ -43,25 +43,25 @@ unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); JostleModule::set_push_speed_x_overlap_rate(boma, 20.0); - FT_DESIRED_RATE(fighter, 7.0-1.0, 4.0); + FT_DESIRED_RATE(agent, 7.0-1.0, 4.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO); - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(10.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 30, 3.0, 0.0, 4.0, 3.0, Some(0.0), Some(4.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 4, false); AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); @@ -70,7 +70,7 @@ unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(boma, 3, 2.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_push_speed_x_overlap_rate(boma, 0.0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); @@ -78,34 +78,34 @@ unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH); } } -unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.0, 0.0, 14.5, 10.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 9.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 3.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 8.75, 9.0, Some(0.0), Some(13.5), Some(9.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 9.0, 3.0, Some(0.0), Some(13.5), Some(3.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 1, Hash40::new("top"), 2.0, 33, 15, 0, 35, 3.6, 0.0, 15.0, 3.0, Some(0.0), Some(15.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 2.0, 0.0, 14.5, 10.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 9.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 13.5, 3.0, None, None, None, 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 8.75, 9.0, Some(0.0), Some(13.5), Some(9.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 2.0, 361, 10, 0, 35, 3.5, 0.0, 9.0, 3.0, Some(0.0), Some(13.5), Some(3.0), 0.5, 5.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 2.0, 33, 15, 0, 35, 3.6, 0.0, 15.0, 3.0, Some(0.0), Some(15.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); @@ -113,239 +113,237 @@ unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attack14(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack14(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 2.0, 0.0, 14.0, 10.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 9.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 4.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 9.0, Some(0.0), Some(13.0), Some(9.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 36, 15, 0, 30, 3.6, 0.0, 14.0, 4.0, Some(0.0), Some(14.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 2.0, 0.0, 14.0, 10.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 9.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 13.0, 4.0, None, None, None, 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 9.0, Some(0.0), Some(13.0), Some(9.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 10, 0, 35, 3.6, 0.0, 9.5, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 36, 15, 0, 30, 3.6, 0.0, 14.0, 4.0, Some(0.0), Some(14.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack15(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack15(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 42, 20, 0, 40, 4.0, 0.0, 13.0, 4.0, Some(0.0), Some(15.0), Some(11.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 6.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 9.75, 7.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 13.5, 10.75, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 2.5, 0.0, 14.5, 10.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 42, 20, 0, 40, 4.0, 0.0, 13.0, 4.0, Some(0.0), Some(15.0), Some(11.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 10.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.5, 0.0, 6.0, 5.0, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 9.75, 7.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 3.6, 0.0, 13.5, 10.75, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 0, 5, 0, 40, 2.5, 0.0, 14.5, 10.5, None, None, None, 0.4, 4.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 1, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 9.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack16(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack16(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 12.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 15.0, 11.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 12.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 12.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 15.0, 11.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 12.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.1), Some(10.5), 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 8.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 10.0, 6.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 7.25, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 3.9, 0.0, 8.0, 4.0, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 2.5, 0.0, 10.0, 10.5, Some(0.0), Some(10.1), Some(10.5), 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 0, 5, 0, 30, 4.0, 0.0, 8.0, 10.5, None, None, None, 0.4, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 4.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack17(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack17(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 6.5, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.5, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 6.5, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.5, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.0, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 9.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack18(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack18(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 8.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.75, 5.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.25, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.25, 10.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.75, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.25, 8.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 6.75, 5.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.3, 0.0, 7.25, 2.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 2.0, 0.0, 6.25, 10.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 1.5, 0, 10, 0, 30, 3.5, 0.0, 5.75, 11.0, None, None, None, 0.5, 3.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 6.0, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack19(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack19(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 2.0, 0.0, 11.5, 7.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 4.0, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(7.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 2.0, 0.0, 11.5, 7.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 4.0, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(7.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_attack_level(boma, 0, *FIGHTER_RYU_SAVING_LV_2 as u8); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); } } -unsafe extern "C" fn game_attack110(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack110(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 2.0, 0.0, 16.0, 7.0, Some(0.0), Some(14.0), Some(6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 10.0, 5.5, Some(0.0), Some(16.0), Some(7.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(10.0), Some(5.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 2.0, 0.0, 16.0, 7.0, Some(0.0), Some(14.0), Some(6.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 10.0, 5.5, Some(0.0), Some(16.0), Some(7.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 53, 65, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(10.0), Some(5.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_flashpunch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_flashpunch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 5.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(7.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 5.0, Some(0.0), Some(7.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 1, Hash40::new("top"), 0.0, 368, 100, 40, 0, 7.0, 0.0, 15.0, 0.0, Some(0.0), Some(7.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let x_pos = 13.0; let y_pos = 6.0; AttackModule::set_vec_target_pos(boma, 0, smash::phx::Hash40::new("top"), &Vector2f::new(x_pos, y_pos), 4, false); AttackModule::set_vec_target_pos(boma, 1, smash::phx::Hash40::new("top"), &Vector2f::new(x_pos, y_pos), 4, false); } else{ - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 361, 100, 35, 0, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 361, 100, 35, 0, 4.0, 0.0, 5.0, 4.0, Some(0.0), Some(5.0), Some(5.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::demon::instance::DEVASTATOR){ VarModule::off_flag(boma.object(), vars::demon::instance::DEVASTATOR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 40, 40, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 2.0, 0.0, 9.5, 9.0, None, None, None, 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 43, 70, 0, 76, 4.0, 0.0, 10.5, 4.0, Some(0.0), Some(10.5), Some(8.5), 0.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_auto_shift"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attack13", game_attack13) - .acmd("game_attack14", game_attack14) - .acmd("game_attack15", game_attack15) - .acmd("game_attack16", game_attack16) - .acmd("game_attack17", game_attack17) - .acmd("game_attack18", game_attack18) - .acmd("game_attack19", game_attack19) - .acmd("game_attack110", game_attack110) - .acmd("game_flashpunch", game_flashpunch) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack14", game_attack14); + agent.acmd("game_attack15", game_attack15); + agent.acmd("game_attack16", game_attack16); + agent.acmd("game_attack17", game_attack17); + agent.acmd("game_attack18", game_attack18); + agent.acmd("game_attack19", game_attack19); + agent.acmd("game_attack110", game_attack110); + agent.acmd("game_flashpunch", game_flashpunch); } diff --git a/fighters/demon/src/acmd/mod.rs b/fighters/demon/src/acmd/mod.rs index 1e69804cc9..6376aca099 100644 --- a/fighters/demon/src/acmd/mod.rs +++ b/fighters/demon/src/acmd/mod.rs @@ -8,13 +8,13 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - jabs::install(); - ground::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - tilts::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + jabs::install(agent); + ground::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + tilts::install(agent); } \ No newline at end of file diff --git a/fighters/demon/src/acmd/other.rs b/fighters/demon/src/acmd/other.rs index 8122e366fe..5a7e9ef0e6 100644 --- a/fighters/demon/src/acmd/other.rs +++ b/fighters/demon/src/acmd/other.rs @@ -1,301 +1,224 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dashb_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn demon_appeal_s_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 11.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 5, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 6, 9.0, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 62.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 7, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 8, 10.0, false); AttackModule::set_attack_camera_quake_forced(boma, 7, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 8, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn demon_appeal_s_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 11.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 11.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 4.0, 0.0, 16.5, 10.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 13.0, 6.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 180, 5, 0, 20, 3.5, 0.0, 10.0, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 8.0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 3, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 11.0, 8.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 1, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 12.5, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 10.0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 47.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 5, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.5, 0.0, 6.5, 10.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 2, Hash40::new("top"), 3.0, 180, 5, 0, 20, 3.0, 0.0, 9.0, 5.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(boma, 5, 9.0, false); AttackModule::set_add_reaction_frame_revised(boma, 6, 9.0, false); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 62.0); - if is_excute(fighter) { - ATTACK(fighter, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 7, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.5, 0.0, 10.5, 8.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 8, 3, Hash40::new("top"), 6.0, 40, 60, 0, 80, 3.0, 0.0, 13.0, 4.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_APPEAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 7, 10.0, false); AttackModule::set_add_reaction_frame_revised(boma, 8, 10.0, false); AttackModule::set_attack_camera_quake_forced(boma, 7, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 8, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("demon") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("sound_dashb", dashb_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealsr", demon_appeal_s_r_game) - .acmd("game_appealsl", demon_appeal_s_l_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_dash", sound_dash); + agent.acmd("sound_dashb", sound_dashb); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("game_appealsl", game_appealsl); } diff --git a/fighters/demon/src/acmd/smashes.rs b/fighters/demon/src/acmd/smashes.rs index 4f3db4705e..c43f766f0a 100644 --- a/fighters/demon/src/acmd/smashes.rs +++ b/fighters/demon/src/acmd/smashes.rs @@ -1,22 +1,22 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::set_int(boma, -1, *FIGHTER_DEMON_STATUS_ATTACK_S4_WORK_INT_CRITICAL_HIT_NO); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); } frame(lua_state, 10.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); @@ -28,27 +28,27 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { frame(lua_state, 14.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 25.0); - FT_DESIRED_RATE(fighter, 28.0-25.0, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + FT_DESIRED_RATE(agent, 28.0-25.0, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); WorkModule::set_int(boma, 2, *FIGHTER_DEMON_STATUS_ATTACK_S4_WORK_INT_CRITICAL_HIT_NO); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 25.0, 361, 75, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 25.0, 361, 75, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 20.0, 361, 65, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.75); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.75); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); if !WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_S4_FLAG_HIT) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } frame(lua_state, 51.0); @@ -65,54 +65,54 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, 14.0-1.0, 9.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 14.0-1.0, 9.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); } frame(lua_state, 12.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 4.75, 0.0, 9.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 11.0, 3.5, Some(0.0), Some(8.0), Some(2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 4.75, 0.0, 9.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 11.0, 3.5, Some(0.0), Some(8.0), Some(2.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 19.0, 90, 62, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 19.0, 90, 62, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 19.0, 90, 62, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 19.0, 90, 62, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 51.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); frame(lua_state, 53.0); @@ -123,22 +123,22 @@ unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); } - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 6.0); } frame(lua_state, 12.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); @@ -150,60 +150,60 @@ unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); frame(lua_state, 16.0); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 8.2, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 8.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 4.0, 0.0, 6.3, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 277, 52, 0, 20, 3.0, 0.0, 6.3, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 2.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 4.0, -5.0, 2.5, 11.5, Some(5.0), Some(2.5), Some(11.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 277, 10, 0, 100, 4.0, 0.0, 2.5, 11.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 277, 10, 0, 100, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 4.0, -5.0, 2.5, 11.5, Some(5.0), Some(2.5), Some(11.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 277, 60, 0, 20, 3.0, 0.0, 3.0, 7.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 5.0, false); AttackModule::set_add_reaction_frame_revised(boma, 3, 5.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.2); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 3, *CAMERA_QUAKE_KIND_L, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } @@ -221,10 +221,8 @@ unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/demon/src/acmd/specials.rs b/fighters/demon/src/acmd/specials.rs index 72eec8ac8d..dfdecad20f 100644 --- a/fighters/demon/src/acmd/specials.rs +++ b/fighters/demon/src/acmd/specials.rs @@ -1,66 +1,68 @@ use super::*; -unsafe extern "C" fn game_attackstep(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_attackstep(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn kazuya_wind_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +// Wind God Fist + +unsafe extern "C" fn game_attackstep2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.15, 0.0, 0.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.15, 0.0, 0.0)); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 13.5, 88, 10, 0, 98, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.5, 88, 10, 0, 98, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 1.2); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 13.5, 88, 10, 0, 98, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 88, 10, 0, 98, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 13.5, 88, 10, 0, 98, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 13.5, 88, 10, 0, 98, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 1.2); AttackModule::set_add_reaction_frame_revised(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 15.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 15.0, false); @@ -75,65 +77,67 @@ unsafe extern "C" fn kazuya_wind_god_fist_game(fighter: &mut L2CAgentBase) { //AttackModule::set_attack_camera_quake_forced(boma, 5, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn kazuya_electric_wind_god_fist_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); +// Electric Wind God Fist + +unsafe extern "C" fn game_attackstep2f(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); JostleModule::set_team(boma, 1); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.15, 0.0, 0.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.15, 0.0, 0.0)); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.5, 86, 20, 0, 85, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 4, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 5, 2.8); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 5, 1.2); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 2.8); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 2.8); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.5, 86, 20, 0, 85, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("bust"), 14.5, 86, 20, 0, 85, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 5.0, 0.0, 13.0, 6.0, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 14.5, 86, 20, 0, 85, 3.0, -1.0, 9.0, 3.5, None, None, None, 0.31, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 4, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 5, 2.8); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 5, 1.2); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.8); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.8); AttackModule::set_add_reaction_frame_revised(boma, 0, 12.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 12.0, false); AttackModule::set_add_reaction_frame_revised(boma, 2, 12.0, false); @@ -148,61 +152,71 @@ unsafe extern "C" fn kazuya_electric_wind_god_fist_game(fighter: &mut L2CAgentBa AttackModule::set_attack_camera_quake_forced(boma, 5, *CAMERA_QUAKE_KIND_S, false); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear(boma, 6, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn kazuya_spinning_demon_to_left_hook_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Electric Wind God Fist (When Hitting Shield) + +unsafe extern "C" fn game_attackstep2fhitshield(_agent: &mut L2CAgentBase) { + // if is_excute(agent) { + // ATTACK_FP(agent, 6, 1, Hash40::new("top"), 0, 361, 100, 65, 0, 12, 0, 10, 10, Hash40::new("collision_attr_normal"), 0, 0, 0, false, false, 0, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *COLLISION_SITUATION_MASK_G, true, *ATTACK_REGION_NONE, *COLLISION_CATEGORY_MASK_FIGHTER, false, *COLLISION_PART_MASK_ALL, false, false, false, false, 0, false, false, *ATTACK_LR_CHECK_POS, false, false, true, true, false, *COLLISION_SHAPE_TYPE_SPHERE); + // } +} + +// Spinning Demon to Left Hook + +unsafe extern "C" fn game_attackstep2s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); KineticModule::add_speed(boma, &Vector3f::new(0.1, 0.0, 0.0)); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 72, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 85, 100, 50, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 72, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 85, 100, 50, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 0.4, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_add_reaction_frame(boma, 2, 20.0, false); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 33.0, 14.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 33.0, 14.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.1, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 4.0, 0.0, 15.0, 7.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 14.0, 9.0, Some(0.0), Some(8.5), Some(9.0), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 13.0, 3.5, Some(0.0), Some(5.5), Some(3.5), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 4.0, 0.0, 15.0, 7.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 14.0, 9.0, Some(0.0), Some(8.5), Some(9.0), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.5, 25, 20, 0, 79, 5.0, 0.0, 13.0, 3.5, Some(0.0), Some(5.5), Some(3.5), 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.5, 25, 20, 0, 79, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.4, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, -10.0, false); AttackModule::set_add_reaction_frame(boma, 1, -10.0, false); AttackModule::set_add_reaction_frame(boma, 2, -10.0, false); @@ -213,264 +227,266 @@ unsafe extern "C" fn kazuya_spinning_demon_to_left_hook_game(fighter: &mut L2CAg AttackModule::set_attack_camera_quake(boma, 2, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 235, 100, 16, 0, 10.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 235, 100, 16, 0, 10.0, 0.0, 10.0, 10.0, Some(0.0), Some(10.0), Some(20.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, true, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 45.0); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - FT_MOTION_RATE(fighter, 0.2); + FT_MOTION_RATE(agent, 0.2); } else{ - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kazuya_lightning_uppercut_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +// Dragon Uppercut + +unsafe extern "C" fn game_attackstep2l(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 7.0); if VarModule::is_flag(boma.object(), vars::demon::instance::LIGHTNING_SCREW_UPPERCUT){ - FT_MOTION_RATE_RANGE(fighter, 7.0, 19.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 19.0, 10.0); } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); AttackModule::set_damage_shake_scale(boma, 1.5); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 22.0, 60, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 10.5, 4.75, Some(0.0), Some(16.0), Some(7.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 5.0, 2.5, Some(0.0), Some(10.5), Some(4.75), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 0.5); + ATTACK(agent, 0, 0, Hash40::new("handl"), 22.0, 60, 65, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 10.5, 4.75, Some(0.0), Some(16.0), Some(7.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 22.0, 60, 65, 0, 80, 5.25, 0.0, 5.0, 2.5, Some(0.0), Some(10.5), Some(4.75), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 2, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::set_damage_shake_scale(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 18.0, 70, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.1), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 70, 60, 0, 80, 5.0, 0.0, 13.0, 3.0, Some(0.0), Some(23.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); + ATTACK(agent, 0, 0, Hash40::new("handl"), 18.0, 70, 60, 0, 80, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.1), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 70, 60, 0, 80, 5.0, 0.0, 13.0, 3.0, Some(0.0), Some(23.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 70, 50, 0, 60, 5.0, 0.0, 14.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 70, 50, 0, 60, 5.0, 0.0, 14.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.17, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.5); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 14.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 70, 50, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.0, 3.0, Some(0.0), Some(24.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.5, 3.0, Some(0.0), Some(24.5), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 21.5, 3.0, Some(0.0), Some(24.5), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 27.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 22.0, 3.0, Some(0.0), Some(25.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 70, 50, 0, 60, 5.0, 0.0, 22.0, 3.0, Some(0.0), Some(25.0), Some(3.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_PUNCH); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_M, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_M, false); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 0.9); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.9); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn kazuya_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_team(boma, 1); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 10.0); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_CHANGE_HIT); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - //FT_MOTION_RATE(fighter, 30.0/(62.0-15.0)); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + //FT_MOTION_RATE(agent, 30.0/(62.0-15.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 62.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); - //FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn kazuya_special_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 49.0, 40.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 49.0, 40.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } } -unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); FighterSpecializer_Demon::set_devil(boma, true, 10.0); - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); FighterSpecializer_Demon::set_devil(boma, true, 5.0); frame(lua_state, 12.0); FighterSpecializer_Demon::set_devil(boma, true, 4.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 14.0); FighterSpecializer_Demon::set_devil(boma, true, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 50, 0, 80, 4.0, 0.0, 8.0, 3.0, Some(0.0), Some(8.0), Some(10.0), 0.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fist_down"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_attack_camera_quake_forced(boma, 0, *CAMERA_QUAKE_KIND_L, false); AttackModule::set_attack_camera_quake_forced(boma, 1, *CAMERA_QUAKE_KIND_L, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_CHANGE_HIT); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 16.0); FighterSpecializer_Demon::set_devil(boma, true, 1.0); @@ -490,278 +506,272 @@ unsafe extern "C" fn game_specialairs(fighter: &mut L2CAgentBase) { FighterSpecializer_Demon::set_devil(boma, false, 0.0); } -unsafe extern "C" fn kazuya_special_air_s_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_s"); smash::app::FighterSpecializer_Demon::set_devil(boma, true, 1.0); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 49.0, 30.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 49.0, 30.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_AIR_CONTROL); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 5.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_S_FLAG_LANDING); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 7.0); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 8.0); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } } -unsafe extern "C" fn kazuya_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_SPECIAL_HI_FLAG_AIR){ - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } else{ - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 55, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 55, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 68, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 90, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 90, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn kazuya_special_hi_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhiair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 2.0); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 76, 53, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, 6.0, Some(0.0), Some(11.25), Some(6.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 76, 53, 0, 80, 6.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 76, 53, 0, 80, 6.0, 0.0, 6.0, -2.5, Some(0.0), Some(10.25), Some(-2.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 2, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 71, 65, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 71, 65, 0, 75, 5.15, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 63, 85, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 63, 85, 0, 60, 4.6, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 60, 85, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 60, 85, 0, 60, 4.0, 0.0, 18.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //FT_MOTION_RATE(fighter, 15.0/(56.0-15.0)); + //FT_MOTION_RATE(agent, 15.0/(56.0-15.0)); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 3.0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 4.0); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, true, 6.0); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { smash::app::FighterSpecializer_Demon::set_devil(boma, false, 0.0); } frame(lua_state, 56.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn kazuya_special_hi_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_sign_flash"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_sign_flash"), Hash40::new("head"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ColorBlendModule::set_disable_camera_depth_influence(boma, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_ragedrive_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.75, false); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.5, 1.0); - //FLASH(fighter, 0.25, 0.08, 0.6, 0); - //FLASH_SET_DIRECTION(fighter, -1, 0, 0); - //BURN_COLOR(fighter, 8, 3, 36, 0); - //FLASH_FRM(fighter, 2, 0.25, 0.08, 0.6, 0.4); - //BURN_COLOR_FRAME(fighter, 2, 8, 3, 36, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("demon_ragedrive_start"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 0.75, false); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.5, 1.0); + //FLASH(agent, 0.25, 0.08, 0.6, 0); + //FLASH_SET_DIRECTION(agent, -1, 0, 0); + //BURN_COLOR(agent, 8, 3, 36, 0); + //FLASH_FRM(agent, 2, 0.25, 0.08, 0.6, 0.4); + //BURN_COLOR_FRAME(agent, 2, 8, 3, 36, 0.4); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start_aura"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("demon_devil_start_elec"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start_aura"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("demon_devil_start_elec"), Hash40::new("bust"), 0, 0, 1, 0, 0, 0, 1, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - //FLASH(fighter, 0.25, 0.08, 0.6, 0.4); - //BURN_COLOR(fighter, 8, 3, 36, 0.4); - //FLASH_FRM(fighter, 3, 0.25, 0.08, 0.6, 0); - //BURN_COLOR_FRAME(fighter, 3, 8, 3, 36, 0); + if is_excute(agent) { + //FLASH(agent, 0.25, 0.08, 0.6, 0.4); + //BURN_COLOR(agent, 8, 3, 36, 0.4); + //FLASH_FRM(agent, 3, 0.25, 0.08, 0.6, 0); + //BURN_COLOR_FRAME(agent, 3, 8, 3, 36, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn game_attackstep2fhitshield(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - //ATTACK_FP(fighter, 6, 1, Hash40::new("top"), 0, 361, 100, 65, 0, 12, 0, 10, 10, Hash40::new("collision_attr_normal"), 0, 0, 0, false, false, 0, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *COLLISION_SITUATION_MASK_G, true, *ATTACK_REGION_NONE, *COLLISION_CATEGORY_MASK_FIGHTER, false, *COLLISION_PART_MASK_ALL, false, false, false, false, 0, false, false, *ATTACK_LR_CHECK_POS, false, false, true, true, false, *COLLISION_SHAPE_TYPE_SPHERE); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } @@ -905,25 +915,21 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.75); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attackstep", game_attackstep) - .acmd("game_attackstep2", kazuya_wind_god_fist_game) - .acmd("game_attackstep2f", kazuya_electric_wind_god_fist_game) - .acmd("game_attackstep2s", kazuya_spinning_demon_to_left_hook_game) - .acmd("game_attackstep2l", kazuya_lightning_uppercut_game) - .acmd("game_specials", kazuya_special_s_game) - .acmd("game_specialsend", kazuya_special_s_end_game) - .acmd("game_specialairs", game_specialairs) - .acmd("game_specialairsend", kazuya_special_air_s_end_game) - .acmd("game_specialhi", kazuya_special_hi_game) - .acmd("game_specialhiair", kazuya_special_hi_air_game) - .acmd("effect_specialhistart", kazuya_special_hi_start_effect) - .acmd("effect_specialairhistart", kazuya_special_hi_start_effect) - .acmd("game_attackstep2fhitshield", game_attackstep2fhitshield) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("game_specialairlw", game_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackstep", game_attackstep); + agent.acmd("game_attackstep2", game_attackstep2); + agent.acmd("game_attackstep2f", game_attackstep2f); + agent.acmd("game_attackstep2fhitshield", game_attackstep2fhitshield); + agent.acmd("game_attackstep2s", game_attackstep2s); + agent.acmd("game_attackstep2l", game_attackstep2l); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsend", game_specialsend); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhiair", game_specialhiair); + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("effect_specialairhistart", effect_specialhistart); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/demon/src/acmd/throws.rs b/fighters/demon/src/acmd/throws.rs index d642c532d5..e5edcbff92 100644 --- a/fighters/demon/src/acmd/throws.rs +++ b/fighters/demon/src/acmd/throws.rs @@ -1,27 +1,27 @@ use super::*; use smash2; -unsafe extern "C" fn demon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(11.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(11.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn demon_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn demon_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn demon_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -61,223 +61,203 @@ unsafe extern "C" fn demon_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn demon_throw_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 12.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, 0 as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 2.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_80_beam"), 0, false, 0 as u32); } } -unsafe extern "C" fn demon_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 7, 0, 35, 0, 0, false); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 7, 0, 35, 0, 0, false); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwb.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwb.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } frame(lua_state, 27.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 82, 180, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + REVERSE_LR(agent); + //ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 82, 180, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 30, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 46.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 58, 55, 0, 60, 4.0, 0.0, 2.0, -12.0, Some(0.0), Some(2.0), Some(-22.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 58, 55, 0, 60, 4.0, 0.0, 2.0, -12.0, Some(0.0), Some(2.0), Some(-22.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 17, 0); + CHECK_FINISH_CAMERA(agent, 17, 0); } frame(lua_state, 47.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); - CAM_ZOOM_OUT(fighter); + CAM_ZOOM_OUT(agent); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 0.375); -} - -unsafe extern "C" fn demon_blaster_fly_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 1.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 1.1); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 1.1); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - } + FT_MOTION_RATE(agent, 0.375); } -unsafe extern "C" fn demon_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 0, 0, 0, 0, 0, false); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwlw.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwlw.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 80, 135, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 80, 135, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 34.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 65, 0, 50, 6.0, 0.0, 12.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 65, 0, 50, 6.0, 0.0, 12.0, 7.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_PUNCH02, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 9, 4); + CHECK_FINISH_CAMERA(agent, 9, 4); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - CAM_ZOOM_OUT(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + CAM_ZOOM_OUT(agent); } frame(lua_state, 36.0); - FT_MOTION_RATE(fighter, 0.9); + FT_MOTION_RATE(agent, 0.9); } -unsafe extern "C" fn demon_throw_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_throwcommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if !smash2::app::FighterCutInManager::is_vr_mode() { - if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(fighter.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { - if is_excute(fighter) { + if smash2::app::FighterCutInManager::is_one_on_one_including_thrown(&*(agent.module_accessor as *const smash2::app::BattleObjectModuleAccessor)) { + if is_excute(agent) { FighterSpecializer_Demon::check_disabled_motion_camera_of_scale(boma); FighterSpecializer_Demon::check_disabled_motion_camera_of_stage(boma); } if WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_THROW_MOTION_CAMERA) { - if is_excute(fighter) { - CHECK_VALID_START_CAMERA(fighter, 0, 7, 0, 50, 30, 0, true); + if is_excute(agent) { + CHECK_VALID_START_CAMERA(agent, 0, 7, 0, 50, 30, 0, true); } if !WorkModule::is_flag(boma, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_DISABLE_THROW_MOTION_CAMERA) { if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - if is_excute(fighter) { - REQ_MOTION_CAMERA(fighter, Hash40::new("e01throwcommand.nuanmb"), false); + if is_excute(agent) { + REQ_MOTION_CAMERA(agent, Hash40::new("e01throwcommand.nuanmb"), false); } } } - if is_excute(fighter) { + if is_excute(agent) { let scale = PostureModule::scale(boma); - CAM_ZOOM_IN_arg5(fighter, 7.0, 0.0, scale * 1.5, 0.0, 0.0); + CAM_ZOOM_IN_arg5(agent, 7.0, 0.0, scale * 1.5, 0.0, 0.0); } } } } frame(lua_state, 10.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 165, 150, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 165, 150, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 80, 0, 50, 5.0, 0.0, 8.0, -3.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 80, 0, 50, 5.0, 0.0, 8.0, -3.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 80.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_DEMON_STATUS_THROW_COMMAND_FLAG_USE_OTHER_PARAM) { - CHECK_FINISH_CAMERA(fighter, 18, 2); + CHECK_FINISH_CAMERA(agent, 18, 2); } else { - CHECK_FINISH_CAMERA(fighter, 18, 15); + CHECK_FINISH_CAMERA(agent, 18, 15); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 6.0, 0.0, 7.5, -14.0, Some(0.0), Some(6.0), Some(-14.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 4.0, 0.0, 8.0, -6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 6.0, 0.0, 7.5, -14.0, Some(0.0), Some(6.0), Some(-14.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 19, 50, 0, 30, 4.0, 0.0, 8.0, -6.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_THROWCOMMAND, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 81.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - CAM_ZOOM_OUT(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + CAM_ZOOM_OUT(agent); } } -pub fn install() { - smashline::Agent::new("demon_blaster") - .acmd("game_flythrow", demon_blaster_fly_throw_game) - .install(); - smashline::Agent::new("demon") - .acmd("game_catch", demon_catch_game) - .acmd("game_catchdash", demon_catch_dash_game) - .acmd("game_catchturn", demon_catch_turn_game) - .acmd("expression_throwhi", demon_throw_hi_expression) - .acmd("game_throwb", demon_throw_b_game) - .acmd("game_throwlw", demon_throw_lw_game) - .acmd("game_throwcommand", demon_throw_command_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwcommand", game_throwcommand); } diff --git a/fighters/demon/src/acmd/tilts.rs b/fighters/demon/src/acmd/tilts.rs index 7ac29b650f..71729991e3 100644 --- a/fighters/demon/src/acmd/tilts.rs +++ b/fighters/demon/src/acmd/tilts.rs @@ -1,70 +1,70 @@ use super::*; -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 10.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); } frame(lua_state, 12.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 13.0, 20, 71, 0, 37, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 13.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 15.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 4.25, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 1, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 2, 0.8); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 3, 0.8); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 13.0, 20, 71, 0, 37, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 13.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 15.0, 20, 71, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 15.0, 20, 71, 0, 37, 4.25, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DEMON_KICK, *ATTACK_REGION_KICK); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 0.8); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 3, 0.8); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_team(boma, 1); - VarModule::off_flag(fighter.battle_object, vars::demon::instance::SLAUGHTER_HIGH_KICK); + VarModule::off_flag(agent.battle_object, vars::demon::instance::SLAUGHTER_HIGH_KICK); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ + if VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ MotionModule::change_motion(boma, Hash40::new("attack_hi32"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 8.0, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 4.0, 8.0, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 88, 5, 0, 71, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderl"), 6.0, 70, 5, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 88, 5, 0, 71, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 88, 5, 0, 71, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("arml"), 6.0, 70, 5, 0, 46, 3.0, 5.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderl"), 6.0, 70, 5, 0, 46, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame_revised(boma, 0, 1.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 1, 1.0, false); //AttackModule::set_add_reaction_frame_revised(boma, 2, 1.0, false); @@ -73,130 +73,128 @@ unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { //AttackModule::set_add_reaction_frame_revised(boma, 5, 3.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_HI_3_FLAG_CHECK_STEP); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 30.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 30.0, 6.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn game_attackhi32(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 4.0, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 65, 40, 0, 80, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 4.0, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 7.0, 83, 64, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 2.0, 4.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 4.3, 5.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 83, 64, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 7.0, 83, 64, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.65, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_PUNCH01, *ATTACK_REGION_PUNCH); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if !VarModule::is_flag(fighter.battle_object, vars::demon::instance::JAW_BREAKER){ - FT_MOTION_RATE_RANGE(fighter, 24.0, 35.0, 5.0); + if !VarModule::is_flag(agent.battle_object, vars::demon::instance::JAW_BREAKER){ + FT_MOTION_RATE_RANGE(agent, 24.0, 35.0, 5.0); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 5.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 5.0); + if is_excute(agent) { JostleModule::set_team(boma, 1); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 16.0, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + FT_MOTION_RATE_RANGE(agent, 8.0, 16.0, 4.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DEMON_STATUS_ATTACK_LW_3_FLAG_CHECK_STEP); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 11.0, 271, 20, 0, 100, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 271, 20, 0, 100, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 11.0, 271, 20, 0, 100, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 11.0, 85, 20, 0, 85, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 4.0, 6.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 85, 20, 0, 85, 3.0, 3.5, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 11.0, 85, 20, 0, 85, 2.8, 3.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DEMON_ATTACKLW3, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame_revised(boma, 3, 17.0, false); AttackModule::set_add_reaction_frame_revised(boma, 4, 17.0, false); AttackModule::set_add_reaction_frame_revised(boma, 5, 17.0, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 30.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 30.0, 5.0); frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("demon") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attackhi32", game_attackhi32) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attackhi32", game_attackhi32); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/demon/src/blaster/acmd.rs b/fighters/demon/src/blaster/acmd.rs new file mode 100644 index 0000000000..2486564f3f --- /dev/null +++ b/fighters/demon/src/blaster/acmd.rs @@ -0,0 +1,20 @@ +use super::*; + +unsafe extern "C" fn game_flythrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 1.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 80, 65, 0, 85, 8.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.1); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 1.1); + } + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flythrow", game_flythrow); +} \ No newline at end of file diff --git a/fighters/demon/src/blaster/mod.rs b/fighters/demon/src/blaster/mod.rs new file mode 100644 index 0000000000..647982629b --- /dev/null +++ b/fighters/demon/src/blaster/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("demon_blaster"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/demon/src/lib.rs b/fighters/demon/src/lib.rs index 5537dac979..df364ac1e7 100644 --- a/fighters/demon/src/lib.rs +++ b/fighters/demon/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod status; pub mod opff; +mod blaster; + use smash::{ lib::{ L2CValue, @@ -39,7 +41,11 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("demon"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + blaster::install(); } \ No newline at end of file diff --git a/fighters/demon/src/opff.rs b/fighters/demon/src/opff.rs index 5285ed2fdd..d741a75477 100644 --- a/fighters/demon/src/opff.rs +++ b/fighters/demon/src/opff.rs @@ -255,8 +255,6 @@ pub unsafe fn demon_frame(fighter: &mut L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("demon") - .on_line(Main, demon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, demon_frame_wrapper); } diff --git a/fighters/demon/src/status.rs b/fighters/demon/src/status.rs index a2fe665cf8..e81352ca08 100644 --- a/fighters/demon/src/status.rs +++ b/fighters/demon/src/status.rs @@ -1,348 +1,22 @@ use super::*; use globals::*; -utils::import_noreturn!(common::shoto_status::{ - fgc_end_dashback, - ryu_idkwhatthisis2 -}); - -extern "Rust" { - // from common::shoto_status - fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; - fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; - fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; -} - -// FIGHTER_DEMON_STATUS_KIND_DASH // - -pub unsafe extern "C" fn status_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Dash_Sub(); - fighter.sub_shift_status_main(L2CValue::Ptr(status_dash_main as *const () as _)) -} - -unsafe extern "C" fn status_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.status_Dash_Main_common(L2CValue::I32(0)).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP { - if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3 != 0 { - let attack_stand_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_attack_step"), hash40("dash_to_attack_stand1_frame")); - if fighter.global_table[CURRENT_FRAME].get_i32() <= attack_stand_frame { - fighter.change_status( - L2CValue::I32(*FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1), // We don't want to change to ESCAPE_AIR_SLIDE in case they do a nair dodge - L2CValue::Bool(true) - ); - return L2CValue::I32(0); - } - } - } - } - } - return L2CValue::I32(0); -} - -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_DASH_BACK); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into() -} - -// FIGHTER_DEMON_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // -// Here to force Kazuya to only use neutral attack to continue the combo. - -unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.check_attack_mtrans(); - } - fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_check_attack_mtrans as *const () as _)); - fighter.sub_status_AttackComboCommon(); - WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_STATUS_ATTACK_WORK_INT_100_HIT_NEAR_COUNT_CLIFF_STOP); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attack_main_loop as *const () as _)) -} - -extern "Rust" { - fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; -} - -unsafe extern "C" fn demon_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let change_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - if change_to == *FIGHTER_STATUS_KIND_NONE { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_12") { - if ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH) { - fighter.change_status(FIGHTER_DEMON_STATUS_KIND_FLASH_PUNCH.into(), true.into()); - return 0.into(); - } - } - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if StatusModule::is_changing(fighter.module_accessor) == false { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO) { - WorkModule::set_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - } - } - } - } - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); - if change_to == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - fighter.change_status(FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO.into(), true.into()); - return 0.into(); - } - } - fighter.status_Attack_Main() -} - -// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO // -// Here to force Kazuya to only use neutral attack to continue the combo. - -unsafe extern "C" fn demon_attackcombo_main(fighter: &mut L2CFighterCommon) -> L2CValue { - demon_attackcombo_main_mot_helper(fighter, 2.into()); - MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, false); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attackcombo_main_loop as *const () as _)) -} - -unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterCommon, count: L2CValue) { - let val = count.get_i32(); - WorkModule::set_int(fighter.module_accessor, val, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - let mot : u64; - match val { - 2 => mot = hash40("attack_13"), - 3 => mot = hash40("attack_14"), - 4 => mot = hash40("attack_15"), - 5 => mot = hash40("attack_16"), - 6 => mot = hash40("attack_17"), - 7 => mot = hash40("attack_18"), - 8 => mot = hash40("attack_19"), - _ => mot = hash40("attack_110"), - } - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new_raw(mot), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); -} - -unsafe extern "C" fn demon_attackcombo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() { - return 0.into(); - } - } - let mut next_status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - if next_status != *FIGHTER_STATUS_KIND_NONE { - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { - next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); - } - } - else { - next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - let combo_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - demon_attackcombo_main_mot_helper(fighter, (combo_count + 1).into()); - notify_event_msc_cmd!(fighter, 0x2b94de0d96u64, FIGHTER_LOG_ACTION_CATEGORY_ATTACK, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_16); - return 0.into(); - } - } - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - if next_status != *FIGHTER_STATUS_KIND_NONE { - if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - return 0.into(); - } - fighter.change_status(next_status.into(), true.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - 0.into() -} - -unsafe extern "C" fn demon_attackcombo_main_loop_helper_first(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { - let combo_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); - let mut status = next_status; - if combo_step != 4 { - if combo_step != 6 { - if combo_step != 7 { - status = demon_attackcombo_main_loop_helper_second(fighter, status); - } - } - } - else { - status = demon_attackcombo_main_loop_helper_second(fighter, status); - } - if status == *FIGHTER_STATUS_KIND_NONE { - if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) - && only_jabs(fighter) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { - if !StatusModule::is_changing(fighter.module_accessor) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO; - } - } - } - } - WorkModule::set_int(fighter.module_accessor, status, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); - status -} - -unsafe extern "C" fn demon_attackcombo_main_loop_helper_second(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { - let mut status = next_status; - if next_status != *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623STRICT == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_323CATCH == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623A == 0 { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_6N6AB == 0 { - status = *FIGHTER_STATUS_KIND_NONE; - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_CATCH_COMMAND; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2F; - } - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2S; - } - } - else { - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623ALONG != 0 { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2L; - } - else { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; - } - } - if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623BLONG != 0 { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { - status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; - } - } - } - status -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("walk_stick_x")); - let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); - - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_LANDING // - -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // -// For fixing momentum transfer - -pub unsafe extern "C" fn attackair_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) -} - -pub fn install() { - smashline::Agent::new("demon") - .status(Main, *FIGHTER_STATUS_KIND_DASH, status_dash) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, end_dashback) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK, demon_attack_main) - .status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, demon_attackcombo_main) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attackair_pre) - .install(); +mod wait; +mod dash; +mod turn_dash; +mod landing; + +mod attack; +mod attack_combo; +mod attack_air; + +pub fn install(agent: &mut Agent) { + wait::install(agent); + dash::install(agent); + turn_dash::install(agent); + landing::install(agent); + + attack::install(agent); + attack_combo::install(agent); + attack_air::install(agent); } \ No newline at end of file diff --git a/fighters/demon/src/status/attack.rs b/fighters/demon/src/status/attack.rs new file mode 100644 index 0000000000..38d0d98f96 --- /dev/null +++ b/fighters/demon/src/status/attack.rs @@ -0,0 +1,56 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK // +// Here to force Kazuya to only use neutral attack to continue the combo. + +unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.check_attack_mtrans(); + } + fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_check_attack_mtrans as *const () as _)); + fighter.sub_status_AttackComboCommon(); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_STATUS_ATTACK_WORK_INT_100_HIT_NEAR_COUNT_CLIFF_STOP); + fighter.sub_shift_status_main(L2CValue::Ptr(demon_attack_main_loop as *const () as _)) +} + +extern "Rust" { + fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; +} + +unsafe extern "C" fn demon_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let change_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + if change_to == *FIGHTER_STATUS_KIND_NONE { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_12") { + if ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_FLASH_PUNCH) { + fighter.change_status(FIGHTER_DEMON_STATUS_KIND_FLASH_PUNCH.into(), true.into()); + return 0.into(); + } + } + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if StatusModule::is_changing(fighter.module_accessor) == false { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_ENABLE_COMBO) { + WorkModule::set_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + } + } + } + } + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); + if change_to == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + fighter.change_status(FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO.into(), true.into()); + return 0.into(); + } + } + fighter.status_Attack_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, demon_attack_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/attack_air.rs b/fighters/demon/src/status/attack_air.rs new file mode 100644 index 0000000000..724a1a9ced --- /dev/null +++ b/fighters/demon/src/status/attack_air.rs @@ -0,0 +1,14 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR // +// For fixing momentum transfer + +pub unsafe extern "C" fn attackair_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attackair_pre); +} \ No newline at end of file diff --git a/fighters/demon/src/status/attack_combo.rs b/fighters/demon/src/status/attack_combo.rs new file mode 100644 index 0000000000..5db2376777 --- /dev/null +++ b/fighters/demon/src/status/attack_combo.rs @@ -0,0 +1,166 @@ +use super::*; +use globals::*; + +extern "Rust" { + fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; +} + +// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO // +// Here to force Kazuya to only use neutral attack to continue the combo. + +unsafe extern "C" fn demon_attackcombo_main(fighter: &mut L2CFighterCommon) -> L2CValue { + demon_attackcombo_main_mot_helper(fighter, 2.into()); + MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, false); + fighter.sub_shift_status_main(L2CValue::Ptr(demon_attackcombo_main_loop as *const () as _)) +} + +unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterCommon, count: L2CValue) { + let val = count.get_i32(); + WorkModule::set_int(fighter.module_accessor, val, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + let mot : u64; + match val { + 2 => mot = hash40("attack_13"), + 3 => mot = hash40("attack_14"), + 4 => mot = hash40("attack_15"), + 5 => mot = hash40("attack_16"), + 6 => mot = hash40("attack_17"), + 7 => mot = hash40("attack_18"), + 8 => mot = hash40("attack_19"), + _ => mot = hash40("attack_110"), + } + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new_raw(mot), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); +} + +unsafe extern "C" fn demon_attackcombo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() { + return 0.into(); + } + } + let mut next_status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + if next_status != *FIGHTER_STATUS_KIND_NONE { + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { + next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); + } + } + else { + next_status = demon_attackcombo_main_loop_helper_first(fighter, next_status); + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_FLAG_CHANGE_STATUS); + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + let combo_count = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + demon_attackcombo_main_mot_helper(fighter, (combo_count + 1).into()); + notify_event_msc_cmd!(fighter, 0x2b94de0d96u64, FIGHTER_LOG_ACTION_CATEGORY_ATTACK, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_16); + return 0.into(); + } + } + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + if next_status != *FIGHTER_STATUS_KIND_NONE { + if next_status == *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + return 0.into(); + } + fighter.change_status(next_status.into(), true.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + 0.into() +} + +unsafe extern "C" fn demon_attackcombo_main_loop_helper_first(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { + let combo_step = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_COMBO); + let mut status = next_status; + if combo_step != 4 { + if combo_step != 6 { + if combo_step != 7 { + status = demon_attackcombo_main_loop_helper_second(fighter, status); + } + } + } + else { + status = demon_attackcombo_main_loop_helper_second(fighter, status); + } + if status == *FIGHTER_STATUS_KIND_NONE { + if ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) + && only_jabs(fighter) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { + if !StatusModule::is_changing(fighter.module_accessor) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO; + } + } + } + } + WorkModule::set_int(fighter.module_accessor, status, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); + status +} + +unsafe extern "C" fn demon_attackcombo_main_loop_helper_second(fighter: &mut L2CFighterCommon, next_status: i32) -> i32 { + let mut status = next_status; + if next_status != *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_SPECIAL_HI_COMMAND == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623STRICT == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_323CATCH == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623A == 0 { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_6N6AB == 0 { + status = *FIGHTER_STATUS_KIND_NONE; + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_CATCH_COMMAND; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2F; + } + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2S; + } + } + else { + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623ALONG != 0 { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP_2L; + } + else { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; + } + } + if fighter.global_table[CMD_CAT4].get_i32() & *FIGHTER_PAD_CMD_CAT4_FLAG_COMMAND_623BLONG != 0 { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_DEMON_INSTANCE_WORK_ID_FLAG_ENABLE_RAGE_SYSTEM) { + status = *FIGHTER_DEMON_STATUS_KIND_ATTACK_RAGE; + } + } + } + status +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, demon_attackcombo_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/dash.rs b/fighters/demon/src/status/dash.rs new file mode 100644 index 0000000000..3327bf5da6 --- /dev/null +++ b/fighters/demon/src/status/dash.rs @@ -0,0 +1,31 @@ +use super::*; +use globals::*; + +pub unsafe extern "C" fn status_dash(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_Dash_Sub(); + fighter.sub_shift_status_main(L2CValue::Ptr(status_dash_main as *const () as _)) +} + +unsafe extern "C" fn status_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.status_Dash_Main_common(L2CValue::I32(0)).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP { + if fighter.global_table[CMD_CAT1].get_i32() & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3 != 0 { + let attack_stand_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_attack_step"), hash40("dash_to_attack_stand1_frame")); + if fighter.global_table[CURRENT_FRAME].get_i32() <= attack_stand_frame { + fighter.change_status( + L2CValue::I32(*FIGHTER_DEMON_STATUS_KIND_ATTACK_STAND_1), + L2CValue::Bool(true) + ); + return L2CValue::I32(0); + } + } + } + } + } + return L2CValue::I32(0); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_DASH, status_dash); +} \ No newline at end of file diff --git a/fighters/demon/src/status/dash_back.rs b/fighters/demon/src/status/dash_back.rs new file mode 100644 index 0000000000..b5d2a53343 --- /dev/null +++ b/fighters/demon/src/status/dash_back.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; + +utils::import_noreturn!(common::shoto_status::{ + fgc_end_dashback +}); + +extern "Rust" { + fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_DEMON_STATUS_KIND_DASH_BACK // + +pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, end_dashback); +} \ No newline at end of file diff --git a/fighters/demon/src/status/landing.rs b/fighters/demon/src/status/landing.rs new file mode 100644 index 0000000000..3bd62849ed --- /dev/null +++ b/fighters/demon/src/status/landing.rs @@ -0,0 +1,16 @@ +use super::*; +use globals::*; + +extern "Rust" { + fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_STATUS_KIND_LANDING // + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/demon/src/status/turn_dash.rs b/fighters/demon/src/status/turn_dash.rs new file mode 100644 index 0000000000..a0cccb8b30 --- /dev/null +++ b/fighters/demon/src/status/turn_dash.rs @@ -0,0 +1,24 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_TURN_DASH // + +pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { + app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_DASH_BACK); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); +} \ No newline at end of file diff --git a/fighters/demon/src/status/wait.rs b/fighters/demon/src/status/wait.rs new file mode 100644 index 0000000000..0351a2660a --- /dev/null +++ b/fighters/demon/src/status/wait.rs @@ -0,0 +1,46 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_WAIT // + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("walk_stick_x")); + let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); + + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file From d49d126654ea0e7fe985c1b408943d3fafba5382 Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 09:35:48 -0500 Subject: [PATCH 106/172] more adjustments --- fighters/diddy/src/lib.rs | 2 +- .../blizzard/{acmd/specials.rs => acmd.rs} | 0 fighters/iceclimber/src/blizzard/acmd/mod.rs | 7 -- .../dragonhand/{acmd/specials.rs => acmd.rs} | 0 fighters/kamui/src/dragonhand/acmd/mod.rs | 7 -- .../ryusensya/{acmd/specials.rs => acmd.rs} | 0 fighters/kamui/src/ryusensya/acmd/mod.rs | 7 -- .../spearhand/{acmd/specials.rs => acmd.rs} | 19 +++- fighters/kamui/src/spearhand/acmd/mod.rs | 9 -- fighters/kamui/src/spearhand/acmd/smashes.rs | 20 ---- .../waterdragon/{acmd/specials.rs => acmd.rs} | 0 fighters/kamui/src/waterdragon/acmd/mod.rs | 7 -- fighters/ken/src/lib.rs | 6 +- fighters/kirby/src/acmd/other.rs | 88 ++---------------- fighters/kirby/src/lib.rs | 3 +- .../backpack/{acmd/specials.rs => acmd.rs} | 0 fighters/krool/src/backpack/acmd/mod.rs | 7 -- .../ironball/{acmd/specials.rs => acmd.rs} | 0 fighters/krool/src/ironball/acmd/mod.rs | 7 -- fighters/krool/src/lib.rs | 26 +++--- .../fireball/{acmd/specials.rs => acmd.rs} | 0 fighters/mario/src/fireball/acmd/mod.rs | 7 -- fighters/mario/src/lib.rs | 1 + .../src/pump/{acmd/specials.rs => acmd.rs} | 0 fighters/mario/src/pump/acmd/mod.rs | 7 -- .../pumpwater/{acmd/specials.rs => acmd.rs} | 0 fighters/mario/src/pumpwater/acmd/mod.rs | 7 -- .../drcapsule/{acmd/specials.rs => acmd.rs} | 0 fighters/mariod/src/drcapsule/acmd/mod.rs | 7 -- fighters/mariod/src/lib.rs | 3 + fighters/metaknight/src/acmd/other.rs | 88 ++---------------- fighters/metaknight/src/lib.rs | 5 +- fighters/mewtwo/src/acmd/other.rs | 88 ++---------------- fighters/mewtwo/src/bindball/acmd.rs | 13 ++- fighters/mewtwo/src/bindball/acmd/special.rs | 12 --- fighters/mewtwo/src/lib.rs | 11 ++- fighters/miifighter/src/acmd/other.rs | 88 ++---------------- fighters/miifighter/src/lib.rs | 6 +- fighters/miiswordsman/src/chakram/acmd.rs | 89 +++++++++++++++++- .../miiswordsman/src/chakram/acmd/special.rs | 88 ------------------ fighters/miiswordsman/src/lib.rs | 14 ++- .../miiswordsman/src/lightshuriken/acmd.rs | 91 ++++++++++++++++++- .../src/lightshuriken/acmd/special.rs | 90 ------------------ fighters/miiswordsman/src/tornado/acmd.rs | 19 +++- .../miiswordsman/src/tornado/acmd/special.rs | 20 ---- fighters/miiswordsman/src/tornado/mod.rs | 2 +- fighters/peach/src/acmd/other.rs | 87 ++---------------- fighters/peach/src/lib.rs | 5 +- fighters/pfushigisou/src/acmd/other.rs | 88 ++---------------- fighters/pfushigisou/src/lib.rs | 4 +- .../dengekidama/{acmd/specials.rs => acmd.rs} | 0 fighters/pichu/src/dengekidama/acmd/mod.rs | 7 -- .../kaminari/{acmd/specials.rs => acmd.rs} | 0 fighters/pichu/src/kaminari/acmd/mod.rs | 7 -- .../src/fire/{acmd/tilts.rs => acmd.rs} | 0 fighters/pickel/src/fire/acmd/mod.rs | 7 -- .../src/forge/{acmd/aerials.rs => acmd.rs} | 0 fighters/pickel/src/forge/acmd/mod.rs | 7 -- .../src/melt/{acmd/other.rs => acmd.rs} | 0 fighters/pickel/src/melt/acmd/mod.rs | 7 -- .../src/trolley/{acmd/specials.rs => acmd.rs} | 0 fighters/pickel/src/trolley/acmd/mod.rs | 7 -- .../kaminari/{acmd/specials.rs => acmd.rs} | 0 fighters/pikachu/src/kaminari/acmd/mod.rs | 7 -- fighters/pit/src/arrow/acmd.rs | 21 ++++- fighters/pit/src/arrow/acmd/special.rs | 22 ----- fighters/pit/src/lib.rs | 10 +- fighters/pitb/src/acmd/other.rs | 88 ++---------------- fighters/pitb/src/lib.rs | 5 +- fighters/plizardon/src/acmd/other.rs | 90 ++---------------- fighters/plizardon/src/lib.rs | 5 +- fighters/pzenigame/src/acmd/other.rs | 89 ++---------------- fighters/pzenigame/src/lib.rs | 4 +- fighters/reflet/src/elwind/acmd.rs | 31 ++++++- fighters/reflet/src/elwind/acmd/special.rs | 30 ------ fighters/reflet/src/gigafire/acmd.rs | 45 ++++++++- fighters/reflet/src/gigafire/acmd/special.rs | 41 --------- fighters/reflet/src/thunder/acmd.rs | 59 +++++++++++- fighters/reflet/src/thunder/acmd/special.rs | 54 ----------- .../src/breath/{acmd/specials.rs => acmd.rs} | 0 fighters/ridley/src/breath/acmd/mod.rs | 7 -- fighters/ridley/src/lib.rs | 4 +- .../src/beam/{acmd/specials.rs => acmd.rs} | 0 fighters/robot/src/beam/acmd/mod.rs | 7 -- .../airshooter/{acmd/aerials.rs => acmd.rs} | 0 fighters/rockman/src/airshooter/acmd/mod.rs | 7 -- .../{status/regular.rs => status.rs} | 0 fighters/rockman/src/airshooter/status/mod.rs | 7 -- .../chargeshot/{acmd/specials.rs => acmd.rs} | 0 fighters/rockman/src/chargeshot/acmd/mod.rs | 7 -- .../{status/regular.rs => status.rs} | 0 fighters/rockman/src/chargeshot/status/mod.rs | 7 -- .../hardknuckle/{acmd/aerials.rs => acmd.rs} | 0 fighters/rockman/src/hardknuckle/acmd/mod.rs | 7 -- .../leafshield/{acmd/specials.rs => acmd.rs} | 0 fighters/rockman/src/leafshield/acmd/mod.rs | 7 -- .../rockbuster/{acmd/specials.rs => acmd.rs} | 0 fighters/rockman/src/rockbuster/acmd/mod.rs | 7 -- fighters/ryu/src/acmd/other.rs | 88 ++---------------- fighters/ryu/src/lib.rs | 5 +- .../src/bullet/{acmd/aerials.rs => acmd.rs} | 0 fighters/shizue/src/bullet/acmd/mod.rs | 7 -- .../clayrocket/{acmd/specials.rs => acmd.rs} | 0 fighters/shizue/src/clayrocket/acmd/mod.rs | 7 -- .../clayrocket/{status/ready.rs => status.rs} | 0 fighters/shizue/src/clayrocket/status/mod.rs | 8 -- .../fishingrod/{acmd/specials.rs => acmd.rs} | 0 fighters/shizue/src/fishingrod/acmd/mod.rs | 7 -- .../trafficsign/{acmd/smashes.rs => acmd.rs} | 0 fighters/shizue/src/trafficsign/acmd/mod.rs | 7 -- fighters/shulk/src/acmd/other.rs | 88 ++---------------- fighters/shulk/src/lib.rs | 6 +- .../gimmickjump/{acmd/specials.rs => acmd.rs} | 0 fighters/sonic/src/gimmickjump/acmd/mod.rs | 7 -- fighters/tantan/src/acmd/other.rs | 90 ++---------------- fighters/tantan/src/lib.rs | 5 +- .../src/fire/{acmd/specials.rs => acmd.rs} | 0 fighters/trail/src/fire/acmd/mod.rs | 7 -- .../src/thunder/{acmd/specials.rs => acmd.rs} | 0 fighters/trail/src/thunder/acmd/mod.rs | 7 -- fighters/wario/src/acmd/other.rs | 90 ++---------------- fighters/wario/src/lib.rs | 3 +- .../sunbullet/{acmd/specials.rs => acmd.rs} | 0 fighters/wiifit/src/sunbullet/acmd/mod.rs | 7 -- .../{acmd/specials.rs => acmd.rs} | 0 fighters/wolf/src/blaster_bullet/acmd/mod.rs | 7 -- .../illusion/{acmd/specials.rs => acmd.rs} | 0 fighters/wolf/src/illusion/acmd/mod.rs | 7 -- .../src/tamago/{acmd/specials.rs => acmd.rs} | 0 fighters/yoshi/src/tamago/acmd/mod.rs | 7 -- .../src/dein/{acmd/specials.rs => acmd.rs} | 0 fighters/zelda/src/dein/acmd/mod.rs | 7 -- .../dein/{status/dein_move.rs => status.rs} | 0 fighters/zelda/src/dein/status/mod.rs | 7 -- .../src/dein_s/{acmd/specials.rs => acmd.rs} | 0 fighters/zelda/src/dein_s/acmd/mod.rs | 7 -- .../src/phantom/{acmd/specials.rs => acmd.rs} | 0 fighters/zelda/src/phantom/acmd/mod.rs | 7 -- .../phantom/{status/build.rs => status.rs} | 0 fighters/zelda/src/phantom/status/mod.rs | 7 -- 140 files changed, 554 insertions(+), 1806 deletions(-) rename fighters/iceclimber/src/blizzard/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/iceclimber/src/blizzard/acmd/mod.rs rename fighters/kamui/src/dragonhand/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/kamui/src/dragonhand/acmd/mod.rs rename fighters/kamui/src/ryusensya/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/kamui/src/ryusensya/acmd/mod.rs rename fighters/kamui/src/spearhand/{acmd/specials.rs => acmd.rs} (87%) delete mode 100644 fighters/kamui/src/spearhand/acmd/mod.rs delete mode 100644 fighters/kamui/src/spearhand/acmd/smashes.rs rename fighters/kamui/src/waterdragon/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/kamui/src/waterdragon/acmd/mod.rs rename fighters/krool/src/backpack/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/krool/src/backpack/acmd/mod.rs rename fighters/krool/src/ironball/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/krool/src/ironball/acmd/mod.rs rename fighters/mario/src/fireball/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/mario/src/fireball/acmd/mod.rs rename fighters/mario/src/pump/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/mario/src/pump/acmd/mod.rs rename fighters/mario/src/pumpwater/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/mario/src/pumpwater/acmd/mod.rs rename fighters/mariod/src/drcapsule/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/mariod/src/drcapsule/acmd/mod.rs delete mode 100644 fighters/mewtwo/src/bindball/acmd/special.rs delete mode 100644 fighters/miiswordsman/src/chakram/acmd/special.rs delete mode 100644 fighters/miiswordsman/src/lightshuriken/acmd/special.rs delete mode 100644 fighters/miiswordsman/src/tornado/acmd/special.rs rename fighters/pichu/src/dengekidama/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/pichu/src/dengekidama/acmd/mod.rs rename fighters/pichu/src/kaminari/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/pichu/src/kaminari/acmd/mod.rs rename fighters/pickel/src/fire/{acmd/tilts.rs => acmd.rs} (100%) delete mode 100644 fighters/pickel/src/fire/acmd/mod.rs rename fighters/pickel/src/forge/{acmd/aerials.rs => acmd.rs} (100%) delete mode 100644 fighters/pickel/src/forge/acmd/mod.rs rename fighters/pickel/src/melt/{acmd/other.rs => acmd.rs} (100%) delete mode 100644 fighters/pickel/src/melt/acmd/mod.rs rename fighters/pickel/src/trolley/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/pickel/src/trolley/acmd/mod.rs rename fighters/pikachu/src/kaminari/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/pikachu/src/kaminari/acmd/mod.rs delete mode 100644 fighters/pit/src/arrow/acmd/special.rs delete mode 100644 fighters/reflet/src/elwind/acmd/special.rs delete mode 100644 fighters/reflet/src/gigafire/acmd/special.rs delete mode 100644 fighters/reflet/src/thunder/acmd/special.rs rename fighters/ridley/src/breath/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/ridley/src/breath/acmd/mod.rs rename fighters/robot/src/beam/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/robot/src/beam/acmd/mod.rs rename fighters/rockman/src/airshooter/{acmd/aerials.rs => acmd.rs} (100%) delete mode 100644 fighters/rockman/src/airshooter/acmd/mod.rs rename fighters/rockman/src/airshooter/{status/regular.rs => status.rs} (100%) delete mode 100644 fighters/rockman/src/airshooter/status/mod.rs rename fighters/rockman/src/chargeshot/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/rockman/src/chargeshot/acmd/mod.rs rename fighters/rockman/src/chargeshot/{status/regular.rs => status.rs} (100%) delete mode 100644 fighters/rockman/src/chargeshot/status/mod.rs rename fighters/rockman/src/hardknuckle/{acmd/aerials.rs => acmd.rs} (100%) delete mode 100644 fighters/rockman/src/hardknuckle/acmd/mod.rs rename fighters/rockman/src/leafshield/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/rockman/src/leafshield/acmd/mod.rs rename fighters/rockman/src/rockbuster/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/rockman/src/rockbuster/acmd/mod.rs rename fighters/shizue/src/bullet/{acmd/aerials.rs => acmd.rs} (100%) delete mode 100644 fighters/shizue/src/bullet/acmd/mod.rs rename fighters/shizue/src/clayrocket/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/shizue/src/clayrocket/acmd/mod.rs rename fighters/shizue/src/clayrocket/{status/ready.rs => status.rs} (100%) delete mode 100644 fighters/shizue/src/clayrocket/status/mod.rs rename fighters/shizue/src/fishingrod/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/shizue/src/fishingrod/acmd/mod.rs rename fighters/shizue/src/trafficsign/{acmd/smashes.rs => acmd.rs} (100%) delete mode 100644 fighters/shizue/src/trafficsign/acmd/mod.rs rename fighters/sonic/src/gimmickjump/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/sonic/src/gimmickjump/acmd/mod.rs rename fighters/trail/src/fire/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/trail/src/fire/acmd/mod.rs rename fighters/trail/src/thunder/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/trail/src/thunder/acmd/mod.rs rename fighters/wiifit/src/sunbullet/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/wiifit/src/sunbullet/acmd/mod.rs rename fighters/wolf/src/blaster_bullet/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/wolf/src/blaster_bullet/acmd/mod.rs rename fighters/wolf/src/illusion/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/wolf/src/illusion/acmd/mod.rs rename fighters/yoshi/src/tamago/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/yoshi/src/tamago/acmd/mod.rs rename fighters/zelda/src/dein/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/zelda/src/dein/acmd/mod.rs rename fighters/zelda/src/dein/{status/dein_move.rs => status.rs} (100%) delete mode 100644 fighters/zelda/src/dein/status/mod.rs rename fighters/zelda/src/dein_s/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/zelda/src/dein_s/acmd/mod.rs rename fighters/zelda/src/phantom/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/zelda/src/phantom/acmd/mod.rs rename fighters/zelda/src/phantom/{status/build.rs => status.rs} (100%) delete mode 100644 fighters/zelda/src/phantom/status/mod.rs diff --git a/fighters/diddy/src/lib.rs b/fighters/diddy/src/lib.rs index 207df3548b..769b0d5e6e 100644 --- a/fighters/diddy/src/lib.rs +++ b/fighters/diddy/src/lib.rs @@ -42,7 +42,7 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("diddy"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/iceclimber/src/blizzard/acmd/specials.rs b/fighters/iceclimber/src/blizzard/acmd.rs similarity index 100% rename from fighters/iceclimber/src/blizzard/acmd/specials.rs rename to fighters/iceclimber/src/blizzard/acmd.rs diff --git a/fighters/iceclimber/src/blizzard/acmd/mod.rs b/fighters/iceclimber/src/blizzard/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/iceclimber/src/blizzard/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/kamui/src/dragonhand/acmd/specials.rs b/fighters/kamui/src/dragonhand/acmd.rs similarity index 100% rename from fighters/kamui/src/dragonhand/acmd/specials.rs rename to fighters/kamui/src/dragonhand/acmd.rs diff --git a/fighters/kamui/src/dragonhand/acmd/mod.rs b/fighters/kamui/src/dragonhand/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/kamui/src/dragonhand/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/kamui/src/ryusensya/acmd/specials.rs b/fighters/kamui/src/ryusensya/acmd.rs similarity index 100% rename from fighters/kamui/src/ryusensya/acmd/specials.rs rename to fighters/kamui/src/ryusensya/acmd.rs diff --git a/fighters/kamui/src/ryusensya/acmd/mod.rs b/fighters/kamui/src/ryusensya/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/kamui/src/ryusensya/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/kamui/src/spearhand/acmd/specials.rs b/fighters/kamui/src/spearhand/acmd.rs similarity index 87% rename from fighters/kamui/src/spearhand/acmd/specials.rs rename to fighters/kamui/src/spearhand/acmd.rs index a9f959f94a..89b7096541 100644 --- a/fighters/kamui/src/spearhand/acmd/specials.rs +++ b/fighters/kamui/src/spearhand/acmd.rs @@ -1,6 +1,21 @@ use super::*; -unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 35.0); + FT_MOTION_RATE(agent, 1.2); +} + +nsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -79,6 +94,8 @@ unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_specialsattack", game_specialsattack); agent.acmd("game_specialairsattack", game_specialairsattack); } diff --git a/fighters/kamui/src/spearhand/acmd/mod.rs b/fighters/kamui/src/spearhand/acmd/mod.rs deleted file mode 100644 index 3c7129c773..0000000000 --- a/fighters/kamui/src/spearhand/acmd/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -use super::*; - -mod smashes; -mod specials; - -pub fn install(agent: &mut Agent) { - smashes::install(agent); - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/kamui/src/spearhand/acmd/smashes.rs b/fighters/kamui/src/spearhand/acmd/smashes.rs deleted file mode 100644 index 655965d188..0000000000 --- a/fighters/kamui/src/spearhand/acmd/smashes.rs +++ /dev/null @@ -1,20 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE(agent, 0.8); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("drag1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - } - frame(lua_state, 27.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 35.0); - FT_MOTION_RATE(agent, 1.2); -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attacks4); -} diff --git a/fighters/kamui/src/waterdragon/acmd/specials.rs b/fighters/kamui/src/waterdragon/acmd.rs similarity index 100% rename from fighters/kamui/src/waterdragon/acmd/specials.rs rename to fighters/kamui/src/waterdragon/acmd.rs diff --git a/fighters/kamui/src/waterdragon/acmd/mod.rs b/fighters/kamui/src/waterdragon/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/kamui/src/waterdragon/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/ken/src/lib.rs b/fighters/ken/src/lib.rs index 901b965e3a..624d9624c4 100644 --- a/fighters/ken/src/lib.rs +++ b/fighters/ken/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +//articles mod hadoken; mod shinryuken; @@ -40,7 +42,7 @@ use utils::{ consts::*, }; use smashline::*; - +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("ken"); diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 53ca89f3a7..ad3abf34f5 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -195,15 +120,18 @@ unsafe extern "C" fn effect_landingheavy(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_landingheavy", game_landingheavy); agent.acmd("effect_landingheavy", effect_landingheavy); } diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index 2dd9d0ad6a..96c35f5d64 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -37,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub const KOOPA_MAX_COOLDOWN : i32 = 900; pub const LUCAS_CHARGE_TIME : i32 = 120; @@ -44,7 +45,7 @@ pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { let agent = &mut Agent::new("kirby"); acmd::install(agent); - status::install(agent); opff::install(); + status::install(agent); agent.install(); } diff --git a/fighters/krool/src/backpack/acmd/specials.rs b/fighters/krool/src/backpack/acmd.rs similarity index 100% rename from fighters/krool/src/backpack/acmd/specials.rs rename to fighters/krool/src/backpack/acmd.rs diff --git a/fighters/krool/src/backpack/acmd/mod.rs b/fighters/krool/src/backpack/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/krool/src/backpack/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/krool/src/ironball/acmd/specials.rs b/fighters/krool/src/ironball/acmd.rs similarity index 100% rename from fighters/krool/src/ironball/acmd/specials.rs rename to fighters/krool/src/ironball/acmd.rs diff --git a/fighters/krool/src/ironball/acmd/mod.rs b/fighters/krool/src/ironball/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/krool/src/ironball/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/krool/src/lib.rs b/fighters/krool/src/lib.rs index 04c94d0a0a..c02ac04ea8 100644 --- a/fighters/krool/src/lib.rs +++ b/fighters/krool/src/lib.rs @@ -2,6 +2,19 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod opff; +pub mod status; + +// articles + +mod backpack; +mod ironball; + +pub mod vtable_hook; +pub use status::krool_belly_damage_hook_impl; + use smash::{ lib::{ L2CValue, @@ -31,23 +44,14 @@ use utils::{ ext::*, consts::*, }; - use smashline::*; -pub mod acmd; -pub mod status; -pub mod opff; -pub mod vtable_hook; -pub use status::krool_belly_damage_hook_impl; - -// articles -mod backpack; -mod ironball; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("krool"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); backpack::install(); diff --git a/fighters/mario/src/fireball/acmd/specials.rs b/fighters/mario/src/fireball/acmd.rs similarity index 100% rename from fighters/mario/src/fireball/acmd/specials.rs rename to fighters/mario/src/fireball/acmd.rs diff --git a/fighters/mario/src/fireball/acmd/mod.rs b/fighters/mario/src/fireball/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/mario/src/fireball/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/mario/src/lib.rs b/fighters/mario/src/lib.rs index ef4c84ba16..05ca7e37d8 100644 --- a/fighters/mario/src/lib.rs +++ b/fighters/mario/src/lib.rs @@ -8,6 +8,7 @@ pub mod opff; pub mod status; // articles + mod fireball; mod pump; mod pumpwater; diff --git a/fighters/mario/src/pump/acmd/specials.rs b/fighters/mario/src/pump/acmd.rs similarity index 100% rename from fighters/mario/src/pump/acmd/specials.rs rename to fighters/mario/src/pump/acmd.rs diff --git a/fighters/mario/src/pump/acmd/mod.rs b/fighters/mario/src/pump/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/mario/src/pump/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd/specials.rs b/fighters/mario/src/pumpwater/acmd.rs similarity index 100% rename from fighters/mario/src/pumpwater/acmd/specials.rs rename to fighters/mario/src/pumpwater/acmd.rs diff --git a/fighters/mario/src/pumpwater/acmd/mod.rs b/fighters/mario/src/pumpwater/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/mario/src/pumpwater/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/mariod/src/drcapsule/acmd/specials.rs b/fighters/mariod/src/drcapsule/acmd.rs similarity index 100% rename from fighters/mariod/src/drcapsule/acmd/specials.rs rename to fighters/mariod/src/drcapsule/acmd.rs diff --git a/fighters/mariod/src/drcapsule/acmd/mod.rs b/fighters/mariod/src/drcapsule/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/mariod/src/drcapsule/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/mariod/src/lib.rs b/fighters/mariod/src/lib.rs index f97869960e..212a87e277 100644 --- a/fighters/mariod/src/lib.rs +++ b/fighters/mariod/src/lib.rs @@ -8,6 +8,7 @@ pub mod status; pub mod opff; // articles + mod drcapsule; use smash::{ @@ -40,12 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("mariod"); acmd::install(agent); opff::install(agent); status::install(agent); + agent.install(); drcapsule::install(); } diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index 3dd6546cf2..bfe376d2c0 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -188,14 +112,16 @@ unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/metaknight/src/lib.rs b/fighters/metaknight/src/lib.rs index 186272bdb3..42b4f95c4c 100644 --- a/fighters/metaknight/src/lib.rs +++ b/fighters/metaknight/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,11 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("metaknight"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/other.rs b/fighters/mewtwo/src/acmd/other.rs index a63bb17bc4..25ab0e1196 100644 --- a/fighters/mewtwo/src/acmd/other.rs +++ b/fighters/mewtwo/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -196,14 +120,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/mewtwo/src/bindball/acmd.rs b/fighters/mewtwo/src/bindball/acmd.rs index 0f1919d170..05cd2f29e0 100644 --- a/fighters/mewtwo/src/bindball/acmd.rs +++ b/fighters/mewtwo/src/bindball/acmd.rs @@ -1,7 +1,14 @@ use super::*; -mod special; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_shoot", game_shoot); +} diff --git a/fighters/mewtwo/src/bindball/acmd/special.rs b/fighters/mewtwo/src/bindball/acmd/special.rs deleted file mode 100644 index 3fb90fe50f..0000000000 --- a/fighters/mewtwo/src/bindball/acmd/special.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::*; -unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 30, 80, 0, 50, 3.0, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 140, 0, 0, 2.3, 0.0, -1.7, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_FEB, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bind_extra"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); - } -} -pub fn install(agent: &mut Agent) { - agent.acmd("game_shoot", game_shoot); -} diff --git a/fighters/mewtwo/src/lib.rs b/fighters/mewtwo/src/lib.rs index cc57c21860..669a1f70e9 100644 --- a/fighters/mewtwo/src/lib.rs +++ b/fighters/mewtwo/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod bindball; use smash::{ lib::{ @@ -37,11 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("mewtwo"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); + + bindball::install(); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index 8c429b2cfb..c216d0b1fc 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -180,14 +104,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miifighter/src/lib.rs b/fighters/miifighter/src/lib.rs index 258293c288..ebad4e4192 100644 --- a/fighters/miifighter/src/lib.rs +++ b/fighters/miifighter/src/lib.rs @@ -6,8 +6,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -39,12 +39,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("miifighter"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); - } \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/acmd.rs b/fighters/miiswordsman/src/chakram/acmd.rs index 0f1919d170..59a45540cc 100644 --- a/fighters/miiswordsman/src/chakram/acmd.rs +++ b/fighters/miiswordsman/src/chakram/acmd.rs @@ -1,7 +1,90 @@ use super::*; -mod special; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + // Tap Input + if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); + AttackModule::enable_safe_pos(boma); + } + } + // Hold Input + else{ + if is_excute(agent) { + VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + } +} + +unsafe extern "C" fn game_flynormalsub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn game_flyflicksub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +unsafe extern "C" fn miiswordsman_chakram_hop_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + } +} + +unsafe extern "C" fn game_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } +} + +unsafe extern "C" fn effect_stick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 142.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_fly", game_fly); + agent.acmd("game_flynormalsub", game_flynormalsub); + agent.acmd("game_flyflicksub", game_flyflicksub); + //.acmd("game_hop", miiswordsman_chakram_hop_game); + agent.acmd("game_stick", game_stick); + agent.acmd("effect_stick", effect_stick); +} diff --git a/fighters/miiswordsman/src/chakram/acmd/special.rs b/fighters/miiswordsman/src/chakram/acmd/special.rs deleted file mode 100644 index dd336fbc30..0000000000 --- a/fighters/miiswordsman/src/chakram/acmd/special.rs +++ /dev/null @@ -1,88 +0,0 @@ -use super::*; -unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - // Tap Input - if !WorkModule::is_flag(boma, *WEAPON_MIISWORDSMAN_CHAKRAM_INSTANCE_WORK_ID_FLAG_FLICK){ - if is_excute(agent) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -3.0, false); - AttackModule::enable_safe_pos(boma); - } - } - // Hold Input - else{ - if is_excute(agent) { - VarModule::on_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - } -} -unsafe extern "C" fn game_flynormalsub(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 365, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 37.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 40, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, -0.5, 0.0, 8, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, -2.0, false); - AttackModule::enable_safe_pos(boma); - } -} -unsafe extern "C" fn game_flyflicksub(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} -unsafe extern "C" fn miiswordsman_chakram_hop_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - } -} - -unsafe extern "C" fn game_stick(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - SEARCH(agent, 0, 0, Hash40::new("top"), 4.0, 0.0, 0.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - -} - -unsafe extern "C" fn effect_stick(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 142.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 1, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_fly", game_fly); - agent.acmd("game_flynormalsub", game_flynormalsub); - agent.acmd("game_flyflicksub", game_flyflicksub); - //.acmd("game_hop", miiswordsman_chakram_hop_game); - agent.acmd("game_stick", game_stick); - agent.acmd("effect_stick", effect_stick); -} diff --git a/fighters/miiswordsman/src/lib.rs b/fighters/miiswordsman/src/lib.rs index a6cf78f815..b1c09844f9 100644 --- a/fighters/miiswordsman/src/lib.rs +++ b/fighters/miiswordsman/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod chakram; +mod lightshuriken; +mod tornado; use smash::{ lib::{ @@ -42,7 +48,11 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("miiswordsman"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); + + chakram::install(); + lightshuriken::install(); + tornado::install(); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/lightshuriken/acmd.rs b/fighters/miiswordsman/src/lightshuriken/acmd.rs index 0f1919d170..a6e0900d21 100644 --- a/fighters/miiswordsman/src/lightshuriken/acmd.rs +++ b/fighters/miiswordsman/src/lightshuriken/acmd.rs @@ -1,7 +1,92 @@ use super::*; -mod special; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } +} + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let mut lead_wave : u32 = std::u32::MAX; + let mut wave_2 : u32 = std::u32::MAX; + let mut wave_3 : u32 = std::u32::MAX; + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); + lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, lead_wave, 0.7); + + wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_2, 0.7); + EffectModule::set_alpha(boma, wave_2, 0.4); + //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + wait(lua_state, 4.0); + if is_excute(agent) { + EffectModule::set_rate(boma, lead_wave, 0.000001); + EffectModule::set_rate(boma, wave_2, 0.000001); + EffectModule::set_alpha(boma, wave_2, 0.4); + wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; + EffectModule::set_rate(boma, wave_3, 0.7); + EffectModule::set_alpha(boma, wave_3, 0.4); + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + wait(lua_state, 4.0); + if is_excute(agent) { + EffectModule::set_rate(boma, wave_3, 0.000001); + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + for _ in 0..i32::MAX { + wait(lua_state, 4.0); + if is_excute(agent) { + if GroundModule::ray_check( + agent.module_accessor, + &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + &Vector2f{ x: 0.0, y: -7.0}, true + ) == 1 { + FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.3); + FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + } + } + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_fly", game_fly); + agent.acmd("effect_fly", effect_fly); +} diff --git a/fighters/miiswordsman/src/lightshuriken/acmd/special.rs b/fighters/miiswordsman/src/lightshuriken/acmd/special.rs deleted file mode 100644 index a53b648752..0000000000 --- a/fighters/miiswordsman/src/lightshuriken/acmd/special.rs +++ /dev/null @@ -1,90 +0,0 @@ -use super::*; -unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); -} -frame(lua_state, 18.0); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); -} -} -unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { -let lua_state = agent.lua_state_agent; -let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); -let mut lead_wave : u32 = std::u32::MAX; -let mut wave_2 : u32 = std::u32::MAX; -let mut wave_3 : u32 = std::u32::MAX; -if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); - lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, lead_wave, 0.7); - - wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_2, 0.7); - EffectModule::set_alpha(boma, wave_2, 0.4); - //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } -} -wait(lua_state, 4.0); -if is_excute(agent) { - EffectModule::set_rate(boma, lead_wave, 0.000001); - EffectModule::set_rate(boma, wave_2, 0.000001); - EffectModule::set_alpha(boma, wave_2, 0.4); - wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_3, 0.7); - EffectModule::set_alpha(boma, wave_3, 0.4); - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } -} -wait(lua_state, 4.0); -if is_excute(agent) { - EffectModule::set_rate(boma, wave_3, 0.000001); - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } -} -for _ in 0..i32::MAX { - wait(lua_state, 4.0); - if is_excute(agent) { - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } -} -} - -pub fn install(agent: &mut Agent) { -agent.acmd("game_fly", game_fly); -agent.acmd("effect_fly", effect_fly); -} diff --git a/fighters/miiswordsman/src/tornado/acmd.rs b/fighters/miiswordsman/src/tornado/acmd.rs index 0f1919d170..f31adc0499 100644 --- a/fighters/miiswordsman/src/tornado/acmd.rs +++ b/fighters/miiswordsman/src/tornado/acmd.rs @@ -1,7 +1,20 @@ use super::*; -mod special; +unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_fly", miiswordsman_tornadoshot_fly_game); +} diff --git a/fighters/miiswordsman/src/tornado/acmd/special.rs b/fighters/miiswordsman/src/tornado/acmd/special.rs deleted file mode 100644 index 97a3bb4cbd..0000000000 --- a/fighters/miiswordsman/src/tornado/acmd/special.rs +++ /dev/null @@ -1,20 +0,0 @@ -use super::*; -unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 65, 23, 0, 53, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 18.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 68, 61, 0, 48, 3.3, 0.0, 5.7, 2.6, Some(0.0), Some(2.8), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -6.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); - } - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_fly", miiswordsman_tornadoshot_fly_game); -} diff --git a/fighters/miiswordsman/src/tornado/mod.rs b/fighters/miiswordsman/src/tornado/mod.rs index d834d6b0b1..6cab71f019 100644 --- a/fighters/miiswordsman/src/tornado/mod.rs +++ b/fighters/miiswordsman/src/tornado/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("miiswordfighter_tornado"); + let agent = &mut Agent::new("miiswordsman_tornado"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/peach/src/acmd/other.rs b/fighters/peach/src/acmd/other.rs index 0971d46cfe..79d2e229e5 100644 --- a/fighters/peach/src/acmd/other.rs +++ b/fighters/peach/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -169,13 +94,15 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/peach/src/lib.rs b/fighters/peach/src/lib.rs index 214e10123b..05110672e1 100644 --- a/fighters/peach/src/lib.rs +++ b/fighters/peach/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,11 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("peach"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/pfushigisou/src/acmd/other.rs b/fighters/pfushigisou/src/acmd/other.rs index ed6d259450..924750837f 100644 --- a/fighters/pfushigisou/src/acmd/other.rs +++ b/fighters/pfushigisou/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -193,14 +117,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pfushigisou/src/lib.rs b/fighters/pfushigisou/src/lib.rs index e9c09d37c3..fc1e6fdc4c 100644 --- a/fighters/pfushigisou/src/lib.rs +++ b/fighters/pfushigisou/src/lib.rs @@ -3,10 +3,9 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; -//pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -38,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("pfushigisou"); diff --git a/fighters/pichu/src/dengekidama/acmd/specials.rs b/fighters/pichu/src/dengekidama/acmd.rs similarity index 100% rename from fighters/pichu/src/dengekidama/acmd/specials.rs rename to fighters/pichu/src/dengekidama/acmd.rs diff --git a/fighters/pichu/src/dengekidama/acmd/mod.rs b/fighters/pichu/src/dengekidama/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/pichu/src/dengekidama/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/pichu/src/kaminari/acmd/specials.rs b/fighters/pichu/src/kaminari/acmd.rs similarity index 100% rename from fighters/pichu/src/kaminari/acmd/specials.rs rename to fighters/pichu/src/kaminari/acmd.rs diff --git a/fighters/pichu/src/kaminari/acmd/mod.rs b/fighters/pichu/src/kaminari/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/pichu/src/kaminari/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/pickel/src/fire/acmd/tilts.rs b/fighters/pickel/src/fire/acmd.rs similarity index 100% rename from fighters/pickel/src/fire/acmd/tilts.rs rename to fighters/pickel/src/fire/acmd.rs diff --git a/fighters/pickel/src/fire/acmd/mod.rs b/fighters/pickel/src/fire/acmd/mod.rs deleted file mode 100644 index 23a35f5715..0000000000 --- a/fighters/pickel/src/fire/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod tilts; - -pub fn install(agent: &mut Agent) { - tilts::install(agent); -} \ No newline at end of file diff --git a/fighters/pickel/src/forge/acmd/aerials.rs b/fighters/pickel/src/forge/acmd.rs similarity index 100% rename from fighters/pickel/src/forge/acmd/aerials.rs rename to fighters/pickel/src/forge/acmd.rs diff --git a/fighters/pickel/src/forge/acmd/mod.rs b/fighters/pickel/src/forge/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/pickel/src/forge/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/pickel/src/melt/acmd/other.rs b/fighters/pickel/src/melt/acmd.rs similarity index 100% rename from fighters/pickel/src/melt/acmd/other.rs rename to fighters/pickel/src/melt/acmd.rs diff --git a/fighters/pickel/src/melt/acmd/mod.rs b/fighters/pickel/src/melt/acmd/mod.rs deleted file mode 100644 index 10d82b25ce..0000000000 --- a/fighters/pickel/src/melt/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod other; - -pub fn install(agent: &mut Agent) { - other::install(agent); -} \ No newline at end of file diff --git a/fighters/pickel/src/trolley/acmd/specials.rs b/fighters/pickel/src/trolley/acmd.rs similarity index 100% rename from fighters/pickel/src/trolley/acmd/specials.rs rename to fighters/pickel/src/trolley/acmd.rs diff --git a/fighters/pickel/src/trolley/acmd/mod.rs b/fighters/pickel/src/trolley/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/pickel/src/trolley/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/pikachu/src/kaminari/acmd/specials.rs b/fighters/pikachu/src/kaminari/acmd.rs similarity index 100% rename from fighters/pikachu/src/kaminari/acmd/specials.rs rename to fighters/pikachu/src/kaminari/acmd.rs diff --git a/fighters/pikachu/src/kaminari/acmd/mod.rs b/fighters/pikachu/src/kaminari/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/pikachu/src/kaminari/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/pit/src/arrow/acmd.rs b/fighters/pit/src/arrow/acmd.rs index 0f1919d170..5b7da90fc9 100644 --- a/fighters/pit/src/arrow/acmd.rs +++ b/fighters/pit/src/arrow/acmd.rs @@ -1,7 +1,22 @@ use super::*; -mod special; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/pit/src/arrow/acmd/special.rs b/fighters/pit/src/arrow/acmd/special.rs deleted file mode 100644 index 3f61b72c4d..0000000000 --- a/fighters/pit/src/arrow/acmd/special.rs +++ /dev/null @@ -1,22 +0,0 @@ -use super::*; -unsafe extern "C" fn pit_bowarrow_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 80, 125, 0, 10, 2.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 125, 0, 10, 2.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 125, 0, 10, 1.5, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PALUTENA); - } - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_fly", pit_bowarrow_fly_game); -} diff --git a/fighters/pit/src/lib.rs b/fighters/pit/src/lib.rs index 8d0278ba63..b671cd5bbc 100644 --- a/fighters/pit/src/lib.rs +++ b/fighters/pit/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod arrow; use smash::{ lib::{ @@ -41,7 +45,9 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("pit"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); + + arrow::install(); } diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index 08fd699345..075288c792 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -239,16 +164,19 @@ unsafe extern "C" fn effect_appealsr(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_appealsl", effect_appealsl); agent.acmd("effect_appealsr", effect_appealsr); } diff --git a/fighters/pitb/src/lib.rs b/fighters/pitb/src/lib.rs index 7555d7fb29..7147efa1fa 100644 --- a/fighters/pitb/src/lib.rs +++ b/fighters/pitb/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,11 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("pitb"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/plizardon/src/acmd/other.rs b/fighters/plizardon/src/acmd/other.rs index 9cadc5647c..185ac23637 100644 --- a/fighters/plizardon/src/acmd/other.rs +++ b/fighters/plizardon/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -234,17 +158,21 @@ unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_appeallwr", game_appeallwr); agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("expression_landingheavy", expression_landingheavy); } diff --git a/fighters/plizardon/src/lib.rs b/fighters/plizardon/src/lib.rs index 0f8d287bb3..0fda77a706 100644 --- a/fighters/plizardon/src/lib.rs +++ b/fighters/plizardon/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,11 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("plizardon"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/pzenigame/src/acmd/other.rs b/fighters/pzenigame/src/acmd/other.rs index e9dcb61fe7..48da1c1fcc 100644 --- a/fighters/pzenigame/src/acmd/other.rs +++ b/fighters/pzenigame/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02"));} - } -} - unsafe extern "C" fn effect_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -241,18 +165,21 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("effect_dash", effect_dash); agent.acmd("sound_dash", sound_dash); + agent.acmd("effect_runbrake", effect_runbrake); agent.acmd("effect_runbrakel", effect_runbrakel); agent.acmd("effect_runbraker", effect_runbraker); agent.acmd("effect_turnrun", effect_turnrun); agent.acmd("effect_turnrunbrake", effect_turnrunbrake); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pzenigame/src/lib.rs b/fighters/pzenigame/src/lib.rs index 68790d9a57..77f22346b1 100644 --- a/fighters/pzenigame/src/lib.rs +++ b/fighters/pzenigame/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -41,7 +41,7 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("pzenigame"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/reflet/src/elwind/acmd.rs b/fighters/reflet/src/elwind/acmd.rs index 0f1919d170..32a1e2a58a 100644 --- a/fighters/reflet/src/elwind/acmd.rs +++ b/fighters/reflet/src/elwind/acmd.rs @@ -1,7 +1,32 @@ use super::*; -mod special; +unsafe extern "C" fn game_shoot0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_shoot0", game_shoot0); + agent.acmd("game_landing", game_landing); +} diff --git a/fighters/reflet/src/elwind/acmd/special.rs b/fighters/reflet/src/elwind/acmd/special.rs deleted file mode 100644 index 35e2ecae77..0000000000 --- a/fighters/reflet/src/elwind/acmd/special.rs +++ /dev/null @@ -1,30 +0,0 @@ -use super::*; -unsafe extern "C" fn game_shoot0(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} -unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_shoot0", game_shoot0); - agent.acmd("game_landing", game_landing); -} diff --git a/fighters/reflet/src/gigafire/acmd.rs b/fighters/reflet/src/gigafire/acmd.rs index 0f1919d170..1c0be1d233 100644 --- a/fighters/reflet/src/gigafire/acmd.rs +++ b/fighters/reflet/src/gigafire/acmd.rs @@ -1,7 +1,46 @@ use super::*; -mod special; +unsafe extern "C" fn game_burn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_rise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn effect_rise(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.45); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_burn", game_burn); + + agent.acmd("game_rise", game_rise); + agent.acmd("effect_rise", effect_rise); +} diff --git a/fighters/reflet/src/gigafire/acmd/special.rs b/fighters/reflet/src/gigafire/acmd/special.rs deleted file mode 100644 index 5dc5f3fa27..0000000000 --- a/fighters/reflet/src/gigafire/acmd/special.rs +++ /dev/null @@ -1,41 +0,0 @@ -use super::*; -unsafe extern "C" fn game_burn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} -unsafe extern "C" fn game_rise(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} -unsafe extern "C" fn effect_rise(agent: &mut L2CAgentBase) { - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(agent, 1.45); - } -} -pub fn install(agent: &mut Agent) { - agent.acmd("game_burn", game_burn); - agent.acmd("game_rise", game_rise); - agent.acmd("effect_rise", effect_rise); -} diff --git a/fighters/reflet/src/thunder/acmd.rs b/fighters/reflet/src/thunder/acmd.rs index 0f1919d170..986385c9ad 100644 --- a/fighters/reflet/src/thunder/acmd.rs +++ b/fighters/reflet/src/thunder/acmd.rs @@ -1,7 +1,60 @@ use super::*; -mod special; +unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 25.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_tron0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); + //let damage = (1 + (charge-1)*9/14) as f32; + let damage = 1.5 + (charge/2) as f32; + if is_excute(agent) { + if charge > 0 && charge <= 8 { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); + } +} pub fn install(agent: &mut Agent) { - special::install(agent); -} \ No newline at end of file + agent.acmd("game_shoot2", game_shoot2); + + agent.acmd("game_gigaspark", game_gigaspark); + + agent.acmd("game_tron0", game_tron0); +} diff --git a/fighters/reflet/src/thunder/acmd/special.rs b/fighters/reflet/src/thunder/acmd/special.rs deleted file mode 100644 index 04f7a25a61..0000000000 --- a/fighters/reflet/src/thunder/acmd/special.rs +++ /dev/null @@ -1,54 +0,0 @@ -use super::*; -unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} -unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 24.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 25.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} -unsafe extern "C" fn game_tron0(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); - //let damage = (1 + (charge-1)*9/14) as f32; - let damage = 1.5 + (charge/2) as f32; - if is_excute(agent) { - if charge > 0 && charge <= 8 { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); - } -} -pub fn install(agent: &mut Agent) { - agent.acmd("game_shoot2", game_shoot2); - agent.acmd("game_gigaspark", game_gigaspark); - agent.acmd("game_tron0", game_tron0); -} diff --git a/fighters/ridley/src/breath/acmd/specials.rs b/fighters/ridley/src/breath/acmd.rs similarity index 100% rename from fighters/ridley/src/breath/acmd/specials.rs rename to fighters/ridley/src/breath/acmd.rs diff --git a/fighters/ridley/src/breath/acmd/mod.rs b/fighters/ridley/src/breath/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/ridley/src/breath/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/ridley/src/lib.rs b/fighters/ridley/src/lib.rs index 70baf799a0..37ecf3c486 100644 --- a/fighters/ridley/src/lib.rs +++ b/fighters/ridley/src/lib.rs @@ -4,10 +4,11 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles + mod breath; use smash::{ @@ -40,6 +41,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("ridley"); diff --git a/fighters/robot/src/beam/acmd/specials.rs b/fighters/robot/src/beam/acmd.rs similarity index 100% rename from fighters/robot/src/beam/acmd/specials.rs rename to fighters/robot/src/beam/acmd.rs diff --git a/fighters/robot/src/beam/acmd/mod.rs b/fighters/robot/src/beam/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/robot/src/beam/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/airshooter/acmd/aerials.rs b/fighters/rockman/src/airshooter/acmd.rs similarity index 100% rename from fighters/rockman/src/airshooter/acmd/aerials.rs rename to fighters/rockman/src/airshooter/acmd.rs diff --git a/fighters/rockman/src/airshooter/acmd/mod.rs b/fighters/rockman/src/airshooter/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/rockman/src/airshooter/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/airshooter/status/regular.rs b/fighters/rockman/src/airshooter/status.rs similarity index 100% rename from fighters/rockman/src/airshooter/status/regular.rs rename to fighters/rockman/src/airshooter/status.rs diff --git a/fighters/rockman/src/airshooter/status/mod.rs b/fighters/rockman/src/airshooter/status/mod.rs deleted file mode 100644 index ed205154ce..0000000000 --- a/fighters/rockman/src/airshooter/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod regular; - -pub fn install(agent: &mut Agent) { - regular::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/chargeshot/acmd/specials.rs b/fighters/rockman/src/chargeshot/acmd.rs similarity index 100% rename from fighters/rockman/src/chargeshot/acmd/specials.rs rename to fighters/rockman/src/chargeshot/acmd.rs diff --git a/fighters/rockman/src/chargeshot/acmd/mod.rs b/fighters/rockman/src/chargeshot/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/chargeshot/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/chargeshot/status/regular.rs b/fighters/rockman/src/chargeshot/status.rs similarity index 100% rename from fighters/rockman/src/chargeshot/status/regular.rs rename to fighters/rockman/src/chargeshot/status.rs diff --git a/fighters/rockman/src/chargeshot/status/mod.rs b/fighters/rockman/src/chargeshot/status/mod.rs deleted file mode 100644 index ed205154ce..0000000000 --- a/fighters/rockman/src/chargeshot/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod regular; - -pub fn install(agent: &mut Agent) { - regular::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/hardknuckle/acmd/aerials.rs b/fighters/rockman/src/hardknuckle/acmd.rs similarity index 100% rename from fighters/rockman/src/hardknuckle/acmd/aerials.rs rename to fighters/rockman/src/hardknuckle/acmd.rs diff --git a/fighters/rockman/src/hardknuckle/acmd/mod.rs b/fighters/rockman/src/hardknuckle/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/rockman/src/hardknuckle/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/leafshield/acmd/specials.rs b/fighters/rockman/src/leafshield/acmd.rs similarity index 100% rename from fighters/rockman/src/leafshield/acmd/specials.rs rename to fighters/rockman/src/leafshield/acmd.rs diff --git a/fighters/rockman/src/leafshield/acmd/mod.rs b/fighters/rockman/src/leafshield/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/leafshield/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/rockman/src/rockbuster/acmd/specials.rs b/fighters/rockman/src/rockbuster/acmd.rs similarity index 100% rename from fighters/rockman/src/rockbuster/acmd/specials.rs rename to fighters/rockman/src/rockbuster/acmd.rs diff --git a/fighters/rockman/src/rockbuster/acmd/mod.rs b/fighters/rockman/src/rockbuster/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/rockman/src/rockbuster/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/ryu/src/acmd/other.rs b/fighters/ryu/src/acmd/other.rs index a9b31f51ba..1aa621190a 100644 --- a/fighters/ryu/src/acmd/other.rs +++ b/fighters/ryu/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -180,14 +105,17 @@ unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_guarddamage", sound_guarddamage); } diff --git a/fighters/ryu/src/lib.rs b/fighters/ryu/src/lib.rs index 2722fdd513..24c9496848 100644 --- a/fighters/ryu/src/lib.rs +++ b/fighters/ryu/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod hadoken; mod shinkuhadoken; @@ -40,6 +42,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("ryu"); diff --git a/fighters/shizue/src/bullet/acmd/aerials.rs b/fighters/shizue/src/bullet/acmd.rs similarity index 100% rename from fighters/shizue/src/bullet/acmd/aerials.rs rename to fighters/shizue/src/bullet/acmd.rs diff --git a/fighters/shizue/src/bullet/acmd/mod.rs b/fighters/shizue/src/bullet/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/shizue/src/bullet/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/acmd/specials.rs b/fighters/shizue/src/clayrocket/acmd.rs similarity index 100% rename from fighters/shizue/src/clayrocket/acmd/specials.rs rename to fighters/shizue/src/clayrocket/acmd.rs diff --git a/fighters/shizue/src/clayrocket/acmd/mod.rs b/fighters/shizue/src/clayrocket/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/shizue/src/clayrocket/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/shizue/src/clayrocket/status/ready.rs b/fighters/shizue/src/clayrocket/status.rs similarity index 100% rename from fighters/shizue/src/clayrocket/status/ready.rs rename to fighters/shizue/src/clayrocket/status.rs diff --git a/fighters/shizue/src/clayrocket/status/mod.rs b/fighters/shizue/src/clayrocket/status/mod.rs deleted file mode 100644 index 8291cb5d30..0000000000 --- a/fighters/shizue/src/clayrocket/status/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -use super::*; -use crate::globals::*; - -mod ready; - -pub fn install(agent: &mut Agent) { - ready::install(agent); -} \ No newline at end of file diff --git a/fighters/shizue/src/fishingrod/acmd/specials.rs b/fighters/shizue/src/fishingrod/acmd.rs similarity index 100% rename from fighters/shizue/src/fishingrod/acmd/specials.rs rename to fighters/shizue/src/fishingrod/acmd.rs diff --git a/fighters/shizue/src/fishingrod/acmd/mod.rs b/fighters/shizue/src/fishingrod/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/shizue/src/fishingrod/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/shizue/src/trafficsign/acmd/smashes.rs b/fighters/shizue/src/trafficsign/acmd.rs similarity index 100% rename from fighters/shizue/src/trafficsign/acmd/smashes.rs rename to fighters/shizue/src/trafficsign/acmd.rs diff --git a/fighters/shizue/src/trafficsign/acmd/mod.rs b/fighters/shizue/src/trafficsign/acmd/mod.rs deleted file mode 100644 index a085c6ce52..0000000000 --- a/fighters/shizue/src/trafficsign/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod smashes; - -pub fn install(agent: &mut Agent) { - smashes::install(agent); -} \ No newline at end of file diff --git a/fighters/shulk/src/acmd/other.rs b/fighters/shulk/src/acmd/other.rs index b0b6c37f9d..ddce60e38f 100644 --- a/fighters/shulk/src/acmd/other.rs +++ b/fighters/shulk/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -242,16 +167,19 @@ unsafe extern "C" fn sound_win2b_us_en(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_win2", effect_win2); agent.acmd("sound_win2a_us_en", sound_win2a_us_en); agent.acmd("sound_win2b_us_en", sound_win2b_us_en); diff --git a/fighters/shulk/src/lib.rs b/fighters/shulk/src/lib.rs index dbec1261aa..a4753c1fe1 100644 --- a/fighters/shulk/src/lib.rs +++ b/fighters/shulk/src/lib.rs @@ -4,8 +4,9 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + pub mod vtable_hook; use smash::{ @@ -38,12 +39,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("shulk"); acmd::install(agent); + opff::install(agent); status::install(agent); vtable_hook::install(agent); - opff::install(agent); agent.install(); } diff --git a/fighters/sonic/src/gimmickjump/acmd/specials.rs b/fighters/sonic/src/gimmickjump/acmd.rs similarity index 100% rename from fighters/sonic/src/gimmickjump/acmd/specials.rs rename to fighters/sonic/src/gimmickjump/acmd.rs diff --git a/fighters/sonic/src/gimmickjump/acmd/mod.rs b/fighters/sonic/src/gimmickjump/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/sonic/src/gimmickjump/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/tantan/src/acmd/other.rs b/fighters/tantan/src/acmd/other.rs index 0d37520d23..281d0594d7 100644 --- a/fighters/tantan/src/acmd/other.rs +++ b/fighters/tantan/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_tantan_rnd_futtobi01"), Hash40::new("seq_tantan_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -202,18 +126,22 @@ unsafe extern "C" fn game_attackshortendr1(agent: &mut L2CAgentBase) { } } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_attacklegsjumpaerialf", effect_attacklegsjumpaerialb); agent.acmd("effect_attacklegsjumpaerialb", effect_attacklegsjumpaerialb); + agent.acmd("game_attackshortendr1", game_attackshortendr1); agent.acmd("game_attackshortendrb1", game_attackshortendr1); agent.acmd("game_attackshortendrb3", game_attackshortendr1); diff --git a/fighters/tantan/src/lib.rs b/fighters/tantan/src/lib.rs index 2b0a046028..570841d9f4 100644 --- a/fighters/tantan/src/lib.rs +++ b/fighters/tantan/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod punch1; mod punch2; @@ -43,6 +45,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("tantan"); diff --git a/fighters/trail/src/fire/acmd/specials.rs b/fighters/trail/src/fire/acmd.rs similarity index 100% rename from fighters/trail/src/fire/acmd/specials.rs rename to fighters/trail/src/fire/acmd.rs diff --git a/fighters/trail/src/fire/acmd/mod.rs b/fighters/trail/src/fire/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/trail/src/fire/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/trail/src/thunder/acmd/specials.rs b/fighters/trail/src/thunder/acmd.rs similarity index 100% rename from fighters/trail/src/thunder/acmd/specials.rs rename to fighters/trail/src/thunder/acmd.rs diff --git a/fighters/trail/src/thunder/acmd/mod.rs b/fighters/trail/src/thunder/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/trail/src/thunder/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/wario/src/acmd/other.rs b/fighters/wario/src/acmd/other.rs index c638da9412..aa1db28677 100644 --- a/fighters/wario/src/acmd/other.rs +++ b/fighters/wario/src/acmd/other.rs @@ -1,57 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +41,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(boma) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_wario_rnd_futtobi01"), Hash40::new("seq_wario_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -141,14 +66,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -162,7 +85,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -174,13 +96,15 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wario/src/lib.rs b/fighters/wario/src/lib.rs index 2057eebe39..6acb299c80 100644 --- a/fighters/wario/src/lib.rs +++ b/fighters/wario/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("wario"); diff --git a/fighters/wiifit/src/sunbullet/acmd/specials.rs b/fighters/wiifit/src/sunbullet/acmd.rs similarity index 100% rename from fighters/wiifit/src/sunbullet/acmd/specials.rs rename to fighters/wiifit/src/sunbullet/acmd.rs diff --git a/fighters/wiifit/src/sunbullet/acmd/mod.rs b/fighters/wiifit/src/sunbullet/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/wiifit/src/sunbullet/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/wolf/src/blaster_bullet/acmd/specials.rs b/fighters/wolf/src/blaster_bullet/acmd.rs similarity index 100% rename from fighters/wolf/src/blaster_bullet/acmd/specials.rs rename to fighters/wolf/src/blaster_bullet/acmd.rs diff --git a/fighters/wolf/src/blaster_bullet/acmd/mod.rs b/fighters/wolf/src/blaster_bullet/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/wolf/src/blaster_bullet/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/wolf/src/illusion/acmd/specials.rs b/fighters/wolf/src/illusion/acmd.rs similarity index 100% rename from fighters/wolf/src/illusion/acmd/specials.rs rename to fighters/wolf/src/illusion/acmd.rs diff --git a/fighters/wolf/src/illusion/acmd/mod.rs b/fighters/wolf/src/illusion/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/wolf/src/illusion/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/yoshi/src/tamago/acmd/specials.rs b/fighters/yoshi/src/tamago/acmd.rs similarity index 100% rename from fighters/yoshi/src/tamago/acmd/specials.rs rename to fighters/yoshi/src/tamago/acmd.rs diff --git a/fighters/yoshi/src/tamago/acmd/mod.rs b/fighters/yoshi/src/tamago/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/yoshi/src/tamago/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/zelda/src/dein/acmd/specials.rs b/fighters/zelda/src/dein/acmd.rs similarity index 100% rename from fighters/zelda/src/dein/acmd/specials.rs rename to fighters/zelda/src/dein/acmd.rs diff --git a/fighters/zelda/src/dein/acmd/mod.rs b/fighters/zelda/src/dein/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/zelda/src/dein/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/zelda/src/dein/status/dein_move.rs b/fighters/zelda/src/dein/status.rs similarity index 100% rename from fighters/zelda/src/dein/status/dein_move.rs rename to fighters/zelda/src/dein/status.rs diff --git a/fighters/zelda/src/dein/status/mod.rs b/fighters/zelda/src/dein/status/mod.rs deleted file mode 100644 index f5466d9fb3..0000000000 --- a/fighters/zelda/src/dein/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod dein_move; - -pub fn install(agent: &mut Agent) { - dein_move::install(agent); -} \ No newline at end of file diff --git a/fighters/zelda/src/dein_s/acmd/specials.rs b/fighters/zelda/src/dein_s/acmd.rs similarity index 100% rename from fighters/zelda/src/dein_s/acmd/specials.rs rename to fighters/zelda/src/dein_s/acmd.rs diff --git a/fighters/zelda/src/dein_s/acmd/mod.rs b/fighters/zelda/src/dein_s/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/zelda/src/dein_s/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/zelda/src/phantom/acmd/specials.rs b/fighters/zelda/src/phantom/acmd.rs similarity index 100% rename from fighters/zelda/src/phantom/acmd/specials.rs rename to fighters/zelda/src/phantom/acmd.rs diff --git a/fighters/zelda/src/phantom/acmd/mod.rs b/fighters/zelda/src/phantom/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/zelda/src/phantom/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/zelda/src/phantom/status/build.rs b/fighters/zelda/src/phantom/status.rs similarity index 100% rename from fighters/zelda/src/phantom/status/build.rs rename to fighters/zelda/src/phantom/status.rs diff --git a/fighters/zelda/src/phantom/status/mod.rs b/fighters/zelda/src/phantom/status/mod.rs deleted file mode 100644 index a13b6dade4..0000000000 --- a/fighters/zelda/src/phantom/status/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod build; - -pub fn install(agent: &mut Agent) { - build::install(agent); -} \ No newline at end of file From ec49e0f0907601386c99504682c018301cf1dc50 Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 09:43:49 -0500 Subject: [PATCH 107/172] nice --- fighters/bayonetta/src/lib.rs | 2 +- fighters/brave/src/lib.rs | 68 ++++++++++++++-------------- fighters/dedede/src/lib.rs | 2 +- fighters/kamui/src/spearhand/acmd.rs | 2 +- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/fighters/bayonetta/src/lib.rs b/fighters/bayonetta/src/lib.rs index 3979103def..3c1721d4e3 100644 --- a/fighters/bayonetta/src/lib.rs +++ b/fighters/bayonetta/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/brave/src/lib.rs b/fighters/brave/src/lib.rs index aff5b89aa6..ecfbd6ca6c 100644 --- a/fighters/brave/src/lib.rs +++ b/fighters/brave/src/lib.rs @@ -2,6 +2,23 @@ #![allow(unused)] #![allow(non_snake_case)] +pub mod acmd; + +pub mod opff; +//pub mod status; + +// articles + +mod crash; +mod deathball; +mod explosion; +mod fireball; +mod spark; +mod tornado; + +pub mod menu; +pub use menu::hero_rng_hook_impl; + use smash::{ lib::{ L2CValue, @@ -31,48 +48,33 @@ use utils::{ ext::* }; use smashline::*; +#[macro_use] extern crate smash_script; -pub mod acmd; - -pub mod menu; -pub mod opff; -pub use menu::hero_rng_hook_impl; - -// articles -mod crash; -mod deathball; -mod explosion; -mod fireball; -mod spark; -mod tornado; +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // init roll history + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_1, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_2, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_3, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_4, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_1, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_2, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_3, -1); + VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_4, -1); -extern "C" fn brave_init(fighter: &mut L2CFighterCommon) { - unsafe { - // init roll history - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_1, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_2, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_3, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_1_4, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_1, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_2, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_3, -1); - VarModule::set_int(fighter.battle_object, vars::brave::instance::SPELL_SLOT_USED_2_4, -1); - - // roll to get two sets of fresh values - let mut vals = vec![]; - menu::roll_spells(fighter, &mut vals); - menu::roll_spells(fighter, &mut vals); + // roll to get two sets of fresh values + let mut vals = vec![]; + menu::roll_spells(fighter, &mut vals); + menu::roll_spells(fighter, &mut vals); - VarModule::off_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); - } + VarModule::off_flag(fighter.battle_object, vars::brave::instance::PSYCHE_UP_ACTIVE); + VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 0); } pub fn install() { let agent = &mut Agent::new("brave"); acmd::install(agent); opff::install(agent); - smashline::Agent::new("brave").on_start(brave_init).install(); + agent.on_start(on_start); agent.install(); crash::install(); diff --git a/fighters/dedede/src/lib.rs b/fighters/dedede/src/lib.rs index cd559e3b24..f13d2b1a05 100644 --- a/fighters/dedede/src/lib.rs +++ b/fighters/dedede/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; //articles diff --git a/fighters/kamui/src/spearhand/acmd.rs b/fighters/kamui/src/spearhand/acmd.rs index 89b7096541..f44215eb42 100644 --- a/fighters/kamui/src/spearhand/acmd.rs +++ b/fighters/kamui/src/spearhand/acmd.rs @@ -15,7 +15,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.2); } -nsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { From f6b2240073043b717a1368e399924c41c0205ebb Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Mon, 25 Mar 2024 10:56:09 -0400 Subject: [PATCH 108/172] Terrence --- fighters/dolly/src/acmd/aerials.rs | 234 +- fighters/dolly/src/acmd/ground.rs | 411 +-- fighters/dolly/src/acmd/mod.rs | 16 +- fighters/dolly/src/acmd/other.rs | 356 +-- fighters/dolly/src/acmd/smashes.rs | 394 +-- fighters/dolly/src/acmd/specials.rs | 2984 ++++++++++--------- fighters/dolly/src/acmd/throws.rs | 114 +- fighters/dolly/src/acmd/tilts.rs | 180 +- fighters/dolly/src/burst/acmd.rs | 54 + fighters/dolly/src/burst/mod.rs | 9 + fighters/dolly/src/lib.rs | 14 +- fighters/dolly/src/opff.rs | 8 +- fighters/dolly/src/status.rs | 320 +- fighters/dolly/src/status/dash_back.rs | 27 + fighters/dolly/src/status/guard_off.rs | 91 + fighters/dolly/src/status/landing.rs | 16 + fighters/dolly/src/status/special_hi.rs | 21 + fighters/dolly/src/status/special_s.rs | 45 + fighters/dolly/src/status/super_special.rs | 16 + fighters/dolly/src/status/super_special2.rs | 16 + fighters/dolly/src/status/turn_dash.rs | 33 + fighters/dolly/src/status/wait.rs | 61 + fighters/dolly/src/wave/acmd.rs | 14 + fighters/dolly/src/wave/mod.rs | 9 + 24 files changed, 2733 insertions(+), 2710 deletions(-) create mode 100644 fighters/dolly/src/burst/acmd.rs create mode 100644 fighters/dolly/src/burst/mod.rs create mode 100644 fighters/dolly/src/status/dash_back.rs create mode 100644 fighters/dolly/src/status/guard_off.rs create mode 100644 fighters/dolly/src/status/landing.rs create mode 100644 fighters/dolly/src/status/special_hi.rs create mode 100644 fighters/dolly/src/status/special_s.rs create mode 100644 fighters/dolly/src/status/super_special.rs create mode 100644 fighters/dolly/src/status/super_special2.rs create mode 100644 fighters/dolly/src/status/turn_dash.rs create mode 100644 fighters/dolly/src/status/wait.rs create mode 100644 fighters/dolly/src/wave/acmd.rs create mode 100644 fighters/dolly/src/wave/mod.rs diff --git a/fighters/dolly/src/acmd/aerials.rs b/fighters/dolly/src/acmd/aerials.rs index 64fd467404..69050ce0e4 100644 --- a/fighters/dolly/src/acmd/aerials.rs +++ b/fighters/dolly/src/acmd/aerials.rs @@ -1,42 +1,42 @@ use super::*; -unsafe extern "C" fn dolly_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 8.0, 60, 90, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 6.0, 60, 60, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -44,11 +44,11 @@ unsafe extern "C" fn dolly_attack_air_n_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -58,69 +58,69 @@ unsafe extern "C" fn dolly_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.000); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 48, 125, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 48, 125, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 48, 125, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 48, 125, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 48, 125, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 50, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 50, 80, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 50, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 50, 80, 0, 50, 3.25, 5.5, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 50, 80, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 3.0, 55, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 3.0, 55, 105, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 3.0, 55, 105, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 3.0, 55, 105, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 3.0, 55, 105, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.0, 65, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 65, 70, 0, 50, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.0, 65, 70, 0, 50, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dolly_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -130,86 +130,86 @@ unsafe extern "C" fn dolly_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); PostureModule::reverse_lr(boma); PostureModule::update_rot_y_lr(boma); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 44, 70, 0, 50, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 44, 94, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 44, 75, 0, 30, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn dolly_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 70, 90, 0, 55, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 70, 90, 0, 55, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 70, 90, 0, 55, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 70, 90, 0, 55, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 7.0, 75, 88, 0, 50, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 75, 88, 0, 50, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 7.0, 75, 88, 0, 50, 4.4, 1.2, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 75, 88, 0, 50, 6.0, 3.8, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -217,11 +217,11 @@ unsafe extern "C" fn dolly_attack_air_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::off_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE); @@ -231,48 +231,50 @@ unsafe extern "C" fn dolly_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if VarModule::is_flag(boma.object(), vars::shotos::status::SHOULD_COMBOS_SCALE){ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 9.0, 67, 50, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 67, 50, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 9.0, 67, 50, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else{ // Air-only - ATTACK(fighter, 0, 0, Hash40::new("armr"), 15.0, 310, 66, 0, 10, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 15.0, 310, 66, 0, 10, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 67, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("shoulderr"), 11.0, 85, 45, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("armr"), 11.0, 85, 45, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("shoulderr"), 11.0, 85, 45, 0, 45, 0.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attackairn", dolly_attack_air_n_game) - .acmd("game_attackairf", dolly_attack_air_f_game) - .acmd("game_attackairb", dolly_attack_air_b_game) - .acmd("game_attackairhi", dolly_attack_air_hi_game) - .acmd("game_attackairlw", dolly_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/dolly/src/acmd/ground.rs b/fighters/dolly/src/acmd/ground.rs index f340701947..18d215f0e2 100644 --- a/fighters/dolly/src/acmd/ground.rs +++ b/fighters/dolly/src/acmd/ground.rs @@ -1,389 +1,389 @@ use super::*; -unsafe extern "C" fn dolly_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 5.5, Some(0.0), Some(11.0), Some(5.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 180, 10, 0, 27, 4.0, 0.0, 12.5, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 2.5, Some(0.0), Some(11.0), Some(2.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 5.5, Some(0.0), Some(11.0), Some(5.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 180, 10, 0, 27, 4.0, 0.0, 12.5, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 4.0, 0.0, 12.5, 2.5, Some(0.0), Some(11.0), Some(2.5), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 3.0, 0.0, 5.0, 2.5, Some(0.0), Some(5.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 361, 10, 0, 27, 3.0, 0.0, 5.0, 2.5, Some(0.0), Some(5.0), Some(11.0), 1.5, 1.15, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn dolly_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.5-3.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.5-3.0)); } frame(lua_state, 3.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 275, 15, 0, 28, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 250, 15, 0, 25, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.5, 0.0, 10.0, 6.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 275, 15, 0, 28, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 250, 15, 0, 25, 5.0, 0.0, 10.0, 9.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 15, 0, 15, 4.5, 0.0, 10.0, 6.5, None, None, None, 1.75, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); // Handle the multihit - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 275, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 250, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("top"), 2.0, 361, 15, 0, 25, 4.5, 0.0, 12.0, 10.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); // Handle the multihit + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 275, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 250, 15, 0, 35, 5.0, 0.0, 11.0, 12.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("top"), 2.0, 361, 15, 0, 25, 4.5, 0.0, 12.0, 10.0, None, None, None, 1.9, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn dolly_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn dolly_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { KineticModule::add_speed(boma, &Vector3f::new(1.5, 0.0, 0.0)); } } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 67, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 5.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 67, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 5.0, 67, 70, 0, 60, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 5.0, 0.0, 4.0, 4.0, Some(0.0), Some(16.0), Some(11.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 11.0, 3.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 8.0, 78, 95, 0, 80, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn dolly_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut ex_speed = -3.0; - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 8.0/(10.0-6.0)); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 8.0/(10.0-6.0)); } // EX detection - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(fighter, 10.0/(10.0-6.0)); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 10.0/(10.0-6.0)); } } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_attack_level(boma, 0, 1 as u8); AttackModule::set_attack_level(boma, 1, 2 as u8); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + //ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 40, 0, 80, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); KineticModule::add_speed(boma, &Vector3f::new(ex_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); // Heavy dash attack - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 88, 0, 65, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 88, 0, 65, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } // Light dash attack else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 70, 48, 0, 73, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 48, 0, 73, 5.0, 0.0, 10.0, 3.0, Some(0.0), Some(6.0), Some(3.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } } } wait(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(-1.0*ex_speed, 0.0, 0.0)); } else{ // Heavy dash attack - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 75, 73, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 75, 73, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } // Light dash attack else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 75, 63, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 75, 63, 0, 65, 4.0, 0.0, 10.0, 4.0, Some(0.0), Some(6.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_BODY); } } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE(fighter, 1.250); + MeterModule::watch_damage(agent.battle_object, false); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE(agent, 1.250); } } } frame(lua_state, 25.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 24.0/(28.0-25.0)); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 24.0/(28.0-25.0)); } } frame(lua_state, 28.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.5); } } } -unsafe extern "C" fn dolly_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } else{ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.25, true); } - LAST_EFFECT_SET_RATE(fighter, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ if PostureModule::lr(boma) < 1.0 { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_l"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8.0, 3.0, 0, 0, 0, 1, true); } } } } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("dolly_attack_impact_r"), Hash40::new("top"), 0, 8, 3, 0, 0, 0, 1.0, true); } else{ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } else{ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } } frame(lua_state, 9.0); for _ in 0..2 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 25.0); for _ in 0..3 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); @@ -391,42 +391,43 @@ unsafe extern "C" fn dolly_attack_dash_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_critical"), 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_critical"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 39.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attack11", dolly_attack_11_game) - .acmd("game_attack12", dolly_attack_12_game) - .acmd("expression_attack12", dolly_attack_12_expression) - .acmd("game_attack13", dolly_attack_13_game) - .acmd("game_attackdash", dolly_attack_dash_game) - .acmd("effect_attackdash", dolly_attack_dash_effect) - .acmd("expression_attackdash", dolly_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/dolly/src/acmd/mod.rs b/fighters/dolly/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/dolly/src/acmd/mod.rs +++ b/fighters/dolly/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/dolly/src/acmd/other.rs b/fighters/dolly/src/acmd/other.rs index f5132d2205..7a20856723 100644 --- a/fighters/dolly/src/acmd/other.rs +++ b/fighters/dolly/src/acmd/other.rs @@ -1,334 +1,200 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) + app::sv_math::rand(hash40("agent"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dashb_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn dolly_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dolly_escape_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.500); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.500); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 9.5, 4.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 9.5, 4.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 11.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 12.0, 8.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 11.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 12.0, 8.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 19.0, 4.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 23.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 88, 60, 0, 62, 3.0, 0.0, 19.0, 4.5, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 88, 60, 0, 68, 3.0, 0.0, 23.0, 5.0, None, None, None, 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.5); } wait(lua_state, 3.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn dolly_landing_fall_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - FT_MOTION_RATE(fighter, 0.35); +unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + FT_MOTION_RATE(agent, 0.35); } } } -unsafe extern "C" fn dolly_burst_super_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - -} - -unsafe extern "C" fn dolly_burst_final3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - AttackModule::set_no_dead_all(boma, true, false); - if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BOMB); - } - } - frame(lua_state, 5.0); - if is_excute(fighter) { - if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - } - } - frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn dolly_wave_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - MeterModule::add(owner_module_accessor.object(), 8.0); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("sound_dashb", dashb_sound) - .acmd("game_turndash", dolly_turn_dash_game) - .acmd("game_escapeattack", dolly_escape_attack_game) - .acmd("game_landingfallspecial", dolly_landing_fall_special_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("dolly_burst") - .acmd("game_superspecial", dolly_burst_super_special_game) - .acmd("game_final3", dolly_burst_final3_game) - .install(); - smashline::Agent::new("dolly_wave") - .acmd("game_hit", dolly_wave_hit_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damagefly); + + agent.acmd("sound_dash", sound_dash); + + agent.acmd("sound_dashb", sound_dashb); + + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeattack", game_escapeattack); + + agent.acmd("game_landingfallspecial", game_landingfallspecial); + + agent.acmd("game_escapeair", game_escapeair); + + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/dolly/src/acmd/smashes.rs b/fighters/dolly/src/acmd/smashes.rs index 78ab9fc03c..1e5aaf43f8 100644 --- a/fighters/dolly/src/acmd/smashes.rs +++ b/fighters/dolly/src/acmd/smashes.rs @@ -1,30 +1,30 @@ use super::*; -unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut shatter_strike_speed = -0.5; - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.499); - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.499); + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - if MeterModule::drain(fighter.battle_object, 2) { - VarModule::on_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); + if MeterModule::drain(agent.battle_object, 2) { + VarModule::on_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE); } } - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - FT_MOTION_RATE(fighter, 1.000); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + FT_MOTION_RATE(agent, 1.000); } else{ WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); @@ -32,26 +32,26 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); KineticModule::add_speed(boma, &Vector3f::new(shatter_strike_speed, 0.0, 0.0)); } } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 4, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("legl"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 11.0, 361, 10, 0, 10, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("kneer"), 11.0, 361, 10, 0, 10, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_level(boma, 0, 3 as u8); AttackModule::set_attack_level(boma, 1, 3 as u8); AttackModule::set_attack_level(boma, 2, 3 as u8); @@ -68,22 +68,22 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 5, 60.0, false); AttackModule::set_add_reaction_frame(boma, 6, 60.0, false); AttackModule::set_add_reaction_frame(boma, 7, 60.0, false); - FT_MOTION_RATE(fighter, 2.0/(18.0-13.0)); + FT_MOTION_RATE(agent, 2.0/(18.0-13.0)); // Add more negative speed to counteract the faster animation speed KineticModule::add_speed(boma, &Vector3f::new(2.5*shatter_strike_speed, 0.0, 0.0)); } else{ - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 8.0, 361, 40, 0, 70, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 16.0, 361, 85, 0, 50, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 0.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 16.0, 361, 85, 0, 50, 4.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 16.0, 361, 85, 0, 50, 3.5, 5.0, -3.0, 0.0, None, None, None, 1.25, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } } @@ -91,12 +91,12 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); - FT_MOTION_RATE(fighter, 10.0/(20.0-18.0)); + MeterModule::watch_damage(agent.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + FT_MOTION_RATE(agent, 10.0/(20.0-18.0)); // Counteract the added speed we had during the faster part of the animation KineticModule::add_speed(boma, &Vector3f::new(-2.5*shatter_strike_speed, 0.0, 0.0)); // Add positive speed to keep the speed consistent through the slower part of the animation [anim is 80% slower <10/(20-18) = 0.2; 1-0.2 = 0.8> so counteract 80% of the originally added speed] @@ -106,253 +106,253 @@ unsafe extern "C" fn dolly_attack_s4_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract the added speed we had during the slower part of the animation, and the additional forward speed we added KineticModule::add_speed(boma, &Vector3f::new(0.8*shatter_strike_speed, 0.0, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(0.2*shatter_strike_speed, 0.0, 0.0)); // Add positive speed to counteract the original added speed on frame 9 by 40% KineticModule::add_speed(boma, &Vector3f::new(-0.4*shatter_strike_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ } } frame(lua_state, 29.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract 20% more of the remaining speed KineticModule::add_speed(boma, &Vector3f::new(-0.2*shatter_strike_speed, 0.0, 0.0)); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE){ // Counteract the last portion of the originally added speed KineticModule::add_speed(boma, &Vector3f::new(-0.4*shatter_strike_speed, 0.0, 0.0)); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.45, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 14.0, 4.0, 90, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.45, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 14.0, 4.0, 90, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); } } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 9.0, 6.0, 100, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 9.0, 6.0, 100, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); } } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 4.0, 6.0, 80, 0, 0, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.05, 2.5); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 4.0, 6.0, 80, 0, 0, 1.25, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.05, 2.5); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } else{ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_arc6"), Hash40::new("dolly_attack_arc6"), Hash40::new("top"), 2, 12, 5, -9, -46, 32, 0.8, true, *EF_FLIP_YZ, 1); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_attack_arc6"), Hash40::new("dolly_attack_arc6"), Hash40::new("top"), 2, 12, 5, -9, -46, 32, 0.8, true, *EF_FLIP_YZ, 1); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 28.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn dolly_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); app::sv_animcmd::execute(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_critical"), 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_SHATTER_STRIKE) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_critical"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn dolly_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL); + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - FT_MOTION_RATE(fighter, 1.0/(7.5-7.0)); + FT_MOTION_RATE(agent, 1.0/(7.5-7.0)); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.0-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.0-7.5)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - MeterModule::watch_damage(fighter.battle_object, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 60, 40, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 60, 40, 0, 50, 5.0, 0.0, 6.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + MeterModule::watch_damage(agent.battle_object, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 60, 40, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 60, 40, 0, 50, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 60, 40, 0, 50, 5.0, 0.0, 6.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 16.0, 83, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 16.0, 83, 90, 0, 40, 5.0, 0.0, 7.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 83, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 83, 90, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 83, 90, 0, 40, 5.0, 0.0, 7.0, 9.5, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 18.0, 85, 82, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 18.0, 85, 82, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 85, 82, 0, 40, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.2, 0.85, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } AttackModule::clear(boma, 3, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn dolly_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut fire_kick_speed = 0.85; frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.000); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) { - VarModule::on_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); + VarModule::on_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK); KineticModule::add_speed(boma, &Vector3f::new(fire_kick_speed, 0.0, 0.0)); } } frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 8.0, 70, 100, 65, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 63, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 8.0, 91, 100, 61, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 8.0, 70, 100, 65, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 63, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 91, 100, 61, 0, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } else{ - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 1.5, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 4.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 10.0, 35, 50, 0, 50, 4.0, 1.5, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 0.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 12.0, 38, 82, 0, 35, 5.0, 4.0, 0.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { MotionModule::change_motion_force_inherit_frame(boma, Hash40::new("attack_13"), 2.0, 1.0, 1.0); } @@ -360,59 +360,59 @@ unsafe extern "C" fn dolly_attack_lw4_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 13.0); for _ in 0..7 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { KineticModule::add_speed(boma, &Vector3f::new(-0.125*fire_kick_speed, 0.0, 0.0)); } } wait(lua_state, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -unsafe extern "C" fn dolly_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -5, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { - EFFECT_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("legr"), 0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 5.0, 0, -2.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::dolly::status::IS_USE_FIRE_KICK) { + EFFECT_FLIP_ALPHA(agent, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("legr"), 0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 5.0, 0, -2.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("kneer"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, true, *EF_FLIP_YZ, 0.5); - EFFECT_FLIP_ALPHA(fighter, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("sys_attack_impact"), Hash40::new("kneer"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, true, *EF_FLIP_YZ, 0.5); + EFFECT_FLIP_ALPHA(agent, Hash40::new("dolly_attack_speedline2"), Hash40::new("dolly_attack_speedline2"), Hash40::new("top"), 3, 7, 8, -20, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.0); } } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attacks4", dolly_attack_s4_s_game) - .acmd("effect_attacks4", dolly_attack_s4_s_effect) - .acmd("expression_attacks4", dolly_attack_s4_s_expression) - .acmd("game_attackhi4", dolly_attack_hi4_game) - .acmd("game_attacklw4", dolly_attack_lw4_game) - .acmd("effect_attacklw4", dolly_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/dolly/src/acmd/specials.rs b/fighters/dolly/src/acmd/specials.rs index 8de5f604c9..0e8306025b 100644 --- a/fighters/dolly/src/acmd/specials.rs +++ b/fighters/dolly/src/acmd/specials.rs @@ -1,394 +1,394 @@ use super::*; -unsafe extern "C" fn dolly_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.588); + FT_MOTION_RATE(agent, 0.588); } if !WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_N_WORK_FLAG_GENERATE); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::add(fighter.battle_object, 3.0); + if is_excute(agent) { + MeterModule::add(agent.battle_object, 3.0); } } -unsafe extern "C" fn dolly_special_f_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - FT_MOTION_RATE(fighter, 8.0/(7.0-6.0)); - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + FT_MOTION_RATE(agent, 8.0/(7.0-6.0)); + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_f_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } else{ - EFFECT(fighter, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } } -unsafe extern "C" fn dolly_special_air_f_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - FT_MOTION_RATE(fighter, 8.0/(7.0-6.0)); - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + FT_MOTION_RATE(agent, 8.0/(7.0-6.0)); + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_air_f_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsfstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } else{ - EFFECT(fighter, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("dolly_drive_flash"), Hash40::new("top"), 10, 12, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } } -unsafe extern "C" fn dolly_special_f_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsfattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_S_WORK_FLAG_AIR_ATTACK) { } if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } else { - FT_MOTION_RATE(fighter, 0.833); + FT_MOTION_RATE(agent, 0.833); } if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); } if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.250); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - MeterModule::watch_damage(fighter.battle_object, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.250); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, false); } else { - MeterModule::watch_damage(fighter.battle_object, true); - MeterModule::set_damage_gain_mul(fighter.battle_object, 0.5); + MeterModule::watch_damage(agent.battle_object, true); + MeterModule::set_damage_gain_mul(agent.battle_object, 0.5); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 42, 0, 77, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 83, 0, 70, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 42, 0, 77, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 88, 0, 69, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.250); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.250); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_INVINCIBLE); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 43, 71, 0, 73, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 42, 0, 82, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 42, 0, 82, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 40, 95, 0, 54, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 40, 95, 0, 54, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 90, 42, 0, 82, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 90, 42, 0, 82, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 40, 100, 0, 57, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 100, 0, 57, 4.8, 0.0, 11.0, 14.0, Some(0.0), Some(11.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 43, 72, 0, 63, 4.3, 0.0, 11.0, 13.0, Some(0.0), Some(11.0), Some(8.0), 2.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 20, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn dolly_special_f_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - COL_NORMAL(fighter); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { +unsafe extern "C" fn effect_specialsfattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + COL_NORMAL(agent); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { /* - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.5, 0.5); - LAST_EFFECT_SET_RATE(fighter, 0.9); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.5, 0.5); + LAST_EFFECT_SET_RATE(agent, 0.9); */ - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); - //EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("arml"), 3.0, 0, 0, 0, 90, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 2.0, true); + //EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("arml"), 3.0, 0, 0, 0, 90, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - EFFECT_FLW_POS_NO_STOP(fighter,Hash40::new("dolly_drive_tail_s0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent,Hash40::new("dolly_drive_tail_s0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } else { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_s1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_s"), Hash40::new("dolly_drive_punch_s"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } } else { if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_n0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_n0"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } else { - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_tail_n1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_tail_n1"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_drive_punch_n"), Hash40::new("dolly_drive_punch_n"), Hash40::new("havel"), 0.4, 0, 0, 0, 20, 0, 1.0, true, *EF_FLIP_ZX); } } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start0"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - //EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + //EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_drive_start1"), Hash40::new("top"), 0, 12, 14, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } } frame(lua_state, 3.0); for _ in 0..4 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 2, 0, 4, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 2, 0, 4, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); } for _ in 0..3 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); @@ -396,375 +396,375 @@ unsafe extern "C" fn dolly_special_f_attack_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_special_f_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); +unsafe extern "C" fn game_specialsfend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } -unsafe extern "C" fn dolly_special_air_f_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairsfend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn dolly_special_b_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - //FT_MOTION_RATE(fighter, 9.0/(7.0-1.0)); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + //FT_MOTION_RATE(agent, 9.0/(7.0-1.0)); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ WorkModule::set_int(boma, *FIGHTER_DOLLY_STRENGTH_S, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH); } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 4.0); + FT_MOTION_RATE(agent, 4.0); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_b_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_special_air_b_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - //FT_MOTION_RATE(fighter, 9.0/(7.0-1.0)); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + //FT_MOTION_RATE(agent, 9.0/(7.0-1.0)); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ WorkModule::set_int(boma, *FIGHTER_DOLLY_STRENGTH_S, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH); } if WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W as u64 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 4.0); + FT_MOTION_RATE(agent, 4.0); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + FT_MOTION_RATE(agent, 1.0); } } } -unsafe extern "C" fn dolly_special_air_b_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairsbstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL){ + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 2.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_special_b_attack_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbattackw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut add_jump_h_speed = -1.4; let mut add_jump_v_speed = 0.5; if !WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_S_WORK_FLAG_AIR_ATTACK) { add_jump_h_speed = -0.7; add_jump_v_speed = 0.25; } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(add_jump_h_speed, add_jump_v_speed, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 110, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 60, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 60, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 350, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 340, 100, 40, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 30, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 0, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 30, 100, 30, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 7.0, 55, 55, 0, 65, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.25*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.35*add_jump_v_speed, 0.0)); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.35*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.2*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn dolly_special_b_attack_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbattackw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // EX - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_w_command"), Hash40::new("dolly_kick_arc_w_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_w_command"), Hash40::new("dolly_kick_arc_w_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); } // Regular else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); } else{ if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w02"), Hash40::new("dolly_kick_arc_w02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w02"), Hash40::new("dolly_kick_arc_w02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w03"), Hash40::new("dolly_kick_arc_w03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w03"), Hash40::new("dolly_kick_arc_w03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w04"), Hash40::new("dolly_kick_arc_w04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w04"), Hash40::new("dolly_kick_arc_w04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w05"), Hash40::new("dolly_kick_arc_w05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w05"), Hash40::new("dolly_kick_arc_w05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w06"), Hash40::new("dolly_kick_arc_w06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w06"), Hash40::new("dolly_kick_arc_w06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w07"), Hash40::new("dolly_kick_arc_w07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w07"), Hash40::new("dolly_kick_arc_w07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w08"), Hash40::new("dolly_kick_arc_w08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w08"), Hash40::new("dolly_kick_arc_w08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_w01"), Hash40::new("dolly_kick_arc_w01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } EffectModule::set_disable_render_offset_last(boma); } @@ -773,34 +773,34 @@ unsafe extern "C" fn dolly_special_b_attack_w_effect(fighter: &mut L2CAgentBase) } frame(lua_state, 4.0); for _ in 0..5 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } } -unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut add_jump_h_speed = -1.0; let mut add_jump_v_speed = 0.5; - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { add_jump_h_speed = -1.3; add_jump_v_speed = 2.0; } @@ -808,67 +808,67 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { add_jump_h_speed = -0.3; add_jump_v_speed = 0.3; } - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(add_jump_h_speed, add_jump_v_speed, 0.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 30, 100, 70, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 3.0, 30, 100, 70, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 345, 100, 90, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneer"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 7, 0, Hash40::new("hip"), 3.0, 0, 100, 80, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 4.0, 68, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(-0.4*add_jump_h_speed, 0.0, 0.0)); } else{ @@ -877,49 +877,49 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 68, 40, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 6.0, 68, 40, 0, 95, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 1, Hash40::new("hip"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("hip"), 1.0, 340, 100, 50, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 78, 50, 0, 95, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); /* Ground-only */ - ATTACK(fighter, 0, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 1, Hash40::new("legr"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("kneer"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 1, Hash40::new("legr"), 10.0, 275, 40, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 1, Hash40::new("legr"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 1, Hash40::new("kneer"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 1, Hash40::new("legr"), 10.0, 275, 66, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } // Speed handling - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.5*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } @@ -927,12 +927,12 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.2*add_jump_v_speed, 0.0)); KineticModule::add_speed(boma, &Vector3f::new(-0.3*add_jump_h_speed, 0.0, 0.0)); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { KineticModule::add_speed(boma, &Vector3f::new(0.0, -0.4*add_jump_v_speed, 0.0)); } else{ @@ -941,80 +941,80 @@ unsafe extern "C" fn dolly_special_b_attack_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-0.2*add_jump_h_speed, 0.0, 0.0)); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 17.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn dolly_special_b_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialsbattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // EX - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("footr"), 1, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 1.5, true); } // Regular else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_kick_arc_s_command"), Hash40::new("dolly_kick_arc_s_command"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ); EffectModule::set_disable_render_offset_last(boma); } else{ if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s02"), Hash40::new("dolly_kick_arc_s02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s02"), Hash40::new("dolly_kick_arc_s02"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s03"), Hash40::new("dolly_kick_arc_s03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s03"), Hash40::new("dolly_kick_arc_s03"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s04"), Hash40::new("dolly_kick_arc_s04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s04"), Hash40::new("dolly_kick_arc_s04"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s05"), Hash40::new("dolly_kick_arc_s05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s05"), Hash40::new("dolly_kick_arc_s05"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s06"), Hash40::new("dolly_kick_arc_s06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s06"), Hash40::new("dolly_kick_arc_s06"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s07"), Hash40::new("dolly_kick_arc_s07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s07"), Hash40::new("dolly_kick_arc_s07"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s08"), Hash40::new("dolly_kick_arc_s08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s08"), Hash40::new("dolly_kick_arc_s08"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } else{ - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("dolly_kick_arc_s01"), Hash40::new("dolly_kick_arc_s01"), Hash40::new("rot"), -1, -6, 0, -90, -90, 0, 1, true, *EF_FLIP_YZ, 1.3); } EffectModule::set_disable_render_offset_last(boma); } @@ -1023,556 +1023,556 @@ unsafe extern "C" fn dolly_special_b_attack_effect(fighter: &mut L2CAgentBase) { } frame(lua_state, 4.0); for _ in 0..5 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 2.0); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 2.0); } } -unsafe extern "C" fn dolly_special_b_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialsbend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.1); } else{ - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } } } -unsafe extern "C" fn dolly_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 2.0, 98, 100, 100, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 0.75); + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 2.0, 98, 100, 100, 90, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 2.0, 98, 100, 100, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 0.75); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { // Light Rising Tackle early hit if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - FT_MOTION_RATE(fighter, 0.75); + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 10.0, 85, 50, 0, 100, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 0.75); } // Heavy Rising Tackle else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_S { AttackModule::clear_all(boma); } WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { // Light Rising Tackle late hit if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("hip"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 8.0, 65, 50, 0, 70, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } // Heavy Rising Tackle else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } } -unsafe extern "C" fn dolly_special_hi_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } else { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); } else{ if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } } -unsafe extern "C" fn dolly_special_hi_command_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); - - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); + + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); } else{ - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); EffectModule::enable_sync_init_pos_last(boma); } @@ -1580,547 +1580,547 @@ unsafe extern "C" fn dolly_special_hi_command_effect(fighter: &mut L2CAgentBase) } for _ in 0..4 { wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); } } -unsafe extern "C" fn dolly_special_air_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 98, 110, 110, 30, 4.0, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 75, 110, 110, 30, 4.0, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 0.0, Some(0.0), Some(4.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 10, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 6.0, Some(0.0), Some(3.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 3.5, 0.0, Some(0.0), Some(3.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 30, 30, 30, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 10, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 3.5, -4.0, Some(0.0), Some(3.5), Some(-6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 83, 65, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 83, 65, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 83, 55, 0, 90, 7.0, 0.0, 7.0, 2.0, Some(0.0), Some(14.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } } -unsafe extern "C" fn dolly_special_air_hi_command_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_DECIDE_STRENGTH); if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_HI_WORK_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 98, 110, 110, 30, 4.5, 0.0, 10.0, 6.5, Some(0.0), Some(10.0), Some(2.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 75, 110, 110, 30, 4.5, 0.0, 10.0, -2.0, Some(0.0), Some(10.0), Some(-3.0), 2.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 7.5, 0.0, Some(0.0), Some(7.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 20.0, 1.0, Some(0.0), Some(22.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 13.0, 3.0, Some(0.0), Some(13.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 7.5, -4.0, Some(0.0), Some(7.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 6.5, 7.5, Some(0.0), Some(6.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 19.0, 1.0, Some(0.0), Some(21.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 12.0, 3.0, Some(0.0), Some(12.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 6.5, -4.0, Some(0.0), Some(6.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 7.5, Some(0.0), Some(5.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5),0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(1.5),0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 5.5, 0.0, Some(0.0), Some(5.5), Some(6.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 18.0, 1.0, Some(0.0), Some(20.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 11.0, 3.0, Some(0.0), Some(11.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 5.5, -4.0, Some(0.0), Some(5.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.5, 0.0, 4.5, 7.5, Some(0.0), Some(4.5), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 17.0, 1.0, Some(0.0), Some(19.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 35, 30, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 45, 40, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - ATTACK(fighter, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 3, 0, Hash40::new("top"), 0.3, 367, 30, 50, 30, 3.0, 0.0, 4.5, -4.0, Some(0.0), Some(4.5), Some(-4.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_INVINCIBLE), 0); } else { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.3, 90, 30, 50, 30, 3.5, 0.0, 3.5, 5.0, Some(0.0), Some(3.5), Some(-7.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.3, 70, 50, 5, 20, 3.5, 0.0, 16.0, 1.0, Some(0.0), Some(18.5), Some(1.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 40, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.3, 90, 50, 45, 20, 4.5, 0.0, 10.0, 3.0, Some(0.0), Some(10.0), Some(-1.5), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 65, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_BODY); } else{ if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 83, 73, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 83, 62, 0, 90, 7.0, 0.0, 8.0, 2.0, Some(0.0), Some(15.0), Some(2.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BODY); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 40.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.500); + FT_MOTION_RATE(agent, 0.500); } else { - FT_MOTION_RATE(fighter, 0.667); + FT_MOTION_RATE(agent, 0.667); } } } -unsafe extern "C" fn dolly_special_air_hi_command_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairhicommand(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); - - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 16, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); + + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("kneer"), 3.0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1.0, 0, 0, 0, 0, 0, 1.5, true); } } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) > 0.0 { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color1"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); } else{ - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_l_colorr"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.245, 0.325, 0.297); + LAST_EFFECT_SET_COLOR(agent, 0.245, 0.325, 0.297); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.212, 0.365, 0.332); + LAST_EFFECT_SET_COLOR(agent, 0.212, 0.365, 0.332); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.389, 0.342, 0.25); + LAST_EFFECT_SET_COLOR(agent, 0.389, 0.342, 0.25); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.372, 0.545, 0.579); + LAST_EFFECT_SET_COLOR(agent, 0.372, 0.545, 0.579); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.33, 0.458, 0.611); + LAST_EFFECT_SET_COLOR(agent, 0.33, 0.458, 0.611); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.627, 0.627, 0.627); + LAST_EFFECT_SET_COLOR(agent, 0.627, 0.627, 0.627); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.146, 0.205, 0.333); + LAST_EFFECT_SET_COLOR(agent, 0.146, 0.205, 0.333); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r_color2"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 0 { - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 1 { - LAST_EFFECT_SET_COLOR(fighter, 0.109, 0.122, 0.27); + LAST_EFFECT_SET_COLOR(agent, 0.109, 0.122, 0.27); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 2 { - LAST_EFFECT_SET_COLOR(fighter, 0.317, 0.14, 0.131); + LAST_EFFECT_SET_COLOR(agent, 0.317, 0.14, 0.131); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 3 { - LAST_EFFECT_SET_COLOR(fighter, 0.17, 0.317, 0.151); + LAST_EFFECT_SET_COLOR(agent, 0.17, 0.317, 0.151); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 4 { - LAST_EFFECT_SET_COLOR(fighter, 0.524, 0.087, 0.087); + LAST_EFFECT_SET_COLOR(agent, 0.524, 0.087, 0.087); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 5 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 6 { - LAST_EFFECT_SET_COLOR(fighter, 0.079, 0.079, 0.079); + LAST_EFFECT_SET_COLOR(agent, 0.079, 0.079, 0.079); } if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) == 7 { - LAST_EFFECT_SET_COLOR(fighter, 0.444, 0.329, 0.145); + LAST_EFFECT_SET_COLOR(agent, 0.444, 0.329, 0.145); } else{ - LAST_EFFECT_SET_COLOR(fighter, 0.587, 0.126, 0.169); + LAST_EFFECT_SET_COLOR(agent, 0.587, 0.126, 0.169); } - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("dolly_roll_r"), Hash40::new("throw"), 0, 2.5, 0, 0, 0, 0, 1, true, 0.8); EffectModule::enable_sync_init_pos_last(boma); } @@ -2128,190 +2128,190 @@ unsafe extern "C" fn dolly_special_air_hi_command_effect(fighter: &mut L2CAgentB } for _ in 0..4 { wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.4); - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.4); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8.5, 1, 0, 0, 0, 2, true, 0.6); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } else{ - FLASH(fighter, 0.05, 0.1, 0.6, 0.6); + FLASH(agent, 0.05, 0.1, 0.6, 0.6); } - //FLASH_SET_DIRECTION(fighter, 1, 0, 0); + //FLASH_SET_DIRECTION(agent, 1, 0, 0); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_r_color2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_roll_l_color2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_r_color2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); } } -unsafe extern "C" fn dolly_special_hi_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - FT_MOTION_RATE(fighter, 0.667); +unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE(agent, 0.667); } } -unsafe extern "C" fn dolly_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn dolly_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } else if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); } } } } -unsafe extern "C" fn dolly_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); - MeterModule::add(fighter.battle_object, 1.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1); + MeterModule::add(agent.battle_object, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 1) { - VarModule::on_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); + if MeterModule::drain(agent.battle_object, 1) { + VarModule::on_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL); } } } } -unsafe extern "C" fn dolly_special_lw_w_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwrisew(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::clear_speed_all(boma); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //KineticModule::add_speed(boma, &Vector3f::new(0.0, -5.0, 0.0)); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 10.0); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 87, 100, 50, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 1.3); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //boma.change_status_req(*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_F_END, false); boma.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 2.0, 367, 100, 40, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 2, Hash40::new("top"), 2.0, 55, 100, 30, 10, 6.0, 0.0, 10.0, 3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } frame(lua_state, 18.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::add_speed(boma, &Vector3f::new(5.0, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -2319,91 +2319,91 @@ unsafe extern "C" fn dolly_special_lw_w_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_special_lw_w_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - //LAST_EFFECT_SET_RATE(fighter, 1.1); +unsafe extern "C" fn effect_specialairlwrisew(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + //LAST_EFFECT_SET_RATE(agent, 1.1); } } } -unsafe extern "C" fn dolly_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairlwrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::clear_speed_all(boma); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_XLU); + if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) || VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_XLU); } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //KineticModule::add_speed(boma, &Vector3f::new(0.0, -5.0, 0.0)); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - FT_MOTION_RATE(fighter, 10.0); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 85, 25, 0, 100, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 10.0); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 85, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.5, 80, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 85, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 80, 100, 45, 50, 5.5, 0.0, 10.0, 3.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 1.3); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { //boma.change_status_req(*FIGHTER_DOLLY_STATUS_KIND_SPECIAL_F_END, false); boma.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.5, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.5, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.5, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 0.5, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 2, Hash40::new("top"), 2.0, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 2, Hash40::new("top"), 2.0, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 2, Hash40::new("top"), 2.0, 367, 100, 50, 20, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 2, Hash40::new("top"), 2.0, 367, 100, 30, 10, 7.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 3, Hash40::new("top"), 2.0, 40, 100, 30, 10, 7.0, 0.0, 10.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - MeterModule::watch_damage(fighter.battle_object, true); + ATTACK(agent, 0, 3, Hash40::new("top"), 2.0, 40, 100, 30, 10, 7.0, 0.0, 10.0, 3.0, Some(0.0), Some(9.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } frame(lua_state, 22.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::add_speed(boma, &Vector3f::new(0.3, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); @@ -2411,52 +2411,52 @@ unsafe extern "C" fn dolly_special_lw_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.71, 0.115, 1.75); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } - else if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); - //LAST_EFFECT_SET_RATE(fighter, 1.1); +unsafe extern "C" fn effect_specialairlwrise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_rise"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.71, 0.115, 1.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13.5, -2.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.4, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + else if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_1) { + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_aura"), Hash40::new("kneer"), 3.0, 10.0, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + //EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("top"), 3.0, 10.0, 0, 0, 0, 0, 0.6, true); + //LAST_EFFECT_SET_RATE(agent, 1.1); } } frame(lua_state, 3.0); for _ in 0..6 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); @@ -2464,11 +2464,11 @@ unsafe extern "C" fn dolly_special_lw_effect(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); let addSpeed1 = Vector3f{ x: 0.3, y: -1.0, z: 0.0 }; @@ -2483,7 +2483,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: -0.3, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2494,7 +2494,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2505,33 +2505,33 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 50, 75, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 50, 75, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 65, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 65, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 50, 70, 0, 80, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2542,46 +2542,46 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 310, 95, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 310, 95, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 310, 60, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 310, 60, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); } } else { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.833); + FT_MOTION_RATE(agent, 0.833); let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } else { - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); let addSpeed1 = Vector3f{ x: 0.0, y: 0.2, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2592,7 +2592,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2603,7 +2603,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2614,7 +2614,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2625,7 +2625,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.05, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2636,7 +2636,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2647,7 +2647,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2658,7 +2658,7 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { let addSpeed1 = Vector3f{ x: 0.0, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); @@ -2669,501 +2669,521 @@ unsafe extern "C" fn dolly_special_lw_attack_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 350, 35, 0, 30, 6.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 80, 0, 60, 5.0, 0.0, 6.0, 7.0, Some(0.0), Some(4.0), Some(2.0), 1.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_INT_STRENGTH) == *FIGHTER_DOLLY_STRENGTH_W { - FT_MOTION_RATE(fighter, 0.100); + FT_MOTION_RATE(agent, 0.100); } else { - FT_MOTION_RATE(fighter, 0.100); + FT_MOTION_RATE(agent, 0.100); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_DOLLY_SPECIAL_LW_FALL); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_LW_WORK_FLAG_LANDING_HEAVY); } } -unsafe extern "C" fn dolly_special_lw_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("shoulderr"), 0, 0, 0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.25, true); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("shoulderr"), 0, 0, 0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.25, true); } else{ if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_down_tail_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_down_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_down_tail_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_down_n"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } } } frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_wave_aura"), true, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_wave_aura"), true, true); } } frame(lua_state, 3.0); for _ in 0..7 { - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_PRI(fighter, 200); - FLASH(fighter, 1.0, 0.825, 0.115, 1.75); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_PRI(agent, 200); + FLASH(agent, 1.0, 0.825, 0.115, 1.75); } } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - //FLASH(fighter, 1.0, 1.0, 1.0, 1.5); - FLASH(fighter, 1.0, 0.825, 0.115, 0.6); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + //FLASH(agent, 1.0, 1.0, 1.0, 1.5); + FLASH(agent, 1.0, 0.825, 0.115, 0.6); } } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - COL_NORMAL(fighter); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + COL_NORMAL(agent); } } wait(lua_state, 1.0); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_tail_n"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_n"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_tail_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_down_s"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_tail_n"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_n"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_tail_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("dolly_down_s"), false, true); } } -unsafe extern "C" fn dolly_special_lw_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { +unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); - SET_SPEED_EX(fighter, 0.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); // Star Dunk Volcano if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - if MeterModule::drain(fighter.battle_object, 3) { + if MeterModule::drain(agent.battle_object, 3) { VarModule::on_flag(boma.object(), vars::shotos::instance::IS_TARGET_COMBO_2); } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 0, 100, 70, 0, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else{ - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 277, 35, 0, 120, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("top"), 3.0, 85, 35, 0, 110, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 277, 35, 0, 120, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 85, 35, 0, 110, 6.5, 0.0, 6.5, 0.0, Some(0.0), Some(6.5), Some(5.5), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_CRITICAL, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); } else{ - SET_SPEED_EX(fighter, 1.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 1.5, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_BURST, false, 0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { SlowModule::set_whole(boma, 2, 20); } } frame(lua_state, 6.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { // Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - FT_MOTION_RATE(fighter, 4.000); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + FT_MOTION_RATE(agent, 4.000); } else{ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } else{ - FT_MOTION_RATE(fighter, 2.000); + FT_MOTION_RATE(agent, 2.000); } } } - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { AttackModule::clear_all(boma); } - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + FT_MOTION_RATE(agent, 1.000); } } } -unsafe extern "C" fn dolly_special_lw_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { // EX/Star Dunk Volcano - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_s"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_s"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_TARGET_COMBO_2) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.5); } else{ - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } } else{ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if WorkModule::is_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_COMMON_WORK_FLAG_COMMAND){ - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_s"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_s"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_s"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_down_n"), -1); - EFFECT(fighter, Hash40::new("dolly_down_ground_n"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_down_n"), -1); + EFFECT(agent, Hash40::new("dolly_down_ground_n"), Hash40::new("top"), 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } } } -unsafe extern "C" fn dolly_super_special_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - SLOW_OPPONENT(fighter, 15.0, 40.0); + SLOW_OPPONENT(agent, 15.0, 40.0); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 15.0/(8.0-6.0)); + FT_MOTION_RATE(agent, 15.0/(8.0-6.0)); } else{ - FT_MOTION_RATE(fighter, 8.0/(8.0-6.0)); + FT_MOTION_RATE(agent, 8.0/(8.0-6.0)); } } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_BURST, false, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0/3.0); + FT_MOTION_RATE(agent, 2.0/3.0); } } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 8.0); } } -unsafe extern "C" fn dolly_super_special_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_aura"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.8); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 10, 13, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("dolly_wave_arc"), Hash40::new("dolly_wave_arc"), Hash40::new("top"), 0, 10, 4, 69, -46, -45, 1.2, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("dolly_wave_arc"), Hash40::new("dolly_wave_arc"), Hash40::new("top"), 0, 10, 4, 69, -46, -45, 1.2, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn dolly_super_special_2_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0.0); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_ALWAYS, 0.0); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); - SLOW_OPPONENT(fighter, 30.0, 30.0); + FT_MOTION_RATE(agent, 1.0); + SLOW_OPPONENT(agent, 30.0, 30.0); } else{ - //FT_MOTION_RATE(fighter, 0.5); - FT_MOTION_RATE(fighter, 1.0); + //FT_MOTION_RATE(agent, 0.5); + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } else{ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 15.0/(9.0-5.0)); + FT_MOTION_RATE(agent, 15.0/(9.0-5.0)); } else{ - //FT_MOTION_RATE(fighter, 0.5); - FT_MOTION_RATE(fighter, 8.0/(9.0-5.0)); + //FT_MOTION_RATE(agent, 0.5); + FT_MOTION_RATE(agent, 8.0/(9.0-5.0)); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } else{ - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(boma, true, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 100, 100, 30, 6.0, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(7.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); ArticleModule::generate_article(boma, *FIGHTER_DOLLY_GENERATE_ARTICLE_FIRE, false, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn dolly_super_special_2_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn effect_superspecial2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_ball_damage"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); - //EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_ball"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_smash_ball_damage"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); + //EFFECT_FOLLOW(agent, Hash40::new("sys_smash_ball"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); /* - EFFECT_FOLLOW(fighter, Hash40::new("sys_absorption"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + EFFECT_FOLLOW(agent, Hash40::new("sys_absorption"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 3.0, true); + LAST_EFFECT_SET_RATE(agent, 0.25); */ - //EFFECT_FOLLOW(fighter, Hash40::new("sys_cross_bomb"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); - //LAST_EFFECT_SET_RATE(fighter, 3.0); + //EFFECT_FOLLOW(agent, Hash40::new("sys_cross_bomb"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.25, true); + //LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("dolly_wave_hold"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("dolly_wave_hold"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 1, true); if VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL){ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.6, 0.4, 0.8); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.6, 0.4, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.75); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -15, 16, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_flash"), Hash40::new("handr"), 1, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_aura_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_normal_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS_NO_STOP(fighter, Hash40::new("dolly_buster_punch"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("dolly_buster_dash"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS_NO_STOP(agent, Hash40::new("dolly_buster_punch"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("dolly_buster_dash"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, false); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("dolly_buster_punch"), 6); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("dolly_buster_punch"), 6); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("dolly_buster_dash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("dolly_buster_dash"), false, true); } } -unsafe extern "C" fn dolly_super_special_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_superspecial2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 20.0, 45, 79, 0, 40, 0.8, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 20.0, 45, 79, 0, 40, 0.8, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 63, 0, 90, 8.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(25.0), Some(17.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(20.0), Some(25.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(12.0), Some(30.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(33.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 63, 0, 90, 8.0, 0.0, 8.0, 5.0, Some(0.0), Some(8.0), Some(15.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(25.0), Some(17.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(20.0), Some(25.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(12.0), Some(30.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 4, 0, Hash40::new("top"), 12.0, 45, 48, 0, 90, 3.0, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(33.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_ENERGY); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_OBJECT_ID), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_OBJECT_ID), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_DOLLY_STATUS_SUPER_SPECIAL2_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 40.0); - if is_excute(fighter) { - WHOLE_HIT(fighter, *HIT_STATUS_NORMAL); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_specialn", dolly_special_n_game) - .acmd("game_specialsfstart", dolly_special_f_start_game) - .acmd("effect_specialsfstart", dolly_special_f_start_effect) - .acmd("game_specialairsfstart", dolly_special_air_f_start_game) - .acmd("effect_specialairsfstart", dolly_special_air_f_start_effect) - .acmd("game_specialsfattack", dolly_special_f_attack_game) - .acmd("effect_specialsfattack", dolly_special_f_attack_effect) - .acmd("game_specialsfend", dolly_special_f_end_game) - .acmd("game_specialairsfend", dolly_special_air_f_end_game) - .acmd("game_specialsbstart", dolly_special_b_start_game) - .acmd("effect_specialsbstart", dolly_special_b_start_effect) - .acmd("game_specialairsbstart", dolly_special_air_b_start_game) - .acmd("effect_specialairsbstart", dolly_special_air_b_start_effect) - .acmd("game_specialsbattackw", dolly_special_b_attack_w_game) - .acmd("effect_specialsbattackw", dolly_special_b_attack_w_effect) - .acmd("game_specialsbattack", dolly_special_b_attack_game) - .acmd("effect_specialsbattack", dolly_special_b_attack_effect) - .acmd("game_specialsbend", dolly_special_b_end_game) - .acmd("game_specialhi1", dolly_special_hi1_game) - .acmd("game_specialhicommand", dolly_special_hi_command_game) - .acmd("effect_specialhicommand", dolly_special_hi_command_effect) - .acmd("game_specialairhi1", dolly_special_air_hi1_game) - .acmd("game_specialairhicommand", dolly_special_air_hi_command_game) - .acmd("effect_specialairhicommand", dolly_special_air_hi_command_effect) - .acmd("game_specialhifall", dolly_special_hi_fall_game) - .acmd("game_specialairhiend", dolly_special_air_hi_end_game) - .acmd("game_speciallwstart", dolly_special_lw_start_game) - .acmd("game_specialairlwstart", dolly_special_air_lw_start_game) - .acmd("game_specialairlwrisew", dolly_special_lw_w_game) - .acmd("effect_specialairlwrisew", dolly_special_lw_w_effect) - .acmd("game_specialairlwrise", dolly_special_lw_game) - .acmd("effect_specialairlwrise", dolly_special_lw_effect) - .acmd("game_specialairlw", dolly_special_lw_attack_game) - .acmd("effect_specialairlw", dolly_special_lw_attack_effect) - .acmd("game_speciallwend", dolly_special_lw_landing_game) - .acmd("effect_speciallwend", dolly_special_lw_landing_effect) - .acmd("game_superspecial", dolly_super_special_game) - .acmd("effect_superspecial", dolly_super_special_effect) - .acmd("game_superspecial2start", dolly_super_special_2_start_game) - .acmd("effect_superspecial2start", dolly_super_special_2_start_effect) - .acmd("game_superspecial2", dolly_super_special_2_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + + agent.acmd("game_specialsfstart", game_specialsfstart); + agent.acmd("effect_specialsfstart", effect_specialsfstart); + agent.acmd("game_specialairsfstart", game_specialairsfstart); + agent.acmd("effect_specialairsfstart", effect_specialairsfstart); + + agent.acmd("game_specialsfattack", game_specialsfattack); + agent.acmd("effect_specialsfattack", effect_specialsfattack); + + agent.acmd("game_specialsfend", game_specialsfend); + agent.acmd("game_specialairsfend", game_specialairsfend); + + agent.acmd("game_specialsbstart", game_specialsbstart); + agent.acmd("effect_specialsbstart", effect_specialsbstart); + agent.acmd("game_specialairsbstart", game_specialairsbstart); + agent.acmd("effect_specialairsbstart", effect_specialairsbstart); + + agent.acmd("game_specialsbattackw", game_specialsbattackw); + agent.acmd("effect_specialsbattackw", effect_specialsbattackw); + + agent.acmd("game_specialsbattack", game_specialsbattack); + agent.acmd("effect_specialsbattack", effect_specialsbattack); + + agent.acmd("game_specialsbend", game_specialsbend); + + agent.acmd("game_specialhi1", game_specialhi1); + + agent.acmd("game_specialhicommand", game_specialhicommand); + agent.acmd("effect_specialhicommand", effect_specialhicommand); + + agent.acmd("game_specialairhi1", game_specialairhi1); + + agent.acmd("game_specialairhicommand", game_specialairhicommand); + agent.acmd("effect_specialairhicommand", effect_specialairhicommand); + + agent.acmd("game_specialhifall", game_specialhifall); + + agent.acmd("game_specialairhiend", game_specialairhiend); + + agent.acmd("game_speciallwstart", game_speciallwstart); + + agent.acmd("game_specialairlwstart", game_specialairlwstart); + + agent.acmd("game_specialairlwrisew", game_specialairlwrisew); + agent.acmd("effect_specialairlwrisew", effect_specialairlwrisew); + + agent.acmd("game_specialairlwrise", game_specialairlwrise); + agent.acmd("effect_specialairlwrise", effect_specialairlwrise); + + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); + + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("effect_speciallwend", effect_speciallwend); + + agent.acmd("game_superspecial", game_superspecial); + agent.acmd("effect_superspecial", effect_superspecial); + + agent.acmd("game_superspecial2start", game_superspecial2start); + agent.acmd("effect_superspecial2start", effect_superspecial2start); + + agent.acmd("game_superspecial2", game_superspecial2); } diff --git a/fighters/dolly/src/acmd/throws.rs b/fighters/dolly/src/acmd/throws.rs index 86d6f51890..e4255d16e0 100644 --- a/fighters/dolly/src/acmd/throws.rs +++ b/fighters/dolly/src/acmd/throws.rs @@ -1,118 +1,116 @@ use super::*; -unsafe extern "C" fn dolly_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn dolly_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 9.0, 0.0, Some(0.0), Some(9.0), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn dolly_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 7.2, 0.0, Some(0.0), Some(7.2), Some(-15.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn dolly_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 1); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn dolly_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 38, 59, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 29.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - CHECK_FINISH_CAMERA(fighter, 11, 1); + if is_excute(agent) { + REVERSE_LR(agent); + CHECK_FINISH_CAMERA(agent, 11, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_catch", dolly_catch_game) - .acmd("game_catchdash", dolly_catch_dash_game) - .acmd("game_catchturn", dolly_catch_turn_game) - .acmd("game_throwf", dolly_throw_f_game) - .acmd("game_throwb", dolly_throw_b_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/dolly/src/acmd/tilts.rs b/fighters/dolly/src/acmd/tilts.rs index de98d5e33b..7546c02be0 100644 --- a/fighters/dolly/src/acmd/tilts.rs +++ b/fighters/dolly/src/acmd/tilts.rs @@ -1,46 +1,46 @@ use super::*; -unsafe extern "C" fn dolly_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } - FT_MOTION_RATE(fighter, 7.0/(9.0-1.0)); - MeterModule::watch_damage(fighter.battle_object, true); + FT_MOTION_RATE(agent, 7.0/(9.0-1.0)); + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - //HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + //HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 39, 50, 0, 50, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 11.0, 39, 35, 0, 45, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); VarModule::off_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); @@ -48,76 +48,76 @@ unsafe extern "C" fn dolly_attack_s3_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); - MeterModule::watch_damage(fighter.battle_object, true); + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 6.5, 65, 40, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.5, 65, 40, 0, 80, 4.0, 0.0, 4.0, 9.5, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 75, 45, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 75, 45, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 4.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 9.0, 75, 45, 0, 80, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { } else { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 8.0, 77, 30, 0, 86, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 9.0, 77, 40, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("bust"), 8.0, 77, 30, 0, 86, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 9.0, 77, 40, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 8.0, 77, 30, 0, 86, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.5, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_PUNCH); } } wait(lua_state, 2.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); VarModule::off_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); @@ -125,31 +125,31 @@ unsafe extern "C" fn dolly_attack_hi3_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dolly_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); - VarModule::off_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); - if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - VarModule::on_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + VarModule::off_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + VarModule::on_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE); } } frame(lua_state, 6.0); - if is_excute(fighter) { - //if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) || VarModule::get_int(fighter.battle_object, vars::shotos::instance::REPEAT_COUNT_LW) >= 2 { - if VarModule::is_flag(fighter.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) || VarModule::get_int(agent.battle_object, vars::shotos::instance::REPEAT_COUNT_LW) >= 2 { + if VarModule::is_flag(agent.battle_object, vars::shotos::status::SHOULD_COMBOS_SCALE) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 4.0, 60, 90, 0, 30, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); } else { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 82, 36, 0, 25, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 76, 36, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 82, 36, 0, 25, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.75, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -1, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_DOLLY_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); @@ -157,33 +157,31 @@ unsafe extern "C" fn dolly_attack_lw3_game(fighter: &mut L2CAgentBase) { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { /* if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_MOTION_RATE(fighter, 0.700); + FT_MOTION_RATE(agent, 0.700); } else { - FT_MOTION_RATE(fighter, 1.250); + FT_MOTION_RATE(agent, 1.250); } */ } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } } -pub fn install() { - smashline::Agent::new("dolly") - .acmd("game_attacks3", dolly_attack_s3_s_game) - .acmd("game_attackhi3", dolly_attack_hi3_game) - .acmd("game_attacklw3", dolly_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/dolly/src/burst/acmd.rs b/fighters/dolly/src/burst/acmd.rs new file mode 100644 index 0000000000..f86e5a61a8 --- /dev/null +++ b/fighters/dolly/src/burst/acmd.rs @@ -0,0 +1,54 @@ +use super::*; + +unsafe extern "C" fn game_superspecial(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + frame(lua_state, 1.0); + if is_excute(fighter) { + ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 5.0); + if is_excute(fighter) { + ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + +} + +unsafe extern "C" fn game_final3(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(fighter) { + AttackModule::set_no_dead_all(boma, true, false); + if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { + ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + else{ + ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BOMB); + } + } + frame(lua_state, 5.0); + if is_excute(fighter) { + if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { + ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + } + } + frame(lua_state, 10.0); + if is_excute(fighter) { + AttackModule::clear_all(boma); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_superspecial", game_superspecial); + agent.acmd("game_final3", game_final3); +} \ No newline at end of file diff --git a/fighters/dolly/src/burst/mod.rs b/fighters/dolly/src/burst/mod.rs new file mode 100644 index 0000000000..44652b5900 --- /dev/null +++ b/fighters/dolly/src/burst/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("dolly_burst"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/dolly/src/lib.rs b/fighters/dolly/src/lib.rs index 5537dac979..80743bca83 100644 --- a/fighters/dolly/src/lib.rs +++ b/fighters/dolly/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; pub mod status; pub mod opff; +mod wave; +mod burst; + use smash::{ lib::{ L2CValue, @@ -39,7 +42,12 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("dolly"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + wave::install(); + burst::install(); } \ No newline at end of file diff --git a/fighters/dolly/src/opff.rs b/fighters/dolly/src/opff.rs index 3a46e80c9d..8a668f7468 100644 --- a/fighters/dolly/src/opff.rs +++ b/fighters/dolly/src/opff.rs @@ -873,9 +873,7 @@ pub unsafe fn dolly_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("dolly") - .on_line(Main, dolly_frame_wrapper) - .on_line(Main, dolly_meter) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dolly_frame_wrapper); + agent.on_line(Main, dolly_meter); } \ No newline at end of file diff --git a/fighters/dolly/src/status.rs b/fighters/dolly/src/status.rs index 17e080c054..bfae4b8a15 100644 --- a/fighters/dolly/src/status.rs +++ b/fighters/dolly/src/status.rs @@ -1,22 +1,16 @@ use super::*; use globals::*; -// status script import -utils::import_noreturn!(common::shoto_status::{ - fgc_end_dashback, - ryu_idkwhatthisis2 -}); +mod wait; +mod turn_dash; +mod dash_back; +mod landing; +mod guard_off; -extern "Rust" { - // from common::shoto_status - fn ryu_kara_cancel(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk(fighter: &mut L2CFighterCommon) -> L2CValue; - fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; - fn ryu_attack_main_uniq_chk4(fighter: &mut L2CFighterCommon, param_1: L2CValue) -> L2CValue; - fn ryu_final_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn ryu_hit_cancel(fighter: &mut L2CFighterCommon, situation: L2CValue) -> L2CValue; - fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; -} +mod special_s; +mod special_hi; +mod super_special; +mod super_special2; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -172,291 +166,17 @@ extern "C" fn dolly_init(fighter: &mut L2CFighterCommon) { } } -// FIGHTER_STATUS_KIND_SPECIAL_S // - -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND // - -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B // - -pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND // - -pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); - } - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP - -pub unsafe extern "C" fn init_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.select_cliff_hangdata_from_name("special_hi"); - 0.into() -} - -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL - -pub unsafe extern "C" fn init_special_hi_fall(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.select_cliff_hangdata_from_name("special_hi"); - 0.into() -} - -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - WorkModule::enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND, - ); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() -} - -// FIGHTER_STATUS_KIND_TURN_DASH // +pub fn install(agent: &mut Agent) { + agent.on_start(dolly_init); -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - app::FighterSpecializer_Dolly::update_opponent_lr_1on1( - fighter.module_accessor, - *FIGHTER_STATUS_KIND_TURN_DASH, - ); - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL // - -pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - let boma = app::sv_system::battle_object_module_accessor(lua_state); - let mut agent_base = fighter.fighter_base.agent_base; - let id = VarModule::get_int( - fighter.battle_object, - vars::common::instance::COSTUME_SLOT_NUMBER, - ) as usize; - - // Only use meter if you didn't cancel directly from a different super - if !VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL) { - MeterModule::drain(boma.object(), 4); - } - smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL)(fighter) -} - -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 // - -pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - let boma = app::sv_system::battle_object_module_accessor(lua_state); - let mut agent_base = fighter.fighter_base.agent_base; - let id = VarModule::get_int( - fighter.battle_object, - vars::common::instance::COSTUME_SLOT_NUMBER, - ) as usize; - - // Only use meter if you didn't cancel directly from a different supper - if !VarModule::is_flag(boma.object(), vars::dolly::instance::SUPER_CANCEL) { - MeterModule::drain(boma.object(), 4); - } - smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2)(fighter) -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() - * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("walk_stick_x"), - ); - let squat_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("squat_stick_y"), - ); - - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, - ) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_LANDING // - -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) -} + wait::install(agent); + turn_dash::install(agent); + dash_back::install(agent); + landing::install(agent); + guard_off::install(agent); -pub fn install() { - smashline::Agent::new("dolly") - .on_start(dolly_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, init_special_s_command) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, init_special_b) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, init_special_b_command) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, init_special_hi_jump) - .status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, init_special_hi_fall) - .status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard) - .status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash) - .status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, main_dashback) - .status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, end_dashback) - .status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, pre_superspecial) - .status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, pre_superspecial2) - .status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre) - .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - .status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main) - .install(); + special_s::install(agent); + special_hi::install(agent); + super_special::install(agent); + super_special2::install(agent); } \ No newline at end of file diff --git a/fighters/dolly/src/status/dash_back.rs b/fighters/dolly/src/status/dash_back.rs new file mode 100644 index 0000000000..c22ac225e3 --- /dev/null +++ b/fighters/dolly/src/status/dash_back.rs @@ -0,0 +1,27 @@ +use super::*; +use globals::*; +// status script import + +utils::import_noreturn!(common::shoto_status::{ + fgc_end_dashback, +}); + +extern "Rust" { + fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK // + +pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, end_dashback); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/guard_off.rs b/fighters/dolly/src/status/guard_off.rs new file mode 100644 index 0000000000..de81ca3842 --- /dev/null +++ b/fighters/dolly/src/status/guard_off.rs @@ -0,0 +1,91 @@ +use super::*; +use globals::*; +// status script import + +pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + WorkModule::enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI_COMMAND, + ); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_off_main) +} + +unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/landing.rs b/fighters/dolly/src/status/landing.rs new file mode 100644 index 0000000000..3bd62849ed --- /dev/null +++ b/fighters/dolly/src/status/landing.rs @@ -0,0 +1,16 @@ +use super::*; +use globals::*; + +extern "Rust" { + fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; +} + +// FIGHTER_STATUS_KIND_LANDING // + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/special_hi.rs b/fighters/dolly/src/status/special_hi.rs new file mode 100644 index 0000000000..24e942c7c1 --- /dev/null +++ b/fighters/dolly/src/status/special_hi.rs @@ -0,0 +1,21 @@ +use super::*; +use globals::*; + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP + +pub unsafe extern "C" fn init_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.select_cliff_hangdata_from_name("special_hi"); + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL + +pub unsafe extern "C" fn init_special_hi_fall(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.select_cliff_hangdata_from_name("special_hi"); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, init_special_hi_jump); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, init_special_hi_fall); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/special_s.rs b/fighters/dolly/src/status/special_s.rs new file mode 100644 index 0000000000..8bf5a4dcd6 --- /dev/null +++ b/fighters/dolly/src/status/special_s.rs @@ -0,0 +1,45 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S // + +pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND // + +pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B // + +pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND // + +pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, init_special_s_command); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, init_special_b); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, init_special_b_command); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special.rs b/fighters/dolly/src/status/super_special.rs new file mode 100644 index 0000000000..57bd5c8829 --- /dev/null +++ b/fighters/dolly/src/status/super_special.rs @@ -0,0 +1,16 @@ +use super::*; +use globals::*; + +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL // + +pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2CValue { + // Only use meter if you didn't cancel directly from a different super + if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { + MeterModule::drain(fighter.battle_object, 4); + } + smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, pre_superspecial); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special2.rs b/fighters/dolly/src/status/super_special2.rs new file mode 100644 index 0000000000..dea2eef9f0 --- /dev/null +++ b/fighters/dolly/src/status/super_special2.rs @@ -0,0 +1,16 @@ +use super::*; +use globals::*; + +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 // + +pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2CValue { + // Only use meter if you didn't cancel directly from a different supper + if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { + MeterModule::drain(fighter.battle_object, 4); + } + smashline::original_status(Pre, fighter, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, pre_superspecial2); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/turn_dash.rs b/fighters/dolly/src/status/turn_dash.rs new file mode 100644 index 0000000000..cb959f91c7 --- /dev/null +++ b/fighters/dolly/src/status/turn_dash.rs @@ -0,0 +1,33 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_TURN_DASH // + +pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { + app::FighterSpecializer_Dolly::update_opponent_lr_1on1( + fighter.module_accessor, + *FIGHTER_STATUS_KIND_TURN_DASH, + ); + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); +} \ No newline at end of file diff --git a/fighters/dolly/src/status/wait.rs b/fighters/dolly/src/status/wait.rs new file mode 100644 index 0000000000..a0f2187bb9 --- /dev/null +++ b/fighters/dolly/src/status/wait.rs @@ -0,0 +1,61 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_WAIT // + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() + * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("walk_stick_x"), + ); + let squat_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("squat_stick_y"), + ); + + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, + ) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file diff --git a/fighters/dolly/src/wave/acmd.rs b/fighters/dolly/src/wave/acmd.rs new file mode 100644 index 0000000000..369bcd44a0 --- /dev/null +++ b/fighters/dolly/src/wave/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_hit(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(fighter) { + MeterModule::add(owner_module_accessor.object(), 8.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_hit", game_hit); +} \ No newline at end of file diff --git a/fighters/dolly/src/wave/mod.rs b/fighters/dolly/src/wave/mod.rs new file mode 100644 index 0000000000..8079f0a753 --- /dev/null +++ b/fighters/dolly/src/wave/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut smashline::Agent::new("dolly_wave"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 6e9ebf702a76814c67fd32b0649ed0711e5c7d7c Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Mon, 25 Mar 2024 11:01:48 -0400 Subject: [PATCH 109/172] gnw article adjustments --- .../src/breath/{acmd/aerials.rs => acmd.rs} | 0 fighters/gamewatch/src/breath/acmd/mod.rs | 7 ----- fighters/gamewatch/src/opff.rs | 30 +------------------ .../parachute/{acmd/specials.rs => acmd.rs} | 0 fighters/gamewatch/src/parachute/acmd/mod.rs | 7 ----- .../src/rescue/{acmd/specials.rs => acmd.rs} | 0 fighters/gamewatch/src/rescue/acmd/mod.rs | 7 ----- 7 files changed, 1 insertion(+), 50 deletions(-) rename fighters/gamewatch/src/breath/{acmd/aerials.rs => acmd.rs} (100%) delete mode 100644 fighters/gamewatch/src/breath/acmd/mod.rs rename fighters/gamewatch/src/parachute/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/gamewatch/src/parachute/acmd/mod.rs rename fighters/gamewatch/src/rescue/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/gamewatch/src/rescue/acmd/mod.rs diff --git a/fighters/gamewatch/src/breath/acmd/aerials.rs b/fighters/gamewatch/src/breath/acmd.rs similarity index 100% rename from fighters/gamewatch/src/breath/acmd/aerials.rs rename to fighters/gamewatch/src/breath/acmd.rs diff --git a/fighters/gamewatch/src/breath/acmd/mod.rs b/fighters/gamewatch/src/breath/acmd/mod.rs deleted file mode 100644 index d952ff14d4..0000000000 --- a/fighters/gamewatch/src/breath/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod aerials; - -pub fn install(agent: &mut Agent) { - aerials::install(agent); -} \ No newline at end of file diff --git a/fighters/gamewatch/src/opff.rs b/fighters/gamewatch/src/opff.rs index 4bfdba832f..a2fe8d4493 100644 --- a/fighters/gamewatch/src/opff.rs +++ b/fighters/gamewatch/src/opff.rs @@ -127,34 +127,6 @@ pub unsafe fn gamewatch_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -unsafe extern "C" fn box_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_GAMEWATCH_BOMB { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let gnw = utils::util::get_battle_object_from_id(owner_id); - let gnw_boma = &mut *(*gnw).module_accessor; - if gnw_boma.is_motion(Hash40::new("attack_air_f")) { - let gnw_fighter = utils::util::get_fighter_common_from_accessor(gnw_boma); - if let Some(info) = FrameInfo::update_and_get(gnw_fighter) { - if info.frame < 10.0 { - ModelModule::set_scale(weapon.module_accessor, 0.75); - } - else { - ModelModule::set_scale(weapon.module_accessor, 1.1); - } - } - } - } -} - pub fn install(agent: &mut Agent) { - smashline::Agent::new("gamewatch") - .on_line(Main, gamewatch_frame_wrapper) - .install(); - - smashline::Agent::new("gamewatch_box") - .on_line(Main, box_callback) - .install(); + agent.on_line(Main, gamewatch_frame_wrapper); } diff --git a/fighters/gamewatch/src/parachute/acmd/specials.rs b/fighters/gamewatch/src/parachute/acmd.rs similarity index 100% rename from fighters/gamewatch/src/parachute/acmd/specials.rs rename to fighters/gamewatch/src/parachute/acmd.rs diff --git a/fighters/gamewatch/src/parachute/acmd/mod.rs b/fighters/gamewatch/src/parachute/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/gamewatch/src/parachute/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/gamewatch/src/rescue/acmd/specials.rs b/fighters/gamewatch/src/rescue/acmd.rs similarity index 100% rename from fighters/gamewatch/src/rescue/acmd/specials.rs rename to fighters/gamewatch/src/rescue/acmd.rs diff --git a/fighters/gamewatch/src/rescue/acmd/mod.rs b/fighters/gamewatch/src/rescue/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/gamewatch/src/rescue/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file From 5ff71a37aca808e8fe0f59600a31185c1bdb3e27 Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 14:05:29 -0500 Subject: [PATCH 110/172] yung lonk --- fighters/younglink/src/acmd/aerials.rs | 254 ++++++++-------- fighters/younglink/src/acmd/ground.rs | 179 ++++++----- fighters/younglink/src/acmd/mod.rs | 16 +- fighters/younglink/src/acmd/other.rs | 312 +++++--------------- fighters/younglink/src/acmd/smashes.rs | 212 +++++++------ fighters/younglink/src/acmd/specials.rs | 148 ++++------ fighters/younglink/src/acmd/throws.rs | 183 ++++++++---- fighters/younglink/src/acmd/tilts.rs | 90 +++--- fighters/younglink/src/boomerang/acmd.rs | 18 ++ fighters/younglink/src/boomerang/mod.rs | 9 + fighters/younglink/src/lib.rs | 17 +- fighters/younglink/src/opff.rs | 6 +- fighters/younglink/src/status.rs | 246 +-------------- fighters/younglink/src/status/attack_s4.rs | 12 + fighters/younglink/src/status/special_hi.rs | 225 ++++++++++++++ 15 files changed, 894 insertions(+), 1033 deletions(-) create mode 100644 fighters/younglink/src/boomerang/acmd.rs create mode 100644 fighters/younglink/src/boomerang/mod.rs create mode 100644 fighters/younglink/src/status/attack_s4.rs create mode 100644 fighters/younglink/src/status/special_hi.rs diff --git a/fighters/younglink/src/acmd/aerials.rs b/fighters/younglink/src/acmd/aerials.rs index accdbcfe1d..2287210a87 100644 --- a/fighters/younglink/src/acmd/aerials.rs +++ b/fighters/younglink/src/acmd/aerials.rs @@ -1,242 +1,230 @@ - use super::*; -unsafe extern "C" fn younglink_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 10.0, 361, 105, 0, 20, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 105, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 361, 105, 0, 20, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 361, 105, 0, 20, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 105, 0, 20, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 361, 105, 0, 20, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 10, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 100, 0, 10, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 361, 100, 0, 10, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 100, 0, 10, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.23/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.23/(3.0-1.0)); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 367, 30, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 6.0, 367, 30, 0, 35, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 367, 30, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(24.0-16.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(24.0-16.0)); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 8.0, 50, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 50, 100, 0, 45, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 8.0, 50, 100, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 49.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 13); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 13); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn younglink_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 5.0, 365, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 5.0, 75, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 5.0, 365, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 5.0, 365, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 5.0, 75, 100, 40, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 5.0, 75, 100, 40, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 8.0, 55, 75, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 55, 75, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 8.0, 55, 75, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn younglink_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 80, 85, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 80, 85, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 80, 85, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 12.0, 80, 80, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.0, 80, 80, 0, 25, 3.4, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 80, 80, 0, 25, 3.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn attack_air_lw2_bounce(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let bounce_speed = Vector3f {x: 0.0, y: 1.8, z: 0.0}; - KineticModule::add_speed(boma, &bounce_speed); - } } -unsafe extern "C" fn attack_air_lw2_attack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - // these are the same as the weak hits below - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 80, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 281, 83, 0, 30, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } -} - -unsafe extern "C" fn younglink_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 16.0, 281, 50, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 281, 50, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0);{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 70, 100, 0, 45, 4.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 18.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 281, 83, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 281, 60, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 281, 60, 0, 30, 3.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 41.0);{ - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } } - frame(lua_state, 67.0);{ - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - AttackModule::clear_all(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + AttackModule::clear_all(boma); + } } -} frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_SET_ATTACK); } frame(lua_state, 72.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn game_attackairlw2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + // these are the same as the weak hits below + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 80, 4.0, 0.0, 3.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 281, 83, 0, 30, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } } -unsafe extern "C" fn younglink_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_attackairlw2bound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let bounce_speed = Vector3f {x: 0.0, y: 1.8, z: 0.0}; + KineticModule::add_speed(boma, &bounce_speed); + } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attackairn", younglink_attack_air_n_game) - .acmd("game_attackairf", younglink_attack_air_f_game) - .acmd("expression_attackairf", younglink_attack_air_f_expression) - .acmd("game_attackairb", younglink_attack_air_b_game) - .acmd("game_attackairhi", younglink_attack_air_hi_game) - .acmd("game_attackairlw2bound", attack_air_lw2_bounce) - .acmd("game_attackairlw2attack", attack_air_lw2_attack) - .acmd("game_attackairlw", younglink_attack_air_lw_game) - .acmd("game_aircatchlanding", younglink_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw2attack", game_attackairlw2attack); + agent.acmd("game_attackairlw2bound", game_attackairlw2bound); } diff --git a/fighters/younglink/src/acmd/ground.rs b/fighters/younglink/src/acmd/ground.rs index fc5b6132d4..821f0ae87c 100644 --- a/fighters/younglink/src/acmd/ground.rs +++ b/fighters/younglink/src/acmd/ground.rs @@ -1,168 +1,163 @@ - use super::*; -unsafe extern "C" fn younglink_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 361, 15, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 2.0, 361, 25, 0, 25, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 361, 15, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } -unsafe extern "C" fn younglink_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.0, 80, 15, 0, 32, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 2.0, 75, 25, 0, 32, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.0, 80, 15, 0, 32, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn younglink_attack_13_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 75, 3.0, 5.5, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.5, 361, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 75, 3.0, 5.5, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.5, 361, 70, 0, 70, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.5, 361, 70, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } - } -unsafe extern "C" fn younglink_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 70, 70, 0, 60, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::on_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 70, 70, 0, 60, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 50, 80, 0, 50, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 80, 0, 50, 4.5, 0.0, 5.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - FT_MOTION_RATE_RANGE(fighter, 22.0, 47.0, 18.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 22.0, 47.0, 18.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); - VarModule::off_flag(fighter.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); + VarModule::off_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); } frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 5, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("top"), 0, 4.5, 0, 0, 0, -90, 0.63, false, 0.2); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } frame(lua_state, 35.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.6); } } -unsafe extern "C" fn younglink_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let rng = sv_math::rand(hash40("fighter"), 3) as i32; if rng == 2 { - PLAY_SE(fighter, Hash40::new("vc_younglink_appeal_h01")); + PLAY_SE(agent, Hash40::new("vc_younglink_appeal_h01")); } else { - PLAY_SE(fighter, Hash40::new("vc_younglink_attack01")); + PLAY_SE(agent, Hash40::new("vc_younglink_attack01")); } } } -unsafe extern "C" fn younglink_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attack11", younglink_attack_11_game) - .acmd("game_attack12", younglink_attack_12_game) - .acmd("game_attack13", younglink_attack_13_game) - .acmd("game_attackdash", younglink_attack_dash_game) - .acmd("effect_attackdash", younglink_attack_dash_effect) - .acmd("sound_attackdash", younglink_attack_dash_sound) - .acmd("expression_attackdash", younglink_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/younglink/src/acmd/mod.rs b/fighters/younglink/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/younglink/src/acmd/mod.rs +++ b/fighters/younglink/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/younglink/src/acmd/other.rs b/fighters/younglink/src/acmd/other.rs index dec73d7151..c89b33dec5 100644 --- a/fighters/younglink/src/acmd/other.rs +++ b/fighters/younglink/src/acmd/other.rs @@ -1,323 +1,145 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} } - } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); - } - -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02"));} - } - -} - -unsafe extern "C" fn younglink_appeal_lw_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.500); - } - frame(lua_state, 61.0); - if is_excute(fighter) { - if DamageModule::damage(boma, 0) > 2.5 { - DamageModule::add_damage(boma, -2.5, 0); - } - } - frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); } - } -unsafe extern "C" fn younglink_appeal_lw_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.500); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.500); } frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { if DamageModule::damage(boma, 0) > 2.5 { DamageModule::add_damage(boma, -2.5, 0); } } frame(lua_state, 71.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } - } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_younglink_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_younglink_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_younglink_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_younglink_step_left_m")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_younglink_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_younglink_step_right_m")); } - } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn younglink_boomerang_game_fly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.8, 75, 30, 0, 75, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 70, 30, 0, 55, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); -} + agent.acmd("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); -unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.5); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); - } - frame(lua_state, 12.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); - WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); - } - frame(lua_state, 46.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 53.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 72.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -pub fn install() { - smashline::Agent::new("younglink_boomerang") - .acmd("game_fly", younglink_boomerang_game_fly) - .install(); - smashline::Agent::new("younglink") - .acmd("game_aircatch", game_aircatch) - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_appeallwr", younglink_appeal_lw_r_game) - .acmd("game_appeallwl", younglink_appeal_lw_l_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/younglink/src/acmd/smashes.rs b/fighters/younglink/src/acmd/smashes.rs index 93a274d96d..5963b451f7 100644 --- a/fighters/younglink/src/acmd/smashes.rs +++ b/fighters/younglink/src/acmd/smashes.rs @@ -1,24 +1,39 @@ use super::*; -unsafe extern "C" fn younglink_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.8, 0.5, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.5, 5.4, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.8, 0.5, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 48, 100, 0, 33, 3.5, 5.4, 1.0, 1.7, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn younglink_attack_s4_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); + } + wait(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_younglink_attack03")); + PLAY_SE(agent, Hash40::new("se_common_smashswing_03")); + PLAY_SE(agent, Hash40::new("se_younglink_swing_ll")); + } +} + +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -51,7 +66,7 @@ unsafe extern "C" fn younglink_attack_s4_s_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn younglink_attack_s4_charge_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -63,92 +78,75 @@ unsafe extern "C" fn younglink_attack_s4_charge_expression(agent: &mut L2CAgentB if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - -} - -unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_02")); - } - wait(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_younglink_attack03")); - PLAY_SE(agent, Hash40::new("se_common_smashswing_03")); - PLAY_SE(agent, Hash40::new("se_younglink_swing_ll")); - } } -unsafe extern "C" fn younglink_attack_hi4_game (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 33, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.0, 95, 100, 23, 0, 3.2, 0.0, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 4.0, 149, 100, 23, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 4.0, 105, 100, 48, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 6.0, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 4.0, 105, 100, 33, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.0, 95, 100, 23, 0, 3.2, 0.0, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 4.0, 149, 100, 23, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 4.0, 105, 100, 48, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 6.0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.8, 1.0, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.5, 5.6, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0, 100, 108, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 100, 108, 0, 75, 3.5, 0.0, 8.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.8, 1.0, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 100, 108, 0, 75, 3.5, 5.6, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0, 100, 108, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 100, 108, 0, 75, 3.5, 0.0, 8.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 31.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 50.0); - FT_MOTION_RATE_RANGE(fighter, 50.0, 60.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 50.0, 60.0, 7.0); frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("younglink_sword3"), Hash40::new("younglink_sword2"), 4, Hash40::new("sword"), 0.5, 0.0, 0.0, Hash40::new("sword"), 9.7, 0.0, -0.25, true, Hash40::new("younglink_sword_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.6, 0.2); } frame(lua_state, 29.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 40.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } -unsafe extern "C" fn younglink_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -167,79 +165,79 @@ unsafe extern "C" fn younglink_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn younglink_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 37.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn younglink_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 30, 95, 0, 30, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 30, 95, 0, 30, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 13.0, 30, 93, 0, 30, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 30, 95, 0, 25, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 30, 95, 0, 25, 3.4, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 30, 93, 0, 25, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attacks4", younglink_attack_s4_s_game) - .acmd("expression_attacks4", younglink_attack_s4_s_expression) - .acmd("expression_attacks4charge", younglink_attack_s4_charge_expression) - .acmd("game_attackhi4", younglink_attack_hi4_game) - .acmd("effect_attackhi4", younglink_attack_hi4_effect) - .acmd("sound_attackhi4", younglink_attack_hi4_sound) - .acmd("expression_attackhi4", younglink_attack_hi4_expression) - .acmd("game_attacklw4", younglink_attack_lw4_game) - .acmd("sound_attacks4", sound_attacks4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("expression_attacks4charge", expression_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", younglink_attack_lw4_game); } diff --git a/fighters/younglink/src/acmd/specials.rs b/fighters/younglink/src/acmd/specials.rs index bab10b2871..61ad1ad3bc 100644 --- a/fighters/younglink/src/acmd/specials.rs +++ b/fighters/younglink/src/acmd/specials.rs @@ -1,157 +1,127 @@ - use super::*; -unsafe extern "C" fn younglink_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.54/(5.0-1.0)); + FT_MOTION_RATE(agent, 1.54/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, false, 0); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 31.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.54/(5.0-1.0)); + FT_MOTION_RATE(agent, 1.54/(5.0-1.0)); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !ArticleModule::is_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG) { ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, false, 0); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_BOOMERANG, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } - } -unsafe extern "C" fn younglink_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 2.2, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 5.7, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 1.0, 173, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 80, 100, 10, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 2.2, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 1.0, 173, 100, 55, 0, 3.5, 5.7, 0.0, 1.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("arml"), 1.0, 173, 100, 55, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 80, 100, 10, 0, 3.0, 0.0, 5.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 85, 0, 90, 4.0, 0.0, 7.0, -11.0, Some(0.0), Some(4.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 85, 0, 90, 4.0, 0.0, 7.0, -11.0, Some(0.0), Some(4.5), Some(8.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 66.0); - FT_MOTION_RATE(fighter, 9.0/(70.0-66.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 9.0/(70.0-66.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn younglink_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 20, 4.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 66.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_RSLASH_FLAG_RESET_SPEED_MAX_X); } - } -unsafe extern "C" fn younglink_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - if VarModule::get_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 1); + if VarModule::get_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { + VarModule::set_int(agent.battle_object, vars::common::instance::GIMMICK_TIMER, 1); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_BOMBCHU), 0, 0, false, false); - } - else { + } else { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); } - } - else { + } else { WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); } } - } -unsafe extern "C" fn younglink_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 17.0); - if is_excute(fighter) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - if VarModule::get_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER) == 0 { - VarModule::set_int(fighter.battle_object, vars::common::instance::GIMMICK_TIMER, 1); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_BOMBCHU), 0, 0, false, false); - } - else { - WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); - } - } - else { - WorkModule::on_flag(boma, *FIGHTER_LINK_STATUS_WORK_ID_FLAG_BOMB_GENERATE_LINKBOMB); - } - } - -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_specials1", younglink_special_s1_game) - .acmd("game_specialairs1", younglink_special_air_s1_game) - .acmd("game_specialhi", younglink_special_hi_game) - .acmd("game_specialairhi", younglink_special_air_hi_game) - .acmd("game_speciallw", younglink_special_lw_game) - .acmd("game_specialairlw", younglink_special_air_lw_game) - .install(); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/younglink/src/acmd/throws.rs b/fighters/younglink/src/acmd/throws.rs index 3ae7d992af..39c13bfba0 100644 --- a/fighters/younglink/src/acmd/throws.rs +++ b/fighters/younglink/src/acmd/throws.rs @@ -1,116 +1,173 @@ use super::*; -unsafe extern "C" fn younglink_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 187, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); + WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); + } + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 53.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 72.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 45, 187, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 3.5, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_catch_only_all(fighter.module_accessor, true, false); - CHECK_FINISH_CAMERA(fighter, 21, 11); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 3.5, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_catch_only_all(agent.module_accessor, true, false); + CHECK_FINISH_CAMERA(agent, 21, 11); } frame(lua_state, 13.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } -unsafe extern "C" fn younglink_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 130, 105, 0, 35, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 130, 105, 0, 35, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 3.1, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 361, 0, 120, 0, 2.7, 3.1, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -14, 11); + CHECK_FINISH_CAMERA(agent, -14, 11); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn younglink_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 80, 100, 0, 55, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 4.0, 20, 100, 0, 50, 3.1, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 4, 21); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 4, 21); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn younglink_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2, 2); - FT_LEAVE_NEAR_OTTOTTO(fighter, 2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 138, 68, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2, 2); + FT_LEAVE_NEAR_OTTOTTO(agent, 2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 138, 68, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 60, 5.5, 0.0, 3.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 150, 0, 60, 5.5, 0.0, 3.0, -3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - let opponent_boma = fighter.get_grabbed_opponent_boma(); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_throwf", younglink_throw_f_game) - .acmd("game_throwb", younglink_throw_b_game) - .acmd("game_throwhi", younglink_throw_hi_game) - .acmd("game_throwlw", younglink_throw_lw_game) - .install(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", null); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/younglink/src/acmd/tilts.rs b/fighters/younglink/src/acmd/tilts.rs index c9090a965b..99760dd914 100644 --- a/fighters/younglink/src/acmd/tilts.rs +++ b/fighters/younglink/src/acmd/tilts.rs @@ -1,67 +1,63 @@ - use super::*; -unsafe extern "C" fn younglink_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.0, 361, 88, 0, 30, 3.5, 1.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.0, 361, 88, 0, 30, 3.5, 6.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 88, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.0, 361, 88, 0, 30, 3.5, 1.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.0, 361, 88, 0, 30, 3.5, 6.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 88, 0, 25, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn younglink_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 40, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 8.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword"), 9.0, 276, 85, 0, 45, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 9.0, 276, 60, 0, 30, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.0, 85, 90, 0, 50, 3.5, 1.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 85, 88, 0, 50, 3.5, 6.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("bust"), 8.0, 85, 86, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - wait(lua_state, 3.0); - if is_excute(fighter) { + wait(lua_state, 6.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 11.0);{ - FT_MOTION_RATE(fighter, 3.0); -} - frame(lua_state, 13.0);{ -FT_MOTION_RATE(fighter, 1.0); -} } -unsafe extern "C" fn younglink_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.0, 85, 90, 0, 50, 3.5, 1.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 85, 88, 0, 50, 3.5, 6.0, 0.0, -1.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 8.0, 85, 86, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 80, 40, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 0.7, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 4.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword"), 9.0, 80, 40, 0, 70, 2.5, 8.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 9.0, 276, 85, 0, 45, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 9.0, 276, 60, 0, 30, 2.0, 9.0, 0.7, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } - wait(lua_state, 6.0); - if is_excute(fighter) { + wait(lua_state, 3.0); + if is_excute(agent) { AttackModule::clear_all(boma); } - + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 3.0); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("younglink") - .acmd("game_attacks3", younglink_attack_s3_s_game) - .acmd("game_attacklw3", younglink_attack_lw3_game) - .acmd("game_attackhi3", younglink_attack_hi3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/younglink/src/boomerang/acmd.rs b/fighters/younglink/src/boomerang/acmd.rs new file mode 100644 index 0000000000..bbfba28242 --- /dev/null +++ b/fighters/younglink/src/boomerang/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.8, 75, 30, 0, 75, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 70, 30, 0, 55, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/younglink/src/boomerang/mod.rs b/fighters/younglink/src/boomerang/mod.rs new file mode 100644 index 0000000000..b9458f01fb --- /dev/null +++ b/fighters/younglink/src/boomerang/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("younglink_boomerang"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/younglink/src/lib.rs b/fighters/younglink/src/lib.rs index 8e2ddcc726..a41ccb2176 100644 --- a/fighters/younglink/src/lib.rs +++ b/fighters/younglink/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod boomerang; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("younglink"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + boomerang::install(); } diff --git a/fighters/younglink/src/opff.rs b/fighters/younglink/src/opff.rs index 9e08cafeff..f2e4f8cc63 100644 --- a/fighters/younglink/src/opff.rs +++ b/fighters/younglink/src/opff.rs @@ -128,8 +128,6 @@ pub unsafe fn younglink_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("younglink") - .on_line(Main, younglink_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, younglink_frame_wrapper); } diff --git a/fighters/younglink/src/status.rs b/fighters/younglink/src/status.rs index f6ea59d676..fd99eaaa48 100644 --- a/fighters/younglink/src/status.rs +++ b/fighters/younglink/src/status.rs @@ -1,246 +1,10 @@ use super::*; use globals::*; +mod attack_s4; +mod special_hi; -// FIGHTER_STATUS_KIND_SPECIAL_HI // - -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - } - let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 - } else { - 0 as u64 - }; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - 0, - 0, - 0, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // - -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - } - fighter.sub_shift_status_main(L2CValue::Ptr(specialhi_end_Main as *const () as _)) -} - -unsafe extern "C" fn specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.55; - - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if link_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if !StatusModule::is_changing(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); - return 0.into() - } - } - if frame < 46.0 { - if stick_x != 0.0 { - KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - return 0.into() -} - -unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if link_situation_helper(fighter).get_bool() { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} - -// override vanilla shield visibility on forward smash -unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_AttackS4() -} - -pub fn install() { - smashline::Agent::new("younglink") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status( - Pre, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - pre_specialhi_end, - ) - .status( - Main, - *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, - specialhi_end, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4, - attack_s4_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + attack_s4::install(agent); + special_hi::install(agent); } diff --git a/fighters/younglink/src/status/attack_s4.rs b/fighters/younglink/src/status/attack_s4.rs new file mode 100644 index 0000000000..7b798a6528 --- /dev/null +++ b/fighters/younglink/src/status/attack_s4.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4 + +// override vanilla shield visibility on forward smash +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_AttackS4() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); +} diff --git a/fighters/younglink/src/status/special_hi.rs b/fighters/younglink/src/status/special_hi.rs new file mode 100644 index 0000000000..9cb2cf0de9 --- /dev/null +++ b/fighters/younglink/src/status/special_hi.rs @@ -0,0 +1,225 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + let start_speed = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "param_special_hi.start_x_mul"); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + } + let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 + } else { + 0 as u64 + }; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + 0, + 0, + 0, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +// FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END // + +unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.55; + + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if link_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if !StatusModule::is_changing(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LINK_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_specialhi_end_Main as *const () as _)); + return 0.into() + } + } + if frame < 46.0 { + if stick_x != 0.0 { + KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn sub_specialhi_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if link_situation_helper(fighter).get_bool() { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if link_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + + agent.status(Pre, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); +} From af3bce6096ea202b437e16bd111b2d435409ea1d Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 15:19:33 -0400 Subject: [PATCH 111/172] luigi crate --- fighters/luigi/src/acmd/aerials.rs | 156 ++++---- fighters/luigi/src/acmd/ground.rs | 146 ++++--- fighters/luigi/src/acmd/mod.rs | 16 +- fighters/luigi/src/acmd/other.rs | 204 +++++----- fighters/luigi/src/acmd/smashes.rs | 210 +++++------ fighters/luigi/src/acmd/specials.rs | 502 ++++++++++++------------- fighters/luigi/src/acmd/throws.rs | 62 ++- fighters/luigi/src/acmd/tilts.rs | 92 +++-- fighters/luigi/src/lib.rs | 15 +- fighters/luigi/src/obakyumu/acmd.rs | 13 + fighters/luigi/src/obakyumu/mod.rs | 9 + fighters/luigi/src/opff.rs | 12 +- fighters/luigi/src/status.rs | 31 +- fighters/luigi/src/status/special_n.rs | 6 +- 14 files changed, 721 insertions(+), 753 deletions(-) create mode 100644 fighters/luigi/src/obakyumu/acmd.rs create mode 100644 fighters/luigi/src/obakyumu/mod.rs diff --git a/fighters/luigi/src/acmd/aerials.rs b/fighters/luigi/src/acmd/aerials.rs index 5b8e61f1f0..481425b3f6 100644 --- a/fighters/luigi/src/acmd/aerials.rs +++ b/fighters/luigi/src/acmd/aerials.rs @@ -1,88 +1,88 @@ use super::*; -unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 90, 121, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 90, 121, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 90, 121, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 90, 121, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 8.0, 80, 100, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.0, 80, 100, 0, 20, 4.5, 1.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 8.0, 80, 100, 0, 20, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 88, 0, 43, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 5.5, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 14.0, 361, 88, 0, 43, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 14.0, 361, 88, 0, 43, 5.5, 3.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HARISEN, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 8.0/(33.0-21.0)); + FT_MOTION_RATE(agent, 8.0/(33.0-21.0)); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 361, 94, 0, 22, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 361, 94, 0, 22, 5.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 100, 0, 25, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.250); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 361, 103, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.250); + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 361, 103, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 103, 0, 20, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -102,24 +102,24 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 11.0, 70, 100, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 70, 100, 0, 25, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 11.0, 70, 100, 0, 25, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 70, 100, 0, 25, 4.0, 3.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -134,65 +134,63 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("hip"), 16.0, 270, 107, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 16.0, 270, 107, 0, 20, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 0, 0, Hash40::new("hip"), 16.0, 270, 55, 0, 10, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 16.0, 270, 55, 0, 10, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 25, 5.2, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 25, 5.2, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 25, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 110, 0, 25, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::clear(boma, 1, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 5.0/(32.0-24.0)); + FT_MOTION_RATE(agent, 5.0/(32.0-24.0)); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attackairn", game_attackairn) - .acmd("game_attackairf", game_attackairf) - .acmd("game_attackairb", game_attackairb) - .acmd("effect_attackairb", effect_attackairb) - .acmd("game_attackairhi", game_attackairhi) - .acmd("effect_attackairhi", effect_attackairhi) - .acmd("expression_attackairhi", expression_attackairhi) - .acmd("game_attackairlw", game_attackairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/luigi/src/acmd/ground.rs b/fighters/luigi/src/acmd/ground.rs index 3b14339700..2613bd78f9 100644 --- a/fighters/luigi/src/acmd/ground.rs +++ b/fighters/luigi/src/acmd/ground.rs @@ -1,147 +1,145 @@ use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 2.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 2.0, 83, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0, 83, 100, 20, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.0, 85, 100, 20, 0, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 20, 3.0, 0.0, 3.5, 4.0, Some(0.0), Some(3.5), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn game_attack13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 5.0, 0.0, 8.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 3.5, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 5.0, 0.0, 8.5, 9.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 100, 0, 30, 3.5, 0.0, 7.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn expression_attack13(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_attack_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.81); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 10, 0, 38, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 10, 0, 60, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 15, 10, 0, 24, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 10, 10, 0, 48, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 15, 10, 0, 24, 3.6, 0.0, 8.2, 8.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 10, 10, 0, 48, 4.0, 0.0, 8.2, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 5.0, 0.0, 8.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 4.0, 0.0, 8.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 5.0, 0.0, 8.0, 12.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 128, 0, 60, 4.0, 0.0, 8.0, 5.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUIGI_ATTACKDASH, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attack13", game_attack13) - .acmd("expression_attack13", expression_attack13) - .acmd("game_attackdash", game_attack_dash) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/luigi/src/acmd/mod.rs b/fighters/luigi/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/luigi/src/acmd/mod.rs +++ b/fighters/luigi/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/luigi/src/acmd/other.rs b/fighters/luigi/src/acmd/other.rs index 436a31c832..259690c30b 100644 --- a/fighters/luigi/src/acmd/other.rs +++ b/fighters/luigi/src/acmd/other.rs @@ -1,179 +1,179 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_luigi_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_luigi_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn luigi_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn luigi_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 13.0, 5.0); - if is_excute(fighter) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 5.0); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -188,68 +188,52 @@ unsafe extern "C" fn luigi_catch_game(fighter: &mut L2CAgentBase) { ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, (13.0-1.0)/5.0); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, 1.0); GrabModule::set_rebound(boma, true); - SEARCH(fighter, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); + SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { //CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); //ArticleModule::shoot(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn luigi_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_plunger_shoot")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_plunger_shoot")); } } - -unsafe extern "C" fn luigi_obakyumu_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("vacuum"), 4.0, 0.0, 0.0, 0, 90, 90, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - } -} - -pub fn install() { - smashline::Agent::new("luigi") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", luigi_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_catch", luigi_catch_game) - .acmd("sound_catch", luigi_catch_sound) - .install(); - smashline::Agent::new("luigi_obakyumu") - .acmd("effect_catch", luigi_obakyumu_catch_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_catch", game_catch); + agent.acmd("sound_catch", sound_catch); } diff --git a/fighters/luigi/src/acmd/smashes.rs b/fighters/luigi/src/acmd/smashes.rs index bcc14b90c8..f62a89d649 100644 --- a/fighters/luigi/src/acmd/smashes.rs +++ b/fighters/luigi/src/acmd/smashes.rs @@ -1,201 +1,199 @@ use super::*; -unsafe extern "C" fn game_attacks4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attacks4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attacks4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 15.0, 37, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 37, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 37, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attacks4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 7, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 1.1, true, *EF_FLIP_YZ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0, 8.7, 1, 24, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); EffectModule::set_scale_last(boma, &Vector3f::new(0.5, 1.0, 0.5)); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), true, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_thunder"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, false); } } -unsafe extern "C" fn game_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("snout"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("head"), 14.0, 110, 106, 0, 35, 4.8, 2.8, -1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 12.0, 110, 106, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("snout"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("head"), 14.0, 110, 106, 0, 35, 4.8, 2.8, -1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("hip"), 12.0, 110, 106, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 87, 90, 0, 51, 5.0, 0.0, 3.6, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 87, 90, 0, 51, 4.5, 0.0, 3.6, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 87, 90, 0, 51, 5.0, 0.0, 3.6, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 87, 90, 0, 51, 4.5, 0.0, 3.6, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 87, 104, 0, 51, 5.0, 0.0, 3.6, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 87, 104, 0, 51, 4.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 87, 104, 0, 51, 5.0, 0.0, 3.6, -12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 87, 104, 0, 51, 4.5, 0.0, 3.6, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attacks4hi", game_attacks4hi) - .acmd("effect_attacks4hi", effect_attacks4hi) - .acmd("game_attacks4", game_attacks4) - .acmd("effect_attacks4", effect_attacks4) - .acmd("game_attacks4lw", game_attacks4lw) - .acmd("effect_attacks4lw", effect_attacks4lw) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/luigi/src/acmd/specials.rs b/fighters/luigi/src/acmd/specials.rs index 8d2f79a358..a7d773f596 100644 --- a/fighters/luigi/src/acmd/specials.rs +++ b/fighters/luigi/src/acmd/specials.rs @@ -1,87 +1,87 @@ use super::*; -unsafe extern "C" fn luigi_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); } } -unsafe extern "C" fn luigi_special_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); - FLASH(fighter, 0, 1, 0, 0.353); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_fb_shoot"), Hash40::new("havel"), 0, 0, 0, -30, 0, 0, 1, true); + FLASH(agent, 0, 1, 0, 0.353); } frame(lua_state, 19.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("luigi_fb_shoot"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); } } -unsafe extern "C" fn luigi_special_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_luigi_special_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); } } -unsafe extern "C" fn luigi_special_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn luigi_special_n_thunder_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 9.0, 8.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 9.0, 2.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 5.0, 0.0, 9.0, 8.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 68, 55, 0, 65, 3.0, 0.0, 9.0, 2.0, None, None, None, 0.45, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PUNCH); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 5, 15, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let mut rand = &Vector3f::new( app::sv_math::rand(hash40("fighter"), 50) as f32, app::sv_math::rand(hash40("stage"), 50) as f32, @@ -92,238 +92,238 @@ unsafe extern "C" fn luigi_special_n_thunder_effect(fighter: &mut L2CAgentBase) if app::sv_math::rand(hash40("stage"), 1) == 0 { -1 } else { 1 } as f32, if app::sv_math::rand(hash40("luigi"), 1) == 0 { -1 } else { 1 } as f32 ); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 0.0 + (rand.x * flip.x), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 120.0 + (rand.y * flip.y), 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_mball_beam"), Hash40::new("top"), 0.0, 9.0, 8.0, 240.0 + (rand.z * flip.z), 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.25, 1.0, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.5, true); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.2, 0.2, 0.2); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FLASH(agent, 0, 0.25, 1.0, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_sp_flash"), Hash40::new("top"), 0.0, 9.0, 8.0, 0, 90, 90, 0.5, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.2, 0.2, 0.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn luigi_special_n_thunder_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_luigi_attack07")); - PLAY_SE(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_luigi_attack07")); + PLAY_SE(agent, Hash40::new("se_common_electric_hit_l")); } } -unsafe extern "C" fn luigi_special_n_thunder_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnthunder(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_55_smash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_specialairsstart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if is_excute(agent) { + if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); } } -unsafe extern "C" fn luigi_special_s_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 2, 15, 5, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); - if VarModule::get_int(fighter.object(), vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE) <= 0 { - LAST_EFFECT_SET_SCALE_W(fighter, 0.8, 0.8, 0.8); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 1.0, 0.0); +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 2, 15, 5, 0, 0, 0, 0.5, true, *EF_FLIP_YZ); + if VarModule::get_int(agent.object(), vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE) <= 0 { + LAST_EFFECT_SET_SCALE_W(agent, 0.8, 0.8, 0.8); + LAST_EFFECT_SET_COLOR(agent, 0.0, 1.0, 0.0); } } } -unsafe extern "C" fn effect_specialshold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); + let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } for _ in 0..100 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 10, 00, 4, 0, 0, 0, false); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.7, 0.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 10, 00, 4, 0, 0, 0, false); + let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); } } wait(lua_state, 10.0); } } -unsafe extern "C" fn effect_specialairshold(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn effect_specialairshold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(fighter.module_accessor) as u32; - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); + let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); + if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } } -unsafe extern "C" fn game_specials(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); - CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); + CORRECT(agent, *GROUND_CORRECT_KIND_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); AttackModule::set_attack_keep_rumble(boma, 0, true); JostleModule::set_status(boma, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 10.0, 361, 80, 0, 30, 4.8, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } } -unsafe extern "C" fn game_specialsdischarge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let misfire_multiplier = VarModule::get_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); - VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); +unsafe extern "C" fn game_specialsdischarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let misfire_multiplier = VarModule::get_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); + VarModule::set_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); - CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); + CORRECT(agent, *GROUND_CORRECT_KIND_AIR); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - AttackModule::set_attack_keep_rumble(fighter.module_accessor, 0, true); - JostleModule::set_status(fighter.module_accessor, false); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + AttackModule::set_attack_keep_rumble(agent.module_accessor, 0, true); + JostleModule::set_status(agent.module_accessor, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } frame(lua_state, 14.0); - if is_excute(fighter) { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); + if is_excute(agent) { + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); } frame(lua_state, 20.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } } -unsafe extern "C" fn effect_specialsdischarge(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("luigi_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.8, 0.0); +unsafe extern "C" fn effect_specialsdischarge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + if is_excute(agent) { + EFFECT(agent, Hash40::new("luigi_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("luigi_rocket_jet2"), Hash40::new("top"), 0, 4, 4, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.7, 0.3); - EffectModule::enable_sync_init_pos_last(fighter.module_accessor); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("luigi_rocket_jet2"), Hash40::new("top"), 0, 4, 4, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); + EffectModule::enable_sync_init_pos_last(agent.module_accessor); } } -unsafe extern "C" fn game_specialairsend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, -5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, -5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 5.5, 0.0, 10.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 90, 80, 0, 50, 6.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 6.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 90, 80, 0, 50, 6.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { //KineticModule::mul_speed(boma, &Vector3f{x: 0.0, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); //KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); @@ -333,21 +333,21 @@ unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if is_excute(agent) { + if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.1, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, 5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, -5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, 5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 9.5, -5.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 30, 0, 80, 6.0, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); //ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 180, 100, 45, 0, 15.5, 0.0, 8.5, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hitVec = Vector2f{ x: 0.0, y: 8.0 }; AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hitVec, 8, false); @@ -355,19 +355,19 @@ unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hitVec, 8, false); } frame(lua_state, 34.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 90, 120, 0, 85, 6.5, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, -9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 70, 120, 0, 85, 7.5, 0.0, 11.0, 9.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 90, 120, 0, 85, 6.5, 0.0, 2.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_LIMIT_X_DEC); WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); WorkModule::on_flag(boma, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_BUOYANCY); @@ -376,107 +376,99 @@ unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_specialairhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } wait(lua_state, 1.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); } frame(lua_state, 10.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_specialn", luigi_special_n_game) - .acmd("game_specialairn", luigi_special_n_game) - .acmd("effect_specialn", luigi_special_n_effect) - .acmd("effect_specialairn", luigi_special_n_effect) - .acmd("sound_specialn", luigi_special_n_sound) - .acmd("sound_specialairn", luigi_special_n_sound) - .acmd("expression_specialn", luigi_special_n_expression) - .acmd("expression_specialairn", luigi_special_n_expression) - .acmd("game_specialnthunder", luigi_special_n_thunder_game) - .acmd("game_specialairnthunder", luigi_special_n_thunder_game) - .acmd("effect_specialnthunder", luigi_special_n_thunder_effect) - .acmd("effect_specialairnthunder", luigi_special_n_thunder_effect) - .acmd("sound_specialnthunder", luigi_special_n_thunder_sound) - .acmd("sound_specialairnthunder", luigi_special_n_thunder_sound) - .acmd( - "expression_specialnthunder", - luigi_special_n_thunder_expression, - ) - .acmd( - "expression_specialairnthunder", - luigi_special_n_thunder_expression, - ) - .acmd("game_specialairsstart", game_specialairsstart) - .acmd("effect_specialsstart", luigi_special_s_start_effect) - .acmd("effect_specialairsstart", luigi_special_s_start_effect) - .acmd("effect_specialshold", effect_specialshold) - .acmd("effect_specialairshold", effect_specialairshold) - .acmd("game_specials", game_specials) - .acmd("game_specialsdischarge", game_specialsdischarge) - .acmd("effect_specialsdischarge", effect_specialsdischarge) - .acmd("game_specialairsend", game_specialairsend) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("game_specialhi", game_specialhi) - .acmd("game_specialairhi", game_specialairhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + agent.acmd("game_specialnthunder", game_specialnthunder); + agent.acmd("game_specialairnthunder", game_specialnthunder); + agent.acmd("effect_specialnthunder", effect_specialnthunder); + agent.acmd("effect_specialairnthunder", effect_specialnthunder); + agent.acmd("sound_specialnthunder", sound_specialnthunder); + agent.acmd("sound_specialairnthunder", sound_specialnthunder); + agent.acmd("expression_specialnthunder",expression_specialnthunder,); + agent.acmd("expression_specialairnthunder",expression_specialnthunder); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("effect_specialshold", effect_specialshold); + agent.acmd("effect_specialairshold", effect_specialairshold); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialsdischarge", game_specialsdischarge); + agent.acmd("effect_specialsdischarge", effect_specialsdischarge); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/luigi/src/acmd/throws.rs b/fighters/luigi/src/acmd/throws.rs index ee3ab4a654..be56ddc577 100644 --- a/fighters/luigi/src/acmd/throws.rs +++ b/fighters/luigi/src/acmd/throws.rs @@ -1,64 +1,62 @@ use super::*; -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { - if is_excute(fighter) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if IS_EXIST_ARTICLE(agent, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, Hash40::new("throw_b"), false, -1.0); } } - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 73, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, 73, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 21, 3); - FT_CATCH_STOP(fighter, 5, 1); + CHECK_FINISH_CAMERA(agent, 21, 3); + FT_CATCH_STOP(agent, 5, 1); } frame(lua_state, 15.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("throw_lw"), false, 0.0); } - FT_LEAVE_NEAR_OTTOTTO(fighter, -1, 1); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_LEAVE_NEAR_OTTOTTO(agent, -1, 1); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 70, 30, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 30, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_HIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 361, 100, 0, 30, 5.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_HIP); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_throwb", game_throwb) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/luigi/src/acmd/tilts.rs b/fighters/luigi/src/acmd/tilts.rs index d16bb43305..ed8a96fe0a 100644 --- a/fighters/luigi/src/acmd/tilts.rs +++ b/fighters/luigi/src/acmd/tilts.rs @@ -1,93 +1,91 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacks3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacks3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 100, 0, 15, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 15, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 10.0, 361, 100, 0, 15, 4.0, 1.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 9.0, 100, 118, 0, 35, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 9.0, 100, 118, 0, 35, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 9.0, 100, 118, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 9.0, 100, 118, 0, 35, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 9.0, 100, 118, 0, 35, 4.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 9.0, 100, 118, 0, 35, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 72, 0, 32, 4.8, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 5.0, 361, 72, 0, 32, 3.8, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 72, 0, 32, 4.8, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 5.0, 361, 72, 0, 32, 3.8, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KAMEHIT, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("luigi") - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("game_attackhi3", game_attackhi3) - .acmd("game_attacklw3", game_attacklw3) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/luigi/src/lib.rs b/fighters/luigi/src/lib.rs index a362adebe0..b077dca39d 100644 --- a/fighters/luigi/src/lib.rs +++ b/fighters/luigi/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod status; pub mod opff; +mod obakyumu; + use smash::{ lib::{ L2CValue, @@ -68,11 +70,12 @@ pub fn calculate_misfire_number(fighter: &mut L2CFighterCommon) { } pub fn install() { - status::install(); - acmd::install(); - opff::install(); + let agent = &mut Agent::new("luigi"); + status::install(agent); + acmd::install(agent); + opff::install(agent); + agent.on_start(luigi_reset); + agent.install(); - smashline::Agent::new("luigi") - .on_start(luigi_reset) - .install(); + obakyumu::install(); } diff --git a/fighters/luigi/src/obakyumu/acmd.rs b/fighters/luigi/src/obakyumu/acmd.rs new file mode 100644 index 0000000000..4b3f0bdb15 --- /dev/null +++ b/fighters/luigi/src/obakyumu/acmd.rs @@ -0,0 +1,13 @@ +use super::*; +unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("vacuum"), 4.0, 0.0, 0.0, 0, 90, 90, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("effect_catch", effect_catch); +} diff --git a/fighters/luigi/src/obakyumu/mod.rs b/fighters/luigi/src/obakyumu/mod.rs new file mode 100644 index 0000000000..14facedf2e --- /dev/null +++ b/fighters/luigi/src/obakyumu/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("luigi_obakyumu"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/luigi/src/opff.rs b/fighters/luigi/src/opff.rs index 663e284c47..e885cc361b 100644 --- a/fighters/luigi/src/opff.rs +++ b/fighters/luigi/src/opff.rs @@ -3,14 +3,14 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - + unsafe fn luigi_missle_ledgegrab(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_END) { if StatusModule::is_changing(fighter.module_accessor) { fighter.select_cliff_hangdata_from_name("special_s"); } // allows ledgegrab during Luigi Missile - fighter.sub_transition_group_check_air_cliff(); + fighter.sub_transition_group_check_air_cliff(); } } @@ -32,7 +32,7 @@ unsafe fn luigi_always_misfire_training_mode(fighter: &mut L2CFighterCommon, sta } } if VarModule::is_flag(fighter.battle_object, vars::luigi::instance::TRAINING_ALWAYS_MISFIRES) { - VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); } } } @@ -115,8 +115,6 @@ unsafe fn special_s_charge_init(fighter: &mut smash::lua2cpp::L2CFighterCommon, } } -pub fn install() { - smashline::Agent::new("luigi") - .on_line(Main, luigi_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, luigi_frame_wrapper); } diff --git a/fighters/luigi/src/status.rs b/fighters/luigi/src/status.rs index f0702ae58c..78de0d0c5e 100644 --- a/fighters/luigi/src/status.rs +++ b/fighters/luigi/src/status.rs @@ -127,29 +127,10 @@ unsafe extern "C" fn special_s_charge_exit(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - special_n::install(); - - smashline::Agent::new("luigi") - .status( - Init, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_init, - ) - .status( - Main, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_main, - ) - .status( - End, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_end, - ) - .status( - Exit, - *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, - special_s_charge_exit, - ) - .install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + agent.status(Init,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_init,); + agent.status(Main,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_main,); + agent.status(End,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_end,); + agent.status(Exit,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_exit,); } diff --git a/fighters/luigi/src/status/special_n.rs b/fighters/luigi/src/status/special_n.rs index 0d1815acf6..6d5ba80ad0 100644 --- a/fighters/luigi/src/status/special_n.rs +++ b/fighters/luigi/src/status/special_n.rs @@ -56,8 +56,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into() } -pub fn install() { - smashline::Agent::new("luigi") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } From 2ba6eba70cbdf4efa75b8dc9b77c2a5b061b12ef Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 14:44:23 -0500 Subject: [PATCH 112/172] ducc hunt --- fighters/duckhunt/src/acmd/aerials.rs | 205 ++++++----- fighters/duckhunt/src/acmd/ground.rs | 165 +++++---- fighters/duckhunt/src/acmd/mod.rs | 16 +- fighters/duckhunt/src/acmd/other.rs | 388 ++++----------------- fighters/duckhunt/src/acmd/smashes.rs | 230 ++++++------ fighters/duckhunt/src/acmd/specials.rs | 100 +++--- fighters/duckhunt/src/acmd/throws.rs | 89 +++-- fighters/duckhunt/src/acmd/tilts.rs | 183 +++++----- fighters/duckhunt/src/can/acmd.rs | 23 ++ fighters/duckhunt/src/can/mod.rs | 9 + fighters/duckhunt/src/clay/acmd.rs | 38 ++ fighters/duckhunt/src/clay/mod.rs | 11 + fighters/duckhunt/src/clay/status.rs | 17 + fighters/duckhunt/src/gunman/acmd.rs | 87 +++++ fighters/duckhunt/src/gunman/mod.rs | 11 + fighters/duckhunt/src/gunman/opff.rs | 56 +++ fighters/duckhunt/src/gunmanbullet/acmd.rs | 18 + fighters/duckhunt/src/gunmanbullet/mod.rs | 9 + fighters/duckhunt/src/lib.rs | 35 +- fighters/duckhunt/src/opff.rs | 60 +--- fighters/duckhunt/src/status.rs | 17 + fighters/duckhunt/src/status/attacks3.rs | 6 +- fighters/duckhunt/src/status/mod.rs | 11 - fighters/duckhunt/src/status/special_n.rs | 6 +- fighters/duckhunt/src/status/special_s.rs | 18 +- fighters/younglink/src/acmd/smashes.rs | 2 +- 26 files changed, 885 insertions(+), 925 deletions(-) create mode 100644 fighters/duckhunt/src/can/acmd.rs create mode 100644 fighters/duckhunt/src/can/mod.rs create mode 100644 fighters/duckhunt/src/clay/acmd.rs create mode 100644 fighters/duckhunt/src/clay/mod.rs create mode 100644 fighters/duckhunt/src/clay/status.rs create mode 100644 fighters/duckhunt/src/gunman/acmd.rs create mode 100644 fighters/duckhunt/src/gunman/mod.rs create mode 100644 fighters/duckhunt/src/gunman/opff.rs create mode 100644 fighters/duckhunt/src/gunmanbullet/acmd.rs create mode 100644 fighters/duckhunt/src/gunmanbullet/mod.rs create mode 100644 fighters/duckhunt/src/status.rs delete mode 100644 fighters/duckhunt/src/status/mod.rs diff --git a/fighters/duckhunt/src/acmd/aerials.rs b/fighters/duckhunt/src/acmd/aerials.rs index 3a12c4d659..05a2bbd135 100644 --- a/fighters/duckhunt/src/acmd/aerials.rs +++ b/fighters/duckhunt/src/acmd/aerials.rs @@ -1,212 +1,209 @@ use super::*; -unsafe extern "C" fn duckhunt_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("arml"), 11.0, 361, 86, 0, 40, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("arml"), 8.0, 361, 85, 0, 22, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 40, 80, 0, 30, 4.0, 0.0, 8.0, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 40, 80, 0, 40, 3.5, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 102, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.5, 361, 102, 0, 30, 4.0, 0.0, 7.0, -13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 100, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 100, 0, 40, 3.5, 0.0, 9.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { //Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); //Air-only - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 11.5, 1.0, None, None, Some(-1.5), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 4.5, 0.0, 16.5, 2.0, None, None, Some(-3.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 367, 30, 0, 30, 5.0, 0.0, 21.5, 4.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //Ground-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 95, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); //Air-only - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 4.5, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 366, 30, 0, 30, 5.0, 0.0, 21.5, -6.0, None, None, None, 1.0, 0.6, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 6.0, 0.0, 21.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 11.5, -1.5, None, None, Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 4.0, 0.0, 16.5, -3.0, None, None, Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 91, 125, 0, 50, 6.0, 0.0, 21.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn duckhunt_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), -1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), -1, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 0, 2, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("duckmouthd"), 0, 2, 0, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn duckhunt_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 255, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 130, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 255, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 130, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 4.5, 0.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 275, 20, 0, 20, 3.5, 0.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 270, 60, 0, 30, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 270, 60, 0, 30, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); // Ground-only - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 250, 95, 0, 60, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 250, 95, 0, 60, 5.5, 0.0, -8.0, 0.0, Some(0.0), Some(-5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attackairn", duckhunt_attack_air_n_game) - .acmd("game_attackairf", duckhunt_attack_air_f_game) - .acmd("game_attackairb", duckhunt_attack_air_b_game) - .acmd("game_attackairhi", duckhunt_attack_air_hi_game) - .acmd("effect_attackairhi", duckhunt_attack_air_hi_effect) - .acmd("game_attackairlw", duckhunt_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/duckhunt/src/acmd/ground.rs b/fighters/duckhunt/src/acmd/ground.rs index 73f22f0709..b9ecb3d52a 100644 --- a/fighters/duckhunt/src/acmd/ground.rs +++ b/fighters/duckhunt/src/acmd/ground.rs @@ -1,140 +1,137 @@ - use super::*; -unsafe extern "C" fn duckhunt_attackdash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(10.0-1.0)); - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - } - frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn duckhunt_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 70, 30, 0, 20, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //Locking hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 4.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 3.0, 0.0, 4.0, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn duckhunt_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 30, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 25, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 30, 0, 30, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 25, 0, 25, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); //Locking hitboxes - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 3.0, 0.0, 3.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 20, 0, 15, 5.0, 0.0, 7.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn duckhunt_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 55, 70, 0, 55, 4.0, 0.0, 4.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 28.0, 30.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 28.0, 30.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn duckhunt_attack_100_sub_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attack100sub(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.4, 361, 15, 0, 16, 4.5, 0.0, 7.5, 4.5, None, None, None, 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 0.4, 361, 10, 0, 12, 6.5, 0.0, 7.5, 14.0, Some(0.0), Some(7.5), Some(6.5), 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 361, 15, 0, 16, 4.5, 0.0, 7.5, 4.5, None, None, None, 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 361, 10, 0, 12, 6.5, 0.0, 7.5, 14.0, Some(0.0), Some(7.5), Some(6.5), 0.5, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 5.0); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 5.0); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); } } -unsafe extern "C" fn duckhunt_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 5.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 17.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 80, 140, 0, 70, 5.5, 0.0, 6.5, 17.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 36.3/(39.0-6.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 36.3/(39.0-6.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attackdash", duckhunt_attackdash_game) - .acmd("game_attack11", duckhunt_attack_11_game) - .acmd("game_attack12", duckhunt_attack_12_game) - .acmd("game_attack13", duckhunt_attack_13_game) - .acmd("game_attack100sub", duckhunt_attack_100_sub_game) - .acmd("game_attack100end", duckhunt_attack_100_end_game) - .install(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 6.0/(10.0-1.0)); + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 60, 40, 0, 100, 4.0, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 4.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 105, 40, 0, 90, 3.5, 0.0, 7.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100sub", game_attack100sub); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/duckhunt/src/acmd/mod.rs b/fighters/duckhunt/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/duckhunt/src/acmd/mod.rs +++ b/fighters/duckhunt/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/duckhunt/src/acmd/other.rs b/fighters/duckhunt/src/acmd/other.rs index e7e7008d69..286182b86a 100644 --- a/fighters/duckhunt/src/acmd/other.rs +++ b/fighters/duckhunt/src/acmd/other.rs @@ -1,392 +1,152 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn duckhunt_can_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 60, 100, 0, 40, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 95, 0, 40, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 300, 1, 0, 0, 26, 60); - } - wait(lua_state, 2.0); - if is_excute(fighter) { - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn duckhunt_clay_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 75, 50, 0, 20, 1.0, 0.0, 0.0, 0.0, None, None, None, 3.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 10.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_IS_ADD_ACCEL_Y); - } -} - -unsafe extern "C" fn duckhunt_clay_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 60, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 100, 100, 20, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 9.0, -6.0, Some(0.0), Some(-9.0), Some(6.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 0.5, -11.0, Some(0.0), Some(-1.1), Some(11.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, -8.0, -8.0, Some(0.0), Some(8.0), Some(8.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l02")); - } - frame(lua_state, 275.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_duckhunt_special_l09")); - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_effectl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 275.0); - let gunman_kind = WorkModule::get_int(fighter.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - if is_excute(fighter) { - match gunman_kind { - 0 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - } -} - -unsafe extern "C" fn duckhunt_gunman_ready_effectr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - frame(lua_state, 275.0); - let gunman_kind = WorkModule::get_int(fighter.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - if is_excute(fighter) { - match gunman_kind { - 0 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - } } -unsafe extern "C" fn duckhunt_gunmanbullet_move_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 90, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 70, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 65, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn effect_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); -} - -unsafe extern "C" fn sound_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = SoundModule::play_se(boma, Hash40::new("se_duckhunt_appeal_s01"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, handle as i32, 3.0, 0); } } -unsafe extern "C" fn expression_appeals(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 10); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 10); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_superleaf"), 72, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 88.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("duckhunt_gunmanbullet") - .acmd("game_move", duckhunt_gunmanbullet_move_game) - .install(); - smashline::Agent::new("duckhunt_gunman") - .acmd("sound_readyr", duckhunt_gunman_ready_sound) - .acmd("sound_readyl", duckhunt_gunman_ready_sound) - .acmd("effect_readyl", duckhunt_gunman_ready_effectl) - .acmd("effect_readyr", duckhunt_gunman_ready_effectr) - .install(); - smashline::Agent::new("duckhunt_can") - .acmd("game_explode", duckhunt_can_explode_game) - .install(); - smashline::Agent::new("duckhunt") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_appealsl", effect_appeals) - .acmd("effect_appealsr", effect_appeals) - .acmd("sound_appealsl", sound_appeals) - .acmd("sound_appealsr", sound_appeals) - .acmd("expression_appealsl", expression_appeals) - .acmd("expression_appealsr", expression_appeals) - .install(); - smashline::Agent::new("duckhunt_clay") - .acmd("game_fly", duckhunt_clay_fly_game) - .acmd("game_hit", duckhunt_clay_hit_game) - .install(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("effect_appealsl", null); + agent.acmd("effect_appealsr", null); + agent.acmd("sound_appealsl", sound_appeals); + agent.acmd("sound_appealsr", sound_appeals); + agent.acmd("expression_appealsl", expression_appeals); + agent.acmd("expression_appealsr", expression_appeals); } diff --git a/fighters/duckhunt/src/acmd/smashes.rs b/fighters/duckhunt/src/acmd/smashes.rs index 5ebc766300..50f39b7017 100644 --- a/fighters/duckhunt/src/acmd/smashes.rs +++ b/fighters/duckhunt/src/acmd/smashes.rs @@ -1,115 +1,115 @@ use super::*; -unsafe extern "C" fn duckhunt_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 4, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 45, 100, 66, 0, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 45, 100, 66, 0, 6.0, 0.0, 6.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 45, 100, 70, 0, 7.0, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 45, 100, 70, 0, 7.0, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 361, 131, 0, 50, 9.0, 0.0, 6.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 361, 131, 0, 50, 9.0, 0.0, 6.0, 26.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s01")); } frame(lua_state, 17.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s02")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s02")); + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_duckhunt_rnd_attack_dog")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_duckhunt_rnd_attack_dog")); } frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } frame(lua_state, 25.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_s03")); } } -unsafe extern "C" fn duckhunt_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 17.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 11); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 11); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 64.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn duckhunt_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 5, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 127, 0, 0, 110, 5.3, 0.0, 6.0, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 127, 0, 0, 110, 5.3, 0.0, 6.0, 9.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.5, 85, 120, 0, 50, 9.3, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 11.5, 85, 120, 0, 50, 9.3, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -132,119 +132,119 @@ unsafe extern "C" fn duckhunt_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_hi4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 12); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 38.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 62.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 7); } } -unsafe extern "C" fn duckhunt_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 5, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_DELAY_FRAME); WorkModule::set_int(boma, 6, *FIGHTER_DUCKHUNT_STATUS_ATTACK_INT_SMASH_RETICLE_DISPLAY_FRAME); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 170, 0, 0, 120, 6.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 170, 0, 0, 120, 6.0, 0.0, 4.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 35, 70, 0, 70, 7.0, 0.0, 8.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 35, 70, 0, 70, 7.0, 0.0, 8.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn duckhunt_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_l02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_duckhunt_rnd_attack_dog")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_duckhunt_rnd_attack_dog")); } frame(lua_state, 19.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_duckhunt_smash_l03")); - PLAY_SE(fighter, Hash40::new("se_duckhunt_special_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_smash_l03")); + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l03")); } } -unsafe extern "C" fn duckhunt_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 12); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 61.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attacks4", duckhunt_attack_s4_s_game) - .acmd("sound_attacks4", duckhunt_attack_s4_sound) - .acmd("expression_attacks4", duckhunt_attack_s4_expression) - .acmd("game_attackhi4", duckhunt_attack_hi4_game) - .acmd("sound_attackhi4", duckhunt_attack_hi4_sound) - .acmd("expression_attackhi4", duckhunt_attack_hi4_expression) - .acmd("game_attacklw4", duckhunt_attack_lw4_game) - .acmd("sound_attacklw4", duckhunt_attack_lw4_sound) - .acmd("expression_attacklw4", duckhunt_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/duckhunt/src/acmd/specials.rs b/fighters/duckhunt/src/acmd/specials.rs index ff7f7e0f51..d1f6457d99 100644 --- a/fighters/duckhunt/src/acmd/specials.rs +++ b/fighters/duckhunt/src/acmd/specials.rs @@ -1,70 +1,68 @@ use super::*; -unsafe extern "C" fn duckhunt_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 3.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_REQUEST_SPECIAL_HI_CANCEL); - } - -} - -unsafe extern "C" fn duckhunt_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state: u64 = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(4.0-1.0)); - frame(lua_state, 4.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_STATUS_SPECIAL_LW_FLAG_CALL_TRIGGER); - } - frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.15); -} - -unsafe extern "C" fn duckhunt_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state: u64 = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state: u64 = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 42.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 16.0, 42.0, 20.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_RELEASE_CAN); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn duckhunt_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 14.0, 18.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 18.0); frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 50.0, 41.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 50.0, 41.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_RELEASE_CLAY); } frame(lua_state, 40.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_AIR) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_specialhi", duckhunt_special_hi_game) - .acmd("game_specialairlw", duckhunt_special_lw_game) - .acmd("game_speciallw", duckhunt_special_lw_game) - .acmd("game_specialairn", duckhunt_special_n_game) - .acmd("game_specialn", duckhunt_special_n_game) - .acmd("game_specials", duckhunt_special_s_game) - .acmd("game_specialairs", duckhunt_special_s_game) - .install(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_INSTANCE_WORK_ID_FLAG_REQUEST_SPECIAL_HI_CANCEL); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state: u64 = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 5.0/(4.0-1.0)); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_DUCKHUNT_STATUS_SPECIAL_LW_FLAG_CALL_TRIGGER); + } + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 1.15); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specials); + + agent.acmd("game_specialhi", game_specialhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/duckhunt/src/acmd/throws.rs b/fighters/duckhunt/src/acmd/throws.rs index 0b31347f61..ec1be7906b 100644 --- a/fighters/duckhunt/src/acmd/throws.rs +++ b/fighters/duckhunt/src/acmd/throws.rs @@ -1,30 +1,29 @@ use super::*; -unsafe extern "C" fn duckhunt_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(5.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(5.0-1.0)); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.5), Some(9.70), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.5), Some(9.70), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn duckhunt_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn duckhunt_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -64,57 +63,57 @@ unsafe extern "C" fn duckhunt_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 72, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 72, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 6, 1); - CHECK_FINISH_CAMERA(fighter, 3, 17); + if is_excute(agent) { + FT_CATCH_STOP(agent, 6, 1); + CHECK_FINISH_CAMERA(agent, 3, 17); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn duckhunt_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 80, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 80, 40, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 4.0, 50, 70, 0, 50, 7.0, 0.0, 4.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 4.0, 50, 70, 0, 50, 7.0, 0.0, 4.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); AttackModule::set_catch_only_all(boma, true, false); - FT_CATCH_STOP(fighter, 8, 1); - CHECK_FINISH_CAMERA(fighter, 10, 0); + FT_CATCH_STOP(agent, 8, 1); + CHECK_FINISH_CAMERA(agent, 10, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_catch", duckhunt_catch_game) - .acmd("game_catchdash", duckhunt_catch_dash_game) - .acmd("game_catchturn", duckhunt_catch_turn_game) - .acmd("game_throwhi", duckhunt_throw_hi_game) - .acmd("game_throwlw", duckhunt_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/duckhunt/src/acmd/tilts.rs b/fighters/duckhunt/src/acmd/tilts.rs index b05bbca570..7fd87ad74c 100644 --- a/fighters/duckhunt/src/acmd/tilts.rs +++ b/fighters/duckhunt/src/acmd/tilts.rs @@ -1,158 +1,152 @@ - use super::*; -unsafe extern "C" fn duckhunt_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5,-8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.5, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5,-8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 361, 100, 0, 35, 3.5, -8.0, -4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, -3.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 361, 100, 0, 35, 4.0, 2.5, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 8.0); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 3.5, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 3.5, 0.0, 3.0, -3.5, Some(0.0), Some(3.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 5.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 6.9, 2.5, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 7.5, 96, 75, 0, 75, 6.9, 2.5, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn duckhunt_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_openwing") as i64); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } } -unsafe extern "C" fn duckhunt_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 6.0); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("duckhead"), 7.0, 25, 60, 0, 50, 3.5, -8.0, -5.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, -3.0, -1.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, 2.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("duckhead"), 7.0, 25, 60, 0, 50, 3.5, -8.0, -5.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, -3.0, -1.5, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("duckhead"), 9.0, 25, 60, 0, 50, 4.0, 2.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - } // Squat Attack -unsafe extern "C" fn duckhunt_attack_squat_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacksquats3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); + if is_excute(agent) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Inside Hitbox - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 45, 0, 35, 3.5, 0.0, 1.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); // Tipper Hitbox - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 70, 45, 0, 45, 4.5, 0.0, 1.0, 15.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 70, 45, 0, 45, 4.5, 0.0, 1.0, 15.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - CancelModule::enable_cancel(fighter.boma()); + if is_excute(agent) { + CancelModule::enable_cancel(agent.boma()); } } -unsafe extern "C" fn duckhunt_attack_squat_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -167,7 +161,7 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_squat_s3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -185,7 +179,7 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn duckhunt_attack_squat_s3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -207,17 +201,18 @@ unsafe extern "C" fn duckhunt_attack_squat_s3_expression(agent: &mut L2CAgentBas } } -pub fn install() { - smashline::Agent::new("duckhunt") - .acmd("game_attacks3hi", duckhunt_attack_s3_hi_game) - .acmd("game_attacks3", duckhunt_attack_s3_game) - .acmd("game_attacks3lw", duckhunt_attack_s3_lw_game) - .acmd("game_attacksquats3", duckhunt_attack_squat_s3_game) - .acmd("effect_attacksquats3", duckhunt_attack_squat_s3_effect) - .acmd("sound_attacksquats3", duckhunt_attack_squat_s3_sound) - .acmd("expression_attacksquats3", duckhunt_attack_squat_s3_expression) - .acmd("game_attackhi3", duckhunt_attack_hi3_game) - .acmd("expression_attackhi3", duckhunt_attack_hi3_expression) - .acmd("game_attacklw3", duckhunt_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + + agent.acmd("game_attacksquats3", game_attacksquats3); + agent.acmd("effect_attacksquats3", effect_attacksquats3); + agent.acmd("sound_attacksquats3", sound_attacksquats3); + agent.acmd("expression_attacksquats3", expression_attacksquats3); } diff --git a/fighters/duckhunt/src/can/acmd.rs b/fighters/duckhunt/src/can/acmd.rs new file mode 100644 index 0000000000..ed9c280385 --- /dev/null +++ b/fighters/duckhunt/src/can/acmd.rs @@ -0,0 +1,23 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 100, 0, 40, 13.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 95, 0, 40, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 300, 1, 0, 0, 26, 60); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} diff --git a/fighters/duckhunt/src/can/mod.rs b/fighters/duckhunt/src/can/mod.rs new file mode 100644 index 0000000000..3c2f93e42d --- /dev/null +++ b/fighters/duckhunt/src/can/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_can"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/clay/acmd.rs b/fighters/duckhunt/src/clay/acmd.rs new file mode 100644 index 0000000000..9cc9102202 --- /dev/null +++ b/fighters/duckhunt/src/clay/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 75, 50, 0, 20, 1.0, 0.0, 0.0, 0.0, None, None, None, 3.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_IS_ADD_ACCEL_Y); + } +} + +unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 60, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 100, 100, 20, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.3, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 9.0, -6.0, Some(0.0), Some(-9.0), Some(6.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, 0.5, -11.0, Some(0.0), Some(-1.1), Some(11.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 70, 0, 82, 3.0, 0.0, -8.0, -8.0, Some(0.0), Some(8.0), Some(8.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -1.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_hit", game_hit); +} diff --git a/fighters/duckhunt/src/clay/mod.rs b/fighters/duckhunt/src/clay/mod.rs new file mode 100644 index 0000000000..b1878ce5ba --- /dev/null +++ b/fighters/duckhunt/src/clay/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod status; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_clay"); + acmd::install(agent); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/clay/status.rs b/fighters/duckhunt/src/clay/status.rs new file mode 100644 index 0000000000..04a6797094 --- /dev/null +++ b/fighters/duckhunt/src/clay/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; + +// WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY + +pub unsafe extern "C" fn fly_init(weapon: &mut L2CWeaponCommon) -> L2CValue { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let duckhunt = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(duckhunt, vars::duckhunt::status::CLAY_SMASH_INPUT) { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_BY_SMASH); + } + smashline::original_status(Init, weapon, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY)(weapon) +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY, fly_init); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunman/acmd.rs b/fighters/duckhunt/src/gunman/acmd.rs new file mode 100644 index 0000000000..5f13ad1662 --- /dev/null +++ b/fighters/duckhunt/src/gunman/acmd.rs @@ -0,0 +1,87 @@ +use super::*; + +unsafe extern "C" fn sound_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_duckhunt_special_l02")); + } + frame(lua_state, 275.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_duckhunt_special_l09")); + } +} + +unsafe extern "C" fn effect_readyl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 275.0); + let gunman_kind = WorkModule::get_int(agent.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + if is_excute(agent) { + match gunman_kind { + 0 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + } +} + +unsafe extern "C" fn effect_readyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 275.0); + let gunman_kind = WorkModule::get_int(agent.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + if is_excute(agent) { + match gunman_kind { + 0 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), -0.5, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_readyl", sound_ready); + agent.acmd("sound_readyr", sound_ready); + + agent.acmd("effect_readyl", effect_readyl); + agent.acmd("effect_readyr", effect_readyr); +} diff --git a/fighters/duckhunt/src/gunman/mod.rs b/fighters/duckhunt/src/gunman/mod.rs new file mode 100644 index 0000000000..d2aa2d1ede --- /dev/null +++ b/fighters/duckhunt/src/gunman/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_gunman"); + acmd::install(agent); + opff:install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunman/opff.rs b/fighters/duckhunt/src/gunman/opff.rs new file mode 100644 index 0000000000..70baddc2b1 --- /dev/null +++ b/fighters/duckhunt/src/gunman/opff.rs @@ -0,0 +1,56 @@ +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; + +pub extern "C" fn gunman_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.kind() != WEAPON_KIND_DUCKHUNT_GUNMAN { + return + } + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if weapon.is_status(*WEAPON_DUCKHUNT_GUNMAN_STATUS_KIND_READY) { + let duckhunt = utils::util::get_battle_object_from_id(owner_id); + let duckhunt_boma = &mut *(*duckhunt).module_accessor; + + if duckhunt_boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_STANDBY]) { + return + } + + if duckhunt_boma.is_cat_flag(Cat1::SpecialLw) && duckhunt_boma.is_button_trigger(Buttons::Special | Buttons::SpecialRaw) && WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) > 25 { + PLAY_STATUS(weapon, Hash40::new("se_duckhunt_special_l09")); + let gunman_kind = WorkModule::get_int(weapon.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); + let lr = PostureModule::lr(weapon.boma()); + match gunman_kind { + 0 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, 0.74, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, -0.78, 0, 0, 0, 1, true); + } + 1 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, 0.42, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, -0.5, 0, 0, 0, 1, true); + } + 2 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, 0.26, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, -1.29, 0, 0, 0, 1, true); + } + 3 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, 0.85, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, -0.64, 0, 0, 0, 1, true); + } + 4 => { + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.17, 0.4, 0, 0, 0, 1, true); + EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.16, -1.36, 0, 0, 0, 1, true); + } + _ => { + return + } + } + WorkModule::set_int(weapon.module_accessor, 25, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + VarModule::set_int(duckhunt, vars::duckhunt::instance::GUNMAN_TIMER, 300); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, gunman_callback); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/gunmanbullet/acmd.rs b/fighters/duckhunt/src/gunmanbullet/acmd.rs new file mode 100644 index 0000000000..d8a0344234 --- /dev/null +++ b/fighters/duckhunt/src/gunmanbullet/acmd.rs @@ -0,0 +1,18 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 65, 90, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 50, 60, 0, 45, 1.2, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 70, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 0, Hash40::new("top"), 10.0, 65, 60, 0, 45, 4.0, 0.0, 0.0, 0.0, Some(1.0), Some(1.0), Some(1.0), 1.25, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); +} diff --git a/fighters/duckhunt/src/gunmanbullet/mod.rs b/fighters/duckhunt/src/gunmanbullet/mod.rs new file mode 100644 index 0000000000..382dbb7893 --- /dev/null +++ b/fighters/duckhunt/src/gunmanbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("duckhunt_gunmanbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/lib.rs b/fighters/duckhunt/src/lib.rs index 7cbe3d5d55..1d7a6ab4f0 100644 --- a/fighters/duckhunt/src/lib.rs +++ b/fighters/duckhunt/src/lib.rs @@ -4,8 +4,15 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod can; +mod clay; +mod gunman; +mod gunmanbullet; use smash::{ lib::{ @@ -37,21 +44,17 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn duckhunt_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_DUCKHUNT { - return; - } - VarModule::set_int(fighter.battle_object, vars::duckhunt::instance::GUNMAN_TIMER, 0); - } -} +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); - smashline::Agent::new("duckhunt") - .on_start(duckhunt_reset) - .install(); + let agent = &mut Agent::new("duckhunt"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + can::install(); + clay::install(); + gunman::install(); + gunmanbullet::install(); } \ No newline at end of file diff --git a/fighters/duckhunt/src/opff.rs b/fighters/duckhunt/src/opff.rs index 2cdb8420e9..82ea23af3f 100644 --- a/fighters/duckhunt/src/opff.rs +++ b/fighters/duckhunt/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn duck_jump_cancel(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_DUCKHUNT_STATUS_KIND_SPECIAL_HI_FLY) && fighter.motion_frame() > 20.0 @@ -66,61 +65,6 @@ pub extern "C" fn duckhunt_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighte } } -pub extern "C" fn gunman_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_DUCKHUNT_GUNMAN { - return - } - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if weapon.is_status(*WEAPON_DUCKHUNT_GUNMAN_STATUS_KIND_READY) { - let duckhunt = utils::util::get_battle_object_from_id(owner_id); - let duckhunt_boma = &mut *(*duckhunt).module_accessor; - - if duckhunt_boma.is_status_one_of(&[*FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_STANDBY]) { - return - } - - if duckhunt_boma.is_cat_flag(Cat1::SpecialLw) && duckhunt_boma.is_button_trigger(Buttons::Special | Buttons::SpecialRaw) && WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE) > 25 { - PLAY_STATUS(weapon, Hash40::new("se_duckhunt_special_l09")); - let gunman_kind = WorkModule::get_int(weapon.boma(), *WEAPON_DUCKHUNT_GUNMAN_INSTANCE_WORK_ID_KIND); - let lr = PostureModule::lr(weapon.boma()); - match gunman_kind { - 0 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, 0.74, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 13.3, -0.78, 0, 0, 0, 1, true); - } - 1 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, 0.42, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 15.66, -0.5, 0, 0, 0, 1, true); - } - 2 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, 0.26, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 16.92, -1.29, 0, 0, 0, 1, true); - } - 3 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, 0.85, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 10.9, -0.64, 0, 0, 0, 1, true); - } - 4 => { - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.17, 0.4, 0, 0, 0, 1, true); - EFFECT_FOLLOW(weapon, Hash40::new("duckhunt_wildegunman_light"), Hash40::new("top"), 0.5*lr, 14.16, -1.36, 0, 0, 0, 1, true); - } - _ => { - return - } - } - WorkModule::set_int(weapon.module_accessor, 25, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - VarModule::set_int(duckhunt, vars::duckhunt::instance::GUNMAN_TIMER, 300); - } - } -} - -pub fn install() { - smashline::Agent::new("duckhunt") - .on_line(Main, duckhunt_frame_wrapper) - .install(); - smashline::Agent::new("duckhunt_gunman") - .on_line(Main, gunman_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, duckhunt_frame_wrapper); } \ No newline at end of file diff --git a/fighters/duckhunt/src/status.rs b/fighters/duckhunt/src/status.rs new file mode 100644 index 0000000000..42ac2f22d8 --- /dev/null +++ b/fighters/duckhunt/src/status.rs @@ -0,0 +1,17 @@ +use super::*; + +mod attacks3; +mod special_n; +mod special_s; + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::set_int(fighter.battle_object, vars::duckhunt::instance::GUNMAN_TIMER, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + attacks3::install(agent); + special_n::install(agent); + special_s::install(agent); +} diff --git a/fighters/duckhunt/src/status/attacks3.rs b/fighters/duckhunt/src/status/attacks3.rs index 8bbbb851a3..cc16bf0bfc 100644 --- a/fighters/duckhunt/src/status/attacks3.rs +++ b/fighters/duckhunt/src/status/attacks3.rs @@ -37,8 +37,6 @@ unsafe extern "C" fn attack_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); } diff --git a/fighters/duckhunt/src/status/mod.rs b/fighters/duckhunt/src/status/mod.rs deleted file mode 100644 index b2ac8f05dd..0000000000 --- a/fighters/duckhunt/src/status/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -use super::*; - -mod special_n; -mod special_s; -mod attacks3; - -pub fn install() { - special_n::install(); - special_s::install(); - attacks3::install(); -} diff --git a/fighters/duckhunt/src/status/special_n.rs b/fighters/duckhunt/src/status/special_n.rs index e17ce7b14c..4c93896c11 100644 --- a/fighters/duckhunt/src/status/special_n.rs +++ b/fighters/duckhunt/src/status/special_n.rs @@ -84,8 +84,6 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } \ No newline at end of file diff --git a/fighters/duckhunt/src/status/special_s.rs b/fighters/duckhunt/src/status/special_s.rs index c80d7463be..4822ea15d1 100644 --- a/fighters/duckhunt/src/status/special_s.rs +++ b/fighters/duckhunt/src/status/special_s.rs @@ -94,20 +94,6 @@ unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn clay_fly_init(weapon: &mut L2CWeaponCommon) -> L2CValue { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let duckhunt = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(duckhunt, vars::duckhunt::status::CLAY_SMASH_INPUT) { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_DUCKHUNT_CLAY_INSTANCE_WORK_ID_FLAG_BY_SMASH); - } - smashline::original_status(Init, weapon, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY)(weapon) -} - -pub fn install() { - smashline::Agent::new("duckhunt") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main) - .install(); - smashline::Agent::new("duckhunt_clay") - .status(Init, *WEAPON_DUCKHUNT_CLAY_STATUS_KIND_FLY, clay_fly_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/younglink/src/acmd/smashes.rs b/fighters/younglink/src/acmd/smashes.rs index 5963b451f7..fb746b64b8 100644 --- a/fighters/younglink/src/acmd/smashes.rs +++ b/fighters/younglink/src/acmd/smashes.rs @@ -238,6 +238,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_attackhi4", sound_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); - agent.acmd("game_attacklw4", younglink_attack_lw4_game); + agent.acmd("game_attacklw4", game_attacklw4); } From a1352a54ecfc719c80d7a463f687d61bd2295f36 Mon Sep 17 00:00:00 2001 From: mokl Date: Mon, 25 Mar 2024 14:50:01 -0500 Subject: [PATCH 113/172] woof --- fighters/duckhunt/src/gunman/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/duckhunt/src/gunman/mod.rs b/fighters/duckhunt/src/gunman/mod.rs index d2aa2d1ede..96b0cea94f 100644 --- a/fighters/duckhunt/src/gunman/mod.rs +++ b/fighters/duckhunt/src/gunman/mod.rs @@ -6,6 +6,6 @@ mod opff; pub fn install() { let agent = &mut Agent::new("duckhunt_gunman"); acmd::install(agent); - opff:install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file From 2b9c9baddb820b00b495e492a4cd63394bfa35e1 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 16:08:49 -0400 Subject: [PATCH 114/172] my silly little guy --- fighters/murabito/src/acmd/aerials.rs | 208 +++++++++++----------- fighters/murabito/src/acmd/ground.rs | 20 +-- fighters/murabito/src/acmd/mod.rs | 16 +- fighters/murabito/src/acmd/other.rs | 148 ++++----------- fighters/murabito/src/acmd/smashes.rs | 59 +----- fighters/murabito/src/acmd/specials.rs | 44 +++-- fighters/murabito/src/acmd/throws.rs | 164 +++++++++-------- fighters/murabito/src/acmd/tilts.rs | 156 ++++++++-------- fighters/murabito/src/bowlingball/acmd.rs | 16 ++ fighters/murabito/src/bowlingball/mod.rs | 9 + fighters/murabito/src/bullet/acmd.rs | 21 +++ fighters/murabito/src/bullet/mod.rs | 9 + fighters/murabito/src/clayrocket/acmd.rs | 13 ++ fighters/murabito/src/clayrocket/mod.rs | 9 + fighters/murabito/src/firework/acmd.rs | 30 ++++ fighters/murabito/src/firework/mod.rs | 9 + fighters/murabito/src/flowerpot/acmd.rs | 36 ++++ fighters/murabito/src/flowerpot/mod.rs | 9 + fighters/murabito/src/lib.rs | 22 ++- fighters/murabito/src/opff.rs | 10 +- fighters/murabito/src/slingshot/acmd.rs | 12 ++ fighters/murabito/src/slingshot/mod.rs | 9 + fighters/murabito/src/status.rs | 14 +- 23 files changed, 547 insertions(+), 496 deletions(-) create mode 100644 fighters/murabito/src/bowlingball/acmd.rs create mode 100644 fighters/murabito/src/bowlingball/mod.rs create mode 100644 fighters/murabito/src/bullet/acmd.rs create mode 100644 fighters/murabito/src/bullet/mod.rs create mode 100644 fighters/murabito/src/clayrocket/acmd.rs create mode 100644 fighters/murabito/src/clayrocket/mod.rs create mode 100644 fighters/murabito/src/firework/acmd.rs create mode 100644 fighters/murabito/src/firework/mod.rs create mode 100644 fighters/murabito/src/flowerpot/acmd.rs create mode 100644 fighters/murabito/src/flowerpot/mod.rs create mode 100644 fighters/murabito/src/slingshot/acmd.rs create mode 100644 fighters/murabito/src/slingshot/mod.rs diff --git a/fighters/murabito/src/acmd/aerials.rs b/fighters/murabito/src/acmd/aerials.rs index 40935bb369..7b65eff055 100644 --- a/fighters/murabito/src/acmd/aerials.rs +++ b/fighters/murabito/src/acmd/aerials.rs @@ -1,69 +1,69 @@ use super::*; -unsafe extern "C" fn murabito_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 90, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("handl"), 12.0, 361, 90, 0, 30, 3.6, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 361, 90, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("handl"), 8.0, 361, 90, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn murabito_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 9.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SLINGSHOT, true, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 365, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 80, 45, 0, 35, 5.5, 0.0, 5.5, -10.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 135, 0, 40, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 135, 0, 40, 6.0, 0.0, 5.5, -10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 135, 0, 40, 3.5, 0.0, 5.5, -0.5, Some(0.0), Some(5.5), Some(-3.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 135, 0, 40, 6.0, 0.0, 5.5, -10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); } frame(lua_state, 28.0); - FT_MOTION_RATE(fighter, 19.0/(41.0-28.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 19.0/(41.0-28.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -71,169 +71,167 @@ unsafe extern "C" fn murabito_attack_air_b_game(fighter: &mut L2CAgentBase) { //Not an ideal solution as hitbox will appear a frame before effects begin. Will have to revisit this in the future for a better solution -unsafe extern "C" fn murabito_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("haver"), 0.0, -4.0, 0.0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("murabito_firework"), Hash40::new("top"), 0, 4.5, -10.0, 0, -90, 0, 0.8, false); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT(fighter, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -5.0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -10.0, 0, -90, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("haver"), 0.0, -4.0, 0.0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("murabito_firework"), Hash40::new("top"), 0, 4.5, -10.0, 0, -90, 0, 0.8, false); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT(agent, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -5.0, 0, -90, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -10.0, 0, -90, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -unsafe extern "C" fn murabito_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_murabito_attackair_b01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_murabito_attackair_b01")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_murabito_smash_h02")); } } -unsafe extern "C" fn murabito_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn murabito_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 85, 105, 0, 30, 5.2, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 85, 105, 0, 30, 5.2, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 85, 105, 0, 30, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 85, 105, 0, 30, 6.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 85, 105, 0, 30, 7.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 85, 105, 0, 30, 7.5, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 90, 60, 0, 50, 4.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 60, 0, 50, 4.0, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 60, 0, 50, 5.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 60, 0, 50, 5.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 90, 60, 0, 50, 6.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 90, 60, 0, 50, 6.5, 0.0, 18.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn murabito_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.769); + FT_MOTION_RATE(agent, 0.769); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 270, 80, 0, 0, 5.2, 0.0, -6.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 270, 80, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 270, 86, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 270, 80, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 270, 86, 0, 0, 6.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 80, 0, 0, 7.5, 0.0, -5.5, 0.5, Some(0.0), Some(-2.0), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 69, 60, 0, 50, 4.2, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 69, 60, 0, 50, 4.2, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } if WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 69, 60, 0, 50, 5.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 69, 60, 0, 50, 5.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } if !(WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 2 || WorkModule::get_int(boma, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM) == 1) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 69, 60, 0, 50, 6.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 69, 60, 0, 50, 6.5, 0.0, -5.0, 0.5, Some(0.0), Some(-2.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::clear(boma, 1, false); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attackairn", murabito_attack_air_n_game) - .acmd("game_attackairb", murabito_attack_air_b_game) - .acmd("effect_attackairb", murabito_attack_air_b_effect) - .acmd("sound_attackairb", murabito_attack_air_b_sound) - .acmd("expression_attackairb", murabito_attack_air_b_expression) - .acmd("game_attackairhi", murabito_attack_air_hi_game) - .acmd("game_attackairlw", murabito_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/murabito/src/acmd/ground.rs b/fighters/murabito/src/acmd/ground.rs index 4bcde4c9f7..93ffe11e4c 100644 --- a/fighters/murabito/src/acmd/ground.rs +++ b/fighters/murabito/src/acmd/ground.rs @@ -1,26 +1,24 @@ use super::*; -unsafe extern "C" fn murabito_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FLOWERPOT, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FLOWERPOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 30.0/(44.0-10.0)); + FT_MOTION_RATE(agent, 30.0/(44.0-10.0)); } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attackdash", murabito_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/murabito/src/acmd/mod.rs b/fighters/murabito/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/murabito/src/acmd/mod.rs +++ b/fighters/murabito/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/murabito/src/acmd/other.rs b/fighters/murabito/src/acmd/other.rs index c08039f786..62ecd817a8 100644 --- a/fighters/murabito/src/acmd/other.rs +++ b/fighters/murabito/src/acmd/other.rs @@ -1,157 +1,73 @@ use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_murabito_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_murabito_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn murabito_slingshot_attackairb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - - } - -} - -unsafe extern "C" fn murabito_bullet_shoot_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 60, 132, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 100, 0, 10, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn murabito_clayrocket_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 110, 55, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn murabito_flowerpot_throwed_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 10.0, 70, 60, 0, 70, 4.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn murabito_flowerpot_bound_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !WorkModule::is_flag(boma, *WEAPON_MURABITO_FLOWERPOT_INSTANCE_WORK_ID_FLAG_ASASE) { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("murabito_pot_boundsmoke"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - else { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_water_walk"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("have"), 4.0, 361, 60, 0, 40, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("murabito_bullet") - .acmd("game_shootf", murabito_bullet_shoot_f_game) - .install(); - smashline::Agent::new("murabito_slingshot") - .acmd("game_attackairb", murabito_slingshot_attackairb_game) - .install(); - smashline::Agent::new("murabito") - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("murabito_clayrocket") - .acmd("game_fly", murabito_clayrocket_fly_game) - .install(); - smashline::Agent::new("murabito_flowerpot") - .acmd("game_throwed", murabito_flowerpot_throwed_game) - .acmd("effect_bound", murabito_flowerpot_bound_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/murabito/src/acmd/smashes.rs b/fighters/murabito/src/acmd/smashes.rs index 8d406333a1..613cb13d8f 100644 --- a/fighters/murabito/src/acmd/smashes.rs +++ b/fighters/murabito/src/acmd/smashes.rs @@ -21,19 +21,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -61,32 +48,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -291,18 +252,10 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("murabito_bowlingball") - .acmd("game_fall", game_fall) - .install(); - smashline::Agent::new("murabito") - .acmd("game_attacks4", game_attacks4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("effect_attacklw4", effect_attacklw4) - .acmd("sound_attacklw4", sound_attacklw4) - .install(); - smashline::Agent::new("murabito_firework") - .acmd("game_shoot", game_shoot) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); } diff --git a/fighters/murabito/src/acmd/specials.rs b/fighters/murabito/src/acmd/specials.rs index 5ebe6bd1ed..cbf991aa02 100644 --- a/fighters/murabito/src/acmd/specials.rs +++ b/fighters/murabito/src/acmd/specials.rs @@ -1,34 +1,34 @@ use super::*; -unsafe extern "C" fn murabito_special_lw1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_LW_PLANT_FLAG_CHECK_PLANT); - FT_MOTION_RATE(fighter, 0.661); + FT_MOTION_RATE(agent, 0.661); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SEED, false, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 72, 20, 0, 80, 4.0, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 20, 0, 80, 4.0, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); WorkModule::on_flag(boma, *FIGHTER_MURABITO_STATUS_SPECIAL_LW_PLANT_FLAG_PLANT); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_special_lw3_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw3hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !ItemModule::is_have_item(boma, 0){ ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } @@ -36,11 +36,11 @@ unsafe extern "C" fn murabito_special_lw3_hit_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn murabito_special_air_lw3_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw3hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !ItemModule::is_have_item(boma, 0){ ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } @@ -48,10 +48,8 @@ unsafe extern "C" fn murabito_special_air_lw3_hit_game(fighter: &mut L2CAgentBas } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_speciallw1", murabito_special_lw1_game) - .acmd("game_speciallw3hit", murabito_special_lw3_hit_game) - .acmd("game_specialairlw3hit", murabito_special_air_lw3_hit_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1", game_speciallw1); + agent.acmd("game_speciallw3hit", game_speciallw3hit); + agent.acmd("game_specialairlw3hit", game_specialairlw3hit); } diff --git a/fighters/murabito/src/acmd/throws.rs b/fighters/murabito/src/acmd/throws.rs index fac60fb0cf..cb1ebbf2e6 100644 --- a/fighters/murabito/src/acmd/throws.rs +++ b/fighters/murabito/src/acmd/throws.rs @@ -1,164 +1,162 @@ use super::*; -unsafe extern "C" fn murabito_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BUTTERFLYNET, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn murabito_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 16.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, 4.0, Some(0.0), Some(5.5), Some(12.75), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } } -unsafe extern "C" fn murabito_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); - if is_excute(fighter){ - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ENABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent){ + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 5.5, -5.0, Some(0.0), Some(5.5), Some(-14.25), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ENABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } wait(lua_state, 2.0); - if is_excute(fighter) { - UNABLE_AREA(fighter, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); + if is_excute(agent) { + UNABLE_AREA(agent, *FIGHTER_MURABITO_AREA_KIND_SEARCH_ITEM_CATCH); } } -unsafe extern "C" fn murabito_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 40, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 7); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn murabito_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 135, 102, 0, 46, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 135, 102, 0, 46, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, -2, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, -2, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - REVERSE_LR(fighter); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + REVERSE_LR(agent); } } -unsafe extern "C" fn murabito_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 52, 0, 94, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 90, 52, 0, 94, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 10, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 10, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_catch", murabito_catch_game) - .acmd("game_catchdash", murabito_catch_dash_game) - .acmd("game_catchturn", murabito_catch_turn_game) - .acmd("game_throwf", murabito_throw_f_game) - .acmd("game_throwb", murabito_throw_b_game) - .acmd("game_throwhi", murabito_throw_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/murabito/src/acmd/tilts.rs b/fighters/murabito/src/acmd/tilts.rs index 875d5f76d4..82a9f95db9 100644 --- a/fighters/murabito/src/acmd/tilts.rs +++ b/fighters/murabito/src/acmd/tilts.rs @@ -1,75 +1,75 @@ use super::*; -unsafe extern "C" fn murabito_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_UMBRELLA, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 2.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 361, 82, 0, 31, 2.5, 0.0, 2.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 4.5, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, -5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 36, 82, 0, 31, 2.5, 5.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.877); + FT_MOTION_RATE(agent, 0.877); } frame(lua_state, 37.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_UMBRELLA, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn murabito_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - FT_MOTION_RATE(fighter, 0.850); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 3.8, 0.0, -1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("havel"), 5.0, 135, 10, 0, 35, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 0.850); + ATTACK(agent, 0, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 3.8, 0.0, -1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 5.0, 108, 100, 75, 0, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("havel"), 5.0, 135, 10, 0, 35, 4.0, 0.0, 5.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - ATTACK(fighter, 0, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + ATTACK(agent, 0, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 5.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("havel"), 7.0, 80, 155, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { // START DTilt Sapling Removal Logic... VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); @@ -94,7 +94,7 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { } // ... END Dtilt Sapling Removal Logic - FT_MOTION_RATE(fighter, 0.746); + FT_MOTION_RATE(agent, 0.746); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); // If the flag is not set, generate weeds if !VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { @@ -102,15 +102,15 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -118,50 +118,50 @@ unsafe extern "C" fn murabito_attack_lw3_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 90, 92, 0, 68, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 90, 92, 0, 68, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_WEEDS, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 78, 70, 0, 60, 5.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 89, 70, 0, 60, 5.0, 0.0, 3.0, 10.0, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 78, 70, 0, 60, 5.0, 0.0, 3.0, 2.0, Some(0.0), Some(3.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 89, 70, 0, 60, 5.0, 0.0, 3.0, 10.0, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } } -unsafe extern "C" fn murabito_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil"), Hash40::new("top"), 7.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil"), Hash40::new("top"), 7.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -169,39 +169,37 @@ unsafe extern "C" fn murabito_attack_lw3_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1.0, 0.5, 0.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), 1.0, 0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 1.0, 0.5, 0.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), 1.0, 0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn murabito_attack_lw3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_attackhard_l01")); + PLAY_SE(agent, Hash40::new("se_murabito_attackhard_l01")); } } } -pub fn install() { - smashline::Agent::new("murabito") - .acmd("game_attacks3", murabito_attack_s3_s_game) - .acmd("game_attackhi3", murabito_attack_hi3_game) - .acmd("game_attacklw3", murabito_attack_lw3_game) - .acmd("effect_attacklw3", murabito_attack_lw3_effect) - .acmd("sound_attacklw3", murabito_attack_lw3_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); } diff --git a/fighters/murabito/src/bowlingball/acmd.rs b/fighters/murabito/src/bowlingball/acmd.rs new file mode 100644 index 0000000000..336c9276c6 --- /dev/null +++ b/fighters/murabito/src/bowlingball/acmd.rs @@ -0,0 +1,16 @@ +use super::*; +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); +} diff --git a/fighters/murabito/src/bowlingball/mod.rs b/fighters/murabito/src/bowlingball/mod.rs new file mode 100644 index 0000000000..6a42f341a5 --- /dev/null +++ b/fighters/murabito/src/bowlingball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_bowlingball"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/bullet/acmd.rs b/fighters/murabito/src/bullet/acmd.rs new file mode 100644 index 0000000000..d2bed759d1 --- /dev/null +++ b/fighters/murabito/src/bullet/acmd.rs @@ -0,0 +1,21 @@ +use super::*; +unsafe extern "C" fn game_shootf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 60, 132, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 25, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -2, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 100, 0, 10, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + } + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shootf", game_shootf); +} diff --git a/fighters/murabito/src/bullet/mod.rs b/fighters/murabito/src/bullet/mod.rs new file mode 100644 index 0000000000..8a79b834f6 --- /dev/null +++ b/fighters/murabito/src/bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/clayrocket/acmd.rs b/fighters/murabito/src/clayrocket/acmd.rs new file mode 100644 index 0000000000..debb646847 --- /dev/null +++ b/fighters/murabito/src/clayrocket/acmd.rs @@ -0,0 +1,13 @@ +use super::*; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 110, 55, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/murabito/src/clayrocket/mod.rs b/fighters/murabito/src/clayrocket/mod.rs new file mode 100644 index 0000000000..0b8b60fac7 --- /dev/null +++ b/fighters/murabito/src/clayrocket/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_clayrocket"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/firework/acmd.rs b/fighters/murabito/src/firework/acmd.rs new file mode 100644 index 0000000000..3267692fad --- /dev/null +++ b/fighters/murabito/src/firework/acmd.rs @@ -0,0 +1,30 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} diff --git a/fighters/murabito/src/firework/mod.rs b/fighters/murabito/src/firework/mod.rs new file mode 100644 index 0000000000..fa9c9a101d --- /dev/null +++ b/fighters/murabito/src/firework/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_firework"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/flowerpot/acmd.rs b/fighters/murabito/src/flowerpot/acmd.rs new file mode 100644 index 0000000000..10ce283e14 --- /dev/null +++ b/fighters/murabito/src/flowerpot/acmd.rs @@ -0,0 +1,36 @@ +use super::*; +unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 10.0, 70, 60, 0, 70, 4.2, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + +} +unsafe extern "C" fn effect_bound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !WorkModule::is_flag(boma, *WEAPON_MURABITO_FLOWERPOT_INSTANCE_WORK_ID_FLAG_ASASE) { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("murabito_pot_boundsmoke"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + else { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_water_walk"), Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("have"), 4.0, 361, 60, 0, 40, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_throwed", game_throwed); + agent.acmd("effect_bound", effect_bound); +} diff --git a/fighters/murabito/src/flowerpot/mod.rs b/fighters/murabito/src/flowerpot/mod.rs new file mode 100644 index 0000000000..c18cc8ac53 --- /dev/null +++ b/fighters/murabito/src/flowerpot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_flowerpot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/lib.rs b/fighters/murabito/src/lib.rs index 5537dac979..34f0c1e254 100644 --- a/fighters/murabito/src/lib.rs +++ b/fighters/murabito/src/lib.rs @@ -7,6 +7,13 @@ pub mod acmd; pub mod status; pub mod opff; +mod bowlingball; +mod bullet; +mod clayrocket; +mod firework; +mod flowerpot; +mod slingshot; + use smash::{ lib::{ L2CValue, @@ -39,7 +46,16 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("murabito"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + bowlingball::install(); + bullet::install(); + clayrocket::install(); + firework::install(); + flowerpot::install(); + slingshot::install(); } \ No newline at end of file diff --git a/fighters/murabito/src/opff.rs b/fighters/murabito/src/opff.rs index f64a85697a..29d99c0265 100644 --- a/fighters/murabito/src/opff.rs +++ b/fighters/murabito/src/opff.rs @@ -122,11 +122,7 @@ pub extern "C" fn article_frame_callback(weapon: &mut smash::lua2cpp::L2CFighter } } -pub fn install() { - smashline::Agent::new("murabito") - .on_line(Main, murabito_frame_wrapper) - .install(); - smashline::Agent::new("murabito_flowerpot") - .on_line(Main, article_frame_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, murabito_frame_wrapper); + agent.on_line(Main, article_frame_callback); } \ No newline at end of file diff --git a/fighters/murabito/src/slingshot/acmd.rs b/fighters/murabito/src/slingshot/acmd.rs new file mode 100644 index 0000000000..8b64bb3da4 --- /dev/null +++ b/fighters/murabito/src/slingshot/acmd.rs @@ -0,0 +1,12 @@ +use super::*; +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + + } + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairb", game_attackairb); +} diff --git a/fighters/murabito/src/slingshot/mod.rs b/fighters/murabito/src/slingshot/mod.rs new file mode 100644 index 0000000000..5010fcfc88 --- /dev/null +++ b/fighters/murabito/src/slingshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("murabito_slingshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/murabito/src/status.rs b/fighters/murabito/src/status.rs index b63be8dc4e..fc2f651b14 100644 --- a/fighters/murabito/src/status.rs +++ b/fighters/murabito/src/status.rs @@ -117,12 +117,10 @@ pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) } -pub fn install() { - smashline::Agent::new("murabito") - .on_start(murabito_init) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status(Main, *FIGHTER_STATUS_KIND_JUMP, jump) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(murabito_init); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); } \ No newline at end of file From 5adf655bb2b2e07003f0e1736a69f72277a10f07 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 17:06:28 -0400 Subject: [PATCH 115/172] dark samus crate --- fighters/samusd/src/acmd/aerials.rs | 516 +++++++++++------------ fighters/samusd/src/acmd/ground.rs | 122 +++--- fighters/samusd/src/acmd/mod.rs | 16 +- fighters/samusd/src/acmd/other.rs | 230 ++-------- fighters/samusd/src/acmd/smashes.rs | 272 ++++++------ fighters/samusd/src/acmd/specials.rs | 144 ++++--- fighters/samusd/src/acmd/throws.rs | 76 ++-- fighters/samusd/src/acmd/tilts.rs | 316 +++++++------- fighters/samusd/src/bomb/acmd.rs | 48 +++ fighters/samusd/src/bomb/mod.rs | 9 + fighters/samusd/src/cshot/acmd.rs | 36 ++ fighters/samusd/src/cshot/mod.rs | 9 + fighters/samusd/src/lib.rs | 18 +- fighters/samusd/src/missile/acmd.rs | 36 ++ fighters/samusd/src/missile/mod.rs | 9 + fighters/samusd/src/opff.rs | 6 +- fighters/samusd/src/status.rs | 10 +- fighters/samusd/src/status/attack_air.rs | 8 +- fighters/samusd/src/status/float.rs | 10 +- fighters/samusd/src/supermissile/acmd.rs | 34 ++ fighters/samusd/src/supermissile/mod.rs | 9 + 21 files changed, 978 insertions(+), 956 deletions(-) create mode 100644 fighters/samusd/src/bomb/acmd.rs create mode 100644 fighters/samusd/src/bomb/mod.rs create mode 100644 fighters/samusd/src/cshot/acmd.rs create mode 100644 fighters/samusd/src/cshot/mod.rs create mode 100644 fighters/samusd/src/missile/acmd.rs create mode 100644 fighters/samusd/src/missile/mod.rs create mode 100644 fighters/samusd/src/supermissile/acmd.rs create mode 100644 fighters/samusd/src/supermissile/mod.rs diff --git a/fighters/samusd/src/acmd/aerials.rs b/fighters/samusd/src/acmd/aerials.rs index 5d04508008..d2d5644c57 100644 --- a/fighters/samusd/src/acmd/aerials.rs +++ b/fighters/samusd/src/acmd/aerials.rs @@ -1,473 +1,471 @@ use super::*; -unsafe extern "C" fn samusd_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 7.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 365, 48, 0, 34, 4.0, 0.0, 15.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, 4.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 110, 48, 0, 34, 4.0, 0.0, 6.0, -4.1, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.4, 48, 78, 0, 52, 10.5, 0.0, 9.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.4, 48, 78, 0, 52, 10.5, 0.0, 9.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - BURN_COLOR(fighter, 0.699999988, 0.200000003, 1.0, 0.699999988); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 0.23, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR(agent, 0.699999988, 0.200000003, 1.0, 0.699999988); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 0.23, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.699999988, 0.200000003, 1.0, 0); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.699999988, 0.200000003, 1.0, 0); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 3.5, -6.1, 0, 0, 0, 0.17, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 3.5, -6.1, 0, 0, 0, 0.17, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.699999988, 1.0, 0.5); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + FLASH(agent, 1, 0.699999988, 1.0, 0.5); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 1, 0.699999988, 1.0, 0); - COL_NORMAL(fighter); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 8.4, 0.2, 0, 0, 0, 0.32, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + FLASH_FRM(agent, 1, 1, 0.699999988, 1.0, 0); + COL_NORMAL(agent); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 8.4, 0.2, 0, 0, 0, 0.32, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR(fighter, 0.699999988, 0.200000003, 1.0, 0.699999988); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + BURN_COLOR(agent, 0.699999988, 0.200000003, 1.0, 0.699999988); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + LAST_EFFECT_SET_RATE(agent, 1); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.699999988, 0.200000003, 1.0, 0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.2, 5.6, 0, 0, 0, 0.2, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.699999988, 0.200000003, 1.0, 0); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 6.2, 5.6, 0, 0, 0, 0.2, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + BURN_COLOR_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.699999988, 1.0, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 16.3, -6.1, 0, 0, 0, 0.15, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); + if is_excute(agent) { + FLASH(agent, 1, 0.699999988, 1.0, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0.0, 16.3, -6.1, 0, 0, 0, 0.15, true); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 12.0, 1.0, 0, 0, 0, 1.8, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 1, 0.699999988, 1.0, 0); - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_hit_elec_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + FLASH_FRM(agent, 1, 1, 0.699999988, 1.0, 0); + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("sys_hit_elec_s"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } wait(lua_state, 1.0); } frame(lua_state, 39.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_OFF_KIND(fighter, Hash40::new("samusd_win3_aura"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_damage_elec"), false, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 14.7, 4.3, 0, 0, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_OFF_KIND(agent, Hash40::new("samusd_win3_aura"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } } -unsafe extern "C" fn samusd_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); for _ in 0..2 { - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 5.0); } - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_spirits_floor_elec_spark1")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } } -unsafe extern "C" fn samusd_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 34.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn samusd_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 3.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 15.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 11.0, 15.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 85, 0, 30, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0);//34 faf - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0);//34 faf + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn samusd_attack_air_f_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_m")); } } -unsafe extern "C" fn samusd_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 7.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 38, 90, 0, 44, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 38, 90, 0, 44, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 38, 90, 0, 44, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 38, 90, 0, 44, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 38, 90, 0, 44, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 38, 90, 0, 44, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 9.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 9.0, 361, 90, 0, 20, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 361, 90, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 32.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 18.0, 32.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8, -15, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 8, -15, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn samusd_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.66); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.66); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 6.0/(18.0-6.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 75, 101, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 75, 101, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 10.0, 75, 101, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 6.0/(18.0-6.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 75, 101, 0, 50, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 75, 101, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 10.0, 75, 101, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -unsafe extern "C" fn samusd_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_s")); } } -unsafe extern "C" fn samusd_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.562); + FT_MOTION_RATE(agent, 0.562); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 270, 75, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 270, 51, 0, 26, 5.0, 5.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 4.3, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 67, 60, 0, 46, 5.0, 4.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn samusd_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.1); } } -unsafe extern "C" fn samusd_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 4.0, 45, 30, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 45, 30, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("throw"), 4.0, 45, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("throw"), 4.0, 45, 100, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/27.0); +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/27.0); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attackairn", samusd_attack_air_n_game) - .acmd("effect_attackairn", samusd_attack_air_n_effect) - .acmd("sound_attackairn", samusd_attack_air_n_sound) - .acmd("expression_attackairn", samusd_attack_air_n_expression) - .acmd("game_attackairf", samusd_attack_air_f_game) - .acmd("effect_attackairf", samusd_attack_air_f_effect) - .acmd("sound_attackairf", samusd_attack_air_f_sound) - .acmd("expression_attackairf", samusd_attack_air_f_expression) - .acmd("game_attackairb", samusd_attack_air_b_game) - .acmd("effect_attackairb", samusd_attack_air_b_effect) - .acmd("game_attackairhi", samusd_attack_air_hi_game) - .acmd("effect_attackairhi", samusd_attack_air_hi_effect) - .acmd("sound_attackairhi", samusd_attack_air_hi_sound) - .acmd("expression_attackairhi", samusd_attack_air_hi_expression) - .acmd("game_attackairlw", samusd_attack_air_lw_game) - .acmd("effect_attackairlw", samusd_attack_air_lw_effect) - .acmd("game_aircatch", samusd_air_catch_game) - .acmd("game_aircatchlanding", samusd_landing_air_catch_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samusd/src/acmd/ground.rs b/fighters/samusd/src/acmd/ground.rs index 058a7d1f83..1cb408f950 100644 --- a/fighters/samusd/src/acmd/ground.rs +++ b/fighters/samusd/src/acmd/ground.rs @@ -1,118 +1,116 @@ use super::*; -unsafe extern "C" fn samusd_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 60, 38, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 60, 38, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn samusd_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 69, 50, 0, 57, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 12, 3, -17, -22, -81, 1.25, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -2, 12, 3, -17, -22, -81, 1.25, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -unsafe extern "C" fn samusd_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.93); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 6.0); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 58, 90, 0, 80, 5.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 58, 90, 0, 80, 5.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 58, 90, 0, 80, 5.0, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 58, 90, 0, 80, 5.0, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 37.0, 20.0);//40 - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 37.0, 20.0);//40 + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_dash_attack"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_dash_attack"), Hash40::new("top"), 0, 10, 2, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attack11", samusd_attack_11_game) - .acmd("game_attack12", samusd_attack_12_game) - .acmd("effect_attack12", samusd_attack_12_effect) - .acmd("expression_attack12", samusd_attack_12_expression) - .acmd("game_attackdash", samusd_attack_dash_game) - .acmd("effect_attackdash", samusd_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/samusd/src/acmd/mod.rs b/fighters/samusd/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/samusd/src/acmd/mod.rs +++ b/fighters/samusd/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/samusd/src/acmd/other.rs b/fighters/samusd/src/acmd/other.rs index 9646768482..fb6c1871e4 100644 --- a/fighters/samusd/src/acmd/other.rs +++ b/fighters/samusd/src/acmd/other.rs @@ -1,235 +1,75 @@ use super::*; -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_samusd_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_samusd_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } - -unsafe extern "C" fn samusd_cshot_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 40, 72, 0, 50, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } - -} - -unsafe extern "C" fn samusd_cshot_shoot_sound (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 0.0); - if is_excute(fighter) { - if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n02")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n03")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n04")); - } - else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_samusd_special_n05")); - } - } - -} - -unsafe extern "C" fn samusd_homing_missile_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 0, 25, 0, 26, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 60, 47, 0, 28, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn samusd_homing_missile_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 2.0, 0.5, 0.5); - } - frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("samusd_missile_homing"), false, true); - } -} - -unsafe extern "C" fn samusd_super_missile_ready_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn samusd_super_missile_straight_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } -} - -// #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] -// unsafe fn samusd_super_missile_burst_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); -// ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0x50000000 /* default value */); -// } -// wait(lua_state, 1.0); -// if is_excute(fighter) { -// ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0x50000000 /* default value */); -// notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); -// } -// } - -unsafe extern "C" fn samusd_bomb_fall_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 45, 0, 22, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn samusd_bomb_burst_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 90, 90, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD(fighter, 0, 0.5, 0.02, 1000, 1, 0, 0, 16); - } - wait(lua_state, 1.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } - wait(lua_state, 3.0); - if is_excute(fighter) { - AreaModule::erase_wind(boma, 0); - } - wait(lua_state, 11.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn samusd_bomb_burst_attack_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_hit_purple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("samusd_entry"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 77.0/12.0); - } -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("samusd_cshot") - .acmd("game_shoot", samusd_cshot_shoot_game) - .acmd("sound_shoot", samusd_cshot_shoot_sound) - .install(); - smashline::Agent::new("samusd_missile") - .acmd("game_homing", samusd_homing_missile_game) - .acmd("effect_homing", samusd_homing_missile_effect) - .install(); - smashline::Agent::new("samusd_bomb") - .acmd("game_fall", samusd_bomb_fall_game) - .acmd("game_burstattack", samusd_bomb_burst_attack_game) - .acmd("effect_burstattack", samusd_bomb_burst_attack_effect) - .install(); - smashline::Agent::new("samusd_supermissile") - .acmd("game_ready", samusd_super_missile_ready_game) - .acmd("game_straight", samusd_super_missile_straight_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samusd/src/acmd/smashes.rs b/fighters/samusd/src/acmd/smashes.rs index 76991e4b80..ad6a5f35e6 100644 --- a/fighters/samusd/src/acmd/smashes.rs +++ b/fighters/samusd/src/acmd/smashes.rs @@ -1,102 +1,102 @@ use super::*; -unsafe extern "C" fn samusd_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 100, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 105, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 18.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 15.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + FT_MOTION_RATE_RANGE(agent, 11.0, 18.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 15.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 30.0, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + FT_MOTION_RATE_RANGE(agent, 18.0, 30.0, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 80, 75, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 75, 0, 80, 5.0, 6.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -126,140 +126,138 @@ unsafe extern "C" fn samusd_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 70, 93, 0, 42, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(10.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 70, 93, 0, 42, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(10.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(10.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.0, 70, 96, 0, 42, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 4, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.5, 0.0, 4.5, -3.5, Some(0.0), Some(4.5), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, -11.0, Some(0.0), Some(22.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 70, 101, 0, 40, 4.0, 0.0, 15.0, 17.0, Some(0.0), Some(22.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, -11.0, Some(0.0), Some(15.0), Some(-11.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 4, 0, Hash40::new("top"), 14.0, 70, 101, 0, 40, 6.5, 0.0, 6.5, 17.0, Some(0.0), Some(15.0), Some(17.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.333); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.333); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 70.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn samusd_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("hip"), -2.0, 0.0, 0.0, 0, 0, 0, 2.5, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("clavicler"), 2.0, 0.0, 0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneer"), 0.0, 0.0, -0.5, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("armr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("claviclel"), 2.0, 0.0, -0.5, 0, 0, 0, 2.0, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("kneel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.70000005, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("footl"), 0.0, 0.0, 0.0, 0, 0, 0, 2.0999999, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("arml"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.65, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); - EFFECT_FOLLOW(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.65, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.75, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.65, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, -11, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("samusd_throw_hi"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.65, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.75, true); } } -unsafe extern "C" fn samusd_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_l")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_special_n04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_special_n04")); } } -unsafe extern "C" fn samusd_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_beamm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 20); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 20); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attacks4hi", samusd_attack_s4_hi_game) - .acmd("game_attacks4", samusd_attack_s4_game) - .acmd("game_attacks4lw", samusd_attack_s4_lw_game) - .acmd("game_attackhi4", samusd_attack_hi4_game) - .acmd("effect_attackhi4", samusd_attack_hi4_effect) - .acmd("game_attacklw4", samusd_attack_lw4_game) - .acmd("effect_attacklw4", samusd_attack_lw4_effect) - .acmd("sound_attacklw4", samusd_attack_lw4_sound) - .acmd("expression_attacklw4", samusd_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/samusd/src/acmd/specials.rs b/fighters/samusd/src/acmd/specials.rs index 2ae1cf22eb..db95edef9b 100644 --- a/fighters/samusd/src/acmd/specials.rs +++ b/fighters/samusd/src/acmd/specials.rs @@ -34,162 +34,160 @@ use super::*; // } // } -unsafe extern "C" fn samusd_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_ACC_X); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 0.0, -5.0, Some(0.0), Some(0.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 92, 100, 200, 0, 3.2, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 105, 100, 200, 0, 3.2, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } wait(lua_state, 3.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 92, 100, 180, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 180, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 92, 100, 80, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 80, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 84, 100, 100, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 100, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 84, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 82, 100, 40, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 40, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 82, 100, 20, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 90, 100, 20, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 189, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 189, 0, 56, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn samusd_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 100, 115, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 96, 100, 115, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 93, 100, 60, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 96, 100, 60, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.5, 0.6, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 96, 100, 70, 0, 3.2, 0.0, 2.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 98, 100, 70, 0, 3.2, 0.0, 2.0, -5.0, Some(0.0), Some(2.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 96, 100, 40, 0, 3.0, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.0, 98, 100, 40, 0, 3.0, 0.0, 9.0, -5.0, Some(0.0), Some(9.0), Some(-5.0), 0.6, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SAMUSD_SCREW, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_HI_FLAG_DISABLE_LR); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 170, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 170, 0, 50, 10.0, 0.0, 6.5, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SAMUSD_SCREW_FINISH, *ATTACK_REGION_BODY); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn samusd_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_JUMP); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_WEAPON); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_sphere") as i64); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_CHK_CROUCH); } - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); } -unsafe extern "C" fn samusd_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_WEAPON); VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_sphere") as i64); WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_LW_FLAG_MV); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_specialhi", samusd_special_hi_game) - .acmd("game_specialairhi", samusd_special_air_hi_game) - .acmd("game_speciallw", samusd_special_lw_game) - .acmd("game_specialairlw", samusd_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/samusd/src/acmd/throws.rs b/fighters/samusd/src/acmd/throws.rs index bf309447e8..0ed2f6130f 100644 --- a/fighters/samusd/src/acmd/throws.rs +++ b/fighters/samusd/src/acmd/throws.rs @@ -93,79 +93,77 @@ unsafe extern "C" fn samusd_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 42, 90, 0, 44, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 42, 90, 0, 44, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 28, 16); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 28, 16); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn samusd_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 108, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 108, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 100, 0, 10, 6.5, 0.0, 23.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 100, 0, 10, 6.5, 0.0, 23.0, -1.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 1, 32); + CHECK_FINISH_CAMERA(agent, 1, 32); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 86, 70, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_elec_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 17, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 17, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 0.85); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.85); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SAMUS_INSTANCE_WORK_ID_FLAG_ARTICLE_MOTION_RATE_SYNC); } } -pub fn install() { - smashline::Agent::new("samusd") +pub fn install(agent: &mut Agent) { //.acmd("game_catch", samusd_catch_game) //.acmd("game_catchdash", samusd_catch_dash_game) //.acmd("game_catchturn", samusd_catch_turn_game) - .acmd("game_throwf", samusd_throw_f_game) - .acmd("game_throwhi", samusd_throw_hi_game) - .acmd("game_throwlw", samusd_throw_lw_game) - .install(); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/samusd/src/acmd/tilts.rs b/fighters/samusd/src/acmd/tilts.rs index 05c6daa825..faaa51e74e 100644 --- a/fighters/samusd/src/acmd/tilts.rs +++ b/fighters/samusd/src/acmd/tilts.rs @@ -1,268 +1,268 @@ use super::*; -unsafe extern "C" fn samusd_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn samusd_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } } -unsafe extern "C" fn samusd_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn samusd_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn samusd_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_XLU); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("handr"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("handr"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.0, 361, 102, 0, 20, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn samusd_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 6, -15, 0, 195, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 6, 6, -15, 0, 195, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.0); } } -unsafe extern "C" fn samusd_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); //ground only pop up hitbox, f7 frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.5, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.5, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } //the rest of the first kick, f8-10 frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 22.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 18.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 22.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 18.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 16.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 100, 100, 70, 0, 5.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 366, 100, 40, 0, 4.5, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 4.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 4.0, 95, 100, 45, 0, 3.5, 0.0, 16.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } //second kick (early strong hit), f12-16 //the extra frames are to adjust for z axis alginment issues on the animation frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); //ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } //second kick (late weak hit), f17-18 frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 5.0, 9.0, 0.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 4.5, 5.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 3.5, 0.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 5.0, 9.0, 0.0, -7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 4.5, 5.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("legr"), 3.0, 110, 100, 0, 65, 3.5, 0.0, 0.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn samusd_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_s")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samusd_swing_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samusd_swing_l")); } } -unsafe extern "C" fn samusd_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 17, 0, 10, 30, 90, 1.3, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 17, 0, 10, 30, 90, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 17, 0, 25, 100, 100, 1.3, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 17, 0, 25, 100, 100, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 27.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false) } } -unsafe extern "C" fn samusd_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 6); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 6); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn samusd_attack_lw3_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 6.0); @@ -278,18 +278,16 @@ unsafe extern "C" fn samusd_attack_lw3_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("samusd") - .acmd("game_attacks3hi", samusd_attack_s3_hi_game) - .acmd("effect_attacks3hi", samusd_attack_s3_hi_effect) - .acmd("game_attacks3", samusd_attack_s3_game) - .acmd("effect_attacks3", samusd_attack_s3_effect) - .acmd("game_attacks3lw", samusd_attack_s3_lw_game) - .acmd("effect_attacks3lw", samusd_attack_s3_lw_effect) - .acmd("game_attackhi3", samusd_attack_hi3_game) - .acmd("sound_attackhi3", samusd_attack_hi3_sound) - .acmd("effect_attackhi3", samusd_attack_hi3_effect) - .acmd("expression_attackhi3", samusd_attack_hi3_expression) - .acmd("game_attacklw3", samusd_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samusd/src/bomb/acmd.rs b/fighters/samusd/src/bomb/acmd.rs new file mode 100644 index 0000000000..4fc611e3e8 --- /dev/null +++ b/fighters/samusd/src/bomb/acmd.rs @@ -0,0 +1,48 @@ +use super::*; +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 45, 0, 22, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } +} +unsafe extern "C" fn game_burstattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90, 90, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AREA_WIND_2ND_RAD(agent, 0, 0.5, 0.02, 1000, 1, 0, 0, 16); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + wait(lua_state, 11.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} +unsafe extern "C" fn effect_burstattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_hit_purple"), Hash40::new("top"), 0, 0.5, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("samusd_entry"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 77.0/12.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fall", game_fall); + agent.acmd("game_burstattack", game_burstattack); + agent.acmd("effect_burstattack", effect_burstattack); +} diff --git a/fighters/samusd/src/bomb/mod.rs b/fighters/samusd/src/bomb/mod.rs new file mode 100644 index 0000000000..a87453c647 --- /dev/null +++ b/fighters/samusd/src/bomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_bomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/cshot/acmd.rs b/fighters/samusd/src/cshot/acmd.rs new file mode 100644 index 0000000000..93364d96e0 --- /dev/null +++ b/fighters/samusd/src/cshot/acmd.rs @@ -0,0 +1,36 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 40, 72, 0, 50, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } + +} +unsafe extern "C" fn sound_shoot (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n02")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n03")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n05")); + } + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} diff --git a/fighters/samusd/src/cshot/mod.rs b/fighters/samusd/src/cshot/mod.rs new file mode 100644 index 0000000000..0722129296 --- /dev/null +++ b/fighters/samusd/src/cshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_cshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/lib.rs b/fighters/samusd/src/lib.rs index 1ad1fd8b2b..7a5858761e 100644 --- a/fighters/samusd/src/lib.rs +++ b/fighters/samusd/src/lib.rs @@ -6,6 +6,11 @@ pub mod acmd; pub mod status; pub mod opff; +mod bomb; +mod cshot; +mod missile; +mod supermissile; + use smash::{ lib::{ L2CValue, @@ -38,7 +43,14 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("samusd"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + bomb::install(); + cshot::install(); + missile::install(); + supermissile::install(); } diff --git a/fighters/samusd/src/missile/acmd.rs b/fighters/samusd/src/missile/acmd.rs new file mode 100644 index 0000000000..dc7166f87f --- /dev/null +++ b/fighters/samusd/src/missile/acmd.rs @@ -0,0 +1,36 @@ +use super::*; +unsafe extern "C" fn game_homing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 0, 25, 0, 26, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 40.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 60, 47, 0, 28, 2.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn effect_homing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_missile_homing"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 3, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.5, 0.5); + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("samusd_missile_homing"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_homing", game_homing); + agent.acmd("effect_homing", effect_homing); +} diff --git a/fighters/samusd/src/missile/mod.rs b/fighters/samusd/src/missile/mod.rs new file mode 100644 index 0000000000..e5c579352a --- /dev/null +++ b/fighters/samusd/src/missile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_missile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samusd/src/opff.rs b/fighters/samusd/src/opff.rs index 66d257ed26..c4b3877eff 100644 --- a/fighters/samusd/src/opff.rs +++ b/fighters/samusd/src/opff.rs @@ -132,8 +132,6 @@ pub unsafe fn samusd_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { // } // } -pub fn install() { - smashline::Agent::new("samusd") - .on_line(Main, samusd_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, samusd_frame_wrapper); } diff --git a/fighters/samusd/src/status.rs b/fighters/samusd/src/status.rs index 295647d2d6..d93d6436d3 100644 --- a/fighters/samusd/src/status.rs +++ b/fighters/samusd/src/status.rs @@ -26,12 +26,10 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::samusd::FLOAT); } -pub fn install() { - attack_air::install(); +pub fn install(agent: &mut Agent) { + attack_air::install(agent); - float::install(); + float::install(agent); - Agent::new("samusd") - .on_start(on_start) - .install(); + agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/samusd/src/status/attack_air.rs b/fighters/samusd/src/status/attack_air.rs index 32dcfe1b04..ff1702ae6b 100644 --- a/fighters/samusd/src/status/attack_air.rs +++ b/fighters/samusd/src/status/attack_air.rs @@ -16,9 +16,7 @@ unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue attack_air_float_main(fighter, statuses::samusd::FLOAT.into()) } -pub fn install() { - smashline::Agent::new("samusd") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/samusd/src/status/float.rs b/fighters/samusd/src/status/float.rs index 633037e1a9..c874318176 100644 --- a/fighters/samusd/src/status/float.rs +++ b/fighters/samusd/src/status/float.rs @@ -38,10 +38,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("samusd") - .status(Pre, statuses::samusd::FLOAT, float_pre) - .status(Main, statuses::samusd::FLOAT, float_main) - .status(End, statuses::samusd::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::samusd::FLOAT, float_pre); + agent.status(Main, statuses::samusd::FLOAT, float_main); + agent.status(End, statuses::samusd::FLOAT, float_end); } diff --git a/fighters/samusd/src/supermissile/acmd.rs b/fighters/samusd/src/supermissile/acmd.rs new file mode 100644 index 0000000000..56369b7c26 --- /dev/null +++ b/fighters/samusd/src/supermissile/acmd.rs @@ -0,0 +1,34 @@ +use super::*; +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } +} +// #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] +// unsafe fn samusd_super_missile_burst_game(fighter: &mut L2CAgentBase) { +// let lua_state = fighter.lua_state_agent; +// let boma = fighter.boma(); +// if is_excute(fighter) { +// ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); +// ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0x50000000 /* default value */); +// } +// wait(lua_state, 1.0); +// if is_excute(fighter) { +// ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0x50000000 /* default value */); +// notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +// } +// } +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + agent.acmd("game_straight", game_straight); +} diff --git a/fighters/samusd/src/supermissile/mod.rs b/fighters/samusd/src/supermissile/mod.rs new file mode 100644 index 0000000000..762dcbe6f2 --- /dev/null +++ b/fighters/samusd/src/supermissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samusd_supermissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 469f72f25e6ec4cfe52765f4573c40a4c701b598 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 18:05:15 -0400 Subject: [PATCH 116/172] ness! --- fighters/ness/src/acmd/other.rs | 76 ++++++++------------------ fighters/ness/src/acmd/smashes.rs | 84 +++-------------------------- fighters/ness/src/acmd/specials.rs | 20 +++---- fighters/ness/src/pkthunder/acmd.rs | 52 +++++------------- fighters/ness/src/pkthunder/mod.rs | 2 +- fighters/ness/src/yoyo/acmd.rs | 69 ++++++++++++++++++++++++ fighters/ness/src/yoyo/mod.rs | 9 ++++ 7 files changed, 130 insertions(+), 182 deletions(-) create mode 100644 fighters/ness/src/yoyo/acmd.rs create mode 100644 fighters/ness/src/yoyo/mod.rs diff --git a/fighters/ness/src/acmd/other.rs b/fighters/ness/src/acmd/other.rs index 7bfdbdf82c..5416d51d7e 100644 --- a/fighters/ness/src/acmd/other.rs +++ b/fighters/ness/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -116,7 +116,7 @@ unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -134,7 +134,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn ness_turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -147,35 +147,7 @@ unsafe extern "C" fn ness_turn_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ness_pkthunder_move(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} - -unsafe extern "C" fn ness_pkthunder_move_child(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { - ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -190,7 +162,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -228,22 +200,16 @@ unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("ness_pkthunder") - .acmd("game_move", ness_pkthunder_move) - .acmd("game_movechild", ness_pkthunder_move_child) - .install(); - smashline::Agent::new("ness") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", ness_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("effect_jumpaerialfront", effect_jumpaerialfront) - .acmd("effect_jumpaerialback", effect_jumpaerialback) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_jumpaerialfront", effect_jumpaerialfront); + agent.acmd("effect_jumpaerialback", effect_jumpaerialback); } diff --git a/fighters/ness/src/acmd/smashes.rs b/fighters/ness/src/acmd/smashes.rs index c34d6adf7c..8305efa1fe 100644 --- a/fighters/ness/src/acmd/smashes.rs +++ b/fighters/ness/src/acmd/smashes.rs @@ -158,82 +158,10 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } - -unsafe extern "C" fn game_yoyo_attackhi4 (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.74); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 90, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("attach"), 13.0, 80, 79, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 34.0); - if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - } - frame(lua_state, 37.0); -} - -unsafe extern "C" fn game_yoyo_attacklw4 (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 367, 100, 12, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 28, 80, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - // frame(lua_state, 18.0); - // if is_excute(fighter) { - // AttackModule::clear_all(fighter.module_accessor); - // } - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - // frame(lua_state, 25.0); - // if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 35, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - // AttackModule::clear_all(fighter.module_accessor); - // } - // frame(lua_state, 30.0); - // if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); - // } - frame(lua_state, 32.0); - if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - } - frame(lua_state, 40.0); -} - -pub fn install() { - smashline::Agent::new("ness_yoyohead") - .acmd("game_attackhi4", game_yoyo_attackhi4) - .acmd("game_attacklw4", game_yoyo_attacklw4) - .install(); - smashline::Agent::new("ness") - .acmd("game_attacks4", game_attacks4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attackhi4", game_attackhi4) - .acmd("game_attacklw4", game_attacklw4) - .acmd("expression_attacklw4", expression_attacklw4) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index a4d76fbb8f..c4e3492ed1 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -1,9 +1,9 @@ use super::*; -unsafe extern "C" fn special_n_fire_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn special_air_n_fire_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairnfire(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { @@ -80,7 +80,7 @@ unsafe extern "C" fn sound_specialairs(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ness_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -109,7 +109,7 @@ unsafe extern "C" fn ness_special_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn special_lw_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); for _ in 0..999 { @@ -125,7 +125,7 @@ unsafe extern "C" fn special_lw_hold_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn special_air_lw_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwhold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); for _ in 0..999 { @@ -193,15 +193,15 @@ unsafe extern "C" fn effect_specialairlwend (agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialnfire", special_n_fire_game); - agent.acmd("game_specialairnfire", special_air_n_fire_game); + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialairnfire); agent.acmd("sound_specials", sound_specials); agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specialairs); agent.acmd("sound_specialairs", sound_specialairs); - agent.acmd("game_specialairhi", ness_special_air_hi_game); - agent.acmd("game_speciallwhold", special_lw_hold_game); - agent.acmd("game_specialairlwhold", special_air_lw_hold_game); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_specialairlwhold); agent.acmd("game_speciallwend", game_speciallwend); agent.acmd("game_specialairlwend", game_speciallwend); agent.acmd("effect_speciallwstart", effect_speciallwstart); diff --git a/fighters/ness/src/pkthunder/acmd.rs b/fighters/ness/src/pkthunder/acmd.rs index 33e2dfe6d7..eb55368710 100644 --- a/fighters/ness/src/pkthunder/acmd.rs +++ b/fighters/ness/src/pkthunder/acmd.rs @@ -1,55 +1,31 @@ use super::*; - -unsafe extern "C" fn game_attackfly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 1.0); if is_excute(agent) { - //Rebound hitbox - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 50, 40, 0, 60, 1.75, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } - wait(lua_state, 2.0); + wait(lua_state, 1.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 2.5, 35, 40, 0, 60, 3.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_TANTAN_PUNCH03, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - AttackModule::clear(boma,1,false); - } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); - if is_excute(agent) { - AttackModule::clear_all(boma); + if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 110, 55, 0, 70, 4.4, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } } } - -//Fire ramram -unsafe extern "C" fn game_attacks4fly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - //Scoop for the first few frames, then send back and down - frame(lua_state, 1.0); - if is_excute(agent) { - //Rebound hitbox - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 50, 0, 10, 90, 2.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 2.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("cakram1"), 4.0, 35, 0, 10, 90, 4.0, 0.0, 2.0, 0.0, Some(0.0), Some(-2.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::clear(boma,1,false); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } - let clearFrame = if !WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_AIR) - && WorkModule::is_flag(boma, *WEAPON_TANTAN_RING_INSTANCE_WORK_ID_FLAG_IS_LONG) - {7.0} else {6.0}; - frame(lua_state, clearFrame); + wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(boma); + if VarModule::is_flag(agent.object(), vars::ness::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 60, 0, 20, 2.3, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } } } - pub fn install(agent: &mut Agent) { -agent.acmd("game_move", ness_pkthunder_move); -agent.acmd("game_movechild", ness_pkthunder_move_child); +agent.acmd("game_move", game_move); +agent.acmd("game_movechild", game_movechild); } diff --git a/fighters/ness/src/pkthunder/mod.rs b/fighters/ness/src/pkthunder/mod.rs index a7facdd2ea..b14502e9d8 100644 --- a/fighters/ness/src/pkthunder/mod.rs +++ b/fighters/ness/src/pkthunder/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("tantan_ring"); + let agent = &mut Agent::new("ness_pkthunder"); acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/ness/src/yoyo/acmd.rs b/fighters/ness/src/yoyo/acmd.rs new file mode 100644 index 0000000000..fd5f4e18c0 --- /dev/null +++ b/fighters/ness/src/yoyo/acmd.rs @@ -0,0 +1,69 @@ +use super::*; +unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.74); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 90, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 13.0, 80, 79, 0, 70, 4.7, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 34.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + frame(lua_state, 37.0); +} +unsafe extern "C" fn game_attacklw4 (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 367, 100, 12, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 28, 80, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + // frame(lua_state, 18.0); + // if is_excute(fighter) { + // AttackModule::clear_all(fighter.module_accessor); + // } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + // frame(lua_state, 25.0); + // if is_excute(fighter) { + // ATTACK(fighter, 0, 0, Hash40::new("attach"), 1.0, 35, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + // AttackModule::clear_all(fighter.module_accessor); + // } + // frame(lua_state, 30.0); + // if is_excute(fighter) { + // ATTACK(fighter, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + // AttackModule::set_attack_height_all(fighter.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + // } + frame(lua_state, 32.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + } + frame(lua_state, 40.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); +} diff --git a/fighters/ness/src/yoyo/mod.rs b/fighters/ness/src/yoyo/mod.rs new file mode 100644 index 0000000000..34c5c2de5d --- /dev/null +++ b/fighters/ness/src/yoyo/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("ness_yoyo"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From cca2132bf433b5041f16129a8e4e76fac2ab4747 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 18:19:56 -0400 Subject: [PATCH 117/172] samus crate --- fighters/samus/src/acmd/aerials.rs | 48 +++++++-------- fighters/samus/src/acmd/ground.rs | 20 +++---- fighters/samus/src/acmd/other.rs | 80 +++---------------------- fighters/samus/src/acmd/smashes.rs | 28 ++++----- fighters/samus/src/acmd/specials.rs | 8 +-- fighters/samus/src/acmd/tilts.rs | 20 +++---- fighters/samus/src/cshot/acmd.rs | 35 +++++++++++ fighters/samus/src/cshot/mod.rs | 9 +++ fighters/samus/src/lib.rs | 6 ++ fighters/samus/src/supermissile/acmd.rs | 22 +++++++ fighters/samus/src/supermissile/mod.rs | 9 +++ 11 files changed, 152 insertions(+), 133 deletions(-) create mode 100644 fighters/samus/src/cshot/acmd.rs create mode 100644 fighters/samus/src/cshot/mod.rs create mode 100644 fighters/samus/src/supermissile/acmd.rs create mode 100644 fighters/samus/src/supermissile/mod.rs diff --git a/fighters/samus/src/acmd/aerials.rs b/fighters/samus/src/acmd/aerials.rs index 9bdb14efbc..b866ebb7ab 100644 --- a/fighters/samus/src/acmd/aerials.rs +++ b/fighters/samus/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn attack_air_n(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -46,7 +46,7 @@ unsafe extern "C" fn attack_air_n(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_air_n_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -61,7 +61,7 @@ unsafe extern "C" fn attack_air_n_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_air_n_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -72,7 +72,7 @@ unsafe extern "C" fn attack_air_n_sound(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -85,7 +85,7 @@ unsafe extern "C" fn attack_air_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_air_f(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -133,7 +133,7 @@ unsafe extern "C" fn attack_air_f(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn samus_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -158,7 +158,7 @@ unsafe extern "C" fn samus_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -184,7 +184,7 @@ unsafe extern "C" fn attack_air_b(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_air_b(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -198,7 +198,7 @@ unsafe extern "C" fn effect_air_b(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -245,7 +245,7 @@ unsafe extern "C" fn attack_air_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_air_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -281,7 +281,7 @@ unsafe extern "C" fn attack_air_lw(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn samus_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -296,7 +296,7 @@ unsafe extern "C" fn samus_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_landing_air_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -306,16 +306,16 @@ unsafe extern "C" fn samus_landing_air_catch_game(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", attack_air_n); - agent.acmd("effect_attackairn", attack_air_n_effect); - agent.acmd("sound_attackairn", attack_air_n_sound); - agent.acmd("expression_attackairn", attack_air_n_expression); - agent.acmd("game_attackairf", attack_air_f); - agent.acmd("effect_attackairf", samus_attack_air_f_effect); - agent.acmd("game_attackairb", attack_air_b); - agent.acmd("effect_attackairb", effect_air_b); - agent.acmd("game_attackairhi", attack_air_hi); - agent.acmd("game_attackairlw", attack_air_lw); - agent.acmd("effect_attackairlw", samus_attack_air_lw_effect); - agent.acmd("game_aircatchlanding", samus_landing_air_catch_game); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samus/src/acmd/ground.rs b/fighters/samus/src/acmd/ground.rs index e4e2401dbb..39ceab9966 100644 --- a/fighters/samus/src/acmd/ground.rs +++ b/fighters/samus/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn attack_dash(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); @@ -79,7 +79,7 @@ unsafe extern "C" fn attack_dash(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -102,7 +102,7 @@ unsafe extern "C" fn attack_dash_sound(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -125,7 +125,7 @@ unsafe extern "C" fn attack_11(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn samus_attack_11_effect(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack11(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -141,7 +141,7 @@ unsafe extern "C" fn samus_attack_11_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_attack_12_expression(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack12(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -158,9 +158,9 @@ unsafe extern "C" fn samus_attack_12_expression(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackdash", attack_dash); - agent.acmd("sound_attackdash", attack_dash_sound); - agent.acmd("game_attack11", attack_11); - agent.acmd("effect_attack11", samus_attack_11_effect); - agent.acmd("expression_attack12", samus_attack_12_expression); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("expression_attack12", expression_attack12); } diff --git a/fighters/samus/src/acmd/other.rs b/fighters/samus/src/acmd/other.rs index fc8fe86f17..b0fbe71a0e 100644 --- a/fighters/samus/src/acmd/other.rs +++ b/fighters/samus/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -19,7 +19,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -32,59 +32,7 @@ unsafe extern "C" fn samus_turn_dash_game(agent: &mut L2CAgentBase) { } } - -unsafe extern "C" fn samus_supermissile_ready_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - -} - -unsafe extern "C" fn samus_supermissile_straight_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn samus_cshot_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 40, 64, 0, 45, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - } - -} - -unsafe extern "C" fn samus_cshot_shoot_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 0.0); - if is_excute(agent) { - if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { - PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n02")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { - PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n03")); - } - else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { - PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n04")); - } - else { - PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); - } - } - -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -99,7 +47,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -113,19 +61,9 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("samus_supermissile") - .acmd("game_ready", samus_supermissile_ready_game) - .acmd("game_straight", samus_supermissile_straight_game) - .install(); - smashline::Agent::new("samus_cshot") - .acmd("game_shoot", samus_cshot_shoot_game) - .acmd("sound_shoot", samus_cshot_shoot_sound) - .install(); - smashline::Agent::new("samus") - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", samus_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samus/src/acmd/smashes.rs b/fighters/samus/src/acmd/smashes.rs index 9e9dce0799..926cca7325 100644 --- a/fighters/samus/src/acmd/smashes.rs +++ b/fighters/samus/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn attack_s4_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -23,7 +23,7 @@ unsafe extern "C" fn attack_s4_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_s4_s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -49,7 +49,7 @@ unsafe extern "C" fn attack_s4_s(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_s4_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -71,7 +71,7 @@ unsafe extern "C" fn attack_s4_lw(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn attack_hi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -108,7 +108,7 @@ unsafe extern "C" fn attack_hi4(agent: &mut L2CAgentBase) { } } -pub unsafe extern "C" fn attack_hi4_effect(agent: &mut L2CAgentBase) { +pub unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -129,7 +129,7 @@ pub unsafe extern "C" fn attack_hi4_effect(agent: &mut L2CAgentBase) { } } -pub unsafe extern "C" fn attack_hi4_sound(agent: &mut L2CAgentBase) { +pub unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -144,7 +144,7 @@ pub unsafe extern "C" fn attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_lw4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -173,11 +173,11 @@ unsafe extern "C" fn attack_lw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", attack_s4_hi); - agent.acmd("game_attacks4", attack_s4_s); - agent.acmd("game_attacks4lw", attack_s4_lw); - agent.acmd("game_attackhi4", attack_hi4); - agent.acmd("effect_attackhi4", attack_hi4_effect); - agent.acmd("sound_attackhi4", attack_hi4_sound); - agent.acmd("game_attacklw4", attack_lw4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/samus/src/acmd/specials.rs b/fighters/samus/src/acmd/specials.rs index e3104cf04d..a3784db4e0 100644 --- a/fighters/samus/src/acmd/specials.rs +++ b/fighters/samus/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn special_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -56,7 +56,7 @@ unsafe extern "C" fn special_hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn special_air_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -101,6 +101,6 @@ unsafe extern "C" fn special_air_hi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialhi", special_hi); - agent.acmd("game_specialairhi", special_air_hi); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/samus/src/acmd/tilts.rs b/fighters/samus/src/acmd/tilts.rs index f186e04e31..7662d6a816 100644 --- a/fighters/samus/src/acmd/tilts.rs +++ b/fighters/samus/src/acmd/tilts.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn attack_s3_hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -50,7 +50,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_s3_s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -98,7 +98,7 @@ unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_s3_lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -147,7 +147,7 @@ unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_hi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -189,7 +189,7 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn attack_lw3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -205,13 +205,13 @@ unsafe extern "C" fn attack_lw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", attack_s3_hi); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("effect_attacks3hi", effect_attacks3hi); - agent.acmd("game_attacks3", attack_s3_s); + agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3s); - agent.acmd("game_attacks3lw", attack_s3_lw); + agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); - agent.acmd("game_attackhi3", attack_hi3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); - agent.acmd("game_attacklw3", attack_lw3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samus/src/cshot/acmd.rs b/fighters/samus/src/cshot/acmd.rs new file mode 100644 index 0000000000..7ab8fb86e4 --- /dev/null +++ b/fighters/samus/src/cshot/acmd.rs @@ -0,0 +1,35 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 42, 0, 14, 1.9, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 40, 64, 0, 45, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } + +} +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 0.0); + if is_excute(agent) { + if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n02")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n03")); + } + else if WorkModule::get_float(boma, *WEAPON_SAMUS_CSHOT_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875 { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); + } + } + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} diff --git a/fighters/samus/src/cshot/mod.rs b/fighters/samus/src/cshot/mod.rs new file mode 100644 index 0000000000..4959015065 --- /dev/null +++ b/fighters/samus/src/cshot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samus_cshot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/samus/src/lib.rs b/fighters/samus/src/lib.rs index 672b37d1b2..aae03064ca 100644 --- a/fighters/samus/src/lib.rs +++ b/fighters/samus/src/lib.rs @@ -7,6 +7,9 @@ pub mod acmd; //pub mod status; pub mod opff; +mod cshot; +mod supermissile; + use smash::{ lib::{ L2CValue, @@ -43,4 +46,7 @@ pub fn install() { acmd::install(agent); opff::install(agent); agent.install(); + + cshot::install(); + supermissile::install(); } diff --git a/fighters/samus/src/supermissile/acmd.rs b/fighters/samus/src/supermissile/acmd.rs new file mode 100644 index 0000000000..f86036bd6a --- /dev/null +++ b/fighters/samus/src/supermissile/acmd.rs @@ -0,0 +1,22 @@ +use super::*; +unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } + +} +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); + } + +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_ready", game_ready); + agent.acmd("game_straight", game_straight); +} diff --git a/fighters/samus/src/supermissile/mod.rs b/fighters/samus/src/supermissile/mod.rs new file mode 100644 index 0000000000..43ff7f15e0 --- /dev/null +++ b/fighters/samus/src/supermissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("samus_supermissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From f7ba4d81224aee39d0a4fb39f45b2c64e2dd3a5c Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Mon, 25 Mar 2024 18:46:02 -0400 Subject: [PATCH 118/172] roy's our boy! --- fighters/roy/src/acmd/aerials.rs | 358 ++++---- fighters/roy/src/acmd/ground.rs | 42 +- fighters/roy/src/acmd/mod.rs | 16 +- fighters/roy/src/acmd/other.rs | 246 +++-- fighters/roy/src/acmd/smashes.rs | 272 +++--- fighters/roy/src/acmd/specials.rs | 1422 ++++++++++++++--------------- fighters/roy/src/acmd/throws.rs | 154 ++-- fighters/roy/src/acmd/tilts.rs | 182 ++-- fighters/roy/src/lib.rs | 8 +- fighters/roy/src/opff.rs | 6 +- fighters/roy/src/status.rs | 8 +- 11 files changed, 1345 insertions(+), 1369 deletions(-) diff --git a/fighters/roy/src/acmd/aerials.rs b/fighters/roy/src/acmd/aerials.rs index 557e1d357a..81c97f502d 100644 --- a/fighters/roy/src/acmd/aerials.rs +++ b/fighters/roy/src/acmd/aerials.rs @@ -1,25 +1,25 @@ use super::*; -unsafe extern "C" fn roy_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 30, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 30, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 30, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 30, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 30, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); // Ground-only hitboxes - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 4.0, 100, 30, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 4.0, 100, 30, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("claviclel"), 4.0, 100, 30, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("sword1"), 4.0, 90, 30, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); @@ -30,255 +30,255 @@ unsafe extern "C" fn roy_attack_air_n_game(fighter: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 7, 3.0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 10.0, 361, 90, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 4.3, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 10.0, 361, 90, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 90, 0, 45, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn roy_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn roy_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_attackair_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_attackair_n01")); } } -unsafe extern "C" fn roy_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 7.0/(13.75-1.0)); + FT_MOTION_RATE(agent, 7.0/(13.75-1.0)); } frame(lua_state, 13.75); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(17.0-13.75)); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 11.0, 50, 80, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 45, 65, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(17.0-13.75)); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 11.0, 50, 80, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 45, 65, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 50, 80, 0, 45, 4.25, 0.0, 0.0, 2.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 50, 80, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn roy_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 14.0, 50, 111, 0, 25, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 14.0, 50, 111, 0, 25, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("claviclel"), 14.0, 50, 111, 0, 25, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 11.0, 40, 70, 0, 20, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword1"), 14.0, 50, 111, 0, 25, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("armr"), 14.0, 50, 111, 0, 25, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("claviclel"), 14.0, 50, 111, 0, 25, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 11.0, 40, 70, 0, 20, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 4.0, 4.5, 15.0, 0.0, Some(-4.5), Some(15.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 3.5, 5.0, 14.0, -4.0, Some(-5.0), Some(14.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 4.0, 4.5, 15.0, 0.0, Some(-4.5), Some(15.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 111, 0, 25, 3.5, 5.0, 14.0, -4.0, Some(-5.0), Some(14.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } } -unsafe extern "C" fn roy_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); } } -unsafe extern "C" fn roy_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 77, 55, 0, 45, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 77, 55, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("colonells"), 10.0, 77, 55, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 80, 55, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 77, 55, 0, 45, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 77, 55, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("colonells"), 10.0, 77, 55, 0, 45, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 80, 55, 0, 30, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 42.0, 33.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 12.0, 42.0, 33.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn roy_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only spike hitboxes - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 15.0, 290, 60, 0, 18, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("armr"), 15.0, 290, 60, 0, 18, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 15.0, 290, 60, 0, 18, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("armr"), 15.0, 290, 60, 0, 18, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Ground-only spike hitboxes - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 15.0, 281, 71, 0, 40, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 15.0, 281, 71, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 15.0, 281, 71, 0, 40, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 15.0, 281, 71, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Midspot/sourspot - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 90, 60, 0, 50, 4.4, 1.0, -3.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 37, 60, 0, 37, 3.5, 1.0, -3.0, 8.75, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 90, 60, 0, 50, 4.4, 1.0, -3.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 37, 60, 0, 37, 3.5, 1.0, -3.0, 8.75, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } //frame(lua_state, 57.0); @@ -288,77 +288,75 @@ unsafe extern "C" fn roy_attack_air_lw_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn roy_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.5, 12.0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.5, 12.0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1.05, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1.05, true); + LAST_EFFECT_SET_ALPHA(agent, 0.6); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_light"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_light"), false, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn roy_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_air")); - PLAY_SE(fighter, Hash40::new("se_roy_attackair_h01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_air")); + PLAY_SE(agent, Hash40::new("se_roy_attackair_h01")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_attackair_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_attackair_l01")); } } -unsafe extern "C" fn roy_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attackairn", roy_attack_air_n_game) - .acmd("effect_attackairn", roy_attack_air_n_effect) - .acmd("sound_attackairn", roy_attack_air_n_sound) - .acmd("expression_attackairn", roy_attack_air_n_expression) - .acmd("game_attackairf", roy_attack_air_f_game) - .acmd("expression_attackairf", roy_attack_air_f_expression) - .acmd("game_attackairb", roy_attack_air_b_game) - .acmd("effect_attackairb", roy_attack_air_b_effect) - .acmd("expression_attackairb", roy_attack_air_b_expression) - .acmd("game_attackairhi", roy_attack_air_hi_game) - .acmd("game_attackairlw", roy_attack_air_lw_game) - .acmd("effect_attackairlw", roy_attack_air_lw_effect) - .acmd("sound_attackairlw", roy_attack_air_lw_sound) - .acmd("expression_attackairlw", roy_attack_air_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/roy/src/acmd/ground.rs b/fighters/roy/src/acmd/ground.rs index 48331508f1..9f79ad05ae 100644 --- a/fighters/roy/src/acmd/ground.rs +++ b/fighters/roy/src/acmd/ground.rs @@ -1,43 +1,41 @@ use super::*; -unsafe extern "C" fn roy_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 8.0, 69, 40, 0, 55, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 69, 40, 0, 55, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 40, 60, 0, 32, 3.5, 0.0, 0.0, 9.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 69, 40, 0, 55, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 69, 40, 0, 55, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 40, 60, 0, 32, 3.5, 0.0, 0.0, 9.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 13.0, 110, 50, 0, 70, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 361, 55, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 110, 50, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 13.0, 110, 50, 0, 70, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 361, 55, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attack11", roy_attack_11_game) - .acmd("game_attackdash", roy_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/roy/src/acmd/mod.rs b/fighters/roy/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/roy/src/acmd/mod.rs +++ b/fighters/roy/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/roy/src/acmd/other.rs b/fighters/roy/src/acmd/other.rs index 5a68595507..de124b1993 100644 --- a/fighters/roy/src/acmd/other.rs +++ b/fighters/roy/src/acmd/other.rs @@ -1,280 +1,278 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} } } -unsafe extern "C" fn roy_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn roy_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_roy_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_roy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_roy_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_roy_step_right_l")); } } -unsafe extern "C" fn roy_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn roy_appeallwr_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI)){ - VarModule::on_flag(fighter.battle_object, vars::roy::instance::TRAIL_EFFECT); + VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } } -unsafe extern "C" fn roy_appeallwl_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI)){ - VarModule::on_flag(fighter.battle_object, vars::roy::instance::TRAIL_EFFECT); + VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn roy_jumpback_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpback(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_jump01")); } } -unsafe extern "C" fn roy_jumpfront_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfront(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_jump01")); } } -unsafe extern "C" fn roy_jumpbackmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpbackmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_jump01")); } } -unsafe extern "C" fn roy_jumpfrontmini_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_jumpfrontmini(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_jump01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_jump01")); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("game_landingairlw", roy_landing_air_lw_game) - .acmd("game_dash", roy_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", roy_turn_dash_game) - .acmd("game_appeallwr", roy_appeallwr_game) - .acmd("game_appeallwl", roy_appeallwl_game) - .acmd("game_escapeair", escape_air_game) - .acmd("sound_jumpback", roy_jumpback_sound) - .acmd("sound_jumpfront", roy_jumpfront_sound) - .acmd("sound_jumpbackmini", roy_jumpbackmini_sound) - .acmd("sound_jumpfrontmini", roy_jumpfrontmini_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("sound_jumpback", sound_jumpback); + agent.acmd("sound_jumpfront", sound_jumpfront); + agent.acmd("sound_jumpbackmini", sound_jumpbackmini); + agent.acmd("sound_jumpfrontmini", sound_jumpfrontmini); } diff --git a/fighters/roy/src/acmd/smashes.rs b/fighters/roy/src/acmd/smashes.rs index 2ee0b63378..92b88acd56 100644 --- a/fighters/roy/src/acmd/smashes.rs +++ b/fighters/roy/src/acmd/smashes.rs @@ -1,263 +1,261 @@ use super::*; -unsafe extern "C" fn roy_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(13.2-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(13.2-10.0)); } frame(lua_state, 13.2); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.2)); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 20.0, 361, 76, 0, 65, 4.3, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 20.0, 361, 76, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 20.0, 361, 76, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 73, 0, 30, 3.5, 0.0, 0.0, 8.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.2)); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 20.0, 361, 76, 0, 65, 4.3, 0.0, 0.0, 2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 20.0, 361, 76, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 20.0, 361, 76, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 73, 0, 30, 3.5, 0.0, 0.0, 8.75, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4, 16, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4, 16, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); //EFFECT_FOLLOW_RND(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 0.9, 1, 1, 1, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 6); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 6); } } -unsafe extern "C" fn roy_attack_s4_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn roy_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 118, 100, 120, 0, 3.0, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-3.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 127, 100, 150, 0, 3.0, 0.0, 9.0, 7.8, Some(0.0), Some(9.0), Some(-6.8), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 13.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.0, 98, 100, 85, 0, 5.4, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 2.0, 260, 100, 55, 0, 4.9, 0.0, 0.0, 7.8, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 90, 96, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 90, 96, 0, 70, 5.2, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 90, 96, 0, 70, 6.9, 0.0, 0.0, 7.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 18.0, 75, 86, 0, 42, 4.3, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 18.0, 75, 86, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 18.0, 75, 86, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 18.0, 75, 86, 0, 42, 4.3, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 18.0, 75, 86, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 18.0, 75, 86, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 14.0, 75, 81, 0, 42, 3.9, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 14.0, 75, 81, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("colonells"), 14.0, 75, 81, 0, 42, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 14.0, 75, 81, 0, 42, 3.9, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 75, 81, 0, 42, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 14.0, 75, 81, 0, 42, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 95, 0, 15, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), -0.0, -0.0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), -0.0, -0.0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 10, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 10.55, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_light"), Hash40::new("sword1"), 0, 0, 7, 0, 0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_light"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, true); } } -unsafe extern "C" fn roy_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_smash_l")); - PLAY_SE(fighter, Hash40::new("se_roy_smash_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_l")); + PLAY_SE(agent, Hash40::new("se_roy_smash_l01")); } wait(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_l01")); } } -unsafe extern "C" fn roy_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2, true); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashll"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashll"), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 16); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 16); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attacks4", roy_attack_s4_s_game) - .acmd("effect_attacks4", roy_attack_s4_s_effect) - .acmd("expression_attacks4", roy_attack_s4_s_expression) - .acmd("game_attackhi4", roy_attack_hi4_game) - .acmd("game_attacklw4", roy_attack_lw4_game) - .acmd("effect_attacklw4", roy_attack_lw4_effect) - .acmd("sound_attacklw4", roy_attack_lw4_sound) - .acmd("expression_attacklw4", roy_attack_lw4_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/roy/src/acmd/specials.rs b/fighters/roy/src/acmd/specials.rs index 2459cf580d..25afe1b6ae 100644 --- a/fighters/roy/src/acmd/specials.rs +++ b/fighters/roy/src/acmd/specials.rs @@ -1,311 +1,311 @@ use super::*; -unsafe extern "C" fn roy_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_special_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); //LAST_EFFECT_SET_RATE(fighter, 1.5); //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); } frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); } } -unsafe extern "C" fn roy_special_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); } } -unsafe extern "C" fn roy_special_n_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn roy_special_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_special_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.625); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_special_air_n_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); //LAST_EFFECT_SET_RATE(fighter, 1.5); //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_attack_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); } frame(lua_state, 38.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("roy_erupution_hold"), false, false); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); } } -unsafe extern "C" fn roy_special_air_n_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_roy_special_n01")); - PLAY_SE(fighter, Hash40::new("se_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("vc_roy_special_n02")); - PLAY_SE(fighter, Hash40::new("se_roy_attackl_s01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); } } -unsafe extern "C" fn roy_special_air_n_end_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn roy_special_air_n_end2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_special_air_n_end3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } @@ -313,919 +313,919 @@ unsafe extern "C" fn roy_special_air_n_end3_game(fighter: &mut L2CAgentBase) { //SIDE B STARTS HERE ----------------------------------------------------------------------------------------------------------------------------------------------- -unsafe extern "C" fn game_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack10")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack10")); } frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s01")); } } -unsafe extern "C" fn expression_specials1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn game_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack01")); } frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s02h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02h")); } } -unsafe extern "C" fn expression_specials2hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn game_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack02")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s02l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02l")); } } -unsafe extern "C" fn expression_specials2lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn game_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack07")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03h")); } } -unsafe extern "C" fn expression_specials3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn game_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack04")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03s")); } } -unsafe extern "C" fn expression_specials3s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn game_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn effect_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack03")); } frame(lua_state, 12.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s03l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03l")); } } -unsafe extern "C" fn expression_specials3lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn game_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack05")); } frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_special_s04h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s04h")); } } -unsafe extern "C" fn expression_specials4hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state,15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } } -unsafe extern "C" fn game_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack06")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_s01")); } } -unsafe extern "C" fn expression_specials4s(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn game_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 37.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(fighter, 2); - EFFECT(fighter, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); + EFFECT(agent, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn sound_specials4lw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_roy_rnd_attack_smash_h")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_h")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h01")); } frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_smash_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h02")); } } -unsafe extern "C" fn game_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { PostureModule::reverse_lr(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); } } -unsafe extern "C" fn sound_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_roy_attack08")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack08")); } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_roy_swing_ll")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_swing_ll")); } } -unsafe extern "C" fn expression_specials4back(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } //SIDE B ENDS HERE ---------------------------------------------------------------------------------------------------------------------------------------------------- -unsafe extern "C" fn roy_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, 1); } frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.65); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } wait(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } } -unsafe extern "C" fn roy_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, 1); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 0.65); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 15.0/(40.0-30.0)); + FT_MOTION_RATE(agent, 15.0/(40.0-30.0)); frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE_RANGE(fighter, 21.0, 68.0, 39.0); + if is_excute(agent) { + FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); } } -unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); AttackModule::set_force_reaction(boma, 2, true, false); @@ -1236,117 +1236,107 @@ unsafe extern "C" fn game_speciallwhit(fighter: &mut L2CAgentBase) { } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_specialnend", roy_special_n_end_game) - .acmd("effect_specialnend", roy_special_n_end_effect) - .acmd("sound_specialnend", roy_special_n_end_sound) - .acmd("expression_specialnend", roy_special_n_end_expression) - .acmd("game_specialnend2", roy_special_n_end2_game) - .acmd("game_specialnend3", roy_special_n_end3_game) - .acmd("game_specialairnend", roy_special_air_n_end_game) - .acmd("effect_specialairnend", roy_special_air_n_end_effect) - .acmd("sound_specialairnend", roy_special_air_n_end_sound) - .acmd( - "expression_specialairnend", - roy_special_air_n_end_expression, - ) - .acmd("game_specialairnend2", roy_special_air_n_end2_game) - .acmd("game_specialairnend3", roy_special_air_n_end3_game) - - .acmd("game_specials1", game_specials1) - .acmd("effect_specials1", effect_specials1) - .acmd("sound_specials1", sound_specials1) - .acmd("expression_specials1", expression_specials1) - .acmd("game_specialairs1", game_specials1) - .acmd("effect_specialairs1", effect_specials1) - .acmd("sound_specialairs1", sound_specials1) - .acmd("expression_specialairs1", expression_specials1) - .acmd("game_specials2hi", game_specials2hi) - .acmd("effect_specials2hi", effect_specials2hi) - .acmd("sound_specials2hi", sound_specials2hi) - .acmd("expression_specials2hi", expression_specials2hi) - .acmd("game_specialairs2hi", game_specials2hi) - .acmd("effect_specialairs2hi", effect_specials2hi) - .acmd("sound_specialairs2hi", sound_specials2hi) - .acmd("expression_specialairs2hi", expression_specials2hi) - .acmd("game_specials2lw", game_specials2lw) - .acmd("effect_specials2lw", effect_specials2lw) - .acmd("sound_specials2lw", sound_specials2lw) - .acmd("expression_specials2lw", expression_specials2lw) - .acmd("game_specialairs2lw", game_specials2lw) - .acmd("effect_specialairs2lw", effect_specials2lw) - .acmd("sound_specialairs2lw", sound_specials2lw) - .acmd("expression_specialairs2lw", expression_specials2lw) - - .acmd("game_specials3hi", game_specials3hi) - .acmd("effect_specials3hi", effect_specials3hi) - .acmd("sound_specials3hi", sound_specials3hi) - .acmd("expression_specials3hi", expression_specials3hi) - .acmd("game_specialairs3hi", game_specials3hi) - .acmd("effect_specialairs3hi", effect_specials3hi) - .acmd("sound_specialairs3hi", sound_specials3hi) - .acmd("expression_specialairs3hi", expression_specials3hi) - .acmd("game_specials3s", game_specials3s) - .acmd("effect_specials3s", effect_specials3s) - .acmd("sound_specials3s", sound_specials3s) - .acmd("expression_specials3s", expression_specials3s) - .acmd("game_specialairs3s", game_specials3s) - .acmd("effect_specialairs3s", effect_specials3s) - .acmd("sound_specialairs3s", sound_specials3s) - .acmd("expression_specialairs3s", expression_specials3s) - .acmd("game_specials3lw", game_specials3lw) - .acmd("effect_specials3lw", effect_specials3lw) - .acmd("sound_specials3lw", sound_specials3lw) - .acmd("expression_specials3lw", expression_specials3lw) - .acmd("game_specialairs3lw", game_specials3lw) - .acmd("effect_specialairs3lw", effect_specials3lw) - .acmd("sound_specialairs3lw", sound_specials3lw) - .acmd("expression_specialairs3lw", expression_specials3lw) - - .acmd("game_specials4hi", game_specials4hi) - .acmd("effect_specials4hi", effect_specials4hi) - .acmd("sound_specials4hi", sound_specials4hi) - .acmd("expression_specials4hi", expression_specials4hi) - .acmd("game_specialairs4hi", game_specials4hi) - .acmd("effect_specialairs4hi", effect_specials4hi) - .acmd("sound_specialairs4hi", sound_specials4hi) - .acmd("expression_specialairs4hi", expression_specials4hi) - .acmd("game_specials4s", game_specials4s) - .acmd("effect_specials4s", effect_specials4s) - .acmd("sound_specials4s", sound_specials4s) - .acmd("expression_specials4s", expression_specials4s) - .acmd("game_specialairs4s", game_specials4s) - .acmd("effect_specialairs4s", effect_specials4s) - .acmd("sound_specialairs4s", sound_specials4s) - .acmd("expression_specialairs4s", expression_specials4s) - .acmd("game_specials4lw", game_specials4lw) - .acmd("effect_specials4lw", effect_specials4lw) - .acmd("sound_specials4lw", sound_specials4lw) - .acmd("game_specialairs4lw", game_specials4lw) - .acmd("effect_specialairs4lw", effect_specials4lw) - .acmd("sound_specialairs4lw", sound_specials4lw) - .acmd("game_specials4back", game_specials4back) - .acmd("effect_specials4back", effect_specials4back) - .acmd("sound_specials4back", sound_specials4back) - .acmd("expression_specials4back", expression_specials4back) - .acmd("game_specialairs4back", game_specials4back) - .acmd("effect_specialairs4back", effect_specials4back) - .acmd("sound_specialairs4back", sound_specials4back) - .acmd("expression_specialairs4back", expression_specials4back) - - .acmd("game_specialhi", roy_special_hi_game) - .acmd("game_specialairhi", roy_special_air_hi_game) - - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_speciallw) - .acmd("game_speciallwhit", game_speciallwhit) - .acmd("game_specialairlwhit", game_speciallwhit) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("effect_specialnend", effect_specialnend); + agent.acmd("sound_specialnend", sound_specialnend); + agent.acmd("expression_specialnend", expression_specialnend); + agent.acmd("game_specialnend2", game_specialnend2); + agent.acmd("game_specialnend3", game_specialnend3); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("sound_specialairnend", sound_specialairnend); + agent.acmd("expression_specialairnend",expression_specialairnend,); + agent.acmd("game_specialairnend2", game_specialairnend2); + agent.acmd("game_specialairnend3", game_specialairnend3); + agent.acmd("game_specials1", game_specialairs1); + agent.acmd("effect_specials1", effect_specialairs1); + agent.acmd("sound_specials1", sound_specialairs1); + agent.acmd("expression_specials1", expression_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("effect_specialairs1", effect_specialairs1); + agent.acmd("sound_specialairs1", sound_specialairs1); + agent.acmd("expression_specialairs1", expression_specials1); + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("expression_specials2hi", expression_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + agent.acmd("expression_specialairs2hi", expression_specials2hi); + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("expression_specials2lw", expression_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); + agent.acmd("expression_specialairs2lw", expression_specials2lw); + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("expression_specials3hi", expression_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + agent.acmd("expression_specialairs3hi", expression_specials3hi); + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("expression_specials3s", expression_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + agent.acmd("expression_specialairs3s", expression_specials3s); + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("expression_specials3lw", expression_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); + agent.acmd("expression_specialairs3lw", expression_specials3lw); + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("sound_specials4hi", sound_specials4hi); + agent.acmd("expression_specials4hi", expression_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("sound_specialairs4hi", sound_specials4hi); + agent.acmd("expression_specialairs4hi", expression_specials4hi); + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("sound_specials4s", sound_specials4s); + agent.acmd("expression_specials4s", expression_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("sound_specialairs4s", sound_specials4s); + agent.acmd("expression_specialairs4s", expression_specials4s); + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("sound_specials4lw", sound_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + agent.acmd("sound_specialairs4lw", sound_specials4lw); + agent.acmd("game_specials4back", game_specials4back); + agent.acmd("effect_specials4back", effect_specials4back); + agent.acmd("sound_specials4back", sound_specials4back); + agent.acmd("expression_specials4back", expression_specials4back); + agent.acmd("game_specialairs4back", game_specials4back); + agent.acmd("effect_specialairs4back", effect_specials4back); + agent.acmd("sound_specialairs4back", sound_specials4back); + agent.acmd("expression_specialairs4back", expression_specials4back); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } diff --git a/fighters/roy/src/acmd/throws.rs b/fighters/roy/src/acmd/throws.rs index 5ba05d8a13..c2f0355a86 100644 --- a/fighters/roy/src/acmd/throws.rs +++ b/fighters/roy/src/acmd/throws.rs @@ -1,154 +1,152 @@ use super::*; -unsafe extern "C" fn roy_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn roy_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.25, 4.0, Some(0.0), Some(7.25), Some(9.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn roy_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.0, -4.0, Some(0.0), Some(7.0), Some(-12.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 50, 45, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 21, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 21, 9); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let release_position = Vector3f{ x:1.0, y: -3.0, z: 14.75 }; ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 135, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 135, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 5); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 5); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 97, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 97, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 22); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 22); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 85, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 69, 85, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 1, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 1, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_catch", roy_catch_game) - .acmd("game_catchdash", roy_catch_dash_game) - .acmd("game_catchturn", roy_catch_turn_game) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/roy/src/acmd/tilts.rs b/fighters/roy/src/acmd/tilts.rs index 8887ff04c5..99f7140fad 100644 --- a/fighters/roy/src/acmd/tilts.rs +++ b/fighters/roy/src/acmd/tilts.rs @@ -1,168 +1,166 @@ use super::*; -unsafe extern "C" fn roy_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 12.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 12.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 12.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 13.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 13.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 13.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 11.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 93, 0, 30, 3.75, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 93, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 11.0, 361, 93, 0, 30, 2.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 7.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 60, 87, 0, 40, 3.5, 0.0, 0.0, 8.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 110, 107, 0, 35, 3.5, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 110, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 11.0, 110, 107, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 100, 73, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 110, 107, 0, 35, 3.5, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 110, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 11.0, 110, 107, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 100, 73, 0, 35, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 11.0, 85, 107, 0, 35, 3.25, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 85, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("claviclel"), 11.0, 85, 107, 0, 35, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 90, 73, 0, 35, 3.0, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 85, 107, 0, 35, 3.25, 0.0, 0.0, 2.25, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 85, 107, 0, 35, 2.75, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 11.0, 85, 107, 0, 35, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 90, 73, 0, 35, 3.0, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn roy_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 10); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 10); } } -unsafe extern "C" fn roy_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn roy_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 7.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 7.0/(7.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 80, 40, 0, 90, 2.25, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 80, 40, 0, 90, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 80, 40, 0, 90, 4.25, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 6.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 80, 40, 0, 90, 2.25, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 80, 40, 0, 90, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 80, 40, 0, 90, 4.25, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 6.0, 80, 40, 0, 70, 3.5, 0.0, 0.0, 9.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.35, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("roy") - .acmd("game_attacks3", roy_attack_s3_s_game) - .acmd("expression_attacks3", roy_attack_s3_s_expression) - .acmd("game_attacks3hi", roy_attack_s3_hi_game) - .acmd("game_attacks3lw", roy_attack_s3_lw_game) - .acmd("game_attackhi3", roy_attack_hi3_game) - .acmd("effect_attackhi3", roy_attack_hi3_effect) - .acmd("expression_attackhi3", roy_attack_hi3_expression) - .acmd("game_attacklw3", roy_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/roy/src/lib.rs b/fighters/roy/src/lib.rs index 3e1f266077..28c7a9eb2d 100644 --- a/fighters/roy/src/lib.rs +++ b/fighters/roy/src/lib.rs @@ -40,7 +40,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("roy"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } diff --git a/fighters/roy/src/opff.rs b/fighters/roy/src/opff.rs index eb6e156cd2..6ebfa31b1a 100644 --- a/fighters/roy/src/opff.rs +++ b/fighters/roy/src/opff.rs @@ -136,8 +136,6 @@ pub unsafe fn roy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("roy") - .on_line(Main, roy_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, roy_frame_wrapper); } diff --git a/fighters/roy/src/status.rs b/fighters/roy/src/status.rs index b0f2e86ab3..0fef5e1c2d 100644 --- a/fighters/roy/src/status.rs +++ b/fighters/roy/src/status.rs @@ -172,9 +172,7 @@ unsafe extern "C" fn special_s_mot_helper(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("roy") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials); + agent.status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main); } From dbe8d6a520a35bd16c5abd440a735548d73d1a7d Mon Sep 17 00:00:00 2001 From: ncsuddut Date: Mon, 25 Mar 2024 19:12:19 -0400 Subject: [PATCH 119/172] fix samusd build errors --- fighters/samusd/src/acmd/aerials.rs | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fighters/samusd/src/acmd/aerials.rs b/fighters/samusd/src/acmd/aerials.rs index 586b46a2e5..d2d5644c57 100644 --- a/fighters/samusd/src/acmd/aerials.rs +++ b/fighters/samusd/src/acmd/aerials.rs @@ -217,10 +217,10 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9, 3, 15, -18 , -85, 1.15, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } @@ -284,10 +284,10 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 5, -6, -171, 47, 29, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); if is_excute(agent) { @@ -331,9 +331,9 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("samusd_win3_aura"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0, 0, 0, 1.89999998, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.7, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 15.5, -2, 180, 90, -90, 1.1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); } } @@ -406,10 +406,10 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("samusd_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.1); } } From 4a1670c7ba0d200e7b845403ca75450027dd3ae8 Mon Sep 17 00:00:00 2001 From: ncsuddut Date: Mon, 25 Mar 2024 19:29:28 -0400 Subject: [PATCH 120/172] fix dev build for ice climbers --- scripts/characters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/characters.py b/scripts/characters.py index 8c878020d9..255f457869 100644 --- a/scripts/characters.py +++ b/scripts/characters.py @@ -1,2 +1,2 @@ -characters = {"pitb","eflame","pfushigisou","purin","younglink","plizardon","shulk","chrom","miifighter","gamewatch","krool","samusd","ryu","rosetta","yoshi","lucas","link","lucario","zelda","kamui","wolf","nana","tantan","koopag","ridley","gekkouga","ike","roy","rockman","peach","elight","gaogaen","falco","ness","kirby","pikachu","daisy","sheik","mariod","luigi","captain","mario","jack","palutena","dolly","pickel","wiifit","pzenigame","pichu","pit","ken","brave","richter","miiswordsman","reflet","master","robot","szerosuit","ganon","wario","diddy","shizue","littlemac","pacman","edge","marth","trail","mewtwo","metaknight","toonlink","koopajr","sonic","donkey","inkling","packun","miigunner","buddy","pikmin","cloud","fox","duckhunt","lucina","murabito","bayonetta","samus","koopa","simon","popo","dedede","snake","demon"} +characters = {"pitb","eflame","pfushigisou","purin","younglink","plizardon","shulk","chrom","miifighter","gamewatch","krool","samusd","ryu","rosetta","yoshi","lucas","link","lucario","zelda","kamui","wolf","iceclimber","tantan","koopag","ridley","gekkouga","ike","roy","rockman","peach","elight","gaogaen","falco","ness","kirby","pikachu","daisy","sheik","mariod","luigi","captain","mario","jack","palutena","dolly","pickel","wiifit","pzenigame","pichu","pit","ken","brave","richter","miiswordsman","reflet","master","robot","szerosuit","ganon","wario","diddy","shizue","littlemac","pacman","edge","marth","trail","mewtwo","metaknight","toonlink","koopajr","sonic","donkey","inkling","packun","miigunner","buddy","pikmin","cloud","fox","duckhunt","lucina","murabito","bayonetta","samus","koopa","simon","dedede","snake","demon"} From 274d41351b2ba0f06ec8cc5c29259de7384b3974 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 08:25:04 -0500 Subject: [PATCH 121/172] convert rest of fighter variables to agent yummy github clout --- fighters/buddy/src/acmd/aerials.rs | 2 +- fighters/dedede/src/acmd/other.rs | 4 +- fighters/dolly/src/acmd/other.rs | 4 +- fighters/dolly/src/burst/acmd.rs | 48 +- fighters/dolly/src/wave/acmd.rs | 8 +- fighters/edge/src/acmd/aerials.rs | 540 +++---- fighters/edge/src/acmd/ground.rs | 182 +-- fighters/edge/src/acmd/other.rs | 275 ++-- fighters/edge/src/acmd/smashes.rs | 394 ++--- fighters/edge/src/acmd/specials.rs | 454 +++--- fighters/edge/src/acmd/throws.rs | 228 +-- fighters/edge/src/acmd/tilts.rs | 514 +++---- fighters/eflame/src/acmd/aerials.rs | 230 +-- fighters/eflame/src/acmd/ground.rs | 84 +- fighters/eflame/src/acmd/other.rs | 1041 ++++++------- fighters/eflame/src/acmd/smashes.rs | 52 +- fighters/eflame/src/acmd/specials.rs | 136 +- fighters/eflame/src/acmd/throws.rs | 36 +- fighters/eflame/src/acmd/tilts.rs | 116 +- fighters/elight/src/acmd/smashes.rs | 118 +- fighters/falco/src/acmd/other.rs | 124 +- fighters/falco/src/acmd/specials.rs | 42 +- fighters/gekkouga/src/acmd/tilts.rs | 18 +- fighters/iceclimber/src/acmd/other.rs | 32 +- fighters/inkling/src/acmd/aerials.rs | 182 +-- fighters/inkling/src/acmd/ground.rs | 106 +- fighters/inkling/src/acmd/other.rs | 399 ++--- fighters/inkling/src/acmd/smashes.rs | 68 +- fighters/inkling/src/acmd/specials.rs | 58 +- fighters/inkling/src/acmd/throws.rs | 96 +- fighters/inkling/src/acmd/tilts.rs | 90 +- fighters/jack/src/acmd/other.rs | 124 +- fighters/ken/src/acmd/other.rs | 82 +- fighters/ken/src/shinryuken/acmd.rs | 14 +- fighters/kirby/src/acmd/other.rs | 4 +- fighters/kirby/src/acmd/specials.rs | 4 +- fighters/lucario/src/acmd/aerials.rs | 218 +-- fighters/lucario/src/acmd/ground.rs | 106 +- fighters/lucario/src/acmd/other.rs | 295 ++-- fighters/lucario/src/acmd/smashes.rs | 138 +- fighters/lucario/src/acmd/specials.rs | 560 +++---- fighters/lucario/src/acmd/throws.rs | 160 +- fighters/lucario/src/acmd/tilts.rs | 106 +- fighters/lucas/src/acmd/aerials.rs | 518 +++---- fighters/lucas/src/acmd/ground.rs | 210 +-- fighters/lucas/src/acmd/other.rs | 291 ++-- fighters/lucas/src/acmd/smashes.rs | 592 ++++---- fighters/lucas/src/acmd/specials.rs | 450 +++--- fighters/lucas/src/acmd/throws.rs | 230 +-- fighters/lucas/src/acmd/tilts.rs | 168 +-- fighters/lucina/src/acmd/aerials.rs | 262 ++-- fighters/lucina/src/acmd/ground.rs | 94 +- fighters/lucina/src/acmd/other.rs | 173 +-- fighters/lucina/src/acmd/smashes.rs | 78 +- fighters/lucina/src/acmd/specials.rs | 1582 ++++++++++---------- fighters/lucina/src/acmd/throws.rs | 22 +- fighters/lucina/src/acmd/tilts.rs | 62 +- fighters/mario/src/acmd/aerials.rs | 14 +- fighters/mario/src/acmd/throws.rs | 18 +- fighters/mario/src/pumpwater/acmd.rs | 10 +- fighters/master/src/acmd/aerials.rs | 242 +-- fighters/master/src/acmd/ground.rs | 124 +- fighters/master/src/acmd/other.rs | 293 ++-- fighters/master/src/acmd/smashes.rs | 654 ++++---- fighters/master/src/acmd/specials.rs | 954 ++++++------ fighters/master/src/acmd/throws.rs | 130 +- fighters/master/src/acmd/tilts.rs | 198 +-- fighters/metaknight/src/acmd/ground.rs | 46 +- fighters/metaknight/src/acmd/other.rs | 92 +- fighters/miigunner/src/acmd/aerials.rs | 578 +++---- fighters/miigunner/src/acmd/ground.rs | 100 +- fighters/miigunner/src/acmd/other.rs | 401 ++--- fighters/miigunner/src/acmd/smashes.rs | 106 +- fighters/miigunner/src/acmd/specials.rs | 440 +++--- fighters/miigunner/src/acmd/throws.rs | 426 +++--- fighters/miigunner/src/acmd/tilts.rs | 100 +- fighters/miiswordsman/src/acmd/other.rs | 18 +- fighters/miiswordsman/src/acmd/specials.rs | 136 +- fighters/ness/src/acmd/other.rs | 95 +- fighters/packun/src/acmd/aerials.rs | 302 ++-- fighters/packun/src/acmd/ground.rs | 184 +-- fighters/packun/src/acmd/other.rs | 432 +++--- fighters/packun/src/acmd/smashes.rs | 206 +-- fighters/packun/src/acmd/specials.rs | 258 ++-- fighters/packun/src/acmd/throws.rs | 128 +- fighters/packun/src/acmd/tilts.rs | 229 ++- fighters/palutena/src/acmd/aerials.rs | 218 +-- fighters/palutena/src/acmd/ground.rs | 134 +- fighters/palutena/src/acmd/other.rs | 233 +-- fighters/palutena/src/acmd/smashes.rs | 26 +- fighters/palutena/src/acmd/throws.rs | 142 +- fighters/palutena/src/acmd/tilts.rs | 152 +- fighters/rockman/src/airshooter/acmd.rs | 22 +- fighters/rockman/src/hardknuckle/acmd.rs | 42 +- fighters/rosetta/src/acmd/aerials.rs | 268 ++-- fighters/rosetta/src/acmd/ground.rs | 28 +- fighters/rosetta/src/acmd/other.rs | 161 +- fighters/rosetta/src/acmd/smashes.rs | 82 +- fighters/rosetta/src/acmd/specials.rs | 32 +- fighters/rosetta/src/acmd/throws.rs | 74 +- fighters/rosetta/src/acmd/tilts.rs | 58 +- fighters/samus/src/acmd/ground.rs | 158 +- fighters/samusd/src/acmd/specials.rs | 30 +- fighters/samusd/src/acmd/tilts.rs | 18 +- fighters/samusd/src/supermissile/acmd.rs | 14 +- fighters/snake/src/acmd/aerials.rs | 226 +-- fighters/snake/src/acmd/ground.rs | 92 +- fighters/snake/src/acmd/other.rs | 593 ++++---- fighters/snake/src/acmd/smashes.rs | 404 ++--- fighters/snake/src/acmd/specials.rs | 364 ++--- fighters/snake/src/acmd/throws.rs | 64 +- fighters/snake/src/acmd/tilts.rs | 118 +- fighters/szerosuit/src/acmd/aerials.rs | 320 ++-- fighters/szerosuit/src/acmd/ground.rs | 108 +- fighters/szerosuit/src/acmd/other.rs | 226 +-- fighters/szerosuit/src/acmd/smashes.rs | 158 +- fighters/szerosuit/src/acmd/specials.rs | 402 ++--- fighters/szerosuit/src/acmd/throws.rs | 256 ++-- fighters/szerosuit/src/acmd/tilts.rs | 214 +-- fighters/wario/src/acmd/specials.rs | 22 +- 120 files changed, 11772 insertions(+), 12825 deletions(-) diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index f303e7b6e0..78f39ccc0c 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -60,7 +60,7 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); if is_excute(agent) { - let play_vc = app::sv_math::rand(hash40("agent"), 3); + let play_vc = app::sv_math::rand(hash40("fighter"), 3); if play_vc == 0 {PLAY_SE(agent, Hash40::new("vc_buddy_attack03"));} } frame(lua_state, 7.0); diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index db7f3f7622..39c65d6d54 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; diff --git a/fighters/dolly/src/acmd/other.rs b/fighters/dolly/src/acmd/other.rs index 7a20856723..668cf1cfab 100644 --- a/fighters/dolly/src/acmd/other.rs +++ b/fighters/dolly/src/acmd/other.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; diff --git a/fighters/dolly/src/burst/acmd.rs b/fighters/dolly/src/burst/acmd.rs index f86e5a61a8..9ef8a1b4fa 100644 --- a/fighters/dolly/src/burst/acmd.rs +++ b/fighters/dolly/src/burst/acmd.rs @@ -1,48 +1,48 @@ use super::*; -unsafe extern "C" fn game_superspecial(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_superspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 25.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); } } -unsafe extern "C" fn game_final3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_final3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_no_dead_all(boma, true, false); if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 71, 41, 0, 100, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(10.0), Some(-1.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 71, 42, 0, 100, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); } else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 45, 75, 0, 33, 11.0, 0.0, 10.0, -1.0, Some(0.0), Some(39.0), Some(9.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_PUNCH, *ATTACK_REGION_BOMB); } } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if MotionModule::motion_kind(owner_module_accessor) == hash40("special_lw_landing") { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 71, 41, 0, 120, 11.0, 0.0, 10.0, -1.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); } } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/dolly/src/wave/acmd.rs b/fighters/dolly/src/wave/acmd.rs index 369bcd44a0..f5810d3426 100644 --- a/fighters/dolly/src/wave/acmd.rs +++ b/fighters/dolly/src/wave/acmd.rs @@ -1,10 +1,10 @@ use super::*; -unsafe extern "C" fn game_hit(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { MeterModule::add(owner_module_accessor.object(), 8.0); } } diff --git a/fighters/edge/src/acmd/aerials.rs b/fighters/edge/src/acmd/aerials.rs index 4217767917..7dbcddf2ad 100644 --- a/fighters/edge/src/acmd/aerials.rs +++ b/fighters/edge/src/acmd/aerials.rs @@ -1,485 +1,485 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.3); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 3.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 60, 77, 0, 64, 12.5, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.5, 50, 70, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.5, 50, 70, 0, 65, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 6.5, 50, 70, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.824); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.824); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 45.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sephiroth_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_light_finger_aura"), Hash40::new("handr"), 2.5, 1, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn sephiroth_attack_air_n_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_light_finger_aura"), Hash40::new("handr"), 2.5, 1, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_light_finger_snapping"), -1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_light_finger_snapping"), -1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("legl"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("legl"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_light_finger_aura"), false, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("edge_light_impact2"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); - EFFECT_FLW_POS(fighter, Hash40::new("edge_light_impact"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("edge_light_finger_snapping"), Hash40::new("handr"), 3.5, 1, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_light_finger_aura"), false, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("edge_light_impact2"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("edge_light_impact"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("edge_light_finger_snapping"), Hash40::new("handr"), 3.5, 1, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_light_impact2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_light_impact2"), false, false); } } -unsafe extern "C" fn sephiroth_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 6.0); // F12 startup + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 6.0); // F12 startup frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_AIR_F_WORK_FLAG_PIERCE_GROUND); } frame(lua_state, 13.0); - FT_MOTION_RATE_RANGE(fighter, 13.0, 15.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 86, 0, 39, 3.0, 18.0, 0.0, 0.4, Some(23.0), Some(0.0), Some(0.8), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.0, 361, 86, 0, 39, 3.0, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 13.0, 15.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 2.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 86, 0, 39, 3.0, 18.0, 0.0, 0.4, Some(23.0), Some(0.0), Some(0.8), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.0, 361, 86, 0, 39, 3.0, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 7.5, 361, 86, 0, 34, 3.0, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_AIR_F_WORK_FLAG_PIERCE_GROUND); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 8.0, 361, 81, 0, 39, 2.5, 18.0, 0.0, 0.4, Some(23.5), Some(0.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 7.0, 361, 81, 0, 39, 2.5, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 5.0, 361, 81, 0, 39, 2.5, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 5.0, 361, 81, 0, 39, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 8.0, 361, 81, 0, 39, 2.5, 18.0, 0.0, 0.4, Some(23.5), Some(0.0), Some(0.8), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 7.0, 361, 81, 0, 39, 2.5, 6.5, 0.0, -0.2, Some(15.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 5.0, 361, 81, 0, 39, 2.5, 0.0, 0.0, -0.7, Some(2.5), Some(0.0), Some(-0.4), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sephiroth_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.4); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -26, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_ALPHA(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -26, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_ALPHA(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - //EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + //EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_sword_flash2"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_speedline"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_sword_flash2"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_speedline"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } } -unsafe extern "C" fn sephiroth_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 5.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 15.5, 1.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 15.5, 1.0); frame(lua_state, 15.5); - FT_MOTION_RATE_RANGE(fighter, 15.5, 17.3, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("clavicler"), 8.0, 45, 102, 0, 45, 2.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 8.0, 45, 102, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, -1.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 17.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("swordl1"), 11.5, 42, 104, 0, 39, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 15.5, 17.3, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("clavicler"), 8.0, 45, 102, 0, 45, 2.0, -1.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("arml"), 8.0, 45, 102, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, -1.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 8.0, 45, 102, 0, 45, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 14.5, 42, 87, 0, 45, 4.5, 17.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("swordl1"), 11.5, 42, 104, 0, 39, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.3); - FT_MOTION_RATE_RANGE(fighter, 17.3, 18.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 17.3, 18.0, 1.0); frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sephiroth_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword3"), Hash40::new("tex_edge_sword4"), 5, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword3"), Hash40::new("tex_edge_sword4"), 5, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), -2, 12.0, 0.6, 0, -150, 15, 1.17, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), -2, 12.0, 0.6, 0, -150, 15, 1.17, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_slash_arc"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_slash_arc"), -1); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); - AFTER_IMAGE_OFF(fighter, 5); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); + AFTER_IMAGE_OFF(agent, 5); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_slash_arc"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_slash_arc"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn sephiroth_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 64, 96, 0, 55, 2.5, -1.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 5.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 8.5, 106, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 64, 96, 0, 55, 2.5, -1.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 3.5, 5.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 11.0, 106, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 8.5, 106, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 4.0, 5.75, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 6.0, 64, 96, 0, 55, 4.0, 5.75, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 8.5, 74, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 12.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 11.0, 74, 96, 0, 55, 4.0, 17.0, 0.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 8.5, 74, 96, 0, 55, 3.5, 21.5, 0.0, 1.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sephiroth_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 16, 19, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 16, 19, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.725, true); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), 0, 10, -2.7, 2.5, 120, 90, 1.05, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), 0, 10, -2.7, 2.5, 120, 90, 1.05, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_slash_light"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_slash_light"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn sephiroth_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sephiroth_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_LANDING_CLEAR_SPEED); WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 8.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 4.0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - SET_SPEED_EX(fighter, 0, -4.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, 0, -4.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); - //ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 4.0, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 4.0, 0.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.0, 52, 76, 0, 58, 4.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Ground only - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 15.0, 270, 90, 0, 58, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 15.0, 270, 90, 0, 58, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air only - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 15.0, 270, 38, 0, 35, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 15.0, 270, 38, 0, 35, 4.0, 20.0, 0.0, 1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter,1, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 5.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent,1, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 9.5, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 15.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Ground only - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // Air only - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 10.0, 48, 76, 0, 58, 3.0, 20.0, 0.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn sephiroth_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("swordl2"), 13, 0, -3.5, 0, 0, 0, 0.8, 1, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("swordl2"), 13, 0, -3.5, 0, 0, 0, 0.8, 1, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.4); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + LAST_EFFECT_SET_ALPHA(agent, 0.8); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_gokumon_wind"), Hash40::new("top"), -2.2, 30, 1.7, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_gokumon_wind"), Hash40::new("top"), -2.2, 30, 1.7, 0, 0, 0, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_gokumon_speedline"), Hash40::new("top"), 0, 0, 0, 0, 46, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_gokumon_speedline"), Hash40::new("top"), 0, 0, 0, 0, 46, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 19.0, 0, 0.8, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_sword_flash2"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_sword_flash2"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } diff --git a/fighters/edge/src/acmd/ground.rs b/fighters/edge/src/acmd/ground.rs index 09e757a91c..87ce3f4521 100644 --- a/fighters/edge/src/acmd/ground.rs +++ b/fighters/edge/src/acmd/ground.rs @@ -1,171 +1,171 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sephiroth_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 82, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 3, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn sephiroth_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn sephiroth_attack_11_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 4); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 4); } frame(lua_state, 4.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 35.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 13); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 13); } } -unsafe extern "C" fn sephiroth_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn sephiroth_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 60, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 100, 30, 1, 3.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 25, 3.0, 0.0, 3.0, 4.0, Some(0.0), Some(3.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_down_only(boma, 3, false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn sephiroth_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(6.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(6.5-1.0)); } frame(lua_state, 6.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(7.0-6.5)); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.5, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 75, 50, 0, 70, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 7.0, 361, 80, 0, 55, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(7.0-6.5)); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 1.5, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + //ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 75, 50, 0, 70, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 7.0, 361, 80, 0, 55, 4.0, -3.0, 0.0, -1.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { // Blade sourspot - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - FT_MOTION_RATE(fighter, 1.0); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 5.0, 361, 85, 0, 55, 4.0, 6.0, 0.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 16.0/(36.0-16.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 16.0/(36.0-16.0)); } frame(lua_state, 36.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sephiroth_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_13_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 6.5); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); if PostureModule::lr(boma) > 1.0{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -11, 2, -12, 0, 0.45, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -11, 2, -12, 0, 0.45, true); + LAST_EFFECT_SET_ALPHA(agent, 0.5); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -12, 2, -12, 0, 0.55, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.8); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 4, 10, -12, 2, -12, 0, 0.55, true); + LAST_EFFECT_SET_ALPHA(agent, 0.8); + LAST_EFFECT_SET_RATE(agent, 1.2); } - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 8, -2, 1.2, -12, 0, 0.7, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -0.5, 9, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.8); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_line"), Hash40::new("top"), 6.2, 10.5, -20.8, 2, -12, 0, 1.03, true); - LAST_EFFECT_SET_ALPHA(fighter, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 3, 8, -2, 1.2, -12, 0, 0.7, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -0.5, 9, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.8); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_line"), Hash40::new("top"), 6.2, 10.5, -20.8, 2, -12, 0, 1.03, true); + LAST_EFFECT_SET_ALPHA(agent, 1.5); - EFFECT_FOLLOW(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 0.65, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 0.65, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } } -unsafe extern "C" fn sephiroth_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); +unsafe extern "C" fn sephiroth_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1); + FT_MOTION_RATE(agent, 1); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 70, 0, 67, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 70, 0, 67, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 53, 82, 0, 67, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 70, 0, 67, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 70, 0, 67, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 53, 82, 0, 67, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 361, 82, 0, 66, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index c56a630a82..86de41081b 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -1,204 +1,129 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); } frame(lua_state, 11.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - PLAY_SE(fighter, Hash40::new("se_edge_winged_landing02")); + PLAY_SE(agent, Hash40::new("se_edge_winged_landing02")); } - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.1); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F14 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn edge_fire_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_fire_special_n1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn edge_fire_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_fire_special_n2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn edge_fire_burst_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_fire_burst_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); AttackModule::disable_tip(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn edge_flare1_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_flare1_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); @@ -207,43 +132,43 @@ unsafe extern "C" fn edge_flare1_fly_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_flare2_exp_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_flare2_exp_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *WEAPON_EDGE_FLARE2_INSTANCE_WORK_ID_FLAG_REFLECT) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } } -unsafe extern "C" fn edge_flare2_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_flare2_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 15, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } } -unsafe extern "C" fn edge_flare2_try_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_flare2_try_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } } -unsafe extern "C" fn edge_flash_game_attack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_flash_game_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; let edge = utils::util::get_battle_object_from_id(owner_id); if VarModule::is_flag(edge, vars::edge::status::FLASH_HOLD) { @@ -252,55 +177,55 @@ unsafe extern "C" fn edge_flash_game_attack(fighter: &mut L2CAgentBase) { let facing = PostureModule::lr(boma); PostureModule::set_pos(boma, &Vector3f::new(pos_x + (35.0 * PostureModule::lr(boma)), pos_y, 0.0)); } - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } pub fn install() { smashline::Agent::new("edge") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/edge/src/acmd/smashes.rs b/fighters/edge/src/acmd/smashes.rs index f847dd5788..a0f18170d2 100644 --- a/fighters/edge/src/acmd/smashes.rs +++ b/fighters/edge/src/acmd/smashes.rs @@ -1,362 +1,362 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 3.0); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(25.5-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(25.5-25.0)); } frame(lua_state, 25.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(26.0-25.5)); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 8.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 15.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.5, 361, 85, 0, 57, 3.0, 1.0, -1.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 15.0, 361, 88, 0, 57, 3.0, 22.0, -1.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(26.0-25.5)); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 8.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 20.0, 361, 78, 0, 57, 3.5, 15.0, -1.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.5, 361, 85, 0, 57, 3.0, 1.0, -1.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 15.0, 361, 88, 0, 57, 3.0, 22.0, -1.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 26.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn sephiroth_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn sephiroth_attack_s4_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 9, 13, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 23.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.2, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.2, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 24.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 10, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.9, 10, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword"), Hash40::new("top"), -1, 13.2, 1.5, 0, -50, 24, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), -1, 13.2,1.5, 0, 40, 24, 1.05, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword"), Hash40::new("top"), -1, 13.2, 1.5, 0, -50, 24, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), -1, 13.2,1.5, 0, 40, 24, 1.05, true); } frame(lua_state, 28.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn sephiroth_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.6); + FT_MOTION_RATE(agent, 0.6); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 3.5, 21.0, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 4.5, 5.2, 0.0, 3.0, Some(4.5), Some(-2.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 6.5, 13.8, 0.0, 3.5, Some(12.5), Some(-2.5), Some(11.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 4.5, 22.0, 0.0, 3.0, Some(19.0), Some(-3.0), Some(13.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 3.5, 21.0, 0.0, 0.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 3.5, 4.5, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 3, 0, Hash40::new("swordl1"), 10.5, 92, 81, 0, 62, 4.5, 5.2, 0.0, 3.0, Some(4.5), Some(-2.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 4, 0, Hash40::new("swordl1"), 15.5, 92, 79, 0, 67, 6.5, 13.8, 0.0, 3.5, Some(12.5), Some(-2.5), Some(11.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 5, 0, Hash40::new("swordl1"), 11.5, 92, 81, 0, 67, 4.5, 22.0, 0.0, 3.0, Some(19.0), Some(-3.0), Some(13.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 97, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 97, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 17.0, 97, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 97, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 97, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 83, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 83, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 15.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 17.0, 83, 79, 0, 67, 4.5, 9.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 83, 81, 0, 67, 4.5, 21.0, 0.0, 0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 83, 81, 0, 62, 4.5, 4.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } // frame(lua_state, 30.0); - // if is_excute(fighter) { - // ATTACK(fighter, 3, 0, Hash40::new("top"), 17.0, 97, 79, 0, 67, 6.5, 0.0, 34.0, 5.0, Some(0.0), Some(34.0), Some(-5.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // ATTACK(fighter, 4, 0, Hash40::new("top"), 13.0, 97, 81, 0, 67, 4.5, 0.0, 40.5, 8.5, Some(0.0), Some(40.5), Some(-8.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // if is_excute(agent) { + // ATTACK(agent, 3, 0, Hash40::new("top"), 17.0, 97, 79, 0, 67, 6.5, 0.0, 34.0, 5.0, Some(0.0), Some(34.0), Some(-5.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // ATTACK(agent, 4, 0, Hash40::new("top"), 13.0, 97, 81, 0, 67, 4.5, 0.0, 40.5, 8.5, Some(0.0), Some(40.5), Some(-8.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // } // frame(lua_state, 31.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear(boma, 3, false); // AttackModule::clear(boma, 4, false); // } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn sephiroth_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 23, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn sephiroth_attack_hi4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 23, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_light"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 120, 90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_light"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 120, 90, 1, true); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 85, 90, 0.92, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword"), Hash40::new("top"), -1.5, 17.5, -2.5, 2.5, 85, 90, 0.92, true); } frame(lua_state, 32.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 33.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 48.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 53.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } frame(lua_state, 54.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4.5, 0, 2, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4.5, 0, 2, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); } } -unsafe extern "C" fn sephiroth_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sephiroth_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 3.0); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { FighterSpecializer_Edge::attack_lw4_ray_check(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.5, 63, 68, 0, 85, 4.6, 0.0, 2.5, 23.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 63, 68, 0, 85, 8.8, 0.0, 6.5, 23.5, Some(0.0), Some(8.5), Some(23.5), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 10.5, 48, 68, 0, 80, 1.5, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 11.5, 48, 68, 0, 80, 1.5, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 13.0, 48, 68, 0, 80, 1.5, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.5, 63, 68, 0, 85, 4.6, 0.0, 2.5, 23.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 63, 68, 0, 85, 8.8, 0.0, 6.5, 23.5, Some(0.0), Some(8.5), Some(23.5), 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 10, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 10.5, 48, 68, 0, 80, 1.5, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 11.5, 48, 68, 0, 80, 1.5, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 13.0, 48, 68, 0, 80, 1.5, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("swordl1"), 10.5, 48, 63, 0, 75, 1.7, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 11.5, 48, 63, 0, 75, 1.7, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 13.0, 315, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 13.0, 48, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("swordl1"), 10.5, 48, 63, 0, 75, 1.7, -2.0, 0.0, 0.0, Some(8.0), Some(0.0), Some(0.0), 0.7, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 11.5, 48, 63, 0, 75, 1.7, 10.0, 0.0, 0.0, Some(19.0), Some(0.0), Some(0.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 13.0, 315, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 2.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 13.0, 48, 63, 0, 75, 1.7, 20.0, 0.0, 0.8, Some(24.0), Some(0.0), Some(1.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 23.0); if !WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 24.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn sephiroth_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn sephiroth_attack_lw4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_smashlw_speedline"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_smashlw_swordflare"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_smashlw_speedline"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_smashlw_swordflare"), Hash40::new("swordl2"), 0, 0, 0, 0, -90, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_ATTACK_LW4_WORK_FLAG_IS_HIT_FLOOR) { frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flash2"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash2"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flash2"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash2"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 23.5, 0, 0, 0, 180, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT(fighter, Hash40::new("edge_smashlw_impact"), Hash40::new("top"), 0, 0, 23.5, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); - FOOT_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 24.5, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 23.5, 0, 0, 0, 180, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT(agent, Hash40::new("edge_smashlw_impact"), Hash40::new("top"), 0, 0, 23.5, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.9); + FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 24.5, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_smashlw_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_smashlw_speedline"), -1); } frame(lua_state, 42.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), false, true); } frame(lua_state, 49.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("edge_smashlw_smoke"), Hash40::new("top"), 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("edge_smashlw_smoke"), Hash40::new("top"), 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } else{ frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 22.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_smashlw_speedline"), -1); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_smashlw_swordflare"), false, true); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_smashlw_speedline"), -1); + EFFECT_OFF_KIND(agent, Hash40::new("edge_smashlw_swordflare"), false, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_light3"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_light3"), false, true); } } } diff --git a/fighters/edge/src/acmd/specials.rs b/fighters/edge/src/acmd/specials.rs index 82613f7f83..8e895611e1 100644 --- a/fighters/edge/src/acmd/specials.rs +++ b/fighters/edge/src/acmd/specials.rs @@ -1,167 +1,167 @@ use super::*; -unsafe extern "C" fn edge_special_n_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_n_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 32.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 32.0, 8.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_S, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 32.0); - FT_MOTION_RATE_RANGE(fighter, 32.0, 79.0, 51.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 32.0, 79.0, 51.0); + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_M, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 79.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 99.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 100.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, *FIGHTER_EDGE_SPECIAL_N_L, *FIGHTER_EDGE_STATUS_SPECIAL_N_WORK_INT_CHARGE_KIND); } frame(lua_state, 105.0); - FT_MOTION_RATE(fighter, 1.6); + FT_MOTION_RATE(agent, 1.6); frame(lua_state, 115.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 120.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, -1); } frame(lua_state, 140.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } } -unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_n1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE) { - VarModule::off_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE) { + VarModule::off_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE); ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 35.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 35.0, 5.0); frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } } -unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_n2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 11.0, 13.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 13.0); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE) { - VarModule::off_flag(fighter.object(), vars::edge::status::SPECIAL_N_FIRE); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE) { + VarModule::off_flag(agent.object(), vars::edge::status::SPECIAL_N_FIRE); ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FIRE, false, 0); } } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 0.4); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.4); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_button_on(Buttons::Special) && boma.is_situation(*SITUATION_KIND_GROUND) { VarModule::on_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DECIDED_RUSH); } frame(lua_state, 21.0); if WorkModule::is_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH) { - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } else if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } } -unsafe extern "C" fn effect_specialhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_charge"), Hash40::new("swordl1"), 0, 0, 0, 0, 180, -90, 0.9, true); +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_charge"), Hash40::new("swordl1"), 0, 0, 0, 0, 180, -90, 0.9, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.2); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 10.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 17.0, 0, 0.8, 0, 0, 0, 1.7, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } -unsafe extern "C" fn game_specialairhistart(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DECIDED_RUSH); } } -unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); +unsafe extern "C" fn edge_special_hi2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); } FighterSpecializer_Edge::set_special_hi_jostle_area(boma); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 8.0, 0.0, 2.5, 1.0, Some(0.0), Some(-2.5), Some(1.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 0.0 }, 4, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 0.0 }, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); @@ -170,16 +170,16 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera_ex(boma, 3, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 4.0); for _ in 0..6 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 2.3, 368, 100, 0, 0, 6.5, 0.0, 2.5, 0.0, Some(0.0), Some(-2.5), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 2.3, 367, 100, 0, 0, 6.5, 0.0, 3.0, 10.0, Some(0.0), Some(-3.0), Some(10.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, -1.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("rot"), &Vector2f{ x: 20.0, y: 5.0 }, 4, false); AttackModule::set_vec_target_pos(boma, 2, Hash40::new("rot"), &Vector2f{ x: 10.0, y: 0.0 }, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); @@ -188,7 +188,7 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera_ex(boma, 3, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); @@ -197,136 +197,136 @@ unsafe extern "C" fn edge_special_hi2_game(fighter: &mut L2CAgentBase) { FighterSpecializer_Edge::clear_special_hi_jostle_area(boma); } -unsafe extern "C" fn edge_special_hi2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_charge"), false, false); +unsafe extern "C" fn edge_special_hi2_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_charge"), false, false); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - EFFECT(fighter, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - EFFECT(fighter, Hash40::new("edge_octaslash_illution_01"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_speed_line"), Hash40::new("rot"), 0, -1, 0, 0, 0, 0, 2, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_01"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_speed_line"), Hash40::new("rot"), 0, -1, 0, 0, 0, 0, 2, true); EffectModule::enable_sync_init_pos_last(boma); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 4, 2, 0, -3.5, 196, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 4, 2, 0, -3.5, 196, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 3, 2, -4, -19, 13, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 3, 2, -4, -19, 13, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 6, 2, -15, -18, -144.7, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 6, 2, -15, -18, -144.7, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.6, 2, 29, -55, -13, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.6, 2, 29, -55, -13, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.5, 2, -2.5, -20, -163, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 2.5, 2, -2.5, -20, -163, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 5.3, 10, -12, -38, 35, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 5.3, 10, -12, -38, 35, 0.3, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 1.5); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 7.5, 7, -2.7, -24.5, -141, 0.25, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("edge_octaslash_arc2"), Hash40::new("rot"), 0, 7.5, 7, -2.7, -24.5, -141, 0.25, 0, 0, 0, 0, 0, 0, true); EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(fighter, 2); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_arc"), Hash40::new("rot"), -3.2, 3.8, -3, -5.7, -0.5, 23, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_arc"), Hash40::new("rot"), -3.2, 3.8, -3, -5.7, -0.5, 23, 0.4, true); EffectModule::set_disable_render_offset_last(boma); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_sword_flare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_sword_flare"), false, true); } } -unsafe extern "C" fn game_specialhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { JostleModule::set_status(boma, false); if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 9.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 9.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else{ - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, 89, 60, 0, 60, 3.0, 0.0, -2.0, 9.0, Some(0.0), Some(-2.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -unsafe extern "C" fn effect_specialhi1(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_charge"), false, false); +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_charge"), false, false); if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("handr"), 2, 0, 0, 0, 0, 0, 1.25, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash2"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("handr"), 2, 1, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("kneer"), 1, 0, 0, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); EffectModule::enable_sync_init_pos_last(boma); } let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); @@ -342,51 +342,51 @@ unsafe extern "C" fn effect_specialhi1(fighter: &mut L2CAgentBase) { _ => Hash40::new("edge_octaslash_illution_01") }; if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { - EFFECT(fighter, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("edge_octaslash_illution_wing"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - EFFECT(fighter, eff_hash, Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT(agent, eff_hash, Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.8, 0, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_octaslash_line"), Hash40::new("rot"), 0, 0, 7, 0, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_octaslash_line"), Hash40::new("rot"), 0, 0, 7, 0, 0, 0, 0.85, true); EffectModule::enable_sync_init_pos_last(boma); if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_octaslash_sword_flare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_octaslash_sword_flare"), false, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_SITUATION_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } } } -unsafe extern "C" fn edge_special_hi1_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn edge_special_hi1_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.08); // if VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { // MotionModule::set_rate(boma, 2.0); @@ -397,142 +397,142 @@ unsafe extern "C" fn edge_special_hi1_end_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairhi1end(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn edge_special_hi2_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_hi2_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, 361, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, 361, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 1.256); } } -unsafe extern "C" fn edge_special_air_hi_2_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_air_hi_2_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let mut kb_angle = 0; - if is_excute(fighter) { + if is_excute(agent) { boma.select_cliff_hangdata_from_name("charged_special_hi"); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_float(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE) <= 0.0 { kb_angle = (WorkModule::get_float(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE) * -1.0) as u64; } else { kb_angle = 361 as u64; } - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 7.0, kb_angle, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("rot"), 7.0, kb_angle, 104, 0, 68, 10.0, 0.0, 0.0, 8.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.3, 60, 60, 0, 90, 8.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); } } -unsafe extern "C" fn edge_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 27.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 27.0, 13.0); + if is_excute(agent) { if app::sv_math::rand(hash40("fighter"), 2) == 1 { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_VOICE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 11.0, 3.0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } } -unsafe extern "C" fn edge_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_senkou_start"), Hash40::new("waist"), 2, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_senkou_start"), Hash40::new("waist"), 2, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.75); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.75); } frame(lua_state, 8.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn edge_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_lw_hit_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - VarModule::on_flag(fighter.object(), vars::edge::status::FLASH_HOLD); + VarModule::on_flag(agent.object(), vars::edge::status::FLASH_HOLD); } } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_EDGE_GENERATE_ARTICLE_FLASH, false, -1); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_ENABLE_CONTROL_X); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_LW_FLAG_ENABLE_FALL_SPEED); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.15); + FT_MOTION_RATE(agent, 1.15); frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn edge_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_special_lw_hit_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_senkou_shield"), true, true); - let offset = if VarModule::is_flag(fighter.object(), vars::edge::status::FLASH_HOLD) { 35 } else { 0 }; - EFFECT(fighter, Hash40::new("edge_senkou_shield_break"), Hash40::new("top"), 0, 13, 12 + offset, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_senkou_shield"), true, true); + let offset = if VarModule::is_flag(agent.object(), vars::edge::status::FLASH_HOLD) { 35 } else { 0 }; + EFFECT(agent, Hash40::new("edge_senkou_shield_break"), Hash40::new("top"), 0, 13, 12 + offset, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } } diff --git a/fighters/edge/src/acmd/throws.rs b/fighters/edge/src/acmd/throws.rs index 53ee95b7f7..e487f2af25 100644 --- a/fighters/edge/src/acmd/throws.rs +++ b/fighters/edge/src/acmd/throws.rs @@ -1,20 +1,20 @@ use super::*; -unsafe extern "C" fn edge_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.5, 4.7, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.5, 4.7, Some(0.0), Some(8.5), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } @@ -61,193 +61,193 @@ unsafe extern "C" fn edge_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.5, 58, 105, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn edge_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.5, 58, 105, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_B, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_THROW_FLAG_REVERSE_LR); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 80, 0, 60, 7.5, 0.0, 11.0, -13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 80, 0, 60, 7.5, 0.0, 11.0, -13.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, -15.0, 8); + CHECK_FINISH_CAMERA(agent, -15.0, 8); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn edge_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_throw_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 18.0, 12.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 98, 138, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + FT_MOTION_RATE_RANGE(agent, 1.0, 18.0, 12.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 98, 138, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 40.0, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 75, 90, 0, 60, 7.0, 0.0, 20.0, 0.0, Some(0.0), Some(40.0), Some(0.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 18.0, 40.0, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 75, 90, 0, 60, 7.0, 0.0, 20.0, 0.0, Some(0.0), Some(40.0), Some(0.0), 0.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 15, 14); + CHECK_FINISH_CAMERA(agent, 15, 14); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn edge_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_throw_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light2"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 3); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light2"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 3); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -15.0, 0, 1.5, 90, 0, 180, 0.9, true); - LAST_EFFECT_SET_ALPHA(fighter, 0.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT(fighter, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); - EFFECT(fighter, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 12.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 0, 0.7, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_speedline"), Hash40::new("swordl2"), -15.0, 0, 1.5, 90, 0, 180, 0.9, true); + LAST_EFFECT_SET_ALPHA(agent, 0.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 12, 0, 0.8, 0, 0, 90, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl2"), 12.0, 0, 0.8, 0, 0, 0, 0.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_speedline"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_speedline"), false, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 33.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); } } -unsafe extern "C" fn edge_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_throw_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h01")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_edge_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h02")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_edge_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h02")); } frame(lua_state, 33.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackhard_h03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackhard_h03")); } } -unsafe extern "C" fn edge_throw_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn edge_throw_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); } frame(lua_state, 18.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_78_slash"), 12); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_78_slash"), 12); } } -unsafe extern "C" fn edge_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 67, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn edge_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 67, 60, 0, 77, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 40.0, 12.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 40.0, 12.0); frame(lua_state, 32.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11.0, 0.0); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn edge_throw_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_catch_handaura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn edge_throw_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_catch_handaura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - EFFECT(fighter, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } else{ - EFFECT(fighter, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + EFFECT(agent, Hash40::new("edge_throwlw_gravity"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } } frame(lua_state, 18.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 29.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 40.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12, 0.1, -2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 44.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_catch_handaura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_catch_handaura"), false, true); } } diff --git a/fighters/edge/src/acmd/tilts.rs b/fighters/edge/src/acmd/tilts.rs index 5cd65dca9f..204a3113f1 100644 --- a/fighters/edge/src/acmd/tilts.rs +++ b/fighters/edge/src/acmd/tilts.rs @@ -1,426 +1,426 @@ use super::*; -unsafe extern "C" fn edge_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); } frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn edge_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn edge_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); } frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn edge_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn edge_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.6); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.5-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); } frame(lua_state, 13.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(14.0-13.5)); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn edge_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_s3_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_smash_flash"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 6, Hash40::new("swordl2"), -4.0, 0.0, -0.6, Hash40::new("swordl2"), 29.0, 0.0, 1.4, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT_FOLLOW(fighter, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.4, 9.75, 3.8, 19, 33, 13.8, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.4, 9.75, 3.8, 19, 33, 13.8, 1, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_attack_dash_aura"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } } -unsafe extern "C" fn edge_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.5, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.5, 10.0); frame(lua_state, 12.5); - FT_MOTION_RATE_RANGE(fighter, 12.5, 13.0, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 88, 75, 0, 69, 4.5, 0.0, 8.5, 5.0, Some(0.0), Some(8.5), Some(10.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 12.5, 13.0, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 88, 75, 0, 69, 4.5, 0.0, 8.5, 5.0, Some(0.0), Some(8.5), Some(10.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 20.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 88, 75, 0, 69, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("swordl1"), 10.5, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 14.0, 20.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 88, 75, 0, 69, 3.7, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, -1.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 9.0, 88, 75, 0, 69, 3.7, 5.5, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 16.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 88, 75, 0, 69, 4.0, 11.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 10.5, 88, 75, 0, 69, 3.5, 21.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn edge_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_hi3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.5); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.1); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 10, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.0, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FLW_POS(fighter, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_edge_sword1"), Hash40::new("tex_edge_sword2"), 10, Hash40::new("swordl2"), -4.0, 0.0, -0.7, Hash40::new("swordl2"), 29.0, 0.0, 1.5, true, Hash40::new("null"), Hash40::new("swordl2"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 11.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FLW_POS(agent, Hash40::new("edge_attack_dash_aura"), Hash40::new("swordl2"), 15.0, 0, 0.8, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_flare"), Hash40::new("swordl2"), 0, 0, 0, 0, 180, -90, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_sword_light3"), Hash40::new("swordl2"), 0, 0, 0, 0, -180, -90, 1, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); - EFFECT_OFF_KIND(fighter, Hash40::new("edge_sword_flare"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + EFFECT_OFF_KIND(agent, Hash40::new("edge_sword_flare"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("edge_attack_dash_aura"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("edge_attack_dash_aura"), -1); } } -unsafe extern "C" fn edge_attack_hi3_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_hi3_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackair_h01")); - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackair_h01")); + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 12.5); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_edge_rnd_attack_hard")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_edge_rnd_attack_hard")); } frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_edge_attackair_h02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_edge_attackair_h02")); } } -unsafe extern "C" fn edge_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn edge_attack_hi3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 12.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_78_slash"), 28, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn edge_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 7.0, 80, 75, 0, 81, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 70, 75, 0, 81, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.0, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 70, 75, 0, 81, 3.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 6.0, 70, 75, 0, 81, 2.0, 4.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn edge_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn edge_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, -3, 0, 0, 0, 0.45, 0, 0, 4, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 6, 0, -3, 0, 0, 0, 0.45, 0, 0, 4, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.45, 0, 0, 3, 0, 0, 0, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 13.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.5, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.6); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 14, 0, -3, 0, 0, 0, 0.5, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.6); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.3, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -3, 0, 0, 0, 0.3, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 19.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -2, 0, 0, 0, 0.35, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.7); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -2, 0, 0, 0, 0.35, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.7); } } diff --git a/fighters/eflame/src/acmd/aerials.rs b/fighters/eflame/src/acmd/aerials.rs index 59e5b510b9..3dd7c2ee70 100644 --- a/fighters/eflame/src/acmd/aerials.rs +++ b/fighters/eflame/src/acmd/aerials.rs @@ -1,19 +1,19 @@ use super::*; -unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -22,28 +22,28 @@ unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 58, 67, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 58, 67, 0, 75, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 73, 51, 0, 107, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 58, 67, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 58, 67, 0, 75, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 73, 51, 0, 107, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 73, 50, 0, 102, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 73, 50, 0, 102, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 73, 50, 0, 102, 5.0, -4.0, 12.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -52,26 +52,26 @@ unsafe extern "C" fn eflame_attack_air_n_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 75.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -80,23 +80,23 @@ unsafe extern "C" fn eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 50, 71, 0, 71, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.5, 2.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 3.0, 2.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 2.5, 2.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 50, 71, 0, 71, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 50, 71, 0, 71, 3.5, 2.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 3.0, 2.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 43, 72, 0, 69, 2.5, 2.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -105,31 +105,31 @@ unsafe extern "C" fn eflame_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 69.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -138,19 +138,19 @@ unsafe extern "C" fn eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 2.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 13.0, 55, 70, 0, 74, 3.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 3.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 16.0, 60, 72, 0, 74, 2.5, 0.0, 15.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -159,33 +159,33 @@ unsafe extern "C" fn eflame_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 71.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -194,26 +194,26 @@ unsafe extern "C" fn eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, 0.0, 16.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, -1.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, -2.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, -3.0, 16.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 76, 55, 0, 94, 4.0, -1.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 3.5, -2.0, 11.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 14.0, 81, 58, 0, 94, 2.5, -3.0, 16.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -221,32 +221,32 @@ unsafe extern "C" fn eflame_attack_air_hi_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } frame(lua_state, 79.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -255,35 +255,35 @@ unsafe extern "C" fn eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 361, 76, 0, 56, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 16.0, 270, 71, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 16.0, 270, 50, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 13.0, 60, 79, 0, 66, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); /* Ground-only */ - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 16.0, 270, 62, 0, 32, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); /* Air-only */ - ATTACK(fighter, 5, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword2"), 16.0, 270, 48, 0, 31, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -292,9 +292,9 @@ unsafe extern "C" fn eflame_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } } diff --git a/fighters/eflame/src/acmd/ground.rs b/fighters/eflame/src/acmd/ground.rs index 5f577af706..b3ec516c59 100644 --- a/fighters/eflame/src/acmd/ground.rs +++ b/fighters/eflame/src/acmd/ground.rs @@ -1,28 +1,28 @@ use super::*; -unsafe extern "C" fn eflame_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 85, 100, 20, 5, 2.5, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 2.5, 0.0, 3.0, 11.5, Some(0.0), Some(3.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -31,27 +31,27 @@ unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 3.0, 0.0, 8.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 75, 100, 25, 10, 4.0, 0.0, 8.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 15, 0, 15, 4.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -60,26 +60,26 @@ unsafe extern "C" fn eflame_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn eflame_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -88,19 +88,19 @@ unsafe extern "C" fn eflame_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.5, 361, 68, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.5, 361, 68, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.5, 361, 68, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.5, 361, 68, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.5, 361, 66, 0, 85, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } diff --git a/fighters/eflame/src/acmd/other.rs b/fighters/eflame/src/acmd/other.rs index 5e364ee5a8..7f989b51c2 100644 --- a/fighters/eflame/src/acmd/other.rs +++ b/fighters/eflame/src/acmd/other.rs @@ -1,178 +1,103 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_eflame_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_eflame_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_eflame_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_eflame_step_left_l")); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_flyflickl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.3); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -180,9 +105,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -190,9 +115,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -200,9 +125,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -210,9 +135,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -220,9 +145,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -230,9 +155,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -240,9 +165,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -250,9 +175,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -260,9 +185,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -270,9 +195,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -280,9 +205,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -290,9 +215,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -300,9 +225,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -310,9 +235,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -320,9 +245,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -330,9 +255,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -340,9 +265,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -350,9 +275,9 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -360,31 +285,31 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); AttackModule::set_no_finish_camera(boma, 6, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -395,20 +320,20 @@ unsafe extern "C" fn esword_game_flyflickl(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_flyflickr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.3); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -416,9 +341,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -426,9 +351,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -436,9 +361,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -446,9 +371,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -456,9 +381,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -466,9 +391,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -476,9 +401,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -486,9 +411,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -496,9 +421,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -506,9 +431,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -516,9 +441,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -526,9 +451,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -536,9 +461,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -546,9 +471,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -556,9 +481,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -566,9 +491,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -576,9 +501,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -586,9 +511,9 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -596,31 +521,31 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); AttackModule::set_no_finish_camera(boma, 6, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -631,20 +556,20 @@ unsafe extern "C" fn esword_game_flyflickr(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_flyl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.45); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -652,9 +577,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -662,9 +587,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -672,9 +597,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -682,9 +607,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -692,9 +617,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -702,9 +627,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -712,9 +637,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -722,9 +647,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -732,9 +657,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -742,9 +667,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -752,9 +677,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -762,9 +687,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -772,9 +697,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -782,9 +707,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -792,9 +717,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -802,9 +727,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -812,9 +737,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -822,9 +747,9 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -832,31 +757,31 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); AttackModule::set_no_finish_camera(boma, 6, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -867,20 +792,20 @@ unsafe extern "C" fn esword_game_flyl(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_flyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.45); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -888,9 +813,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -898,9 +823,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -908,9 +833,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -918,9 +843,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -928,9 +853,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -938,9 +863,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -948,9 +873,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -958,9 +883,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -968,9 +893,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -978,9 +903,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -988,9 +913,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -998,9 +923,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1008,9 +933,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1018,9 +943,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1028,9 +953,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1038,9 +963,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1048,9 +973,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1058,9 +983,9 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1068,31 +993,31 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); AttackModule::set_no_finish_camera(boma, 6, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -1103,20 +1028,20 @@ unsafe extern "C" fn esword_game_flyr(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_reflectedl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1124,9 +1049,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1134,9 +1059,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1144,9 +1069,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1154,9 +1079,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1164,9 +1089,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1174,9 +1099,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1184,9 +1109,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1194,9 +1119,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1204,9 +1129,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1214,9 +1139,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1224,9 +1149,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1234,9 +1159,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1244,9 +1169,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1254,9 +1179,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1264,9 +1189,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1274,9 +1199,9 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1284,19 +1209,19 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -1307,20 +1232,20 @@ unsafe extern "C" fn esword_game_reflectedl(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_reflectedr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1328,9 +1253,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1338,9 +1263,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1348,9 +1273,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1358,9 +1283,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1368,9 +1293,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1378,9 +1303,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1388,9 +1313,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1398,9 +1323,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1408,9 +1333,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1418,9 +1343,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1428,9 +1353,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1438,9 +1363,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1448,9 +1373,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1458,9 +1383,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1468,9 +1393,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1478,9 +1403,9 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); AttackModule::set_damage_shake_scale(boma, 0.5); @@ -1488,19 +1413,19 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 1, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear(boma, 0, false); } frame(lua_state, 22.0); frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); @@ -1511,23 +1436,23 @@ unsafe extern "C" fn esword_game_reflectedr(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_rotate(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn esword_game_rotate(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::disable_tip(boma); } frame(lua_state, 0.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.2); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 1, 25.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 25.0, false); // AttackModule::set_add_reaction_frame(boma, 3, 25.0, false); @@ -1537,44 +1462,44 @@ unsafe extern "C" fn esword_game_rotate(fighter: &mut L2CAgentBase) { // AttackModule::set_add_reaction_frame(boma, 0, 25.0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *WEAPON_EFLAME_ESWORD_STATUS_SPECIAL_S_FLAG_FINISH); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 0.5); } } @@ -1591,10 +1516,10 @@ pub fn install() { .install(); smashline::Agent::new("eflame") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("sound_dash", dash_sound) .acmd("game_escapeair", escape_air_game) .acmd("game_escapeairslide", escape_air_slide_game) diff --git a/fighters/eflame/src/acmd/smashes.rs b/fighters/eflame/src/acmd/smashes.rs index 2cb60a1e71..76251b1d58 100644 --- a/fighters/eflame/src/acmd/smashes.rs +++ b/fighters/eflame/src/acmd/smashes.rs @@ -1,11 +1,11 @@ use super::*; -unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_s4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); @@ -17,18 +17,18 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 4.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 4.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 13.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -36,12 +36,12 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { AttackModule::set_optional_hit_effect(boma, 4, Hash40::new("eflame_attack_s4s_explosion")); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -49,12 +49,12 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { AttackModule::set_optional_hit_effect(boma, 4, Hash40::new("eflame_attack_s4s_explosion")); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 2.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 5.0, 0.0, 4.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 4.5, 0.0, 4.0, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 2.0, 25.0, Some(0.0), Some(6.0), Some(28.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 2.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 5.0, 0.0, 4.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 4.5, 0.0, 4.0, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 2.5, 0.0, 2.0, 25.0, Some(0.0), Some(6.0), Some(28.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 361, 76, 0, 70, 3.0, 0.0, 9.0, 23.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); AttackModule::set_optional_hit_effect(boma, 0, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 1, Hash40::new("eflame_attack_s4s_explosion")); AttackModule::set_optional_hit_effect(boma, 2, Hash40::new("eflame_attack_s4s_explosion")); @@ -63,11 +63,11 @@ unsafe extern "C" fn eflame_attack_s4_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_ATTACK_FLAG_S4_GROUND_CHECK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } diff --git a/fighters/eflame/src/acmd/specials.rs b/fighters/eflame/src/acmd/specials.rs index 85f31e75e6..10cbbd994b 100644 --- a/fighters/eflame/src/acmd/specials.rs +++ b/fighters/eflame/src/acmd/specials.rs @@ -1,150 +1,150 @@ use super::*; -unsafe extern "C" fn game_specialairhijump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 85, 100, 64, 16, 2.5, 0.0, 18.0, 5.0, Some(0.0), Some(2.5), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 95, 100, 64, 16, 4.0, 0.0, 15.0, 11.0, Some(0.0), Some(4.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 64, 16, 4.0, 0.0, 14.0, 15.0, Some(0.0), Some(4.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 85, 100, 64, 16, 2.5, 0.0, 18.0, 5.0, Some(0.0), Some(2.5), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 95, 100, 64, 16, 4.0, 0.0, 15.0, 11.0, Some(0.0), Some(4.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 64, 16, 4.0, 0.0, 14.0, 15.0, Some(0.0), Some(4.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 100, 53, 20, 2.5, 0.0, 21.5, 5.0, Some(0.0), Some(15.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 15.0, Some(0.0), Some(14.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 100, 53, 20, 2.5, 0.0, 21.5, 5.0, Some(0.0), Some(15.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 53, 20, 4.0, 0.0, 20.0, 15.0, Some(0.0), Some(14.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_START_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 95, 100, 50, 20, 2.5, 0.0, 23.0, 5.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 11.0, Some(0.0), Some(20.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 15.0, Some(0.0), Some(20.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 95, 100, 50, 20, 2.5, 0.0, 23.0, 5.0, Some(0.0), Some(19.0), Some(5.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 11.0, Some(0.0), Some(20.0), Some(11.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 100, 100, 50, 20, 4.0, 0.0, 24.0, 15.0, Some(0.0), Some(20.0), Some(15.0), 1.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); // AttackModule::set_add_reaction_frame(boma, 2, 10.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } frame(lua_state, 7.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); frame(lua_state, 27.0); - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { - if is_excute(fighter) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int64(boma, hash40("special_air_hi_jump") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } frame(lua_state, 31.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } frame(lua_state, 32.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f{x: 0.0, y: -7.0, z: 0.0}); WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_END_CONTROL); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 280, 100, 25, 0, 6.0, 0.0, 3.0, 9.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 280, 100, 25, 0, 6.0, 0.0, 3.0, 9.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, -1.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_STATUS_SPECIAL_HI_FLAG_ENABLE_GROUND); } } -unsafe extern "C" fn game_specialairhifall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialairhifall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::set_int64(boma, hash40("special_air_hi_fall") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(12.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn eflame_firepillar_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_firepillar_special_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn eflame_firepillar_special_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); - EFFECT(fighter, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); +unsafe extern "C" fn eflame_firepillar_special_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } diff --git a/fighters/eflame/src/acmd/throws.rs b/fighters/eflame/src/acmd/throws.rs index 9313d3e678..e85a21758d 100644 --- a/fighters/eflame/src/acmd/throws.rs +++ b/fighters/eflame/src/acmd/throws.rs @@ -64,46 +64,46 @@ unsafe extern "C" fn eflame_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 115, 0, 85, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 80, 115, 0, 85, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.5, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 3.33, 3.33, false, false, 0.0, false, true, false); } } if MotionModule::is_changing(boma) { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 150, 0, 30, 4.5, 0.0, 3.0, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 66.0); - if is_excute(fighter) { - if IS_EXIST_ARTICLE(fighter, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { + if is_excute(agent) { + if IS_EXIST_ARTICLE(agent, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 3.33, 3.33, false, false, 0.0, false, true, false); } WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); diff --git a/fighters/eflame/src/acmd/tilts.rs b/fighters/eflame/src/acmd/tilts.rs index c1f7404331..2bf44a64a9 100644 --- a/fighters/eflame/src/acmd/tilts.rs +++ b/fighters/eflame/src/acmd/tilts.rs @@ -1,19 +1,19 @@ use super::*; -unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -22,19 +22,19 @@ unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 9.5, 361, 70, 0, 52, 3.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 11.5, 35, 78, 0, 52, 2.5, 15.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -45,19 +45,19 @@ unsafe extern "C" fn eflame_attack_s3_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -66,19 +66,19 @@ unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 2.5, 14.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.5, 80, 92, 0, 68, 3.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 3.0, 9.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 11.0, 86, 91, 0, 67, 2.5, 14.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -89,16 +89,16 @@ unsafe extern "C" fn eflame_attack_hi3_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn eflame_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn eflame_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -107,46 +107,46 @@ unsafe extern "C" fn eflame_attack_lw3_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 82, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 82, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); // Hitboxes 5-7 are copies of 2, 3, and 4 - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 8.0, 78, 50, 0, 84, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 3.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword2"), 10.0, 87, 52, 0, 84, 2.5, 12.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 5, 0, Hash40::new("top"), 8.0, 78, 50, 0, 84, 4.0, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 6, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.5, 0.0, 3.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(fighter, 7, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.0, 0.0, 2.0, 17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 8.0, 78, 50, 0, 84, 4.0, 0.0, 4.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.5, 0.0, 3.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 7, 0, Hash40::new("top"), 10.0, 87, 52, 0, 84, 3.0, 0.0, 2.0, 17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_EFLAME_GENERATE_ARTICLE_ESWORD, *WEAPON_EFLAME_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } diff --git a/fighters/elight/src/acmd/smashes.rs b/fighters/elight/src/acmd/smashes.rs index 6179e8a574..15b1efa298 100644 --- a/fighters/elight/src/acmd/smashes.rs +++ b/fighters/elight/src/acmd/smashes.rs @@ -1,11 +1,11 @@ use super::*; -unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); @@ -14,48 +14,48 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); WorkModule::set_int64(boma, hash40("attack_s4_hold") as i64, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 14.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(8.0), Some(-6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 14.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(11.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, Some(0.0), Some(4.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, Some(0.0), Some(9.0), Some(-7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, Some(0.0), Some(12.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, Some(0.0), Some(17.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 3.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 38, 65, 0, 65, 2.5, 0.0, 19.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } @@ -65,70 +65,70 @@ unsafe extern "C" fn game_attacks4(fighter: &mut L2CAgentBase) { } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } -unsafe extern "C" fn game_attacklw4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 5.0, 5.0, false, false, 0.0, false, true, false); } if MotionModule::is_changing(boma){ WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); WorkModule::set_int64(boma, hash40("attack_lw4_hold") as i64, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 4.5, 180, 100, 30, 0, 3.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 4.5, 180, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 4.5, 180, 100, 25, 0, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 4.5, 180, 100, 25, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 4.5, 180, 100, 30, 0, 3.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("legl"), 4.5, 0, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 4.5, 180, 100, 20, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 4.5, 180, 100, 25, 0, 3.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 4.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword2"), 10.0, 94, 70, 0, 75, 3.5, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("legl"), 10.0, 94, 70, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("kneel"), 10.0, 94, 70, 0, 75, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_close"), 5.0, 5.0, false, false, 0.0, false, true, false); } diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index ff722a3cd6..458834c23d 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -1,144 +1,144 @@ use super::*; -unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02"));} } } -unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); } } -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_falco_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_falco_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_step_left_m")); } } -unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_passivewalljump(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_passivewalljump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_jump02")); - PLAY_SE(fighter, Hash40::new("vc_falco_passive")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_jump02")); + PLAY_SE(agent, Hash40::new("vc_falco_passive")); } } -unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sound_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_escapeair")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); } } -unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn sound_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("falco")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("falco")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); } } -unsafe extern "C" fn sound_escapen(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn sound_escapen(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let boma = sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_falco_escapeair")); - PLAY_SE(fighter, Hash40::new("vc_falco_cliffcatch")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_escapeair")); + PLAY_SE(agent, Hash40::new("vc_falco_cliffcatch")); } } diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index a5c5a790af..920479b6a4 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -155,26 +155,26 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - //LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + //LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); EffectModule::preset_limit_num(agent.module_accessor, 2); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); - //FLASH(fighter, 1, 1, 1, 0.627); + //FLASH(agent, 1, 1, 1, 0.627); EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_starrod_splash"), Hash40::new("top"), 0, 5.0, 0, 0, 0, 0, 2.8, true); LAST_EFFECT_SET_ALPHA(agent, 0.5); LAST_EFFECT_SET_RATE(agent, 1.5); } // frame(lua_state, 1.0); - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); // } // frame(lua_state, 32.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_loop"), false, false); - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_ref"), false, false); - // EFFECT_OFF_KIND(fighter, Hash40::new("falco_ref_flash"), true, false); - // EFFECT_FLW_POS(fighter, Hash40::new("sys_flash"), Hash40::new("reflector"), 1.4, -0.6, -0.5, 0, 0, 0, 0.5, true); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_loop"), false, false); + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_ref"), false, false); + // EFFECT_OFF_KIND(agent, Hash40::new("falco_ref_flash"), true, false); + // EFFECT_FLW_POS(agent, Hash40::new("sys_flash"), Hash40::new("reflector"), 1.4, -0.6, -0.5, 0, 0, 0, 0.5, true); // } } @@ -250,8 +250,8 @@ unsafe extern "C" fn sound_speciallwloop(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - //STOP_SE(fighter, Hash40::new("se_falco_special_l02")); - //PLAY_STATUS(fighter, Hash40::new("se_falco_special_l02")); + //STOP_SE(agent, Hash40::new("se_falco_special_l02")); + //PLAY_STATUS(agent, Hash40::new("se_falco_special_l02")); } } @@ -321,25 +321,25 @@ unsafe extern "C" fn falco_special_air_n_start_sound(agent: &mut L2CAgentBase) { } // #[acmd_script( agent = "falco", script = "sound_specialairhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_air_hi_sound(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; +// unsafe fn falco_special_air_hi_sound(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); -// if is_excute(fighter) { -// PLAY_SEQUENCE(fighter, Hash40::new("seq_falco_rnd_firebird")); -// PLAY_SE(fighter, Hash40::new("se_falco_special_h02")); +// if is_excute(agent) { +// PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); +// PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } // } // #[acmd_script( agent = "falco", script = "sound_specialhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_hi_sound(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; +// unsafe fn falco_special_hi_sound(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); -// if is_excute(fighter) { -// PLAY_SEQUENCE(fighter, Hash40::new("seq_falco_rnd_firebird")); -// PLAY_SE(fighter, Hash40::new("se_falco_special_h02")); +// if is_excute(agent) { +// PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); +// PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } // } diff --git a/fighters/gekkouga/src/acmd/tilts.rs b/fighters/gekkouga/src/acmd/tilts.rs index f0c449ceba..05e1b4b7e3 100644 --- a/fighters/gekkouga/src/acmd/tilts.rs +++ b/fighters/gekkouga/src/acmd/tilts.rs @@ -20,18 +20,18 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_attacks3hi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.7); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs index 6b502f3467..ae5f5c20a2 100644 --- a/fighters/iceclimber/src/acmd/other.rs +++ b/fighters/iceclimber/src/acmd/other.rs @@ -26,18 +26,18 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); } } @@ -66,18 +66,18 @@ unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflyroll_nana(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll_nana(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); } } diff --git a/fighters/inkling/src/acmd/aerials.rs b/fighters/inkling/src/acmd/aerials.rs index 6c592fd364..f2bdc801e1 100644 --- a/fighters/inkling/src/acmd/aerials.rs +++ b/fighters/inkling/src/acmd/aerials.rs @@ -1,187 +1,187 @@ use super::*; -unsafe extern "C" fn inkling_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 7.0); - FT_MOTION_RATE(fighter, 8.0/(15.0-6.0)); - ATTACK(fighter, 0, 0, Hash40::new("head"), 7.0, 55, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 7.0); + FT_MOTION_RATE(agent, 8.0/(15.0-6.0)); + ATTACK(agent, 0, 0, Hash40::new("head"), 7.0, 55, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 7.0, 55, 85, 0, 50, 4.0, 6.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 56.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn inkling_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 361, 115, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 48, 70, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 48, 70, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 7.0, 48, 70, 0, 30, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn inkling_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(6.0-1.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 8.0, 50, 105, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 8.0, 50, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.0, 50, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("arml"), 8.0, 50, 105, 0, 25, 2.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 8.0, 50, 105, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.0, 50, 105, 0, 25, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 361, 108, 0, 25, 4.5, 0.0, 1.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn inkling_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(8.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(8.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, -1.0, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, 4.2, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 2.5, 2.4, -4.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 4.5, 367, 50, 0, 40, 2.5, 0.0, 0.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, -1.0, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 3.5, 4.2, -0.5, -0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.5, 367, 50, 0, 40, 2.5, 2.4, -4.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 4.5, 367, 50, 0, 40, 2.5, 0.0, 0.0, 1.9, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 6.5, 80, 165, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 6.5, 80, 165, 0, 30, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.5, 80, 165, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn inkling_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn inkling_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 16.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 6.0, 16.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 270, 80, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 270, 80, 0, 30, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 270, 80, 0, 30, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("shoulderr"), 12.0, 270, 65, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 12.0, 270, 65, 0, 20, 3.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 12.0, 270, 65, 0, 20, 4.5, 0.0, 1.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 10.0); AttackModule::set_ink_value(boma, 1, 10.0); AttackModule::set_ink_value(boma, 2, 10.0); @@ -190,11 +190,11 @@ unsafe extern "C" fn inkling_attack_air_lw_game(fighter: &mut L2CAgentBase) { AttackModule::set_ink_value(boma, 5, 10.0); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } diff --git a/fighters/inkling/src/acmd/ground.rs b/fighters/inkling/src/acmd/ground.rs index d4e31f1402..533e348374 100644 --- a/fighters/inkling/src/acmd/ground.rs +++ b/fighters/inkling/src/acmd/ground.rs @@ -1,77 +1,77 @@ use super::*; -unsafe extern "C" fn inkling_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 2.5, 81, 100, 22, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.25, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 15, 2.5, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 2.5, 81, 100, 22, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 2.5, 81, 100, 22, 0, 3.25, 4.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 15, 2.5, 0.0, 3.0, 12.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn inkling_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.5, 80, 100, 25, 0, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 2.5, 80, 100, 25, 0, 3.75, 1.0, -2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.5, 80, 100, 25, 0, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 2.5, 80, 100, 25, 0, 3.75, 1.0, -2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 80, 100, 25, 0, 2.5, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(3.0), 1.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn inkling_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 4.0, 50, 90, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 50, 90, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 4.0, 50, 90, 0, 40, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_100_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 7.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 16.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 21.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 7.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 5.0, 0.0, 8.0, 12.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 16.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 50, 6.5, 0.0, 8.0, 21.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 10.0); AttackModule::set_ink_value(boma, 1, 10.0); AttackModule::set_ink_value(boma, 2, 10.0); @@ -79,17 +79,17 @@ unsafe extern "C" fn inkling_attack_100_end_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // base 0.84 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); - if is_excute(fighter) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); + if is_excute(agent) { if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID){ ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, 0); } @@ -107,29 +107,29 @@ unsafe extern "C" fn inkling_attack_dash_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 85, 0, 60, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 85, 0, 60, 4.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.84); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 50, 0, 85, 3.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 50, 0, 85, 3.0, 0.0, 7.0, 4.0, Some(0.0), Some(7.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } diff --git a/fighters/inkling/src/acmd/other.rs b/fighters/inkling/src/acmd/other.rs index d03a5d727b..1765e74907 100644 --- a/fighters/inkling/src/acmd/other.rs +++ b/fighters/inkling/src/acmd/other.rs @@ -1,406 +1,331 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_inkling_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_inkling_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn inkling_inkbullet_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); +unsafe extern "C" fn inkling_inkbullet_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); AttackModule::enable_safe_pos(boma); AttackModule::set_ink_value(boma, 0, 0.0); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); AttackModule::set_ink_value(boma, 0, 0.0); } } -unsafe extern "C" fn inkling_roller_special_s_walk_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_s_walk_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 60.0); AttackModule::set_ink_value(boma, 1, 60.0); } } -unsafe extern "C" fn inkling_roller_special_air_s_walk_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_air_s_walk_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 60.0); AttackModule::set_ink_value(boma, 1, 60.0); } } -unsafe extern "C" fn inkling_roller_special_s_walk_no_ink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_s_walk_no_ink_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn inkling_roller_special_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_roller_special_s_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 120.0); AttackModule::set_ink_value(boma, 1, 120.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 100.0); } } -unsafe extern "C" fn inkling_roller_special_air_s_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_roller_special_air_s_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 100.0); } } -unsafe extern "C" fn inkling_roller_special_s_dash_no_ink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_roller_special_s_dash_no_ink_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn inkling_roller_special_s_run_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_s_run_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 100.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 100.0); } } -unsafe extern "C" fn inkling_roller_special_air_s_run_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_air_s_run_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 100.0); } } -unsafe extern "C" fn inkling_roller_special_s_run_no_ink_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn inkling_roller_special_s_run_no_ink_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn inkling_splash_normal_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_splash_normal_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); if !WorkModule::is_flag(owner_boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_AFTER_SPECIAL_HI) { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 50.0); AttackModule::set_ink_value(boma, 1, 50.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 40.0); AttackModule::set_ink_value(boma, 1, 40.0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } } -unsafe extern "C" fn inkling_splashbomb_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); +unsafe extern "C" fn inkling_splashbomb_explode_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); AttackModule::set_ink_value(boma, 0, 0.0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 12.0); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 14.0); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(fighter.module_accessor); - let motion_frame = MotionModule::frame(fighter.module_accessor); - let motion_rate = MotionModule::rate(fighter.module_accessor); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); - if is_excute(fighter) { - ArticleModule::set_frame(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(fighter.module_accessor); + let motion_kind = MotionModule::motion_kind(agent.module_accessor); + let motion_frame = MotionModule::frame(agent.module_accessor); + let motion_rate = MotionModule::rate(agent.module_accessor); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + if is_excute(agent) { + ArticleModule::set_frame(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(agent.module_accessor); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(fighter.module_accessor); - let motion_frame = MotionModule::frame(fighter.module_accessor); - let motion_rate = MotionModule::rate(fighter.module_accessor); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); - if is_excute(fighter) { - ArticleModule::set_frame(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(fighter.module_accessor); + let motion_kind = MotionModule::motion_kind(agent.module_accessor); + let motion_frame = MotionModule::frame(agent.module_accessor); + let motion_rate = MotionModule::rate(agent.module_accessor); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + if is_excute(agent) { + ArticleModule::set_frame(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(agent.module_accessor); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } @@ -414,10 +339,10 @@ pub fn install() { .install(); smashline::Agent::new("inkling") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("sound_dash", dash_sound) .acmd("game_escapeair", escape_air_game) .acmd("game_escapeairslide", escape_air_slide_game) diff --git a/fighters/inkling/src/acmd/smashes.rs b/fighters/inkling/src/acmd/smashes.rs index e16f602743..d4f5f93f11 100644 --- a/fighters/inkling/src/acmd/smashes.rs +++ b/fighters/inkling/src/acmd/smashes.rs @@ -1,96 +1,96 @@ use super::*; -unsafe extern "C" fn inkling_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn inkling_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, false, 0); ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_s"), true, 0.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_s"), true, 6.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 95, 0, 36, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 95, 0, 36, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 95, 0, 36, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 95, 0, 36, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); AttackModule::set_ink_value(boma, 0, 100.0); AttackModule::set_ink_value(boma, 1, 120.0); } if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 361, 93, 0, 35, 4.2, 0.0, 6.0, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_s4_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn inkling_attack_s4_hold_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_charge"), false, 0.0); } } -unsafe extern "C" fn inkling_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn inkling_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, false, 0); ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4"), true, 0.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4"), true, WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME)); } } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 100, 100, 0, 3.5, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 100, 100, 0, 3.5, 0.0, 4.0, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 88, 82, 0, 55, 12.5, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 88, 100, 0, 55, 14.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 88, 82, 0, 55, 12.5, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 88, 100, 0, 55, 14.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 120.0); AttackModule::set_ink_value(boma, 1, 100.0); } if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 88, 66, 0, 55, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 88, 66, 0, 55, 12.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 88, 66, 0, 55, 10.0, 0.0, 20.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 88, 66, 0, 55, 12.0, 0.0, 20.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_hi4_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn inkling_attack_hi4_hold_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4_charge"), false, 0.0); } diff --git a/fighters/inkling/src/acmd/specials.rs b/fighters/inkling/src/acmd/specials.rs index 594ad55797..c2558bc5d6 100644 --- a/fighters/inkling/src/acmd/specials.rs +++ b/fighters/inkling/src/acmd/specials.rs @@ -1,62 +1,62 @@ use super::*; -unsafe extern "C" fn inkling_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_special_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 3, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if agent.kind() == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 3, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("handr"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } AttackModule::set_ink_value(boma, 0, 15.0); AttackModule::set_ink_value(boma, 1, 15.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_special_air_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - if fighter.kind() == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + if agent.kind() == *FIGHTER_KIND_KIRBY { + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 2.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 8.0, 3.0, 1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 4.5, 0.0, 1.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 5.0, 65, 55, 0, 75, 6.0, 0.0, 1.5, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } AttackModule::set_ink_value(boma, 0, 15.0); AttackModule::set_ink_value(boma, 1, 15.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_special_s_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_special_s_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0.0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 15.0, 0, 180, 0, 1.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("inkling_squid_change"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 2.0, true); - LAST_PARTICLE_SET_COLOR(fighter, WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_R), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_G), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_B)); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -2, 0, 15.0, 0, 180, 0, 1.15, true); + EFFECT_FOLLOW(agent, Hash40::new("inkling_squid_change"), Hash40::new("top"), 0, 3, 0, 0, 0, 0, 2.0, true); + LAST_PARTICLE_SET_COLOR(agent, WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_R), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_G), WorkModule::get_float(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLOAT_INK_B)); EffectModule::enable_sync_init_pos_last(boma); } } diff --git a/fighters/inkling/src/acmd/throws.rs b/fighters/inkling/src/acmd/throws.rs index 804b745107..1593ea2951 100644 --- a/fighters/inkling/src/acmd/throws.rs +++ b/fighters/inkling/src/acmd/throws.rs @@ -1,20 +1,20 @@ use super::*; -unsafe extern "C" fn inkling_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(9.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } @@ -121,38 +121,38 @@ unsafe extern "C" fn inkling_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn inkling_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 50, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_INK_SUCCESS){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 5.5, 0.0, 13.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 30, 0, 5.5, 0.0, 13.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); AttackModule::set_ink_value(boma, 0, 80.0); AttackModule::set_catch_only_all(boma, true, false); } - CHECK_FINISH_CAMERA(fighter, 10, 1); + CHECK_FINISH_CAMERA(agent, 10, 1); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE_RANGE(fighter, 30.0, 45.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 7.0); frame(lua_state, 45.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn inkling_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn inkling_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); @@ -175,56 +175,56 @@ unsafe extern "C" fn inkling_throw_b_game(fighter: &mut L2CAgentBase) { else { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new("throw_b_r"), false, -1.0); } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 92, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 45, 92, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 17, 5); + CHECK_FINISH_CAMERA(agent, 17, 5); } frame(lua_state, 17.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn inkling_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 68, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn inkling_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 68, 90, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.5, 0.0, 5.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 100, 30, 0, 5.5, 0.0, 5.5, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 7, 0); + CHECK_FINISH_CAMERA(agent, 7, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } diff --git a/fighters/inkling/src/acmd/tilts.rs b/fighters/inkling/src/acmd/tilts.rs index ce3f11121e..9c5d4d937f 100644 --- a/fighters/inkling/src/acmd/tilts.rs +++ b/fighters/inkling/src/acmd/tilts.rs @@ -1,94 +1,94 @@ use super::*; -unsafe extern "C" fn inkling_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 80, 0, 64, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 80, 0, 64, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 1.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 6.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 361, 80, 0, 64, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 80, 0, 64, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 1.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("handr"), 9.0, 361, 80, 0, 64, 3.5, 6.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(7.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(7.0-1.0)); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 95, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 7.5, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 6.0, 85, 70, 0, 67, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn inkling_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn inkling_attack_hi3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 3); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 26.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn inkling_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn inkling_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 3.0, 5, 100, 20, 0, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 3.0, 190, 100, 25, 0, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 3.0, 5, 100, 20, 0, 3.0, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 3.0, 190, 100, 25, 0, 4.0, 5.5, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 0.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 0.0, 1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 40, 80, 0, 45, 5.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 389dab7817..9c48b96e8b 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -1,153 +1,153 @@ use super::*; -unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02"));} } } -unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); } } -unsafe extern "C" fn game_appealhil(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn game_appealhir(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn game_appealsl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn game_appealsr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); } -unsafe extern "C" fn game_appeallwl(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); frame(lua_state, 5.0); } -unsafe extern "C" fn game_appeallwr(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); frame(lua_state, 5.0); } -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_jack_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_jack_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_jack_step_left_s")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_jack_step_left_s")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } diff --git a/fighters/ken/src/acmd/other.rs b/fighters/ken/src/acmd/other.rs index 9491de1d85..ae2d95f54e 100644 --- a/fighters/ken/src/acmd/other.rs +++ b/fighters/ken/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { @@ -26,56 +25,6 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } -} - unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -91,31 +40,6 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02"));} - } -} - unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -182,10 +106,10 @@ unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", damageflyhi_sound); - agent.acmd("sound_damageflylw", damageflylw_sound); - agent.acmd("sound_damageflyn", damageflyn_sound); + agent.acmd("sound_damageflylw", damageflyhi_sound); + agent.acmd("sound_damageflyn", damageflyhi_sound); agent.acmd("sound_damageflyroll", damageflyroll_sound); - agent.acmd("sound_damageflytop", damageflytop_sound); + agent.acmd("sound_damageflytop", damageflyhi_sound); agent.acmd("sound_dash", dash_sound); agent.acmd("game_turndash", ken_turn_dash_game); agent.acmd("game_escapeair", escape_air_game); diff --git a/fighters/ken/src/shinryuken/acmd.rs b/fighters/ken/src/shinryuken/acmd.rs index 726dd2707d..55bee6ceee 100644 --- a/fighters/ken/src/shinryuken/acmd.rs +++ b/fighters/ken/src/shinryuken/acmd.rs @@ -24,17 +24,17 @@ unsafe extern "C" fn ken_shinryuken_game_final(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ken_shinryuken_effect_final(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 51.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("ken_final_shinryuken_beam"), Hash40::new("top"), 0, 0, 8, 0, 90, 0, 1.0, false); EffectModule::set_scale_last(boma, &Vector3f::new(0.6, 0.36, 0.6)); } frame(lua_state, 97.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("ken_final_shinryuken_beam"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); } } pub fn install(agent: &mut Agent) { diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index ad3abf34f5..35d18c6283 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { if is_excute(agent) { if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { frame(lua_state, 1.1); if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("agent"), 3) + app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index b1721d9853..728f8e9c81 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -366,7 +366,7 @@ unsafe extern "C" fn sound_specialhih(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); - match smash::app::sv_math::rand(smash::hash40("agent"), 2) { + match smash::app::sv_math::rand(smash::hash40(), 2) { 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), @@ -464,7 +464,7 @@ unsafe extern "C" fn sound_specialairhih(agent: &mut L2CAgentBase) { frame(lua_state, 18.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); - match smash::app::sv_math::rand(smash::hash40("agent"), 2) { + match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), diff --git a/fighters/lucario/src/acmd/aerials.rs b/fighters/lucario/src/acmd/aerials.rs index ebdce0fe74..1cd77d0b9e 100644 --- a/fighters/lucario/src/acmd/aerials.rs +++ b/fighters/lucario/src/acmd/aerials.rs @@ -1,94 +1,94 @@ use super::*; -unsafe extern "C" fn lucario_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 4.0, 365, 100, 42, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 4.0, 365, 100, 42, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 4.0, 365, 100, 42, 0, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("legl"), 4.0, 365, 100, 42, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handl"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("legl"), 8.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("handr"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handl"), 8.0, 361, 100, 0, 25, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("shoulderl"), 8.0, 361, 100, 0, 25, 3.0, 1.8, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("legl"), 8.0, 361, 100, 0, 25, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucario_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 3.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 12.0, 8.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.5, 60, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("toel"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 6.7, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 8.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.5, 60, 70, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("toel"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.5, 66, 70, 0, 60, 5.0, 0.0, 6.7, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 51.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn lucario_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } @@ -105,127 +105,127 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 9.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.6, 361, 100, 0, 30, 5.2, 0.0, 11.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 361, 100, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.6, 361, 100, 0, 30, 5.2, 0.0, 11.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 361, 100, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.1, 65, 77, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.1, 65, 77, 0, 30, 3.0, 0.0, 11.0, -9.0, Some(0.0), Some(11.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 20.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucario_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 4.0, 4.0); } frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 10.0, 3.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 10.0, 3.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.4, 80, 80, 0, 30, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(12.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 90, 100, 0, 40, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(20.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.4, 80, 80, 0, 30, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(12.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 90, 100, 0, 40, 5.0, 0.0, 11.0, 2.0, Some(0.0), Some(20.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 8.0, 4.0); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucario_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_air_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn lucario_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 8.0, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - let attack_air_lw_speed = fighter.get_float(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_ATTACK_AIR_LW_SPEED); + if is_excute(agent) { + let attack_air_lw_speed = agent.get_float(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_ATTACK_AIR_LW_SPEED); let curr_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * PostureModule::lr(boma); - SET_SPEED_EX(fighter, curr_speed_x, attack_air_lw_speed, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - fighter.on_flag(*FIGHTER_LUCARIO_ATTACK_AIR_STATUS_WORK_ID_FLAG_DEC_SPEED); + SET_SPEED_EX(agent, curr_speed_x, attack_air_lw_speed, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + agent.on_flag(*FIGHTER_LUCARIO_ATTACK_AIR_STATUS_WORK_ID_FLAG_DEC_SPEED); KineticModule::suspend_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - fighter.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); + agent.on_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 100, 30, 0, 20, 3.8, 0.0, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 367, 100, 50, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 150, 100, 25, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 100, 30, 0, 20, 3.8, 0.0, -2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 367, 100, 50, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 150, 100, 25, 0, 4.6, 0.0, 3.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 5.8, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 4.6, 0.0, 4.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 5.8, 0.0, -2.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 64, 92, 0, 57, 4.6, 0.0, 4.2, 0.3, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } diff --git a/fighters/lucario/src/acmd/ground.rs b/fighters/lucario/src/acmd/ground.rs index ccdfe26b90..e6c7da7e74 100644 --- a/fighters/lucario/src/acmd/ground.rs +++ b/fighters/lucario/src/acmd/ground.rs @@ -1,96 +1,96 @@ use super::*; -unsafe extern "C" fn lucario_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucario_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 3.0, 60, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 60, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handl"), 3.0, 70, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 50, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 3.0, 60, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 60, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handl"), 3.0, 70, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // jab lock - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("arml"), 3.0, 361, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("handl"), 3.0, 361, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 3.0, 361, 100, 38, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderl"), 3.0, 361, 100, 34, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("arml"), 3.0, 361, 100, 34, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("handl"), 3.0, 361, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucario_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 60, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // jab lock - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 361, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 361, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 100, 30, 0, 4.5, 0.0, 8.8, 8.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 36, 0, 4.5, 0.0, 8.8, 4.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucario_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 120, 0, 30, 5.5, 0.0, 8.0, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("footr"), 5.0, 55, 120, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 120, 0, 30, 5.5, 0.0, 8.0, 4.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("footr"), 5.0, 55, 120, 0, 25, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } diff --git a/fighters/lucario/src/acmd/other.rs b/fighters/lucario/src/acmd/other.rs index d502b84510..f1cd73e590 100644 --- a/fighters/lucario/src/acmd/other.rs +++ b/fighters/lucario/src/acmd/other.rs @@ -1,319 +1,244 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_lucario_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucario_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucario_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucario_step_right_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucario_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucario_step_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_cliffattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_cliffattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 18.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 45, 20, 0, 90, 5.0, 0.0, 5.0, 5.2, Some(0.0), Some(5.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 45, 20, 0, 90, 5.0, 0.0, 5.0, 5.2, Some(0.0), Some(5.0), Some(-8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_catchattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 361, 100, 40, 0, 5.5, 0.0, 8.0, 9.0, None, None, None, 2.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 361, 100, 40, 0, 5.5, 0.0, 8.0, 9.0, None, None, None, 2.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_slipattack(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_slipattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, 8.5, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, 8.5, Some(0.0), Some(5.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, -5.5, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 50, 0, 60, 5.0, 0.0, 5.0, -5.5, Some(0.0), Some(5.0), Some(-3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_downattackd(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_downattackd(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 23.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_downattacku(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_downattacku(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); } frame(lua_state, 16.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, -11.0, Some(0.0), Some(5.0), Some(-4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 48, 48, 0, 80, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(5.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_appealhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } pub fn install() { smashline::Agent::new("lucario") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/lucario/src/acmd/smashes.rs b/fighters/lucario/src/acmd/smashes.rs index 9e7af7d98d..3a4f1bcab8 100644 --- a/fighters/lucario/src/acmd/smashes.rs +++ b/fighters/lucario/src/acmd/smashes.rs @@ -1,96 +1,96 @@ use super::*; -unsafe extern "C" fn lucario_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 19.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 106, 0, 40, 5.7, 0.0, 8.0, 11.7, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 106, 0, 40, 5.7, 0.0, 8.0, 11.7, Some(0.0), Some(8.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 106, 0, 40, 3.3, 0.0, 8.0, 18.2, Some(0.0), Some(8.0), Some(6.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 106, 0, 40, 3.3, 0.0, 8.0, 18.2, Some(0.0), Some(8.0), Some(6.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucario_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 5.6, 85, 100, 100, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.6, 112, 100, 100, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("bust"), 5.6, 85, 100, 100, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.6, 112, 100, 100, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.25, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 10.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 7.9, 80, 120, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.9, 80, 120, 0, 70, 5.0, 3.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + ATTACK(agent, 0, 0, Hash40::new("bust"), 7.9, 80, 120, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.9, 80, 120, 0, 70, 5.0, 3.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 9, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5, 9, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_hattack_c"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.9, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_hattack_c"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.9, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_appeal_hadou"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_appeal_hadou"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn sound_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); - PLAY_SE(fighter, Hash40::new("vc_lucario_attack05")); - PLAY_SE(fighter, Hash40::new("se_lucario_attackair_n")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + PLAY_SE(agent, Hash40::new("vc_lucario_attack05")); + PLAY_SE(agent, Hash40::new("se_lucario_attackair_n")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucario_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucario_smash_h01")); } } -unsafe extern "C" fn expression_attackhi4(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } // frame(lua_state, 12.0); // execute(lua_state, 12.0); @@ -98,43 +98,43 @@ unsafe extern "C" fn expression_attackhi4(fighter: &mut L2CAgentBase) { // slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); // } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_R, 3); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 24.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } -unsafe extern "C" fn lucario_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 19.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 19.0, 7.0); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, 15.0, Some(0.0), Some(6.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, -15.0, Some(0.0), Some(6.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, 15.0, Some(0.0), Some(6.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.5, 33, 99, 0, 30, 4.3, 0.0, 6.0, -15.0, Some(0.0), Some(6.0), Some(-4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index 7322f78c87..8608ef2a3a 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -1,31 +1,31 @@ use super::*; -unsafe extern "C" fn lucario_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_special_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 5.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_generatable(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG) { ArticleModule::generate_article(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG, false, 0); } @@ -33,49 +33,49 @@ unsafe extern "C" fn lucario_special_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_special_air_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 5.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("top"), 4.5, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(1.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_G); } wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); GrabModule::set_rebound(boma, false); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_generatable(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG) { ArticleModule::generate_article(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG, false, 0); } } } -unsafe extern "C" fn lucario_special_air_s_throw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_special_air_s_throw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { // able to angle sideB dunk based on stick position on f22 - let throw_angle_min = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "force_palm_air.throw_angle_min") as u64; - let throw_angle_max = ParamModule::get_int(fighter.battle_object, ParamType::Agent, "force_palm_air.throw_angle_max") as u64; - let kb_angle = if VarModule::get_float(fighter.object(), vars::lucario::status::AURA_OVERRIDE) > 0.0 - && fighter.stick_y() < 0.25 { - let angle = (270.0 + PostureModule::lr(boma) * fighter.stick_x().atan2(-fighter.stick_y()).to_degrees()) as u64; + let throw_angle_min = ParamModule::get_int(agent.battle_object, ParamType::Agent, "force_palm_air.throw_angle_min") as u64; + let throw_angle_max = ParamModule::get_int(agent.battle_object, ParamType::Agent, "force_palm_air.throw_angle_max") as u64; + let kb_angle = if VarModule::get_float(agent.object(), vars::lucario::status::AURA_OVERRIDE) > 0.0 + && agent.stick_y() < 0.25 { + let angle = (270.0 + PostureModule::lr(boma) * agent.stick_x().atan2(-agent.stick_y()).to_degrees()) as u64; angle.clamp(throw_angle_min, throw_angle_max) } else { 270 as u64 @@ -83,481 +83,481 @@ unsafe extern "C" fn lucario_special_air_s_throw_game(fighter: &mut L2CAgentBase // calculate angle to rotate Lucario's model based on knockback angle let rot = 270 - kb_angle; - VarModule::set_int(fighter.battle_object, vars::lucario::status::FORCE_PALM_ROT_ANGLE, rot as i32); + VarModule::set_int(agent.battle_object, vars::lucario::status::FORCE_PALM_ROT_ANGLE, rot as i32); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, kb_angle, 66, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, kb_angle, 66, 0, 10, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); + CHECK_FINISH_CAMERA(agent, 15, 0); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 25.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + AttackModule::clear_all(agent.module_accessor); } frame(lua_state, 55.0); - if is_excute(fighter) { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - KineticModule::resume_energy_all(fighter.module_accessor); + if is_excute(agent) { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::resume_energy_all(agent.module_accessor); } } -unsafe extern "C" fn game_specialsthrow(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 52, 86, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0, 52, 86, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); - ATTACK_IGNORE_THROW(fighter, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); - CHECK_FINISH_CAMERA(fighter, 15, 0); + CHECK_FINISH_CAMERA(agent, 15, 0); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); } frame(lua_state, 29.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn lucario_special_air_s_throw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_catch"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn lucario_special_air_s_throw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_catch"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucario_bflash_l"), Hash40::new("handl"), 0.5, 0, 0, 0, 0, 180, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucario_bflash_r"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucario_bflash_l"), Hash40::new("handl"), 0.5, 0, 0, 0, 0, 180, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("lucario_bflash_r"), Hash40::new("handr"), 0.5, 0, 0, 0, 0, 0, 1, true); } } -unsafe extern "C" fn lucario_special_air_s_throw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_special_air_s_throw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_005")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_005")); let curr_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_CURR_AURAPOWER); let middle_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_SE_MIDDLE_AURAPOWER); let high_aurapower = WorkModule::get_float(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLOAT_SE_HIGH_AURAPOWER); if curr_aurapower < middle_aurapower { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_s")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_s")); } else if curr_aurapower < high_aurapower { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_m")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_m")); } else { - PLAY_SE(fighter, Hash40::new("se_lucario_special_s01")); - PLAY_SE(fighter, Hash40::new("se_lucario_special_s02_l")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s01")); + PLAY_SE(agent, Hash40::new("se_lucario_special_s02_l")); } } } -unsafe extern "C" fn lucario_special_air_s_throw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_special_air_s_throw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, 0x50000000 /* default value */); } frame(lua_state, 23.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_impact"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_impact"), 0); } frame(lua_state, 66.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn lucario_special_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn lucario_special_hi_l_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } } -unsafe extern "C" fn lucario_special_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn lucario_special_hi_r_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } } -unsafe extern "C" fn lucario_special_air_hi_l_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn lucario_special_air_hi_l_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } } -unsafe extern "C" fn lucario_special_air_hi_r_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 30.0, 34.0); +unsafe extern "C" fn lucario_special_air_hi_r_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 30.0, 34.0); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_GRAVITY_ONOFF); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } } -unsafe extern "C" fn lucario_special_hi_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucario_special_hi_move_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 0.5, 367, 100, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 0.5, 367, 100, 0, 35, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { GroundModule::set_passable_check(boma, true); } } -unsafe extern "C" fn lucario_special_hi_move_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_special_hi_move_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 5); } } -unsafe extern "C" fn lucario_special_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_special_hi_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn lucario_special_air_hi_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_special_air_hi_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); wait(lua_state, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("hip"), 6.0, 70, 10, 0, 96, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } wait(lua_state, 2.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_AIR_END_CONTROL_X); } frame(lua_state, 6.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(fighter.battle_object, MeterModule::meter_per_level(fighter.battle_object)); - let frames = 120.max(VarModule::get_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); } } -unsafe extern "C" fn effect_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 35.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn sound_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_013")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); } } -unsafe extern "C" fn expression_specialnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(fighter.battle_object, MeterModule::meter_per_level(fighter.battle_object)); - let frames = 120.max(VarModule::get_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); } } -unsafe extern "C" fn effect_specialairnbomb(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairnbomb(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 37.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucario_013")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); } } -unsafe extern "C" fn expression_specialairnbomb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn game_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.67, 0, 0.78, 0.31); - FLASH(fighter, 1, 1, 1, 0.75); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); - // EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -20, 0, 0, 0, 1.0, true); - // LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 0.67, 0, 0.78, 0.31); + FLASH(agent, 1, 1, 1, 0.75); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); + // EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 7, -20, 0, 0, 0, 1.0, true); + // LAST_EFFECT_SET_RATE(agent, 0.4); } wait(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 2.0); } - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + COL_NORMAL(agent); + AFTER_IMAGE_OFF(agent, 4); } } -unsafe extern "C" fn sound_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucario_special_l02")); +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucario_special_l02")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucario_special_l03_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucario_special_l03_s")); } } -unsafe extern "C" fn expression_speciallw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 57.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } } -unsafe extern "C" fn game_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucario_kagebunshin_flash"), Hash40::new("top"), 0, 15, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - COL_PRI(fighter, 200); - FLASH(fighter, 0.67, 0, 0.78, 0.31); - FLASH(fighter, 1, 1, 1, 0.75); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); - // EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 19, -12, 45, 0, 0, 1.0, true); - // LAST_EFFECT_SET_RATE(fighter, 0.4); + if is_excute(agent) { + COL_PRI(agent, 200); + FLASH(agent, 0.67, 0, 0.78, 0.31); + FLASH(agent, 1, 1, 1, 0.75); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("lucario_shinsoku1"), Hash40::new("lucario_shinsoku2"), 13, Hash40::new("handl"), 0.0, 0.0, 0.0, Hash40::new("handr"), 0.0, 0.0, 0.0, true, Hash40::new("null"), Hash40::new("waist"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, -1.0); + // EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 19, -12, 45, 0, 0, 1.0, true); + // LAST_EFFECT_SET_RATE(agent, 0.4); } wait(lua_state, 1.0); for _ in 0..4 { - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 2.0); } - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.67, 0, 0.78, 0.31); + if is_excute(agent) { + FLASH(agent, 0.67, 0, 0.78, 0.31); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 0.7, 0.7, 0.7, 0.5); + if is_excute(agent) { + FLASH(agent, 0.7, 0.7, 0.7, 0.5); } wait(lua_state, 2.0); - if is_excute(fighter) { - COL_NORMAL(fighter); - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + COL_NORMAL(agent); + AFTER_IMAGE_OFF(agent, 4); } } diff --git a/fighters/lucario/src/acmd/throws.rs b/fighters/lucario/src/acmd/throws.rs index 094ecc39f1..0f4a6dd898 100644 --- a/fighters/lucario/src/acmd/throws.rs +++ b/fighters/lucario/src/acmd/throws.rs @@ -1,178 +1,178 @@ use super::*; -unsafe extern "C" fn lucario_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.5, 0.0, Some(0.0), Some(8.5), Some(9.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn lucario_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn lucario_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.8), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 40, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 40, 60, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 5, 0); + CHECK_FINISH_CAMERA(agent, 5, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 2.0, y: -4.0, z: 0.0}); } frame(lua_state, 14.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 60, 5.5, 0.0, 8.5, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 100, 0, 60, 5.5, 0.0, 8.5, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 18, 5); + CHECK_FINISH_CAMERA(agent, 18, 5); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 10.0, y: 0.0, z: 0.0}); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 60, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 88, 60, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 78, 110, 0, 75, 5.0, 0.0, 13.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 78, 110, 0, 75, 5.0, 0.0, 13.0, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 5, 7); + CHECK_FINISH_CAMERA(agent, 5, 7); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 3.0, y: 2.0, z: 0.0}); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - MeterModule::watch_damage(fighter.battle_object, false); + MeterModule::watch_damage(agent.battle_object, false); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 30, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 75, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 80, 30, 0, 100, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 75, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 27.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 8, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 8, 0); lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 5.0, y: -3.0, z: 0.0}); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - MeterModule::watch_damage(fighter.battle_object, false); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + MeterModule::watch_damage(agent.battle_object, false); } } diff --git a/fighters/lucario/src/acmd/tilts.rs b/fighters/lucario/src/acmd/tilts.rs index 91ed4e9388..c476497b13 100644 --- a/fighters/lucario/src/acmd/tilts.rs +++ b/fighters/lucario/src/acmd/tilts.rs @@ -1,95 +1,95 @@ use super::*; -unsafe extern "C" fn lucario_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); // GROUND ONLY - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 4.0, 361, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 361, 100, 25, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 361, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 4.0, 361, 100, 25, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); // AIR ONLY - ATTACK(fighter, 4, 0, Hash40::new("shoulderl"), 4.0, 366, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 5, 0, Hash40::new("shoulderr"), 4.0, 366, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 6, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 7, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("shoulderl"), 4.0, 366, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 5, 0, Hash40::new("shoulderr"), 4.0, 366, 100, 30, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 6, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 7, 0, Hash40::new("armr"), 4.0, 366, 100, 30, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); AttackModule::clear(boma, 6, false); AttackModule::clear(boma, 7, false); - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 1, Hash40::new("shoulderl"), 6.0, 361, 105, 0, 57, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 1, Hash40::new("shoulderr"), 6.0, 361, 105, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 5.5, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 1, Hash40::new("shoulderl"), 6.0, 361, 105, 0, 57, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 1, Hash40::new("shoulderr"), 6.0, 361, 105, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 1, Hash40::new("armr"), 6.0, 361, 105, 0, 57, 5.5, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucario_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("legr"), 5.0, 96, 100, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 96, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 6.0, 96, 100, 0, 60, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("legr"), 5.0, 96, 100, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 96, 100, 0, 60, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 6.0, 96, 100, 0, 60, 4.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackhi3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -30, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -30, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -110, 90, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.2); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 9.8, 0.5, 180, -110, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 16.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn lucario_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucario_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 4.0); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, true); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 105, 0, 45, 4.0, 0.0, 2.8, 9.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 105, 0, 45, 4.0, 0.0, 2.8, 9.0, Some(0.0), Some(3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 13.0); - if is_excute(fighter) { - MeterModule::watch_damage(fighter.battle_object, false); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } } diff --git a/fighters/lucas/src/acmd/aerials.rs b/fighters/lucas/src/acmd/aerials.rs index ddddf8fea6..a2b3cd7643 100644 --- a/fighters/lucas/src/acmd/aerials.rs +++ b/fighters/lucas/src/acmd/aerials.rs @@ -1,535 +1,535 @@ use super::*; -unsafe extern "C" fn lucas_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, (6.0-1.0)/2.5); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); MotionModule::set_rate(boma, (23.0-6.0)/11.5); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 8.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, 3.5, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 365, 48, 0, 34, 4.0, 0.0, 2.0, -3.1, None, None, None, 0.5, 1.2, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -1, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } frame(lua_state, 23.0); MotionModule::set_rate(boma, (26.0-23.0)/1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); MotionModule::set_rate(boma, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 1.5, 0.0, 4.5, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 9.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 1.5, 0.0, 4.5, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 127, 0, 35, 9.0, 0.0, 4.25, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 4.0); MotionModule::set_rate(boma, (72.0-30.0)/31.5); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 69.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn lucas_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 0.9, true); +unsafe extern "C" fn lucas_attack_air_n_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 0.9, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 4.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 4.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(fighter, 3.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1, 3.5, 0, -90, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 3.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1.5, 4.0, 0, -90, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 1.5, 4.0, 0, -90, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_n_sound (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_n_sound (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 14.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } frame(lua_state, 26.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackhard_s01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackhard_s01")); } } -unsafe extern "C" fn lucas_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_landing_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, 6.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, -4.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 3.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, 6.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 2.75, -4.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 361, 100, 0, 40, 3.5, 0.0, 3.0, 1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_landing_air_n_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.5); +unsafe extern "C" fn lucas_landing_air_n_effect (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.5); } } -unsafe extern "C" fn lucas_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); MotionModule::set_rate(boma, 2.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); MotionModule::set_rate(boma, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 55, 93, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 55, 93, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toel"), 10.0, 45, 115, 0, 30, 5.0, 3.0, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 55, 93, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 55, 93, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toel"), 10.0, 45, 115, 0, 30, 5.0, 3.0, 0.4, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 8.0, 55, 94, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 8.0, 55, 94, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("toel"), 8.0, 55, 93, 0, 36, 4.0, 3.0, 0.4, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 8.0, 55, 94, 0, 36, 3.6, 1.0, 0.8, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 8.0, 55, 94, 0, 36, 3.3, 0.0, 1.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("toel"), 8.0, 55, 93, 0, 36, 4.0, 3.0, 0.4, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucas_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("legl"), 9.2, -2.0, 0.0, 0, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("legl"), 9.2, -2.0, 0.0, 0, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { MotionModule::set_rate(boma, 1.25); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.4); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - //ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.5, 8.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 361, 100, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 361, 110, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 361, 100, 0, 30, 3.5, 8.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - //ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 280, 90, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - //ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 280, 100, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 15.0, 285, 80, 0, 30, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 15.0, 300, 57, 0, 20, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 361, 118, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + //ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 280, 90, 0, 30, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + //ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 280, 100, 0, 40, 4.5, 4.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 15.0, 285, 80, 0, 30, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 15.0, 300, 57, 0, 20, 3.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, (32.0-21.0)/17.0); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucas_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("kneer"), 6.5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("kneer"), 6.5, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8.0, -0.2, 0, 155, 90, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 0.95); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.7, -2.0, 0, 0, 90, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 8.0, -0.2, 0, 155, 90, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 0.95); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.7, -2.0, 0, 0, 90, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("kneer"), 7, 0, 0, 0, 90, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("kneer"), 7, 0, 0, 0, 90, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk_lw"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk_lw"), false, false); } } -unsafe extern "C" fn lucas_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_b_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn lucas_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 10.0, 70, 100, 0, 20, 5.74, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 10.0, 70, 100, 0, 20, 5.74, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucas_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.3, 7.8, -2.0, -55, -128, -62, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 2.4); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1.3, 7.8, -2.0, -55, -128, -62, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 2.4); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1.05, 14.5, 2.0, 0, 0, 0, 1.31, 0, 0, 0, 0, 0, 0, true, 0.7); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 1.05, 14.5, 2.0, 0, 0, 0, 1.31, 0, 0, 0, 0, 0, 0, true, 0.7); } } -unsafe extern "C" fn lucas_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn lucas_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -4.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -4.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 365, 100, 0, 0, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 3.8, 0.0, -3.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 270, 49, 0, 33, 4.2, 0.0, 2.0, 0.3, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 270, 95, 0, 10, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.0, 0.0, -3.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("top"), 5.0, 270, 150, 0, 35, 4.5, 0.0, 2.0, 0.3, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); } } -unsafe extern "C" fn lucas_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, -3, 0.0, 0, 0, 0, 0.81, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0.0, -3, 0.0, 0, 0, 0, 0.81, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.55, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.55, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } wait(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.6, true); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.64, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0.0, -3.0, 0.3, 0, 90, 0, 0.64, true); + LAST_EFFECT_SET_RATE(agent, 1.3); } wait(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l05")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l01")); } wait(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l03")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_attackair_l04")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_attackair_l04")); } } -unsafe extern "C" fn lucas_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_air_lw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 19.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn lucas_attack_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_attack_air_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("shoot"), false, 0.0); } frame(lua_state, 4.0); MotionModule::set_rate(boma, (6.0-4.0)/4.0); frame(lua_state, 5.0); //6 - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - fighter.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + agent.on_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 5.5); //8 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, -1.0, -3.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, -1.0, -3.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } frame(lua_state, 6.0); MotionModule::set_rate(boma, 1.0); // sets rest of move back to normal rate on frame 6 - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, 0.0, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); - fighter.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 70, 70, 0, 30, 4.0, 0.0, 0.0, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); + agent.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - fighter.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + if is_excute(agent) { + agent.off_flag(*FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn lucas_attack_air_catch_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_attack_air_catch_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 3.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attacks"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } -unsafe extern "C" fn lucas_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_landing_air_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("air_catch_landing"), false, -1.0); } frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 9.0);//10 + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 9.0);//10 frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } diff --git a/fighters/lucas/src/acmd/ground.rs b/fighters/lucas/src/acmd/ground.rs index 0d6a284b63..8553a1bce7 100644 --- a/fighters/lucas/src/acmd/ground.rs +++ b/fighters/lucas/src/acmd/ground.rs @@ -1,206 +1,206 @@ use super::*; -unsafe extern "C" fn lucas_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn lucas_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_11_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 5.5, 3.5, -12, -35, 20, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 5.5, 3.5, -12, -35, 20, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, 0.0, 1.0, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, 0.0, 1.0, 0, 0, 0, 0.3, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 2.5, 30, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.5, 66, 100, 25, 0, 3.0, 2.5, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.5, 87, 100, 20, 0, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); // Jab lock hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.5, 361, 20, 0, 20, 2.5, 0.0, 3.0, 5.5, Some(0.0), Some(3.0), Some(11.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucas_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_12_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 5.5, 5.5, 10, -20, 185, 0.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 5.5, 5.5, 10, -20, 185, 0.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, -1.0, 0.0, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneel"), 4.0, -1.0, 0.0, 0, 0, 0, 0.3, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 48, 80, 0, 60, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 3.2, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 5.0, 6.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 48, 80, 0, 60, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 3.2, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 48, 80, 0, 60, 5.0, 6.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_13_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.0, 8.0, -28, -45, 30, 1.0, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 6.0, 8.0, -28, -45, 30, 1.0, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 5.0, -0.75, 0.0, 0, 0, 0, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 5.0, -0.75, 0.0, 0, 0, 0, 0.4, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 83, 68, 0, 70, 5.8, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 83, 68, 0, 60, 4.5, 0.0, 5.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 83, 68, 0, 70, 5.8, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 83, 68, 0, 60, 4.5, 0.0, 5.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 45, 4.8, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 90, 0, 35, 3.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 90, 0, 45, 4.8, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 361, 90, 0, 35, 3.5, 0.0, 5.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn lucas_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_dash_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0.2, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0.2, 0, 0, 0, 0.8, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 5, 11.0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 5, 11.0, 0, 0, 0, 0.65, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } -unsafe extern "C" fn lucas_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucas_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucas_attackdash")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucas_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucas_attackdash")); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_left_m")); } } -unsafe extern "C" fn lucas_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); +unsafe extern "C" fn lucas_attack_dash_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } diff --git a/fighters/lucas/src/acmd/other.rs b/fighters/lucas/src/acmd/other.rs index 4feeec0a33..7224d84c03 100644 --- a/fighters/lucas/src/acmd/other.rs +++ b/fighters/lucas/src/acmd/other.rs @@ -1,290 +1,215 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_lucas_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucas_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_right_l")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucas_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucas_step_left_l")); } } -unsafe extern "C" fn lucas_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn lucas_pkfire_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); +unsafe extern "C" fn lucas_pkfire_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); AttackModule::enable_safe_pos(boma); } } -unsafe extern "C" fn lucas_pkfire_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_pkfire_shoot_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); for i in 1..=50 { - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_bullet_ed"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(fighter, 0.25); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); } wait(lua_state, 8.0); } } -unsafe extern "C" fn lucas_pkfire_pillar_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - //if is_excute(fighter) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - // ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); +unsafe extern "C" fn lucas_pkfire_pillar_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + // ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); //} //wait(lua_state, 10.0); - //if is_excute(fighter) { + //if is_excute(agent) { // AttackModule::clear_all(boma); - // AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); + // AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); //} } -unsafe extern "C" fn lucas_pkfire_pillar_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); - EFFECT(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn lucas_pkfire_pillar_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); + EFFECT(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } /* frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); } */ } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn lucas_pkfire_pillar_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_s")); +unsafe extern "C" fn lucas_pkfire_pillar_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_s")); } } -unsafe extern "C" fn lucas_appeal_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_appeal_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 40.0); - if is_excute(fighter) { - if fighter.is_button_on(Buttons::AppealHi) { - StatusModule::change_status_request_from_script(fighter.module_accessor, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); + if is_excute(agent) { + if agent.is_button_on(Buttons::AppealHi) { + StatusModule::change_status_request_from_script(agent.module_accessor, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); } } } -unsafe extern "C" fn lucas_appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_appeal_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 16.0); - if is_excute(fighter) { - if fighter.is_button_on(Buttons::Guard) && is_training_mode() { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if agent.is_button_on(Buttons::Guard) && is_training_mode() { + let charge_time = ParamModule::get_int(agent.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } } } -unsafe extern "C" fn lucas_pkthunder_game_move(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); +unsafe extern "C" fn lucas_pkthunder_game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } } } -unsafe extern "C" fn lucas_pkthunder_game_move_child(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); +unsafe extern "C" fn lucas_pkthunder_game_move_child(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); AttackModule::set_attack_composition_speed(boma, 1, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } } } @@ -303,10 +228,10 @@ pub fn install() { .install(); smashline::Agent::new("lucas") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("sound_dash", dash_sound) .acmd("game_turndash", lucas_turn_dash_game) .acmd("game_escapeair", escape_air_game) diff --git a/fighters/lucas/src/acmd/smashes.rs b/fighters/lucas/src/acmd/smashes.rs index 032ee5630d..285c12efed 100644 --- a/fighters/lucas/src/acmd/smashes.rs +++ b/fighters/lucas/src/acmd/smashes.rs @@ -1,236 +1,236 @@ use super::*; -unsafe extern "C" fn lucas_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - if is_excute(fighter) { +unsafe extern "C" fn lucas_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_visible").hash as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.stick_y() > 0.3 { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + if agent.stick_y() > 0.3 { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } - else if fighter.stick_y() < -0.3 { - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + else if agent.stick_y() < -0.3 { + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } else { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } frame(lua_state, 10.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_START); } frame(lua_state, 14.0); - if is_excute(fighter) { - //println!("Stick Y Pos: {} | Flags: Low={} High={}", fighter.stick_y(), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 361, 89, 0, 54, 3.7, 0.0, 4.4, 9.8, Some(0.0), Some(6.6), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 20.0, 361, 92, 0, 54, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.4), Some(9.8), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + if is_excute(agent) { + //println!("Stick Y Pos: {} | Flags: Low={} High={}", agent.stick_y(), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 361, 89, 0, 54, 3.7, 0.0, 4.4, 9.8, Some(0.0), Some(6.6), Some(4.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 92, 0, 54, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.4), Some(9.8), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 361, 89, 0, 54, 3.7, 0.0, 9.2, 7.0, Some(0.0), Some(5.6), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 361, 92, 0, 54, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.2), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 361, 89, 0, 54, 3.7, 0.0, 9.2, 7.0, Some(0.0), Some(5.6), Some(2.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 92, 0, 54, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.2), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 19.0, 361, 89, 0, 54, 3.7, 0.0, 5.6, 7.0, Some(0.0), Some(5.6), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 361, 92, 0, 54, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 19.0, 361, 89, 0, 54, 3.7, 0.0, 5.6, 7.0, Some(0.0), Some(5.6), Some(3.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 361, 92, 0, 54, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(7.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_END); } frame(lua_state, 25.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } else { - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_visible").hash as i64); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - if fighter.stick_y() > 0.3 { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + if agent.stick_y() > 0.3 { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } - else if fighter.stick_y() < -0.3 { - VarModule::on_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + else if agent.stick_y() < -0.3 { + VarModule::on_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } else { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_START); } frame(lua_state, 14.0); - if is_excute(fighter) { - //println!("Stick Y Pos: {} | Flags: Low={} High={}", fighter.stick_y(), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 89, 0, 45, 3.7, 0.0, 4.1, 10.5, Some(0.0), Some(6.6), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 361, 92, 0, 45, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.1), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + if is_excute(agent) { + //println!("Stick Y Pos: {} | Flags: Low={} High={}", agent.stick_y(), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN), VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP)); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 89, 0, 45, 3.7, 0.0, 4.1, 10.5, Some(0.0), Some(6.6), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 92, 0, 45, 3.7, 0.0, 2.6, 15.0, Some(0.0), Some(4.1), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 89, 0, 45, 3.7, 0.0, 9.7, 8.0, Some(0.0), Some(5.6), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 92, 0, 45, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.7), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 89, 0, 45, 3.7, 0.0, 9.7, 8.0, Some(0.0), Some(5.6), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 92, 0, 45, 3.7, 0.0, 12.6, 12.0, Some(0.0), Some(9.7), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 361, 89, 0, 45, 3.7, 0.0, 5.6, 8.0, Some(0.0), Some(5.6), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 92, 0, 45, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 361, 89, 0, 45, 3.7, 0.0, 5.6, 8.0, Some(0.0), Some(5.6), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCAS_BAT, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 92, 0, 45, 3.7, 0.0, 5.6, 13.0, Some(0.0), Some(5.6), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_BAT); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_ATTACK_S4_FLAG_REFLECT_END); } frame(lua_state, 25.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); - VarModule::off_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN); + VarModule::off_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP); } } } -unsafe extern "C" fn lucas_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_attack_s4_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 9.0); - if is_excute(fighter){ - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - STOP_SE(fighter, Hash40::new("vc_lucas_008")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_s02")); + if is_excute(agent){ + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + STOP_SE(agent, Hash40::new("vc_lucas_008")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_s02")); } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 4.0); - if is_excute(fighter){ - PLAY_SE(fighter, Hash40::new("vc_lucas_attack04")); + if is_excute(agent){ + PLAY_SE(agent, Hash40::new("vc_lucas_attack04")); } } -unsafe extern "C" fn lucas_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_attack_s4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 8, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 20, -20, 10, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 20, -20, 10, 1, true, *EF_FLIP_YZ); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, -30, -20, 10, 1, true, *EF_FLIP_YZ); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, -30, -20, 10, 1, true, *EF_FLIP_YZ); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 0, -20, 10, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_smash_arc"), Hash40::new("lucas_smash_arc"), Hash40::new("top"), 1, 6, 3.5, 0, -20, 10, 1, true, *EF_FLIP_YZ); } } frame(lua_state, 14.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 3, 15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_DOWN) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 3, 15, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } - else if VarModule::is_flag(fighter.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 13, 13, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + else if VarModule::is_flag(agent.object(), vars::lucas::instance::ATTACK_S4_ANGLE_UP) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 13, 13, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } else { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 6.5, 14, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -2, 6.5, 14, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true, 0.6); } } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn lucas_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //println!("Whiffchk starts"); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); MotionModule::set_rate(boma, 1.751); } frame(lua_state, 8.751); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 24.0, 95, 74, 0, 48, 12.0, 0.0, 25.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 24.0, 95, 74, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("top"), 24.0, 95, 74, 0, 48, 12.0, 0.0, 25.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 24.0, 95, 74, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 43.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); @@ -239,310 +239,310 @@ unsafe extern "C" fn lucas_attack_hi4_game(fighter: &mut L2CAgentBase) { else { frame(lua_state, 5.0); app::sv_animcmd::execute(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.751); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 21.0, 95, 77, 0, 48, 9.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 21.0, 95, 77, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("throw"), 21.0, 95, 77, 0, 48, 9.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 21.0, 95, 77, 0, 48, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 20.0, 95, 77, 0, 42, 8.0, 0.0, -2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 20.0, 95, 77, 0, 42, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 20.0, 95, 77, 0, 42, 8.0, 0.0, -2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 20.0, 95, 77, 0, 42, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 18.0, 95, 77, 0, 37, 7.0, 0.0, 2.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("head"), 18.0, 95, 77, 0, 37, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 18.0, 95, 77, 0, 37, 7.0, 0.0, 2.5, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("head"), 18.0, 95, 77, 0, 37, 5.0, 3.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); AttackModule::clear_all(boma); } } } -unsafe extern "C" fn lucas_attack_hi4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_hi4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("haver"), 0, 0, 0.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("haver"), 0, 0, 0.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); } frame(lua_state, 23.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), true, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_catch"), Hash40::new("lucas_psi_catch"), Hash40::new("top"), 0, 15, -0.5, 0, 0, 0, 1.5, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), true, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_catch"), Hash40::new("lucas_psi_catch"), Hash40::new("top"), 0, 15, -0.5, 0, 0, 0, 1.5, true, *EF_FLIP_YZ); } frame(lua_state, 25.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { let handle = EffectModule::req_follow(boma, Hash40::new("sys_crown"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - EffectModule::set_rgb(fighter.module_accessor, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); + EffectModule::set_rgb(agent.module_accessor, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 26.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT(fighter, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT(agent, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("lucas_psi_atk_hi"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 30.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_catch"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.6, true); - LAST_EFFECT_SET_RATE(fighter, 0.33); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 2.0, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_catch"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.6, true); + LAST_EFFECT_SET_RATE(agent, 0.33); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 1.0, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 25, 0, 0, 0, 0, 2.0, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 15.0, 0, -90, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 15.0, 0, -90, 0, 0, 1.2, true); } } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_bullet_ed"), true, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.0, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("top"), 0, 25, 0, -90, 0, 0, 1.0, true); } } frame(lua_state, 46.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_crown"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_crown"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), true, true); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_hi4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_attack_hi4_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_h01")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_h01")); } frame(lua_state, 7.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_smash_h02")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_smash_h02")); } wait(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucas_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucas_attack05")); } wait(lua_state, 56.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_landing01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_landing01")); } } -unsafe extern "C" fn lucas_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { +unsafe extern "C" fn lucas_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //println!("Whiffchk starts"); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 21.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 21.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } } } else { frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } } -unsafe extern "C" fn lucas_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_attack_lw4_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_04")); - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l04")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + PLAY_SE(agent, Hash40::new("se_lucas_smash_l04")); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_l")); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_l")); } } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucas_attack07")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucas_attack07")); } wait(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_l01")); } } -unsafe extern "C" fn lucas_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("havel"), 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 1.6, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0.5, 0.5, 1.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_hold"), Hash40::new("lucas_psi_hold"), Hash40::new("havel"), 0.5, 0.5, 1.3, 0, 0, 0, 1, true, *EF_FLIP_YZ); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 21.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 2, 2, 2, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 0.7, 2, 2, 2, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_lw4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw4_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, 0 as u32); } frame(lua_state, 20.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 1); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } // LW4PT2 -unsafe extern "C" fn lucas_attack_lw4_pt2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw4_pt2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 361, 80, 0, 50, 8.0, 0.0, 2.0, 9.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); @@ -550,72 +550,72 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_game(fighter: &mut L2CAgentBase) { } else { frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 85, 0, 46, 6.0, 0.0, 3.5, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -10, 0.0, 8, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); AttackModule::set_target_category(boma, 0, *COLLISION_CATEGORY_MASK_NO_IF as u32); } } } -unsafe extern "C" fn lucas_attack_lw4_pt2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_attack_lw4_pt2_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_l03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_l03")); } } -unsafe extern "C" fn lucas_attack_lw4_pt2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw4_pt2_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.25); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.25); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 3.5, 9, 0, 0, 0, 0.5, true); } else { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.5); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_psi_atk_lw"), Hash40::new("lucas_psi_atk_lw"), Hash40::new("top"), 0, 2.0, 9, 0, 0, 0, 0.65, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.5); } } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_lw4_pt2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw4_pt2_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, 0 as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 1, 0.1, 0.2, 3, 0.2, 9, 4, 18, 80); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 1); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } diff --git a/fighters/lucas/src/acmd/specials.rs b/fighters/lucas/src/acmd/specials.rs index 05a2935bce..c6c01f9a99 100644 --- a/fighters/lucas/src/acmd/specials.rs +++ b/fighters/lucas/src/acmd/specials.rs @@ -1,210 +1,210 @@ use super::*; -unsafe extern "C" fn lucas_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(21.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(21.0-1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.1, 0.0)); ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FIRE, false, 0); } } -unsafe extern "C" fn lucas_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 14.0/(21.0-1.0)); +unsafe extern "C" fn lucas_special_air_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 14.0/(21.0-1.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FIRE, false, 0); } } -unsafe extern "C" fn lucas_special_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("havel"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("havel"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn lucas_special_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_s_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucas_smash_h01")); - PLAY_SE(fighter, Hash40::new("se_lucas_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucas_smash_h01")); + PLAY_SE(agent, Hash40::new("se_lucas_special_s03")); let rand = sv_math::rand(hash40("fighter"), 7) as i32; if rand == 0 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack01")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack01")); } else if rand == 1 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack02")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack02")); } else if rand == 2 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack03")); } else if rand == 3 { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_cliffcatch")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_cliffcatch")); } } } -unsafe extern "C" fn lucas_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucas_special_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { GroundModule::select_cliff_hangdata(boma, *FIGHTER_LUCAS_CLIFF_HANG_DATA_SPECIAL_HI as u32); } frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, 3.5, -3.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, -2.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, 3.5, -3.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 367, 130, 50, 0, 8.2, -2.0, 0.0, 0.0, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); JostleModule::set_status(boma, false); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 2.0, 366, 130, 50, 0, 7.0, 0.0, 2.5, 5.5, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 2.0, 363, 130, 50, 0, 5.7, 0.0, 1.0, -2.2, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.0, 366, 130, 50, 0, 7.0, 0.0, 2.5, 5.5, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.0, 363, 130, 50, 0, 5.7, 0.0, 1.0, -2.2, None, None, None, 0.5, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); AttackModule::set_attack_composition_speed(boma, 0, true); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 8.0, 0.0, 2.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 6.5, 0.0, 1.0, -2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_CRITICAL); + ATTACK(agent, 0, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 8.0, 0.0, 2.5, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("rot"), 10.0, 50, 74, 0, 90, 6.5, 0.0, 1.0, -2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_CRITICAL); } frame(lua_state, 28.0); - if is_excute(fighter) { - fighter.on_flag(*FIGHTER_LUCAS_INSTANCE_WORK_ID_FLAG_SPECIAL_HI_NO_LAST_ATTACK); + if is_excute(agent) { + agent.on_flag(*FIGHTER_LUCAS_INSTANCE_WORK_ID_FLAG_SPECIAL_HI_NO_LAST_ATTACK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); - fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); + agent.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE); JostleModule::set_status(boma, true); - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } -unsafe extern "C" fn lucas_special_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkt_attack"), Hash40::new("rot"), 0, 1, 8, 0, 0, 0, 1, true); +unsafe extern "C" fn lucas_special_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkt_attack"), Hash40::new("rot"), 0, 1, 8, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT(fighter, Hash40::new("lucas_pkt_bomb"), Hash40::new("top"), 0, 2.2, 2.9, 0, 0, 0, 0.64, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("lucas_pkt_bomb"), Hash40::new("top"), 0, 2.2, 2.9, 0, 0, 0, 0.64, 0, 0, 0, 0, 0, 0, true); } for _ in 0..15 { - if is_excute(fighter) { - BURN_COLOR(fighter, 0.5, 0.2, 1, 0.9); + if is_excute(agent) { + BURN_COLOR(agent, 0.5, 0.2, 1, 0.9); } wait(lua_state, 1.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.5, 0.2, 1, 0); - BURN_COLOR_NORMAL(fighter); - FLASH(fighter, 0, 0, 0.1, 0.8); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.5, 0.2, 1, 0); + BURN_COLOR_NORMAL(agent); + FLASH(agent, 0, 0, 0.1, 0.8); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 0, 0, 0.1, 0); - COL_NORMAL(fighter); + if is_excute(agent) { + FLASH_FRM(agent, 1, 0, 0, 0.1, 0); + COL_NORMAL(agent); } } frame(lua_state, 31.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_attack"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_attack"), false, false); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.9, true); - BURN_COLOR(fighter, 0.7, 0.2, 1, 0.6); + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.9, true); + BURN_COLOR(agent, 0.7, 0.2, 1, 0.6); } frame(lua_state, 34.0); - if is_excute(fighter) { - BURN_COLOR_FRAME(fighter, 1, 0.7, 0.2, 1, 0); - BURN_COLOR_NORMAL(fighter); + if is_excute(agent) { + BURN_COLOR_FRAME(agent, 1, 0.7, 0.2, 1, 0); + BURN_COLOR_NORMAL(agent); } frame(lua_state, 37.0); - if is_excute(fighter) { - FLASH(fighter, 0.8, 0.7, 1, 0.5); + if is_excute(agent) { + FLASH(agent, 0.8, 0.7, 1, 0.5); } frame(lua_state, 38.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 1, 0.8, 0.7, 1, 0); - COL_NORMAL(fighter); + if is_excute(agent) { + FLASH_FRM(agent, 1, 0.8, 0.7, 1, 0); + COL_NORMAL(agent); } } -unsafe extern "C" fn lucas_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } } -unsafe extern "C" fn lucas_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_air_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if StatusModule::prev_status_kind(boma, 0) == FIGHTER_STATUS_KIND_SPECIAL_S && fighter.get_num_used_jumps() == 1 { - let mag_pull_mult = ParamModule::get_float(fighter.object(), ParamType::Agent, "mag_pull_x_mult"); + if is_excute(agent) { + if StatusModule::prev_status_kind(boma, 0) == FIGHTER_STATUS_KIND_SPECIAL_S && agent.get_num_used_jumps() == 1 { + let mag_pull_mult = ParamModule::get_float(agent.object(), ParamType::Agent, "mag_pull_x_mult"); KineticModule::mul_speed(boma, &Vector3f{x: mag_pull_mult, y: 1.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); } } -unsafe extern "C" fn lucas_special_lw_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1.5, 0, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), -0.3, -4.0, 0.1, 0, 0, 0, 0.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 10, 0, 0, 0, 0.25, false); +unsafe extern "C" fn lucas_special_lw_start_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -1.5, 0, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), -0.3, -4.0, 0.1, 0, 0, 0, 0.5, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 10, 0, 0, 0, 0.25, false); } } -unsafe extern "C" fn lucas_special_lw_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); +unsafe extern "C" fn lucas_special_lw_hold_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 80, 30, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 9.0); for _ in 0..999 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.0, 0.0, 6.3, 3.5, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 0, 0, 0, 4.25, 0.0, 6.3, 7.25, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 9.0); @@ -212,230 +212,230 @@ unsafe extern "C" fn lucas_special_lw_hold_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_lw_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_lw_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 4.5, 0.0, 6.3, 3.75, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 5.0, 0.0, 6.3, 8.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 4.5, 0.0, 6.3, 3.75, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 127, 80, 0, 77, 5.0, 0.0, 6.3, 8.25, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } -unsafe extern "C" fn lucas_special_lw_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_lw_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); - FLASH(fighter, 0.5, 1, 1, 0.4); - EFFECT_DETACH_KIND(fighter, Hash40::new("lucas_psimagnet_end"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("lucas_psimagnet_hit"), -1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_end"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.25, 0, 0, 0, 0.25, true); + FLASH(agent, 0.5, 1, 1, 0.4); + EFFECT_DETACH_KIND(agent, Hash40::new("lucas_psimagnet_end"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("lucas_psimagnet_hit"), -1); } wait(lua_state, 5.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 10, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 10, 0, 1, 1, 0.1); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucas_special_lw_hit_effect (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.5, 0, 0, 0, 0.4, false); - FLASH(fighter, 0.5, 1, 1, 0.4); +unsafe extern "C" fn lucas_special_lw_hit_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_hit"), Hash40::new("trans"), 0, 6.5, 9.5, 0, 0, 0, 0.4, false); + FLASH(agent, 0.5, 1, 1, 0.4); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 4, 0, 1, 1, 0.1); + if is_excute(agent) { + FLASH_FRM(agent, 4, 0, 1, 1, 0.1); } wait(lua_state, 4.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 6, 0, 0, 1, 0); + if is_excute(agent) { + FLASH_FRM(agent, 6, 0, 0, 1, 0); } wait(lua_state, 6.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } // SPECIAL N START // -unsafe extern "C" fn lucas_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_special_n_start_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_n_start_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack06")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack06")); } } // SPECIAL N HOLD // -unsafe extern "C" fn lucas_special_n_hold_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn lucas_special_n_hold_game(agent: &mut L2CAgentBase) { // INTENTIONALLY LEFT BLANK - /* if fighter.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); } */ } -unsafe extern "C" fn lucas_special_n_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_special_n_hold_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(fighter, 0.01, 0.5, 1, 0.4); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); } for i in 1..=50 { - if is_excute(fighter) { + if is_excute(agent) { if i%2==0 { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(fighter, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); } if i%4==0 { - EFFECT_FLW_POS(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); } - FLASH(fighter, 1, 1, 1, 0.6); + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); + if is_excute(agent){ + COL_NORMAL(agent); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter){ - COL_NORMAL(fighter); + if is_excute(agent){ + COL_NORMAL(agent); } wait(lua_state, 1.0); } } -unsafe extern "C" fn lucas_special_n_hold_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_special_n_hold_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(fighter, Hash40::new("se_lucas_pk_charge")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); } } // SPECIAL N FIRE // -unsafe extern "C" fn lucas_special_n_fire_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { +unsafe extern "C" fn lucas_special_n_fire_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } wait(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); } AttackModule::clear_all(boma); } } else { frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkfr_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); } } } -unsafe extern "C" fn lucas_special_n_fire_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_special_n_fire_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(fighter, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(fighter, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } for _ in 1..=5 { - if is_excute(fighter) { - FLASH(fighter, 0.01, 0.5, 1, 0.4); + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 1, 1, 0.6); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); } wait(lua_state, 1.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } wait(lua_state, 3.0) } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_pkt_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); } } -unsafe extern "C" fn lucas_special_n_fire_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn lucas_special_n_fire_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE_REMAIN(fighter, Hash40::new("vc_lucas_attack05")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_electric_hit_m")); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack05")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); } } -unsafe extern "C" fn game_specialhiend(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); +unsafe extern "C" fn game_specialhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } -unsafe extern "C" fn game_fallspecial(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - fighter.select_cliff_hangdata_from_name("special_air_hi_end"); +unsafe extern "C" fn game_fallspecial(agent: &mut L2CAgentBase) { + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_air_hi_end"); } } diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index c9307728e9..c7a4bdabc0 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -1,211 +1,211 @@ use super::*; -unsafe extern "C" fn game_catch(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5 / (9.0 - 8.0)); + FT_MOTION_RATE(agent, 0.5 / (9.0 - 8.0)); frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + GrabModule::set_rebound(agent.module_accessor, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(12.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(12.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 13.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.4, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 2.0 / (18.0 - 14.0)); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 17.0, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 2.0 / (18.0 - 14.0)); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 17.0, Some(0.0), Some(6.3), Some(20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(agent.module_accessor, false); } frame(lua_state, 69.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_catchdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 11.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(agent.module_accessor, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 7.5, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 16.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 20.0, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, 20.0, Some(0.0), Some(6.3), Some(24.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 20.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(agent.module_accessor, false); } frame(lua_state, 79.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_catchturn (fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); +unsafe extern "C" fn game_catchturn (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, /*CanCatchRebound*/ true); + if is_excute(agent) { + GrabModule::set_rebound(agent.module_accessor, /*CanCatchRebound*/ true); } frame(lua_state, 15.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-13.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 16.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -7.5, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 17.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -17.0, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.3, -17.0, Some(0.0), Some(6.3), Some(-20.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } frame(lua_state, 21.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(agent.module_accessor, false); } frame(lua_state, 75.0); - if is_excute(fighter) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + if is_excute(agent) { + ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } -unsafe extern "C" fn game_throwf(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 23.0, 19.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 65, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 19.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 65, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 22.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 6, 11); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 6, 11); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 2); //FighterCutInManager::set_throw_finish_offset(boma, 5, 8, 0); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwb(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 75, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 75, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 13, 3); + CHECK_FINISH_CAMERA(agent, 13, 3); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 8, 3, 0); } frame(lua_state, 20.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 103, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 90, 103, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 16); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 16); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 0, 8, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn game_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 100, 55, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 100, 55, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 40.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); - CHECK_FINISH_CAMERA(fighter, 9.0, 0.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); + CHECK_FINISH_CAMERA(agent, 9.0, 0.0); } frame(lua_state, 41.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } -unsafe extern "C" fn expression_throwlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 10, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } diff --git a/fighters/lucas/src/acmd/tilts.rs b/fighters/lucas/src/acmd/tilts.rs index a549377fe4..b7492cf84f 100644 --- a/fighters/lucas/src/acmd/tilts.rs +++ b/fighters/lucas/src/acmd/tilts.rs @@ -1,165 +1,165 @@ use super::*; -unsafe extern "C" fn lucas_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_s3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 4.23, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 7.67, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 100, 0, 20, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 4.23, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 361, 100, 0, 20, 3.28, 7.67, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.5, 3.0); } } -unsafe extern "C" fn lucas_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_s3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("haver"), -0.2, 0, 0, 0, 0, 0, 0.8, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucas_psi_atk"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_hold"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_hold"), false, false); } } -unsafe extern "C" fn lucas_attack_s3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn lucas_attack_s3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn lucas_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 10.0, 95, 85, 0, 60, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 10.0, 95, 85, 0, 60, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 85, 100, 0, 50, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 7.0, 85, 110, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 85, 110, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 85, 100, 0, 50, 4.0, 4.5, 1.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn lucas_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_hi3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13.5, 2.0, 0, 45, 90, 0.85, true); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - LAST_EFFECT_SET_RATE(fighter, 1.0); - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 4.5, 0.2, 0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 13.5, 2.0, 0, 45, 90, 0.85, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 4.5, 0.2, 0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn lucas_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 4.0); +unsafe extern "C" fn lucas_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 4.0); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 6.0, 84, 75, 0, 50, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.1, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 361, 80, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 6.0, 84, 75, 0, 50, 4.0, 6.0, 0.0, -1.0, None, None, None, 1.1, 1.2, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucas_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucas_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 2.0, 5.0, 0, 20, 0, 0.85, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - LAST_EFFECT_SET_COLOR(fighter, 1.0, 0.8, 0.1); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 2.0, 5.0, 0, 20, 0, 0.85, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.8, 0.1); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); if PostureModule::lr(boma) > 0.0{ - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, -0.7, 0, 0, 0, 0.3, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, -0.7, 0, 0, 0, 0.3, false); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, 0.7, 0, 0, 0, 0.3, false); + EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 3.8, -1.0, 0.7, 0, 0, 0, 0.3, false); } - //EFFECT_FOLLOW(fighter, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.0, 0.0, -1.0, 0, 0, 0, 0.35, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_atk"), Hash40::new("kneer"), 6.0, 0.0, -1.0, 0, 0, 0, 0.35, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucas_psi_atk"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } } diff --git a/fighters/lucina/src/acmd/aerials.rs b/fighters/lucina/src/acmd/aerials.rs index ae13c51ae6..bd4cd38a11 100644 --- a/fighters/lucina/src/acmd/aerials.rs +++ b/fighters/lucina/src/acmd/aerials.rs @@ -1,271 +1,271 @@ use super::*; -unsafe extern "C" fn lucina_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 365, 100, 40, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 1.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 365, 100, 40, 0, 3.5, 0.0, 0.0, 7.2, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 361, 100, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 7.0, 361, 100, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_n_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.4, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_light"), Hash40::new("sword1"), 0, 0, 11, 0, 0, 0, 0.4, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.4, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_light"), Hash40::new("sword1"), 0, 0, 11, 0, 0, 0, 0.4, true); } frame(lua_state, 30.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 35.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_light"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_light"), false, true); } } -unsafe extern "C" fn lucina_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_n_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_swing_s")); } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_swing_s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_swing_s")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucina_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucina_attackl_s01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucina_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucina_attackl_s01")); } } -unsafe extern "C" fn lucina_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_attack_air_n_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 24.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn lucina_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 1.0); - FT_DESIRED_RATE(fighter, (7.0-1.0), 5.0); + FT_DESIRED_RATE(agent, (7.0-1.0), 5.0); frame(lua_state, 7.0); - FT_DESIRED_RATE(fighter, (15.0-7.0), 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 55, 80, 0, 46, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 46, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, (15.0-7.0), 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 55, 80, 0, 46, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 55, 80, 0, 46, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 55, 80, 0, 46, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - FT_DESIRED_RATE(fighter, (27.0-24.0),8.0); + FT_DESIRED_RATE(agent, (27.0-24.0),8.0); frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.3, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_lucina_sword1"), Hash40::new("tex_lucina_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.3, true, Hash40::new("lucina_sword"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); } frame(lua_state, 11.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } } -unsafe extern "C" fn lucina_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_attack_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn lucina_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_DESIRED_RATE(fighter, (8.0-3.0), 4.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (8.0-3.0), 4.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 105, 0, 43, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.0, 361, 105, 0, 43, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 13.0, 361, 105, 0, 43, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 105, 0, 43, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 13.0, 361, 105, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - FT_DESIRED_RATE(fighter, (23.0-15.0), 16.0); + FT_DESIRED_RATE(agent, (23.0-15.0), 16.0); frame(lua_state, 23.0); - FT_DESIRED_RATE(fighter, (36.0 - 23.0), 10.0); + FT_DESIRED_RATE(agent, (36.0 - 23.0), 10.0); frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 6.0/(13.0-5.0)); + FT_MOTION_RATE(agent, 6.0/(13.0-5.0)); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 85, 87, 0, 43, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 85, 87, 0, 43, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_DESIRED_RATE(fighter, (18.0-10.0), 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_DESIRED_RATE(agent, (18.0-10.0), 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 80, 65, 0, 30, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 270, 45, 0, 26, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 29.0/(56.0-19.0)); + FT_MOTION_RATE(agent, 29.0/(56.0-19.0)); frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn lucina_attack_air_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_air_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_lucina_rnd_attack")); - PLAY_SE(fighter, Hash40::new("se_lucina_attackair_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_lucina_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_lucina_attackair_l01")); } } diff --git a/fighters/lucina/src/acmd/ground.rs b/fighters/lucina/src/acmd/ground.rs index 76e09b802d..94ff62b9ba 100644 --- a/fighters/lucina/src/acmd/ground.rs +++ b/fighters/lucina/src/acmd/ground.rs @@ -1,95 +1,95 @@ use super::*; -unsafe extern "C" fn lucina_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 3.0, 78, 20, 0, 57, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 3.0, 88, 20, 0, 57, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 65, 20, 0, 57, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 78, 20, 0, 57, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 88, 20, 0, 57, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn lucina_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_attack_11_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn lucina_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 45, 75, 0, 62, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 5.0, 45, 75, 0, 62, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_attack_12_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("haver"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn lucina_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 45, 70, 0, 75, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 45, 70, 0, 75, 3.5, 1.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 7.2, Some(12.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 2.0, Some(8.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 45, 67, 0, 75, 3.5, 1.0, 0.0, 7.2, Some(12.0), Some(1.5), Some(-2.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/lucina/src/acmd/other.rs b/fighters/lucina/src/acmd/other.rs index 69ae7e5e3c..5d8a0a5100 100644 --- a/fighters/lucina/src/acmd/other.rs +++ b/fighters/lucina/src/acmd/other.rs @@ -1,199 +1,124 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_lucina_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucina_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_lucina_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_lucina_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_step_left_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_step_left_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } pub fn install() { smashline::Agent::new("lucina") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/lucina/src/acmd/smashes.rs b/fighters/lucina/src/acmd/smashes.rs index 28aa2d716d..3623f6685e 100644 --- a/fighters/lucina/src/acmd/smashes.rs +++ b/fighters/lucina/src/acmd/smashes.rs @@ -1,77 +1,77 @@ use super::*; -unsafe extern "C" fn lucina_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 5.0 / (9.75 - 4.0)); + FT_MOTION_RATE(agent, 5.0 / (9.75 - 4.0)); frame(lua_state, 9.75); - FT_MOTION_RATE(fighter, 1.0 / (10.25 - 9.75)); + FT_MOTION_RATE(agent, 1.0 / (10.25 - 9.75)); frame(lua_state, 10.25); - FT_MOTION_RATE(fighter, 1.0 / (11.0 - 10.25)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("bust"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0 / (11.0 - 10.25)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("bust"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 361, 83, 0, 65, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 15.0, 361, 83, 0, 65, 3.5, 0.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 13.0); - FT_DESIRED_RATE(fighter, (26.0 - 13.0), 22.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, (26.0 - 13.0), 22.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); // f36 ingame - FT_DESIRED_RATE(fighter, (49.0 - 26.0), 13.0); + FT_DESIRED_RATE(agent, (49.0 - 26.0), 13.0); } -unsafe extern "C" fn lucina_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.499); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.499); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.5, 361, 92, 0, 55, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.5, 361, 92, 0, 55, 3.5, 1.0, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1.499); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 0.5, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.499); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 92, 0, 45, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 1.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 14.0, 361, 92, 0, 45, 3.5, 0.5, 0.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - FT_DESIRED_RATE(fighter, (70.0 - 43.0), 23.0); + FT_DESIRED_RATE(agent, (70.0 - 43.0), 23.0); } pub fn install() { diff --git a/fighters/lucina/src/acmd/specials.rs b/fighters/lucina/src/acmd/specials.rs index b47baa3485..e52b1613ff 100644 --- a/fighters/lucina/src/acmd/specials.rs +++ b/fighters/lucina/src/acmd/specials.rs @@ -1,1624 +1,1624 @@ use super::*; -unsafe extern "C" fn lucina_special_n_end_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_n_end_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_n_end_max_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_max_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_n_end_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_max_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_n_end_max_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_n_end_max_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_max_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_n_end_max_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn lucina_special_air_n_end_max_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(fighter, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(30.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(30.0-13.0)); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s1_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 15.0/(30.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 15.0/(30.0-13.0)); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s1_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s2_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); } } -unsafe extern "C" fn lucina_special_air_s2_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s2_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s2_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); } } -unsafe extern "C" fn lucina_special_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s2_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s2_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); } } -unsafe extern "C" fn lucina_special_air_s2_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 20.0/(38.0-9.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s2_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s2_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s2_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s02l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); } } -unsafe extern "C" fn lucina_special_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 27.0/(43.0-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s3_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); } } -unsafe extern "C" fn lucina_special_air_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 27.0/(43.0-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s3_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03h")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); } } -unsafe extern "C" fn lucina_special_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(43.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s3_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_s_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); } } -unsafe extern "C" fn lucina_special_air_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 7.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 25.0/(43.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s3_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_s_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03s")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); } } -unsafe extern "C" fn lucina_special_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(43.0-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s3_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s3_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); } } -unsafe extern "C" fn lucina_special_air_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(43.0-8.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_air_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s3_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s3_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_lucina_special_s03l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); } frame(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_lucina_attack02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); } } -unsafe extern "C" fn lucina_special_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(44.0-11.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 24.0/(44.0-11.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.24, 1, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_blue"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0/(55.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 35.0/(55.0-10.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0, 0.05, 0.7); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_red"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 7.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 42.0/(74.0-22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_s4_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_air_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); frame(lua_state, 7.0); for _ in 0..4 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 42.0/(74.0-22.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_special_air_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_s4_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FLASH(fighter, 0, 0.93, 0.03, 0.7); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 2); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); } frame(lua_state, 19.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(fighter, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + COL_NORMAL(agent); } } -unsafe extern "C" fn lucina_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } } -unsafe extern "C" fn lucina_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { } + if is_excute(agent) { } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 74, 74, 0, 70, 4.0, 0.0, 8.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 11.0, 361, 94, 0, 70, 4.0, 0.0, 5.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 4, false); - ATTACK(fighter, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 5.0, 0.0, 0.0, 4.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, -1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } } -unsafe extern "C" fn lucina_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_hit_stop_mul(fighter.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(fighter.module_accessor, 0.5); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + HitModule::set_hit_stop_mul(agent.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(agent.module_accessor, 0.5); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); } frame(lua_state, 15.0); - if is_excute(fighter) { - DamageModule::set_damage_mul(fighter.module_accessor, 1.0); - HitModule::set_hit_stop_mul(fighter.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::on_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); + if is_excute(agent) { + DamageModule::set_damage_mul(agent.module_accessor, 1.0); + HitModule::set_hit_stop_mul(agent.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(64.0-28.0)); - VarModule::off_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(64.0-28.0)); + VarModule::off_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) } } -unsafe extern "C" fn lucina_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_special_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HitModule::set_hit_stop_mul(fighter.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(fighter.module_accessor, 0.5); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); + if is_excute(agent) { + HitModule::set_hit_stop_mul(agent.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(agent.module_accessor, 0.5); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); } frame(lua_state, 15.0); - if is_excute(fighter) { - DamageModule::set_damage_mul(fighter.module_accessor, 1.0); - HitModule::set_hit_stop_mul(fighter.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - damage!(fighter, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::on_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + if is_excute(agent) { + DamageModule::set_damage_mul(agent.module_accessor, 1.0); + HitModule::set_hit_stop_mul(agent.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) } frame(lua_state, 28.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) } } diff --git a/fighters/lucina/src/acmd/throws.rs b/fighters/lucina/src/acmd/throws.rs index ac922aabce..077814e04c 100644 --- a/fighters/lucina/src/acmd/throws.rs +++ b/fighters/lucina/src/acmd/throws.rs @@ -1,24 +1,24 @@ use super::*; -unsafe extern "C" fn lucina_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(12.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } diff --git a/fighters/lucina/src/acmd/tilts.rs b/fighters/lucina/src/acmd/tilts.rs index 73f6f2b845..ef13e4b0ce 100644 --- a/fighters/lucina/src/acmd/tilts.rs +++ b/fighters/lucina/src/acmd/tilts.rs @@ -1,59 +1,59 @@ use super::*; -unsafe extern "C" fn lucina_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 11.0, 40, 88, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 88, 0, 42, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 105, 83, 0, 69, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 105, 83, 0, 69, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("claviclel"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 80, 85, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 80, 85, 0, 55, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn lucina_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn lucina_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 47, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 30, 40, 0, 47, 3.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 30, 40, 0, 47, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/mario/src/acmd/aerials.rs b/fighters/mario/src/acmd/aerials.rs index fcefa4245d..0ea81e68e5 100644 --- a/fighters/mario/src/acmd/aerials.rs +++ b/fighters/mario/src/acmd/aerials.rs @@ -225,19 +225,19 @@ unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairlw(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackss"), 5); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackss"), 5); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/mario/src/acmd/throws.rs b/fighters/mario/src/acmd/throws.rs index a3d3bd6686..857706d76f 100644 --- a/fighters/mario/src/acmd/throws.rs +++ b/fighters/mario/src/acmd/throws.rs @@ -45,21 +45,21 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn game_catchturn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(-13.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } diff --git a/fighters/mario/src/pumpwater/acmd.rs b/fighters/mario/src/pumpwater/acmd.rs index 024ccab3da..7963891209 100644 --- a/fighters/mario/src/pumpwater/acmd.rs +++ b/fighters/mario/src/pumpwater/acmd.rs @@ -1,22 +1,22 @@ use super::*; -unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sound_regular(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_regular(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_hit(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_hit(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn effect_clash(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn effect_clash(agent: &mut L2CAgentBase) { } diff --git a/fighters/master/src/acmd/aerials.rs b/fighters/master/src/acmd/aerials.rs index 255bfb131c..2458018d17 100644 --- a/fighters/master/src/acmd/aerials.rs +++ b/fighters/master/src/acmd/aerials.rs @@ -1,276 +1,276 @@ use super::*; -unsafe extern "C" fn master_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("attack_air_n"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 16.0/(27.0-6.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 1.0/motion_rate); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 2.5, 94, 100, 45, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 2.5, 120, 100, 45, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.5, 80, 100, 45, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 2.5, 94, 100, 45, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 2.5, 120, 100, 45, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.5, 80, 100, 45, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("top"), 2.5, 365, 100, 40, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 3.5, -4.0, 1.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 2.5, 366, 100, 40, 0, 4.5, -5.0, -3.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("top"), 2.5, 365, 100, 40, 0, 3.5, 0.0, 9.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 6, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 27.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 0.5); AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 10.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 1.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 96, 0, 54, 10.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_landing_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_landing_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW){ ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("landnig_air_n"), false, 0.0); } } } -unsafe extern "C" fn master_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(11.5-6.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(11.5-6.0)); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 11.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(12.0-11.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 72, 0, 49, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - //ATK_SET_SHIELD_SETOFF_MUL_arg5(fighter, 0, 1, 2, 3, 0.4); - //ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 4, 5, 6, 0.4); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(12.0-11.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 7.0, 361, 72, 0, 49, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 7.0, 361, 72, 0, 49, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 13.0, 361, 72, 0, 49, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + //ATK_SET_SHIELD_SETOFF_MUL_arg5(agent, 0, 1, 2, 3, 0.4); + //ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 4, 5, 6, 0.4); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn master_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 0.4); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 4.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 9.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 361, 55, 0, 81, 3.0, -0.5, 13.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 19.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 38, 73, 0, 55, 4.0, -0.5, 25.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 0.4); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 9.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 12.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 15.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 19.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 9.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 12.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 6.0, 361, 66, 0, 52, 2.0, -0.5, 15.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 19.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 9.0, 361, 68, 0, 51, 3.0, -0.5, 25.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("attack_air_hi"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 1.0, 4.0, 5.0, 5.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); let motion_rate = 10.0/(24.0-10.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 85, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, -6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 85, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 4.7, 0.0, 21.5, 0.0, Some(0.0), Some(15.5), Some(0.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, -6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 366, 100, 45, 0, 5.0, 0.0, 28.5, 6.8, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 4, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.0, 0.0, 21.5, 0.0, Some(0.0), Some(18.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.0, 0.0, 21.5, 0.0, Some(0.0), Some(18.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, -6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("top"), 7.5, 79, 120, 0, 53, 5.5, 0.0, 28.5, 6.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 24.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 48.0, 28.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 48.0, 28.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 48.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 73.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn master_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if PostureModule::lr(boma) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("master_atk_air_hi_l"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); + EFFECT_FOLLOW(agent, Hash40::new("master_atk_air_hi_l"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_atk_air_hi_r"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); + EFFECT_FOLLOW(agent, Hash40::new("master_atk_air_hi_r"), Hash40::new("top"), 0, 30, 0.5, 0, 0, 0, 0.86, true); } - LAST_EFFECT_SET_RATE(fighter, 1.37); + LAST_EFFECT_SET_RATE(agent, 1.37); } } -unsafe extern "C" fn master_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, smash::phx::Hash40::new("attack_air_lw"), false, 0.0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 270, 48, 0, 26, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 15.0, 58, 76, 0, 87, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 270, 48, 0, 26, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Ground-only - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 19.0, 270, 78, 0, 97, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 15.0, 72, 70, 0, 97, 4.0, 0.0, 7.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 19.0, 270, 78, 0, 97, 5.0, 0.0, 15.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } diff --git a/fighters/master/src/acmd/ground.rs b/fighters/master/src/acmd/ground.rs index 0377e4ee49..1131bc0a40 100644 --- a/fighters/master/src/acmd/ground.rs +++ b/fighters/master/src/acmd/ground.rs @@ -1,130 +1,130 @@ use super::*; -unsafe extern "C" fn master_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.5, 3.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 30, 0, 2.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 30, 0, 3.5, 3.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn master_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.0, 75, 18, 0, 31, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 4.0, 4.0, 0.0, 0.0, Some(4.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.0, 75, 18, 0, 31, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.0, 75, 18, 0, 31, 4.0, 4.0, 0.0, 0.0, Some(4.0), Some(1.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Locking hitbox - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 16, 0, 31, 3.5, 0.0, 5.0, 5.5, Some(0.0), Some(5.0), Some(10.5), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn master_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 120, 0, 40, 4.0, 0.0, 8.5, 11.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn master_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); +unsafe extern "C" fn master_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 7.0/(8.6-1.0)); + FT_MOTION_RATE(agent, 7.0/(8.6-1.0)); frame(lua_state, 8.6); - FT_MOTION_RATE(fighter, 4.0/(12.0-8.6)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.5, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.7, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 40, 4.2, 12.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 4.0/(12.0-8.6)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 65, 60, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.5, -0.6, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 361, 60, 0, 70, 3.7, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 13.0, 361, 95, 0, 40, 4.2, 12.3, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_SWORD); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); } } -unsafe extern "C" fn master_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_dash_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 4, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 4, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 8.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } } diff --git a/fighters/master/src/acmd/other.rs b/fighters/master/src/acmd/other.rs index 604f14f7d3..23068e2282 100644 --- a/fighters/master/src/acmd/other.rs +++ b/fighters/master/src/acmd/other.rs @@ -1,323 +1,248 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 11.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_master_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_master_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.3); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.3); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn master_arrow1_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn master_arrow1_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); AttackModule::enable_safe_pos(boma); } } -unsafe extern "C" fn master_arrow2_search_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn master_arrow2_search_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); AttackModule::disable_tip(boma); } } -unsafe extern "C" fn master_axe_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_axe_special_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); } if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn master_axe_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_axe_special_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); frame(lua_state, 61.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); } if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } else { // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn master_axe_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_axe_special_lw_hit_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_edge"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_edge"), -1); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axeflare_sp3"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp3"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_aura"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_aura"), false, true); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } @@ -329,10 +254,10 @@ pub fn install() { .install(); smashline::Agent::new("master") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/master/src/acmd/smashes.rs b/fighters/master/src/acmd/smashes.rs index 3b3057b3d8..916fcd9e29 100644 --- a/fighters/master/src/acmd/smashes.rs +++ b/fighters/master/src/acmd/smashes.rs @@ -1,741 +1,741 @@ use super::*; -unsafe extern "C" fn master_attack_s4_charge_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); +unsafe extern "C" fn master_attack_s4_charge_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.3); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.3); EffectModule::enable_sync_init_pos_last(boma); } } frame(lua_state, 5.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 24, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 24, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); } } -unsafe extern "C" fn master_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_attack_s4_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } frame(lua_state, 24.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_attack_s4_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } frame(lua_state, 24.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, false, 0); - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 3.5); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 3.5); } else{ - FT_MOTION_RATE(fighter, 0.800); + FT_MOTION_RATE(agent, 0.800); } } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 24.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 1 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Ground-only - ATTACK(fighter, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 4.0, 270, 100, 10, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Air-only - ATTACK(fighter, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 3.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 4.0, 367, 100, 50, 0, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } // Normal fsmash else{ - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 90, 0, 45, 4.5, 0.0, 5.5, 6.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 90, 0, 45, 2.0, 0.0, 3.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 3.0, -0.5, 16.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 19.0, 36, 90, 0, 30, 2.5, -0.5, 24.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("shoulderr"), 11.0, 36, 90, 0, 50, 2.5, -0.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } } frame(lua_state, 26.0); for _ in 0..4{ - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // Ground-only - ATTACK(fighter, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 4, 1, Hash40::new("top"), 0.0, 365, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // Air-only - ATTACK(fighter, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 5, 1, Hash40::new("top"), 0.0, 367, 100, 10, 0, 15.0, 0.0, 10.0, 30.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, true, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } } wait(lua_state, 1.0); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0/(46.0-30.0)); + FT_MOTION_RATE(agent, 2.0/(46.0-30.0)); } } } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 0.5); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.5); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - ATTACK(fighter, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.0, -0.5, 14.5, 0.0, Some(-0.5), Some(23.0), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 1, Hash40::new("haver"), 15.0, 20, 100, 60, 0, 10.5, -0.5, 35.0, -0.3, Some(-0.5), Some(26.5), Some(-0.3), 0.25, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); AttackModule::set_add_reaction_frame(boma, 0, 15.0, false); AttackModule::set_add_reaction_frame(boma, 1, 15.0, false); } } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { // Reel-in hit 2 - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_attack_s4_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if PostureModule::lr(boma) > 0.0{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -20, 18, 13.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else{ - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -8, 17, 13.25, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 22.0, 0.0, 0, 0, 0, 1.0, true); EffectModule::enable_sync_init_pos_last(boma); } } frame(lua_state, 24.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_ALPHA(fighter, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); - LAST_EFFECT_SET_RATE(fighter, 0.9); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 1, 34, 16, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); + LAST_EFFECT_SET_RATE(agent, 0.9); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 1, 34, 16, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_speedline"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_line"), Hash40::new("haver"), 0, 26, 0, -90, 0, 0, 0.7, true); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); + EFFECT_FOLLOW(agent, Hash40::new("master_smash_s_flash"), Hash40::new("haver"), 0, 28, -1.25, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_line"), -1); - EFFECT_DETACH_KIND(fighter, Hash40::new("master_smash_s_speedline"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_line"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("master_smash_s_speedline"), -1); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_line"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_smash_s_wind"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_line"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_smash_s_wind"), false, true); } frame(lua_state, 40.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if !AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); } } } frame(lua_state, 45.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 10, 24, 0.0, 0, 0, 1.0, true); } } } } -unsafe extern "C" fn master_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_s4_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.0); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } app::sv_animcmd::execute(lua_state, 14.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new_raw(0x1782d1b9f2), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { - fighter.clear_lua_stack(); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 0); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 1); - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 2); - RUMBLE_HIT(fighter, Hash40::new("rbkind_piercel"), 3); - RUMBLE_HIT(fighter, Hash40::new("rbkind_pierces"), 4); + if is_excute(agent) { + agent.clear_lua_stack(); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 1); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 2); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 4); } frame(lua_state, 44.0); frame(lua_state, 46.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } } frame(lua_state, 85.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_REQ_EFFECT_AURA); } } -unsafe extern "C" fn master_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, Hash40::new("attack_lw4"), false, -1.0); } frame(lua_state, 3.0); app::sv_animcmd::execute(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { let frame = WorkModule::get_float(boma, *FIGHTER_STATUS_ATTACK_WORK_FLOAT_SMASH_RESTART_FRAME); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, Hash40::new("attack_lw4"), true, 3.0); } } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 63, 66, 0, 74, 3.7, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 23.0, 63, 66, 0, 74, 4.8, 0.0, 13.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE,app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } diff --git a/fighters/master/src/acmd/specials.rs b/fighters/master/src/acmd/specials.rs index bb8642a16a..6fdf685396 100644 --- a/fighters/master/src/acmd/specials.rs +++ b/fighters/master/src/acmd/specials.rs @@ -1,11 +1,11 @@ use super::*; -unsafe extern "C" fn master_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); +unsafe extern "C" fn master_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -15,28 +15,28 @@ unsafe extern "C" fn master_special_n_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_ENABLE_TURN); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_CAN_SHOOT); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } } -unsafe extern "C" fn master_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.500); +unsafe extern "C" fn master_special_air_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.500); if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -46,242 +46,242 @@ unsafe extern "C" fn master_special_air_n_start_game(fighter: &mut L2CAgentBase) } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_ENABLE_TURN); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_CAN_SHOOT); } frame(lua_state, 46.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.75); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.75); } } -unsafe extern "C" fn master_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_special_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::shoot_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_special_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::shoot_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_s_front_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_s_front_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_F_REQUEST); - FT_MOTION_RATE(fighter, 3.0/(8.0-2.0)); + FT_MOTION_RATE(agent, 3.0/(8.0-2.0)); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 11.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.0, Some(0.0), Some(10.0), Some(9.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 8.5, 45, 35, 0, 85, 5.0, 0.0, 5.0, 9.5, Some(0.0), Some(10.0), Some(9.5), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Trail hitboxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 27.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(10.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(11.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(14.0), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 8.5, 67, 40, 0, 75, 3.0, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 11.0, 100, 40, 0, 100, 3.5, 0.0, 27.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(10.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(11.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(14.0), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - //ATTACK(fighter, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(21.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(18.5), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + //ATTACK(agent, 4, 0, Hash40::new("top"), 8.5, 70, 40, 0, 65, 5.0, 0.0, 5.0, 11.0, Some(0.0), Some(14.0), Some(11.0), 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 5, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 5.5, 0.0, 6.0, 22.0, Some(0.0), Some(21.0), Some(22.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 6, 0, Hash40::new("top"), 11.0, 70, 40, 0, 75, 2.0, 0.0, 8.5, 28.0, Some(0.0), Some(18.5), Some(28.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); } else{ - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_s_front_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_aura"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn master_special_s_front_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_aura"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_spear_aura"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("master_spear_scrape_ground"), Hash40::new("top"), -8, 0, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("master_spear_scrape"), Hash40::new("top"), -16, 0, 4, 0, 18, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("master_spear_scrape_ground"), Hash40::new("top"), -8, 0, 13, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("master_spear_scrape"), Hash40::new("top"), -16, 0, 4, 0, 18, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_slash"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.95, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_spear_slash"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.95, true); EffectModule::set_disable_render_offset_last(boma); - EFFECT_FOLLOW(fighter, Hash40::new("master_spear_slash_particle_end"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("master_spear_slash_particle_end"), Hash40::new("top"), 2, 15, 8, 8, -5, 68, 0.75, true); EffectModule::set_disable_render_offset_last(boma); EffectModule::enable_sync_init_pos_last(boma); - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("master_spear_slash_particle"), Hash40::new("top"), 2, 14, 8, 8, -5, 68, 0.65, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_spear_slash_particle"), Hash40::new("top"), 2, 14, 8, 8, -5, 68, 0.65, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("master_spear_aura_particle"), Hash40::new("haver"), -8, 6, 0, 0, 0, 0, 0.8, true); EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_scrape"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_scrape"), false, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_spear_slash_particle"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_spear_slash_particle"), false, true); } } -unsafe extern "C" fn master_special_s_front_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_s_front_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_UP_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_DOWN_REQUEST); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 8.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.0, 0.0, 13.5, -2.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 19.5, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 17.0, 45, 35, 0, 85, 3.5, 0.0, 25.0, -2.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // Spear hitboxes - ATTACK(fighter, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -1.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 25.0, -1.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // Trail hitoxes - ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 6, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 7, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 26.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 8.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("haver"), 11.5, 45, 35, 0, 85, 3.5, 0.0, 13.5, -5.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 6, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 19.5, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 7, 0, Hash40::new("haver"), 17.0, 59, 48, 0, 115, 4.5, 0.0, 26.0, -6.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_s_front_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_s_front_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 10.0, 5.0, 5.0, 9.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_F_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 5.0, 5.0, 5.0); - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED){ + if !VarModule::is_flag(agent.battle_object, vars::common::instance::SPECIAL_STALL_USED){ let stick_y = ControlModule::get_stick_y(boma); - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + VarModule::on_flag(agent.battle_object, vars::common::instance::SPECIAL_STALL_USED); if stick_y > 0.0{ KineticModule::add_speed(boma, &Vector3f::new(0.0, 1.25 * stick_y, 0.0)); } @@ -289,832 +289,832 @@ unsafe extern "C" fn master_special_air_s_front_game(fighter: &mut L2CAgentBase) } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 19.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 25.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 65, 35, 0, 75, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 19.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 85, 59, 0, 75, 4.5, 0.0, 25.5, -2.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 26.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn master_special_air_s_front_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_s_front_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - SET_SPEED_EX(fighter, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + SET_SPEED_EX(agent, 0.0, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 10.0, 5.0, 5.0, 9.0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_UP_REQUEST); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_DOWN_REQUEST); FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 5.0, 5.0, 5.0); } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - ATTACK(fighter, 0, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 19.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 25.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 7.0, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.5, 45, 35, 0, 85, 4.5, 0.0, 11.5, -2.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 19.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("haver"), 15.0, 55, 62, 0, 86, 5.0, 0.0, 25.5, -2.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CHANGE_ATK_END_REQUEST); } frame(lua_state, 26.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_SPEED_CONTROL_REQUEST); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn master_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 10.0, 4.5); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 10.0, 4.5); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, Hash40::new("special_hi"), false, 0.0); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TURN_CHECK); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 368, 100, 30, 0, 5.3, 0.0, 8.0, 6.9, None, None, None, 1.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 368, 100, 30, 0, 5.3, 0.0, 8.0, 6.9, None, None, None, 1.2, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 17.0, y: 42.0}, 5, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 17.0, y: 42.0}, 5, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_ENABLE_CATCH); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.3); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.3); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.0, 6.0); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, Hash40::new("special_air_hi_start"), false, -1.0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TURN_CHECK); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 15.0); - if is_excute(fighter) { - SEARCH(fighter, 0, 0, Hash40::new("top"), 1.7, 0.0, 30.0, 9.0, Some(0.0), Some(46.0), Some(16.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY, false); + if is_excute(agent) { + SEARCH(agent, 0, 0, Hash40::new("top"), 1.7, 0.0, 30.0, 9.0, Some(0.0), Some(46.0), Some(16.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY, false); GroundModule::select_cliff_hangdata(boma, *FIGHTER_MASTER_CLIFF_HANG_DATA_AIR_LASSO as u32); WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_HANG_IMMIDIATE); } frame(lua_state, 16.0); - if is_excute(fighter) { - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_EXTEND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 5.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 16.0, y: 40.0}, 4, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); AttackModule::set_no_dead_all(boma, true, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 0.01, 368, 100, 30, 0, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 0.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 2, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &Vector2f{x: 16.0, y: 41.0}, 2, false); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 4.5, 2.0, -1.0, -1.0, Some(2.0), Some(-1.0), Some(-1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } else { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_ENABLE_CATCH); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 3.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 2.0, 0.0, 2.0, 0.75, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 3.0, 75, 100, 0, 40, 3.5, 0.0, 9.5, 2.5, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_STAGE_GIMMICK, *COLLISION_PART_MASK_BODY, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("throw"), 10.0, 75, 100, 0, 40, 2.0, 0.0, 10.0, 3.0, Some(0.0), Some(-4.0), Some(-1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_no_dead_all(boma, true, false); AttackModule::set_no_finish_camera_ex(boma, 0, true, false); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, *WEAPON_MASTER_SWORD_STATUS_KIND_BACK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_hi_overtake_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); +unsafe extern "C" fn master_special_air_hi_overtake_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); /* if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); } */ - VarModule::on_flag(fighter.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + VarModule::on_flag(agent.battle_object, vars::master::instance::SPECIAL_AIR_HI_CATCH); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("special_air_hi_overtake"), false, 0.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ // Hold input throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 2, 10.0, 260, 100, 0, 14, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, 2, 10.0, 260, 100, 0, 14, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } else{ // Normal throw - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.5, 110, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.5, 110, 70, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } // Grab break - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 6.5, 114, 65, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 1, 6.5, 114, 65, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); } frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 5.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 5.0); } } frame(lua_state, 5.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 1.0); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_HI_FLAG_TARGET_AIR){ - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - //ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW_MEWTWO, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + //ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } else{ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } else{ - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } } -unsafe extern "C" fn master_special_air_hi_overtake_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_hi_overtake_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 0.0, 0, 0.0, 0, 0, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0, 0, 0, 2.2, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 3.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 0, 0, 0.0, 0, 0, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("top"), 0, 0.0, 0, 0.0, 0, 0, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0, 0, 0, 2.2, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 0, 0, 0.0, 0, 0, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); } } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - EFFECT(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + EFFECT(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.0, 3.0); } else{ - EFFECT(fighter, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("master_wire_hit"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn master_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); +unsafe extern "C" fn master_special_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); } else{ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); let motion_rate = 5.0/(42.0-14.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } frame(lua_state, 34.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { - // VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); + // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // DamageModule::set_damage_mul(boma, 1.25); // } WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); } frame(lua_state, 64.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_END_SUPER_ARMOR); ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, true, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 96.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 117.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 118.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); - //COL_PRI(fighter, 200); - //FLASH(fighter, 1.0, 0.115, 0.71, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 1.0, 0.115, 0.71, 0.75); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 0.3); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.3, 0.3); - //COL_PRI(fighter, 200); - //FLASH(fighter, 0.325, 0.157, 0.05, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 0.325, 0.157, 0.05, 0.75); } } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 58.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); } frame(lua_state, 68.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_reverb"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_reverb"), -1); } frame(lua_state, 70.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash"), false, true); } } -unsafe extern "C" fn master_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); +unsafe extern "C" fn master_special_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); } else{ - VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); + VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); let motion_rate = 5.0/(42.0-14.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - // VarModule::set_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); + // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // DamageModule::set_damage_mul(boma, 1.25); // } - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); } - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } frame(lua_state, 42.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); } frame(lua_state, 64.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_END_SUPER_ARMOR); ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, true, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); } frame(lua_state, 65.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 96.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 117.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); } frame(lua_state, 118.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 6.0); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 6.0); - //COL_PRI(fighter, 200); - //FLASH(fighter, 1.0, 0.115, 0.71, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 1.0, 0.115, 0.71, 0.75); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold_end"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.0, 0.0, 0.0); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.3, 0.3, 0.3); + if is_excute(agent) { + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 1 { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold_end"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.0, 0.0, 0.0); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.3, 0.3, 0.3); - //COL_PRI(fighter, 200); - //FLASH(fighter, 0.325, 0.157, 0.05, 0.75); + //COL_PRI(agent, 200); + //FLASH(agent, 0.325, 0.157, 0.05, 0.75); } } frame(lua_state, 40.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold_end"), Hash40::new("haver"), 0, 13, 0.6, 0, 0, 0, 1, true); } frame(lua_state, 58.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_reverb"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash"), Hash40::new("top"), 0, 5, 0, 0, 0, 0, 1, false); EffectModule::set_disable_render_offset_last(boma); } frame(lua_state, 64.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 7, 1, 0, 0, 0, 1, true); } frame(lua_state, 68.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_slash_reverb"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_reverb"), -1); } frame(lua_state, 70.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash"), false, true); } } -unsafe extern "C" fn master_special_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_lw_hit_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); // } // } // frame(lua_state, 5.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + // //ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); // } // } // } // frame(lua_state, 50.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // let motion_rate = 1.0; - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // } // else{ // let motion_rate = 7.0; - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // } // } // } // frame(lua_state, 52.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(fighter, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); // AttackModule::set_attack_level(boma, 0, 5 as u8); // } // } // } // frame(lua_state, 53.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // } // } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_DEGREE_X); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_special_lw_hit_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.9); +unsafe extern "C" fn master_special_lw_hit_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.3, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.9); } // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 3.0, true); - // EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash_air_reverb"), true, true); + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 3.0, true); + // EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash_air_reverb"), true, true); // } // else{ - // EFFECT_FOLLOW(fighter, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 1, true); - // EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_slash_air_reverb"), true, true); + // EFFECT_FOLLOW(agent, Hash40::new("master_axe_slash_particle"), Hash40::new("top"), 0, 4, 0, -10, 0, 0, 1, true); + // EFFECT_OFF_KIND(agent, Hash40::new("master_axe_slash_air_reverb"), true, true); // } // } frame(lua_state, 56.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_rock"), Hash40::new("haver"), 0, 15, 1, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_rock"), Hash40::new("haver"), 0, 15, 1, 0, 0, 0, 1, true); } frame(lua_state, 60.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("master_axe_rock"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_rock"), -1); } } -unsafe extern "C" fn master_special_air_lw_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_special_air_lw_hit_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 1.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); // } // } // frame(lua_state, 5.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(fighter, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + // //ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); // } // } // } // frame(lua_state, 50.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ // let motion_rate = 1.0; - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // } // else{ // let motion_rate = 7.0; - // FT_MOTION_RATE(fighter, motion_rate); + // FT_MOTION_RATE(agent, motion_rate); // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); // } // } // } // frame(lua_state, 52.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(fighter, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + // ATTACK(agent, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); // AttackModule::set_attack_level(boma, 0, 5 as u8); // } // } // } // frame(lua_state, 53.0); - // if is_excute(fighter) { - // if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + // if is_excute(agent) { + // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { // AttackModule::clear_all(boma); // } // } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } frame(lua_state, 56.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_DEGREE_X); } frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } // #[acmd_script( agent = "master_axe", script = "game_speciallwhit" , category = ACMD_GAME , low_priority)] -// unsafe fn master_axe_special_lw_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn master_axe_special_lw_hit_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 2.0); -// if is_excute(fighter) { -// if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 0 { -// ATTACK(fighter, 1, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 2, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 3, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// if is_excute(agent) { +// if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 0 { +// ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); // } -// else if VarModule::get_int(fighter.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { -// ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 2, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 3, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// else if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { +// ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); +// ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); // } // AttackModule::clear(boma, 0, false); // WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); // } // frame(lua_state, 3.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); // } // frame(lua_state, 4.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); // } // frame(lua_state, 5.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); // } // frame(lua_state, 6.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); // } // } diff --git a/fighters/master/src/acmd/throws.rs b/fighters/master/src/acmd/throws.rs index 3faf3bc373..1b2cd55108 100644 --- a/fighters/master/src/acmd/throws.rs +++ b/fighters/master/src/acmd/throws.rs @@ -1,23 +1,23 @@ use super::*; -unsafe extern "C" fn master_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 3.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 3.6, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(11.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } @@ -64,132 +64,132 @@ unsafe extern "C" fn master_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_f"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 49, 110, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 49, 110, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 38, 100, 0, 60, 6.5, 0.0, 8.0, 14.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 38, 100, 0, 60, 6.5, 0.0, 8.0, 14.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 0, 15); + CHECK_FINISH_CAMERA(agent, 0, 15); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 6.0/(40.0-25.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 71.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_b"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 44, 90, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, -17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, -17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 5.0, 55, 70, 0, 90, 6.5, 0.0, 7.0, 10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_THROW); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 25, 15); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 25, 15); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 10.0/(54.0-40.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn master_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("throw_lw"), false, 0.0); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 74, 150, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 74, 150, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 48, 100, 0, 60, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 48, 100, 0, 60, 6.0, 0.0, 6.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3, 0); + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 5.0/(40.0-25.0); - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_rate = 1.0; - FT_MOTION_RATE(fighter, motion_rate); + FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, 1.0/motion_rate); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } diff --git a/fighters/master/src/acmd/tilts.rs b/fighters/master/src/acmd/tilts.rs index 5c96f206a7..c90aa425c7 100644 --- a/fighters/master/src/acmd/tilts.rs +++ b/fighters/master/src/acmd/tilts.rs @@ -1,190 +1,190 @@ use super::*; -unsafe extern "C" fn master_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(8.6-4.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(8.6-4.0)); } frame(lua_state, 8.6); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(12.25-8.6)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 5.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 9.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(12.25-8.6)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 35, 70, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 5.75, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 9.5, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 12.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.5, 35, 80, 0, 40, 4.0, 7.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 12.0, 35, 80, 0, 40, 4.0, 12.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 12.25); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(13.0-12.25)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.0-12.25)); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); - FT_MOTION_RATE(fighter, 28.0/(44.0-13.0)); + FT_MOTION_RATE(agent, 28.0/(44.0-13.0)); } frame(lua_state, 44.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn master_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_s3_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 5, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 5, Hash40::new("sword1"), 2.3, 0.0, 0.0, Hash40::new("sword1"), 17.0, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 5); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } } -unsafe extern "C" fn master_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn master_attack_s3_s_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.6); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.6); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn master_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 4.0/(7.5-3.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 4.0/(7.5-3.0)); } frame(lua_state, 7.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(8.5-7.5)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(8.5-7.5)); } frame(lua_state, 8.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 8.0/(15.8-8.5)); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 113, 81, 0, 73, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 113, 81, 0, 73, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword1"), 11.0, 108, 81, 0, 81, 4.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 8.0/(15.8-8.5)); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 113, 81, 0, 73, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 113, 81, 0, 73, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 111, 81, 0, 81, 4.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 11.0, 108, 81, 0, 81, 4.0, 12.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.8); - FT_MOTION_RATE(fighter, 2.0/(16.5-15.5)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 2.0/(16.5-15.5)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.5); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn master_attack_hi3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn master_attack_hi3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("master_axe_hold2"), Hash40::new("sword1"), 13.0, 0.0, 0.0, 0, 0, 0, 0.5, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } frame(lua_state, 7.5); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 17.5, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_master_sword1"), Hash40::new("tex_master_sword2"), 6, Hash40::new("sword1"), 1.0, 0.0, 0.0, Hash40::new("sword1"), 17.5, 0.0, 0.15, true, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, -90.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("master_swordflare"), Hash40::new("sword1"), 0, 0, 0, 0, 0, -90, 1, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_swordflare"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("master_axe_hold2"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } } -unsafe extern "C" fn master_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn master_attack_hi3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 6.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn master_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn master_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, false, 0); ArticleModule::change_motion(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, smash::phx::Hash40::new("attack_lw3"), false, 0.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 70, 79, 0, 58, 3.0, 0.0, 2.8, 4.0, Some(0.0), Some(2.8), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.5, 96, 69, 0, 69, 3.0, 0.0, 2.8, 16.0, Some(0.0), Some(2.8), Some(25.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 70, 79, 0, 58, 3.0, 0.0, 2.8, 4.0, Some(0.0), Some(2.8), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 96, 69, 0, 69, 3.0, 0.0, 2.8, 16.0, Some(0.0), Some(2.8), Some(25.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 59.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } diff --git a/fighters/metaknight/src/acmd/ground.rs b/fighters/metaknight/src/acmd/ground.rs index b62c89e0ad..4a2970b3ed 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -43,9 +43,9 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 8, 0, 40, 7.0, 0.0, 6.5, 8.0, Some(0.0), Some(6.5), Some(13.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 40, 0, 60, 4.0, 0.0, 6.0, -3.0, Some(0.0), Some(6.0), Some(-9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 4); + //ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 4); } frame(lua_state, 20.0); @@ -117,40 +117,40 @@ unsafe extern "C" fn effect_attack100(agent: &mut L2CAgentBase) { } // #[acmd_script( agent = "metaknight", script = "game_attack100end", category = ACMD_GAME, low_priority )] -// unsafe fn game_attack100end(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_attack100end(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // AttackModule::clear_all(boma); // frame(lua_state, 3.0); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 5.0, 0.0, 8.0, 11.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 6.0, 0.0, 8.0, 16.5, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 5.0, 0.0, 8.0, 11.0, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); +// ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 100, 0, 40, 6.0, 0.0, 8.0, 16.5, None, None, None, 2.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); // } // wait(lua_state, 1.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); // } -// FT_MOTION_RATE(fighter, 0.87); +// FT_MOTION_RATE(agent, 0.87); // } // #[acmd_script( agent = "metaknight", script = "effect_attack100end", category = ACMD_EFFECT, low_priority )] -// unsafe fn effect_attack100end(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); -// EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_attack"), false, false); +// unsafe fn effect_attack100end(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +// EFFECT_OFF_KIND(agent, Hash40::new("metaknight_attack"), false, false); // EffectModule::set_disable_render_offset_last(boma); // } // frame(lua_state, 3.0); -// if is_excute(fighter) { -// EFFECT_FOLLOW(fighter, Hash40::new("metaknight_attack_end"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); +// if is_excute(agent) { +// EFFECT_FOLLOW(agent, Hash40::new("metaknight_attack_end"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 0.9, true); // EffectModule::set_disable_render_offset_last(boma); -// EFFECT_OFF_KIND(fighter, Hash40::new("metaknight_sword"), false, false); +// EFFECT_OFF_KIND(agent, Hash40::new("metaknight_sword"), false, false); // } // frame(lua_state, 26.0); -// if is_excute(fighter) { -// FOOT_EFFECT(fighter, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +// if is_excute(agent) { +// FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); // } // } @@ -161,8 +161,8 @@ unsafe extern "C" fn sound_attack100start(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_metaknight_attack100")); // match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { - // 0 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack100")), - // 1 => PLAY_SE(fighter, Hash40::new("vc_metaknight_attack07")), + // 0 => PLAY_SE(agent, Hash40::new("vc_metaknight_attack100")), + // 1 => PLAY_SE(agent, Hash40::new("vc_metaknight_attack07")), // _ => {} // }; } diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index bfe376d2c0..df09d0ca75 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -1,113 +1,113 @@ use super::*; -unsafe extern "C" fn sound_damagefly(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02"));} } } -unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); } } -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_metaknight_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_metaknight_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_metaknight_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_metaknight_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_metaknight_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_metaknight_step_left_l")); } } -unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } diff --git a/fighters/miigunner/src/acmd/aerials.rs b/fighters/miigunner/src/acmd/aerials.rs index 490610d8ca..82c574d057 100644 --- a/fighters/miigunner/src/acmd/aerials.rs +++ b/fighters/miigunner/src/acmd/aerials.rs @@ -1,183 +1,183 @@ use super::*; use smash::app::sv_module_access::sound; -unsafe extern "C" fn miigunner_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 5.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 5.0, 1.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 38, 0, 51, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 11.0, 361, 38, 0, 51, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 11.0, 361, 38, 0, 51, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 361, 38, 0, 51, 4.5, -0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 13.0, 361, 85, 0, 55, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miigunner_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miigunner_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 9.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 9.0, 4.0); frame(lua_state, 9.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 9.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 9.0, 10.0, 5.0); } - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 10.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 10.0, 12.0, 3.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 10.0, 12.0, 3.0); } - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_ATTACKAIRF_BULLET, false, 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed1 = Vector3f{ x: -0.8, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 5.0, 120, 85, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 5.0, 120, 85, 0, 60, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 5.0, 120, 85, 0, 60, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 5.0, 120, 85, 0, 60, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 120, 85, 0, 60, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 5.0, 120, 85, 0, 60, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 23.0, 8.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 23.0, 8.0); } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 4.0, 361, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 361, 85, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 4.0, 361, 85, 0, 50, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 4.0, 361, 85, 0, 50, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 361, 85, 0, 50, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 4.0, 361, 85, 0, 50, 4.5, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miigunner_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.0, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, 10, 0, 0, 0, 1, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("handr"), 2.5, 0, 0, 0, 0, -90, 0.65, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - LAST_EFFECT_SET_RATE(fighter, 0.45); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("handr"), 5.5, 0, 0, 0, 0, -90, 0.65, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_shot"), Hash40::new("armr"), 6.0, 0, 0, 0, 90, 0, 1.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("handr"), 2.5, 0, 0, 0, 0, -90, 0.65, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + LAST_EFFECT_SET_RATE(agent, 0.45); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("handr"), 5.5, 0, 0, 0, 0, -90, 0.65, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn miigunner_landing_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_f"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 5.0)/landing_frame); +unsafe extern "C" fn miigunner_landing_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_f"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_landing_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_atk_shot_after"), false, false); - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn miigunner_landing_air_f_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_atk_shot_after"), false, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn miigunner_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 8.0, 9.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 8.0, 9.0, 7.0); } - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed1 = Vector3f{ x: 0.6, y: 0.1, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 60, 90, 0, 55, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 8.0, 60, 90, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 60, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 60, 90, 0, 55, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 60, 90, 0, 55, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 60, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr"), 10.0, 55, 90, 0, 55, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 103, 0, 29, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 361, 103, 0, 29, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 36, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 41, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 10.0, 361, 103, 0, 29, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 361, 103, 0, 29, 4.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 36, 4.0, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 13.0, 361, 103, 0, 41, 6.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 13.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 13.0, 22.0, 7.0); - } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 6.5, 361, 100, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 6.5, 361, 100, 0, 35, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("handr"), 6.5, 361, 100, 0, 35, 3.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 13.0, 22.0, 7.0); + } + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 6.5, 361, 100, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.5, 361, 100, 0, 35, 3.5, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("handr"), 6.5, 361, 100, 0, 35, 3.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } @@ -186,292 +186,292 @@ unsafe extern "C" fn miigunner_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 22.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 22.0, 32.0, 13.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 22.0, 32.0, 13.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } } -unsafe extern "C" fn miigunner_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -11, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 10, -11, 0, 0, 0, 1, true); } } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, true); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, true); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("kneel"), 0, 0, 0, 0, 0, 0, 1.0, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1.1, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn miigunner_landing_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_b"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 3.0)/landing_frame); +unsafe extern "C" fn miigunner_landing_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_b"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 3.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 15.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 11.0); frame(lua_state, 15.0); if boma.is_button_on(Buttons::Attack) { - FT_MOTION_RATE_RANGE(fighter, 15.0, 17.0, 8.0); + FT_MOTION_RATE_RANGE(agent, 15.0, 17.0, 8.0); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); if boma.is_button_on(Buttons::Attack) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let addSpeed = Vector3f{ x: 0.0, y: -4.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 90, 80, 0, 50, 6.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 90, 80, 0, 50, 6.5, 0.0, 28.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 50, 0, 70, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 50, 0, 70, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 270, 48, 0, 40, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 270, 48, 0, 40, 6.0, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 140, 100, 45, 0, 4.5, 0.0, 15.0, -3.0, Some(0.0), Some(15.0), Some(3.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 140, 100, 45, 0, 4.5, 0.0, 15.0, -3.0, Some(0.0), Some(15.0), Some(3.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 1, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } } frame(lua_state, 18.0); - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 0.5); - } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 367, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 96, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.8, 130, 100, 25, 0, 3.2, 0.0, 13.0, -0.8, Some(0.0), Some(13.0), Some(0.8), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 0.5); + } + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 367, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 96, 100, 25, 0, 2.6, 0.0, 55.0, 0.0, Some(0.0), Some(15.0), Some(0.0), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 130, 100, 25, 0, 3.2, 0.0, 13.0, -0.8, Some(0.0), Some(13.0), Some(0.8), 0.75, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); AttackModule::set_add_reaction_frame(boma, 0, 1.0, false); AttackModule::set_add_reaction_frame(boma, 1, 1.0, false); AttackModule::set_add_reaction_frame(boma, 2, 1.0, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 80, 0, 50, 6.5, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 80, 0, 50, 6.5, 0.0, 19.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 27.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 72, 172, 0, 50, 4.0, 0.0, 58.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 72, 172, 0, 50, 4.0, 0.0, 58.0, 0.0, Some(0.0), Some(16.0), Some(0.0), 1.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miigunner_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.0, 15, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 4.0, 15, 0, 0, 0, 0, 1, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_atk_shot5"), -1); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.5, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_atk_shot5"), -1); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.5, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } else { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_atk_gatling"), Hash40::new("armr"), 5.5, 0, 0, -90, 0, 0, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + EFFECT_FLW_POS(agent, Hash40::new("miigunner_atk_gatling"), Hash40::new("armr"), 5.5, 0, 0, -90, 0, 0, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 23.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } } -unsafe extern "C" fn miigunner_attack_air_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - PLAY_STATUS(fighter, Hash40::new("se_miigunner_attackair_h01_lp")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + PLAY_STATUS(agent, Hash40::new("se_miigunner_attackair_h01_lp")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack02")); } } frame(lua_state, 18.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - PLAY_SE(fighter, Hash40::new("se_miigunner_smash_l01")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack03")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + PLAY_SE(agent, Hash40::new("se_miigunner_smash_l01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack03")); } } frame(lua_state, 39.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - STOP_SE(fighter, Hash40::new("se_miigunner_attackair_h01_lp")); - STOP_SE(fighter, Hash40::new("seq_miigunner_rnd_attack02")); - PLAY_SE(fighter, Hash40::new("se_miigunner_attackair_h01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + STOP_SE(agent, Hash40::new("se_miigunner_attackair_h01_lp")); + STOP_SE(agent, Hash40::new("seq_miigunner_rnd_attack02")); + PLAY_SE(agent, Hash40::new("se_miigunner_attackair_h01")); } } } -unsafe extern "C" fn miigunner_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_hi_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 17.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 35.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } frame(lua_state, 36.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } -unsafe extern "C" fn miigunner_landing_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_attack_air_frame_hi"), 0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, (landing_frame + 5.0)/landing_frame); +unsafe extern "C" fn miigunner_landing_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_hi"), 0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } } } -unsafe extern "C" fn miigunner_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) { - VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); } } frame(lua_state, 14.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 14.0, 20.0, 4.0); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 14.0, 20.0, 4.0); } else { - FT_MOTION_RATE_RANGE(fighter, 14.0, 18.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 18.0, 1.0); } frame(lua_state, 18.0); - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 18.0, 20.0, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 18.0, 20.0, 1.0); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - let charge = VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let charge = VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { let charge_mul = 1.0 + (charge * 0.025); - let mul = if VarModule::is_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { 0.5 } else { 1.0 }; - if !VarModule::is_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { - VarModule::on_flag(fighter.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME); + let mul = if VarModule::is_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { 0.5 } else { 1.0 }; + if !VarModule::is_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME) { + VarModule::on_flag(agent.object(), vars::miigunner::instance::BOOSTED_DAIR_AIRTIME); } - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 14.0 * charge_mul, 80, 65, 0, 50, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - SET_SPEED_EX(fighter, + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0 * charge_mul, 80, 65, 0, 50, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 14.0 * charge_mul, 80, 65, 0, 50, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + SET_SPEED_EX(agent, (KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * PostureModule::lr(boma) * (20.0 - charge)/20.0) * mul, (1.0 + (0.125 * charge)) * mul, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN @@ -479,93 +479,93 @@ unsafe extern "C" fn miigunner_attack_air_lw_game(fighter: &mut L2CAgentBase) { } else { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 15.0, 270, 70, 0, 40, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 4.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("handr"), 15.0, 270, 50, 0, 20, 5.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 90, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 8.0, 65, 90, 0, 30, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 3.0, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 8.0, 65, 90, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } else { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 12.0, 361, 70, 0, 30, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } } frame(lua_state, 28.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE(fighter, 0.75); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE(agent, 0.75); } - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 43.0); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 43.0, 50.0, 9.0 + 2.0 * VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE)); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 43.0, 50.0, 9.0 + 2.0 * VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE)); } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { AttackModule::clear_all(boma); } } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn miigunner_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ let handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::new(0.0, 10.0, -1.0), &Vector3f::zero(), 0.75, true, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); + VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); EffectModule::set_rate(boma, handle as u32, 0.1); } } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 1.3); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - } - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.3, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_atk_shot5"), -1); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_gimmckjump"), Hash40::new("armr"), 6, 0, 0, 0, -90, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 1.0, 10.0); - if VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE) >= 10.0 { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_gimmck_attack"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.1); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("haver"), 0, 0, -3, 0, 0, 0, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + } + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot4"), Hash40::new("haver"), 0, 0, 2.5, 90, 0, 0, 0.3, true); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_atk_shot5"), -1); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_gimmckjump"), Hash40::new("armr"), 6, 0, 0, 0, -90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); + LAST_EFFECT_SET_COLOR(agent, 0.15, 1.0, 10.0); + if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) >= 10.0 { + EFFECT_FLW_POS(agent, Hash40::new("miigunner_gimmck_attack"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } } frame(lua_state, 25.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); - if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.55, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 6, 0, 0, 0, 0, -90, 0.75, true); + if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL){ + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } diff --git a/fighters/miigunner/src/acmd/ground.rs b/fighters/miigunner/src/acmd/ground.rs index cc871149f1..524ecb5705 100644 --- a/fighters/miigunner/src/acmd/ground.rs +++ b/fighters/miigunner/src/acmd/ground.rs @@ -1,100 +1,100 @@ use super::*; -unsafe extern "C" fn miigunner_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 18, 0, 22, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 361, 18, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handl"), 3.0, 180, 15, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 18, 0, 22, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 361, 18, 0, 22, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 361, 18, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handl"), 3.0, 180, 15, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 18, 0, 22, 2.5, 0.0, 3.5, 6.5, Some(0.0), Some(3.5), Some(11.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn miigunner_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 3.5, 361, 25, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 3.5, 361, 25, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 3.5, 361, 20, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.5, 361, 25, 0, 25, 3.0, 0.0, 3.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 3.5, 361, 25, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.5, 361, 25, 0, 25, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 3.5, 361, 20, 0, 20, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.5, 361, 25, 0, 25, 3.0, 0.0, 3.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn miigunner_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 350, 100, 20, 0, 4.0, 0.0, 7.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 10, 0, 4.0, 0.0, 7.0, 13.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 350, 100, 20, 0, 4.0, 0.0, 7.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 10, 0, 4.0, 0.0, 7.0, 13.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.66); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.66); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 7.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 7.5, 10.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.5, 361, 86, 0, 64, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.77); +unsafe extern "C" fn miigunner_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.77); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 361, 53, 0, 82, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 1.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 14.0, 361, 53, 0, 82, 5.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 361, 53, 0, 82, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 361, 60, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.0, 361, 60, 0, 81, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 361, 60, 0, 81, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } diff --git a/fighters/miigunner/src/acmd/other.rs b/fighters/miigunner/src/acmd/other.rs index e3a49b0449..bd30dab36e 100644 --- a/fighters/miigunner/src/acmd/other.rs +++ b/fighters/miigunner/src/acmd/other.rs @@ -1,254 +1,179 @@ use super::*; use smash::app::sv_battle_object; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.375); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.375); } frame(lua_state, 9.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_miigunner_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miigunner_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miigunner_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miigunner_step_right_m")); } wait(lua_state, 18.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_miigunner_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_miigunner_step_left_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.125); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.125); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); // Effectively F12 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn miigunner_attackairf_bullet_fly_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); - LAST_EFFECT_SET_RATE(fighter, 0.7); +unsafe extern "C" fn miigunner_attackairf_bullet_fly_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.7); } } -unsafe extern "C" fn miigunner_rapidshot_bullet_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn miigunner_rapidshot_bullet_fly_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); AttackModule::enable_safe_pos(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } wait(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } } -unsafe extern "C" fn miigunner_grenadelauncher_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miigunner_grenadelauncher_explode_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VisibilityModule::set_whole(boma, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 3.0); - if is_excute(fighter) { - AREA_WIND_2ND_RAD(fighter, 0, 1, 0.02, 1000, 1, 0, 0, 18); + if is_excute(agent) { + AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 18); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AreaModule::erase_wind(boma, 0); - ATTACK(fighter, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 12.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn miigunner_fullthrottle_final_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_fullthrottle_final_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let pos2dim = Vector3f {x: 0.0, y: 40.0, z: 0.0}; PostureModule::set_pos(boma, &pos2dim); - if is_excute(fighter) { + if is_excute(agent) { } } -unsafe extern "C" fn miigunner_stealthbomb_tame_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); +unsafe extern "C" fn miigunner_stealthbomb_tame_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 5.0); } frame(lua_state, 100.0); - if is_excute(fighter) { + if is_excute(agent) { let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.5, false, 0, 0, 0, 0 ,0, false, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.15, 10.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.15, 10.0); EffectModule::set_rgb(boma, flash_handle as u32, 0.15, 0.15, 10.0); EffectModule::set_rate(boma, flash_handle as u32, 0.3); VarModule::set_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER, flash_handle); } } for h in 101..=120 { - if is_excute(fighter) { + if is_excute(agent) { let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); @@ -269,53 +194,53 @@ unsafe extern "C" fn miigunner_stealthbomb_tame_effect(fighter: &mut L2CAgentBas } } -unsafe extern "C" fn miigunner_stealthbomb_s_move_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_stealthbomb_s_move_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { //AREA_WIND_2ND_RAD(0, 1, 0.02, 1000, 1, 0, 0, 12); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { //AreaModule::erase_wind(boma, 0); } } -unsafe extern "C" fn miigunner_stealthbomb_s_move_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_stealthbomb_s_move_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn miigunner_supermissile_straight_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_supermissile_straight_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, fighter.battle_object_id as i32); + VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, agent.battle_object_id as i32); } - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); VarModule::on_flag(gunner, vars::miigunner::instance::DETONATE_READY); @@ -323,96 +248,96 @@ unsafe extern "C" fn miigunner_supermissile_straight_game(fighter: &mut L2CAgent } } -unsafe extern "C" fn miigunner_supermissile_burst_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_supermissile_burst_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let gunner = utils::util::get_battle_object_from_id(owner_id); if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 4.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn miigunner_supermissile_burst_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_supermissile_burst_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if is_excute(fighter) { + if is_excute(agent) { if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - EFFECT(fighter, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 10.0, 25.0); + EFFECT(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 0.5, 10.0, 25.0); } else { - EFFECT(fighter, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } } } } -unsafe extern "C" fn miigunner_supermissile_burst_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_supermissile_burst_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if is_excute(fighter) { + if is_excute(agent) { if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { let gunner = utils::util::get_battle_object_from_id(owner_id); if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s03")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_bomb_l")); + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_l")); } else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_common_bomb_s")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_s")); } } } } -unsafe extern "C" fn miigunner_bottomshoot_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_bottomshoot_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::get_float(owner_module_accessor.object(), vars::miigunner::status::CURRENT_CHARGE) <= 10.0 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); } } } -unsafe extern "C" fn miigunner_gunnercharge_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_gunnercharge_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - attack!(fighter, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); AttackModule::enable_safe_pos(boma); } for _ in 0..1000 { wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let motion_vec = Vector3f{x: 0.5, y: 1.0, z: 1.0}; KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } @@ -420,61 +345,61 @@ unsafe extern "C" fn miigunner_gunnercharge_shoot_game(fighter: &mut L2CAgentBas } -unsafe extern "C" fn miigunner_gunnercharge_shoot_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miigunner_gunnercharge_shoot_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n02")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n02")); } else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n03")); } else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n04")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n04")); } else { - PLAY_SE_REMAIN(fighter, Hash40::new("se_miigunner_special_n05")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n05")); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } pub fn install() { smashline::Agent::new("miigunner") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/miigunner/src/acmd/smashes.rs b/fighters/miigunner/src/acmd/smashes.rs index b47d264776..2cbfdbd1dd 100644 --- a/fighters/miigunner/src/acmd/smashes.rs +++ b/fighters/miigunner/src/acmd/smashes.rs @@ -1,51 +1,51 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.8, 180, 100, 7, 0, 3.0, 0.0, 7.5, 45.0, Some(0.0), Some(7.5), Some(45.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.8, 0, 100, 5, 0, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(7.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.8, 180, 100, 7, 0, 3.0, 0.0, 7.5, 45.0, Some(0.0), Some(7.5), Some(45.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.8, 0, 100, 5, 0, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(7.0), 0.5, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 7.0, 0.0, 7.5, 20.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.5, 0.0, 7.5, 48.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 7.0, 0.0, 7.5, 20.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.5, 0.0, 7.5, 48.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 1, false); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.5, 45, 144, 0, 53, 3.0, 0.0, 7.5, 44.0, Some(0.0), Some(7.5), Some(10.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 96, 100, 30, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0, 86, 100, 30, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 2.0, 3.5, 3.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 3.0, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 96, 100, 30, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 86, 100, 30, 10, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 2.0, 3.5, 3.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("armr"), 3.0, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: 8.0, y: 23.0 }; AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hit1, 6, false); AttackModule::set_no_finish_camera(boma, 0, true, false); @@ -54,14 +54,14 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 3, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 6.0, 7.2, -2.3, 0.0, Some(5.8), Some(-0.8), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 6.0, 7.2, -2.3, 0.0, Some(5.8), Some(-0.8), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 110, 100, 30, 100, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 7.0, -1.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -3.0, y: 30.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 10, false); AttackModule::set_no_finish_camera(boma, 0, true, false); @@ -69,28 +69,28 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 2, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 90, 30, 25, 80, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 90, 30, 25, 80, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 361, 100, 0, 0, 7.0, 8.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -8.0, y: 16.0 }; AttackModule::set_vec_target_pos(boma, 1, Hash40::new("top"), &hit1, 5, false); AttackModule::set_no_finish_camera(boma, 0, true, false); AttackModule::set_no_finish_camera(boma, 1, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 2.5, 120, 100, 30, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.5, 116, 100, 30, 44, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 2.5, 120, 100, 30, 44, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.5, 116, 100, 30, 44, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("armr"), 2.5, 218, 100, 30, 26, 6.5, 6.5, 0.0, 0.0, None, None, None, 0.5, 0.8, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); let hit1 = Vector2f { x: -12.0, y: 12.0 }; AttackModule::set_vec_target_pos(boma, 2, Hash40::new("top"), &hit1, 5, false); AttackModule::set_vec_target_pos(boma, 3, Hash40::new("top"), &hit1, 5, false); @@ -100,44 +100,44 @@ unsafe extern "C" fn miigunner_attack_hi4_game(fighter: &mut L2CAgentBase) { AttackModule::set_no_finish_camera(boma, 3, true, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 8.0, 7.8, -0.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 90, 150, 0, 50, 8.0, 7.8, -0.5, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 40, 110, 0, 40, 5.0, 0.0, 5.0, 18.0, Some(0.0), Some(5.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 40, 110, 0, 40, 5.0, 0.0, 5.0, 18.0, Some(0.0), Some(5.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 40, 88, 0, 70, 5.5, 0.0, 5.5, -17.0, Some(0.0), Some(5.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 88, 0, 70, 5.5, 0.0, 5.5, -17.0, Some(0.0), Some(5.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/miigunner/src/acmd/specials.rs b/fighters/miigunner/src/acmd/specials.rs index 6740640c10..96bc629f61 100644 --- a/fighters/miigunner/src/acmd/specials.rs +++ b/fighters/miigunner/src/acmd/specials.rs @@ -1,43 +1,43 @@ use super::*; -unsafe extern "C" fn miigunner_special_n1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n1_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); } } -unsafe extern "C" fn miigunner_special_n1_fire_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n1_fire_max_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 10.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 10.0); } - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); WorkModule::off_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); } } frame(lua_state, 3.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 3.0, 5.0, 5.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 3.0, 5.0, 5.0); } else { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { ArticleModule::remove_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } else { ArticleModule::shoot_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); @@ -45,378 +45,378 @@ unsafe extern "C" fn miigunner_special_n1_fire_max_game(fighter: &mut L2CAgentBa } } frame(lua_state, 5.0); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(fighter, 8.0, 40.0, 37.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 8.0, 40.0, 37.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_special_n1_fire_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n1_fire_max_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 100.0, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); } } frame(lua_state, 2.6); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("miigunner_sb_tama"), -1); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); } frame(lua_state, 2.8); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(fighter, 0.85); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(fighter, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(fighter, 0.5); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); } } else { - EFFECT(fighter, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } } } -unsafe extern "C" fn miigunner_special_n1_fire_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n1_fire_max_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(fighter, Hash40::new("se_miigunner_final01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); } } frame(lua_state, 3.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(fighter, Hash40::new("se_miigunner_final01")); - PLAY_SE(fighter, Hash40::new("se_miigunner_final04")); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); } } } -unsafe extern "C" fn miigunner_special_n2_loop_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n2_loop_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_RAPID_SHOT_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); } frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_special_n3_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n3_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::set_float(fighter.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); } frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(fighter, 16.0, 30.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 30.0, 6.0); frame(lua_state, 25.0); } -unsafe extern "C" fn miigunner_special_n3_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n3_start_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); - LAST_EFFECT_SET_RATE(fighter, 0.15); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); + LAST_EFFECT_SET_RATE(agent, 0.15); } } -unsafe extern "C" fn miigunner_special_n3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_n3_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 23.0, 30.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 30.0); + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GRENADELAUNCHER, false, 0); } } -unsafe extern "C" fn miigunner_special_s1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_s1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 21.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 17.0); frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(fighter, 21.0, 64.0, 36.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 21.0, 64.0, 36.0); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_FLAMEPILLAR, false, 0); } } -unsafe extern "C" fn miigunner_special_s3_super_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_s3_super_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_MIIMISSILE_FLAG_WEAPON); } } -unsafe extern "C" fn miigunner_special_hi1_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_BOTTOM_SHOOT_FLAG_JUMP); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_BOTTOMSHOOT, false, 0); } frame(lua_state, 14.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } } -unsafe extern "C" fn miigunner_special_hi1_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi1_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let handle = EffectModule::req_follow(boma, Hash40::new("miigunner_bottom_shot"), Hash40::new("armr"), &Vector3f::new(6.5, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); + VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); } frame(lua_state, 9.0); - if is_excute(fighter) { - let handle = VarModule::get_int64(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); + if is_excute(agent) { + let handle = VarModule::get_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); EffectModule::set_rate(boma, handle as u32, 1.0); - if VarModule::get_float(fighter.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(fighter.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { + if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { EffectModule::set_rgb(boma, handle as u32, 0.15, 0.55, 10.0); } } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn miigunner_special_hi1_landing_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_OFF_KIND(fighter, Hash40::new("miigunner_bottom_shot"), false, false); +unsafe extern "C" fn miigunner_special_hi1_landing_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_bottom_shot"), false, false); } } -unsafe extern "C" fn miigunner_special_hi2_squat_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi2_squat_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 0.25); + FT_MOTION_RATE(agent, 0.25); frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_special_hi2_squat_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi2_squat_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 11.0); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); } } } -unsafe extern "C" fn miigunner_special_hi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn miigunner_special_hi3_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi3_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.5); + FT_MOTION_RATE(agent, 1.5); } -unsafe extern "C" fn miigunner_special_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.85); + FT_MOTION_RATE(agent, 0.85); } -unsafe extern "C" fn miigunner_special_lw1_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { +unsafe extern "C" fn miigunner_special_lw1_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 3.0, 6.5, 4.0); } } frame(lua_state, 3.0); - if is_excute(fighter) { - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); } } -unsafe extern "C" fn miigunner_special_lw3_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_lw3_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); } -unsafe extern "C" fn miigunner_special_lw3_hold_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_lw3_hold_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } } -unsafe extern "C" fn miigunner_special_lw3_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn miigunner_special_lw3_hold_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { EffectModule::kill_kind(boma, Hash40::new("miigunner_absorber"), false, false); - let offset = if fighter.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(fighter, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } - COL_NORMAL(fighter); - if is_excute(fighter) { - FLASH(fighter, 0.5, 0.7, 1, 0.6); + COL_NORMAL(agent); + if is_excute(agent) { + FLASH(agent, 0.5, 0.7, 1, 0.6); } wait(lua_state, 2.0); - if is_excute(fighter) { - FLASH_FRM(fighter, 3, 0, 0.2, 0.5, 0); + if is_excute(agent) { + FLASH_FRM(agent, 3, 0, 0.2, 0.5, 0); } wait(lua_state, 3.0); } -unsafe extern "C" fn miigunner_special_lw3_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_special_lw3_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 9.0); - if is_excute(fighter) { - let offset_y = if fighter.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 9.0); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_special_lw3_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn miigunner_special_lw3_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn miigunner_special_lw3_end_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miigunner_attackhard_s01")); +unsafe extern "C" fn miigunner_special_lw3_end_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miigunner_attackhard_s01")); } } diff --git a/fighters/miigunner/src/acmd/throws.rs b/fighters/miigunner/src/acmd/throws.rs index e3e725bca2..ef1ebe3661 100644 --- a/fighters/miigunner/src/acmd/throws.rs +++ b/fighters/miigunner/src/acmd/throws.rs @@ -1,259 +1,259 @@ use super::*; -unsafe extern "C" fn miigunner_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(12.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miigunner_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.7, 0.0, Some(0.0), Some(6.7), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.7, 0.0, Some(0.0), Some(6.7), Some(12.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miigunner_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 6.4, -4.0, Some(0.0), Some(6.4), Some(-14.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 6.4, -4.0, Some(0.0), Some(6.4), Some(-14.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn miigunner_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 90, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn miigunner_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0, 361, 90, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 100, 140, 10, 5.5, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 100, 140, 10, 5.5, 0.0, 6.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 11.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13.0, 0.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13.0, 0.0); //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); //FighterCutInManager::set_throw_finish_offset(boma, 9, -2, 0); } frame(lua_state, 12.0); - FT_MOTION_RATE_RANGE(fighter, 12.0, 34.0, 18.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE_RANGE(agent, 12.0, 34.0, 18.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // FT_MOTION_RATE_RANGE(fighter, 1.0, 3.0, 8.0); + // FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 8.0); // } - if is_excute(fighter) { + if is_excute(agent) { // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); - // ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 52, 56, 2, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + // ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 52, 56, 2, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } // else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 60, 45, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 60, 45, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); //} - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 10.0, 21.0, 9.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 10.0, 21.0, 9.0); // } // else { - FT_MOTION_RATE_RANGE(fighter, 10.0, 20.0, 7.0); + FT_MOTION_RATE_RANGE(agent, 10.0, 20.0, 7.0); // } - if is_excute(fighter) { - REVERSE_LR(fighter); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + REVERSE_LR(agent); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 20.0); - // if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - FT_MOTION_RATE_RANGE(fighter, 20.0, 50.0, 18.0); + // if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + FT_MOTION_RATE_RANGE(agent, 20.0, 50.0, 18.0); // } - if is_excute(fighter) { - // if !VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + if is_excute(agent) { + // if !VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, -1); ArticleModule::change_motion(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, Hash40::new("fly_throw_b"), false, -1.0); // } } // frame(lua_state, 21.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 21.0, 50.0, 24.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 21.0, 50.0, 24.0); // } - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 142, 40, 0, 98, 18.0, 0.0, 22.0, -31.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 142, 40, 0, 98, 18.0, 0.0, 22.0, -31.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // } // frame(lua_state, 24.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear_all(boma); // } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowb_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowb_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } } -unsafe extern "C" fn miigunner_throw_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 4.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18.0, -27.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.15, 0.15); - // LAST_EFFECT_SET_RATE(fighter, 1.25); - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_RATE(fighter, 2.0); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 18.0, -27.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.15, 0.15); + // LAST_EFFECT_SET_RATE(agent, 1.25); + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_RATE(agent, 2.0); // } // } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } // frame(lua_state, 19.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 13, -13, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), 0, 13, -13, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); // } // } frame(lua_state, 20.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 19.0, -26.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 19.0, -26.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 70, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); // } } } -unsafe extern "C" fn miigunner_throw_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_b_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack01")); } wait(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } // wait(lua_state, 9.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } // } frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); } // frame(lua_state, 22.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s04")); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s04")); // } // } } -unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 12.0); + // FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 12.0); // } - if is_excute(fighter) { + if is_excute(agent) { // if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_ATTACK) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_CATCH) { - // VarModule::on_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL); - // ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 54, 2, 76, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + // VarModule::on_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL); + // ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 54, 2, 76, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } // else { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 100, 40, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 90, 100, 40, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); // } - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 90, 100, 40, 0, 10.0, 0.0, 42.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 90, 100, 40, 0, 10.0, 0.0, 42.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // else { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); @@ -261,19 +261,19 @@ unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { // } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } // frame(lua_state, 28.0); - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // FT_MOTION_RATE_RANGE(fighter, 28.0, 52.0, 27.0); + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // FT_MOTION_RATE_RANGE(agent, 28.0, 52.0, 27.0); // } // else { - FT_MOTION_RATE_RANGE(fighter, 28.0, 52.0, 17.0); + FT_MOTION_RATE_RANGE(agent, 28.0, 52.0, 17.0); // } - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 270, 100, 80, 0, 14.0, 0.0, 50.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 270, 100, 80, 0, 14.0, 0.0, 50.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); // } // else { ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); @@ -281,143 +281,143 @@ unsafe extern "C" fn miigunner_throw_hi_game(fighter: &mut L2CAgentBase) { // } } // frame(lua_state, 30.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear_all(boma); // } frame(lua_state, 52.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); } } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } wait(lua_state, 2.0); - if is_excute(fighter) { - ATK_POWER(fighter, 0, 3); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); } } -unsafe extern "C" fn miigunner_throw_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); // frame(lua_state, 2.0); - // if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_RATE(fighter, 2.0); + // if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 5.0, 0.0, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_RATE(agent, 2.0); // } // } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 36.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 36.0, 0.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); // } } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 20.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_v"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.75); } frame(lua_state, 28.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); - // LAST_EFFECT_SET_COLOR(fighter, 10.0, 0.7, 0.7); - // LAST_EFFECT_SET_RATE(fighter, 1.6); - // EFFECT(fighter, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 43.0, 0.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.9, 0, 0, 0, 0, 0, 0, true); + // LAST_EFFECT_SET_COLOR(agent, 10.0, 0.7, 0.7); + // LAST_EFFECT_SET_RATE(agent, 1.6); + // EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 43.0, 0.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); // } // else { - EFFECT(fighter, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.6); - EFFECT(fighter, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.5, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_blaster_shot"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.6); + EFFECT(agent, Hash40::new("miigunner_shot_add"), Hash40::new("armr"), 5.3, 0, 0, 90, 0, 90, 0.5, 0, 0, 0, 0, 0, 0, true); // } } } -unsafe extern "C" fn miigunner_throw_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_throw_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } frame(lua_state, 4.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_miigunner_rnd_attack01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_attack01")); } frame(lua_state, 6.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } frame(lua_state, 18.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } // else { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } } frame(lua_state, 28.0); - if is_excute(fighter) { - // if VarModule::is_flag(fighter.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { - // PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_s04")); + if is_excute(agent) { + // if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { + // PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s04")); // } // else { - PLAY_SE(fighter, Hash40::new("se_miigunner_special_c2_n01")); + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_n01")); // } } } -unsafe extern "C" fn miigunner_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 92, 38, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn miigunner_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 92, 38, 0, 95, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 0, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 0, 0); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.5); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: -3.0, z: 0.0}); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } diff --git a/fighters/miigunner/src/acmd/tilts.rs b/fighters/miigunner/src/acmd/tilts.rs index 8ebfda434e..3886675023 100644 --- a/fighters/miigunner/src/acmd/tilts.rs +++ b/fighters/miigunner/src/acmd/tilts.rs @@ -1,95 +1,95 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_s3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(fighter, 2.0, 10.0, 5.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 10.0, 5.0); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 56, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 56, 0, 56, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 8.0, Some(0.0), Some(8.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(15.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(2.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(15.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 2.5, 0.0, 8.0, 6.0, Some(0.0), Some(2.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 3.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 361, 56, 0, 56, 3.0, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATK_POWER(fighter, 1, 10.0); - ATK_POWER(fighter, 2, 10.0); - ATK_POWER(fighter, 3, 10.0); + if is_excute(agent) { + ATK_POWER(agent, 1, 10.0); + ATK_POWER(agent, 2, 10.0); + ATK_POWER(agent, 3, 10.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 361, 56, 0, 56, 1.5, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 361, 56, 0, 56, 1.5, 0.0, 8.0, 6.0, Some(0.0), Some(8.0), Some(25.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); AttackModule::set_size(boma, 2, 2.0); AttackModule::set_size(boma, 3, 2.0); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn miigunner_attack_s3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_s3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FLW_POS(fighter, Hash40::new("miigunner_atk_laser"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn miigunner_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 95, 100, 0, 50, 6.0, 0.0, 6.0, 9.5, Some(0.0), Some(13.0), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("handr"), 9.0, 90, 80, 0, 50, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 95, 100, 0, 50, 6.0, 0.0, 6.0, 9.5, Some(0.0), Some(13.0), Some(9.25), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("handr"), 9.0, 90, 80, 0, 50, 2.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 10.0, 95, 100, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 9.0, 90, 80, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("handr"), 10.0, 95, 100, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("handr"), 8.0, 95, 70, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("handr"), 8.0, 95, 70, 0, 50, 6.0, 9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn miigunner_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn miigunner_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 85, 50, 0, 82, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 9.0, 85, 50, 0, 82, 3.5, 4.5, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 14.0, 80, 79, 0, 70, 6.0, 0.0, 1.6, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 85, 50, 0, 82, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 85, 50, 0, 82, 3.5, 4.5, 0.0, 0.0, Some(2.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 80, 79, 0, 70, 6.0, 0.0, 1.6, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.2, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 41.0, 20.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 41.0, 20.0); + if is_excute(agent) { AttackModule::clear_all(boma); } } diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 55ed27dc3a..c1e7a87aa0 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -152,18 +152,18 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } // #[acmd_script( agent = "miiswordsman_tornadoshot", script = "game_fly" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_tornadoshot_fly_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// AREA_WIND_2ND_RAD_arg9(fighter, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); -// ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 366, 100, 30, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(9.5), Some(3.2), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 1.0, 90, 100, 50, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); +// unsafe fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); +// ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 366, 100, 30, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(9.5), Some(3.2), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); +// ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 50, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); // } // frame(lua_state, 37.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); -// ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); +// ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); // } // } unsafe extern "C" fn miiswordsman_wave_fly_game(agent: &mut L2CAgentBase) { diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs index 4989008747..20f218705b 100644 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ b/fighters/miiswordsman/src/acmd/specials.rs @@ -321,17 +321,17 @@ unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { } /* #[acmd_script( agent = "miiswordsman", script = "game_specials1hit" , category = ACMD_GAME , low_priority)] -unsafe fn miiswordsman_special_s1_hit_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe fn miiswordsman_special_s1_hit_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } @@ -376,11 +376,11 @@ unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { // Vanilla Effects - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); - //EFFECT_FOLLOW(fighter, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); - //EFFECT_DETACH_KIND(fighter, Hash40::new("miiswordsman_blastwind_stab"), -1); + //EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); + //EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_blastwind_stab"), -1); EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); @@ -392,7 +392,7 @@ unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 2.0); if is_excute(agent) { @@ -401,8 +401,8 @@ unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { } frame(lua_state, 3.0); if is_excute(agent) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 1.4); + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 4.0); if is_excute(agent) { @@ -414,16 +414,16 @@ unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { } frame(lua_state, 34.0); if is_excute(agent) { - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); } frame(lua_state, 35.0); if is_excute(agent) { - //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 37.0); if is_excute(agent) { - //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); } } @@ -460,8 +460,8 @@ unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { // Vanilla Effects - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 1, 0.72, 1.1); + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); @@ -475,7 +475,7 @@ unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } frame(lua_state, 2.0); @@ -485,8 +485,8 @@ unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { } frame(lua_state, 3.0); if is_excute(agent) { - //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(fighter, 1.4); + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); } frame(lua_state, 4.0); if is_excute(agent) { @@ -498,16 +498,16 @@ unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { } frame(lua_state, 34.0); if is_excute(agent) { - //EFFECT_FOLLOW_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(fighter, 2.5, 2.5, 2.5); + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); } frame(lua_state, 35.0); if is_excute(agent) { - //EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 37.0); if is_excute(agent) { - //EFFECT_OFF_KIND_WORK(fighter, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); } } @@ -819,14 +819,14 @@ unsafe extern "C" fn game_specialhi2hold(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 17.0); if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); FT_MOTION_RATE(agent, 2.5); } @@ -852,14 +852,14 @@ unsafe extern "C" fn game_specialhi2holdair(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - //VarModule::off_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); FT_MOTION_RATE(agent, 0.6); } frame(lua_state, 17.0); if is_excute(agent) { if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); FT_MOTION_RATE(agent, 2.5); } @@ -887,7 +887,7 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { frame(lua_state, 2.0); if is_excute(agent) { // Charged - //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ ATTACK(agent, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -929,7 +929,7 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { //println!("Launch Angle: {}", launch_angle); // Charged - //if VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -1002,7 +1002,7 @@ unsafe extern "C" fn game_specialhi2landing(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ FT_MOTION_RATE(agent, 0.8); } @@ -1014,7 +1014,7 @@ unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - //if !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ FT_MOTION_RATE(agent, 0.8); } @@ -1225,14 +1225,14 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // Kinesis Blade - Charge Storage // #[acmd_script( agent = "miiswordsman", script = "game_speciallw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_lw1_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// let current_level = VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// unsafe fn miiswordsman_special_lw1_hit_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); // // Attack transition -// if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); // if current_level > 0{ // if current_level == 1 { // // println!("Changing to level 1"); @@ -1247,28 +1247,28 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // else{ // // Increment the level // if current_level < 2 { -// VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level // // println!("Kinesis increment"); // } -// // println!("Kinesis Level: {}", VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); // } // } // frame(lua_state, 23.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(fighter, 0.65); +// //FT_MOTION_RATE(agent, 0.65); // } // } // #[acmd_script( agent = "miiswordsman", script = "game_specialairlw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_air_lw1_hit_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// let current_level = VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// unsafe fn miiswordsman_special_air_lw1_hit_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); // // Attack transition -// if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); // if current_level > 0{ // if current_level == 1 { // // println!("Changing to level 1"); @@ -1283,16 +1283,16 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // else{ // // Increment the level // if current_level < 2 { -// VarModule::set_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level // // println!("Kinesis increment"); // } -// // println!("Kinesis Level: {}", VarModule::get_int(fighter.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); // } // } // frame(lua_state, 23.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(fighter, 0.65); +// //FT_MOTION_RATE(agent, 0.65); // } // } @@ -1615,7 +1615,7 @@ unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) } frame(lua_state, 6.0); if is_excute(agent) { - //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); if is_excute(agent) { @@ -1633,7 +1633,7 @@ unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) } frame(lua_state, 18.0); if is_excute(agent) { - //REVERSE_LR(fighter); + //REVERSE_LR(agent); //AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -6.0, y: 15.0}; @@ -1641,7 +1641,7 @@ unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) } frame(lua_state, 20.0); if is_excute(agent) { - //REVERSE_LR(fighter); + //REVERSE_LR(agent); //AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -12.0, y: 0.0}; @@ -1649,8 +1649,8 @@ unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) } /* frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); //let hit1 = Vector2f {x: 12.0, y: 0.0}; //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); } @@ -1732,7 +1732,7 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg } frame(lua_state, 6.0); if is_excute(agent) { - //ATTACK(fighter, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } frame(lua_state, 14.0); if is_excute(agent) { @@ -1750,7 +1750,7 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg } frame(lua_state, 18.0); if is_excute(agent) { - //REVERSE_LR(fighter); + //REVERSE_LR(agent); //AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -6.0, y: 15.0}; @@ -1758,7 +1758,7 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg } frame(lua_state, 20.0); if is_excute(agent) { - //REVERSE_LR(fighter); + //REVERSE_LR(agent); //AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); let hit1 = Vector2f {x: -12.0, y: 0.0}; @@ -1766,8 +1766,8 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg } /* frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); //let hit1 = Vector2f {x: 12.0, y: 0.0}; //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); } diff --git a/fighters/ness/src/acmd/other.rs b/fighters/ness/src/acmd/other.rs index 5416d51d7e..8b543f12e4 100644 --- a/fighters/ness/src/acmd/other.rs +++ b/fighters/ness/src/acmd/other.rs @@ -26,56 +26,6 @@ unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 10) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -91,46 +41,21 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 4) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 4) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_ness_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ness_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ness_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ness_step_right_l")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_ness_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_ness_step_left_l")); } } @@ -202,10 +127,10 @@ unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_damageflytop", sound_damageflyhi); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); diff --git a/fighters/packun/src/acmd/aerials.rs b/fighters/packun/src/acmd/aerials.rs index cce085bd9b..9269fbff58 100644 --- a/fighters/packun/src/acmd/aerials.rs +++ b/fighters/packun/src/acmd/aerials.rs @@ -1,264 +1,264 @@ use super::*; -unsafe extern "C" fn packun_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); if stance.label != 2 { - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let bkb = if stance.label == 2 {15} else {20}; let kbg = if stance.label == 2 {90} else {45}; - ATTACK(fighter, 0, 0, Hash40::new("arml"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 2.0 * stance.damage_other, 365, kbg, 0, bkb, 5.5, 1.8, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0 * stance.damage_other, 55, 125, 0, 40, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn packun_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 3.0); if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 4.0); + FT_DESIRED_RATE(agent, 6.0, 4.0); } else { - FT_DESIRED_RATE(fighter, 6.0, 7.0); + FT_DESIRED_RATE(agent, 6.0, 7.0); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 40, 94, 0, 30, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 11.0 * stance.damage_other, 40, 94, 0, 30, 7.0, -3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 40, 94, 0, 30, 4.5, 3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 11.0 * stance.damage_other, 40, 94, 0, 30, 7.0, -3.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); } } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn packun_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_f_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn packun_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label != 1 { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -10.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } else { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0 * stance.damage_other, 366, 90, 0, 25, 7.0, 0.0, 4.0, -8.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0 * stance.damage_other, 366, 90, 0, 25, 7.0, 0.0, 4.0, -8.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * stance.damage_other, 50, 108, 0, 25, 9.0, 0.0, 4.0, -8.5, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_poison_param(boma, 0, 121, 30, 1.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } } -unsafe extern "C" fn packun_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); if stance != 1 { frame(lua_state, 6.0); for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); } wait(lua_state, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_atk_air_b_breath"), Hash40::new("mouth"), 7, 0.2, 0, 0, 0, -90, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_atk_air_b_breath"), Hash40::new("mouth"), 7, 0.2, 0, 0, 0, -90, 1, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.5, -12, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.5, -12, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } } else if stance == 1 { frame(lua_state, 6.0); for h in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 7.5, 0, 0, 0, 0, 0, 0.6, true); if h >= 2 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); } } wait(lua_state, 2.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } frame(lua_state, 16.0); for _ in 0..3 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), -1.2, 4.0, -9.5, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } wait(lua_state, 3.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.0, -10.5, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.15, 0.01, 0.5); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 4.0, -10.5, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.01, 0.5); + LAST_EFFECT_SET_RATE(agent, 1.25); } } } -unsafe extern "C" fn packun_attack_air_b_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_b_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if stance != 1 { - PLAY_SE(fighter, Hash40::new("se_packun_attackair_b01")); + PLAY_SE(agent, Hash40::new("se_packun_attackair_b01")); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - PLAY_SE(fighter, Hash40::new("se_packun_special_s03")); + PLAY_SE(agent, Hash40::new("se_packun_special_s03")); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - PLAY_SE(fighter, Hash40::new("se_packun_attackair_b01")); + PLAY_SE(agent, Hash40::new("se_packun_attackair_b01")); } } } -unsafe extern "C" fn packun_attack_air_b_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_b_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 19.5, 45, 95, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 18.0, 45, 90, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 19.5, 45, 95, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -302,96 +302,96 @@ unsafe extern "C" fn packun_attack_air_b_s_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let angle = if stance.label == 1 {105} else {75}; let bkb = if stance.label == 1 {15} else if stance.label == 0 {10} else {0}; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 7.0); + FT_DESIRED_RATE(agent, 6.0, 7.0); } else { - FT_DESIRED_RATE(fighter, 6.0, 9.0); + FT_DESIRED_RATE(agent, 6.0, 9.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, angle, 87, 0, 53 + bkb, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, sound, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, angle, 87, 0, 53 + bkb, 7.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, sound, *ATTACK_REGION_HEAD); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn packun_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_MOTION_RATE(fighter, (11.0/5.0)); + FT_MOTION_RATE(agent, (11.0/5.0)); } else { - FT_MOTION_RATE(fighter, (11.0/9.0)); + FT_MOTION_RATE(agent, (11.0/9.0)); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 5.0, 3.0, 8.0, 1.0); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); if stance.label == 2 { - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 90, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 90, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); /* Air-only */ - ATTACK(fighter, 2, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("potc"), 13.0 * stance.damage_other, 270, 64, 0, 25, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -0.3, 0.0, 0.0, Some(-0.3), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("potc"), 9.0 * stance.damage_other, 361, 92, 0, 15, 4.5, -7.0, -0.5, 0.5, Some(-7.0), Some(-0.5), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } diff --git a/fighters/packun/src/acmd/ground.rs b/fighters/packun/src/acmd/ground.rs index 5da5cb94f1..3a6aad1362 100644 --- a/fighters/packun/src/acmd/ground.rs +++ b/fighters/packun/src/acmd/ground.rs @@ -1,37 +1,37 @@ use super::*; -unsafe extern "C" fn packun_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 20, 2.5, 0.0, 6.3, 5.3, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 18, 2.5, 0.0, 6.3, 8.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4 * stance.damage_other, 180, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 20, 2.5, 0.0, 6.3, 5.3, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 25, 0, 18, 2.5, 0.0, 6.3, 8.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4 * stance.damage_other, 180, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.4 * stance.damage_other, 361, 20, 0, 18, 3.0, 0.0, 6.3, 12.5, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_MIDDLE), false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn packun_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); if stance.label == 2 { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); @@ -41,171 +41,171 @@ unsafe extern "C" fn packun_attack_12_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.2, 0.0, 6.5, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.4, 0.0, 6.5, 10.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.2 * stance.damage_other, 180, 25, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 15, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.2, 0.0, 6.5, 6.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 25, 0, 15, 3.4, 0.0, 6.5, 10.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.2 * stance.damage_other, 180, 25, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.2 * stance.damage_other, 361, 15, 0, 15, 4.0, 0.0, 6.5, 15.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label != 2 { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn packun_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let bkb = if stance.label == 2 {15} else {0}; let angle = if stance.label == 2 {10} else {0}; let sound_level = if stance.label != 2 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_S }; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label == 2 { - FT_DESIRED_RATE(fighter, 7.0, 9.0); + FT_DESIRED_RATE(agent, 7.0, 9.0); } - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 4.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 5.5, 0.0, 8.0, 12.8, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 4.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 5.5, 0.0, 8.0, 12.8, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 7.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.4 * stance.damage_head, 40 - angle, 70, 0, 60 + bkb, 2.5, 0.0, 8.0, 4.7, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level, sound, *ATTACK_REGION_HEAD); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_attack_13_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn packun_attack_13_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -3, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, 0.5); + if is_excute(agent) { + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 11, -3, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, 0.5); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 9, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 13, 9, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn packun_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_100_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 1.8, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.4 * stance.damage_bite, 50, 150, 0, 40, 6.0, 0.0, 7.5, 9.0, None, Some(7.5), Some(15.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_attack_100_end_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_100_end_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.85, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("top"), -1.2, 9, 12.5, 0, 0, 0, 0.85, true); } } frame(lua_state, 5.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("packun_atk_100_finish"), Hash40::new("packun_atk_100_finish"), Hash40::new("top"), -8, 8, 15, 10, -90, 0, 1.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_atk_100_finish"), Hash40::new("packun_atk_100_finish"), Hash40::new("top"), -8, 8, 15, 10, -90, 0, 1.4, true, *EF_FLIP_YZ); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_bite_line"), Hash40::new("mouth"), 3, 0, 0, 0, 0, 10, 1.1, true); - LAST_EFFECT_SET_RATE(fighter, 2.5); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("neck"), 0, 0, 0, 0, 90, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.3); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_bite_line"), Hash40::new("mouth"), 3, 0, 0, 0, 0, 10, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("neck"), 0, 0, 0, 0, 90, 0, 1.5, 0, 0, 0, 0, 0, 0, true, 0.3); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("packun_bite_line2"), Hash40::new("mouth"), 5, 0, 0, -20, 0, 0, 0.9, 0, 1, 0, 0, 0, 0, true); - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_atk_100_finish"), -1); + if is_excute(agent) { + EFFECT(agent, Hash40::new("packun_bite_line2"), Hash40::new("mouth"), 5, 0, 0, -20, 0, 0, 0.9, 0, 1, 0, 0, 0, 0, true); + EFFECT_DETACH_KIND(agent, Hash40::new("packun_atk_100_finish"), -1); } } -unsafe extern "C" fn packun_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); // base 0.93 - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); if stance.label == 2 { - FT_MOTION_RATE(fighter, (10.0/7.0)); + FT_MOTION_RATE(agent, (10.0/7.0)); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 5.0); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 12.0 * stance.damage_other, 45, 100, 0, 45, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0 * stance.damage_other, 45, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.3); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 12.0 * stance.damage_other, 45, 100, 0, 45, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 * stance.damage_other, 45, 100, 0, 45, 4.0, 0.0, 11.0, 0.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.3); if stance.label == 2 { - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_XLU); } } frame(lua_state, 8.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); } wait(lua_state, 1.0); - if is_excute(fighter) { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); + if is_excute(agent) { + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("potc"), 8.0 * stance.damage_other, 50, 43, 0, 90, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0 * stance.damage_other, 50, 43, 0, 90, 4.0, 0.0, 11.0, -2.0, Some(0.0), Some(5.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg3(fighter, 0, 1, 1.3); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("potc"), 8.0 * stance.damage_other, 50, 43, 0, 90, 5.3, -5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0 * stance.damage_other, 50, 43, 0, 90, 4.0, 0.0, 11.0, -2.0, Some(0.0), Some(5.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 1.3); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); } frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 5fd3980bc0..8f5cb5098b 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -1,402 +1,402 @@ use super::*; -unsafe extern "C" fn packun_catch_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_catch_attack_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let damage = if stance != 1 { 0.0 } else { 0.3 }; let effect = if stance != 1 { Hash40::new("collision_attr_normal") } else { Hash40::new("collision_attr_purple") }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_packun_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_packun_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn appeal_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10.0); VarModule::on_flag(boma.object(), vars::packun::instance::STANCE_REVERSE); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { let advance = if VarModule::is_flag(boma.object(), vars::packun::instance::STANCE_REVERSE) {2} else {1}; VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, (cur_stance + advance) % 3); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } wait(lua_state, 1.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } } -unsafe extern "C" fn appeal_hi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_hi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_special_s02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_special_s02")); } } frame(lua_state, 19.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appear01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appear01")); } } } -unsafe extern "C" fn appeal_hi_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_hi_2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - ModelModule::set_mesh_visibility(fighter.boma(), Hash40::new("foot"), true); + if is_excute(agent) { + ModelModule::set_mesh_visibility(agent.boma(), Hash40::new("foot"), true); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 0) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 0); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } frame(lua_state, 107.0); - if is_excute(fighter) { - ModelModule::set_mesh_visibility(fighter.boma(), Hash40::new("foot"), false); + if is_excute(agent) { + ModelModule::set_mesh_visibility(agent.boma(), Hash40::new("foot"), false); } } -unsafe extern "C" fn appeal_hi_2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_hi_2_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn appeal_hi_2_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_hi_2_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } frame(lua_state, 54.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_left_m"), Hash40::new("se_packun_step_right_m")); } frame(lua_state, 78.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_packun_step_right_m"), Hash40::new("se_packun_step_left_m")); } } -unsafe extern "C" fn appeal_hi_2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn appeal_hi_2_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 78.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn appeal_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::AppealSL) { MotionModule::change_motion(boma, Hash40::new("appeal_hi_2"), 0.0, 1.0, false, 0.0, false, false); } } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_button_on(Buttons::AppealSL) && !(cur_stance == 2) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 2); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } } -unsafe extern "C" fn appeal_s_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_s_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s01")); } } frame(lua_state, 14.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s02")); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s03")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s03")); } } frame(lua_state, 46.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_s04")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_s04")); } } } -unsafe extern "C" fn appeal_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if !(cur_stance == 1) { VarModule::set_int(boma.object(), vars::packun::instance::CURRENT_STANCE, 1); - VarModule::on_flag(fighter.object(), vars::packun::instance::STANCE_INIT); + VarModule::on_flag(agent.object(), vars::packun::instance::STANCE_INIT); } } } -unsafe extern "C" fn appeal_lw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn appeal_lw_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_l01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_l01")); } } frame(lua_state, 21.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.object(), vars::packun::status::CLOUD_COVER) { - PLAY_SE(fighter, Hash40::new("se_packun_appeal_l02")); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::packun::status::CLOUD_COVER) { + PLAY_SE(agent, Hash40::new("se_packun_appeal_l02")); } } } -unsafe extern "C" fn packun_spikeball_game_start(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ModelModule::set_scale(boma, scale); MotionModule::set_rate(boma, 1.4); if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } -unsafe extern "C" fn packun_spikeball_game_start_air(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_start_air(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ModelModule::set_scale(boma, scale); MotionModule::set_rate(boma, 1.4); if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } -unsafe extern "C" fn packun_spikeball_game_loop(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } -unsafe extern "C" fn packun_spikeball_loop_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_loop_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); } } } -unsafe extern "C" fn packun_spikeball_game_shoot(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; if WorkModule::is_flag(boma, *WEAPON_PACKUN_SPIKEBALL_INSTANCE_WORK_ID_FLAG_REACTIVE) { - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } else { - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } -unsafe extern "C" fn packun_spikeball_shoot_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_shoot_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; if stance == 1 { for _ in 0..999 { - if is_excute(fighter) { + if is_excute(agent) { if boma.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP){ - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); } } wait(lua_state, 3.0); @@ -404,108 +404,108 @@ unsafe extern "C" fn packun_spikeball_shoot_effect(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_spikeball_game_fall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } } -unsafe extern "C" fn packun_spikeball_fall_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_fall_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); } } } -unsafe extern "C" fn packun_spikeball_game_wait(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_wait(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { - ATTACK(fighter, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); } else { let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(fighter, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } /*frame(lua_state, 55.0); - if is_excute(fighter) { + if is_excute(agent) { if stance == 1 { WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 361, 45, 3.0, false); } }*/ } -unsafe extern "C" fn packun_spikeball_wait_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_wait_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; if stance == 1 { - if is_excute(fighter) { - //EFFECT_BRANCH_SITUATION(fighter, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); } } } -unsafe extern "C" fn packun_spikeball_game_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ModelModule::set_scale(boma, 0.1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); AttackModule::set_poison_param(boma, 0, 151, 30, 3.5, false); } } -unsafe extern "C" fn packun_spikeball_effect_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_effect_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); - LAST_EFFECT_SET_COLOR(fighter, 0.1, 0.01, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.01, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.25); } } -unsafe extern "C" fn packun_spikeball_sound_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_spikeball_sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); } } @@ -559,23 +559,23 @@ unsafe extern "C" fn game_startmax(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_poisonbreath_game_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_poisonbreath_game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); } } @@ -598,13 +598,13 @@ unsafe extern "C" fn packun_poisonbreath_effect_explode(agent: &mut L2CAgentBase } } -unsafe extern "C" fn packun_poisonbreath_sound_explode(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_poisonbreath_sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_bomb_l")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); } } diff --git a/fighters/packun/src/acmd/smashes.rs b/fighters/packun/src/acmd/smashes.rs index 24dc2fc442..d87c56572e 100644 --- a/fighters/packun/src/acmd/smashes.rs +++ b/fighters/packun/src/acmd/smashes.rs @@ -1,96 +1,96 @@ use super::*; -unsafe extern "C" fn packun_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let kbg = if stance.label == 0 { 110 } else if stance.label == 1 { 140 } else { 100 }; let hitlag = if stance.label != 2 { 1.2 } else { 1.5 }; let sound = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 15.0 * stance.damage_head, 45, kbg, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 14.0 * stance.damage_head, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 15.0 * stance.damage_head, 45, kbg, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn packun_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label != 2 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 1.4); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12, 11, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_smash_s_arc_l"), Hash40::new("top"), 0, 13, 3.5, 40, 60, 0, 1.6, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_smash_s_arc_l"), Hash40::new("top"), 0, 13, 3.5, 40, 60, 0, 1.6, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("packun_smash_s_arc_r"), Hash40::new("top"), 0, 13, 3.5, 40, -60, 0, 1.6, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_smash_s_arc_r"), Hash40::new("top"), 0, 13, 3.5, 40, -60, 0, 1.6, true); } } frame(lua_state, 14.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn packun_attack_s4_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s4_s2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 25.0, 45, 100, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_XLU); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 20.0, 45, 100, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 25.0, 45, 100, 0, 25, 7.0, 2.5, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_XLU); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 60, 75, 0, 40, 6.0, 0.0, 5.0, 5.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck6"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("neck8"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } } @@ -212,56 +212,56 @@ unsafe extern "C" fn packun_attack_s4_s2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_DESIRED_RATE(fighter, 8.0, 11.0); + FT_DESIRED_RATE(agent, 8.0, 11.0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 2 { VarModule::on_flag(boma.object(), vars::packun::status::BITE_START); } } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::packun::status::BITE_START); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 75, 0, 0, 75, 5.5, 0.0, 12.0, -4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 105, 0, 0, 75, 5.5, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 75, 0, 0, 75, 5.5, 0.0, 12.0, -4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0 * stance.damage_bite, 105, 0, 0, 75, 5.5, 0.0, 12.0, 4.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 12.5 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); if VarModule::is_flag(boma.object(), vars::packun::status::BURST) { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 14.0 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("mouth"), 8.5, 90, 86, 0, 90, 9.0, 4.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 14.0 * stance.damage_bite, 90, 86, 0, 90, 9.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("mouth"), 8.5, 90, 86, 0, 90, 9.0, 4.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.45, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BITE); } } } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::BURST); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } } @@ -331,9 +331,9 @@ unsafe extern "C" fn packun_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let angle1 = if stance.label == 0 { 175 } else { 32 }; let angle2 = if stance.label == 0 { 94 } else { 30 }; @@ -346,22 +346,22 @@ unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { let element = if stance.label == 0 { Hash40::new("collision_attr_fire") } else { Hash40::new("collision_attr_normal") }; let lvl1 = if stance.label == 0 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_L }; if stance.label == 2 { - FT_DESIRED_RATE(fighter, 6.0, 9.0); + FT_DESIRED_RATE(agent, 6.0, 9.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); if stance.label == 0 { - FT_DESIRED_RATE(fighter, 7.0, 3.0); + FT_DESIRED_RATE(agent, 7.0, 3.0); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 5.0, 0.0, 4.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 4.0, 0.0, 3.5, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 5.0, 0.0, 4.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg1 * stance.damage_other, angle1, 99, fkb1, bkb1, 4.0, 0.0, 3.5, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, lvl1, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label == 0 { VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } @@ -370,60 +370,60 @@ unsafe extern "C" fn packun_attack_lw4_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 5.0, 0.0, 4.0, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 4.0, 0.0, 3.6, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 5.0, 0.0, 4.0, -13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), dmg2 * stance.damage_other, angle2, kbg2, 0, bkb2, 4.0, 0.0, 3.6, -8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, element, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); if stance.label != 0 { AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } } -unsafe extern "C" fn packun_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_lw4_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 4, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 5, 4, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 9.5); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, 1.0, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, 1.0, 0, 0, 0, 0, 0.6, true); } } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT_FLIP(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); + if is_excute(agent) { + LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 1, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); } - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, 3, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, 3, -180, 150, 7, 1.4, true, *EF_FLIP_YZ); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 0 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("potc"), -8, 0, 0, 0, 0, 0, 1.2, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("packun_smash_lw_arc"), true, true); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, -4, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("packun_smash_lw_arc"), true, true); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("packun_smash_lw_arc"), Hash40::new("packun_smash_lw_arc"), Hash40::new("top"), 0, 5, -4, -180, 20, 5, 1.4, true, *EF_FLIP_YZ); } } diff --git a/fighters/packun/src/acmd/specials.rs b/fighters/packun/src/acmd/specials.rs index 7da1e62ae6..c0ad9e68ca 100644 --- a/fighters/packun/src/acmd/specials.rs +++ b/fighters/packun/src/acmd/specials.rs @@ -1,25 +1,25 @@ use super::*; -unsafe extern "C" fn packun_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); frame(lua_state, 1.0); if stance != 2 { - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } else { - FT_MOTION_RATE(fighter, 9.0/(9.0 - 1.0)); + FT_MOTION_RATE(agent, 9.0/(9.0 - 1.0)); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE_SPIKEBALL); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 0.7); + FT_MOTION_RATE(agent, 0.7); } unsafe extern "C" fn packun_special_s_shoot_game(agent: &mut L2CAgentBase) { @@ -308,38 +308,38 @@ unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_special_s_shoot_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_s_shoot_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } if stance == 0 { frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); if WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60 { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosionm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosionm"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); } } } else { frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } @@ -412,241 +412,241 @@ unsafe extern "C" fn packun_special_s_shoot_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn packun_special_s_shoot_s_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60 { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } } -unsafe extern "C" fn packun_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - FT_MOTION_RATE(fighter, (10.0/15.0)); + FT_MOTION_RATE(agent, (10.0/15.0)); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 30, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 38.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 40, 70, 0, 70, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 86.0); - FT_MOTION_RATE(fighter, 3.03); + FT_MOTION_RATE(agent, 3.03); frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } } -unsafe extern "C" fn packun_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - FT_MOTION_RATE(fighter, (10.0/15.0)); + FT_MOTION_RATE(agent, (10.0/15.0)); frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if !boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 10.0 * stance.damage_other, 40, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { if !boma.is_status(*FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_END) { - ATTACK(fighter, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 3.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 7.0 * stance.damage_other, 50, 70, 0, 50, 5.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } } frame(lua_state, 70.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 86.0); - FT_MOTION_RATE(fighter, 3.03); + FT_MOTION_RATE(agent, 3.03); frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } } -unsafe extern "C" fn packun_special_lw_bite_attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_lw_bite_attack_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if WorkModule::get_float(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_WORK_FLOAT_CHARGE_RATE) > 1.0 { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } } else { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 2.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_ATTACK_LERP); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_BITE_ATTACK); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn packun_special_lw_bite__attack_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_lw_bite__attack_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if WorkModule::get_float(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_WORK_FLOAT_CHARGE_RATE) > 1.0 { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 20.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 26.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } } } else { - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 2.0, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 0.0 * stance.damage_head, 55, 55, 0, 75, 7.9, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_ATTACK_LERP); } } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_LW_FLAG_BITE_ATTACK); - search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); } } -unsafe extern "C" fn packun_special_lw_bite_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_lw_bite_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.8, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.8, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.85 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_longrange_bite"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("packun_longrange_bite"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.9 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); } } -unsafe extern "C" fn packun_special_air_lw_bite_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_special_air_lw_bite_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_start"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, 0.85, true); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_COLOR(fighter, 0.5, 0.5, 0.5); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 0.5); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_max"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("mouth"), 6, -0.6, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 2.0); } } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.85 } else { 1.0 }; - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.9, true); - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("packun_longrange_bite_line"), Hash40::new("mouth"), 6, 0, 0, 0, 90, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite"), Hash40::new("mouth"), 0, 0, 0, 180, 0, 0, size, true); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_DETACH_KIND(fighter, Hash40::new("packun_longrange_bite"), -1); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("packun_longrange_bite"), -1); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let size = if stance.label != 2 { 0.9 } else { 1.0 }; - EFFECT_FOLLOW(fighter, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_longrange_bite_line2"), Hash40::new("mouth"), 5, 0, 0, 0, 90, 0, size, true); } } diff --git a/fighters/packun/src/acmd/throws.rs b/fighters/packun/src/acmd/throws.rs index 3763cf9000..679088345b 100644 --- a/fighters/packun/src/acmd/throws.rs +++ b/fighters/packun/src/acmd/throws.rs @@ -1,23 +1,23 @@ use super::*; -unsafe extern "C" fn packun_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.2); + FT_MOTION_RATE(agent, 1.2); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(11.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } @@ -64,131 +64,131 @@ unsafe extern "C" fn packun_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); if stance.label == 2 { - FT_MOTION_RATE(fighter, (17.0/13.0)); + FT_MOTION_RATE(agent, (17.0/13.0)); } - if is_excute(fighter) { + if is_excute(agent) { let angle = if stance.label == 2 { 10 } else { 0 }; let kbg = if stance.label == 2 { 12 } else { 0 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0 * stance.damage_head, 45 - angle, 65 + kbg, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0 * stance.damage_head, 45 - angle, 65 + kbg, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { let sfx_lvl = if stance.label == 2 { *ATTACK_SOUND_LEVEL_L } else { *ATTACK_SOUND_LEVEL_M }; - ATTACK(fighter, 0, 0, Hash40::new("mouth"), 3.0 * stance.damage_head, 361, 100, 0, 50, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("mouth"), 3.0 * stance.damage_head, 361, 100, 0, 50, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sfx_lvl, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 30, 8); + CHECK_FINISH_CAMERA(agent, 30, 8); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn packun_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let kbg = if VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE) == 0 { 87 } else { 77 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, kbg, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 45, kbg, 0, 54, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 26, 11); + CHECK_FINISH_CAMERA(agent, 26, 11); } frame(lua_state, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn packun_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_throw_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); - if is_excute(fighter) { + if is_excute(agent) { let damage = if stance.label != 1 { 0.0 } else { 3.0 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0 * stance.damage_bite + damage, 90, 67, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 13.0 * stance.damage_bite + damage, 90, 67, 0, 64, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK_IGNORE_THROW(fighter, 0, 0, Hash40::new("mouth"), 5.0, 90, 100, 0, 82, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("mouth"), 5.0, 90, 100, 0, 82, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); //AttackModule::set_catch_only_all(boma, true, false); - FT_CATCH_STOP(fighter, 8, 1); + FT_CATCH_STOP(agent, 8, 1); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); if stance.label == 1 { - ATTACK(fighter, 1, 1, Hash40::new("mouth"), 0.0, 90, 0, 0, 0, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); + ATTACK(agent, 1, 1, Hash40::new("mouth"), 0.0, 90, 0, 0, 0, 7.0, 2.0, 0.0, 0.0, Some(3.5), Some(0.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_THROW); //AttackModule::set_poison_param(boma, 1, 136, 45, 2.0, false); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_LEAVE_NEAR_OTTOTTO(fighter, -2.5, 2.5); + if is_excute(agent) { + FT_LEAVE_NEAR_OTTOTTO(agent, -2.5, 2.5); let angle = if stance.label == 0 { 66 } else if stance.label == 1 { 68 } else { 70 }; - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0 * stance.damage_bite, angle, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 3.0 * stance.damage_bite, angle, 75, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if stance.label == 1 { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_poison_param(boma, 0, 121, 30, 1.5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5 * stance.damage_bite, 0, 100, 0, 0, 6.0, 0.0, 7.0, 0.0, None, None, None, 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); } AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 8, 0); + CHECK_FINISH_CAMERA(agent, 8, 0); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } diff --git a/fighters/packun/src/acmd/tilts.rs b/fighters/packun/src/acmd/tilts.rs index d22fa1f5b6..32a2b45141 100644 --- a/fighters/packun/src/acmd/tilts.rs +++ b/fighters/packun/src/acmd/tilts.rs @@ -1,73 +1,72 @@ - use super::*; -unsafe extern "C" fn packun_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let shield_damage = if stance.label != 2 { 0 } else { 2 }; if stance.label == 2 { - FT_MOTION_RATE(fighter, (9.0/7.0)); + FT_MOTION_RATE(agent, (9.0/7.0)); } frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.5 * stance.damage_bite, 366, 20, 0, 20, 6.3, 0.0, 7.5, 12.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); - ATTACK(fighter, 2, 0, Hash40::new("virtualhit2"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5 * stance.damage_bite, 366, 20, 0, 20, 6.3, 0.0, 7.5, 12.0, Some(0.0), Some(10.5), Some(13.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); + ATTACK(agent, 2, 0, Hash40::new("virtualhit2"), 5.5 * stance.damage_bite, 361, 20, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, shield_damage, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); AttackModule::set_add_reaction_frame(boma, 0, 11.0, false); AttackModule::set_add_reaction_frame(boma, 1, 11.0, false); AttackModule::set_add_reaction_frame(boma, 2, 11.0, false); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn packun_attack_s3_s_a_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s3_s_a_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); - ATTACK(fighter, 0, 0, Hash40::new("virtualhit2"), 5.5, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit3"), 5.5, 361, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 0, Hash40::new("mouth"), 9.0, 361, 120, 0, 40, 6.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("virtualhit2"), 5.5, 361, 120, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("virtualhit3"), 5.5, 361, 120, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("mouth"), 9.0, 361, 120, 0, 40, 6.3, 4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn packun_attack_s3_s_a_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s3_s_a_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 180, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 180, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, -1.0, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("mouth"), 6.0, -1.0, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); let color_hash = match color { 0 => Hash40::new("packun_atk_hi_trace_01"), @@ -80,15 +79,15 @@ unsafe extern "C" fn packun_attack_s3_s_a_effect(fighter: &mut L2CAgentBase) { 7 => Hash40::new("packun_atk_hi_trace_08"), _ => Hash40::new("packun_atk_hi_trace_01") }; - EFFECT_FOLLOW(fighter, color_hash, Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_hi_wind"), Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, color_hash, Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_hi_wind"), Hash40::new("top"), 0, 8, -7, -180, -210, -90, 1, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_air_b_fire"), Hash40::new("mouth"), 9, 0, 0, 0, 0, 0, 1.2, true); } } @@ -105,16 +104,16 @@ unsafe extern "C" fn packun_attack_s3_s_a_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s_a_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn packun_attack_s3_s_a_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } @@ -230,138 +229,138 @@ unsafe extern "C" fn packun_attack_s3_s2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_s3_s2_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let atk_frame = if stance.label == 2 { 6.0 } else { 5.0 }; - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, atk_frame); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn packun_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let sound_level_neck = if stance.label != 2 { *ATTACK_SOUND_LEVEL_S } else { *ATTACK_SOUND_LEVEL_S }; let sound_neck = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; let sound_level_head = if stance.label != 2 { *ATTACK_SOUND_LEVEL_M } else { *ATTACK_SOUND_LEVEL_M }; let sound_head = if stance.label != 2 { *COLLISION_SOUND_ATTR_PUNCH } else { *COLLISION_SOUND_ATTR_HEAVY }; if stance.label == 2 { - FT_MOTION_RATE(fighter, (9.0/6.0)); + FT_MOTION_RATE(agent, (9.0/6.0)); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("virtualhit1"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("virtualhit2"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("virtualhit3"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); - ATTACK(fighter, 3, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, 85, 100, 0, 55, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_head, sound_head, *ATTACK_REGION_HEAD); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_XLU); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("virtualhit1"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("virtualhit2"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("virtualhit3"), 7.0 * stance.damage_head, 80, 100, 0, 55, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_neck, sound_neck, *ATTACK_REGION_BODY); + ATTACK(agent, 3, 0, Hash40::new("mouth"), 9.0 * stance.damage_head, 85, 100, 0, 55, 6.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), sound_level_head, sound_head, *ATTACK_REGION_HEAD); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_XLU); } wait(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("mouth"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("mouth"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } } -unsafe extern "C" fn packun_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn packun_attack_hi3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn packun_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); let bkb = if stance.label == 1 {10} else {0}; if stance.label != 2 { - FT_DESIRED_RATE(fighter, 6.0, 3.0); + FT_DESIRED_RATE(agent, 6.0, 3.0); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 4.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 3.4, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0 * stance.damage_other, 86, 75, 0, 60 + bkb, 5.0, 0.0, 2.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 4.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 * stance.damage_other, 73, 75, 0, 60 + bkb, 5.0, 0.0, 3.4, 9.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0 * stance.damage_other, 86, 75, 0, 60 + bkb, 5.0, 0.0, 2.8, 16.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn packun_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn packun_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), 0.7, 4.6, 4.6, -170, -20, -12, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), 0.7, 4.6, 4.6, -170, -20, -12, 1, true); } } else { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), -0.7, 4.6, 4.6, -10, 200, 12, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("packun_atk_lw_arc"), Hash40::new("top"), -0.7, 4.6, 4.6, -10, 200, 12, 1, true); } } } -unsafe extern "C" fn packun_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); +unsafe extern "C" fn packun_attack_lw3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 2.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 14); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 14); } } diff --git a/fighters/palutena/src/acmd/aerials.rs b/fighters/palutena/src/acmd/aerials.rs index 20e14df054..e88c0c9900 100644 --- a/fighters/palutena/src/acmd/aerials.rs +++ b/fighters/palutena/src/acmd/aerials.rs @@ -1,89 +1,89 @@ use super::*; -unsafe extern "C" fn palutena_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.870); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 95, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.870); + ATTACK(agent, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 95, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 1.5, 366, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, 5.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("stick"), 1.5, 100, 100, 40, 0, 4.2, 0.0, -5.4, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 50, 150, 0, 37, 1.5, 0.0, 12.3, 5.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 5.0, 50, 150, 0, 37, 10.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 50, 150, 0, 37, 1.5, 0.0, 12.3, 5.3, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("stick"), 5.0, 50, 150, 0, 37, 10.5, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 32.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); AttackModule::clear_all(boma); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn palutena_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.714); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.714); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 361, 81, 0, 38, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 361, 81, 0, 38, 4.5, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 9.0, 53, 82, 0, 37, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -113,34 +113,34 @@ unsafe extern "C" fn palutena_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(8.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(8.0-1.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 3.5, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 16.0, 361, 98, 0, 31, 6.7, 0.0, 10.7, -13.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 3.5, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 98, 0, 31, 6.7, 0.0, 10.7, -13.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 11.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 29.0/(49.0-11.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 29.0/(49.0-11.0)); AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -172,43 +172,43 @@ unsafe extern "C" fn palutena_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - FT_DESIRED_RATE(fighter, 13.0, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 105, 100, 45, 0, 4.0, 0.0, 20.0, 6.0, Some(0.0), Some(20.0), Some(-6.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 22.799999, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, 4.0, Some(0.0), Some(22.0), Some(9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(22.0), Some(-9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 16.0, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + FT_DESIRED_RATE(agent, 13.0, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 105, 100, 45, 0, 4.0, 0.0, 20.0, 6.0, Some(0.0), Some(20.0), Some(-6.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 22.799999, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, 4.0, Some(0.0), Some(22.0), Some(9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 3.0, 0.0, 18.0, -4.0, Some(0.0), Some(22.0), Some(-9.0), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 365, 100, 40, 0, 4.0, 0.0, 16.0, 0.0, None, None, None, 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 23.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, 4.0, Some(0.0), Some(23.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, -4.0, Some(0.0), Some(23.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 23.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, 4.0, Some(0.0), Some(23.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 4.0, 0.0, 18.0, -4.0, Some(0.0), Some(23.0), Some(-12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 88, 113, 0, 59, 6.0, 0.0, 17.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } @@ -236,72 +236,72 @@ unsafe extern "C" fn palutena_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 50, 97, 0, 34, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 50, 97, 0, 34, 4.0, 0.0, 2.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 50, 97, 0, 34, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 13.0, 270, 87, 0, 22, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 13.0, 270, 87, 0, 22, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 11.0, 95, 59, 0, 52, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 95, 59, 0, 52, 4.0, 0.0, 0.0, 1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 11.0, 95, 59, 0, 52, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn palutena_attack_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn palutena_attack_air_lw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } diff --git a/fighters/palutena/src/acmd/ground.rs b/fighters/palutena/src/acmd/ground.rs index 2303dde490..61c39c5e8e 100644 --- a/fighters/palutena/src/acmd/ground.rs +++ b/fighters/palutena/src/acmd/ground.rs @@ -1,106 +1,106 @@ use super::*; -unsafe extern "C" fn palutena_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 4, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 5, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 6, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 7, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 80, 50, 0, 45, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 4, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 5, 0, Hash40::new("top"), 6.0, 361, 20, 0, 25, 4.0, 0.0, 6.5, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 6, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 7, 0, Hash40::new("top"), 6.0, 180, 20, 0, 25, 5.5, 0.0, 9.5, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.700); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.700); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn palutena_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_attack_100_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 16.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 10.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 140, 0, 55, 6.0, 0.0, 12.0, 16.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 5.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualshield"), *HIT_STATUS_INVINCIBLE); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualshield"), *HIT_STATUS_INVINCIBLE); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 50, 75, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 11.0, 70, 75, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 50, 75, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 11.0, 70, 75, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 7.0, 75, 60, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 7.0, 75, 60, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 7.0, 75, 60, 0, 70, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("arml"), 7.0, 75, 60, 0, 70, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - HIT_NODE(fighter, Hash40::new("virtualshield"), *HIT_STATUS_OFF); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("virtualshield"), *HIT_STATUS_OFF); } frame(lua_state, 18.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 20.0/(40.0-18.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 20.0/(40.0-18.0)); AttackModule::clear_all(boma); } diff --git a/fighters/palutena/src/acmd/other.rs b/fighters/palutena/src/acmd/other.rs index 0685291c58..0c45c70dd2 100644 --- a/fighters/palutena/src/acmd/other.rs +++ b/fighters/palutena/src/acmd/other.rs @@ -1,181 +1,106 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.4); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.4); } frame(lua_state, 11.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_palutena_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_palutena_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.2); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.2); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); // Effectively F15 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn palutena_explosiveflame_reserve_wait_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - FT_MOTION_RATE(fighter, 10.0); +unsafe extern "C" fn palutena_explosiveflame_reserve_wait_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + FT_MOTION_RATE(agent, 10.0); } } -unsafe extern "C" fn palutena_reflectionboard_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_reflectionboard_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.1); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); } frame(lua_state, 210.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } @@ -287,89 +212,89 @@ unsafe extern "C" fn palutena_autoaimbullet_shot_effect(agent: &mut L2CAgentBase } } -unsafe extern "C" fn palutena_explosiveflame_explode_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); +unsafe extern "C" fn palutena_explosiveflame_explode_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 6.0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 7.2); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 8.4); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 9.6); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 10.8); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 12.0); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - //AREA_WIND_2ND_RAD(fighter, 0, 1, 0.02, 1000, 1, 0, 0, 29); + //AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 29); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } pub fn install() { smashline::Agent::new("palutena") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/palutena/src/acmd/smashes.rs b/fighters/palutena/src/acmd/smashes.rs index e7528801f8..95c2efc4c9 100644 --- a/fighters/palutena/src/acmd/smashes.rs +++ b/fighters/palutena/src/acmd/smashes.rs @@ -71,28 +71,28 @@ unsafe extern "C" fn palutena_attack_s4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 88, 91, 0, 53, 4.5, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 9.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 88, 91, 0, 53, 4.5, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 88, 91, 0, 53, 2.8, 0.0, 22.0, 9.7, Some(0.0), Some(2.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 9.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 88, 91, 0, 53, 2.8, 0.0, 22.0, 9.7, Some(0.0), Some(2.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 91, 0, 58, 2.8, 0.0, 44.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 88, 91, 0, 62, 2.8, 0.0, 65.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/palutena/src/acmd/throws.rs b/fighters/palutena/src/acmd/throws.rs index 5605ea8655..7c772738dd 100644 --- a/fighters/palutena/src/acmd/throws.rs +++ b/fighters/palutena/src/acmd/throws.rs @@ -1,151 +1,151 @@ use super::*; -unsafe extern "C" fn palutena_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn palutena_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(12.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn palutena_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn palutena_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.2, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.2, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-18.6), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn palutena_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 52, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn palutena_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 52, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 10, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 10, 9); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn palutena_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 361, 92, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 14, 19); + CHECK_FINISH_CAMERA(agent, 14, 19); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - REVERSE_LR(fighter); + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn palutena_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 98, 95, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn palutena_throw_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 98, 95, 0, 66, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 7, 20); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 7, 20); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 24.0, 18.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 73, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn palutena_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 24.0, 18.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 5.0, 73, 30, 0, 90, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 4, 1); - CHECK_FINISH_CAMERA(fighter, 7, 0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 4, 1); + CHECK_FINISH_CAMERA(agent, 7, 0); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } diff --git a/fighters/palutena/src/acmd/tilts.rs b/fighters/palutena/src/acmd/tilts.rs index 67213ec541..8a1ef7b03e 100644 --- a/fighters/palutena/src/acmd/tilts.rs +++ b/fighters/palutena/src/acmd/tilts.rs @@ -1,46 +1,46 @@ use super::*; -unsafe extern "C" fn palutena_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 11.0/(16.0-0.0)); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 11.0/(16.0-0.0)); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 16.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 17.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 90, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 45, 100, 45, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 90, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 45, 100, 45, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 285, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 100, 100, 40, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 285, 100, 25, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 100, 100, 40, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("stick"), 6.0, 20, 100, 35, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("stick"), 6.0, 85, 100, 30, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("stick"), 6.0, 20, 100, 35, 0, 4.3, 0.0, 5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("stick"), 6.0, 85, 100, 30, 0, 3.3, 0.0, -5.5, 0.0, None, None, None, 0.8, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 29.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 5.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 4.3, 0.0, -5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 5.3, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 1, Hash40::new("stick"), 7.0, 40, 87, 0, 78, 4.3, 0.0, -5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 41.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } } @@ -145,40 +145,40 @@ unsafe extern "C" fn palutena_attack_s3_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.778); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.778); } frame(lua_state, 9.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.571); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.4, 367, 100, 20, 0, 3.0, 0.0, 18.0, 4.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.4, 130, 100, 50, 0, 2.0, 0.0, 15.0, 10.5, Some(0.0), Some(15.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.4, 190, 100, 30, 0, 2.0, 0.0, 20.0, 10.5, Some(0.0), Some(20.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.4, 90, 100, 35, 0, 5.0, 0.0, 8.0, 3.5, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.571); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 367, 100, 20, 0, 3.0, 0.0, 18.0, 4.0, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.4, 130, 100, 50, 0, 2.0, 0.0, 15.0, 10.5, Some(0.0), Some(15.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.4, 190, 100, 30, 0, 2.0, 0.0, 20.0, 10.5, Some(0.0), Some(20.0), Some(-5.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.4, 90, 100, 35, 0, 5.0, 0.0, 8.0, 3.5, None, None, None, 0.75, 0.3, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 31.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 23.0, 10.5, Some(0.0), Some(23.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 17.0, 10.5, Some(0.0), Some(17.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 23.0, 10.5, Some(0.0), Some(23.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 85, 136, 0, 75, 3.0, 0.0, 17.0, 10.5, Some(0.0), Some(17.0), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } @@ -283,68 +283,68 @@ unsafe extern "C" fn palutena_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.693); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.693); } frame(lua_state, 12.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.870); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.870); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); // Air only hitboxes - ATTACK(fighter, 2, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 3, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { // Ground only hitboxes - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.5, 83, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("stick"), 8.5, 83, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 83, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); // Air only hitboxes - ATTACK(fighter, 3, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 4, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 5, 0, Hash40::new("top"), 8.5, 76, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 67, 90, 0, 45, 4.0, 0.0, 2.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 4, 0, Hash40::new("stick"), 8.5, 76, 90, 0, 45, 4.0, -0.5, 8.0, 0.0, Some(-0.5), Some(-7.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 5, 0, Hash40::new("top"), 8.5, 76, 90, 0, 45, 4.0, 0.0, 2.0, 24.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 25.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(35.0-25.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(35.0-25.0)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn palutena_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn palutena_attack_lw3_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); } frame(lua_state, 13.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 34.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); } } diff --git a/fighters/rockman/src/airshooter/acmd.rs b/fighters/rockman/src/airshooter/acmd.rs index 9ec3c806d2..b097813655 100644 --- a/fighters/rockman/src/airshooter/acmd.rs +++ b/fighters/rockman/src/airshooter/acmd.rs @@ -1,20 +1,20 @@ use super::*; -unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 366, 100, 50, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 366, 100, 50, 0, 5.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 0.7, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); } frame(lua_state, 20.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::rockman_airshooter::status::MOVE); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::rockman_airshooter::status::MOVE); } frame(lua_state, 30.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 90, 50, 0, 90, 7.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 0.5); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 50, 0, 90, 7.0, 0.0, 3.0, 0.0, None, None, None, 0.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); WorkModule::on_flag(boma, *WEAPON_ROCKMAN_AIRSHOOTER_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); } } diff --git a/fighters/rockman/src/hardknuckle/acmd.rs b/fighters/rockman/src/hardknuckle/acmd.rs index 27b917e4b4..4b441d4a27 100644 --- a/fighters/rockman/src/hardknuckle/acmd.rs +++ b/fighters/rockman/src/hardknuckle/acmd.rs @@ -1,58 +1,58 @@ use super::*; -unsafe extern "C" fn game_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 270, 61, 0, 8, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 270, 74, 0, 38, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); +unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 270, 61, 0, 8, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 270, 74, 0, 38, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *WEAPON_ROCKMAN_HARDKNUCKLE_INSTANCE_WORK_ID_FLAG_ATTACK_VECTOR_REVERSE_UD_CHECK); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 90, 20, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); // sv_kinetic_energy!( // set_speed, - // fighter, + // agent, // WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, // 0.0, // -0.5 // ); sv_kinetic_energy!( set_stable_speed, - fighter, + agent, WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, 0.0, 0.0 ); sv_kinetic_energy!( set_brake, - fighter, + agent, WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, 0.0, 0.8 ); } // frame(lua_state, 6.0); - // if is_excute(fighter) { + // if is_excute(agent) { // AttackModule::clear_all(boma); // } } -unsafe extern "C" fn effect_regular(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("rockman_hardknuckle"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("rockman_hardknuckle"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); } // frame(lua_state, 6.0); - // if is_excute(fighter) { - // EFFECT_OFF_KIND(fighter, Hash40::new("rockman_hardknuckle"), true, true); + // if is_excute(agent) { + // EFFECT_OFF_KIND(agent, Hash40::new("rockman_hardknuckle"), true, true); // } } diff --git a/fighters/rosetta/src/acmd/aerials.rs b/fighters/rosetta/src/acmd/aerials.rs index 314f963aa6..c3e8e094f9 100644 --- a/fighters/rosetta/src/acmd/aerials.rs +++ b/fighters/rosetta/src/acmd/aerials.rs @@ -1,301 +1,301 @@ use super::*; -unsafe extern "C" fn rosetta_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn rosetta_attack_air_n_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn rosetta_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 1.0, 70, 10, 0, 90, 5.5, 1.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 1.0, 70, 10, 0, 90, 5.5, 1.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 4.0, -2.5, 0.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("footl"), 1.0, 100, 10, 0, 72, 5.8, 6.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("footl"), 1.0, 86, 10, 0, 90, 4.5, 3.0, 6.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 6, 0, Hash40::new("hip"), 1.0, 25, 10, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 4.0, -2.5, 0.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 1.0, 115, 10, 0, 36, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("footl"), 1.0, 100, 10, 0, 72, 5.8, 6.0, -1.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("footl"), 1.0, 86, 10, 0, 90, 4.5, 3.0, 6.5, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 6, 0, Hash40::new("hip"), 1.0, 25, 10, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::clear(boma, 0, false); } frame(lua_state, 19.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, -2.0, Some(8.0), Some(-6.2), Some(-2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 1.0, 36, 10, 0, 60, 1.5, 1.7, -3.8, 2.0, Some(8.0), Some(-6.2), Some(2.0), 0.75, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 4.0, 361, 132, 0, 50, 8.0, 6.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 361, 132, 0, 50, 6.0, -3.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 4.0, 361, 132, 0, 50, 8.0, 6.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 361, 132, 0, 50, 6.0, -3.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 78.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn rosetta_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 5.5, 0.0, 10.0, -17.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 5.5, 0.0, 10.0, -17.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 40, 86, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 5.0, 0.0, 10.0, -17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 5.0, 0.0, 10.0, -17.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 4.0, 0.0, 10.0, -10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 40, 73, 0, 38, 3.5, 0.0, 10.0, -5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 44.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rosetta_tico_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_tico_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rosetta_tico_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_tico_attack_air_b_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); } frame(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); } frame(lua_state, 12.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); } } -unsafe extern "C" fn rosetta_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 88, 98, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 88, 98, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("hip"), 10.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 6.0, 88, 98, 0, 40, 2.5, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 6.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 88, 98, 0, 40, 2.5, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 6.0, 88, 98, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 6.0, 88, 98, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 4.0, 88, 98, 0, 20, 2.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("head"), 4.0, 88, 98, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 88, 98, 0, 20, 2.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("head"), 4.0, 88, 98, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("bust"), 4.0, 88, 98, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 41.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 45.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rosetta_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash2"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, -5, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 25, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } } } -unsafe extern "C" fn rosetta_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { /* Ground-only */ - ATTACK(fighter, 0, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); /* Air */ - ATTACK(fighter, 2, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("throw"), 9.0, 270, 67, 0, 20, 3.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 9.0, 270, 67, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 7.0, 45, 100, 0, 35, 2.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 45, 100, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 7.0, 45, 100, 0, 35, 2.0, 0.0, 0.0, -4.0, Some(0.0), Some(0.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 45, 100, 0, 35, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); AttackModule::clear(boma, 2, false); AttackModule::clear(boma, 3, false); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 5.0, 361, 30, 0, 20, 1.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 361, 30, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 5.0, 361, 30, 0, 20, 1.0, 0.0, 0.0, -3.0, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 361, 30, 0, 20, 4.0, 0.0, 0.0, 0.0, Some(3.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn rosetta_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } else { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, true); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_flash3"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, true); } } frame(lua_state, 33.0); - if is_excute(fighter) { + if is_excute(agent) { if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 10, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } else { - EFFECT_FOLLOW(fighter, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, false); - EFFECT_DETACH_KIND(fighter, Hash40::new("rosetta_ring_erase"), -1); + EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, false); + EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } } } -unsafe extern "C" fn rosetta_tico_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_tico_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } diff --git a/fighters/rosetta/src/acmd/ground.rs b/fighters/rosetta/src/acmd/ground.rs index 9e2bd2b0f4..c3f3a36be5 100644 --- a/fighters/rosetta/src/acmd/ground.rs +++ b/fighters/rosetta/src/acmd/ground.rs @@ -1,33 +1,33 @@ use super::*; -unsafe extern "C" fn rosetta_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 60, 12, 0, 47, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 30, 50, 0, 30, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 60, 12, 0, 47, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 30, 50, 0, 30, 4.0, 0.0, 4.0, 15.0, Some(0.0), Some(4.0), Some(8.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(20.0), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(5.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 2, 1, Hash40::new("head"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 3, 1, Hash40::new("bust"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(20.0), Some(8.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 1, Hash40::new("top"), 4.0, 65, 135, 0, 70, 2.5, 0.0, 13.0, 14.0, Some(0.0), Some(5.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 1, Hash40::new("head"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 3, 1, Hash40::new("bust"), 4.0, 65, 135, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); AttackModule::clear(boma, 1, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/rosetta/src/acmd/other.rs b/fighters/rosetta/src/acmd/other.rs index 02407e748f..d23efd8004 100644 --- a/fighters/rosetta/src/acmd/other.rs +++ b/fighters/rosetta/src/acmd/other.rs @@ -1,183 +1,108 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn rosetta_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.866); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.866); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 18.0); // Effectively F16 - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } pub fn install() { smashline::Agent::new("rosetta") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("sound_dash", dash_sound) .acmd("game_turndash", rosetta_turn_dash_game) .acmd("game_escapeair", escape_air_game) diff --git a/fighters/rosetta/src/acmd/smashes.rs b/fighters/rosetta/src/acmd/smashes.rs index e1ee17c3de..8738546521 100644 --- a/fighters/rosetta/src/acmd/smashes.rs +++ b/fighters/rosetta/src/acmd/smashes.rs @@ -1,107 +1,107 @@ use super::*; -unsafe extern "C" fn rosetta_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rosetta_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rosetta_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 5.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 5.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rosetta_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_hi4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(fighter, 1, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 6.0, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 1, 0, Hash40::new("neck"), 12.0, 86, 100, 0, 45, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn rosetta_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_lw4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 32, 107, 0, 40, 3.5, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 32, 107, 0, 40, 3.5, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 9.0, 32, 110, 0, 36, 3.5, 0.0, 3.5, -19.0, Some(0.0), Some(3.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 32, 110, 0, 36, 3.5, 0.0, 3.5, -19.0, Some(0.0), Some(3.5), Some(-9.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/rosetta/src/acmd/specials.rs b/fighters/rosetta/src/acmd/specials.rs index 8358ba263d..261c1a4aa4 100644 --- a/fighters/rosetta/src/acmd/specials.rs +++ b/fighters/rosetta/src/acmd/specials.rs @@ -1,50 +1,50 @@ use super::*; -unsafe extern "C" fn rosetta_special_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if !VarModule::is_flag(fighter.battle_object, vars::rosetta::instance::IS_TICO_UNAVAILABLE) && VarModule::get_int(fighter.battle_object, vars::rosetta::instance::COOLDOWN) == 0 { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn rosetta_special_lw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.battle_object, vars::rosetta::instance::IS_TICO_UNAVAILABLE) && VarModule::get_int(agent.battle_object, vars::rosetta::instance::COOLDOWN) == 0 { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_awaken"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } else { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } frame(lua_state, 38.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/rosetta/src/acmd/throws.rs b/fighters/rosetta/src/acmd/throws.rs index 037731152b..5af643b7d0 100644 --- a/fighters/rosetta/src/acmd/throws.rs +++ b/fighters/rosetta/src/acmd/throws.rs @@ -1,85 +1,85 @@ use super::*; -unsafe extern "C" fn rosetta_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.4), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.05); + FT_MOTION_RATE(agent, 1.05); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rosetta_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, 4.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.04); + FT_MOTION_RATE(agent, 1.04); frame(lua_state, 43.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rosetta_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.5, 0.0, 8.0, -4.0, Some(0.0), Some(8.0), Some(-15.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.05); + FT_MOTION_RATE(agent, 1.05); frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } pub fn install() { diff --git a/fighters/rosetta/src/acmd/tilts.rs b/fighters/rosetta/src/acmd/tilts.rs index 5a973c1f2f..75e0ea457f 100644 --- a/fighters/rosetta/src/acmd/tilts.rs +++ b/fighters/rosetta/src/acmd/tilts.rs @@ -1,62 +1,62 @@ use super::*; -unsafe extern "C" fn rosetta_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 7.5, 361, 70, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.5, 361, 70, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 6.5, 361, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.5, 361, 70, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 361, 70, 0, 65, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 6.5, 361, 70, 0, 65, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn rosetta_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); ArticleModule::generate_article(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, false, 0); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("throw"), 10.0, 88, 65, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 88, 65, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 10.0, 88, 65, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 88, 65, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 8.0, 88, 66, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 88, 66, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("throw"), 8.0, 88, 66, 0, 75, 4.0, 0.0, 0.0, -3.5, Some(0.0), Some(0.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 88, 66, 0, 75, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); ArticleModule::remove(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn rosetta_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn rosetta_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footl"), 5.5, 30, 98, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.5, 30, 98, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.5, 30, 98, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("hip"), 5.5, 30, 98, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 5.5, 30, 98, 0, 35, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.5, 30, 98, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.5, 30, 98, 0, 35, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("hip"), 5.5, 30, 98, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/samus/src/acmd/ground.rs b/fighters/samus/src/acmd/ground.rs index 39ceab9966..721faf7ca9 100644 --- a/fighters/samus/src/acmd/ground.rs +++ b/fighters/samus/src/acmd/ground.rs @@ -1,159 +1,159 @@ use super::*; -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); frame(lua_state, 6.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED); if (ControlModule::get_stick_y(boma) < -0.5) { - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_READY) { - VarModule::off_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_READY); - VarModule::on_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_READY) { + VarModule::off_flag(agent.battle_object, vars::samus::instance::SHINESPARK_READY); + VarModule::on_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED); MotionModule::set_rate(boma, 0.25); } } } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { MotionModule::set_rate(boma, 0.5); let addSpeed1 = Vector3f { x: 1.6, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &addSpeed1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 110, 0, 70, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 16.0, 361, 110, 0, 70, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 16.0, 361, 110, 0, 70, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 5.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 361, 115, 0, 75, 5.3, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(4.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 13.0, 361, 115, 0, 75, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 13.0, 361, 115, 0, 75, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 13.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 13.0, 55, 80, 0, 76, 5.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 115, 0, 75, 5.3, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(4.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 13.0, 361, 115, 0, 75, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 361, 115, 0, 75, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 9.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 9.0, 55, 80, 0, 76, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 120, 0, 80, 4.0, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(5.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 10.0, 361, 120, 0, 80, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("bust"), 10.0, 361, 120, 0, 80, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATK_SET_SHIELD_SETOFF_MUL_arg4(fighter, 0, 1, 2, 0.2); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 9.0, 55, 80, 0, 76, 5.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("bust"), 9.0, 55, 80, 0, 76, 4.0, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 120, 0, 80, 4.0, 0.0, 9.0, 6.0, Some(0.0), Some(9.0), Some(5.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 10.0, 361, 120, 0, 80, 3.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("bust"), 10.0, 361, 120, 0, 80, 4.5, 0.0, 0.0, 0.0, Some(0.0), Some(9.0), Some(2.0), 1.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 0.2); } } frame(lua_state, 17.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 21.0/(34.0-17.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 21.0/(34.0-17.0)); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { let subSpeed1 = Vector3f { x: -1.6, y: 0.0, z: 0.0 }; KineticModule::add_speed(boma, &subSpeed1); MotionModule::set_rate(boma, 0.25); } } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { MotionModule::set_rate(boma, 1.0); } } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } } -unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_attackdash")); - if VarModule::is_flag(fighter.battle_object, vars::samus::instance::SHINESPARK_USED) { - PLAY_SE(fighter, Hash40::new("se_samus_catch")); - PLAY_SE_REMAIN(fighter, Hash40::new("se_samus_special_n05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_attackdash")); + if VarModule::is_flag(agent.battle_object, vars::samus::instance::SHINESPARK_USED) { + PLAY_SE(agent, Hash40::new("se_samus_catch")); + PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); } } frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_step_left_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_step_left_m")); } wait(lua_state, 5.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_samus_step_right_m")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_samus_step_right_m")); } } -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn effect_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9.5, 2, 0, 0, 0, 0.95, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9.5, 2, 0, 0, 0, 0.95, true); } frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); } } -unsafe extern "C" fn expression_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } diff --git a/fighters/samusd/src/acmd/specials.rs b/fighters/samusd/src/acmd/specials.rs index db95edef9b..fb1814cdac 100644 --- a/fighters/samusd/src/acmd/specials.rs +++ b/fighters/samusd/src/acmd/specials.rs @@ -1,35 +1,35 @@ use super::*; // #[acmd_script( agent = "samusd", script = "game_specials" , category = ACMD_GAME , low_priority)] -// unsafe fn game_specials(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_specials(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 21.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 3.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 3.0); // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_WEAPON); // } // frame(lua_state, 22.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 1.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 1.0); // } // } // #[acmd_script( agent = "samusd", script = "game_specialairs" , category = ACMD_GAME , low_priority)] -// unsafe fn game_specialairs(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn game_specialairs(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 21.0); -// if is_excute(fighter) { +// if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_WEAPON); // } // frame(lua_state, 30.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 2.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 2.0); // } // frame(lua_state, 35.0); -// if is_excute(fighter) { -// FT_MOTION_RATE(fighter, 1.0); +// if is_excute(agent) { +// FT_MOTION_RATE(agent, 1.0); // WorkModule::on_flag(boma, *FIGHTER_SAMUS_STATUS_SPECIAL_S_WORK_FLAG_AIR_CONTROL); // } // } diff --git a/fighters/samusd/src/acmd/tilts.rs b/fighters/samusd/src/acmd/tilts.rs index 1704560b31..bea2181ed2 100644 --- a/fighters/samusd/src/acmd/tilts.rs +++ b/fighters/samusd/src/acmd/tilts.rs @@ -194,7 +194,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 4, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 5.0, 12.0, 0.0, -8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 5, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 4.5, 5.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - //ATTACK(fighter, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + //ATTACK(agent, 6, 0, Hash40::new("legr"), 6.0, 100, 110, 0, 75, 3.5, 0.0, 0.0, -3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); if is_excute(agent) { @@ -273,17 +273,17 @@ unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacklw3(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 80, 65, 0, 70, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 80, 65, 0, 70, 7.2, 0.0, 1.6, 14.4, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 80, 65, 0, 70, 3.8, 0.0, 0.0, 0.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 80, 65, 0, 70, 7.2, 0.0, 1.6, 14.4, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.4, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BOMB); } frame(lua_state, 9.0); - FT_MOTION_RATE_RANGE(fighter, 9.0, 36.0, 25.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 9.0, 36.0, 25.0); + if is_excute(agent) { AttackModule::clear_all(boma); } diff --git a/fighters/samusd/src/supermissile/acmd.rs b/fighters/samusd/src/supermissile/acmd.rs index 56369b7c26..934ff68e21 100644 --- a/fighters/samusd/src/supermissile/acmd.rs +++ b/fighters/samusd/src/supermissile/acmd.rs @@ -15,17 +15,17 @@ unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { } } // #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] -// unsafe fn samusd_super_missile_burst_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); +// unsafe fn samusd_super_missile_burst_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 75, 70, 0, 50, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); // ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0x50000000 /* default value */); // } // wait(lua_state, 1.0); -// if is_excute(fighter) { +// if is_excute(agent) { // ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0x50000000 /* default value */); -// notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); +// notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); // } // } pub fn install(agent: &mut Agent) { diff --git a/fighters/snake/src/acmd/aerials.rs b/fighters/snake/src/acmd/aerials.rs index 5215c8e102..d96b71eb77 100644 --- a/fighters/snake/src/acmd/aerials.rs +++ b/fighters/snake/src/acmd/aerials.rs @@ -1,244 +1,244 @@ use super::*; -unsafe extern "C" fn snake_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 8.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 3.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 10.0); - FT_MOTION_RATE_RANGE(fighter, 10.0, 35.0, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 10.0, 35.0, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 2.0, 365, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 2.0, 80, 100, 38, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("hip"), 2.0, 365, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("hip"), 2.0, 80, 100, 38, 0, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE_RANGE(fighter, 35.5, 38.0, 4.0); - if is_excute(fighter) { //move foot out - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 361, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE_RANGE(agent, 35.5, 38.0, 4.0); + if is_excute(agent) { //move foot out + ATTACK(agent, 0, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 361, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 361, 120, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 38.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn snake_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.864); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.864); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 22.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 23.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 14.0, 361, 105, 0, 40, 4.7, 0.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 105, 0, 40, 4.7, 0.0, -1.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Ground-only */ - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 15.0, 269, 90, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); /* Air-only */ - ATTACK(fighter, 3, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 4.5, 6.0, -0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 269, 51, 0, 35, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 63.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn snake_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { if StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_PASS { GroundModule::set_passable_check(boma, true); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 3.5, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 3.5, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 50, 95, 0, 30, 4.0, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.0, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.0, 0.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -4.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 5.0, 45, 100, 0, 20, 3.5, -9.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); if StatusModule::prev_status_kind(boma, 0) == *FIGHTER_STATUS_KIND_PASS { GroundModule::set_passable_check(boma, false); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn snake_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 13.0, 80, 70, 0, 35, 4.5, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 14.0, 80, 90, 0, 45, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 80, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 13.0, 80, 70, 0, 35, 4.5, -5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 14.0, 80, 90, 0, 45, 4.5, -11.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 80, 70, 0, 35, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -8.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.5, -8.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 10.0, 65, 80, 0, 10, 3.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn snake_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 2.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 80, 100, 35, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.5, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 80, 100, 35, 0, 5.5, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.5, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 4.0, 266, 100, 50, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 4.0, 365, 100, 35, 0, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 4.0, 70, 100, 25, 0, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame(boma, 0, -5.0, false); AttackModule::set_add_reaction_frame(boma, 1, -3.0, false); AttackModule::set_add_reaction_frame(boma, 2, -1.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 275, 90, 0, 30, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 275, 150, 0, 50, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legl"), 5.0, 275, 90, 0, 30, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 5.0, 275, 150, 0, 50, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 275, 90, 0, 30, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 275, 150, 0, 50, 5.0, 4.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legl"), 5.0, 275, 90, 0, 30, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 5.0, 275, 150, 0, 50, 4.0, 2.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 53.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } diff --git a/fighters/snake/src/acmd/ground.rs b/fighters/snake/src/acmd/ground.rs index 4bd593fd81..1ad6af84b3 100644 --- a/fighters/snake/src/acmd/ground.rs +++ b/fighters/snake/src/acmd/ground.rs @@ -1,89 +1,89 @@ use super::*; -unsafe extern "C" fn snake_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.0, -1.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.25, 0.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 4.0, 80, 60, 30, 5, 4.0, 0.0, 2.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("arml"), 4.0, 88, 60, 30, 5, 4.0, 3.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 4.0, 361, 20, 0, 20, 3.5, 0.0, 4.0, 11.5, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.0, -1.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 4.0, 80, 60, 30, 5, 3.25, 0.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 4.0, 80, 60, 30, 5, 4.0, 0.0, 2.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("arml"), 4.0, 88, 60, 30, 5, 4.0, 3.0, 0.0, 3.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 4.0, 361, 20, 0, 20, 3.5, 0.0, 4.0, 11.5, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn snake_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(1.5, 0.0, 0.0)); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-1.0, 0.0, 0.0)); - ATTACK(fighter, 0, 0, Hash40::new("hip"), 3.0, 50, 60, 20, 0, 3.0, 1.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 3.0, 50, 60, 20, 0, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 3.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 4.0, 10.0, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("hip"), 3.0, 50, 60, 20, 0, 3.0, 1.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 3.0, 50, 60, 20, 0, 3.5, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 0.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 3.0, 50, 60, 20, 0, 4.0, 3.0, 3.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 2.5, 0.0, 4.0, 10.0, Some(0.0), Some(4.0), Some(5.5), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); //AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn snake_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 8.0, 361, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 361, 80, 0, 70, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 361, 80, 0, 70, 4.5, 5.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("neck"), 11.0, 55, 80, 0, 60, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 11.0, 55, 80, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 55, 80, 0, 60, 3.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 55, 80, 0, 60, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 11.0, 55, 80, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 55, 80, 0, 60, 3.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("neck"), 8.0, 110, 100, 0, 40, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("hip"), 8.0, 110, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 110, 100, 0, 40, 3.0, 0.0, 3.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 110, 100, 0, 40, 4.5, 1.9, -0.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 110, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 110, 100, 0, 40, 3.0, 0.0, 3.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index 8035bb5345..df96433b8c 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -1,600 +1,525 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_snake_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_snake_step_left_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_snake_step_left_m")); } wait(lua_state, 10.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_snake_step_right_m")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_snake_step_right_m")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn snake_side_taunt_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_side_taunt_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_win03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_win03")); } } -unsafe extern "C" fn snake_up_taunt_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_up_taunt_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - AREA_WIND_2ND_arg10(fighter, 0, 2, 360/*angle*/, 10/*size*/, 1, 0, 12, 30, 30, 80); - // physics!(fighter, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 2, 360/*angle*/, 10/*size*/, 1, 0, 12, 30, 30, 80); + // physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); } frame(lua_state, 30.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_appealhi")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_appealhi")); } } -unsafe extern "C" fn snake_down_taunt_explode_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_DESIRED_RATE(fighter, 80.0, 50.0); +unsafe extern "C" fn snake_down_taunt_explode_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_DESIRED_RATE(agent, 80.0, 50.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0 ); ArticleModule::shoot(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); } frame(lua_state, 80.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { // WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); // SNAKE_C4_FLAG_IS_SHOWTIME[entry_id] = true; ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_EXPLOSION, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 90.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn snake_down_taunt_explode_exp(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_down_taunt_explode_exp(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0 ); } frame(lua_state, 30.0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); frame(lua_state, 75.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 80.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn snake_down_taunt_explode_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_down_taunt_explode_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_snake_appealend")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_snake_appealend")); } frame(lua_state, 60.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l04")); - PLAY_SE(fighter, Hash40::new("se_snake_squat")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l04")); + PLAY_SE(agent, Hash40::new("se_snake_squat")); } // frame(lua_state, 70.0); - // if is_excute(fighter) { + // if is_excute(agent) { // } frame(lua_state, 75.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l05")); } } -unsafe extern "C" fn snake_down_taunt_explode_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_down_taunt_explode_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 75.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn snake_trenchmortar_bullet_impact_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_trenchmortar_bullet_impact_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); KineticModule::unable_energy(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_KINETIC_ENERGY_ID_GRAVITY); VisibilityModule::set_int64(boma, hash40("main") as i64, hash40("impact") as i64); AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_STATUS_FLAG_ENABLE_ADVANCE_STATUS); } } -unsafe extern "C" fn snake_c4_target_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_c4_target_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - if VarModule::is_flag(fighter.object(), vars::snake::instance::SELF_STICK) { - SEARCH(fighter, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + if VarModule::is_flag(agent.object(), vars::snake::instance::SELF_STICK) { + SEARCH(agent, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); } else { - SEARCH(fighter, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + SEARCH(agent, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); } } } -unsafe extern "C" fn snake_c4_stick_other_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); +unsafe extern "C" fn snake_c4_stick_other_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); } for _ in 0..5 { wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); } } wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); } for _ in 0..10 { wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); } } wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); } } -unsafe extern "C" fn snake_c4_stick_target_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_c4_stick_target_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { } } -unsafe extern "C" fn snake_c4_stick_target_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); +unsafe extern "C" fn snake_c4_stick_target_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); } wait(lua_state, 60.0); - if is_excute(fighter) { - //EFFECT_OFF_KIND(fighter, Hash40::new("snake_final_lockon_ready"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_final_lockon_ready2"), false, false); + if is_excute(agent) { + //EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready2"), false, false); } wait(lua_state, 90.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); } for _ in 0..4 { wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); } } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); } wait(lua_state, 150.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); } for _ in 0..10 { wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); } } wait(lua_state, 10.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); } } -unsafe extern "C" fn snake_c4_stick_target_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_c4_stick_target_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_C3){ - PLAY_SE(fighter, Hash40::new("se_snake_special_l08")); + PLAY_SE(agent, Hash40::new("se_snake_special_l08")); } else{ - PLAY_SE(fighter, Hash40::new("se_snake_special_l03")); + PLAY_SE(agent, Hash40::new("se_snake_special_l03")); } - PLAY_SE(fighter, Hash40::new("se_snake_final02")); + PLAY_SE(agent, Hash40::new("se_snake_final02")); } } -unsafe extern "C" fn snake_c4_explosion_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn snake_c4_explosion_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { // Hitbox for opponents - ATTACK(fighter, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); // Snake-only hitbox - ATTACK(fighter, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); VisibilityModule::set_whole(boma, false); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_size(boma, 0, 17.0); ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { if !WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ AttackModule::clear_all(boma); } } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ AttackModule::clear_all(boma); } } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } //tranq gun -unsafe extern "C" fn snake_tranq_gun_start_snd(fighter : &mut L2CAgentBase) { +unsafe extern "C" fn snake_tranq_gun_start_snd(agent : &mut L2CAgentBase) { } -unsafe extern "C" fn snake_tranq_gun_shoot_snd(fighter : &mut L2CAgentBase) { +unsafe extern "C" fn snake_tranq_gun_shoot_snd(agent : &mut L2CAgentBase) { } //tranq dart -unsafe extern "C" fn snake_tranq_dart_fly_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn snake_tranq_dart_fly_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn snake_tranq_dart_fly_snd(fighter : &mut L2CAgentBase) { +unsafe extern "C" fn snake_tranq_dart_fly_snd(agent : &mut L2CAgentBase) { } -unsafe extern "C" fn snake_tranq_dart_fly_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_tranq_dart_fly_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); - // LAST_PARTICLE_SET_COLOR(fighter, 0.6, 0.6, 2.8); - LAST_PARTICLE_SET_COLOR(fighter, 2.5, 2.5, 0.0); - LAST_EFFECT_SET_RATE(fighter, 0.001); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); + // LAST_PARTICLE_SET_COLOR(agent, 0.6, 0.6, 2.8); + LAST_PARTICLE_SET_COLOR(agent, 2.5, 2.5, 0.0); + LAST_EFFECT_SET_RATE(agent, 0.001); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); } for _ in 0..5 { - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke2"), true, true); - EFFECT_OFF_KIND(fighter, Hash40::new("snake_missile_smoke3"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke2"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke3"), true, true); } wait(lua_state, 5.0); } } -unsafe extern "C" fn snake_tranq_dart_fall_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); +unsafe extern "C" fn snake_tranq_dart_fall_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); } } -unsafe extern "C" fn snake_tranq_dart_explode_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); +unsafe extern "C" fn snake_tranq_dart_explode_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); } } -unsafe extern "C" fn snake_tranq_dart_fall_explode_game(fighter : &mut L2CAgentBase) { +unsafe extern "C" fn snake_tranq_dart_fall_explode_game(agent : &mut L2CAgentBase) { } -unsafe extern "C" fn snake_tranq_dart_explode_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - let sfx = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); +unsafe extern "C" fn snake_tranq_dart_explode_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let sfx = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); } } -unsafe extern "C" fn snake_tranq_dart_explode_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn snake_tranq_dart_explode_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn snake_tranq_dart_land_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn snake_tranq_dart_land_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); } } //// @@ -602,10 +527,10 @@ unsafe extern "C" fn snake_tranq_dart_land_eff(fighter : &mut L2CAgentBase) { pub fn install() { smashline::Agent::new("snake") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/snake/src/acmd/smashes.rs b/fighters/snake/src/acmd/smashes.rs index 683c51188e..addffdbd21 100644 --- a/fighters/snake/src/acmd/smashes.rs +++ b/fighters/snake/src/acmd/smashes.rs @@ -2,401 +2,401 @@ use super::*; //first hit -unsafe extern "C" fn snake_side_smash_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_side_smash_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - FT_DESIRED_RATE(fighter, 14.0, 10.0); + FT_DESIRED_RATE(agent, 14.0, 10.0); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, false, 0); } frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 17.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 6.0, 361, 25, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 6.0, 170, 20, 0, 25, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 6.0, 361, 25, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 6.0, 170, 20, 0, 25, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); } frame(lua_state, 18.0); - if is_excute(fighter) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 6.0, 361, 15, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(9.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 2, 0, Hash40::new("top"), 6.0, 361, 15, 0, 30, 3.0, 0.0, 5.0, 5.0, Some(0.0), Some(9.0), Some(9.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_add_reaction_frame(boma, 2, 4.0, false); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - VarModule::on_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + VarModule::on_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); } frame(lua_state, 38.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); } frame(lua_state, 54.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn snake_side_smash_expr(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn snake_side_smash_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 53.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 21.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } //charge -unsafe extern "C" fn snake_side_smash_charge_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_charge_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 5.0); for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); } } } //second hit -unsafe extern "C" fn snake_side_smash_2_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_2_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.5); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 25, 0, 30, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze_ghost"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); //fake/empty hitboxes to create particle effects - ATTACK(fighter, 2, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + ATTACK(agent, 2, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 1, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_add_reaction_frame_revised(boma, 0, 4.0, false); AttackModule::set_add_reaction_frame_revised(boma, 1, 4.0, false); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - VarModule::on_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + VarModule::on_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 34.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); // WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_2_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn snake_side_smash_2_expr(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn snake_side_smash_2_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_2_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 49.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_2_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_2_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 9.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } //third hit -unsafe extern "C" fn snake_side_smash_3_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_3_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 9.0, 6.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 9.0, 6.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 4.5); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 361, 80, 0, 85, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_RPG7, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_smash_3_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn snake_side_smash_3_expr(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -unsafe extern "C" fn snake_side_smash_3_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_3_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_sword_swing_s")); - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_sword_swing_s")); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); } frame(lua_state, 38.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_squat_gear")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_squat_gear")); } } -unsafe extern "C" fn snake_side_smash_3_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_side_smash_3_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } frame(lua_state, 10.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_killsword_light2"), false, true); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } ////changed down-smash to spinning double kick -unsafe extern "C" fn snake_down_smash_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_down_smash_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 25, 87, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 12.0, 25, 87, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 12.0, 25, 87, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 25, 87, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 12.0, 25, 87, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 12.0, 25, 87, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - FT_DESIRED_RATE(fighter, 19.0, 13.0); - if is_excute(fighter) { + FT_DESIRED_RATE(agent, 19.0, 13.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 14.0, 20, 88, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("legl"), 14.0, 20, 88, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 14.0, 20, 88, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 14.0, 20, 88, 0, 30, 4.0, 7.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legl"), 14.0, 20, 88, 0, 30, 3.3, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 14.0, 20, 88, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_down_smash_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_down_smash_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start_02")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } frame(lua_state, 10.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack_smash_l")); - PLAY_SE(fighter, Hash40::new("se_snake_smash_l01")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_l")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l01")); } frame(lua_state, 31.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack")); - // PLAY_SE(fighter, Hash40::new("vc_snake_attack04")); - // PLAY_SEQUENCE(fighter, Hash40::new("seq_snake_rnd_attack_smash_s")); - PLAY_SE(fighter, Hash40::new("se_snake_smash_l02")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); + // PLAY_SE(agent, Hash40::new("vc_snake_attack04")); + // PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_s")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l02")); } } -unsafe extern "C" fn snake_down_smash_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_down_smash_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("toer"), 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - // EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 13, -1, 35, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 5, 7, 9, 10, -70, 6, 1, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + // EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 13, -1, 35, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 5, 7, 9, 10, -70, 6, 1, true); } // frame(lua_state, 13.0); - // if is_excute(fighter) { - // EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, 17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + // if is_excute(agent) { + // EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, 17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); // } frame(lua_state, 33.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, 14, -180, 0, 1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9, -2, 14, -180, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 34.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, -17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 5, -17, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 360, true); } } //charge -unsafe extern "C" fn snake_down_smash_charge_exp(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - physics!(fighter, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); +unsafe extern "C" fn snake_down_smash_charge_exp(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, 0); } frame(lua_state, 60.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, 0); } } -unsafe extern "C" fn snake_down_smash_charge_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = fighter.boma(); +unsafe extern "C" fn snake_down_smash_charge_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 5.0); for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); } } } diff --git a/fighters/snake/src/acmd/specials.rs b/fighters/snake/src/acmd/specials.rs index 60c96a784b..b0a7efc3fb 100644 --- a/fighters/snake/src/acmd/specials.rs +++ b/fighters/snake/src/acmd/specials.rs @@ -2,143 +2,143 @@ use super::*; use smash::app::lua_bind::ItemManager::get_num_of_active_item; -unsafe extern "C" fn snake_special_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn snake_special_hi_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 2.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_special_air_hi_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn snake_special_air_hi_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 2.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_special_lw_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_special_lw_blast_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL)) { WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn snake_special_lw_squat_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn snake_special_lw_squat_blast_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 1.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn snake_special_air_lw_blast_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_special_air_lw_blast_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(fighter, 27.0, 40.0, 13.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn snake_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn snake_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || (ControlModule::get_stick_y(boma) >= 0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SENSORBOMB) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SENSORBOMB), 0, 0, false, false); } } } else if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || (ControlModule::get_stick_y(boma) <= -0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SMOKESCREEN) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SMOKESCREEN), 0, 0, false, false); } } @@ -151,43 +151,43 @@ unsafe extern "C" fn snake_special_n_start_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 8.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN) { ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); } } -unsafe extern "C" fn snake_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); +unsafe extern "C" fn snake_special_air_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { /* if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || (ControlModule::get_stick_y(boma) >= 0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SENSORBOMB) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SENSORBOMB), 0, 0, false, false); } } } else if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || (ControlModule::get_stick_y(boma) <= -0.5)){ - if VarModule::get_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { + if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { if(get_num_of_active_item(*ITEM_KIND_SMOKESCREEN) < 1){ - VarModule::inc_int(fighter.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); + VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SMOKESCREEN), 0, 0, false, false); } } @@ -200,226 +200,226 @@ unsafe extern "C" fn snake_special_air_n_start_game(fighter: &mut L2CAgentBase) } } frame(lua_state, 8.0); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN) { ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } frame(lua_state, 10.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 0.333); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.333); } } -unsafe extern "C" fn game_specialairhihang(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); +unsafe extern "C" fn game_specialairhihang(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); } frame(lua_state, 41.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_STICK); } WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 89.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_TIME_OUT); } } -unsafe extern "C" fn game_cypher_detach(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - //ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 2.5, 0.0, 1.5, -3.2, Some(0.0), Some(1.5), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 3.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); +unsafe extern "C" fn game_cypher_detach(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 2.5, 0.0, 1.5, -3.2, Some(0.0), Some(1.5), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + //ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 3.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } //new self-stick scripts -unsafe extern "C" fn snake_down_special_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_down_special_floor(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn snake_down_special_crouch_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_down_special_crouch_floor(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn snake_down_special_air_floor(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_down_special_air_floor(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn snake_side_special_game(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - VarModule::off_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); +unsafe extern "C" fn snake_side_special_game(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + VarModule::off_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 1.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 12.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 12.0); } - if is_excute(fighter) { - CORRECT(fighter, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, false, 0); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { if boma.is_button_on(Buttons::Guard) { - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 16.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE_RANGE(fighter, 16.0, 38.0, 1.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE_RANGE(agent, 16.0, 38.0, 1.0); } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - VarModule::inc_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + VarModule::inc_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT); ArticleModule::set_flag(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, true, *WEAPON_SNAKE_NIKITA_INSTANCE_WORK_ID_FLAG_SHOOT); - if VarModule::get_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT) == 3 { - VarModule::on_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); + if VarModule::get_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT) == 3 { + VarModule::on_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE); } } } frame(lua_state, 38.0); - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE(fighter, 1.0); + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE(agent, 1.0); } else { - FT_MOTION_RATE_RANGE(fighter, 38.0, 64.0, 1.0); + FT_MOTION_RATE_RANGE(agent, 38.0, 64.0, 1.0); } frame(lua_state, 64.0); - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FT_MOTION_RATE(fighter, 1.0); + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 79.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - VarModule::set_int(fighter.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT, 0); - VarModule::off_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + VarModule::set_int(agent.battle_object, vars::snake::instance::TRANQ_AMMO_COUNT, 0); + VarModule::off_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD); } } frame(lua_state, 83.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_NIKITA, ArticleOperationTarget(0)); } } -unsafe extern "C" fn snake_side_special_expr(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn snake_side_special_expr(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 21.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } } } -unsafe extern "C" fn snake_side_special_snd(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_side_special_snd(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_l05")) + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_l05")) } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s01")); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + PLAY_SE(agent, Hash40::new("se_snake_special_s01")); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - let sfx_handle = SoundModule::play_se(fighter.module_accessor, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 3.0, 0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + let sfx_handle = SoundModule::play_se(agent.module_accessor, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 3.0, 0); } } frame(lua_state, 41.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s02")); } wait(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s03")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s03")); } frame(lua_state, 80.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_snake_special_s07")) + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_snake_special_s07")) } } -unsafe extern "C" fn snake_side_special_eff(fighter : &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_side_special_eff(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); } } frame(lua_state, 24.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FOOT_EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(fighter, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); } } frame(lua_state, 25.0); - if is_excute(fighter) { - if !VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); } } frame(lua_state, 30.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + EFFECT_FOLLOW(agent, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); } } } diff --git a/fighters/snake/src/acmd/throws.rs b/fighters/snake/src/acmd/throws.rs index 61a61dff97..23ef97ca53 100644 --- a/fighters/snake/src/acmd/throws.rs +++ b/fighters/snake/src/acmd/throws.rs @@ -1,73 +1,73 @@ use super::*; -unsafe extern "C" fn snake_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 0.0, Some(0.0), Some(8.2), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 0.0, Some(0.0), Some(8.2), Some(12.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn snake_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 7.0, Some(0.0), Some(8.2), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, 7.0, Some(0.0), Some(8.2), Some(11.3), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.3); + FT_MOTION_RATE(agent, 1.3); } -unsafe extern "C" fn snake_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 1.1); +unsafe extern "C" fn snake_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.8, 0.0, 8.2, -11.0, Some(0.0), Some(8.2), Some(-17.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.8, 0.0, 8.2, -11.0, Some(0.0), Some(8.2), Some(-17.1), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 1.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 15.0); - FT_MOTION_RATE(fighter, 1.43); + FT_MOTION_RATE(agent, 1.43); } pub fn install() { diff --git a/fighters/snake/src/acmd/tilts.rs b/fighters/snake/src/acmd/tilts.rs index 357f153965..87f168bcd8 100644 --- a/fighters/snake/src/acmd/tilts.rs +++ b/fighters/snake/src/acmd/tilts.rs @@ -1,118 +1,118 @@ use super::*; -unsafe extern "C" fn snake_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 4.0, 78, 10, 0, 42, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("legr"), 4.0, 65, 10, 0, 20, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 4.0, 78, 10, 0, 42, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 4.0, 65, 10, 0, 20, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 78, 10, 0, 42, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("legr"), 4.0, 65, 10, 0, 20, 4.5, 3.2, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 4.0, 78, 10, 0, 42, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 4.0, 65, 10, 0, 20, 3.0, 3.0, 0.0, 0.0, Some(1.2), Some(0.0), Some(0.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); AttackModule::set_add_reaction_frame(boma, 1, 3.0, false); AttackModule::set_add_reaction_frame(boma, 2, 3.0, false); AttackModule::set_add_reaction_frame(boma, 3, 3.0, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn snake_attack_s3_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_s3_s2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 5.0/(5.5-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 5.0/(5.5-1.0)); } frame(lua_state, 5.5); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0/(6.0-5.5)); - ATTACK(fighter, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("bust"), 10.0, 361, 100, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - //ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 90, 0, 50, 6.0, 0.0, 10.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(6.0-5.5)); + ATTACK(agent, 0, 0, Hash40::new("handr"), 10.0, 361, 100, 0, 50, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("bust"), 10.0, 361, 100, 0, 50, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + //ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 90, 0, 50, 6.0, 0.0, 10.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 6.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 5.0, 4.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 5.0, 4.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 90, 100, 0, 65, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - ATTACK(fighter, 0, 0, Hash40::new("legl"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 10.0, 95, 96, 0, 50, 4.0, 5.0, -0.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn snake_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn snake_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 3.0/(3.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 11.0, 80, 73, 0, 50, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 11.0, 85, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 11.0, 80, 73, 0, 50, 3.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 11.0, 85, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legr"), 11.0, 90, 73, 0, 50, 2.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 14.0/(33.0-13.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 14.0/(33.0-13.0)); } frame(lua_state, 33.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.000); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.000); } } diff --git a/fighters/szerosuit/src/acmd/aerials.rs b/fighters/szerosuit/src/acmd/aerials.rs index 031840a6b8..8d4b31ff3c 100644 --- a/fighters/szerosuit/src/acmd/aerials.rs +++ b/fighters/szerosuit/src/acmd/aerials.rs @@ -1,348 +1,348 @@ use super::*; -unsafe extern "C" fn szerosuit_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, -1); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("attack_air_n"), false, -1.0); //ArticleModule::set_rate(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, 2.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderr"), 12.0, 55, 80, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(9.0), Some(13.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 12.0, 55, 80, 0, 25, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(9.0), Some(13.5), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(4.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.0, 7.0, Some(0.0), Some(4.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 10.0, 7.0, Some(0.0), Some(3.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 10.0, 7.0, Some(0.0), Some(3.0), Some(16.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 15.0, -1.0, Some(0.0), Some(4.0), Some(11.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 15.0, -1.0, Some(0.0), Some(4.0), Some(11.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(15.0), Some(-9.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(15.0), Some(-9.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(16.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(16.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(17.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 55, 80, 0, 25, 4.0, 0.0, 11.5, -3.0, Some(0.0), Some(17.0), Some(-13.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn szerosuit_whip_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 4.0/(8.0-1.0)); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_whip_attack_air_n_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { VisibilityModule::set_whole(boma, true); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } } -unsafe extern "C" fn szerosuit_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_n_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn szerosuit_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 4.0/(8.0-6.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 4.0/(8.0-6.0)); + if is_excute(agent) { // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 5.0, 366, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 5.0, 366, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 5.0, 366, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 5, 0, Hash40::new("legl"), 5.0, 70, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneel"), 5.0, 75, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footl"), 5.0, 80, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legl"), 5.0, 70, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 5.0, 75, 100, 50, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footl"), 5.0, 80, 100, 50, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 40, 100, 0, 40, 3.7, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 40, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 10.0, 40, 100, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 40, 100, 0, 40, 3.7, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 40, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 10.0, 40, 100, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 21.0/(40.0-17.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 21.0/(40.0-17.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 70.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn szerosuit_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 6.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 6.0/(8.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legr"), 10.0, 361, 110, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 110, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footr"), 13.0, 361, 110, 0, 33, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 10.0, 361, 110, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 110, 0, 20, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footr"), 13.0, 361, 110, 0, 33, 4.5, 0.0, -1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn szerosuit_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 3.0/(6.0-1.0)); + FT_MOTION_RATE(agent, 3.0/(6.0-1.0)); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 10.0, 60, 110, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 10.0, 60, 110, 0, 30, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 10.0, 60, 110, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 4.0/(19.0-11.0)); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("footr"), 7.0, 30, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 4.0/(19.0-11.0)); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footr"), 7.0, 30, 100, 0, 20, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 7.0, 30, 100, 0, 20, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 16.0/(29.0-19.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 16.0/(29.0-19.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { } frame(lua_state, 59.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn szerosuit_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_atk_air_hi"), Hash40::new("top"), 0, 9.5, -1.0, -5.8, 45, 92.4, 0.85, true); - LAST_EFFECT_SET_RATE(fighter, 0.8); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_atk_air_hi"), Hash40::new("top"), 0, 9.5, -1.0, -5.8, 45, 92.4, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 0.8); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire_02"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire_02"), false, false); } } -unsafe extern "C" fn szerosuit_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let dive_motion_rate = 10.0/(50.0-14.0); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 11.0/(14.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 11.0/(14.0-1.0)); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::ATTACK_AIR_LW_REBOUND); } frame(lua_state, 2.0); - if is_excute(fighter) { - //FT_MOTION_RATE(fighter, 0.667); + if is_excute(agent) { + //FT_MOTION_RATE(agent, 0.667); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 14.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, dive_motion_rate); + if is_excute(agent) { + FT_MOTION_RATE(agent, dive_motion_rate); // Air-only - ATTACK(fighter, 0, 0, Hash40::new("legl"), 12.0, 100, 45, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 100, 45, 0, 70, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.0, 100, 45, 0, 70, 4.5, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0 + 4.0/dive_motion_rate); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 50.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 58.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn szerosuit_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let dive_motion_rate = 15.0/(50.0-14.0); frame(lua_state, 3.0); - if is_excute(fighter) { - //EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire_02"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 14.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_atk_air_lw_fire"), Hash40::new("toel"), -0.5, 0.3, 0, 0, 0, -45, 0.6, true); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("toel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_atk_air_lw_fire"), Hash40::new("toel"), -0.5, 0.3, 0, 0, 0, -45, 0.6, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("toel"), 0.0, 0.0, 0.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true, 1.0); } frame(lua_state, 15.0 + 7.0/dive_motion_rate); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_atk_air_lw_fire"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_atk_air_lw_fire"), false, true); } } -unsafe extern "C" fn szerosuit_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_landing_air_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn szerosuit_landing_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn szerosuit_landing_air_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn szerosuit_landing_air_lw_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn szerosuit_landing_air_lw_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, 0 as u32); } } -unsafe extern "C" fn szerosuit_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_air_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, false, -1); ArticleModule::set_visibility_whole(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::set_visibility_whole(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, true, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::change_status(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, *WEAPON_SZEROSUIT_WHIP2_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ATTACK(fighter, 0, 0, Hash40::new("throw"), 5.0, 60, 30, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 0, 0, Hash40::new("throw"), 5.0, 60, 30, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::change_status_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, *WEAPON_SZEROSUIT_WHIP2_STATUS_KIND_REWIND); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP2, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); } } -unsafe extern "C" fn szerosuit_landing_air_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_landing_air_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } pub fn install() { diff --git a/fighters/szerosuit/src/acmd/ground.rs b/fighters/szerosuit/src/acmd/ground.rs index 0889205010..a928fa065a 100644 --- a/fighters/szerosuit/src/acmd/ground.rs +++ b/fighters/szerosuit/src/acmd/ground.rs @@ -1,125 +1,125 @@ use super::*; -unsafe extern "C" fn szerosuit_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_11_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 8.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.8, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 8.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.8, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 11.0, Some(0.0), Some(4.0), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); AttackModule::set_add_reaction_frame(boma, 0, 2.0, false); AttackModule::set_add_reaction_frame(boma, 1, 2.0, false); AttackModule::set_add_reaction_frame(boma, 2, 2.0, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn szerosuit_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_12_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 9.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 10.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 9.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 2.9, 0.0, 10.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 70, 100, 0, 0, 3.5, 0.0, 10.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.0, 0.0, 4.0, 7.0, Some(0.0), Some(4.0), Some(1.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_down_only(boma, 3, false); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn szerosuit_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_13_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 5.0, 361, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 1, 0, Hash40::new("handr"), 5.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 5.0, 361, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 70, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + ATTACK(agent, 1, 0, Hash40::new("handr"), 5.0, 361, 70, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 5.0, 361, 70, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ELBOW); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let attack_motion_rate = 11.0/(20.0-6.0); let attack_speed_reduction = -0.8; frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(attack_speed_reduction, 0.0, 0.0)); - FT_MOTION_RATE(fighter, attack_motion_rate); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 361, 64, 0, 50, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 10.0, 361, 64, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + FT_MOTION_RATE(agent, attack_motion_rate); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 64, 0, 50, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 64, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 6.0 + 4.0/attack_motion_rate); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 70, 85, 0, 60, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 7.0, 70, 85, 0, 60, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 70, 85, 0, 60, 4.5, 0.0, 10.0, 1.0, Some(0.0), Some(5.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 7.0, 70, 85, 0, 60, 3.1, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KNEE); } frame(lua_state, 20.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { KineticModule::add_speed(boma, &Vector3f::new(-attack_speed_reduction, 0.0, 0.0)); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); +unsafe extern "C" fn szerosuit_attack_dash_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl_l"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/szerosuit/src/acmd/other.rs b/fighters/szerosuit/src/acmd/other.rs index 9c6ef0f501..9905aa6e66 100644 --- a/fighters/szerosuit/src/acmd/other.rs +++ b/fighters/szerosuit/src/acmd/other.rs @@ -1,235 +1,159 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_szerosuit_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_szerosuit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_szerosuit_step_right_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_szerosuit_step_right_l")); } wait(lua_state, 6.0); - if is_excute(fighter) { - PLAY_STEP(fighter, Hash40::new("se_szerosuit_step_left_l")); + if is_excute(agent) { + PLAY_STEP(agent, Hash40::new("se_szerosuit_step_left_l")); } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_lerp(boma, 0, 2, 0); AttackModule::set_lerp(boma, 1, 3, 1); AttackModule::enable_safe_pos(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_lerp(boma, 0, 2, 0); AttackModule::set_lerp(boma, 1, 3, 1); } } -unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_tame_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); +unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_tame_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_lerp(boma, 0, 2, 0); AttackModule::set_lerp(boma, 1, 3, 1); AttackModule::enable_safe_pos(boma); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(fighter, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); AttackModule::set_lerp(boma, 0, 2, 0); AttackModule::set_lerp(boma, 1, 3, 1); } } -unsafe extern "C" fn szerosuit_escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_escape_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn szerosuit_escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_escape_air_slide_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } @@ -240,10 +164,10 @@ pub fn install() { .install(); smashline::Agent::new("szerosuit") .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) + .acmd("sound_damageflylw", damageflyhi_sound) + .acmd("sound_damageflyn", damageflyhi_sound) .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) + .acmd("sound_damageflytop", damageflyhi_sound) .acmd("game_dash", dash_game) .acmd("sound_dash", dash_sound) .acmd("game_turndash", turn_dash_game) diff --git a/fighters/szerosuit/src/acmd/smashes.rs b/fighters/szerosuit/src/acmd/smashes.rs index fb152b850f..16b2bfa6b1 100644 --- a/fighters/szerosuit/src/acmd/smashes.rs +++ b/fighters/szerosuit/src/acmd/smashes.rs @@ -1,182 +1,182 @@ use super::*; -unsafe extern "C" fn szerosuit_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s4_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 5.5, 6.0); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } } -unsafe extern "C" fn szerosuit_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s4_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 5.5, 7.0, 7.0); } frame(lua_state, 13.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_ATTACK_FLAG_S4_SELECT); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 6.0, 5.2); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } } -unsafe extern "C" fn szerosuit_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s4_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 7.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 8.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 12.0, 36, 119, 0, 28, 4.5, 9.5, -0.2, -0.2, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_KICK); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_hi_4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_hi_4_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); execute(lua_state , 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } if WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK) { - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, -1); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("attack_hi4"), false, -1.0); } } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 110, 100, 150, 0, 6.0, 0.0, 10.0, 7.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 110, 100, 150, 0, 6.0, 0.0, 10.0, 7.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } for _ in 0..5 { wait(lua_state, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 28.0); -if is_excute(fighter) { - ATTACK(fighter, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); +if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } wait(lua_state, 2.0); -if is_excute(fighter) { +if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); -if is_excute(fighter) { +if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } diff --git a/fighters/szerosuit/src/acmd/specials.rs b/fighters/szerosuit/src/acmd/specials.rs index f2bd22ecd1..9535fed13f 100644 --- a/fighters/szerosuit/src/acmd/specials.rs +++ b/fighters/szerosuit/src/acmd/specials.rs @@ -1,470 +1,470 @@ use super::*; -unsafe extern "C" fn szerosuit_special_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(21.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(21.0-1.0)); } -unsafe extern "C" fn szerosuit_special_air_n_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_n_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(21.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(21.0-1.0)); } -unsafe extern "C" fn szerosuit_special_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_n_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 26.0/(28.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 26.0/(28.0-1.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_N_FLAG_SHOOT); ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_PARALYZER_BULLET, false, -1); } } -unsafe extern "C" fn szerosuit_special_air_n_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_n_shoot_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 26.0/(28.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 26.0/(28.0-1.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_N_FLAG_SHOOT); ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_PARALYZER_BULLET, false, -1); } } -unsafe extern "C" fn szerosuit_special_n_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_n_landing_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(14.0-1.0)); + FT_MOTION_RATE(agent, 9.0/(14.0-1.0)); } -unsafe extern "C" fn szerosuit_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 23.0/(28.0-1.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(28.0-1.0)); } frame(lua_state, 28.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 15, 100, 90, 0, 4.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 4.0, 20, 100, 80, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 1, Hash40::new("top"), 4.0, 25, 100, 50, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(26.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 15, 100, 90, 0, 4.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 4.0, 20, 100, 80, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 1, Hash40::new("top"), 4.0, 25, 100, 50, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(26.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_S_FLAG_S2); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_whip_special_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (28.0-1.0)/23.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } } -unsafe extern "C" fn szerosuit_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.2, 365, 100, 85, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 0, 100, 95, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 365, 100, 85, 0, 3.5, 0.0, 8.0, 19.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 0, 100, 95, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 0, 100, 100, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.2, 345, 100, 85, 0, 3.5, 0.0, 8.0, 25.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 0, 100, 100, 0, 3.0, 0.0, 8.0, 9.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.2, 345, 100, 85, 0, 3.5, 0.0, 8.0, 25.0, Some(0.0), Some(8.0), Some(17.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 2, Hash40::new("top"), 1.2, 10, 100, 85, 0, 3.7, 0.0, 8.0, 28.0, Some(0.0), Some(8.0), Some(25.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 2, Hash40::new("top"), 1.2, 10, 100, 85, 0, 3.7, 0.0, 8.0, 28.0, Some(0.0), Some(8.0), Some(25.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 3, Hash40::new("top"), 1.2, 345, 100, 85, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(28.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 1, 3, Hash40::new("top"), 1.2, 345, 100, 85, 0, 4.0, 0.0, 8.0, 30.0, Some(0.0), Some(8.0), Some(28.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_S_FLAG_S2); AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 4, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); - //ATTACK(fighter, 0, 4, Hash40::new("top"), 8.0, 50, 105, 0, 45, 6.6, 0.0, 8.5, 38.0, Some(0.0), Some(8.5), Some(32.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 4, Hash40::new("top"), 9.0, 50, 115, 0, 50, 6.0, 0.0, 8.5, 36.0, Some(0.0), Some(8.5), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_WHIP); + //ATTACK(agent, 0, 4, Hash40::new("top"), 8.0, 50, 105, 0, 45, 6.6, 0.0, 8.5, 38.0, Some(0.0), Some(8.5), Some(32.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_WHIP); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_air_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_whip_special_air_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } } -unsafe extern "C" fn szerosuit_special_s_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_s_2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); //AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_whip_special_s2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_whip_special_s2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, (28.0-1.0)/23.0); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { MotionModule::set_rate(boma, 1.0); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { VisibilityModule::set_whole(boma, false); } } -unsafe extern "C" fn szerosuit_whip_special_s2_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(fighter, Hash40::new("szero_pwhip"), true, true); - EFFECT_FLW_POS(fighter, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); +unsafe extern "C" fn szerosuit_whip_special_s2_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("szero_pwhip"), true, true); + EFFECT_FLW_POS(agent, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 45.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_gbeam_lightning"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_gbeam_lightning"), false, true); } frame(lua_state, 54.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_whip"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip"), false, true); } frame(lua_state, 56.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_whip_flash"), false, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip_flash"), false, true); } } -unsafe extern "C" fn szerosuit_special_air_s_2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_s_2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); //AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 208, 0, 40, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 208, 0, 40, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 42.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 46.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn szerosuit_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 4.0); - if is_excute(fighter) { - SA_SET(fighter, *SITUATION_KIND_AIR); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 8.0); - FT_MOTION_RATE (fighter, 2.0); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE (agent, 2.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 90, 100, 150, 0, 6.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 367, 100, 50, 0, 7.0, 0.0, 19.0, 5.5, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 15.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 26.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.3, 90, 100, 12, 0, 7.0, 0.0, 12.0, 10.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.3, 290, 100, 10, 0, 4.0, 0.0, 20.0, 5.5, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 48, 196, 0, 35, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 48, 196, 0, 35, 8.0, 0.0, 12.5, 11.0, Some(0.0), Some(12.0), Some(9.0), 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 43.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 47.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn szerosuit_special_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_special_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_REVERSE); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); //WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); VarModule::on_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_WALL_JUMP_ENABLE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } } -unsafe extern "C" fn szerosuit_special_air_lw_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_special_air_lw_start_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::szerosuit::status::SPECIAL_LW_MANUAL_FLIPSTOOL_ENABLE); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_START_WAIT_INPUT); } frame(lua_state, 13.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_ENABLE); WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_REVERSE); } frame(lua_state, 19.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); //WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_WALL_JUMP_ENABLE); } frame(lua_state, 39.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_TREAD_ENABLE); } } -unsafe extern "C" fn szerosuit_special_air_lw_kick_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_special_air_lw_kick_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_LW_FLAG_KICK_REVERSE_ENABLE); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 48, 115, 0, 45, 4.8, -4.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 48, 115, 0, 45, 4.8, -4.0, 0.0, 0.0, Some(-1.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Air-only - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 14.0, 290, 52, 0, 30, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 290, 52, 0, 30, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); // Ground-only - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 14.0, 45, 100, 0, 45, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 45, 100, 0, 45, 4.8, 10.0, 0.0, 0.0, Some(-2.5), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_INSTANCE_WORK_ID_FLAG_TO_SPECIAL_LANDING); } } -unsafe extern "C" fn szerosuit_special_air_lw_flip_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn szerosuit_special_air_lw_flip_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { if !VarModule::is_flag(boma.object(), vars::szerosuit::status::ATTACK_AIR_LW_REBOUND){ - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 361, 90, 0, 10, 4.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 270, 80, 0, 10, 3.0, 0.0, -3.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } diff --git a/fighters/szerosuit/src/acmd/throws.rs b/fighters/szerosuit/src/acmd/throws.rs index 7bfa77b6b5..4049a0c050 100644 --- a/fighters/szerosuit/src/acmd/throws.rs +++ b/fighters/szerosuit/src/acmd/throws.rs @@ -1,241 +1,241 @@ use super::*; -unsafe extern "C" fn szerosuit_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_catch_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 1.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 1.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(7.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 9.0, 5.0, Some(0.0), Some(9.0), Some(7.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + FT_MOTION_RATE(agent, 3.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.25); + FT_MOTION_RATE(agent, 1.25); frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } } -unsafe extern "C" fn szerosuit_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); +unsafe extern "C" fn szerosuit_catch_dash_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_dash"), false, 0.0); } frame(lua_state, 16.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(agent.module_accessor, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 23.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 3); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(agent.module_accessor, false); } frame(lua_state, 76.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn szerosuit_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); +unsafe extern "C" fn szerosuit_catch_turn_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 17.0); - if is_excute(fighter) { - GrabModule::set_rebound(fighter.module_accessor, true); + if is_excute(agent) { + GrabModule::set_rebound(agent.module_accessor, true); } frame(lua_state, 18.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(fighter, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 1, Hash40::new("handr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 2, Hash40::new("armr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 3, Hash40::new("shoulderr"), 3.0, 0.0, 0.0, 0.0, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); frame(lua_state, 24.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 1); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 2); - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR, 3); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 2); + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(fighter.module_accessor, false); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(agent.module_accessor, false); } frame(lua_state, 57.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } -unsafe extern "C" fn szerosuit_catch_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_catch_sound(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_06")); } wait(lua_state, 7.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_swing_06")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_06")); } } -unsafe extern "C" fn szerosuit_catch_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_catch_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); } -unsafe extern "C" fn szerosuit_catch_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn szerosuit_catch_expression(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); } } -unsafe extern "C" fn szerosuit_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 40, 50, 0, 63, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn szerosuit_throw_f_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 40, 50, 0, 63, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 2.0, 45, 130, 0, 30, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 13, 8); + CHECK_FINISH_CAMERA(agent, 13, 8); } frame(lua_state, 9.0); - FT_MOTION_RATE(fighter, 19.0/(30.0-9.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 19.0/(30.0-9.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn szerosuit_throw_b_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 45, 60, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 45, 130, 0, 30, 5.0, 0.0, 16.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 45, 130, 0, 30, 5.0, 0.0, 16.0, -14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); - REVERSE_LR(fighter); + REVERSE_LR(agent); } frame(lua_state, 10.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 18, 9); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 18, 9); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 14.0/(30.0-11.0)); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + FT_MOTION_RATE(agent, 14.0/(30.0-11.0)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } frame(lua_state, 35.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 2.0, 6.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 105, 100, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn szerosuit_throw_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 2.0, 6.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 105, 100, 0, 65, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 2.0, 45, 130, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 2.0, 45, 130, 0, 30, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 4.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 15, 10); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 15, 10); } frame(lua_state, 5.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE_RANGE(fighter, 1.0, 12.0, 7.0); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 70, 78, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn szerosuit_throw_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 70, 78, 0, 68, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 12.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 270, 120, 0, 0, 4.0, 0.0, 4.0, 0.0, Some(-2.5), Some(4.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 120, 0, 0, 4.0, 0.0, 4.0, 0.0, Some(-2.5), Some(4.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 3, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 3, 0); } frame(lua_state, 22.0); - if is_excute(fighter) { - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + if is_excute(agent) { + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } diff --git a/fighters/szerosuit/src/acmd/tilts.rs b/fighters/szerosuit/src/acmd/tilts.rs index c8c3204ad9..2cd3414f44 100644 --- a/fighters/szerosuit/src/acmd/tilts.rs +++ b/fighters/szerosuit/src/acmd/tilts.rs @@ -1,200 +1,200 @@ use super::*; -unsafe extern "C" fn szerosuit_attack_s3_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_hi_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_s3_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_hi_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); } } -unsafe extern "C" fn szerosuit_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_s_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_s3_s_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_s_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); } } -unsafe extern "C" fn szerosuit_attack_s3_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_lw_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("legl"), 12.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 12.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("legl"), 12.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn szerosuit_attack_s3_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_s3_lw_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toer"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 7.2, 5, -1, 11.8, 0.95, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 7.2, 5, -1, 11.8, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); } } -unsafe extern "C" fn szerosuit_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_hi3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 4.0/(3.0-1.0)); + FT_MOTION_RATE(agent, 4.0/(3.0-1.0)); frame(lua_state, 3.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneer"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("footl"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 3, 0, Hash40::new("footr"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 4, 0, Hash40::new("top"), 5.0, 90, 40, 0, 45, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 128, 30, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("footr"), 5.0, 136, 40, 0, 50, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("top"), 5.0, 90, 40, 0, 45, 3.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 6.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 6.0, 0.0, 20.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 90, 100, 0, 50, 5.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 24.0/(40.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 24.0/(40.0-13.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 40.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_lw3_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 5.0/(8.0-1.0)); + FT_MOTION_RATE(agent, 5.0/(8.0-1.0)); frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("legl"), 6.0, 65, 110, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("kneel"), 7.0, 75, 110, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 8.0, 85, 110, 0, 30, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 6.0, 65, 110, 0, 30, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 75, 110, 0, 30, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 8.0, 85, 110, 0, 30, 4.5, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 17.0/(30.0-11.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0/(30.0-11.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn szerosuit_attack_lw3_effect(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("szero_smash_fire"), Hash40::new("toel"), 0, -0.7, 0, 0, 0, 0, 0.6, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_smash_fire"), Hash40::new("toel"), 0, -0.7, 0, 0, 0, 0, 0.6, true); } frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 7.0, -8.5, -32.5, -160.1, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 4, 7.0, -8.5, -32.5, -160.1, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, false); - //LANDING_EFFECT(fighter, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_ALPHA(fighter, 0.6); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, false); + //LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_ALPHA(agent, 0.6); } frame(lua_state, 29.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("szero_smash_fire"), true, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), true, false); } } diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index 9984ce2e01..4e9f8fa751 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -15,7 +15,7 @@ unsafe extern "C" fn game_specialnbite(agent: &mut L2CAgentBase) { wait(lua_state, 1.0); if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); if is_excute(agent) { @@ -33,7 +33,7 @@ unsafe extern "C" fn game_specialnbite(agent: &mut L2CAgentBase) { wait(lua_state, 1.0); if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); if is_excute(agent) { @@ -56,7 +56,7 @@ unsafe extern "C" fn game_specialairnbite(agent: &mut L2CAgentBase) { wait(lua_state, 1.0); if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); if is_excute(agent) { @@ -74,7 +74,7 @@ unsafe extern "C" fn game_specialairnbite(agent: &mut L2CAgentBase) { wait(lua_state, 1.0); if is_excute(agent) { //AttackModule::clear_all(boma); - //ATTACK(fighter, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); + //ATTACK(agent, 0, 0, Hash40::new("head"), 0.1, 361, 100, 30, 0, 3.0, -0.5, 2.0, 2.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_BITE); } wait(lua_state, 1.0); if is_excute(agent) { @@ -162,16 +162,16 @@ unsafe extern "C" fn expression_specialhijump(agent: &mut L2CAgentBase) { } // #[acmd_script( agent = "wario", scripts = ["game_speciallwsr", "game_specialairlwsr"], category = ACMD_GAME, low_priority )] -// unsafe fn wario_special_lw_sr_game(fighter: &mut L2CAgentBase) { -// let lua_state = fighter.lua_state_agent; -// let boma = fighter.boma(); +// unsafe fn wario_special_lw_sr_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); // frame(lua_state, 16.0); -// if is_excute(fighter) { -// ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 270, 100, 80, 0, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); -// ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 270, 30, 0, 50, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +// if is_excute(agent) { +// ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 270, 100, 80, 0, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); +// ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 270, 30, 0, 50, 9.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_slip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // } // frame(lua_state, 19.0); -// if is_excute(fighter) { +// if is_excute(agent) { // AttackModule::clear_all(boma); // } // } From 806ba55f062a844e4aef38c8a19db30b2ac80aa9 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 08:32:44 -0500 Subject: [PATCH 122/172] more --- fighters/bayonetta/src/acmd/other.rs | 10 +++++----- fighters/bayonetta/src/status/attack.rs | 1 - fighters/chrom/src/acmd/specials.rs | 8 ++++---- fighters/cloud/src/acmd/ground.rs | 4 ++-- fighters/kirby/src/acmd/specials.rs | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index f03ef0ff51..02c5830816 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -249,13 +249,13 @@ unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { let rate = WorkModule::get_float(boma, *WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_FLOAT_MOTION_RATE); LAST_EFFECT_SET_RATE(agent, rate); } - // if fighter.get_int(*WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_INT_COSTUME_KIND) == *FIGHTER_BAYONETTA_COSTUME_KIND_BAYONETTA_1 { - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin_bat"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); + // if agent.get_int(*WEAPON_BAYONETTA_BAT_INSTANCE_WORK_ID_INT_COSTUME_KIND) == *FIGHTER_BAYONETTA_COSTUME_KIND_BAYONETTA_1 { + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin_bat"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); // } // } else { - // if is_excute(fighter) { - // EFFECT_FOLLOW(fighter, Hash40::new("bayonetta_batwithin_bat2"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); + // if is_excute(agent) { + // EFFECT_FOLLOW(agent, Hash40::new("bayonetta_batwithin_bat2"), Hash40::new("trans"), 0, 0, 0, 0, 0, 0, 0.6, true); // } // } if is_excute(agent) { diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index f108bfbac1..44f84d009c 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -1,7 +1,6 @@ use super::*; use globals::*; - // FIGHTER_STATUS_KIND_ATTACK // unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/chrom/src/acmd/specials.rs b/fighters/chrom/src/acmd/specials.rs index b0c158438e..4a3147c0e5 100644 --- a/fighters/chrom/src/acmd/specials.rs +++ b/fighters/chrom/src/acmd/specials.rs @@ -27,7 +27,7 @@ unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + //AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); if is_excute(agent) { @@ -37,7 +37,7 @@ unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); if is_excute(agent) { @@ -135,7 +135,7 @@ unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + //AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); } frame(lua_state, 9.0); if is_excute(agent) { @@ -145,7 +145,7 @@ unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + //QUAKE(agent, *CAMERA_QUAKE_KIND_M); } frame(lua_state, 23.0); if is_excute(agent) { diff --git a/fighters/cloud/src/acmd/ground.rs b/fighters/cloud/src/acmd/ground.rs index 7ecad2cd95..7b78ac6f21 100644 --- a/fighters/cloud/src/acmd/ground.rs +++ b/fighters/cloud/src/acmd/ground.rs @@ -81,8 +81,8 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } //frame(lua_state, 10.0); -//if is_excute(fighter) { -// ATTACK(fighter, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); +//if is_excute(agent) { +// ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); //} frame(lua_state, 14.0); if is_excute(agent) { diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index 728f8e9c81..29a41e8725 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -366,7 +366,7 @@ unsafe extern "C" fn sound_specialhih(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_kirby_special_h02")); - match smash::app::sv_math::rand(smash::hash40(), 2) { + match smash::app::sv_math::rand(smash::hash40("fighter"), 2) { 0 => PLAY_SE(agent, Hash40::new("vc_kirby_002")), 1 => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), _ => PLAY_SE(agent, Hash40::new("vc_kirby_attack07")), From ce3fe6725debd772ca5561c7900368df10cfaa1d Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 09:42:38 -0500 Subject: [PATCH 123/172] byleth --- fighters/master/src/acmd/aerials.rs | 45 ++- fighters/master/src/acmd/ground.rs | 30 +- fighters/master/src/acmd/mod.rs | 16 +- fighters/master/src/acmd/other.rs | 192 ++----------- fighters/master/src/acmd/smashes.rs | 136 +++++---- fighters/master/src/acmd/specials.rs | 398 ++++---------------------- fighters/master/src/acmd/throws.rs | 35 ++- fighters/master/src/acmd/tilts.rs | 39 ++- fighters/master/src/arrow1/acmd.rs | 14 + fighters/master/src/arrow1/mod.rs | 9 + fighters/master/src/arrow2/acmd.rs | 16 ++ fighters/master/src/arrow2/mod.rs | 9 + fighters/master/src/axe/acmd.rs | 86 ++++++ fighters/master/src/axe/mod.rs | 9 + fighters/master/src/lib.rs | 21 +- fighters/master/src/opff.rs | 7 +- fighters/master/src/status.rs | 14 +- fighters/master/src/status/rebirth.rs | 15 + 18 files changed, 391 insertions(+), 700 deletions(-) create mode 100644 fighters/master/src/arrow1/acmd.rs create mode 100644 fighters/master/src/arrow1/mod.rs create mode 100644 fighters/master/src/arrow2/acmd.rs create mode 100644 fighters/master/src/arrow2/mod.rs create mode 100644 fighters/master/src/axe/acmd.rs create mode 100644 fighters/master/src/axe/mod.rs create mode 100644 fighters/master/src/status/rebirth.rs diff --git a/fighters/master/src/acmd/aerials.rs b/fighters/master/src/acmd/aerials.rs index 2458018d17..ebbd91091e 100644 --- a/fighters/master/src/acmd/aerials.rs +++ b/fighters/master/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn master_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -51,10 +50,9 @@ unsafe extern "C" fn master_attack_air_n_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_landing_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -64,7 +62,7 @@ unsafe extern "C" fn master_landing_air_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -107,10 +105,9 @@ unsafe extern "C" fn master_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -127,7 +124,7 @@ unsafe extern "C" fn master_attack_air_f_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -169,7 +166,7 @@ unsafe extern "C" fn master_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn master_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -219,10 +216,9 @@ unsafe extern "C" fn master_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn master_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -237,7 +233,7 @@ unsafe extern "C" fn master_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -273,18 +269,19 @@ unsafe extern "C" fn master_attack_air_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attackairn", master_attack_air_n_game) - .acmd("game_landingairn", master_landing_air_n_game) - .acmd("game_attackairf", master_attack_air_f_game) - .acmd("expression_attackairf", master_attack_air_f_expression) - .acmd("game_attackairb", master_attack_air_b_game) - .acmd("game_attackairhi", master_attack_air_hi_game) - .acmd("effect_attackairhi", master_attack_air_hi_effect) - .acmd("game_attackairlw", master_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/master/src/acmd/ground.rs b/fighters/master/src/acmd/ground.rs index 1131bc0a40..bb8ce6a2d2 100644 --- a/fighters/master/src/acmd/ground.rs +++ b/fighters/master/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn master_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -21,10 +20,9 @@ unsafe extern "C" fn master_attack_11_game(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } -unsafe extern "C" fn master_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -48,10 +46,9 @@ unsafe extern "C" fn master_attack_12_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } -unsafe extern "C" fn master_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -65,7 +62,7 @@ unsafe extern "C" fn master_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.9); @@ -89,10 +86,9 @@ unsafe extern "C" fn master_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 4.0); } - } -unsafe extern "C" fn master_attack_dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -126,15 +122,13 @@ unsafe extern "C" fn master_attack_dash_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attack11", master_attack_11_game) - .acmd("game_attack12", master_attack_12_game) - .acmd("game_attack13", master_attack_13_game) - .acmd("game_attackdash", master_attack_dash_game) - .acmd("effect_attackdash", master_attack_dash_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/master/src/acmd/mod.rs b/fighters/master/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/master/src/acmd/mod.rs +++ b/fighters/master/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/master/src/acmd/other.rs b/fighters/master/src/acmd/other.rs index 23068e2282..b4c0ab2037 100644 --- a/fighters/master/src/acmd/other.rs +++ b/fighters/master/src/acmd/other.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -25,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -51,10 +51,9 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -64,7 +63,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -77,151 +76,12 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn master_arrow1_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(boma); - } - -} - -unsafe extern "C" fn master_arrow2_search_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); - AttackModule::disable_tip(boma); - } - -} - -unsafe extern "C" fn master_axe_special_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - frame(lua_state, 61.0); - if is_excute(agent) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); - } - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - - } - } - frame(lua_state, 67.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - } -unsafe extern "C" fn master_axe_special_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - frame(lua_state, 61.0); - if is_excute(agent) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); - } - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { - ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - } - else { - // Ground-only - ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - // Air-only - ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); - - } - } - frame(lua_state, 67.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn master_axe_special_lw_hit_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - } - else{ - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - } - - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_edge"), -1); - } - frame(lua_state, 16.0); - if is_excute(agent) { - if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - else{ - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); - } - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp1"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp2"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp3"), false, true); - } - frame(lua_state, 40.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("master_axe_aura"), false, true); - } - -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -232,10 +92,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -246,28 +105,17 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("master_axe") - .acmd("game_speciallw", master_axe_special_lw_game) - .acmd("game_specialairlw", master_axe_special_air_lw_game) - .acmd("effect_speciallwhit", master_axe_special_lw_hit_effect) - .install(); - smashline::Agent::new("master") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("master_arrow1") - .acmd("game_fly", master_arrow1_fly_game) - .install(); - smashline::Agent::new("master_arrow2") - .acmd("game_search", master_arrow2_search_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/master/src/acmd/smashes.rs b/fighters/master/src/acmd/smashes.rs index 916fcd9e29..7a261c2c21 100644 --- a/fighters/master/src/acmd/smashes.rs +++ b/fighters/master/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn master_attack_s4_charge_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -30,7 +29,7 @@ unsafe extern "C" fn master_attack_s4_charge_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_s4_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -155,10 +154,9 @@ unsafe extern "C" fn master_attack_s4_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -187,7 +185,7 @@ unsafe extern "C" fn master_attack_s4_hi_effect(agent: &mut L2CAgentBase) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); LAST_EFFECT_SET_RATE(agent, 0.9); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ @@ -237,7 +235,49 @@ unsafe extern "C" fn master_attack_s4_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + app::sv_animcmd::execute(lua_state, 14.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new_raw(0x1782d1b9f2), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 25.0); + if is_excute(agent) { + agent.clear_lua_stack(); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 1); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 2); + RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 3); + RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 4); + } + frame(lua_state, 44.0); + frame(lua_state, 46.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } + } + frame(lua_state, 85.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_REQ_EFFECT_AURA); + } +} + +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -362,10 +402,9 @@ unsafe extern "C" fn master_attack_s4_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -394,7 +433,7 @@ unsafe extern "C" fn master_attack_s4_s_effect(agent: &mut L2CAgentBase) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW_ALPHA(agent, Hash40::new("master_spearflare"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true, 2); LAST_EFFECT_SET_RATE(agent, 0.9); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 10, 35, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_smash_s_wind"), Hash40::new("top"), 0, 19, 34.5, -18, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ @@ -444,7 +483,7 @@ unsafe extern "C" fn master_attack_s4_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_s4_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -569,10 +608,9 @@ unsafe extern "C" fn master_attack_s4_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_attack_s4_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -651,49 +689,7 @@ unsafe extern "C" fn master_attack_s4_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_s4_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_OFF_EFFECT_AURA); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - frame(lua_state, 14.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - app::sv_animcmd::execute(lua_state, 14.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 23.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new_raw(0x1782d1b9f2), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 25.0); - if is_excute(agent) { - agent.clear_lua_stack(); - RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 0); - RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 1); - RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 2); - RUMBLE_HIT(agent, Hash40::new("rbkind_piercel"), 3); - RUMBLE_HIT(agent, Hash40::new("rbkind_pierces"), 4); - } - frame(lua_state, 44.0); - frame(lua_state, 46.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - } - } - frame(lua_state, 85.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_INSTANCE_WORK_ID_FLAG_SWORD_REQ_EFFECT_AURA); - } -} - -unsafe extern "C" fn master_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -740,18 +736,18 @@ unsafe extern "C" fn master_attack_lw4_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("master") - .acmd("effect_attacks4charge", master_attack_s4_charge_effect) - .acmd("game_attacks4hi", master_attack_s4_hi_game) - .acmd("effect_attacks4hi", master_attack_s4_hi_effect) - .acmd("game_attacks4", master_attack_s4_s_game) - .acmd("effect_attacks4", master_attack_s4_s_effect) - .acmd("game_attacks4lw", master_attack_s4_lw_game) - .acmd("effect_attacks4lw", master_attack_s4_lw_effect) - .acmd("expression_attacks4hi", master_attack_s4_expression) - .acmd("expression_attacks4", master_attack_s4_expression) - .acmd("expression_attacks4lw", master_attack_s4_expression) - .acmd("game_attacklw4", master_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); + agent.acmd("expression_attacks4hi", expression_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("expression_attacks4lw", expression_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/master/src/acmd/specials.rs b/fighters/master/src/acmd/specials.rs index 6fdf685396..a4f08536df 100644 --- a/fighters/master/src/acmd/specials.rs +++ b/fighters/master/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn master_special_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -29,41 +28,9 @@ unsafe extern "C" fn master_special_n_start_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.75); } - } -unsafe extern "C" fn master_special_air_n_start_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.500); - if ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, false, 0); - if !ArticleModule::is_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1) { - ArticleModule::generate_article(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, false, 0); - } - } - frame(lua_state, 20.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_ENABLE_TURN); - } - frame(lua_state, 44.0); - if is_excute(agent) { - } - frame(lua_state, 45.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_N_FLAG_CAN_SHOOT); - } - frame(lua_state, 46.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.75); - } - -} - -unsafe extern "C" fn master_special_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -76,20 +43,7 @@ unsafe extern "C" fn master_special_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_air_n_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ArticleModule::shoot_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_ARROW1, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - FT_MOTION_RATE(agent, 0.8); - } - frame(lua_state, 35.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_BOW, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn master_special_s_front_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -161,10 +115,9 @@ unsafe extern "C" fn master_special_s_front_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_special_s_front_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -204,10 +157,9 @@ unsafe extern "C" fn master_special_s_front_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("master_spear_slash_particle"), false, true); } - } -unsafe extern "C" fn master_special_s_front_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsfdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -260,10 +212,9 @@ unsafe extern "C" fn master_special_s_front_dash_game(agent: &mut L2CAgentBase) if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_special_air_s_front_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -318,10 +269,9 @@ unsafe extern "C" fn master_special_air_s_front_game(agent: &mut L2CAgentBase) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn master_special_air_s_front_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsfdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -369,10 +319,9 @@ unsafe extern "C" fn master_special_air_s_front_dash_game(agent: &mut L2CAgentBa ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_S_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn master_special_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -429,7 +378,7 @@ unsafe extern "C" fn master_special_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -508,7 +457,7 @@ unsafe extern "C" fn master_special_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_air_hi_overtake_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhiovertake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -561,10 +510,9 @@ unsafe extern "C" fn master_special_air_hi_overtake_game(agent: &mut L2CAgentBas ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } - } -unsafe extern "C" fn master_special_air_hi_overtake_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhiovertake(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -591,7 +539,7 @@ unsafe extern "C" fn master_special_air_hi_overtake_effect(agent: &mut L2CAgentB } } -unsafe extern "C" fn master_special_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -614,24 +562,23 @@ unsafe extern "C" fn master_special_lw_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, motion_rate); ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } - } frame(lua_state, 34.0); if is_excute(agent) { - if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { - // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); - // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // DamageModule::set_damage_mul(boma, 1.25); - // } + // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ + // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); + // let motion_rate = 48.0/(42.0-34.0); + // FT_MOTION_RATE(agent, motion_rate); + // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); + // DamageModule::set_damage_mul(boma, 1.25); + // } + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); - if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(agent, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } + } + if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + let motion_rate = 5.0/(42.0-34.0); + FT_MOTION_RATE(agent, motion_rate); + ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); } } frame(lua_state, 42.0); @@ -677,7 +624,7 @@ unsafe extern "C" fn master_special_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -750,93 +697,7 @@ unsafe extern "C" fn master_special_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); - } - frame(lua_state, 12.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); - } - frame(lua_state, 14.0); - if is_excute(agent) { - if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 1); - } - else{ - VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 0); - let motion_rate = 5.0/(42.0-14.0); - FT_MOTION_RATE(agent, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - - } - frame(lua_state, 34.0); - if is_excute(agent) { - // if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)){ - // VarModule::set_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL, 2); - // let motion_rate = 48.0/(42.0-34.0); - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // DamageModule::set_damage_mul(boma, 1.25); - // } - if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_START_SUPER_ARMOR); - } - if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 1 { - let motion_rate = 5.0/(42.0-34.0); - FT_MOTION_RATE(agent, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - } - frame(lua_state, 42.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0); - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_TURN_CHECK); - } - frame(lua_state, 51.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_1); - } - frame(lua_state, 60.0); - if is_excute(agent) { - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); - - } - frame(lua_state, 64.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_END_SUPER_ARMOR); - ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, true, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - } - frame(lua_state, 65.0); - if is_excute(agent) { - ArticleModule::set_flag(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, false, *WEAPON_PIERCE_INSTANCE_WORK_ID_FLAG_PIERCE_GROUND); - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_FORBID_LANDING); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); - - } - frame(lua_state, 96.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); - } - frame(lua_state, 117.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_INHERIT_LANDING_2); - } - frame(lua_state, 118.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn master_special_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -908,56 +769,9 @@ unsafe extern "C" fn master_special_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_lw_hit_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - // frame(lua_state, 1.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); - // } - // } - // frame(lua_state, 5.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // } - // } - // } - // frame(lua_state, 50.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // let motion_rate = 1.0; - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // else{ - // let motion_rate = 7.0; - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // } - // } - // frame(lua_state, 52.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(agent, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 7.0, 0.0, 0.0, -300.0, Some(0.0), Some(0.0), Some(300.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_level(boma, 0, 5 as u8); - // } - // } - // } - // frame(lua_state, 53.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // } - // } frame(lua_state, 54.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); @@ -980,7 +794,7 @@ unsafe extern "C" fn master_special_lw_hit_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_lw_hit_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -1008,138 +822,28 @@ unsafe extern "C" fn master_special_lw_hit_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_special_air_lw_hit_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - // frame(lua_state, 1.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 1, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - // AttackModule::set_add_reaction_frame(boma, 0, 60.0, false); - // } - // } - // frame(lua_state, 5.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // //ATTACK(agent, 0, 1, Hash40::new("top"), 30.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // } - // } - // } - // frame(lua_state, 50.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // let motion_rate = 1.0; - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // else{ - // let motion_rate = 7.0; - // FT_MOTION_RATE(agent, motion_rate); - // ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - // } - // } - // } - // frame(lua_state, 52.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT){ - // ATTACK(agent, 0, 2, Hash40::new("top"), 1.0, 270, 0, 0, 10, 300.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - // AttackModule::set_attack_level(boma, 0, 5 as u8); - // } - // } - // } - // frame(lua_state, 53.0); - // if is_excute(agent) { - // if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 2 { - // AttackModule::clear_all(boma); - // } - // } - frame(lua_state, 54.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_PULL_AXE); - let motion_rate = 1.0; - FT_MOTION_RATE(agent, motion_rate); - ArticleModule::set_rate(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, 1.0/motion_rate); - } - frame(lua_state, 56.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_DEGREE_X); - } - frame(lua_state, 58.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_CONTROL_ENERGY); - WorkModule::on_flag(boma, *FIGHTER_MASTER_STATUS_SPECIAL_LW_FLAG_REVERT_FALL_SPEED); - } - frame(lua_state, 78.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); -// #[acmd_script( agent = "master_axe", script = "game_speciallwhit" , category = ACMD_GAME , low_priority)] -// unsafe fn master_axe_special_lw_hit_game(agent: &mut L2CAgentBase) { -// let lua_state = agent.lua_state_agent; -// let boma = agent.boma(); -// frame(lua_state, 2.0); -// if is_excute(agent) { -// if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) == 0 { -// ATTACK(agent, 1, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 3, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 4, 0, Hash40::new("haver"), 8.0, 88, 30, 0, 100, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// } -// else if VarModule::get_int(agent.battle_object, vars::master::status::AYMR_CHARGE_LEVEL) > 0 { -// ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 3, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// ATTACK(agent, 4, 0, Hash40::new("haver"), 10.0, 88, 30, 0, 100, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); -// } -// AttackModule::clear(boma, 0, false); -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 3.0); -// if is_excute(agent) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 4.0); -// if is_excute(agent) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 5.0); -// if is_excute(agent) { -// WorkModule::on_flag(boma, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_FLAG_MOVE_ATTACK); -// } -// frame(lua_state, 6.0); -// if is_excute(agent) { -// AttackModule::clear_all(boma); -// } -// } + agent.acmd("game_specialsf", game_specialsf); + agent.acmd("effect_specialsf", effect_specialsf); + agent.acmd("game_specialsfdash", game_specialsfdash); + agent.acmd("game_specialairsf", game_specialairsf); + agent.acmd("game_specialairsfdash", game_specialairsfdash); -pub fn install() { - smashline::Agent::new("master") - .acmd("game_specialnstart", master_special_n_start_game) - .acmd("game_specialairnstart", master_special_air_n_start_game) - .acmd("game_specialn", master_special_n_game) - .acmd("game_specialairn", master_special_air_n_game) - .acmd("game_specialsf", master_special_s_front_game) - .acmd("effect_specialsf", master_special_s_front_effect) - .acmd("game_specialsfdash", master_special_s_front_dash_game) - .acmd("game_specialairsf", master_special_air_s_front_game) - .acmd("game_specialairsfdash", master_special_air_s_front_dash_game) - .acmd("game_specialhi", master_special_hi_game) - .acmd("game_specialairhi", master_special_air_hi_game) - .acmd("game_specialairhiovertake", master_special_air_hi_overtake_game) - .acmd("effect_specialairhiovertake", master_special_air_hi_overtake_effect) - .acmd("game_speciallw", master_special_lw_game) - .acmd("effect_speciallw", master_special_lw_effect) - .acmd("game_specialairlw", master_special_air_lw_game) - .acmd("effect_specialairlw", master_special_air_lw_effect) - .acmd("game_speciallwhit", master_special_lw_hit_game) - .acmd("effect_speciallwhit", master_special_lw_hit_effect) - .acmd("game_specialairlwhit", master_special_air_lw_hit_game) - .install(); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhiovertake", game_specialairhiovertake); + agent.acmd("effect_specialairhiovertake", effect_specialairhiovertake); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); } \ No newline at end of file diff --git a/fighters/master/src/acmd/throws.rs b/fighters/master/src/acmd/throws.rs index 1b2cd55108..1e9611ce63 100644 --- a/fighters/master/src/acmd/throws.rs +++ b/fighters/master/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn master_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -21,10 +21,9 @@ unsafe extern "C" fn master_catch_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn master_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn master_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -64,7 +63,7 @@ unsafe extern "C" fn master_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -100,10 +99,9 @@ unsafe extern "C" fn master_throw_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -153,10 +151,9 @@ unsafe extern "C" fn master_throw_b_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn master_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -192,16 +189,16 @@ unsafe extern "C" fn master_throw_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_catch", master_catch_game) - .acmd("game_catchdash", master_catch_dash_game) - .acmd("game_catchturn", master_catch_turn_game) - .acmd("game_throwf", master_throw_f_game) - .acmd("game_throwb", master_throw_b_game) - .acmd("game_throwlw", master_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/master/src/acmd/tilts.rs b/fighters/master/src/acmd/tilts.rs index c90aa425c7..11de707f82 100644 --- a/fighters/master/src/acmd/tilts.rs +++ b/fighters/master/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn master_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -40,10 +39,9 @@ unsafe extern "C" fn master_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn master_attack_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -69,10 +67,9 @@ unsafe extern "C" fn master_attack_s3_s_effect(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("master_swordflare"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -unsafe extern "C" fn master_attack_s3_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -88,7 +85,7 @@ unsafe extern "C" fn master_attack_s3_s_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -121,7 +118,7 @@ unsafe extern "C" fn master_attack_hi3_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn master_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -147,10 +144,9 @@ unsafe extern "C" fn master_attack_hi3_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("master_axe_hold2"), false, true); } - } -unsafe extern "C" fn master_attack_hi3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -167,7 +163,7 @@ unsafe extern "C" fn master_attack_hi3_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn master_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -187,17 +183,16 @@ unsafe extern "C" fn master_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -pub fn install() { - smashline::Agent::new("master") - .acmd("game_attacks3", master_attack_s3_s_game) - .acmd("effect_attacks3", master_attack_s3_s_effect) - .acmd("expression_attacks3", master_attack_s3_s_expression) - .acmd("game_attackhi3", master_attack_hi3_game) - .acmd("effect_attackhi3", master_attack_hi3_effect) - .acmd("expression_attackhi3", master_attack_hi3_expression) - .acmd("game_attacklw3", master_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/master/src/arrow1/acmd.rs b/fighters/master/src/arrow1/acmd.rs new file mode 100644 index 0000000000..f15cdbb563 --- /dev/null +++ b/fighters/master/src/arrow1/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 40, 74, 0, 40, 1.6, 0.0, 0.0, -1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_bowarrow"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::enable_safe_pos(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/master/src/arrow1/mod.rs b/fighters/master/src/arrow1/mod.rs new file mode 100644 index 0000000000..7bafead31e --- /dev/null +++ b/fighters/master/src/arrow1/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_arrow1"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/arrow2/acmd.rs b/fighters/master/src/arrow2/acmd.rs new file mode 100644 index 0000000000..1e78cdae75 --- /dev/null +++ b/fighters/master/src/arrow2/acmd.rs @@ -0,0 +1,16 @@ +use super::*; + +unsafe extern "C" fn game_search(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, -2.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 30.0, 361, 60, 0, 53, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 9, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_ARROW_MAX, *ATTACK_REGION_ENERGY); + AttackModule::disable_tip(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_search", game_search); +} diff --git a/fighters/master/src/arrow2/mod.rs b/fighters/master/src/arrow2/mod.rs new file mode 100644 index 0000000000..051faccffe --- /dev/null +++ b/fighters/master/src/arrow2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_arrow2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/axe/acmd.rs b/fighters/master/src/axe/acmd.rs new file mode 100644 index 0000000000..9a6e910f2a --- /dev/null +++ b/fighters/master/src/axe/acmd.rs @@ -0,0 +1,86 @@ +use super::*; + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + frame(lua_state, 61.0); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) > 0 { + WorkModule::set_int(boma, 0, *WEAPON_MASTER_AXE_INSTANCE_WORK_ID_INT_CRITICAL_ATTACK_ID); + } + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 0 { + ATTACK(agent, 0, 0, Hash40::new("haver"), 18.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 8, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + } + else if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 1 { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 51, 83, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("haver"), 30.0, 275, 34, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + } + else { + // Ground-only + ATTACK(agent, 0, 0, Hash40::new("haver"), 30.0, 270, 0, 0, 60, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + // Air-only + ATTACK(agent, 1, 0, Hash40::new("haver"), 60.0, 275, 50, 0, 20, 5.7, 0.0, 14.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MASTER_AXE, *ATTACK_REGION_OBJECT); + + } + } + frame(lua_state, 67.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("master_axe_aura"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("master_axe_slash_edge"), -1); + } + frame(lua_state, 16.0); + if is_excute(agent) { + if VarModule::get_int(owner_module_accessor.object(), vars::master::status::AYMR_CHARGE_LEVEL) == 2 { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + else { + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp1_end"), Hash40::new("blade1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp2_end"), Hash40::new("blade2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("master_axeflare_sp3_end"), Hash40::new("axe"), 0, 0, 0, 0, 0, 0, 1, true); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp2"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("master_axeflare_sp3"), false, true); + } + frame(lua_state, 40.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("master_axe_aura"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallwhit", effect_speciallwhit); +} diff --git a/fighters/master/src/axe/mod.rs b/fighters/master/src/axe/mod.rs new file mode 100644 index 0000000000..40822283d8 --- /dev/null +++ b/fighters/master/src/axe/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("master_axe"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/master/src/lib.rs b/fighters/master/src/lib.rs index 5537dac979..0bb112490d 100644 --- a/fighters/master/src/lib.rs +++ b/fighters/master/src/lib.rs @@ -4,8 +4,14 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod axe; +mod arrow1; +mod arrow2; use smash::{ lib::{ @@ -37,9 +43,16 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("master"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + axe::install(); + arrow1::install(); + arrow2::install(); } \ No newline at end of file diff --git a/fighters/master/src/opff.rs b/fighters/master/src/opff.rs index 043f2f8ee4..f1eb0fc215 100644 --- a/fighters/master/src/opff.rs +++ b/fighters/master/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn areadbhar_autocancel(boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -129,8 +128,6 @@ pub unsafe fn master_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("master") - .on_line(Main, master_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, master_frame_wrapper); } \ No newline at end of file diff --git a/fighters/master/src/status.rs b/fighters/master/src/status.rs index 50f753f3bb..1bfd8a0b7b 100644 --- a/fighters/master/src/status.rs +++ b/fighters/master/src/status.rs @@ -1,16 +1,8 @@ use super::*; use globals::*; -unsafe extern "C" fn master_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() -} +mod rebirth; -pub fn install() { - smashline::Agent::new("master") - .status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, master_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + rebirth::install(agent); } diff --git a/fighters/master/src/status/rebirth.rs b/fighters/master/src/status/rebirth.rs new file mode 100644 index 0000000000..62f08dd3ce --- /dev/null +++ b/fighters/master/src/status/rebirth.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MASTER_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} \ No newline at end of file From d776c65f86563bf064b00d2867e90ab6b941a8d6 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 10:18:05 -0500 Subject: [PATCH 124/172] woomy --- fighters/inkling/src/acmd/aerials.rs | 38 ++-- fighters/inkling/src/acmd/ground.rs | 26 ++- fighters/inkling/src/acmd/mod.rs | 16 +- fighters/inkling/src/acmd/other.rs | 228 ++--------------------- fighters/inkling/src/acmd/smashes.rs | 26 +-- fighters/inkling/src/acmd/specials.rs | 21 +-- fighters/inkling/src/acmd/throws.rs | 33 ++-- fighters/inkling/src/acmd/tilts.rs | 26 ++- fighters/inkling/src/inkbullet/acmd.rs | 22 +++ fighters/inkling/src/inkbullet/mod.rs | 9 + fighters/inkling/src/lib.rs | 51 +++-- fighters/inkling/src/opff.rs | 11 +- fighters/inkling/src/roller/acmd.rs | 114 ++++++++++++ fighters/inkling/src/roller/mod.rs | 9 + fighters/inkling/src/splash/acmd.rs | 30 +++ fighters/inkling/src/splash/mod.rs | 9 + fighters/inkling/src/splashbomb/acmd.rs | 27 +++ fighters/inkling/src/splashbomb/mod.rs | 9 + fighters/inkling/src/status.rs | 31 +-- fighters/inkling/src/status/guard.rs | 18 ++ fighters/inkling/src/status/special_s.rs | 28 +-- 21 files changed, 407 insertions(+), 375 deletions(-) create mode 100644 fighters/inkling/src/inkbullet/acmd.rs create mode 100644 fighters/inkling/src/inkbullet/mod.rs create mode 100644 fighters/inkling/src/roller/acmd.rs create mode 100644 fighters/inkling/src/roller/mod.rs create mode 100644 fighters/inkling/src/splash/acmd.rs create mode 100644 fighters/inkling/src/splash/mod.rs create mode 100644 fighters/inkling/src/splashbomb/acmd.rs create mode 100644 fighters/inkling/src/splashbomb/mod.rs create mode 100644 fighters/inkling/src/status/guard.rs diff --git a/fighters/inkling/src/acmd/aerials.rs b/fighters/inkling/src/acmd/aerials.rs index f2bdc801e1..3f02fe4ebd 100644 --- a/fighters/inkling/src/acmd/aerials.rs +++ b/fighters/inkling/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn inkling_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -29,10 +28,9 @@ unsafe extern "C" fn inkling_attack_air_n_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn inkling_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -68,10 +66,9 @@ unsafe extern "C" fn inkling_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -99,10 +96,9 @@ unsafe extern "C" fn inkling_attack_air_b_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -143,10 +139,9 @@ unsafe extern "C" fn inkling_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn inkling_attack_air_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -163,7 +158,7 @@ unsafe extern "C" fn inkling_attack_air_hi_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn inkling_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -197,16 +192,17 @@ unsafe extern "C" fn inkling_attack_air_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attackairn", inkling_attack_air_n_game) - .acmd("game_attackairf", inkling_attack_air_f_game) - .acmd("game_attackairb", inkling_attack_air_b_game) - .acmd("game_attackairhi", inkling_attack_air_hi_game) - .acmd("expression_attackairhi", inkling_attack_air_hi_expression) - .acmd("game_attackairlw", inkling_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/inkling/src/acmd/ground.rs b/fighters/inkling/src/acmd/ground.rs index 533e348374..9cd31c406c 100644 --- a/fighters/inkling/src/acmd/ground.rs +++ b/fighters/inkling/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn inkling_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -22,7 +21,7 @@ unsafe extern "C" fn inkling_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -47,7 +46,7 @@ unsafe extern "C" fn inkling_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -62,7 +61,7 @@ unsafe extern "C" fn inkling_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_attack_100_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -84,7 +83,7 @@ unsafe extern "C" fn inkling_attack_100_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); // base 0.84 @@ -134,12 +133,11 @@ unsafe extern "C" fn inkling_attack_dash_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attack11", inkling_attack_11_game) - .acmd("game_attack12", inkling_attack_12_game) - .acmd("game_attack13", inkling_attack_13_game) - .acmd("game_attack100end", inkling_attack_100_end_game) - .acmd("game_attackdash", inkling_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100end", game_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/inkling/src/acmd/mod.rs b/fighters/inkling/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/inkling/src/acmd/mod.rs +++ b/fighters/inkling/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/inkling/src/acmd/other.rs b/fighters/inkling/src/acmd/other.rs index 1765e74907..205f51b839 100644 --- a/fighters/inkling/src/acmd/other.rs +++ b/fighters/inkling/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -51,185 +51,10 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_inkbullet_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); - AttackModule::enable_safe_pos(boma); - AttackModule::set_ink_value(boma, 0, 0.0); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); - ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); - AttackModule::set_ink_value(boma, 0, 0.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_walk_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 60.0); - AttackModule::set_ink_value(boma, 1, 60.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_walk_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 60.0); - AttackModule::set_ink_value(boma, 1, 60.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_walk_no_ink_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_roller_special_s_dash_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 120.0); - AttackModule::set_ink_value(boma, 1, 120.0); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_dash_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_dash_no_ink_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_roller_special_s_run_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_air_s_run_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_ink_value(boma, 0, 100.0); - AttackModule::set_ink_value(boma, 1, 100.0); - } -} - -unsafe extern "C" fn inkling_roller_special_s_run_no_ink_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn inkling_splash_normal_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if !WorkModule::is_flag(owner_boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_AFTER_SPECIAL_HI) { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - AttackModule::set_ink_value(boma, 0, 50.0); - AttackModule::set_ink_value(boma, 1, 50.0); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); - AttackModule::set_ink_value(boma, 0, 40.0); - AttackModule::set_ink_value(boma, 1, 40.0); - } - frame(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - } -} - -unsafe extern "C" fn inkling_splashbomb_explode_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); - AttackModule::set_ink_value(boma, 0, 0.0); - QUAKE(agent, *CAMERA_QUAKE_KIND_L); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 12.0); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 14.0); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } @@ -278,10 +103,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } @@ -330,35 +154,15 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("inkling_splash") - .acmd("game_normal", inkling_splash_normal_game) - .install(); - smashline::Agent::new("inkling_splashbomb") - .acmd("game_explode", inkling_splashbomb_explode_game) - .install(); - smashline::Agent::new("inkling") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("inkling_inkbullet") - .acmd("game_fly", inkling_inkbullet_fly_game) - .install(); - smashline::Agent::new("inkling_roller") - .acmd("game_specialswalk", inkling_roller_special_s_walk_game) - .acmd("game_specialairswalk", inkling_roller_special_air_s_walk_game) - .acmd("game_specialswalknoink", inkling_roller_special_s_walk_no_ink_game) - .acmd("game_specialsdash", inkling_roller_special_s_dash_game) - .acmd("game_specialairsdash", inkling_roller_special_air_s_dash_game) - .acmd("game_specialsdashnoink", inkling_roller_special_s_dash_no_ink_game) - .acmd("game_specialsrun", inkling_roller_special_s_run_game) - .acmd("game_specialairsrun", inkling_roller_special_air_s_run_game) - .acmd("game_specialsrunnoink", inkling_roller_special_s_run_no_ink_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/inkling/src/acmd/smashes.rs b/fighters/inkling/src/acmd/smashes.rs index d4f5f93f11..061ef1b896 100644 --- a/fighters/inkling/src/acmd/smashes.rs +++ b/fighters/inkling/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn inkling_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -33,19 +32,17 @@ unsafe extern "C" fn inkling_attack_s4_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_s4_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BRUSH, smash::phx::Hash40::new("attack_s4_charge"), false, 0.0); } - } -unsafe extern "C" fn inkling_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -84,23 +81,20 @@ unsafe extern "C" fn inkling_attack_hi4_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi4_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_BLASTER, smash::phx::Hash40::new("attack_hi4_charge"), false, 0.0); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attacks4", inkling_attack_s4_s_game) - .acmd("game_attacks4charge", inkling_attack_s4_hold_game) - .acmd("game_attackhi4", inkling_attack_hi4_game) - .acmd("game_attackhi4charge", inkling_attack_hi4_hold_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4charge", game_attacks4charge); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4charge", game_attackhi4charge); } diff --git a/fighters/inkling/src/acmd/specials.rs b/fighters/inkling/src/acmd/specials.rs index c2558bc5d6..4b674cf781 100644 --- a/fighters/inkling/src/acmd/specials.rs +++ b/fighters/inkling/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn inkling_special_n_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -23,7 +22,7 @@ unsafe extern "C" fn inkling_special_n_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_special_air_n_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -45,7 +44,7 @@ unsafe extern "C" fn inkling_special_air_n_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_special_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -73,11 +72,11 @@ unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_specialnend", inkling_special_n_end_game) - .acmd("game_specialairnend", inkling_special_air_n_end_game) - .acmd("effect_specialsend", inkling_special_s_end_effect) - .acmd("game_specialhijump", game_specialhijump) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialairnend); + + agent.acmd("effect_specialsend", effect_specialsend); + + agent.acmd("game_specialhijump", game_specialhijump); } diff --git a/fighters/inkling/src/acmd/throws.rs b/fighters/inkling/src/acmd/throws.rs index 1593ea2951..b7076866c3 100644 --- a/fighters/inkling/src/acmd/throws.rs +++ b/fighters/inkling/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn inkling_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -18,10 +18,9 @@ unsafe extern "C" fn inkling_catch_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn inkling_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -71,7 +70,7 @@ unsafe extern "C" fn inkling_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -121,7 +120,7 @@ unsafe extern "C" fn inkling_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -146,10 +145,9 @@ unsafe extern "C" fn inkling_throw_f_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 7.0); frame(lua_state, 45.0); FT_MOTION_RATE(agent, 1.0); - } -unsafe extern "C" fn inkling_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -209,7 +207,7 @@ unsafe extern "C" fn inkling_throw_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -229,13 +227,14 @@ unsafe extern "C" fn inkling_throw_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_catch", inkling_catch_game) - .acmd("game_catchdash", inkling_catch_dash_game) - .acmd("game_catchturn", inkling_catch_turn_game) - .acmd("game_throwf", inkling_throw_f_game) - .acmd("game_throwb", inkling_throw_b_game) - .acmd("game_throwlw", inkling_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/inkling/src/acmd/tilts.rs b/fighters/inkling/src/acmd/tilts.rs index 9c5d4d937f..79d82c4902 100644 --- a/fighters/inkling/src/acmd/tilts.rs +++ b/fighters/inkling/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn inkling_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -15,10 +14,9 @@ unsafe extern "C" fn inkling_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -44,10 +42,9 @@ unsafe extern "C" fn inkling_attack_hi3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn inkling_attack_hi3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -68,7 +65,7 @@ unsafe extern "C" fn inkling_attack_hi3_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn inkling_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -91,14 +88,13 @@ unsafe extern "C" fn inkling_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("inkling") - .acmd("game_attacks3", inkling_attack_s3_s_game) - .acmd("game_attackhi3", inkling_attack_hi3_game) - .acmd("expression_attackhi3", inkling_attack_hi3_expression) - .acmd("game_attacklw3", inkling_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/inkling/src/inkbullet/acmd.rs b/fighters/inkling/src/inkbullet/acmd.rs new file mode 100644 index 0000000000..67f14ca8b0 --- /dev/null +++ b/fighters/inkling/src/inkbullet/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 45, 100, 6, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, 0, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::enable_safe_pos(boma); + AttackModule::set_ink_value(boma, 0, 0.0); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 3.0, 0.0, 0.0, 5.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_INKLING_HIT, *ATTACK_REGION_WATER); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.5); + AttackModule::set_ink_value(boma, 0, 0.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/inkling/src/inkbullet/mod.rs b/fighters/inkling/src/inkbullet/mod.rs new file mode 100644 index 0000000000..0f79befb05 --- /dev/null +++ b/fighters/inkling/src/inkbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_inkbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/lib.rs b/fighters/inkling/src/lib.rs index e9c22ddd20..cb897b96dd 100644 --- a/fighters/inkling/src/lib.rs +++ b/fighters/inkling/src/lib.rs @@ -4,28 +4,57 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod inkbullet; +mod roller; +mod splash; +mod splashbomb; use smash::{ + lib::{ + L2CValue, + LuaConst + }, app::{ - self, - lua_bind::*, - sv_animcmd::{frame, wait}, *, + self, + sv_animcmd::{ + frame, + wait + }, + lua_bind::* }, hash40, lib::lua_const::*, - lib::{L2CValue, LuaConst}, lua2cpp::*, - phx::*, + phx::* +}; +use smash_script::{ + *, + macros::* +}; +use utils::{ + *, + util::*, + ext::*, + consts::*, }; -use smash_script::{macros::*, *}; use smashline::*; -use utils::{consts::*, ext::*, util::*, *}; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("inkling"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + inkbullet::install(); + roller::install(); + splash::install(); + splashbomb::install(); } diff --git a/fighters/inkling/src/opff.rs b/fighters/inkling/src/opff.rs index de53961b58..46863773b1 100644 --- a/fighters/inkling/src/opff.rs +++ b/fighters/inkling/src/opff.rs @@ -158,11 +158,8 @@ pub unsafe fn inkling_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("inkling") - .on_line(Main, inkling_frame_wrapper) - .install(); - skyline::install_hooks!( - get_ink_colors - ); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, inkling_frame_wrapper); + + skyline::install_hooks!(get_ink_colors); } diff --git a/fighters/inkling/src/roller/acmd.rs b/fighters/inkling/src/roller/acmd.rs new file mode 100644 index 0000000000..7d67b6c9a4 --- /dev/null +++ b/fighters/inkling/src/roller/acmd.rs @@ -0,0 +1,114 @@ +use super::*; + +unsafe extern "C" fn game_specialswalk(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 4.0, 60, 80, 0, 60, 3.6, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 60.0); + AttackModule::set_ink_value(boma, 1, 60.0); + } +} + +unsafe extern "C" fn game_specialswalknoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.0, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 2.0, 50, 50, 0, 50, 3.8, 0.5, 3.8, 0.0, Some(0.5), Some(3.8), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 60, 90, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 120.0); + AttackModule::set_ink_value(boma, 1, 120.0); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 80, 80, 0, 95, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 75, 60, 0, 100, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialsdashnoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 5.0, 50, 80, 0, 60, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn game_specialsrun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 60, 105, 0, 25, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_bury"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.0, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 80, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialairsrun(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 11.0, 75, 80, 0, 90, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + AttackModule::set_ink_value(boma, 0, 100.0); + AttackModule::set_ink_value(boma, 1, 100.0); + } +} + +unsafe extern "C" fn game_specialsrunnoink(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("neck"), 8.0, 50, 80, 0, 60, 3.6, 0.5, 3.8, 5.0, Some(0.5), Some(3.8), Some(-5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 40, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialswalk", game_specialswalk); + agent.acmd("game_specialairswalk", game_specialswalk); + agent.acmd("game_specialswalknoink", game_specialswalknoink); + + agent.acmd("game_specialsdash", game_specialsdash); + agent.acmd("game_specialairsdash", game_specialairsdash); + agent.acmd("game_specialsdashnoink", game_specialsdashnoink); + + agent.acmd("game_specialsrun", game_specialsrun); + agent.acmd("game_specialairsrun", game_specialairsrun); + agent.acmd("game_specialsrunnoink", game_specialsrunnoink); +} \ No newline at end of file diff --git a/fighters/inkling/src/roller/mod.rs b/fighters/inkling/src/roller/mod.rs new file mode 100644 index 0000000000..0b895524df --- /dev/null +++ b/fighters/inkling/src/roller/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_roller"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/splash/acmd.rs b/fighters/inkling/src/splash/acmd.rs new file mode 100644 index 0000000000..61298abb66 --- /dev/null +++ b/fighters/inkling/src/splash/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_normal(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if !WorkModule::is_flag(owner_boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_AFTER_SPECIAL_HI) { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -0.5, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + AttackModule::set_ink_value(boma, 0, 50.0); + AttackModule::set_ink_value(boma, 1, 50.0); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, -7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 50, 30, 0, 60, 5.0, 0.0, 2.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_WATER); + AttackModule::set_ink_value(boma, 0, 40.0); + AttackModule::set_ink_value(boma, 1, 40.0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_normal", game_normal); +} \ No newline at end of file diff --git a/fighters/inkling/src/splash/mod.rs b/fighters/inkling/src/splash/mod.rs new file mode 100644 index 0000000000..def1e8d486 --- /dev/null +++ b/fighters/inkling/src/splash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_splash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/splashbomb/acmd.rs b/fighters/inkling/src/splashbomb/acmd.rs new file mode 100644 index 0000000000..74bd342ee4 --- /dev/null +++ b/fighters/inkling/src/splashbomb/acmd.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 47, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ink_hit"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_BOMB); + AttackModule::set_ink_value(boma, 0, 0.0); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 12.0); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 14.0); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/inkling/src/splashbomb/mod.rs b/fighters/inkling/src/splashbomb/mod.rs new file mode 100644 index 0000000000..3b94a3e106 --- /dev/null +++ b/fighters/inkling/src/splashbomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("inkling_splashbomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/inkling/src/status.rs b/fighters/inkling/src/status.rs index 3b28eea35c..7321319d03 100644 --- a/fighters/inkling/src/status.rs +++ b/fighters/inkling/src/status.rs @@ -1,14 +1,7 @@ use super::*; mod special_s; - -unsafe extern "C" fn guard_on(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOn() -} - -unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_Guard() -} +mod guard; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -28,21 +21,15 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn inkling_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_INKLING { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install() { - special_s::install(); - smashline::Agent::new("inkling") - .status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on) - .status(Main, *FIGHTER_STATUS_KIND_GUARD, guard) - .on_start(inkling_init) - .install(); + agent.on_start(on_start); + + special_s::install(agent); + guard::install(agent); } diff --git a/fighters/inkling/src/status/guard.rs b/fighters/inkling/src/status/guard.rs new file mode 100644 index 0000000000..4c5f9a743e --- /dev/null +++ b/fighters/inkling/src/status/guard.rs @@ -0,0 +1,18 @@ +use super::*; + +// FIGHTER_STATUS_KIND_GUARD_ON + +unsafe extern "C" fn guard_on_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOn() +} + +// FIGHTER_STATUS_KIND_GUARD + +unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_Guard() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_ON, guard_on_main); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD, guard_main); +} diff --git a/fighters/inkling/src/status/special_s.rs b/fighters/inkling/src/status/special_s.rs index 5a50ee7cb5..57264ed26f 100644 --- a/fighters/inkling/src/status/special_s.rs +++ b/fighters/inkling/src/status/special_s.rs @@ -3,7 +3,7 @@ use globals::*; // FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK -pub unsafe extern "C" fn special_s_walk(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_walk_main(fighter: &mut L2CFighterCommon) -> L2CValue { // Once per airtime if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { VarModule::on_flag(fighter.battle_object, vars::inkling::instance::DISABLE_SPECIAL_S); @@ -13,7 +13,7 @@ pub unsafe extern "C" fn special_s_walk(fighter: &mut L2CFighterCommon) -> L2CVa // FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN -pub unsafe extern "C" fn special_s_run(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_run_main(fighter: &mut L2CFighterCommon) -> L2CValue { // Once per airtime if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { VarModule::on_flag(fighter.battle_object, vars::inkling::instance::DISABLE_SPECIAL_S); @@ -21,7 +21,7 @@ pub unsafe extern "C" fn special_s_run(fighter: &mut L2CFighterCommon) -> L2CVal smashline::original_status(Main, fighter, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN)(fighter) } -// FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END +// special_s_jump_end_init pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> L2CValue { // Burn double jump when jumping out of Splat Roller @@ -32,22 +32,8 @@ pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("inkling") - .status( - Main, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK, - special_s_walk, - ) - .status( - Main, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN, - special_s_run, - ) - .status( - Init, - *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END, - special_s_jump_init, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_WALK, special_s_walk_main); + agent.status(Main, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_RUN, special_s_run_main); + agent.status(Init, *FIGHTER_INKLING_STATUS_KIND_SPECIAL_S_JUMP_END, special_s_jump_end_init); } From 4a0906e0d7786c8776433a099dc86b4cb9d2ef40 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 10:23:46 -0500 Subject: [PATCH 125/172] veemo --- fighters/inkling/src/status.rs | 2 +- fighters/inkling/src/status/special_s.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/inkling/src/status.rs b/fighters/inkling/src/status.rs index 7321319d03..a7e01599d8 100644 --- a/fighters/inkling/src/status.rs +++ b/fighters/inkling/src/status.rs @@ -27,7 +27,7 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -pub fn install() { +pub fn install(agent: &mut Agent) { agent.on_start(on_start); special_s::install(agent); diff --git a/fighters/inkling/src/status/special_s.rs b/fighters/inkling/src/status/special_s.rs index 57264ed26f..be2fcd4d44 100644 --- a/fighters/inkling/src/status/special_s.rs +++ b/fighters/inkling/src/status/special_s.rs @@ -23,7 +23,7 @@ pub unsafe extern "C" fn special_s_run_main(fighter: &mut L2CFighterCommon) -> L // special_s_jump_end_init -pub unsafe extern "C" fn special_s_jump_init(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_jump_end_init(fighter: &mut L2CFighterCommon) -> L2CValue { // Burn double jump when jumping out of Splat Roller if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && fighter.get_num_used_jumps() < fighter.get_jump_count_max() { From b4878de24f10ce45f1ff90d0614e7507533920db Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 11:19:59 -0500 Subject: [PATCH 126/172] plant --- fighters/packun/src/acmd/aerials.rs | 64 ++-- fighters/packun/src/acmd/ground.rs | 35 +- fighters/packun/src/acmd/mod.rs | 16 +- fighters/packun/src/acmd/other.rs | 467 ++--------------------- fighters/packun/src/acmd/smashes.rs | 102 +++-- fighters/packun/src/acmd/specials.rs | 101 +++-- fighters/packun/src/acmd/throws.rs | 59 ++- fighters/packun/src/acmd/tilts.rs | 67 ++-- fighters/packun/src/lib.rs | 58 +-- fighters/packun/src/opff.rs | 77 +--- fighters/packun/src/poisonbreath/acmd.rs | 112 ++++++ fighters/packun/src/poisonbreath/mod.rs | 11 + fighters/packun/src/poisonbreath/opff.rs | 43 +++ fighters/packun/src/spikeball/acmd.rs | 260 +++++++++++++ fighters/packun/src/spikeball/mod.rs | 11 + fighters/packun/src/spikeball/opff.rs | 37 ++ fighters/packun/src/status.rs | 14 +- fighters/packun/src/status/attack_s4.rs | 10 +- fighters/packun/src/status/special_hi.rs | 8 +- fighters/packun/src/status/special_s.rs | 12 +- 20 files changed, 778 insertions(+), 786 deletions(-) create mode 100644 fighters/packun/src/poisonbreath/acmd.rs create mode 100644 fighters/packun/src/poisonbreath/mod.rs create mode 100644 fighters/packun/src/poisonbreath/opff.rs create mode 100644 fighters/packun/src/spikeball/acmd.rs create mode 100644 fighters/packun/src/spikeball/mod.rs create mode 100644 fighters/packun/src/spikeball/opff.rs diff --git a/fighters/packun/src/acmd/aerials.rs b/fighters/packun/src/acmd/aerials.rs index 9269fbff58..3b68f0dc44 100644 --- a/fighters/packun/src/acmd/aerials.rs +++ b/fighters/packun/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn packun_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -39,10 +38,9 @@ unsafe extern "C" fn packun_attack_air_n_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -77,10 +75,9 @@ unsafe extern "C" fn packun_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -91,10 +88,9 @@ unsafe extern "C" fn packun_attack_air_f_expression(agent: &mut L2CAgentBase) { if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } -unsafe extern "C" fn packun_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -143,10 +139,9 @@ unsafe extern "C" fn packun_attack_air_b_game(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } -unsafe extern "C" fn packun_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -206,7 +201,7 @@ unsafe extern "C" fn packun_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -230,7 +225,7 @@ unsafe extern "C" fn packun_attack_air_b_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -263,7 +258,7 @@ unsafe extern "C" fn packun_attack_air_b_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -283,7 +278,7 @@ unsafe extern "C" fn packun_attack_air_b_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -292,7 +287,7 @@ unsafe extern "C" fn packun_attack_air_b_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_air_b_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairbs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -302,7 +297,7 @@ unsafe extern "C" fn packun_attack_air_b_s_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -344,10 +339,9 @@ unsafe extern "C" fn packun_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn packun_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -394,22 +388,24 @@ unsafe extern "C" fn packun_attack_air_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attackairn", packun_attack_air_n_game) - .acmd("game_attackairf", packun_attack_air_f_game) - .acmd("expression_attackairf", packun_attack_air_f_expression) - .acmd("game_attackairb", packun_attack_air_b_game) - .acmd("effect_attackairb", packun_attack_air_b_effect) - .acmd("sound_attackairb", packun_attack_air_b_sound) - .acmd("game_attackairbs", packun_attack_air_b_s_game) - .acmd("effect_attackairbs", packun_attack_air_b_s_effect) - .acmd("sound_attackairbs", packun_attack_air_b_s_sound) - .acmd("expression_attackairbs", packun_attack_air_b_s_expression) - .acmd("game_attackairhi", packun_attack_air_hi_game) - .acmd("game_attackairlw", packun_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("sound_attackairb", sound_attackairb); + + agent.acmd("game_attackairbs", game_attackairbs); + agent.acmd("effect_attackairbs", effect_attackairbs); + agent.acmd("sound_attackairbs", sound_attackairbs); + agent.acmd("expression_attackairbs", expression_attackairbs); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/packun/src/acmd/ground.rs b/fighters/packun/src/acmd/ground.rs index 3a6aad1362..ed7c3e01e6 100644 --- a/fighters/packun/src/acmd/ground.rs +++ b/fighters/packun/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn packun_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -27,7 +26,7 @@ unsafe extern "C" fn packun_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -67,7 +66,7 @@ unsafe extern "C" fn packun_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -94,7 +93,7 @@ unsafe extern "C" fn packun_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_13_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -110,7 +109,7 @@ unsafe extern "C" fn packun_attack_13_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_100_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -130,7 +129,7 @@ unsafe extern "C" fn packun_attack_100_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_100_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -160,7 +159,7 @@ unsafe extern "C" fn packun_attack_100_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -208,17 +207,15 @@ unsafe extern "C" fn packun_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } - } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attack11", packun_attack_11_game) - .acmd("game_attack12", packun_attack_12_game) - .acmd("game_attack13", packun_attack_13_game) - .acmd("effect_attack13", packun_attack_13_effect) - .acmd("game_attack100end", packun_attack_100_end_game) - .acmd("effect_attack100end", packun_attack_100_end_effect) - .acmd("game_attackdash", packun_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("effect_attack100end", effect_attack100end); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/packun/src/acmd/mod.rs b/fighters/packun/src/acmd/mod.rs index f787fcc9b4..d1292b6c83 100644 --- a/fighters/packun/src/acmd/mod.rs +++ b/fighters/packun/src/acmd/mod.rs @@ -51,12 +51,12 @@ impl From for StanceInfo { } } -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 8f5cb5098b..541214dc3c 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -1,37 +1,16 @@ use super::*; -unsafe extern "C" fn packun_catch_attack_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); - } - frame(lua_state, 1.0); - if is_excute(agent) { - let damage = if stance != 1 { 0.0 } else { 0.3 }; - let effect = if stance != 1 { Hash40::new("collision_attr_normal") } else { Hash40::new("collision_attr_purple") }; - ATTACK(agent, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); - AttackModule::set_catch_only_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); +unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); frame(lua_state, 15.0); - if is_excute(agent) { + if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -49,7 +28,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -63,11 +42,10 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -78,10 +56,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -92,7 +69,7 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -113,7 +90,7 @@ unsafe extern "C" fn appeal_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_hi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -130,7 +107,7 @@ unsafe extern "C" fn appeal_hi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_hi_2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -150,12 +127,7 @@ unsafe extern "C" fn appeal_hi_2_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_hi_2_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} - -unsafe extern "C" fn appeal_hi_2_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 29.0); @@ -172,7 +144,7 @@ unsafe extern "C" fn appeal_hi_2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_hi_2_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_appealhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -193,7 +165,7 @@ unsafe extern "C" fn appeal_hi_2_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -212,7 +184,7 @@ unsafe extern "C" fn appeal_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appeals(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -241,7 +213,7 @@ unsafe extern "C" fn appeal_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let cur_stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -254,7 +226,7 @@ unsafe extern "C" fn appeal_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn appeal_lw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appeallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -271,392 +243,33 @@ unsafe extern "C" fn appeal_lw_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_spikeball_game_start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - frame(lua_state, 1.0); - if is_excute(agent) { - ModelModule::set_scale(boma, scale); - MotionModule::set_rate(boma, 1.4); - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_start_air(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - frame(lua_state, 1.0); - if is_excute(agent) { - ModelModule::set_scale(boma, scale); - MotionModule::set_rate(boma, 1.4); - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_loop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_loop_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(agent) { - //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if WorkModule::is_flag(boma, *WEAPON_PACKUN_SPIKEBALL_INSTANCE_WORK_ID_FLAG_REACTIVE) { - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - } - else { - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - } - frame(lua_state, 4.0); - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_shoot_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - for _ in 0..999 { - if is_excute(agent) { - if boma.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP){ - EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); - } - } - wait(lua_state, 3.0); - } - } -} - -unsafe extern "C" fn packun_spikeball_game_fall(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } -} - -unsafe extern "C" fn packun_spikeball_fall_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(agent) { - //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); - } - } -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} -unsafe extern "C" fn packun_spikeball_game_wait(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; - if is_excute(agent) { - if stance == 1 { - ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); - } - else { - let kbg = if stance == 0 { 0 } else { 5 }; - ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } - } - /*frame(lua_state, 55.0); - if is_excute(agent) { - if stance == 1 { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 361, 45, 3.0, false); - } - }*/ -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -unsafe extern "C" fn packun_spikeball_wait_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; - if stance == 1 { - if is_excute(agent) { - //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); - } - } -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); -unsafe extern "C" fn packun_spikeball_game_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - AttackModule::clear_all(boma); - ModelModule::set_scale(boma, 0.1); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); - AttackModule::set_poison_param(boma, 0, 151, 30, 3.5, false); - } -} + agent.acmd("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); + agent.acmd("sound_appealhil", sound_appealhi); + agent.acmd("sound_appealhir", sound_appealhi); -unsafe extern "C" fn packun_spikeball_effect_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.01, 0.7); - LAST_EFFECT_SET_RATE(agent, 1.25); - } -} - -unsafe extern "C" fn packun_spikeball_sound_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_bomb_l")); - } -} + agent.acmd("game_appealhi2", game_appealhi2); + agent.acmd("effect_appealhi2", null); + agent.acmd("sound_appealhi2", sound_appealhi2); + agent.acmd("expression_appealhi2", expression_appealhi2); -unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn game_shootmax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn game_startmax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - AttackModule::set_no_hop_opponent_all(boma, true, false); - } -} - -unsafe extern "C" fn packun_poisonbreath_game_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - frame(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(agent) { - WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } -} - -unsafe extern "C" fn packun_poisonbreath_effect_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath2"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_gas"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_max"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_max_smoke"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth"), false, false); - EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth2"), false, false); - EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 0.7); - } -} - -unsafe extern "C" fn packun_poisonbreath_sound_explode(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_bomb_l")); - } -} + agent.acmd("game_appealsl", game_appeals); + agent.acmd("game_appealsr", game_appeals); + agent.acmd("sound_appealsl", sound_appeals); + agent.acmd("sound_appealsr", sound_appeals); -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_catchattack", packun_catch_attack_game) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealhil", appeal_hi_game) - .acmd("game_appealhir", appeal_hi_game) - .acmd("sound_appealhil", appeal_hi_sound) - .acmd("sound_appealhir", appeal_hi_sound) - .acmd("game_appealhi2", appeal_hi_2_game) - .acmd("effect_appealhi2", appeal_hi_2_effect) - .acmd("sound_appealhi2", appeal_hi_2_sound) - .acmd("expression_appealhi2", appeal_hi_2_expression) - .acmd("game_appealsl", appeal_s_game) - .acmd("game_appealsr", appeal_s_game) - .acmd("sound_appealsl", appeal_s_sound) - .acmd("sound_appealsr", appeal_s_sound) - .acmd("game_appeallwl", appeal_lw_game) - .acmd("game_appeallwr", appeal_lw_game) - .acmd("sound_appeallwl", appeal_lw_sound) - .acmd("sound_appeallwr", appeal_lw_sound) - .install(); - smashline::Agent::new("packun_spikeball") - .acmd("game_start", packun_spikeball_game_start) - .acmd("game_startair", packun_spikeball_game_start_air) - .acmd("game_loop", packun_spikeball_game_loop) - .acmd("effect_loop", packun_spikeball_loop_effect) - .acmd("game_shoot", packun_spikeball_game_shoot) - .acmd("effect_shoot", packun_spikeball_shoot_effect) - .acmd("game_fall", packun_spikeball_game_fall) - .acmd("effect_fall", packun_spikeball_fall_effect) - .acmd("game_wait", packun_spikeball_game_wait) - .acmd("effect_wait", packun_spikeball_wait_effect) - .acmd("game_explode", packun_spikeball_game_explode) - .acmd("effect_explode", packun_spikeball_effect_explode) - .acmd("sound_explode", packun_spikeball_sound_explode) - .install(); - smashline::Agent::new("packun_poisonbreath") - .acmd("game_shoot", game_shoot) - .acmd("game_shootmax", game_shootmax) - .acmd("game_start", game_start) - .acmd("game_shoot", game_start) - .acmd("game_startmax", game_startmax) - .acmd("game_shootmax", game_startmax) - .acmd("game_explode", packun_poisonbreath_game_explode) - .acmd("effect_explode", packun_poisonbreath_effect_explode) - .acmd("sound_explode", packun_poisonbreath_sound_explode) - .install(); + agent.acmd("game_appeallwl", game_appeallw); + agent.acmd("game_appeallwr", game_appeallw); + agent.acmd("sound_appeallwl", sound_appeallw); + agent.acmd("sound_appeallwr", sound_appeallw); } diff --git a/fighters/packun/src/acmd/smashes.rs b/fighters/packun/src/acmd/smashes.rs index d87c56572e..ae0c883dd9 100644 --- a/fighters/packun/src/acmd/smashes.rs +++ b/fighters/packun/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn packun_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -29,10 +28,9 @@ unsafe extern "C" fn packun_attack_s4_s_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -59,7 +57,7 @@ unsafe extern "C" fn packun_attack_s4_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn packun_attack_s4_s2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 22.0); @@ -92,10 +90,9 @@ unsafe extern "C" fn packun_attack_s4_s2_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s4_s2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -122,7 +119,24 @@ unsafe extern "C" fn packun_attack_s4_s2_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_s2_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks42(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 24.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_packun_smash_s01")); + } + frame(lua_state, 31.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); + } +} + +unsafe extern "C" fn expression_attacks42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -156,7 +170,7 @@ unsafe extern "C" fn packun_attack_s4_s2_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_2_charge_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -169,10 +183,9 @@ unsafe extern "C" fn packun_attack_s4_2_charge_effect(agent: &mut L2CAgentBase) } wait(lua_state, 5.0); } - } -unsafe extern "C" fn packun_attack_s4_2_charge_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -181,7 +194,7 @@ unsafe extern "C" fn packun_attack_s4_2_charge_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s4_s2_charge_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4charge2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -195,24 +208,7 @@ unsafe extern "C" fn packun_attack_s4_s2_charge_expression(agent: &mut L2CAgentB } } -unsafe extern "C" fn packun_attack_s4_s2_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 24.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_packun_smash_s01")); - } - frame(lua_state, 31.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); - } -} - -unsafe extern "C" fn packun_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -263,10 +259,9 @@ unsafe extern "C" fn packun_attack_hi4_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -307,7 +302,7 @@ unsafe extern "C" fn packun_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -331,7 +326,7 @@ unsafe extern "C" fn packun_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -386,10 +381,9 @@ unsafe extern "C" fn packun_attack_lw4_game(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); VarModule::off_flag(boma.object(), vars::packun::status::FLAME_ACTIVE); } - } -unsafe extern "C" fn packun_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -427,21 +421,23 @@ unsafe extern "C" fn packun_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attacks4", packun_attack_s4_s_game) - .acmd("effect_attacks4", packun_attack_s4_effect) - .acmd("game_attacks42", packun_attack_s4_s2_game) - .acmd("effect_attacks42", packun_attack_s4_s2_effect) - .acmd("expression_attacks42", packun_attack_s4_s2_expression) - .acmd("effect_attacks4charge2", packun_attack_s4_2_charge_effect) - .acmd("sound_attacks4charge2", packun_attack_s4_2_charge_sound) - .acmd("expression_attacks4charge2", packun_attack_s4_s2_charge_expression) - .acmd("sound_attacks42", packun_attack_s4_s2_sound) - .acmd("game_attackhi4", packun_attack_hi4_game) - .acmd("effect_attackhi4", packun_attack_hi4_effect) - .acmd("sound_attackhi4", packun_attack_hi4_sound) - .acmd("game_attacklw4", packun_attack_lw4_game) - .acmd("effect_attacklw4", packun_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attacks42", game_attacks42); + agent.acmd("effect_attacks42", effect_attacks42); + agent.acmd("sound_attacks42", sound_attacks42); + agent.acmd("expression_attacks42", expression_attacks42); + + agent.acmd("effect_attacks4charge2", effect_attacks4charge2); + agent.acmd("sound_attacks4charge2", sound_attacks4charge2); + agent.acmd("expression_attacks4charge2", expression_attacks4charge2); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/specials.rs b/fighters/packun/src/acmd/specials.rs index c0ad9e68ca..78409de453 100644 --- a/fighters/packun/src/acmd/specials.rs +++ b/fighters/packun/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn packun_special_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -22,7 +21,7 @@ unsafe extern "C" fn packun_special_n_start_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.7); } -unsafe extern "C" fn packun_special_s_shoot_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -80,7 +79,7 @@ unsafe extern "C" fn packun_special_s_shoot_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let charged = WorkModule::get_int(boma, *FIGHTER_PACKUN_INSTANCE_WORK_ID_INT_SPECIAL_S_COUNT) == 60; @@ -152,7 +151,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn packun_special_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -178,7 +177,7 @@ unsafe extern "C" fn packun_special_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -221,7 +220,7 @@ unsafe extern "C" fn packun_special_s_shoot_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -243,7 +242,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_air_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -268,7 +267,7 @@ unsafe extern "C" fn packun_special_air_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -308,7 +307,7 @@ unsafe extern "C" fn packun_special_air_s_shoot_effect(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn packun_special_s_shoot_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -343,10 +342,9 @@ unsafe extern "C" fn packun_special_s_shoot_expression(agent: &mut L2CAgentBase) ControlModule::set_rumble(boma, Hash40::new("rbkind_attacks"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } - } -unsafe extern "C" fn packun_special_air_s_shoot_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 19.0); @@ -365,7 +363,7 @@ unsafe extern "C" fn packun_special_air_s_shoot_s_effect(agent: &mut L2CAgentBas } } -unsafe extern "C" fn packun_special_s_shoot_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); @@ -396,7 +394,7 @@ unsafe extern "C" fn packun_special_s_shoot_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 17.0); @@ -412,7 +410,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_s_shoot_s_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsshoots(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -435,7 +433,7 @@ unsafe extern "C" fn packun_special_s_shoot_s_expression(agent: &mut L2CAgentBas } } -unsafe extern "C" fn packun_special_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -466,10 +464,9 @@ unsafe extern "C" fn packun_special_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } - } -unsafe extern "C" fn packun_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -504,10 +501,9 @@ unsafe extern "C" fn packun_special_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PACKUN_STATUS_SPECIAL_HI_DIVE); } - } -unsafe extern "C" fn packun_special_lw_bite_attack_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwbiteattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -540,7 +536,7 @@ unsafe extern "C" fn packun_special_lw_bite_attack_game(agent: &mut L2CAgentBase } } -unsafe extern "C" fn packun_special_lw_bite__attack_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwbite_attack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -573,7 +569,7 @@ unsafe extern "C" fn packun_special_lw_bite__attack_game(agent: &mut L2CAgentBas } } -unsafe extern "C" fn packun_special_lw_bite_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwbite(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -615,7 +611,7 @@ unsafe extern "C" fn packun_special_lw_bite_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_special_air_lw_bite_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairlwbite(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -650,33 +646,34 @@ unsafe extern "C" fn packun_special_air_lw_bite_effect(agent: &mut L2CAgentBase) } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_specialnstart", packun_special_n_start_game) - .acmd("game_specialairnstart", packun_special_n_start_game) - .acmd("game_specialsshoot", packun_special_s_shoot_game) - .acmd("game_specialairsshoot", packun_special_s_shoot_game) - .acmd("game_specialsshoots", packun_special_s_shoot_s_game) - .acmd("game_specialairsshoots", packun_special_s_shoot_s_game) - .acmd("effect_specialsend", packun_special_s_end_effect) - .acmd("effect_specialsshoot", packun_special_s_shoot_effect) - .acmd("effect_specialsshoots", packun_special_s_shoot_s_effect) - .acmd("effect_specialairsend", packun_special_air_s_end_effect) - .acmd("effect_specialairsshoot", packun_special_air_s_shoot_effect) - .acmd("expression_specialsshoot", packun_special_s_shoot_expression) - .acmd("expression_specialairsshoot", packun_special_s_shoot_expression) - .acmd("effect_specialairsshoots", packun_special_air_s_shoot_s_effect) - .acmd("sound_specialsshoot", packun_special_s_shoot_sound) - .acmd("sound_specialairsshoot", packun_special_s_shoot_sound) - .acmd("sound_specialsshoots", packun_special_s_shoot_s_sound) - .acmd("sound_specialairsshoots", packun_special_s_shoot_s_sound) - .acmd("expression_specialsshoots", packun_special_s_shoot_s_expression) - .acmd("expression_specialairsshoots", packun_special_s_shoot_s_expression) - .acmd("game_specialhi", packun_special_hi_game) - .acmd("game_specialairhi", packun_special_air_hi_game) - .acmd("game_speciallwbiteattack", packun_special_lw_bite_attack_game) - .acmd("game_speciallwbite_attack", packun_special_lw_bite__attack_game) - .acmd("effect_speciallwbite", packun_special_lw_bite_effect) - .acmd("effect_specialairlwbite", packun_special_air_lw_bite_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + + agent.acmd("game_specialsshoot", game_specialsshoot); + agent.acmd("game_specialairsshoot", game_specialsshoot); + agent.acmd("game_specialsshoots", game_specialsshoots); + agent.acmd("game_specialairsshoots", game_specialsshoots); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialsshoot", effect_specialsshoot); + agent.acmd("effect_specialsshoots", effect_specialsshoots); + agent.acmd("effect_specialairsend", effect_specialairsend); + agent.acmd("effect_specialairsshoot", effect_specialairsshoot); + agent.acmd("expression_specialsshoot", expression_specialsshoot); + agent.acmd("expression_specialairsshoot", expression_specialsshoot); + agent.acmd("effect_specialairsshoots", effect_specialairsshoots); + agent.acmd("sound_specialsshoot", sound_specialsshoot); + agent.acmd("sound_specialairsshoot", sound_specialsshoot); + agent.acmd("sound_specialsshoots", sound_specialsshoots); + agent.acmd("sound_specialairsshoots", sound_specialsshoots); + agent.acmd("expression_specialsshoots", expression_specialsshoots); + agent.acmd("expression_specialairsshoots", expression_specialsshoots); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwbiteattack", game_speciallwbiteattack); + agent.acmd("game_speciallwbite_attack", game_speciallwbite_attack); + agent.acmd("effect_speciallwbite", effect_speciallwbite); + agent.acmd("effect_specialairlwbite", effect_specialairlwbite); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/throws.rs b/fighters/packun/src/acmd/throws.rs index 679088345b..17e1a0ccdb 100644 --- a/fighters/packun/src/acmd/throws.rs +++ b/fighters/packun/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn packun_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -21,10 +21,9 @@ unsafe extern "C" fn packun_catch_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn packun_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -44,7 +43,7 @@ unsafe extern "C" fn packun_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -64,7 +63,27 @@ unsafe extern "C" fn packun_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let stance = VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + VarModule::on_flag(boma.object(), vars::common::status::PUMMEL_OVERRIDE_GLOBAL_STATS); + } + frame(lua_state, 1.0); + if is_excute(agent) { + let damage = if stance != 1 { 0.0 } else { 0.3 }; + let effect = if stance != 1 { Hash40::new("collision_attr_normal") } else { Hash40::new("collision_attr_purple") }; + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4 + damage, 361, 100, 30, 0, 5.0, 0.0, 10.0, 10.0, None, None, None, 3.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, effect, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_HEAD); + AttackModule::set_catch_only_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -95,7 +114,7 @@ unsafe extern "C" fn packun_throw_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -118,7 +137,7 @@ unsafe extern "C" fn packun_throw_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -150,7 +169,7 @@ unsafe extern "C" fn packun_throw_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -192,14 +211,18 @@ unsafe extern "C" fn packun_throw_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_catch", packun_catch_game) - .acmd("game_catchdash", packun_catch_dash_game) - .acmd("game_catchturn", packun_catch_turn_game) - .acmd("game_throwf", packun_throw_f_game) - .acmd("game_throwb", packun_throw_b_game) - .acmd("game_throwhi", packun_throw_hi_game) - .acmd("game_throwlw", packun_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_catchattack", game_catchattack); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/packun/src/acmd/tilts.rs b/fighters/packun/src/acmd/tilts.rs index 32a2b45141..dc8df07083 100644 --- a/fighters/packun/src/acmd/tilts.rs +++ b/fighters/packun/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn packun_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -30,10 +30,9 @@ unsafe extern "C" fn packun_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn packun_attack_s3_s_a_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3a(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -54,7 +53,7 @@ unsafe extern "C" fn packun_attack_s3_s_a_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s_a_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3a(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -91,7 +90,7 @@ unsafe extern "C" fn packun_attack_s3_s_a_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s_a_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks3a(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -104,7 +103,7 @@ unsafe extern "C" fn packun_attack_s3_s_a_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s_a_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3a(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -117,7 +116,7 @@ unsafe extern "C" fn packun_attack_s3_s_a_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -177,10 +176,9 @@ unsafe extern "C" fn packun_attack_s3_s2_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("neck6"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("neck8"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_s3_s2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -213,7 +211,7 @@ unsafe extern "C" fn packun_attack_s3_s2_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -229,7 +227,7 @@ unsafe extern "C" fn packun_attack_s3_s2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_s3_s2_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -247,7 +245,7 @@ unsafe extern "C" fn packun_attack_s3_s2_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -276,10 +274,9 @@ unsafe extern "C" fn packun_attack_hi3_game(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("lipu3"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("lipd3"), *HIT_STATUS_NORMAL); } - } -unsafe extern "C" fn packun_attack_hi3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -296,7 +293,7 @@ unsafe extern "C" fn packun_attack_hi3_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let stance = StanceInfo::from(VarModule::get_int(boma.object(), vars::packun::instance::CURRENT_STANCE)); @@ -317,10 +314,9 @@ unsafe extern "C" fn packun_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn packun_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -340,7 +336,7 @@ unsafe extern "C" fn packun_attack_lw3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn packun_attack_lw3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -364,21 +360,22 @@ unsafe extern "C" fn packun_attack_lw3_expression(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("packun") - .acmd("game_attacks3", packun_attack_s3_s_game) - .acmd("game_attacks3a", packun_attack_s3_s_a_game) - .acmd("effect_attacks3a", packun_attack_s3_s_a_effect) - .acmd("sound_attacks3a", packun_attack_s3_s_a_sound) - .acmd("expression_attacks3a", packun_attack_s3_s_a_expression) - .acmd("game_attacks32", packun_attack_s3_s2_game) - .acmd("effect_attacks32", packun_attack_s3_s2_effect) - .acmd("sound_attacks32", packun_attack_s3_s2_sound) - .acmd("expression_attacks32", packun_attack_s3_s2_expression) - .acmd("game_attackhi3", packun_attack_hi3_game) - .acmd("expression_attackhi3", packun_attack_hi3_expression) - .acmd("game_attacklw3", packun_attack_lw3_game) - .acmd("effect_attacklw3", packun_attack_lw3_effect) - .acmd("expression_attacklw3", packun_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3a", game_attacks3a); + agent.acmd("effect_attacks3a", effect_attacks3a); + agent.acmd("sound_attacks3a", sound_attacks3a); + agent.acmd("expression_attacks3a", expression_attacks3a); + + agent.acmd("game_attacks32", game_attacks32); + agent.acmd("effect_attacks32", effect_attacks32); + agent.acmd("sound_attacks32", sound_attacks32); + agent.acmd("expression_attacks32", expression_attacks32); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/packun/src/lib.rs b/fighters/packun/src/lib.rs index d2eb961fea..e9b3073e05 100644 --- a/fighters/packun/src/lib.rs +++ b/fighters/packun/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod spikeball; +mod poisonbreath; use smash::{ lib::{ @@ -37,48 +42,15 @@ use utils::{ consts::*, }; use smashline::*; - -/*pub unsafe extern "C" fn guard_cont_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if ControlModule::get_stick_y(fighter.module_accessor) < 0.3 - && StatusModule::situation_kind(fighter.module_accessor) == SITUATION_KIND_GROUND { - if ((ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_S_R) - || ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_S_L)) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 0) - || (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_HI) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 1) - || (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_APPEAL_LW) - && VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) != 2) { - fighter.change_to_custom_status(statuses::packun::ADAPTIVE_ROOTS, false, false); - return true.into(); - } - } - return false.into(); -}*/ - -extern "C" fn packun_reset(fighter: &mut L2CFighterCommon) { - unsafe { - let fighter_kind = utility::get_kind(&mut *fighter.module_accessor); - if fighter_kind != *FIGHTER_KIND_PACKUN { - return; - } - //fighter.global_table[0x34].assign(&L2CValue::Ptr(guard_cont_pre as *const () as _)); - } -} - -extern "C" fn packun_init(fighter: &mut L2CFighterCommon) { - if fighter.global_table[globals::FIGHTER_KIND] != FIGHTER_KIND_PACKUN { - return; - } - - VarModule::set_int(fighter.battle_object, vars::packun::instance::CURRENT_STANCE, 0); -} +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); - smashline::Agent::new("packun") - .on_start(packun_reset) - .on_start(packun_init) - .install(); + let agent = &mut Agent::new("packun"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + spikeball::install(); + poisonbreath::install(); } \ No newline at end of file diff --git a/fighters/packun/src/opff.rs b/fighters/packun/src/opff.rs index 41b54a98cc..4ca2b437e4 100644 --- a/fighters/packun/src/opff.rs +++ b/fighters/packun/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn piranhacopter_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_HI @@ -310,78 +309,6 @@ pub unsafe fn packun_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn poisonbreath_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let owner_object = owner_module_accessor.object(); - let status_kind = StatusModule::status_kind(boma); - let motion_kind = MotionModule::motion_kind(boma); - if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let packun_pos_x = PostureModule::pos_x(owner_module_accessor); - let packun_pos_y = PostureModule::pos_y(owner_module_accessor); - let scale = PostureModule::scale(boma); - if ((pos_x - packun_pos_x).abs() < 12.0*scale) && - ((pos_y - packun_pos_y).abs() < 12.0*scale) && - pos_y != 0.0 { - if owner_module_accessor.is_status(*FIGHTER_STATUS_KIND_APPEAL){ - VarModule::on_flag(owner_object, vars::packun::status::CLOUD_COVER); - } - if VarModule::is_flag(owner_object, vars::packun::status::FLAME_ACTIVE) && - motion_kind != hash40("explode") { - //println!("Woo!"); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - } - if VarModule::is_flag(owner_object, vars::packun::status::BITE_START) && - motion_kind != hash40("explode") { - //println!("Woo!"); - VarModule::on_flag(owner_object, vars::packun::status::BURST); - WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - } - } - } -} - -pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { - VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("bomb"); - } - else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { - VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); - // println!("not bomb"); - } - let status_kind = StatusModule::status_kind(weapon.module_accessor); - let motion_kind = MotionModule::motion_kind(weapon.module_accessor); - if [*FIGHTER_KIND_PACKUN, *FIGHTER_KIND_KIRBY].contains(&owner_module_accessor.kind()) { - if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { - /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { - println!("will bomb"); - } */ - if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { - WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); - MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); - // println!("is bomb"); - } - } - } - } -} - -pub fn install() { - smashline::Agent::new("packun") - .on_line(Main, packun_frame_wrapper) - .install(); - smashline::Agent::new("packun_spikeball") - .on_line(Main, spikeball_frame) - .install(); - smashline::Agent::new("packun_poisonbreath") - .on_line(Main, poisonbreath_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, packun_frame_wrapper); } \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/acmd.rs b/fighters/packun/src/poisonbreath/acmd.rs new file mode 100644 index 0000000000..e42d7c9a67 --- /dev/null +++ b/fighters/packun/src/poisonbreath/acmd.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.8, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_startmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.2, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 14, false, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.5, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 4, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 2, 3); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_shootmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.1, 361, 0, 0, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.2, 361, 0, 0, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 7, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + AttackModule::set_no_hop_opponent_all(boma, true, false); + } +} + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + frame(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 90, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 55, 95, 0, 50, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.1, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } +} + +unsafe extern "C" fn effect_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_breath2"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_gas"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_max"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_max_smoke"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth"), false, false); + EffectModule::kill_kind(boma, Hash40::new("packun_poison_mouth2"), false, false); + EFFECT(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + } +} + +unsafe extern "C" fn sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); + agent.acmd("game_startmax", game_startmax); + + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_shootmax", game_shootmax); + + agent.acmd("game_explode", game_explode); + agent.acmd("effect_explode", effect_explode); + agent.acmd("sound_explode", sound_explode); +} \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/mod.rs b/fighters/packun/src/poisonbreath/mod.rs new file mode 100644 index 0000000000..6ab0343ac5 --- /dev/null +++ b/fighters/packun/src/poisonbreath/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("packun_poisonbreath"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/packun/src/poisonbreath/opff.rs b/fighters/packun/src/poisonbreath/opff.rs new file mode 100644 index 0000000000..45d5bf5151 --- /dev/null +++ b/fighters/packun/src/poisonbreath/opff.rs @@ -0,0 +1,43 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn poisonbreath_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let owner_object = owner_module_accessor.object(); + let status_kind = StatusModule::status_kind(boma); + let motion_kind = MotionModule::motion_kind(boma); + if owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let packun_pos_x = PostureModule::pos_x(owner_module_accessor); + let packun_pos_y = PostureModule::pos_y(owner_module_accessor); + let scale = PostureModule::scale(boma); + if ((pos_x - packun_pos_x).abs() < 12.0*scale) && + ((pos_y - packun_pos_y).abs() < 12.0*scale) && + pos_y != 0.0 { + if owner_module_accessor.is_status(*FIGHTER_STATUS_KIND_APPEAL){ + VarModule::on_flag(owner_object, vars::packun::status::CLOUD_COVER); + } + if VarModule::is_flag(owner_object, vars::packun::status::FLAME_ACTIVE) && + motion_kind != hash40("explode") { + //println!("Woo!"); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + } + if VarModule::is_flag(owner_object, vars::packun::status::BITE_START) && + motion_kind != hash40("explode") { + //println!("Woo!"); + VarModule::on_flag(owner_object, vars::packun::status::BURST); + WorkModule::set_int(boma, 1, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, poisonbreath_frame); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/acmd.rs b/fighters/packun/src/spikeball/acmd.rs new file mode 100644 index 0000000000..d56cac0137 --- /dev/null +++ b/fighters/packun/src/spikeball/acmd.rs @@ -0,0 +1,260 @@ +use super::*; + +unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + ModelModule::set_scale(boma, scale); + MotionModule::set_rate(boma, 1.4); + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn game_startair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + ModelModule::set_scale(boma, scale); + MotionModule::set_rate(boma, 1.4); + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn game_loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if WorkModule::is_flag(boma, *WEAPON_PACKUN_SPIKEBALL_INSTANCE_WORK_ID_FLAG_REACTIVE) { + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + } + else { + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 3.0, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 18.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + for _ in 0..999 { + if is_excute(agent) { + if boma.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP){ + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 3.0, false); + } + } + wait(lua_state, 3.0); + } + } +} + +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } +} + +unsafe extern "C" fn effect_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_wait(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + let scale = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_float(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SCALE)} else {1.0}; + if is_excute(agent) { + if stance == 1 { + ATTACK(agent, 0, 0, Hash40::new("trans"), 12.0, 55, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 121, 30, 2.5, false); + } + else { + let kbg = if stance == 0 { 0 } else { 5 }; + ATTACK(agent, 0, 0, Hash40::new("trans"), 14.0 * scale, 55, 70 - kbg, 0, 50, 5.0 * scale, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + } + } + /*frame(lua_state, 55.0); + if is_excute(agent) { + if stance == 1 { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 55, 80, 0, 50, 999.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 361, 45, 3.0, false); + } + }*/ +} + +unsafe extern "C" fn effect_wait(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = if (owner_module_accessor.kind() == *FIGHTER_KIND_PACKUN) || (owner_module_accessor.kind() == *FIGHTER_KIND_KIRBY) {VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE)} else {0}; + if stance == 1 { + if is_excute(agent) { + //EFFECT_BRANCH_SITUATION(agent, Hash40::new("null"), Hash40::new("sys_bound_smoke"), Hash40::new("top"), 0, -4, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("packun_poison_mouth"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.0, false); + } + } +} + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + AttackModule::clear_all(boma); + ModelModule::set_scale(boma, 0.1); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 45, 120, 0, 45, 14.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_curse_poison"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_OBJECT); + AttackModule::set_poison_param(boma, 0, 151, 30, 3.5, false); + } +} + +unsafe extern "C" fn effect_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 16.0, false); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.01, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.25); + } +} + +unsafe extern "C" fn sound_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let stance = VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_bomb_l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_start", game_start); + agent.acmd("game_startair", game_startair); + + agent.acmd("game_loop", game_loop); + agent.acmd("effect_loop", effect_loop); + + agent.acmd("game_shoot", game_shoot); + agent.acmd("effect_shoot", effect_shoot) + + agent.acmd("game_fall", game_fall); + agent.acmd("effect_fall", effect_fall); + + agent.acmd("game_wait", game_wait); + agent.acmd("effect_wait", effect_wait); + + agent.acmd("game_explode", game_explode); + agent.acmd("effect_explode", effect_explode); + agent.acmd("sound_explode", sound_explode); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/mod.rs b/fighters/packun/src/spikeball/mod.rs new file mode 100644 index 0000000000..dae2c3f27f --- /dev/null +++ b/fighters/packun/src/spikeball/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("packun_spikeball"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/packun/src/spikeball/opff.rs b/fighters/packun/src/spikeball/opff.rs new file mode 100644 index 0000000000..438c445355 --- /dev/null +++ b/fighters/packun/src/spikeball/opff.rs @@ -0,0 +1,37 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn spikeball_frame(weapon: &mut L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) == 1 { + VarModule::on_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("bomb"); + } + else if weapon.motion_frame() == 2.0 && VarModule::get_int(owner_module_accessor.object(), vars::packun::instance::CURRENT_STANCE) != 1 { + VarModule::off_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE); + // println!("not bomb"); + } + let status_kind = StatusModule::status_kind(weapon.module_accessor); + let motion_kind = MotionModule::motion_kind(weapon.module_accessor); + if [*FIGHTER_KIND_PACKUN, *FIGHTER_KIND_KIRBY].contains(&owner_module_accessor.kind()) { + if weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_WAIT) || weapon.is_status(*WEAPON_PACKUN_SPIKEBALL_STATUS_KIND_HOP) { + /* if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() == 2 { + println!("will bomb"); + } */ + if VarModule::is_flag(owner_module_accessor.object(), vars::packun::instance::PTOOIE_SHOULD_EXPLODE) && weapon.status_frame() >= 80 && motion_kind != hash40("explode") { + WorkModule::off_flag(boma, *WEAPON_PACKUN_SPIKEBALL_STATUS_HOP_WORK_FLAG_CLEARED_ATTACK); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("explode"), 0.0, 1.0, false, 0.0, false, false); + // println!("is bomb"); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, spikeball_frame); +} \ No newline at end of file diff --git a/fighters/packun/src/status.rs b/fighters/packun/src/status.rs index c179934e66..920098d296 100644 --- a/fighters/packun/src/status.rs +++ b/fighters/packun/src/status.rs @@ -5,8 +5,14 @@ mod special_hi; mod special_s; mod attack_s4; -pub fn install() { - special_s::install(); - special_hi::install(); - attack_s4::install(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::set_int(fighter.battle_object, vars::packun::instance::CURRENT_STANCE, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_s::install(agent); + special_hi::install(agent); + attack_s4::install(agent); } \ No newline at end of file diff --git a/fighters/packun/src/status/attack_s4.rs b/fighters/packun/src/status/attack_s4.rs index 29e1a5c784..8801aeaa13 100644 --- a/fighters/packun/src/status/attack_s4.rs +++ b/fighters/packun/src/status/attack_s4.rs @@ -45,10 +45,8 @@ unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CV fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold_main as *const () as _)) } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main); } \ No newline at end of file diff --git a/fighters/packun/src/status/special_hi.rs b/fighters/packun/src/status/special_hi.rs index 5beb2b9e24..a268ce2016 100644 --- a/fighters/packun/src/status/special_hi.rs +++ b/fighters/packun/src/status/special_hi.rs @@ -128,9 +128,7 @@ unsafe extern "C" fn special_hi_landing_main_loop(fighter: &mut L2CFighterCommon 0.into() } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) - .status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING, special_hi_landing_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_HI_LANDING, special_hi_landing_main); } \ No newline at end of file diff --git a/fighters/packun/src/status/special_s.rs b/fighters/packun/src/status/special_s.rs index e3a17d20ca..0e79cba7c7 100644 --- a/fighters/packun/src/status/special_s.rs +++ b/fighters/packun/src/status/special_s.rs @@ -1,7 +1,7 @@ use super::*; use globals::*; -unsafe extern "C" fn packun_special_s_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !(fighter.is_situation(*SITUATION_KIND_GROUND)) { CORRECT(fighter, *GROUND_CORRECT_KIND_AIR); let motion = if VarModule::get_int(fighter.object(), vars::packun::instance::CURRENT_STANCE) == 2 @@ -14,10 +14,10 @@ unsafe extern "C" fn packun_special_s_shoot_main(fighter: &mut L2CFighterCommon) {Hash40::new("special_s_shoot_s")} else {Hash40::new("special_s_shoot")}; MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(packun_special_s_shoot_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_shoot_main_loop as *const () as _)) } -unsafe extern "C" fn packun_special_s_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_shoot_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -164,8 +164,6 @@ unsafe fn special_s_shoot_helper(fighter: &mut L2CFighterCommon) { return; } -pub fn install() { - smashline::Agent::new("packun") - .status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT, packun_special_s_shoot_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT, special_s_shoot_main); } \ No newline at end of file From a91f89c3a78184b0c16b5bb36a631d3963aba24a Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 11:24:52 -0500 Subject: [PATCH 127/172] it's always something. --- fighters/packun/src/spikeball/acmd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/packun/src/spikeball/acmd.rs b/fighters/packun/src/spikeball/acmd.rs index d56cac0137..642a07fc95 100644 --- a/fighters/packun/src/spikeball/acmd.rs +++ b/fighters/packun/src/spikeball/acmd.rs @@ -246,7 +246,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_loop", effect_loop); agent.acmd("game_shoot", game_shoot); - agent.acmd("effect_shoot", effect_shoot) + agent.acmd("effect_shoot", effect_shoot); agent.acmd("game_fall", game_fall); agent.acmd("effect_fall", effect_fall); From ce50acf4a6507e7f9c4b7ef43b33ad3360376402 Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:53:27 -0400 Subject: [PATCH 128/172] bowser crate --- fighters/koopa/src/acmd/aerials.rs | 328 ++++++----- fighters/koopa/src/acmd/ground.rs | 190 ++++--- fighters/koopa/src/acmd/mod.rs | 16 +- fighters/koopa/src/acmd/other.rs | 231 +++----- fighters/koopa/src/acmd/smashes.rs | 254 +++++---- fighters/koopa/src/acmd/specials.rs | 720 ++++++++++++------------- fighters/koopa/src/acmd/throws.rs | 158 +++--- fighters/koopa/src/acmd/tilts.rs | 136 +++-- fighters/koopa/src/breath/acmd.rs | 63 +++ fighters/koopa/src/breath/mod.rs | 9 + fighters/koopa/src/lib.rs | 11 +- fighters/koopa/src/opff.rs | 6 +- fighters/koopa/src/status.rs | 14 +- fighters/koopa/src/status/special_n.rs | 14 +- fighters/koopa/src/status/special_s.rs | 24 +- 15 files changed, 1083 insertions(+), 1091 deletions(-) create mode 100644 fighters/koopa/src/breath/acmd.rs create mode 100644 fighters/koopa/src/breath/mod.rs diff --git a/fighters/koopa/src/acmd/aerials.rs b/fighters/koopa/src/acmd/aerials.rs index 72262a5a16..e8eca677bd 100644 --- a/fighters/koopa/src/acmd/aerials.rs +++ b/fighters/koopa/src/acmd/aerials.rs @@ -1,327 +1,325 @@ use super::*; -unsafe extern "C" fn koopa_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.5); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 61, 80, 0, 45, 6.0, 0.0, 7.6, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); for _ in 0..2 { - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 03, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 03, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 3, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_shell_b"), Hash40::new("koopa_shell_a"), Hash40::new("rot"), 0, 3, 0, 0, 0, 0, 1.45, true, *EF_FLIP_NONE); } wait(lua_state, 5.0); } - if is_excute(fighter) { - LAST_EFFECT_SET_RATE(fighter,1.2); + if is_excute(agent) { + LAST_EFFECT_SET_RATE(agent,1.2); } } -unsafe extern "C" fn koopa_attack_air_n_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - PLAY_STATUS(fighter, Hash40::new("se_koopa_attackair_l01")); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_koopa_attackair_l01")); } } -unsafe extern "C" fn koopa_attack_air_n_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 1.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 7); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 7); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 50.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn koopa_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - FT_MOTION_RATE_RANGE(fighter, 4.0, 11.0, 8.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 4.0, 11.0, 8.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE_RANGE(fighter, 11.0, 14.25, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("colonells"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 15.0, 361, 75, 0, 50, 6.5, 6.0, 0.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + FT_MOTION_RATE_RANGE(agent, 11.0, 14.25, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("colonells"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 12.0, 361, 85, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 15.0, 361, 75, 0, 50, 6.5, 6.0, 0.0, -0.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.25); - FT_MOTION_RATE_RANGE(fighter, 14.25, 16.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.25, 16.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), 0, 16, 4, -1, 16, -107, 1.9, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), 0, 16, 4, -1, 16, -107, 1.9, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn koopa_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 8.5, 0.0, 8.5, -14.0, Some(0.0), Some(8.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 8.5, 0.0, 8.5, -14.0, Some(0.0), Some(8.5), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 75, 0, 25, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 8.5, 0.0, 8.5, -11.0, Some(0.0), Some(8.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 8.5, 0.0, 8.5, -11.0, Some(0.0), Some(8.5), Some(-10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 361, 81, 0, 21, 3.5, 0.0, 2.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_b_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -unsafe extern "C" fn koopa_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 6.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 9.0); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); } frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 17.0, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("head"), 16.0, 80, 90, 0, 45, 7.5, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); + FT_MOTION_RATE_RANGE(agent, 8.0, 17.0, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 16.0, 80, 90, 0, 45, 7.5, 2.4, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_HEAD); } frame(lua_state, 17.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP_ALPHA(fighter, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1.5, 14.5, 2, -153, 90, -49, 1.5, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(fighter, 1); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1.5, 14.5, 2, -153, 90, -49, 1.5, true, *EF_FLIP_YZ, 0.7); + LAST_EFFECT_SET_RATE(agent, 1); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_arc_b"), true, true); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc_b"), true, true); } } -unsafe extern "C" fn koopa_attack_air_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -unsafe extern "C" fn koopa_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 16.0, 9.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 16.0, 9.0); frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 17.0); - FT_MOTION_RATE_RANGE(fighter, 17.0, 49.0, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 366, 100, 0, 30, 9.0, 0.0, 1.0, -1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + FT_MOTION_RATE_RANGE(agent, 17.0, 49.0, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 366, 100, 0, 30, 9.0, 0.0, 1.0, -1.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 49.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 55, 90, 0, 60, 9.75, 0.0, 1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 90, 0, 60, 9.75, 0.0, 1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 67.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn koopa_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -5, -5, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_atk_fall"), Hash40::new("top"), 0, 2.5, 0, 0, 0, 0, 0.65, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_atk_fall"), Hash40::new("top"), 0, 2.5, 0, 0, 0, 0, 0.65, true); } frame(lua_state, 52.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_atk_fall"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_atk_fall"), false, false); } } -unsafe extern "C" fn koopa_landing_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - } - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); +unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 20, 30, 0, 60, 7.0, 0.0, 5.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attackairn", koopa_attack_air_n_game) - .acmd("effect_attackairn", koopa_attack_air_n_effect) - .acmd("sound_attackairn", koopa_attack_air_n_sound) - .acmd("expression_attackairn", koopa_attack_air_n_expression) - .acmd("game_attackairf", koopa_attack_air_f_game) - .acmd("effect_attackairf", koopa_attack_air_f_effect) - .acmd("game_attackairb", koopa_attack_air_b_game) - .acmd("expression_attackairb", koopa_attack_air_b_expression) - .acmd("game_attackairhi", koopa_attack_air_hi_game) - .acmd("effect_attackairhi", koopa_attack_air_hi_effect) - .acmd("expression_attackairhi", koopa_attack_air_hi_expression) - .acmd("game_attackairlw", koopa_attack_air_lw_game) - .acmd("effect_attackairlw", koopa_attack_air_lw_effect) - .acmd("game_landingairlw", koopa_landing_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/koopa/src/acmd/ground.rs b/fighters/koopa/src/acmd/ground.rs index 44ea21704c..02b7e13c14 100644 --- a/fighters/koopa/src/acmd/ground.rs +++ b/fighters/koopa/src/acmd/ground.rs @@ -1,175 +1,173 @@ use super::*; -unsafe extern "C" fn koopa_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 3.5, 0.0, 11.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 4.0, 0.0, 8.6, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.0, 90, 18, 0, 25, 4.5, 0.0, 8.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 3.5, 0.0, 11.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 70, 18, 0, 25, 4.0, 0.0, 8.6, 15.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 90, 18, 0, 25, 4.5, 0.0, 8.0, 20.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } } -unsafe extern "C" fn koopa_attack_11_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 14, -2, 10, -20, 0, 1.4, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 14, -2, 10, -20, 0, 1.4, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); } frame(lua_state, 7.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 16, -6, 10, -20, 0, 1.8, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.7); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 5, 16, -6, 10, -20, 0, 1.8, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.7); } } -unsafe extern "C" fn koopa_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 5.0, 6.0, 0.0, -0.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 3.5, -5.0, 1.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 5.0, 6.0, 0.0, -0.5, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.0, 40, 100, 0, 50, 3.5, -5.0, 1.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn koopa_attack_12_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 21, -10, 25, 10, 0, 1.4, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 21, -10, 25, 10, 0, 1.4, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); } frame(lua_state, 9.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 23, -4, 25, 10, 0, 1.7, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(fighter, 1, 0.544, 0.54); - EFFECT_ALPHA(fighter, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 25, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.5); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -7, 23, -4, 25, 10, 0, 1.7, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 1, 0.544, 0.54); + EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 10, 25, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 0.5); } } -unsafe extern "C" fn koopa_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.7); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.7); frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(fighter, 6.0, 14.0, 4.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 14.0, 4.0); frame(lua_state, 14.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 12.0, 80, 70, 0, 80, 6.0, 3.5, -0.6, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 10.0, 80, 70, 0, 85, 5.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 80, 70, 0, 85, 4.5, 0.0, 4.0, 4.5, Some(0.0), Some(7.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 12.0, 80, 70, 0, 80, 6.0, 3.5, -0.6, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 10.0, 80, 70, 0, 85, 5.0, 0.0, 0.0, 0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 80, 70, 0, 85, 4.5, 0.0, 4.0, 4.5, Some(0.0), Some(7.0), Some(4.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopa_attack_dash_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.5); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 15.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), -2, 20, 5.5, 19, -8, -52, 1.6, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 1.5); - EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("koopa_scratch"), false); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), -2, 20, 5.5, 19, -8, -52, 1.6, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 1.5); + EffectModule::set_visible_kind(agent.module_accessor, Hash40::new("koopa_scratch"), false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4, 13, -30, 0, 0, 0, 2.5, true); - LAST_EFFECT_SET_RATE(fighter, 1.75); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4, 13, -30, 0, 0, 0, 2.5, true); + LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 16.0); - if is_excute(fighter) { - EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("koopa_scratch"), true); + if is_excute(agent) { + EffectModule::set_visible_kind(agent.module_accessor, Hash40::new("koopa_scratch"), true); } frame(lua_state, 17.0); - if is_excute(fighter) { - if PostureModule::lr(fighter.module_accessor) > 0.0 { - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,140,0.9, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + if PostureModule::lr(agent.module_accessor) > 0.0 { + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,140,0.9, 0, 0, 0, 0, 0, 0, false); } else{ - EFFECT(fighter, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,-140,0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,-140,0.9, 0, 0, 0, 0, 0, 0, false); } - LAST_EFFECT_SET_RATE(fighter,1.5); + LAST_EFFECT_SET_RATE(agent,1.5); } } -unsafe extern "C" fn koopa_attack_dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = app::sv_math::rand(hash40("fighter"), 3) == 0; if play_vc { - PLAY_SE(fighter, Hash40::new("vc_koopa_attack07")); + PLAY_SE(agent, Hash40::new("vc_koopa_attack07")); } } frame(lua_state, 16.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_smash_l02")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_smash_l02")); } } -unsafe extern "C" fn koopa_attack_dash_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 16.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attack11", koopa_attack_11_game) - .acmd("effect_attack11", koopa_attack_11_effect) - .acmd("game_attack12", koopa_attack_12_game) - .acmd("effect_attack12", koopa_attack_12_effect) - .acmd("game_attackdash", koopa_attack_dash_game) - .acmd("effect_attackdash", koopa_attack_dash_effect) - .acmd("sound_attackdash", koopa_attack_dash_sound) - .acmd("expression_attackdash", koopa_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/koopa/src/acmd/mod.rs b/fighters/koopa/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/koopa/src/acmd/mod.rs +++ b/fighters/koopa/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/koopa/src/acmd/other.rs b/fighters/koopa/src/acmd/other.rs index fcd6ca9b5b..463cffa1f9 100644 --- a/fighters/koopa/src/acmd/other.rs +++ b/fighters/koopa/src/acmd/other.rs @@ -1,265 +1,202 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} } } -unsafe extern "C" fn expression_landingheavy(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_landl"), 0, false, 0x50000000 /* default value */); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - if !fighter.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if !agent.is_prev_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } } -unsafe extern "C" fn koopa_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 14.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_koopa_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_koopa_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); } wait(lua_state, 4.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn koopa_breath_max_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - //let mut halflife=30.0; - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 16.0, 55, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(weapon.module_accessor); - //halflife = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE) as f32 /2.0; - } - frame(lua_state, 11.0); - if is_excute(weapon) { - ATTACK(weapon, 0, 0, Hash40::new("top"), 12.0, 55, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(weapon.module_accessor); - } -} - -unsafe extern "C" fn koopa_breath_max_effect(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - for _ in 0..100 { - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - EFFECT_FOLLOW(weapon, Hash40::new("koopa_breath_m_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); - } - wait(lua_state, 15.0); - if is_excute(weapon) { - EFFECT_FOLLOW(weapon, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); - } - wait(lua_state, 15.0); - } -} - -unsafe extern "C" fn koopa_breath_end_game(weapon: &mut L2CAgentBase) { - frame(weapon.lua_state_agent, 1.0); - if is_excute(weapon) { - notify_event_msc_cmd!(weapon, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn koopa_breath_end_effect(weapon: &mut L2CAgentBase) { - let lr = PostureModule::lr(weapon.module_accessor); - let pos = *PostureModule::pos(weapon.module_accessor); - EffectModule::req( - weapon.module_accessor, - Hash40::new("sys_damage_fire"), - &Vector3f{x: pos.x + 4.0*lr, y: pos.y, z:pos.z}, - &Vector3f::zero(), - 2.0, - 0, - -1, - false, - 0 - ); -} - -pub fn install() { - smashline::Agent::new("koopa") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("expression_landingheavy", expression_landingheavy) - .acmd("game_turndash", koopa_turn_dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("koopa_breath") - .acmd("game_max", koopa_breath_max_game) - .acmd("effect_max", koopa_breath_max_effect) - .acmd("game_end", koopa_breath_end_game) - .acmd("effect_end", koopa_breath_end_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/koopa/src/acmd/smashes.rs b/fighters/koopa/src/acmd/smashes.rs index 02c9cfeeba..db39d20ce7 100644 --- a/fighters/koopa/src/acmd/smashes.rs +++ b/fighters/koopa/src/acmd/smashes.rs @@ -1,241 +1,239 @@ use super::*; -unsafe extern "C" fn koopa_attack_s4_hold_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_explosion_sign"), Hash40::new("haver"), &Vector3f::zero(), &Vector3f::zero(), 0.75, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(fighter.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER, eff_handle as u64); + VarModule::set_int64(agent.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER, eff_handle as u64); } frame(lua_state, 2.0); for _ in 0..34 { - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, 20, 0, 8, 0, 0, 0, false); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -8, 0, 0, 0, 1, 20, 0, 8, 0, 0, 0, false); } wait(lua_state, 5.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 6, 3, 6, 0, 0, 0, true, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 6, 3, 6, 0, 0, 0, true, *EF_FLIP_YZ); } } } -unsafe extern "C" fn koopa_attack_s4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 1.0); - if is_excute(fighter) { - VarModule::off_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); } frame(lua_state, 19.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 22.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::koopa::status::PUNCH_CAN_ZOOM); - let excellent = VarModule::is_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::koopa::status::PUNCH_CAN_ZOOM); + let excellent = VarModule::is_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); let damage = if excellent { 2.5 } else { 0.0 }; let attr = if excellent { Hash40::new("collision_attr_magic") } else { Hash40::new("collision_attr_normal") }; let sound = if excellent { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; - ATTACK(fighter, 0, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 8.0, 0.0, 8.5, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 6.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 8.0, 0.0, 8.5, 20.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0 + damage, 361, 97, 0, 28, 6.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); } frame(lua_state, 26.0); - FT_MOTION_RATE_RANGE(fighter, 26.0, 40.0, 8.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - SlowModule::clear_whole(fighter.module_accessor); - CameraModule::reset_all(fighter.module_accessor); - CAM_ZOOM_OUT(fighter); + FT_MOTION_RATE_RANGE(agent, 26.0, 40.0, 8.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + SlowModule::clear_whole(agent.module_accessor); + CameraModule::reset_all(agent.module_accessor); + CAM_ZOOM_OUT(agent); } frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(fighter, 40.0, 85.0, 36.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 85.0, 36.0); frame(lua_state, 85.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_attack_s4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.module_accessor; +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.module_accessor; frame(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_FLIP(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 12, 15, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); + if is_excute(agent) { + EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 12, 15, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); } frame(lua_state, 7.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -8, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 13, -20, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); - let eff_handle = VarModule::get_int64(fighter.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 13, -20, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); + let eff_handle = VarModule::get_int64(agent.battle_object, vars::koopa::instance::CHARGE_EFFECT_HANDLER); EffectModule::set_scale(boma, eff_handle as u32, &Vector3f::zero()); - EFFECT_OFF_KIND(fighter,Hash40::new("sys_explosion_sign"), false, false); + EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"), false, false); } frame(lua_state, 21.0); - if is_excute(fighter) { - EFFECT_FOLLOW_FLIP(fighter, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 10, -26, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(fighter, 0.9); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_smash_line"), Hash40::new("koopa_smash_line"), Hash40::new("top"), 0, 10, -26, 0, 0, 0, 2.3, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.9); } frame(lua_state, 22.0); - if is_excute(fighter) { - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("handr"), 3, 0, 0, 0, 0, 0, 1.65, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(fighter, 0.75); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 10, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("handr"), 3, 0, 0, 0, 0, 0, 1.65, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); } frame(lua_state, 26.0); - if is_excute(fighter) { - SlowModule::clear_whole(fighter.module_accessor); - CameraModule::reset_all(fighter.module_accessor); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_attack_line"), true, true); + if is_excute(agent) { + SlowModule::clear_whole(agent.module_accessor); + CameraModule::reset_all(agent.module_accessor); + EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); } } -unsafe extern "C" fn koopa_attack_s4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 20.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_nailswing02")); - PLAY_SE(fighter, Hash40::new("vc_koopa_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_nailswing02")); + PLAY_SE(agent, Hash40::new("vc_koopa_attack06")); } frame(lua_state, 21.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_smash_h01")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_smash_h01")); } } -unsafe extern "C" fn koopa_attack_s4_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 4.0); app::sv_animcmd::execute(lua_state, 4.0); if !WorkModule::is_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK){ - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } frame(lua_state, 8.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 2); } frame(lua_state, 10.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 8); } frame(lua_state, 18.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3, true); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 22.0); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - let excellent = VarModule::is_flag(fighter.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + let excellent = VarModule::is_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); if excellent { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attack_finish"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attack_finish"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackll"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackll"), 0); } } frame(lua_state, 48.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn koopa_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 11.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 8.0); } frame(lua_state, 14.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); - HIT_NODE(fighter, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_INVINCIBLE); + HIT_NODE(agent, Hash40::new("hip"), *HIT_STATUS_INVINCIBLE); } frame(lua_state, 16.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 8.0, 0.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 8.0, 0.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("rot"), 22.0, 90, 90, 0, 23, 6.5, 0.0, -3.0, -6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } } -unsafe extern "C" fn koopa_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); } frame(lua_state, 5.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 6.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 9.0); } frame(lua_state, 12.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("handl"), 16.0, 40, 90, 0, 56, 6.0, 0.0, 0.0, 1.0, Some(5.3), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.5, 40, 90, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneel"), 14.5, 40, 90, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("handl"), 16.0, 40, 90, 0, 56, 6.0, 0.0, 0.0, 1.0, Some(5.3), Some(0.0), Some(1.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.5, 40, 90, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 14.5, 40, 90, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); - FT_MOTION_RATE_RANGE(fighter, 15.0, 27.0, 9.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 15.0, 27.0, 9.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 28.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handr"), 15.0, 40, 96, 0, 56, 6.0, 0.0, -0.6, 0.5, Some(4.5), Some(-0.6), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 13.5, 40, 96, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("kneer"), 13.5, 40, 96, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 15.0, 40, 96, 0, 56, 6.0, 0.0, -0.6, 0.5, Some(4.5), Some(-0.6), Some(0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 40, 96, 0, 56, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.5, 40, 96, 0, 56, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); } frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("effect_attacks4charge", koopa_attack_s4_hold_effect) - .acmd("game_attacks4", koopa_attack_s4_game) - .acmd("effect_attacks4", koopa_attack_s4_effect) - .acmd("sound_attacks4", koopa_attack_s4_sound) - .acmd("expression_attacks4", koopa_attack_s4_expression) - .acmd("game_attackhi4", koopa_attack_hi4_game) - .acmd("game_attacklw4", koopa_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopa/src/acmd/specials.rs b/fighters/koopa/src/acmd/specials.rs index df3c9872b1..f5cdf843a7 100644 --- a/fighters/koopa/src/acmd/specials.rs +++ b/fighters/koopa/src/acmd/specials.rs @@ -1,621 +1,619 @@ use super::*; -unsafe extern "C" fn koopa_special_n_start_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); +unsafe extern "C" fn effect_specialairnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } wait(lua_state, 1.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } wait(lua_state, 20.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } } -unsafe extern "C" fn koopa_special_n_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 31.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 31.0, 16.0); } -unsafe extern "C" fn koopa_special_n_max_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,MAX_COOLDOWN); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 42.0, 10.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 24.0, 42.0, 10.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); } frame(lua_state, 42.0); - FT_MOTION_RATE_RANGE(fighter, 42.0, 65.0, 21.0); + FT_MOTION_RATE_RANGE(agent, 42.0, 65.0, 21.0); frame(lua_state, 65.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_special_n_max_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 0, 0, 0, 0, 0, 0.75, true); - LAST_EFFECT_SET_RATE(fighter, 1.5); - if fighter.is_motion(Hash40::new("special_n_max")){ - LANDING_EFFECT(fighter, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 0, 0, 0, 0, 0, 0.75, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + if agent.is_motion(Hash40::new("special_n_max")){ + LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - FLASH(fighter, 0.961, 0.569, 0.569, 0.392); + FLASH(agent, 0.961, 0.569, 0.569, 0.392); } frame(lua_state, 2.0); - if is_excute(fighter) { - FLASH(fighter, 1, 0.537, 0.537, 0.588); - FLASH_FRM(fighter, 20, 0, 0, 0, 0); + if is_excute(agent) { + FLASH(agent, 1, 0.537, 0.537, 0.588); + FLASH_FRM(agent, 20, 0, 0, 0, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(fighter,2.0,0.5,0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); } frame(lua_state, 20.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_explosion_sign"), false, false); } frame(lua_state, 22.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_flame"), Hash40::new("jaw"), 3, 1, 0, 0, 0, 0, 1.0, true); - LAST_EFFECT_SET_RATE(fighter, 1.25); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("jaw"), 3, 1, 0, 0, 0, 0, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); } frame(lua_state, 24.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_breath_m_fire"), false, false); - EFFECT_FOLLOW(fighter, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); - FOOT_EFFECT(fighter, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(fighter, Hash40::new("koopa_wait_breath"), Hash40::new("head"), -1.5, 3, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(fighter, 0.8, 0.8, 0.8); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_breath_m_fire"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("koopa_wait_breath"), Hash40::new("head"), -1.5, 3, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.8, 0.8); } frame(lua_state, 42.0); - if is_excute(fighter) { - COL_NORMAL(fighter); + if is_excute(agent) { + COL_NORMAL(agent); } frame(lua_state, 50.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("koopa_wait_breath"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("koopa_wait_breath"), false, false); } } -unsafe extern "C" fn koopa_special_n_max_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_specialairnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_n01")); - PLAY_SE(fighter, Hash40::new("vc_koopa_furasleep")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); + PLAY_SE(agent, Hash40::new("vc_koopa_furasleep")); } frame(lua_state, 21.0); - if is_excute(fighter) { - if fighter.is_motion(Hash40::new("special_n_max")) { - PLAY_SE_REMAIN(fighter, Hash40::new("se_koopa_step_left_m")); + if is_excute(agent) { + if agent.is_motion(Hash40::new("special_n_max")) { + PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); } } frame(lua_state, 23.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_fire_m_damage")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); } frame(lua_state, 24.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("vc_koopa_attack06")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_koopa_attack06")); } } -unsafe extern "C" fn koopa_special_n_max_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 10.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + frame(agent.lua_state_agent, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 25.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(agent.lua_state_agent, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn koopa_special_s_squat_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 1, 2, 0, 0, 0, 0.8, false); +unsafe extern "C" fn effect_specialssquat(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 1, 2, 0, 0, 0, 0.8, false); } } -unsafe extern "C" fn koopa_special_s_throwlw_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 23, 16); + frame(agent.lua_state_agent, 18.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwlw_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowlw(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - EFFECT(fighter, Hash40::new("sys_attack_impact"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 2.2, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(fighter,0.8); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 2.2, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent,0.8); } } -unsafe extern "C" fn koopa_special_s_throwlw_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowlw(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_heavy_hit_m")); + wait(agent.lua_state_agent, 18.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_heavy_hit_m")); } } -unsafe extern "C" fn koopa_special_s_throwlw_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowlw(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } -unsafe extern "C" fn koopa_special_s_throwf_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 23, 16); + frame(agent.lua_state_agent, 18.0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + wait(agent.lua_state_agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwf_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn koopa_special_s_throwf_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowf(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + wait(agent.lua_state_agent, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn koopa_special_s_throwf_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowf(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -unsafe extern "C" fn koopa_special_s_throwb_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(fighter.lua_state_agent, 18.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 15); + frame(agent.lua_state_agent, 18.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); + CHECK_FINISH_CAMERA(agent, 20, 15); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - REVERSE_LR(fighter); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + REVERSE_LR(agent); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } -unsafe extern "C" fn koopa_special_s_throwb_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); +unsafe extern "C" fn effect_specialsthrowb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(fighter.lua_state_agent, 22.0); - if is_excute(fighter) { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + frame(agent.lua_state_agent, 22.0); + if is_excute(agent) { + if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } } -unsafe extern "C" fn koopa_special_s_throwb_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 4.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_01")); +unsafe extern "C" fn sound_specialsthrowb(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(fighter.lua_state_agent, 15.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_throw_02")); + wait(agent.lua_state_agent, 15.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } -unsafe extern "C" fn koopa_special_s_throwb_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_specialsthrowb(agent: &mut L2CAgentBase) { + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(fighter.lua_state_agent, 19.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); + frame(agent.lua_state_agent, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } -unsafe extern "C" fn koopa_special_s_jump_effect(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 7.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, -1.0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialsjump(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 7.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, -1.0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn koopa_special_s_jump_sound(fighter: &mut L2CAgentBase) { - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_s03")); +unsafe extern "C" fn sound_specialsjump(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_s03")); } - frame(fighter.lua_state_agent, 35.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_koopa_special_s04")); + frame(agent.lua_state_agent, 35.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_koopa_special_s04")); } } -unsafe extern "C" fn koopa_special_s_fall_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); +unsafe extern "C" fn effect_specialsfall(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); } } -unsafe extern "C" fn koopa_special_s_landing_game(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); +unsafe extern "C" fn game_specialslanding(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); } - frame(fighter.lua_state_agent, 1.0); - if is_excute(fighter) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { //CHECK_FINISH_CAMERA(fighter, 3, 9); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: -9.0, z: 0.0}); } - frame(fighter.lua_state_agent, 2.0); - if is_excute(fighter) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + frame(agent.lua_state_agent, 2.0); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } - frame(fighter.lua_state_agent, 10.0); - FT_MOTION_RATE_RANGE(fighter,10.0,14.0,8.0); - frame(fighter.lua_state_agent, 14.0); - FT_MOTION_RATE_RANGE(fighter,14.0,26.0,16.0); - frame(fighter.lua_state_agent, 26.0); - FT_MOTION_RATE(fighter,1.0) + frame(agent.lua_state_agent, 10.0); + FT_MOTION_RATE_RANGE(agent,10.0,14.0,8.0); + frame(agent.lua_state_agent, 14.0); + FT_MOTION_RATE_RANGE(agent,14.0,26.0,16.0); + frame(agent.lua_state_agent, 26.0); + FT_MOTION_RATE(agent,1.0) } -unsafe extern "C" fn koopa_special_s_landing_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); +unsafe extern "C" fn effect_specialslanding(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn koopa_special_s_landing_sound(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_koopa_special_s04")); - PLAY_STATUS(fighter, Hash40::new("se_koopa_special_s05")); +unsafe extern "C" fn sound_specialslanding(agent: &mut L2CAgentBase) { + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_koopa_special_s04")); + PLAY_STATUS(agent, Hash40::new("se_koopa_special_s05")); } - frame(fighter.lua_state_agent, 17.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); + frame(agent.lua_state_agent, 17.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); } - frame(fighter.lua_state_agent, 26.0); - if is_excute(fighter) { - PLAY_STEP_FLIPPABLE(fighter, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); + frame(agent.lua_state_agent, 26.0); + if is_excute(agent) { + PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); } } -unsafe extern "C" fn koopa_special_s_landing_expression(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - ItemModule::set_have_item_visibility(fighter.module_accessor, false, 0); - QUAKE(fighter, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); +unsafe extern "C" fn expression_specialslanding(agent: &mut L2CAgentBase) { + if is_excute(agent) { + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 3.0); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + frame(agent.lua_state_agent, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(fighter.lua_state_agent, 23.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + frame(agent.lua_state_agent, 23.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } -unsafe extern "C" fn koopa_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.5); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 65, 80, 0, 80, 8.0, 0.0, 7.6, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 65, 0, 90, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 60, 60, 0, 60, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 60, 50, 0, 40, 8.0, 0.0, 7.6, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } frame(lua_state, 40.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); KineticModule::set_consider_ground_friction(boma, true, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } } -unsafe extern "C" fn koopa_special_hi_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { //crate::sv_animcmd::FT_DISABLE_CURRY_FACE(fighter, true); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); ItemModule::set_attach_item_visibility(boma, false, *ATTACH_ITEM_GROUP_ALL as u8); - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 7); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 7); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 35.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); ItemModule::set_attach_item_visibility(boma, true, *ATTACH_ITEM_GROUP_ALL as u8); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_grapple"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 76.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } -unsafe extern "C" fn koopa_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 3.5, Some(0.0), Some(9.0), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 3.5, Some(0.0), Some(9.0), Some(-3.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); - ATTACK(fighter, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 367, 0, 0, 50, 7.0, 0.0, 9.0, 2.5, Some(0.0), Some(9.0), Some(-2.5), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } for _ in 0..10 { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.0, 367, 20, 0, 50, 4.3, 0.0, 9.5, 4.0, Some(0.0), Some(9.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 20, 0, 50, 4.3, 0.0, 9.5, 4.0, Some(0.0), Some(9.5), Some(-4.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); } - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 60, 180, 0, 50, 5.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-4.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 60, 180, 0, 50, 5.5, 0.0, 9.0, 4.0, Some(0.0), Some(9.0), Some(-4.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 51.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1); } } -unsafe extern "C" fn koopa_special_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.0, 80, 100, 60, 0, 4.0, 0.0, 1.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("top"), 4.0, 100, 100, 60, 0, 2.0, 0.0, 0.5, 22.5, Some(0.0), Some(9.5), Some(22.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 2, 0, Hash40::new("top"), 4.0, 90, 100, 60, 0, 4.0, 0.0, 2.5, 13.0, Some(0.0), Some(7.5), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 100, 60, 0, 4.0, 0.0, 1.0, 17.0, Some(0.0), Some(9.0), Some(17.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 100, 100, 60, 0, 2.0, 0.0, 0.5, 22.5, Some(0.0), Some(9.5), Some(22.5), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 90, 100, 60, 0, 4.0, 0.0, 2.5, 13.0, Some(0.0), Some(7.5), Some(13.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_add_reaction_frame(boma, 0, 8.0, false); AttackModule::set_add_reaction_frame(boma, 1, 8.0, false); AttackModule::set_add_reaction_frame(boma, 2, 8.0, false); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_LW_FLAG1); } frame(lua_state, 37.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } } -unsafe extern "C" fn koopa_special_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 31.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_LW_FLAG1); - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 33.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - } - -} - -pub fn install() { - smashline::Agent::new("koopa") - .acmd("effect_specialnstart", koopa_special_n_start_effect) - .acmd("effect_specialairnstart", koopa_special_n_start_effect) - .acmd("game_specialnend", koopa_special_n_end_game) - .acmd("game_specialairnend", koopa_special_n_end_game) - .acmd("game_specialnmax", koopa_special_n_max_game) - .acmd("game_specialairnmax", koopa_special_n_max_game) - .acmd("effect_specialnmax", koopa_special_n_max_effect) - .acmd("effect_specialairnmax", koopa_special_n_max_effect) - .acmd("sound_specialnmax", koopa_special_n_max_sound) - .acmd("sound_specialairnmax", koopa_special_n_max_sound) - .acmd("expression_specialnmax", koopa_special_n_max_expression) - .acmd("expression_specialairnmax", koopa_special_n_max_expression) - .acmd("effect_specialssquat", koopa_special_s_squat_effect) - .acmd("effect_specialairssquat", koopa_special_s_squat_effect) - .acmd("game_specialsthrowlw", koopa_special_s_throwlw_game) - .acmd("effect_specialsthrowlw", koopa_special_s_throwlw_effect) - .acmd("sound_specialsthrowlw", koopa_special_s_throwlw_sound) - .acmd("expression_specialsthrowlw", koopa_special_s_throwlw_expression) - .acmd("game_specialsthrowf", koopa_special_s_throwf_game) - .acmd("game_specialairsthrowf", koopa_special_s_throwf_game) - .acmd("effect_specialsthrowf", koopa_special_s_throwf_effect) - .acmd("effect_specialairsthrowf", koopa_special_s_throwf_effect) - .acmd("sound_specialsthrowf", koopa_special_s_throwf_sound) - .acmd("sound_specialairsthrowf", koopa_special_s_throwf_sound) - .acmd("expression_specialsthrowf", koopa_special_s_throwf_expression) - .acmd("expression_specialairsthrowf", koopa_special_s_throwf_expression) - .acmd("game_specialsthrowb", koopa_special_s_throwb_game) - .acmd("game_specialairsthrowb", koopa_special_s_throwb_game) - .acmd("effect_specialsthrowb", koopa_special_s_throwb_effect) - .acmd("effect_specialairsthrowb", koopa_special_s_throwb_effect) - .acmd("sound_specialsthrowb", koopa_special_s_throwb_sound) - .acmd("sound_specialairsthrowb", koopa_special_s_throwb_sound) - .acmd("expression_specialsthrowb", koopa_special_s_throwb_expression) - .acmd("expression_specialairsthrowb", koopa_special_s_throwb_expression) - .acmd("effect_specialsjump", koopa_special_s_jump_effect) - .acmd("sound_specialsjump", koopa_special_s_jump_sound) - .acmd("effect_specialsfall", koopa_special_s_fall_effect) - .acmd("game_specialslanding", koopa_special_s_landing_game) - .acmd("effect_specialslanding", koopa_special_s_landing_effect) - .acmd("sound_specialslanding", koopa_special_s_landing_sound) - .acmd("expression_specialslanding", koopa_special_s_landing_expression) - .acmd("game_specialhi", koopa_special_hi_game) - .acmd("expression_specialhi", koopa_special_hi_expression) - .acmd("game_specialairhi", koopa_special_air_hi_game) - .acmd("game_speciallw", koopa_special_lw_game) - .acmd("game_specialairlw", koopa_special_air_lw_game) - .install(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specialnstart", effect_specialairnstart); + agent.acmd("effect_specialairnstart", effect_specialairnstart); + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnmax", game_specialnmax); + agent.acmd("game_specialairnmax", game_specialnmax); + agent.acmd("effect_specialnmax", effect_specialnmax); + agent.acmd("effect_specialairnmax", effect_specialnmax); + agent.acmd("sound_specialnmax", sound_specialairnmax); + agent.acmd("sound_specialairnmax", sound_specialairnmax); + agent.acmd("expression_specialnmax", expression_specialnmax); + agent.acmd("expression_specialairnmax", expression_specialnmax); + agent.acmd("effect_specialssquat", effect_specialssquat); + agent.acmd("effect_specialairssquat", effect_specialssquat); + agent.acmd("game_specialsthrowlw", game_specialsthrowlw); + agent.acmd("effect_specialsthrowlw", effect_specialsthrowlw); + agent.acmd("sound_specialsthrowlw", sound_specialsthrowlw); + agent.acmd("expression_specialsthrowlw", expression_specialsthrowlw); + agent.acmd("game_specialsthrowf", game_specialsthrowf); + agent.acmd("game_specialairsthrowf", game_specialsthrowf); + agent.acmd("effect_specialsthrowf", effect_specialsthrowf); + agent.acmd("effect_specialairsthrowf", effect_specialsthrowf); + agent.acmd("sound_specialsthrowf", sound_specialsthrowf); + agent.acmd("sound_specialairsthrowf", sound_specialsthrowf); + agent.acmd("expression_specialsthrowf", expression_specialsthrowf); + agent.acmd("expression_specialairsthrowf", expression_specialsthrowf); + agent.acmd("game_specialsthrowb", game_specialsthrowb); + agent.acmd("game_specialairsthrowb", game_specialsthrowb); + agent.acmd("effect_specialsthrowb", effect_specialsthrowb); + agent.acmd("effect_specialairsthrowb", effect_specialsthrowb); + agent.acmd("sound_specialsthrowb", sound_specialsthrowb); + agent.acmd("sound_specialairsthrowb", sound_specialsthrowb); + agent.acmd("expression_specialsthrowb", expression_specialsthrowb); + agent.acmd("expression_specialairsthrowb", expression_specialsthrowb); + agent.acmd("effect_specialsjump", effect_specialsjump); + agent.acmd("sound_specialsjump", sound_specialsjump); + agent.acmd("effect_specialsfall", effect_specialsfall); + agent.acmd("game_specialslanding", game_specialslanding); + agent.acmd("effect_specialslanding", effect_specialslanding); + agent.acmd("sound_specialslanding", sound_specialslanding); + agent.acmd("expression_specialslanding", expression_specialslanding); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/koopa/src/acmd/throws.rs b/fighters/koopa/src/acmd/throws.rs index 4b14d0e7d7..c103b2aa60 100644 --- a/fighters/koopa/src/acmd/throws.rs +++ b/fighters/koopa/src/acmd/throws.rs @@ -1,165 +1,163 @@ use super::*; -unsafe extern "C" fn koopa_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.875); + FT_MOTION_RATE(agent, 0.875); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(16.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn koopa_catch_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 11.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 7.0, 2.0, Some(0.0), Some(7.0), Some(15.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn koopa_catch_turn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 6.2, 0.0, 8.0, -5.0, Some(0.0), Some(8.0), Some(-21.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 6.2, 0.0, 8.0, -5.0, Some(0.0), Some(8.0), Some(-21.9), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 3.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn koopa_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 77, 189, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 2.0, 77, 189, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 16.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("mouth2"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footr"), *HIT_STATUS_XLU); - HIT_NODE(fighter, Hash40::new("footl"), *HIT_STATUS_XLU); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("mouth2"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("footl"), *HIT_STATUS_XLU); } frame(lua_state, 21.0); for _ in 0..7 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.5, 0, 100, 0, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 100, 0, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } frame(lua_state, 49.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 40, 100, 80, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 40, 100, 80, 0, 9.6, 0.0, 20.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 50.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 52.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 57.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("handl"), 2.0, 0, 100, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handl"), 2.0, 0, 100, 0, 0, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); AttackModule::set_catch_only_all(boma, true, false); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 35, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("waist"), 10.0, 0, 100, 0, 0, 9.6, -0.5, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - ATTACK(fighter, 1, 0, Hash40::new("head"), 10.0, 0, 100, 0, 0, 9.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 10.0, 0, 100, 0, 0, 9.6, -0.5, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("head"), 10.0, 0, 100, 0, 0, 9.6, 0.0, 3.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 36.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 9, 0); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 9, 0); } frame(lua_state, 37.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 46.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_catch", koopa_catch_game) - .acmd("game_catchdash", koopa_catch_dash_game) - .acmd("game_catchturn", koopa_catch_turn_game) - .acmd("game_throwhi", koopa_throw_hi_game) - .acmd("game_throwlw", koopa_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopa/src/acmd/tilts.rs b/fighters/koopa/src/acmd/tilts.rs index 47763d117d..4e76da28c1 100644 --- a/fighters/koopa/src/acmd/tilts.rs +++ b/fighters/koopa/src/acmd/tilts.rs @@ -1,132 +1,130 @@ use super::*; -unsafe extern "C" fn koopa_attack_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 5.5, 5.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 78, 0, 46, 4.0, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 5.5, 5.1, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 14.0, 361, 78, 0, 46, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 14.0, 361, 78, 0, 46, 4.0, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopa_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 11.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(fighter, 0, 0, Hash40::new("bust"), 9.0, 100, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("shoulderr"), 9.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 3, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 6.5, 7.3, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("bust"), 9.0, 100, 80, 0, 85, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 9.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("armr"), 11.0, 100, 80, 0, 85, 6.5, 7.3, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_PUNCH); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(fighter, 14.0, 17.1, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.1, 4.0); + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } frame(lua_state, 17.1); - FT_MOTION_RATE_RANGE(fighter, 17.1, 19.0, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 17.1, 19.0, 1.0); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - FT_MOTION_RATE_RANGE(fighter, 19.0, 54.0, 16.0); + FT_MOTION_RATE_RANGE(agent, 19.0, 54.0, 16.0); frame(lua_state, 54.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn koopa_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 4); } frame(lua_state, 10.0); - if is_excute(fighter) { - damage!(fighter, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - HIT_NODE(fighter, Hash40::new("armr"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("colonellm"), 4.0, 361, 100, 50, 0, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("armr"), 4.0, 361, 100, 50, 0, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 4.0, 130, 100, 30, 0, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("colonellm"), 4.0, 361, 100, 50, 0, 4.0, 0.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 361, 100, 50, 0, 4.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 4.0, 130, 100, 30, 0, 5.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } frame(lua_state, 15.0); - if is_excute(fighter) { - HIT_NODE(fighter, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(fighter, 0, 0, Hash40::new("colonellm"), 6.0, 80, 80, 0, 65, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 6.0, 85, 80, 0, 65, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 6.0, 90, 80, 0, 65, 5.6, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("colonellm"), 6.0, 80, 80, 0, 65, 4.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 6.0, 85, 80, 0, 65, 5.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 6.0, 90, 80, 0, 65, 5.6, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } } -unsafe extern "C" fn koopa_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 6, true); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackl"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } } -pub fn install() { - smashline::Agent::new("koopa") - .acmd("game_attacks3", koopa_attack_s3_game) - .acmd("game_attacks3hi", koopa_attack_s3_game) - .acmd("game_attacks3lw", koopa_attack_s3_game) - .acmd("game_attackhi3", koopa_attack_hi3_game) - .acmd("game_attacklw3", koopa_attack_lw3_game) - .acmd("expression_attacklw3", koopa_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3hi); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3hi); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs new file mode 100644 index 0000000000..fe731580c7 --- /dev/null +++ b/fighters/koopa/src/breath/acmd.rs @@ -0,0 +1,63 @@ +use super::*; +unsafe extern "C" fn game_max(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //let mut halflife=30.0; + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 55, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(agent.module_accessor); + //halflife = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE) as f32 /2.0; + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); + AttackModule::enable_safe_pos(agent.module_accessor); + } +} + +unsafe extern "C" fn effect_max(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..100 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + EFFECT_FOLLOW(agent, Hash40::new("koopa_breath_m_fire"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, true); + } + wait(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, true); + } + wait(lua_state, 15.0); + } +} + +unsafe extern "C" fn game_end(agent: &mut L2CAgentBase) { + frame(agent.lua_state_agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_end(agent: &mut L2CAgentBase) { + let lr = PostureModule::lr(agent.module_accessor); + let pos = *PostureModule::pos(agent.module_accessor); + EffectModule::req( + agent.module_accessor, + Hash40::new("sys_damage_fire"), + &Vector3f{x: pos.x + 4.0*lr, y: pos.y, z:pos.z}, + &Vector3f::zero(), + 2.0, + 0, + -1, + false, + 0 + ); +} + + +pub fn install(agent: &mut Agent) { +agent.acmd("game_max", game_max); +agent.acmd("effect_max", effect_max); +agent.acmd("game_end", game_end); +agent.acmd("effect_end", effect_end); +} diff --git a/fighters/koopa/src/breath/mod.rs b/fighters/koopa/src/breath/mod.rs new file mode 100644 index 0000000000..b45fe0a848 --- /dev/null +++ b/fighters/koopa/src/breath/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("koopa_breath"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopa/src/lib.rs b/fighters/koopa/src/lib.rs index e9c1171598..3e7161908c 100644 --- a/fighters/koopa/src/lib.rs +++ b/fighters/koopa/src/lib.rs @@ -7,6 +7,7 @@ pub mod acmd; pub mod status; pub mod opff; +mod breath; use smash::{ lib::{ L2CValue, @@ -41,7 +42,11 @@ use smashline::*; pub const MAX_COOLDOWN : i32 = 900; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("koopa"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + breath::install(); } \ No newline at end of file diff --git a/fighters/koopa/src/opff.rs b/fighters/koopa/src/opff.rs index d83b95b8d3..2157bfa29f 100644 --- a/fighters/koopa/src/opff.rs +++ b/fighters/koopa/src/opff.rs @@ -180,8 +180,6 @@ pub unsafe fn koopa_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("koopa") - .on_line(Main, koopa_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopa_frame_wrapper); } diff --git a/fighters/koopa/src/status.rs b/fighters/koopa/src/status.rs index 197edae913..016c3a58a9 100644 --- a/fighters/koopa/src/status.rs +++ b/fighters/koopa/src/status.rs @@ -51,13 +51,11 @@ pub unsafe extern "C" fn exec_special_hi_a(fighter: &mut L2CFighterCommon) -> L2 return 0.into() } -pub fn install() { - smashline::Agent::new("koopa") - .on_start(koopa_init) - .status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_charge_exit) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, exec_special_hi_a) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(koopa_init); + agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_charge_exit); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, exec_special_hi_a); - special_n::install(); - special_s::install(); + special_n::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/koopa/src/status/special_n.rs b/fighters/koopa/src/status/special_n.rs index 04081d467a..cdb068f060 100644 --- a/fighters/koopa/src/status/special_n.rs +++ b/fighters/koopa/src/status/special_n.rs @@ -187,13 +187,9 @@ unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> 0.into() } -pub fn install() { - smashline::Agent::new("koopa") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec) - .status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_execstop) - .install(); - smashline::Agent::new("koopa_breath") - .status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); + agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_execstop); + agent.status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main); } \ No newline at end of file diff --git a/fighters/koopa/src/status/special_s.rs b/fighters/koopa/src/status/special_s.rs index 62b591abf2..1b5b5ddd46 100644 --- a/fighters/koopa/src/status/special_s.rs +++ b/fighters/koopa/src/status/special_s.rs @@ -472,17 +472,15 @@ unsafe extern "C" fn specials_landing_exec(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub fn install() { - smashline::Agent::new("koopa") - .status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_main) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exec) - .status(Exit, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exit) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_init) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_exec) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_FALL, specials_fall_init) - .status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_init) - .status(Pre, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_pre) - .status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_main) - .status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_main); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exec); + agent.status(Exit, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_SQUAT, specials_squat_exit); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_init); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_JUMP, specials_jump_exec); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_FALL, specials_fall_init); + agent.status(Init, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_init); + agent.status(Pre, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_pre); + agent.status(Main, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_main); + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S_LANDING, specials_landing_exec); } \ No newline at end of file From 65aac6c4c45b857389cab6a63d6de6990f807d75 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 12:16:10 -0500 Subject: [PATCH 129/172] rosalina --- fighters/rosetta/src/acmd/aerials.rs | 98 +++++------------------ fighters/rosetta/src/acmd/ground.rs | 10 +-- fighters/rosetta/src/acmd/mod.rs | 16 ++-- fighters/rosetta/src/acmd/other.rs | 39 +++++---- fighters/rosetta/src/acmd/smashes.rs | 36 ++++----- fighters/rosetta/src/acmd/specials.rs | 10 +-- fighters/rosetta/src/acmd/throws.rs | 18 ++--- fighters/rosetta/src/acmd/tilts.rs | 20 ++--- fighters/rosetta/src/lib.rs | 17 +++- fighters/rosetta/src/opff.rs | 65 +-------------- fighters/rosetta/src/status.rs | 19 ++--- fighters/rosetta/src/status/special_hi.rs | 16 +--- fighters/rosetta/src/tico/acmd.rs | 59 ++++++++++++++ fighters/rosetta/src/tico/mod.rs | 11 +++ fighters/rosetta/src/tico/opff.rs | 65 +++++++++++++++ 15 files changed, 239 insertions(+), 260 deletions(-) create mode 100644 fighters/rosetta/src/tico/acmd.rs create mode 100644 fighters/rosetta/src/tico/mod.rs create mode 100644 fighters/rosetta/src/tico/opff.rs diff --git a/fighters/rosetta/src/acmd/aerials.rs b/fighters/rosetta/src/acmd/aerials.rs index c3e8e094f9..5e7d72e1d7 100644 --- a/fighters/rosetta/src/acmd/aerials.rs +++ b/fighters/rosetta/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -17,7 +16,7 @@ unsafe extern "C" fn rosetta_attack_air_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rosetta_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -64,10 +63,9 @@ unsafe extern "C" fn rosetta_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn rosetta_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -94,48 +92,9 @@ unsafe extern "C" fn rosetta_attack_air_b_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn rosetta_tico_attack_air_b_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 15.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn rosetta_tico_attack_air_b_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); - } } -unsafe extern "C" fn rosetta_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -178,10 +137,9 @@ unsafe extern "C" fn rosetta_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rosetta_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -204,10 +162,9 @@ unsafe extern "C" fn rosetta_attack_air_hi_effect(agent: &mut L2CAgentBase) { EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } } - } -unsafe extern "C" fn rosetta_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -248,10 +205,9 @@ unsafe extern "C" fn rosetta_attack_air_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn rosetta_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -282,37 +238,19 @@ unsafe extern "C" fn rosetta_attack_air_lw_effect(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("rosetta_ring_erase"), Hash40::new("throw"), 0, 0, 0, 0, 0, 30, 1, false); EFFECT_DETACH_KIND(agent, Hash40::new("rosetta_ring_erase"), -1); } - } - } -unsafe extern "C" fn rosetta_tico_attack_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); -pub fn install() { - smashline::Agent::new("rosetta_tico") - .acmd("game_attackairb", rosetta_tico_attack_air_b_game) - .acmd("effect_attackairb", rosetta_tico_attack_air_b_effect) - .acmd("game_attackairlw", rosetta_tico_attack_air_lw_game) - .install(); - smashline::Agent::new("rosetta") - .acmd("expression_attackairn", rosetta_attack_air_n_expression) - .acmd("game_attackairf", rosetta_attack_air_f_game) - .acmd("game_attackairb", rosetta_attack_air_b_game) - .acmd("game_attackairhi", rosetta_attack_air_hi_game) - .acmd("effect_attackairhi", rosetta_attack_air_hi_effect) - .acmd("game_attackairlw", rosetta_attack_air_lw_game) - .acmd("effect_attackairlw", rosetta_attack_air_lw_effect) - .install(); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/rosetta/src/acmd/ground.rs b/fighters/rosetta/src/acmd/ground.rs index c3f3a36be5..466207e529 100644 --- a/fighters/rosetta/src/acmd/ground.rs +++ b/fighters/rosetta/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -30,11 +29,8 @@ unsafe extern "C" fn rosetta_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attackdash", rosetta_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/rosetta/src/acmd/mod.rs b/fighters/rosetta/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/rosetta/src/acmd/mod.rs +++ b/fighters/rosetta/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/rosetta/src/acmd/other.rs b/fighters/rosetta/src/acmd/other.rs index d23efd8004..ce127af451 100644 --- a/fighters/rosetta/src/acmd/other.rs +++ b/fighters/rosetta/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn rosetta_turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -64,14 +64,12 @@ unsafe extern "C" fn rosetta_turn_dash_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -82,10 +80,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -96,16 +93,16 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", rosetta_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/rosetta/src/acmd/smashes.rs b/fighters/rosetta/src/acmd/smashes.rs index 8738546521..1355858910 100644 --- a/fighters/rosetta/src/acmd/smashes.rs +++ b/fighters/rosetta/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_s4_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -10,16 +9,15 @@ unsafe extern "C" fn rosetta_attack_s4_hi_game(agent: &mut L2CAgentBase) { } frame(lua_state, 16.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -28,16 +26,15 @@ unsafe extern "C" fn rosetta_attack_s4_s_game(agent: &mut L2CAgentBase) { } frame(lua_state, 16.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 11.0, 7.0, Some(0.0), Some(11.0), Some(15.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 110, 0, 30, 6.5, 0.0, 14.0, 7.0, Some(0.0), Some(20.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); } wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_s4_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -52,10 +49,9 @@ unsafe extern "C" fn rosetta_attack_s4_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -76,10 +72,9 @@ unsafe extern "C" fn rosetta_attack_hi4_game(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn rosetta_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -104,15 +99,14 @@ unsafe extern "C" fn rosetta_attack_lw4_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attacks4hi", rosetta_attack_s4_hi_game) - .acmd("game_attacks4", rosetta_attack_s4_s_game) - .acmd("game_attacks4lw", rosetta_attack_s4_lw_game) - .acmd("game_attackhi4", rosetta_attack_hi4_game) - .acmd("game_attacklw4", rosetta_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/rosetta/src/acmd/specials.rs b/fighters/rosetta/src/acmd/specials.rs index 261c1a4aa4..e1edf2807d 100644 --- a/fighters/rosetta/src/acmd/specials.rs +++ b/fighters/rosetta/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_special_lw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if !VarModule::is_flag(agent.battle_object, vars::rosetta::instance::IS_TICO_UNAVAILABLE) && VarModule::get_int(agent.battle_object, vars::rosetta::instance::COOLDOWN) == 0 { @@ -48,11 +47,8 @@ unsafe extern "C" fn rosetta_special_lw_expression(agent: &mut L2CAgentBase) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("expression_speciallw", rosetta_special_lw_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("expression_speciallw", expression_speciallw); } diff --git a/fighters/rosetta/src/acmd/throws.rs b/fighters/rosetta/src/acmd/throws.rs index 5af643b7d0..d3dd90c803 100644 --- a/fighters/rosetta/src/acmd/throws.rs +++ b/fighters/rosetta/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -23,10 +22,9 @@ unsafe extern "C" fn rosetta_catch_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.05); frame(lua_state, 40.0); FT_MOTION_RATE(agent, 1.0); - } -unsafe extern "C" fn rosetta_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -54,7 +52,7 @@ unsafe extern "C" fn rosetta_catch_dash_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn rosetta_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -82,10 +80,8 @@ unsafe extern "C" fn rosetta_catch_turn_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_catch", rosetta_catch_game) - .acmd("game_catchdash", rosetta_catch_dash_game) - .acmd("game_catchturn", rosetta_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/rosetta/src/acmd/tilts.rs b/fighters/rosetta/src/acmd/tilts.rs index 75e0ea457f..dadc4521bc 100644 --- a/fighters/rosetta/src/acmd/tilts.rs +++ b/fighters/rosetta/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn rosetta_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -14,10 +13,9 @@ unsafe extern "C" fn rosetta_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn rosetta_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -41,10 +39,9 @@ unsafe extern "C" fn rosetta_attack_hi3_game(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); ArticleModule::remove(boma, *FIGHTER_ROSETTA_GENERATE_ARTICLE_RING, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn rosetta_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -59,13 +56,10 @@ unsafe extern "C" fn rosetta_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("rosetta") - .acmd("game_attacks3", rosetta_attack_s3_s_game) - .acmd("game_attackhi3", rosetta_attack_hi3_game) - .acmd("game_attacklw3", rosetta_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/rosetta/src/lib.rs b/fighters/rosetta/src/lib.rs index 7bb0378152..8e9412018f 100644 --- a/fighters/rosetta/src/lib.rs +++ b/fighters/rosetta/src/lib.rs @@ -4,8 +4,12 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod tico; use smash::{ lib::{ @@ -37,9 +41,14 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("rosetta"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + tico::install(); } diff --git a/fighters/rosetta/src/opff.rs b/fighters/rosetta/src/opff.rs index 36da2400b4..20c5653b04 100644 --- a/fighters/rosetta/src/opff.rs +++ b/fighters/rosetta/src/opff.rs @@ -157,68 +157,7 @@ pub unsafe fn rosetta_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -unsafe extern "C" fn tico_frame(weapon: &mut L2CFighterBase) { - unsafe { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let rosetta = utils::util::get_battle_object_from_id(owner_id); - let rosetta_boma = &mut *(*rosetta).module_accessor; - if StatusModule::is_changing(weapon.module_accessor) || weapon.is_status(*WEAPON_ROSETTA_TICO_STATUS_KIND_REBIRTH) { - VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - if weapon.is_status_one_of(&[ - *WEAPON_ROSETTA_TICO_STATUS_KIND_DEAD, - *WEAPON_ROSETTA_TICO_STATUS_KIND_STANDBY, - *WEAPON_ROSETTA_TICO_STATUS_KIND_NONE, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_AIR, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FALL, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_U]) { - VarModule::on_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - else if rosetta_boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) { - if rosetta_boma.motion_frame() == 1.0 { - VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); - } - if rosetta_boma.motion_frame() == 25.0 { - VarModule::set_int(rosetta, vars::rosetta::instance::TICO_X, PostureModule::pos_x(weapon.module_accessor) as i32); - VarModule::set_int(rosetta, vars::rosetta::instance::TICO_Y, PostureModule::pos_y(weapon.module_accessor) as i32); - } - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) > 0 { - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 1 { // set startup effects - EFFECT(weapon, Hash40::new("rosetta_escape"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 2 { // prepare for teleport - HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_XLU), 0); - VisibilityModule::set_whole(weapon.module_accessor, false); - JostleModule::set_status(weapon.module_accessor, false); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 3 { // perform swap - EFFECT(weapon, Hash40::new("rosetta_escape_end"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - let new_x = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_X) as f32; - let new_y = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_Y) as f32; - let pos = Vector3f { x: new_x, y: new_y, z: 0.0 }; - PostureModule::set_pos(weapon.module_accessor, &pos); - PostureModule::init_pos(weapon.module_accessor, &pos, true, true); - } - if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 4 { // revert to normal state - JostleModule::set_status(weapon.module_accessor, true); - VisibilityModule::set_whole(weapon.module_accessor, true); - VarModule::set_int(rosetta, vars::rosetta::instance::COOLDOWN, 300); //300 Frame (5 second) cooldown - VarModule::set_int(rosetta, vars::rosetta::status::LUMA_STATE, 0); - HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_NORMAL), 0); - } - } - } -} -pub fn install() { - smashline::Agent::new("rosetta") - .on_line(Main, rosetta_frame_wrapper) - .install(); - smashline::Agent::new("rosetta_tico") - .on_line(Main, tico_frame) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, rosetta_frame_wrapper); } diff --git a/fighters/rosetta/src/status.rs b/fighters/rosetta/src/status.rs index c8d3c95737..b1cf1bc23f 100644 --- a/fighters/rosetta/src/status.rs +++ b/fighters/rosetta/src/status.rs @@ -11,18 +11,13 @@ unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterComm } } -extern "C" fn rosetta_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ROSETTA { - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("rosetta") - .on_start(rosetta_init) - .install(); - special_hi::install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi::install(agent); } diff --git a/fighters/rosetta/src/status/special_hi.rs b/fighters/rosetta/src/status/special_hi.rs index 5d499bcd69..f155cf219a 100644 --- a/fighters/rosetta/src/status/special_hi.rs +++ b/fighters/rosetta/src/status/special_hi.rs @@ -66,17 +66,7 @@ pub unsafe extern "C" fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> ret } -pub fn install() { - smashline::Agent::new("rosetta") - .status( - Pre, - *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, - special_hi_end_pre, - ) - .status( - Main, - *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, - special_hi_end_main, - ) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Main, *FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END, special_hi_end_main); } diff --git a/fighters/rosetta/src/tico/acmd.rs b/fighters/rosetta/src/tico/acmd.rs new file mode 100644 index 0000000000..4ee36f17b3 --- /dev/null +++ b/fighters/rosetta/src/tico/acmd.rs @@ -0,0 +1,59 @@ +use super::*; + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legr"), 4.0, 40, 150, 0, 30, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("rot"), -0.5, 0, 1, -5, 180, 0, 0.9, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("rot"), 0, 0, -5, -5, 180, 0, 1, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_impact"), Hash40::new("trans"), 0, 2, -23, 0, 0, 0, 1, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_ROSETTA_TICO_INSTANCE_WORK_ID_FLAG_TOGGLE_TWINKLE_EFFECT); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 5.0, 45, 110, 0, 80, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairlw", game_attackairlw); +} diff --git a/fighters/rosetta/src/tico/mod.rs b/fighters/rosetta/src/tico/mod.rs new file mode 100644 index 0000000000..7fe7f58a98 --- /dev/null +++ b/fighters/rosetta/src/tico/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("rosetta_tico"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/rosetta/src/tico/opff.rs b/fighters/rosetta/src/tico/opff.rs new file mode 100644 index 0000000000..cb1a81766c --- /dev/null +++ b/fighters/rosetta/src/tico/opff.rs @@ -0,0 +1,65 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +unsafe extern "C" fn tico_frame(weapon: &mut L2CFighterBase) { + unsafe { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let rosetta = utils::util::get_battle_object_from_id(owner_id); + let rosetta_boma = &mut *(*rosetta).module_accessor; + if StatusModule::is_changing(weapon.module_accessor) || weapon.is_status(*WEAPON_ROSETTA_TICO_STATUS_KIND_REBIRTH) { + VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + if weapon.is_status_one_of(&[ + *WEAPON_ROSETTA_TICO_STATUS_KIND_DEAD, + *WEAPON_ROSETTA_TICO_STATUS_KIND_STANDBY, + *WEAPON_ROSETTA_TICO_STATUS_KIND_NONE, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_AIR, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FALL, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *WEAPON_ROSETTA_TICO_STATUS_KIND_DAMAGE_FLY_REFLECT_U]) { + VarModule::on_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + else if rosetta_boma.is_status(*FIGHTER_STATUS_KIND_SPECIAL_LW) { + if rosetta_boma.motion_frame() == 1.0 { + VarModule::off_flag(rosetta, vars::rosetta::instance::IS_TICO_UNAVAILABLE); + } + if rosetta_boma.motion_frame() == 25.0 { + VarModule::set_int(rosetta, vars::rosetta::instance::TICO_X, PostureModule::pos_x(weapon.module_accessor) as i32); + VarModule::set_int(rosetta, vars::rosetta::instance::TICO_Y, PostureModule::pos_y(weapon.module_accessor) as i32); + } + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) > 0 { + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 1 { // set startup effects + EFFECT(weapon, Hash40::new("rosetta_escape"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 2 { // prepare for teleport + HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_XLU), 0); + VisibilityModule::set_whole(weapon.module_accessor, false); + JostleModule::set_status(weapon.module_accessor, false); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 3 { // perform swap + EFFECT(weapon, Hash40::new("rosetta_escape_end"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + let new_x = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_X) as f32; + let new_y = VarModule::get_int(rosetta, vars::rosetta::instance::ROSA_Y) as f32; + let pos = Vector3f { x: new_x, y: new_y, z: 0.0 }; + PostureModule::set_pos(weapon.module_accessor, &pos); + PostureModule::init_pos(weapon.module_accessor, &pos, true, true); + } + if VarModule::get_int(rosetta, vars::rosetta::status::LUMA_STATE) == 4 { // revert to normal state + JostleModule::set_status(weapon.module_accessor, true); + VisibilityModule::set_whole(weapon.module_accessor, true); + VarModule::set_int(rosetta, vars::rosetta::instance::COOLDOWN, 300); //300 Frame (5 second) cooldown + VarModule::set_int(rosetta, vars::rosetta::status::LUMA_STATE, 0); + HitModule::set_whole(weapon.module_accessor, smash::app::HitStatus(*HIT_STATUS_NORMAL), 0); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tico_frame); +} From 3309e696058af89c480b4bfeaa036e39bbc4773d Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 12:49:50 -0500 Subject: [PATCH 130/172] bowser cleanup --- fighters/koopa/src/acmd/aerials.rs | 4 + fighters/koopa/src/acmd/ground.rs | 5 +- fighters/koopa/src/acmd/other.rs | 91 ++------------------- fighters/koopa/src/acmd/smashes.rs | 4 +- fighters/koopa/src/acmd/specials.rs | 14 ++-- fighters/koopa/src/acmd/throws.rs | 3 +- fighters/koopa/src/acmd/tilts.rs | 11 +-- fighters/koopa/src/breath/acmd.rs | 10 ++- fighters/koopa/src/lib.rs | 8 +- fighters/koopa/src/status.rs | 43 ++-------- fighters/koopa/src/status/attack_s4_hold.rs | 13 +++ fighters/koopa/src/status/special_hi.rs | 30 +++++++ 12 files changed, 94 insertions(+), 142 deletions(-) create mode 100644 fighters/koopa/src/status/attack_s4_hold.rs create mode 100644 fighters/koopa/src/status/special_hi.rs diff --git a/fighters/koopa/src/acmd/aerials.rs b/fighters/koopa/src/acmd/aerials.rs index e8eca677bd..7301aa89d3 100644 --- a/fighters/koopa/src/acmd/aerials.rs +++ b/fighters/koopa/src/acmd/aerials.rs @@ -312,13 +312,17 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("game_landingairlw", game_landingairlw); diff --git a/fighters/koopa/src/acmd/ground.rs b/fighters/koopa/src/acmd/ground.rs index 02b7e13c14..27ca551133 100644 --- a/fighters/koopa/src/acmd/ground.rs +++ b/fighters/koopa/src/acmd/ground.rs @@ -20,7 +20,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { @@ -55,7 +54,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { @@ -93,7 +91,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -145,7 +142,6 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_koopa_smash_l02")); } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { @@ -166,6 +162,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attack11", effect_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); agent.acmd("sound_attackdash", sound_attackdash); diff --git a/fighters/koopa/src/acmd/other.rs b/fighters/koopa/src/acmd/other.rs index 463cffa1f9..9130a24578 100644 --- a/fighters/koopa/src/acmd/other.rs +++ b/fighters/koopa/src/acmd/other.rs @@ -1,56 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -90,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02"));} - } -} - unsafe extern "C" fn expression_landingheavy(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -138,7 +63,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -163,7 +87,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -177,7 +100,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -189,14 +111,17 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_turndash", game_turndash); agent.acmd("sound_dash", sound_dash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/koopa/src/acmd/smashes.rs b/fighters/koopa/src/acmd/smashes.rs index db39d20ce7..abed1ee7d6 100644 --- a/fighters/koopa/src/acmd/smashes.rs +++ b/fighters/koopa/src/acmd/smashes.rs @@ -182,7 +182,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -225,7 +224,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { @@ -234,6 +232,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopa/src/acmd/specials.rs b/fighters/koopa/src/acmd/specials.rs index f5cdf843a7..d032641157 100644 --- a/fighters/koopa/src/acmd/specials.rs +++ b/fighters/koopa/src/acmd/specials.rs @@ -90,7 +90,6 @@ unsafe extern "C" fn effect_specialnmax(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("koopa_wait_breath"), false, false); } - } unsafe extern "C" fn sound_specialairnmax(agent: &mut L2CAgentBase) { @@ -438,7 +437,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); } - } unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { @@ -527,7 +525,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG4); WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1); } - } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { @@ -551,7 +548,6 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } - } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { @@ -566,7 +562,6 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 76, 89, 0, 45, 8.3, 0.0, 5.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } - } pub fn install(agent: &mut Agent) { @@ -582,12 +577,15 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairnmax", sound_specialairnmax); agent.acmd("expression_specialnmax", expression_specialnmax); agent.acmd("expression_specialairnmax", expression_specialnmax); + agent.acmd("effect_specialssquat", effect_specialssquat); agent.acmd("effect_specialairssquat", effect_specialssquat); + agent.acmd("game_specialsthrowlw", game_specialsthrowlw); agent.acmd("effect_specialsthrowlw", effect_specialsthrowlw); agent.acmd("sound_specialsthrowlw", sound_specialsthrowlw); agent.acmd("expression_specialsthrowlw", expression_specialsthrowlw); + agent.acmd("game_specialsthrowf", game_specialsthrowf); agent.acmd("game_specialairsthrowf", game_specialsthrowf); agent.acmd("effect_specialsthrowf", effect_specialsthrowf); @@ -596,6 +594,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairsthrowf", sound_specialsthrowf); agent.acmd("expression_specialsthrowf", expression_specialsthrowf); agent.acmd("expression_specialairsthrowf", expression_specialsthrowf); + agent.acmd("game_specialsthrowb", game_specialsthrowb); agent.acmd("game_specialairsthrowb", game_specialsthrowb); agent.acmd("effect_specialsthrowb", effect_specialsthrowb); @@ -604,16 +603,21 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairsthrowb", sound_specialsthrowb); agent.acmd("expression_specialsthrowb", expression_specialsthrowb); agent.acmd("expression_specialairsthrowb", expression_specialsthrowb); + agent.acmd("effect_specialsjump", effect_specialsjump); agent.acmd("sound_specialsjump", sound_specialsjump); + agent.acmd("effect_specialsfall", effect_specialsfall); + agent.acmd("game_specialslanding", game_specialslanding); agent.acmd("effect_specialslanding", effect_specialslanding); agent.acmd("sound_specialslanding", sound_specialslanding); agent.acmd("expression_specialslanding", expression_specialslanding); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("expression_specialhi", expression_specialhi); agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/koopa/src/acmd/throws.rs b/fighters/koopa/src/acmd/throws.rs index c103b2aa60..ea49eadcba 100644 --- a/fighters/koopa/src/acmd/throws.rs +++ b/fighters/koopa/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -158,6 +157,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopa/src/acmd/tilts.rs b/fighters/koopa/src/acmd/tilts.rs index 4e76da28c1..84a2f84c3f 100644 --- a/fighters/koopa/src/acmd/tilts.rs +++ b/fighters/koopa/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -89,7 +89,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { @@ -121,10 +120,12 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attacks3hi); - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("game_attacks3lw", game_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs index fe731580c7..a0371f61d7 100644 --- a/fighters/koopa/src/breath/acmd.rs +++ b/fighters/koopa/src/breath/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_max(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -56,8 +57,9 @@ unsafe extern "C" fn effect_end(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { -agent.acmd("game_max", game_max); -agent.acmd("effect_max", effect_max); -agent.acmd("game_end", game_end); -agent.acmd("effect_end", effect_end); + agent.acmd("game_max", game_max); + agent.acmd("effect_max", effect_max); + + agent.acmd("game_end", game_end); + agent.acmd("effect_end", effect_end); } diff --git a/fighters/koopa/src/lib.rs b/fighters/koopa/src/lib.rs index 3e7161908c..5d33410eeb 100644 --- a/fighters/koopa/src/lib.rs +++ b/fighters/koopa/src/lib.rs @@ -4,10 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod breath; + use smash::{ lib::{ L2CValue, @@ -38,14 +41,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub const MAX_COOLDOWN : i32 = 900; pub fn install() { let agent = &mut Agent::new("koopa"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); breath::install(); diff --git a/fighters/koopa/src/status.rs b/fighters/koopa/src/status.rs index 016c3a58a9..5d524b77bc 100644 --- a/fighters/koopa/src/status.rs +++ b/fighters/koopa/src/status.rs @@ -3,6 +3,8 @@ use globals::*; mod special_n; mod special_s; +mod special_hi; +mod attack_s4_hold; // AGENT INIT AND CALLBACKS unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -16,46 +18,15 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn koopa_init(fighter: &mut L2CFighterCommon) { - unsafe { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } -} - -unsafe extern "C" fn attack_s4_charge_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); - return smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD)(fighter); -} - -// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A - -pub unsafe extern "C" fn exec_special_hi_a(fighter: &mut L2CFighterCommon) -> L2CValue { - if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_FALL && fighter.global_table[PREV_STATUS_KIND] == FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - } - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET) { - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); - return 0.into() - } - else { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET); - } - } - WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); - return 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(koopa_init); - agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_charge_exit); - agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, exec_special_hi_a); + agent.on_start(on_start); special_n::install(agent); special_s::install(agent); + special_hi::install(agent); + attack_s4_hold::install(agent); } \ No newline at end of file diff --git a/fighters/koopa/src/status/attack_s4_hold.rs b/fighters/koopa/src/status/attack_s4_hold.rs new file mode 100644 index 0000000000..53d93752fd --- /dev/null +++ b/fighters/koopa/src/status/attack_s4_hold.rs @@ -0,0 +1,13 @@ +use super::*; +use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + +unsafe extern "C" fn attack_s4_hold_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_explosion_sign"), false, false); + return smashline::original_status(Exit, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exit, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_exit); +} \ No newline at end of file diff --git a/fighters/koopa/src/status/special_hi.rs b/fighters/koopa/src/status/special_hi.rs new file mode 100644 index 0000000000..8d5310840d --- /dev/null +++ b/fighters/koopa/src/status/special_hi.rs @@ -0,0 +1,30 @@ +use super::*; +use globals::*; + +// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A + +pub unsafe extern "C" fn special_hi_a_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if KineticModule::get_kinetic_type(fighter.module_accessor) != *FIGHTER_KINETIC_TYPE_FALL && fighter.global_table[PREV_STATUS_KIND] == FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + } + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET) { + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); + return 0.into() + } + else { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_FLAG1SET); + } + } + WorkModule::inc_int(fighter.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_HI_WORK_INT_F); + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A, special_hi_a_exec); +} \ No newline at end of file From a7ddb99c169bac50a800c1d1d635c749a6af0a80 Mon Sep 17 00:00:00 2001 From: Askew Date: Tue, 26 Mar 2024 14:42:52 -0400 Subject: [PATCH 131/172] I had a bad time --- fighters/miigunner/src/acmd/aerials.rs | 68 ++-- fighters/miigunner/src/acmd/ground.rs | 22 +- fighters/miigunner/src/acmd/mod.rs | 16 +- fighters/miigunner/src/acmd/other.rs | 355 ++---------------- fighters/miigunner/src/acmd/smashes.rs | 18 +- fighters/miigunner/src/acmd/specials.rs | 162 ++++---- fighters/miigunner/src/acmd/throws.rs | 89 ++--- fighters/miigunner/src/acmd/tilts.rs | 20 +- .../miigunner/src/attackairf_bullet/acmd.rs | 14 + .../miigunner/src/attackairf_bullet/mod.rs | 9 + fighters/miigunner/src/bottomshoot/acmd.rs | 19 + fighters/miigunner/src/bottomshoot/mod.rs | 9 + fighters/miigunner/src/fullthrottle/acmd.rs | 13 + fighters/miigunner/src/fullthrottle/mod.rs | 9 + .../miigunner/src/grenadelauncher/acmd.rs | 27 ++ fighters/miigunner/src/grenadelauncher/mod.rs | 9 + fighters/miigunner/src/gunnercharge/acmd.rs | 45 +++ fighters/miigunner/src/gunnercharge/mod.rs | 9 + fighters/miigunner/src/lib.rs | 29 +- fighters/miigunner/src/opff.rs | 6 +- .../miigunner/src/rapidshot_bullet/acmd.rs | 57 +++ .../miigunner/src/rapidshot_bullet/mod.rs | 9 + fighters/miigunner/src/status.rs | 6 +- fighters/miigunner/src/stealthbomb/acmd.rs | 51 +++ fighters/miigunner/src/stealthbomb/mod.rs | 9 + fighters/miigunner/src/stealthbomb_s/acmd.rs | 40 ++ fighters/miigunner/src/stealthbomb_s/mod.rs | 9 + fighters/miigunner/src/supermissile/acmd.rs | 91 +++++ fighters/miigunner/src/supermissile/mod.rs | 9 + 29 files changed, 675 insertions(+), 554 deletions(-) create mode 100644 fighters/miigunner/src/attackairf_bullet/acmd.rs create mode 100644 fighters/miigunner/src/attackairf_bullet/mod.rs create mode 100644 fighters/miigunner/src/bottomshoot/acmd.rs create mode 100644 fighters/miigunner/src/bottomshoot/mod.rs create mode 100644 fighters/miigunner/src/fullthrottle/acmd.rs create mode 100644 fighters/miigunner/src/fullthrottle/mod.rs create mode 100644 fighters/miigunner/src/grenadelauncher/acmd.rs create mode 100644 fighters/miigunner/src/grenadelauncher/mod.rs create mode 100644 fighters/miigunner/src/gunnercharge/acmd.rs create mode 100644 fighters/miigunner/src/gunnercharge/mod.rs create mode 100644 fighters/miigunner/src/rapidshot_bullet/acmd.rs create mode 100644 fighters/miigunner/src/rapidshot_bullet/mod.rs create mode 100644 fighters/miigunner/src/stealthbomb/acmd.rs create mode 100644 fighters/miigunner/src/stealthbomb/mod.rs create mode 100644 fighters/miigunner/src/stealthbomb_s/acmd.rs create mode 100644 fighters/miigunner/src/stealthbomb_s/mod.rs create mode 100644 fighters/miigunner/src/supermissile/acmd.rs create mode 100644 fighters/miigunner/src/supermissile/mod.rs diff --git a/fighters/miigunner/src/acmd/aerials.rs b/fighters/miigunner/src/acmd/aerials.rs index 82c574d057..c55302d24b 100644 --- a/fighters/miigunner/src/acmd/aerials.rs +++ b/fighters/miigunner/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; use smash::app::sv_module_access::sound; -unsafe extern "C" fn miigunner_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -30,7 +30,7 @@ unsafe extern "C" fn miigunner_attack_air_n_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -87,7 +87,7 @@ unsafe extern "C" fn miigunner_attack_air_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -114,7 +114,7 @@ unsafe extern "C" fn miigunner_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_landing_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -125,7 +125,7 @@ unsafe extern "C" fn miigunner_landing_air_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_landing_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -134,7 +134,7 @@ unsafe extern "C" fn miigunner_landing_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -210,7 +210,7 @@ unsafe extern "C" fn miigunner_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -238,7 +238,7 @@ unsafe extern "C" fn miigunner_attack_air_b_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_landing_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -249,7 +249,7 @@ unsafe extern "C" fn miigunner_landing_air_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -334,7 +334,7 @@ unsafe extern "C" fn miigunner_attack_air_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 15.0); @@ -367,7 +367,7 @@ unsafe extern "C" fn miigunner_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_hi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -394,7 +394,7 @@ unsafe extern "C" fn miigunner_attack_air_hi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -423,7 +423,7 @@ unsafe extern "C" fn miigunner_attack_air_hi_expression(agent: &mut L2CAgentBase } } -unsafe extern "C" fn miigunner_landing_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -434,7 +434,7 @@ unsafe extern "C" fn miigunner_landing_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -530,7 +530,7 @@ unsafe extern "C" fn miigunner_attack_air_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -571,22 +571,24 @@ unsafe extern "C" fn miigunner_attack_air_lw_effect(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attackairn", miigunner_attack_air_n_game) - .acmd("game_attackairf", miigunner_attack_air_f_game) - .acmd("effect_attackairf", miigunner_attack_air_f_effect) - .acmd("game_landingairf", miigunner_landing_air_f_game) - .acmd("effect_landingairf", miigunner_landing_air_f_effect) - .acmd("game_attackairb", miigunner_attack_air_b_game) - .acmd("effect_attackairb", miigunner_attack_air_b_effect) - .acmd("game_landingairb", miigunner_landing_air_b_game) - .acmd("game_attackairhi", miigunner_attack_air_hi_game) - .acmd("effect_attackairhi", miigunner_attack_air_hi_effect) - .acmd("sound_attackairhi", miigunner_attack_air_hi_sound) - .acmd("expression_attackairhi", miigunner_attack_air_hi_expression) - .acmd("game_landingairhi", miigunner_landing_air_hi_game) - .acmd("game_attackairlw", miigunner_attack_air_lw_game) - .acmd("effect_attackairlw", miigunner_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_landingairf", game_landingairf); + agent.acmd("effect_landingairf", effect_landingairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_landingairb", game_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("sound_attackairhi", sound_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_landingairhi", game_landingairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/ground.rs b/fighters/miigunner/src/acmd/ground.rs index 524ecb5705..ac80aa6aa8 100644 --- a/fighters/miigunner/src/acmd/ground.rs +++ b/fighters/miigunner/src/acmd/ground.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miigunner_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -24,7 +24,7 @@ unsafe extern "C" fn miigunner_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -47,7 +47,7 @@ unsafe extern "C" fn miigunner_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn miigunner_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.77); @@ -99,11 +99,9 @@ unsafe extern "C" fn miigunner_attack_dash_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attack11", miigunner_attack_11_game) - .acmd("game_attack12", miigunner_attack_12_game) - .acmd("game_attack13", miigunner_attack_13_game) - .acmd("game_attackdash", miigunner_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/mod.rs b/fighters/miigunner/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/miigunner/src/acmd/mod.rs +++ b/fighters/miigunner/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/other.rs b/fighters/miigunner/src/acmd/other.rs index bd30dab36e..9237e2b151 100644 --- a/fighters/miigunner/src/acmd/other.rs +++ b/fighters/miigunner/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; use smash::app::sv_battle_object; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,21 +41,19 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.375); - } + FT_MOTION_RATE(agent, 1.375); frame(lua_state, 9.0); // Effectively F12 + FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -73,298 +71,23 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.125); if is_excute(agent) { - FT_MOTION_RATE(agent, 1.125); WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); // Effectively F12 - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } - -} - -unsafe extern "C" fn miigunner_attackairf_bullet_fly_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); - LAST_EFFECT_SET_RATE(agent, 0.7); - } -} - -unsafe extern "C" fn miigunner_rapidshot_bullet_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn miigunner_grenadelauncher_explode_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 3.0); - if is_excute(agent) { - AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 18); - } - frame(lua_state, 11.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - ATTACK(agent, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 12.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn miigunner_fullthrottle_final_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let pos2dim = Vector3f {x: 0.0, y: 40.0, z: 0.0}; - PostureModule::set_pos(boma, &pos2dim); - if is_excute(agent) { - - } - -} - -unsafe extern "C" fn miigunner_stealthbomb_tame_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 0.75); - } - frame(lua_state, 50.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 5.0); - } - frame(lua_state, 100.0); - if is_excute(agent) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.5, false, 0, 0, 0, 0 ,0, false, false); - LAST_EFFECT_SET_COLOR(agent, 0.15, 0.15, 10.0); - EffectModule::set_rgb(boma, flash_handle as u32, 0.15, 0.15, 10.0); - EffectModule::set_rate(boma, flash_handle as u32, 0.3); - VarModule::set_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER, flash_handle); - } - } - for h in 101..=120 { - if is_excute(agent) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let flash_handle = VarModule::get_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER); - let start_color = Vector3f { x: 0.15, y: 0.15, z: 10.0 }; - let end_color = Vector3f { x: 10.0, y: 0.15, z: 0.15 }; - // Smoothly interpolate from starting to ending color - let blend_vector = Vector3f { - x: start_color.x + ((end_color.x - start_color.x) * (((h as f32) - 100.0) / 20.0)), - y: start_color.y + ((end_color.y - start_color.y) * (((h as f32) - 100.0) / 20.0)), - z: start_color.z + ((end_color.z - start_color.z) * (((h as f32) - 100.0) / 20.0)) - }; - // Apply color blend - EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); - } - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn miigunner_stealthbomb_s_move_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(agent) { - //AREA_WIND_2ND_RAD(0, 1, 0.02, 1000, 1, 0, 0, 12); - } - frame(lua_state, 15.0); - if is_excute(agent) { - //AreaModule::erase_wind(boma, 0); - } - -} - -unsafe extern "C" fn miigunner_stealthbomb_s_move_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - -} - -unsafe extern "C" fn miigunner_supermissile_straight_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, agent.battle_object_id as i32); - } - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 20.0); - if is_excute(agent) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::on_flag(gunner, vars::miigunner::instance::DETONATE_READY); - } - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); - } - frame(lua_state, 1.0); - if is_excute(agent) { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); - } - } - frame(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 4.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; if is_excute(agent) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - EFFECT(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_COLOR(agent, 0.5, 10.0, 25.0); - } - else { - EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - } - } -} - -unsafe extern "C" fn miigunner_supermissile_burst_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - if is_excute(agent) { - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { - PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s03")); - PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_l")); - } - else { - PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_s")); - } - } + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } -} - -unsafe extern "C" fn miigunner_bottomshoot_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - if VarModule::get_float(owner_module_accessor.object(), vars::miigunner::status::CURRENT_CHARGE) <= 10.0 { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } - else { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn miigunner_gunnercharge_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); - AttackModule::enable_safe_pos(boma); - } - for _ in 0..1000 { - wait(lua_state, 1.0); - if is_excute(agent) { - let motion_vec = Vector3f{x: 0.5, y: 1.0, z: 1.0}; - KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - } - } } -unsafe extern "C" fn miigunner_gunnercharge_shoot_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25) { - PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n02")); - } - else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625) { - PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n03")); - } - else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875) { - PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n04")); - } - else { - PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n05")); - } - } -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -379,7 +102,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -393,49 +116,15 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("miigunner_stealthbomb_s") - .acmd("game_move", miigunner_stealthbomb_s_move_game) - .acmd("effect_move", miigunner_stealthbomb_s_move_effect) - .install(); - smashline::Agent::new("miigunner_grenadelauncher") - .acmd("game_explode", miigunner_grenadelauncher_explode_game) - .install(); - smashline::Agent::new("miigunner_gunnercharge") - .acmd("game_shoot", miigunner_gunnercharge_shoot_game) - .acmd("sound_shoot", miigunner_gunnercharge_shoot_sound) - .install(); - smashline::Agent::new("miigunner_stealthbomb") - .acmd("effect_tame", miigunner_stealthbomb_tame_effect) - .install(); - smashline::Agent::new("miigunner_attackairf_bullet") - .acmd("effect_fly", miigunner_attackairf_bullet_fly_effect) - .install(); - smashline::Agent::new("miigunner_supermissile") - .acmd("game_straight", miigunner_supermissile_straight_game) - .acmd("game_sburst", miigunner_supermissile_burst_game) - .acmd("effect_sburst", miigunner_supermissile_burst_effect) - .acmd("sound_sburst", miigunner_supermissile_burst_sound) - .install(); - smashline::Agent::new("miigunner_fullthrottle") - .acmd("game_final", miigunner_fullthrottle_final_game) - .install(); - smashline::Agent::new("miigunner_rapidshot_bullet") - .acmd("game_fly", miigunner_rapidshot_bullet_fly_game) - .install(); - smashline::Agent::new("miigunner_bottomshoot") - .acmd("game_shoot", miigunner_bottomshoot_shoot_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miigunner/src/acmd/smashes.rs b/fighters/miigunner/src/acmd/smashes.rs index 2cbfdbd1dd..cffdbe9124 100644 --- a/fighters/miigunner/src/acmd/smashes.rs +++ b/fighters/miigunner/src/acmd/smashes.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -33,7 +33,7 @@ unsafe extern "C" fn miigunner_attack_s4_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -115,7 +115,7 @@ unsafe extern "C" fn miigunner_attack_hi4_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -143,10 +143,8 @@ unsafe extern "C" fn miigunner_attack_lw4_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attacks4", miigunner_attack_s4_s_game) - .acmd("game_attackhi4", miigunner_attack_hi4_game) - .acmd("game_attacklw4", miigunner_attack_lw4_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials.rs b/fighters/miigunner/src/acmd/specials.rs index 96bc629f61..5864640bef 100644 --- a/fighters/miigunner/src/acmd/specials.rs +++ b/fighters/miigunner/src/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miigunner_special_n1_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn1start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -11,7 +11,7 @@ unsafe extern "C" fn miigunner_special_n1_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_special_n1_fire_max_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnifiremax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -53,7 +53,7 @@ unsafe extern "C" fn miigunner_special_n1_fire_max_game(agent: &mut L2CAgentBase } } -unsafe extern "C" fn miigunner_special_n1_fire_max_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialn1firemax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -105,7 +105,7 @@ unsafe extern "C" fn miigunner_special_n1_fire_max_effect(agent: &mut L2CAgentBa } -unsafe extern "C" fn miigunner_special_n1_fire_max_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -125,7 +125,7 @@ unsafe extern "C" fn miigunner_special_n1_fire_max_sound(agent: &mut L2CAgentBas } -unsafe extern "C" fn miigunner_special_n2_loop_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -146,7 +146,7 @@ unsafe extern "C" fn miigunner_special_n2_loop_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_special_n3_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -159,7 +159,7 @@ unsafe extern "C" fn miigunner_special_n3_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn miigunner_special_n3_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialn3start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -169,7 +169,7 @@ unsafe extern "C" fn miigunner_special_n3_start_effect(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn miigunner_special_n3_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -179,7 +179,7 @@ unsafe extern "C" fn miigunner_special_n3_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_s1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -191,7 +191,7 @@ unsafe extern "C" fn miigunner_special_s1_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_s3_super_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials32(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 23.0); @@ -200,7 +200,7 @@ unsafe extern "C" fn miigunner_special_s3_super_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_hi1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -217,7 +217,7 @@ unsafe extern "C" fn miigunner_special_hi1_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_hi1_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -239,7 +239,7 @@ unsafe extern "C" fn miigunner_special_hi1_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_hi1_landing_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_landingfallspecial(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -248,7 +248,7 @@ unsafe extern "C" fn miigunner_special_hi1_landing_effect(agent: &mut L2CAgentBa } } -unsafe extern "C" fn miigunner_special_hi2_squat_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2squat(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -266,7 +266,7 @@ unsafe extern "C" fn miigunner_special_hi2_squat_game(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn miigunner_special_hi2_squat_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi2squat(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -287,7 +287,7 @@ unsafe extern "C" fn miigunner_special_hi2_squat_effect(agent: &mut L2CAgentBase } } -unsafe extern "C" fn miigunner_special_hi2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -314,21 +314,21 @@ unsafe extern "C" fn miigunner_special_hi2_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_hi3_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi3start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 1.5); } -unsafe extern "C" fn miigunner_special_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 0.85); } -unsafe extern "C" fn miigunner_special_lw1_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw1start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -343,14 +343,14 @@ unsafe extern "C" fn miigunner_special_lw1_start_game(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn miigunner_special_lw3_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw3start(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); } -unsafe extern "C" fn miigunner_special_lw3_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw3hold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -367,7 +367,7 @@ unsafe extern "C" fn miigunner_special_lw3_hold_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_lw3_hold_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw3hold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -388,7 +388,7 @@ unsafe extern "C" fn miigunner_special_lw3_hold_effect(agent: &mut L2CAgentBase) wait(lua_state, 3.0); } -unsafe extern "C" fn miigunner_special_lw3_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -403,7 +403,7 @@ unsafe extern "C" fn miigunner_special_lw3_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_special_lw3_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw3end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -412,7 +412,7 @@ unsafe extern "C" fn miigunner_special_lw3_end_effect(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn miigunner_special_lw3_end_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_speciallw3end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -420,53 +420,67 @@ unsafe extern "C" fn miigunner_special_lw3_end_sound(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_specialn1start", miigunner_special_n1_start_game) - .acmd("game_specialairn1start", miigunner_special_n1_start_game) - .acmd("game_specialn1firemax", miigunner_special_n1_fire_max_game) - .acmd("game_specialairn1firemax", miigunner_special_n1_fire_max_game) - .acmd("effect_specialn1firemax", miigunner_special_n1_fire_max_effect) - .acmd("effect_specialairn1firemax", miigunner_special_n1_fire_max_effect) - .acmd("sound_specialn1firemax", miigunner_special_n1_fire_max_sound) - .acmd("sound_specialairn1firemax", miigunner_special_n1_fire_max_sound) - .acmd("game_specialn2loop", miigunner_special_n2_loop_game) - .acmd("game_specialairn2loop", miigunner_special_n2_loop_game) - .acmd("game_specialn3start", miigunner_special_n3_start_game) - .acmd("game_specialairn3start", miigunner_special_n3_start_game) - .acmd("effect_specialn3start", miigunner_special_n3_start_effect) - .acmd("game_specialn3end", miigunner_special_n3_end_game) - .acmd("game_specialairn3end", miigunner_special_n3_end_game) - .acmd("game_specials1", miigunner_special_s1_game) - .acmd("game_specialairs1", miigunner_special_s1_game) - .acmd("game_specials32", miigunner_special_s3_super_game) - .acmd("game_specialairs32", miigunner_special_s3_super_game) - .acmd("game_specialhi1", miigunner_special_hi1_game) - .acmd("game_specialairhi1", miigunner_special_hi1_game) - .acmd("effect_specialhi1", miigunner_special_hi1_effect) - .acmd("effect_specialairhi1", miigunner_special_hi1_effect) - .acmd("effect_landingfallspecial", miigunner_special_hi1_landing_effect) - .acmd("game_specialhi2squat", miigunner_special_hi2_squat_game) - .acmd("game_specialairhi2squat", miigunner_special_hi2_squat_game) - .acmd("effect_specialhi2squat", miigunner_special_hi2_squat_effect) - .acmd("effect_specialairhi2squat", miigunner_special_hi2_squat_effect) - .acmd("game_specialhi2", miigunner_special_hi2_game) - .acmd("game_specialhi3start", miigunner_special_hi3_start_game) - .acmd("game_specialairhi3start", miigunner_special_hi3_start_game) - .acmd("game_specialhi3", miigunner_special_hi3_game) - .acmd("game_speciallw1start", miigunner_special_lw1_start_game) - .acmd("game_specialairlw1start", miigunner_special_lw1_start_game) - .acmd("game_speciallw3start", miigunner_special_lw3_start_game) - .acmd("game_specialairlw3start", miigunner_special_lw3_start_game) - .acmd("game_speciallw3hold", miigunner_special_lw3_hold_game) - .acmd("game_specialairlw3hold", miigunner_special_lw3_hold_game) - .acmd("effect_speciallw3hold", miigunner_special_lw3_hold_effect) - .acmd("effect_specialairlw3hold", miigunner_special_lw3_hold_effect) - .acmd("game_speciallw3end", miigunner_special_lw3_end_game) - .acmd("game_specialairlw3end", miigunner_special_lw3_end_game) - .acmd("effect_speciallw3end", miigunner_special_lw3_end_effect) - .acmd("effect_specialairlw3end", miigunner_special_lw3_end_effect) - .acmd("sound_speciallw3end", miigunner_special_lw3_end_sound) - .acmd("sound_specialairlw3end", miigunner_special_lw3_end_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1start", game_specialn1start); + agent.acmd("game_specialairn1start", game_specialn1start); + + agent.acmd("game_specialn1firemax", game_specialnifiremax); + agent.acmd("game_specialairn1firemax", game_specialnifiremax); + agent.acmd("effect_specialn1firemax", effect_specialn1firemax); + agent.acmd("effect_specialairn1firemax", effect_specialn1firemax); + agent.acmd("sound_specialn1firemax", sound_specialn1firemax); + agent.acmd("sound_specialairn1firemax", sound_specialn1firemax); + + agent.acmd("game_specialn2loop", game_specialn2loop); + agent.acmd("game_specialairn2loop", game_specialn2loop); + + agent.acmd("game_specialn3start", game_specialn3start); + agent.acmd("game_specialairn3start", game_specialn3start); + agent.acmd("effect_specialn3start", effect_specialn3start); + + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialn3end); + + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + + agent.acmd("game_specials32", game_specials32); + agent.acmd("game_specialairs32", game_specials32); + + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + + agent.acmd("game_specialhi2squat", game_specialhi2squat); + agent.acmd("game_specialairhi2squat", game_specialhi2squat); + agent.acmd("effect_specialhi2squat", effect_specialhi2squat); + agent.acmd("effect_specialairhi2squat", effect_specialhi2squat); + + agent.acmd("game_specialhi2", game_specialhi2); + + agent.acmd("game_specialhi3start", game_specialhi3start); + agent.acmd("game_specialairhi3start", game_specialhi3start); + + agent.acmd("game_specialhi3", game_specialhi3); + + agent.acmd("effect_landingfallspecial", effect_landingfallspecial); + + agent.acmd("game_speciallw1start", game_speciallw1start); + agent.acmd("game_specialairlw1start", game_speciallw1start); + + agent.acmd("game_speciallw3start", game_speciallw3start); + agent.acmd("game_specialairlw3start", game_speciallw3start); + + agent.acmd("game_speciallw3hold", game_speciallw3hold); + agent.acmd("game_specialairlw3hold", game_speciallw3hold); + agent.acmd("effect_speciallw3hold", effect_speciallw3hold); + agent.acmd("effect_specialairlw3hold", effect_speciallw3hold); + + agent.acmd("game_speciallw3end", game_speciallw3end); + agent.acmd("game_specialairlw3end", game_speciallw3end); + agent.acmd("effect_speciallw3end", effect_speciallw3end); + agent.acmd("effect_specialairlw3end", effect_speciallw3end); + agent.acmd("sound_speciallw3end", sound_speciallw3end); + agent.acmd("sound_specialairlw3end", sound_speciallw3end); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/throws.rs b/fighters/miigunner/src/acmd/throws.rs index ef1ebe3661..36a352adad 100644 --- a/fighters/miigunner/src/acmd/throws.rs +++ b/fighters/miigunner/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miigunner_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -23,7 +23,7 @@ unsafe extern "C" fn miigunner_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -43,7 +43,7 @@ unsafe extern "C" fn miigunner_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -63,7 +63,7 @@ unsafe extern "C" fn miigunner_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -89,7 +89,7 @@ unsafe extern "C" fn miigunner_throw_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -146,15 +146,7 @@ unsafe extern "C" fn miigunner_throw_b_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowb_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn miigunner_throw_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); // frame(lua_state, 4.0); @@ -195,7 +187,7 @@ unsafe extern "C" fn miigunner_throw_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_throw_b_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -228,7 +220,7 @@ unsafe extern "C" fn miigunner_throw_b_sound(agent: &mut L2CAgentBase) { // } } -unsafe extern "C" fn miigunner_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -288,31 +280,7 @@ unsafe extern "C" fn miigunner_throw_hi_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATK_POWER(agent, 0, 3); - } -} - -unsafe extern "C" fn miigunner_rapidshot_bullet_flythrowhi2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATK_POWER(agent, 0, 3); - } -} - -unsafe extern "C" fn miigunner_throw_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); // frame(lua_state, 2.0); @@ -364,7 +332,7 @@ unsafe extern "C" fn miigunner_throw_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_throw_hi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -399,7 +367,7 @@ unsafe extern "C" fn miigunner_throw_hi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -421,23 +389,20 @@ unsafe extern "C" fn miigunner_throw_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miigunner_rapidshot_bullet") - .acmd("game_flythrowb", miigunner_rapidshot_bullet_flythrowb_game) - .acmd("game_flythrowhi", miigunner_rapidshot_bullet_flythrowhi_game) - .acmd("game_flythrowhi2", miigunner_rapidshot_bullet_flythrowhi2_game) - .install(); - smashline::Agent::new("miigunner") - .acmd("game_catch", miigunner_catch_game) - .acmd("game_catchdash", miigunner_catch_dash_game) - .acmd("game_catchturn", miigunner_catch_turn_game) - .acmd("game_throwf", miigunner_throw_f_game) - .acmd("game_throwb", miigunner_throw_b_game) - .acmd("effect_throwb", miigunner_throw_b_effect) - .acmd("sound_throwb", miigunner_throw_b_sound) - .acmd("game_throwhi", miigunner_throw_hi_game) - .acmd("effect_throwhi", miigunner_throw_hi_effect) - .acmd("sound_throwhi", miigunner_throw_hi_sound) - .acmd("game_throwlw", miigunner_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + agent.acmd("effect_throwb", effect_throwb); + agent.acmd("sound_throwb", sound_throwb); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/tilts.rs b/fighters/miigunner/src/acmd/tilts.rs index 3886675023..2e5d2ba371 100644 --- a/fighters/miigunner/src/acmd/tilts.rs +++ b/fighters/miigunner/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miigunner_attack_s3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -38,7 +38,7 @@ unsafe extern "C" fn miigunner_attack_s3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn miigunner_attack_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -77,7 +77,7 @@ unsafe extern "C" fn miigunner_attack_hi3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miigunner_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -94,11 +94,9 @@ unsafe extern "C" fn miigunner_attack_lw3_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("miigunner") - .acmd("game_attacks3", miigunner_attack_s3_game) - .acmd("effect_attacks3", miigunner_attack_s3_effect) - .acmd("game_attackhi3", miigunner_attack_hi3_game) - .acmd("game_attacklw3", miigunner_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miigunner/src/attackairf_bullet/acmd.rs b/fighters/miigunner/src/attackairf_bullet/acmd.rs new file mode 100644 index 0000000000..4dc7214f4d --- /dev/null +++ b/fighters/miigunner/src/attackairf_bullet/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, -0.5, 0.5, 0, 180, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.7); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_fly", effect_fly); +} \ No newline at end of file diff --git a/fighters/miigunner/src/attackairf_bullet/mod.rs b/fighters/miigunner/src/attackairf_bullet/mod.rs new file mode 100644 index 0000000000..737c53e5bf --- /dev/null +++ b/fighters/miigunner/src/attackairf_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_attackairf_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/bottomshoot/acmd.rs b/fighters/miigunner/src/bottomshoot/acmd.rs new file mode 100644 index 0000000000..3d0cb56982 --- /dev/null +++ b/fighters/miigunner/src/bottomshoot/acmd.rs @@ -0,0 +1,19 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + if VarModule::get_float(owner_module_accessor.object(), vars::miigunner::status::CURRENT_CHARGE) <= 10.0 { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 30, 0, 110, 9.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } + else { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 100, 0, 60, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} \ No newline at end of file diff --git a/fighters/miigunner/src/bottomshoot/mod.rs b/fighters/miigunner/src/bottomshoot/mod.rs new file mode 100644 index 0000000000..2b62c61361 --- /dev/null +++ b/fighters/miigunner/src/bottomshoot/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_bottomshoot"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/fullthrottle/acmd.rs b/fighters/miigunner/src/fullthrottle/acmd.rs new file mode 100644 index 0000000000..038ce905b5 --- /dev/null +++ b/fighters/miigunner/src/fullthrottle/acmd.rs @@ -0,0 +1,13 @@ +use super::*; + +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let pos2dim = Vector3f {x: 0.0, y: 40.0, z: 0.0}; + PostureModule::set_pos(boma, &pos2dim); + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_final", game_final); +} \ No newline at end of file diff --git a/fighters/miigunner/src/fullthrottle/mod.rs b/fighters/miigunner/src/fullthrottle/mod.rs new file mode 100644 index 0000000000..92508be39f --- /dev/null +++ b/fighters/miigunner/src/fullthrottle/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_fullthrottle"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/grenadelauncher/acmd.rs b/fighters/miigunner/src/grenadelauncher/acmd.rs new file mode 100644 index 0000000000..8844e08ac2 --- /dev/null +++ b/fighters/miigunner/src/grenadelauncher/acmd.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.4, 160, 9, 0, 29, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 18); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + ATTACK(agent, 0, 1, Hash40::new("top"), 6.6, 50, 151, 0, 20, 10.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3.3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 12.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/miigunner/src/grenadelauncher/mod.rs b/fighters/miigunner/src/grenadelauncher/mod.rs new file mode 100644 index 0000000000..ef7b1a51c5 --- /dev/null +++ b/fighters/miigunner/src/grenadelauncher/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_grenadelauncher"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/gunnercharge/acmd.rs b/fighters/miigunner/src/gunnercharge/acmd.rs new file mode 100644 index 0000000000..899bfb622c --- /dev/null +++ b/fighters/miigunner/src/gunnercharge/acmd.rs @@ -0,0 +1,45 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 42, 0, 14, 1.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -2, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 21.0, 50, 80, 0, 27, 6.0, 0.0, 0.0, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -6.5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + AttackModule::enable_safe_pos(boma); + } + for _ in 0..1000 { + wait(lua_state, 1.0); + if is_excute(agent) { + let motion_vec = Vector3f{x: 0.5, y: 1.0, z: 1.0}; + KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + } + } + +} + +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.25) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n02")); + } + else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.625) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n03")); + } + else if(WorkModule::get_float(boma, *WEAPON_MIIGUNNER_GUNNERCHARGE_INSTANCE_WORK_ID_FLOAT_CHARGE) <= 0.875) { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n04")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_miigunner_special_n05")); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("sound_shoot", sound_shoot); +} \ No newline at end of file diff --git a/fighters/miigunner/src/gunnercharge/mod.rs b/fighters/miigunner/src/gunnercharge/mod.rs new file mode 100644 index 0000000000..a8a9eae4db --- /dev/null +++ b/fighters/miigunner/src/gunnercharge/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_gunnercharge"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/lib.rs b/fighters/miigunner/src/lib.rs index 5537dac979..b173d09a2e 100644 --- a/fighters/miigunner/src/lib.rs +++ b/fighters/miigunner/src/lib.rs @@ -7,6 +7,17 @@ pub mod acmd; pub mod status; pub mod opff; +// articles +mod attackairf_bullet; +mod bottomshoot; +mod fullthrottle; +mod grenadelauncher; +mod gunnercharge; +mod rapidshot_bullet; +mod stealthbomb; +mod stealthbomb_s; +mod supermissile; + use smash::{ lib::{ L2CValue, @@ -39,7 +50,19 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("miigunner"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + attackairf_bullet::install(); + bottomshoot::install(); + fullthrottle::install(); + grenadelauncher::install(); + gunnercharge::install(); + rapidshot_bullet::install(); + stealthbomb::install(); + stealthbomb_s::install(); + supermissile::install(); } \ No newline at end of file diff --git a/fighters/miigunner/src/opff.rs b/fighters/miigunner/src/opff.rs index e20790e0fc..53f5197b30 100644 --- a/fighters/miigunner/src/opff.rs +++ b/fighters/miigunner/src/opff.rs @@ -342,10 +342,8 @@ pub extern "C" fn miigunner_missile_frame(weapon: &mut smash::lua2cpp::L2CFighte } } -pub fn install() { - smashline::Agent::new("miigunner") - .on_line(Main, miigunner_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miigunner_frame_wrapper); smashline::Agent::new("miigunner_supermissile") .on_line(Main, miigunner_missile_frame) .install(); diff --git a/fighters/miigunner/src/rapidshot_bullet/acmd.rs b/fighters/miigunner/src/rapidshot_bullet/acmd.rs new file mode 100644 index 0000000000..b09bf8b313 --- /dev/null +++ b/fighters/miigunner/src/rapidshot_bullet/acmd.rs @@ -0,0 +1,57 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 100, 3, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.4, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 160, 0, 20, 4.0, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } +} + +unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 77, 0, 89, 6.5, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + } +} + +unsafe extern "C" fn game_flythrowhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 90, 0, 0, 0, 5.6, 0.0, 0.0, 0.8, Some(0.0), Some(0.0), Some(10.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MIIGUNNER_BLASTER, *ATTACK_REGION_ENERGY); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATK_POWER(agent, 0, 3); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); + agent.acmd("game_flythrowb", game_flythrowb); + agent.acmd("game_flythrowhi", game_flythrowhi); + agent.acmd("game_flythrowhi2", game_flythrowhi2); +} \ No newline at end of file diff --git a/fighters/miigunner/src/rapidshot_bullet/mod.rs b/fighters/miigunner/src/rapidshot_bullet/mod.rs new file mode 100644 index 0000000000..9e62092748 --- /dev/null +++ b/fighters/miigunner/src/rapidshot_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_rapidshot_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/status.rs b/fighters/miigunner/src/status.rs index f08d2a4323..c0176bc8fc 100644 --- a/fighters/miigunner/src/status.rs +++ b/fighters/miigunner/src/status.rs @@ -32,8 +32,6 @@ extern "C" fn miigunner_init(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("miigunner") - .on_start(miigunner_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(miigunner_init); } \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb/acmd.rs b/fighters/miigunner/src/stealthbomb/acmd.rs new file mode 100644 index 0000000000..ea5c3a2f24 --- /dev/null +++ b/fighters/miigunner/src/stealthbomb/acmd.rs @@ -0,0 +1,51 @@ +use super::*; + +unsafe extern "C" fn effect_tame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.15, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 0.75); + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.20, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 5.0); + } + frame(lua_state, 100.0); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = EffectModule::req_follow(boma, Hash40::new("sys_smash_flash"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 0.5, false, 0, 0, 0, 0 ,0, false, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 0.15, 10.0); + EffectModule::set_rgb(boma, flash_handle as u32, 0.15, 0.15, 10.0); + EffectModule::set_rate(boma, flash_handle as u32, 0.3); + VarModule::set_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER, flash_handle); + } + } + for h in 101..=120 { + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let flash_handle = VarModule::get_int64(gunner, vars::miigunner::instance::STEALTHBOMB_EFF_HANDLER); + let start_color = Vector3f { x: 0.15, y: 0.15, z: 10.0 }; + let end_color = Vector3f { x: 10.0, y: 0.15, z: 0.15 }; + // Smoothly interpolate from starting to ending color + let blend_vector = Vector3f { + x: start_color.x + ((end_color.x - start_color.x) * (((h as f32) - 100.0) / 20.0)), + y: start_color.y + ((end_color.y - start_color.y) * (((h as f32) - 100.0) / 20.0)), + z: start_color.z + ((end_color.z - start_color.z) * (((h as f32) - 100.0) / 20.0)) + }; + // Apply color blend + EffectModule::set_rgb(boma, flash_handle as u32, blend_vector.x, blend_vector.y, blend_vector.z); + } + } + wait(lua_state, 1.0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_tame", effect_tame); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb/mod.rs b/fighters/miigunner/src/stealthbomb/mod.rs new file mode 100644 index 0000000000..9f626294fb --- /dev/null +++ b/fighters/miigunner/src/stealthbomb/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_stealthbomb"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb_s/acmd.rs b/fighters/miigunner/src/stealthbomb_s/acmd.rs new file mode 100644 index 0000000000..0266dde2bb --- /dev/null +++ b/fighters/miigunner/src/stealthbomb_s/acmd.rs @@ -0,0 +1,40 @@ +use super::*; + +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 65, 94, 0, 48, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + //AREA_WIND_2ND_RAD(0, 1, 0.02, 1000, 1, 0, 0, 12); + } + frame(lua_state, 15.0); + if is_excute(agent) { + //AreaModule::erase_wind(boma, 0); + } + +} + +unsafe extern "C" fn effect_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); + agent.acmd("effect_move", effect_move); +} \ No newline at end of file diff --git a/fighters/miigunner/src/stealthbomb_s/mod.rs b/fighters/miigunner/src/stealthbomb_s/mod.rs new file mode 100644 index 0000000000..507cfb4896 --- /dev/null +++ b/fighters/miigunner/src/stealthbomb_s/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_stealthbomb_s"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/acmd.rs b/fighters/miigunner/src/supermissile/acmd.rs new file mode 100644 index 0000000000..cc8c685640 --- /dev/null +++ b/fighters/miigunner/src/supermissile/acmd.rs @@ -0,0 +1,91 @@ +use super::*; + +unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::set_int(gunner, vars::miigunner::instance::MISSILE_OBJECT_ID, agent.battle_object_id as i32); + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 90, 0, 50, 3.0, 0.0, 0.0, 1.2, Some(0.0), Some(0.0), Some(3.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::on_flag(gunner, vars::miigunner::instance::DETONATE_READY); + } + } +} + +unsafe extern "C" fn game_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); + } + frame(lua_state, 1.0); + if is_excute(agent) { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 50, 75, 0, 70, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_BOMB); + } + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 4.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + EFFECT(agent, Hash40::new("miigunner_atk_shot5"), Hash40::new("top"), -10, 0, 0, 0, 0, 0, 1.45, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_COLOR(agent, 0.5, 10.0, 25.0); + } + else { + EFFECT(agent, Hash40::new("sys_misfire"), Hash40::new("top"), 0, -1, 2, 0, 0, 0, 1.75, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + } + } +} + +unsafe extern "C" fn sound_sburst(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + if is_excute(agent) { + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(gunner, vars::miigunner::status::MISSILE_DETONATE) { + PLAY_SE(agent, Hash40::new("se_miigunner_special_c2_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_l")); + } + else { + PLAY_SE_REMAIN(agent, Hash40::new("se_common_bomb_s")); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_straight", game_straight); + agent.acmd("game_sburst", game_sburst); + agent.acmd("effect_sburst", effect_sburst); + agent.acmd("sound_sburst", sound_sburst); +} \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/mod.rs b/fighters/miigunner/src/supermissile/mod.rs new file mode 100644 index 0000000000..082bf2a9d8 --- /dev/null +++ b/fighters/miigunner/src/supermissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("miigunner_supermissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 296183c42c5880bc798766a34821011f6581b5b3 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 13:45:06 -0500 Subject: [PATCH 132/172] lucina dancing blade!!!!!!!!!!!!! --- fighters/lucina/src/acmd/aerials.rs | 56 +- fighters/lucina/src/acmd/ground.rs | 29 +- fighters/lucina/src/acmd/mod.rs | 16 +- fighters/lucina/src/acmd/other.rs | 45 +- fighters/lucina/src/acmd/smashes.rs | 14 +- fighters/lucina/src/acmd/specials.rs | 1129 ++++------------------ fighters/lucina/src/acmd/throws.rs | 18 +- fighters/lucina/src/acmd/tilts.rs | 22 +- fighters/lucina/src/lib.rs | 11 +- fighters/lucina/src/opff.rs | 8 +- fighters/lucina/src/status.rs | 502 +--------- fighters/lucina/src/status/appeal.rs | 12 + fighters/lucina/src/status/special_lw.rs | 101 ++ fighters/lucina/src/status/special_s.rs | 396 ++++++++ 14 files changed, 799 insertions(+), 1560 deletions(-) create mode 100644 fighters/lucina/src/status/appeal.rs create mode 100644 fighters/lucina/src/status/special_lw.rs create mode 100644 fighters/lucina/src/status/special_s.rs diff --git a/fighters/lucina/src/acmd/aerials.rs b/fighters/lucina/src/acmd/aerials.rs index bd4cd38a11..1c1cb90de7 100644 --- a/fighters/lucina/src/acmd/aerials.rs +++ b/fighters/lucina/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn lucina_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -40,10 +39,9 @@ unsafe extern "C" fn lucina_attack_air_n_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucina_attack_air_n_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -61,7 +59,7 @@ unsafe extern "C" fn lucina_attack_air_n_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_n_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -77,10 +75,9 @@ unsafe extern "C" fn lucina_attack_air_n_sound(agent: &mut L2CAgentBase) { PLAY_SEQUENCE(agent, Hash40::new("seq_lucina_rnd_attack")); PLAY_SE(agent, Hash40::new("se_lucina_attackl_s01")); } - } -unsafe extern "C" fn lucina_attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -113,7 +110,7 @@ unsafe extern "C" fn lucina_attack_air_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -144,7 +141,7 @@ unsafe extern "C" fn lucina_attack_air_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -157,7 +154,7 @@ unsafe extern "C" fn lucina_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -173,7 +170,7 @@ unsafe extern "C" fn lucina_attack_air_f_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -203,7 +200,7 @@ unsafe extern "C" fn lucina_attack_air_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -228,10 +225,9 @@ unsafe extern "C" fn lucina_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn lucina_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -259,7 +255,7 @@ unsafe extern "C" fn lucina_attack_air_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_air_lw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -269,18 +265,20 @@ unsafe extern "C" fn lucina_attack_air_lw_sound(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attackairn", lucina_attack_air_n_game) - .acmd("effect_attackairn", lucina_attack_air_n_effect) - .acmd("sound_attackairn", lucina_attack_air_n_sound) - .acmd("expression_attackairn", lucina_attack_air_n_expression) - .acmd("game_attackairf", lucina_attack_air_f_game) - .acmd("effect_attackairf", lucina_attack_air_f_effect) - .acmd("expression_attackairf", lucina_attack_air_f_expression) - .acmd("game_attackairb", lucina_attack_air_b_game) - .acmd("game_attackairhi", lucina_attack_air_hi_game) - .acmd("game_attackairlw", lucina_attack_air_lw_game) - .acmd("sound_attackairlw", lucina_attack_air_lw_sound) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); } diff --git a/fighters/lucina/src/acmd/ground.rs b/fighters/lucina/src/acmd/ground.rs index 94ff62b9ba..a0e6ccf66d 100644 --- a/fighters/lucina/src/acmd/ground.rs +++ b/fighters/lucina/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn lucina_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -19,10 +18,9 @@ unsafe extern "C" fn lucina_attack_11_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } -unsafe extern "C" fn lucina_attack_11_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -39,7 +37,7 @@ unsafe extern "C" fn lucina_attack_11_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -53,10 +51,9 @@ unsafe extern "C" fn lucina_attack_12_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_12_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -73,7 +70,7 @@ unsafe extern "C" fn lucina_attack_12_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); @@ -92,15 +89,13 @@ unsafe extern "C" fn lucina_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attack11", lucina_attack_11_game) - .acmd("expression_attack11", lucina_attack_11_expression) - .acmd("game_attack12", lucina_attack_12_game) - .acmd("expression_attack12", lucina_attack_12_expression) - .acmd("game_attackdash", lucina_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/lucina/src/acmd/mod.rs b/fighters/lucina/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/lucina/src/acmd/mod.rs +++ b/fighters/lucina/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/other.rs b/fighters/lucina/src/acmd/other.rs index 5d8a0a5100..5c56c6d679 100644 --- a/fighters/lucina/src/acmd/other.rs +++ b/fighters/lucina/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,17 +40,16 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -69,7 +67,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -80,14 +78,12 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -98,10 +94,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -112,17 +107,17 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/lucina/src/acmd/smashes.rs b/fighters/lucina/src/acmd/smashes.rs index 3623f6685e..6aac3aaeb4 100644 --- a/fighters/lucina/src/acmd/smashes.rs +++ b/fighters/lucina/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn lucina_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -32,7 +31,7 @@ unsafe extern "C" fn lucina_attack_s4_s_game(agent: &mut L2CAgentBase) { FT_DESIRED_RATE(agent, (49.0 - 26.0), 13.0); } -unsafe extern "C" fn lucina_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -74,9 +73,8 @@ unsafe extern "C" fn lucina_attack_lw4_game(agent: &mut L2CAgentBase) { FT_DESIRED_RATE(agent, (70.0 - 43.0), 23.0); } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attacks4", lucina_attack_s4_s_game) - .acmd("game_attacklw4", lucina_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/lucina/src/acmd/specials.rs b/fighters/lucina/src/acmd/specials.rs index e52b1613ff..544102ea18 100644 --- a/fighters/lucina/src/acmd/specials.rs +++ b/fighters/lucina/src/acmd/specials.rs @@ -1,40 +1,6 @@ use super::*; -unsafe extern "C" fn lucina_special_n_end_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -63,144 +29,9 @@ unsafe extern "C" fn lucina_special_n_end_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn lucina_special_n_end_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn lucina_special_n_end_max_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 1.5, y: 0.0, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(4.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 3.0, 25.0, Some(0.0), Some(2.7), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.6, 17.0, Some(0.0), Some(3.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 3.0, 23.5, Some(0.0), Some(1.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 4.5, 8.0, Some(0.0), Some(1.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, -0.5, 25.0, Some(0.0), Some(-1.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 2.0, 17.0, Some(0.0), Some(0.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 0.0, 23.5, Some(0.0), Some(-1.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - } -unsafe extern "C" fn lucina_special_air_n_end_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnendhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -231,42 +62,9 @@ unsafe extern "C" fn lucina_special_air_n_end_hi_game(agent: &mut L2CAgentBase) if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn lucina_special_air_n_end_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let addSpeed1 = Vector3f { x: 0.25 + (0.025 * WorkModule::get_int(boma, *FIGHTER_MARTH_STATUS_SPECIAL_N_WORK_INT_CHARGE_COUNT) as f32),y: 0.0,z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed1); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 3.0, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.5, 361, 90, 0, 45, 0.9, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 25, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - } -unsafe extern "C" fn lucina_special_air_n_end_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnendlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -297,10 +95,9 @@ unsafe extern "C" fn lucina_special_air_n_end_lw_game(agent: &mut L2CAgentBase) if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnendmax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -309,17 +106,15 @@ unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(agent: &mut L2CAgentBa } frame(lua_state, 8.0); if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 9.0); @@ -331,10 +126,9 @@ unsafe extern "C" fn lucina_special_air_n_end_max_hi_game(agent: &mut L2CAgentBa if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_special_air_n_end_max_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnendmaxhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -343,15 +137,17 @@ unsafe extern "C" fn lucina_special_air_n_end_max_game(agent: &mut L2CAgentBase) } frame(lua_state, 8.0); if is_excute(agent) { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(8.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 25.0, Some(0.0), Some(8.5), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 17.0, Some(0.0), Some(8.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 8.5, 23.5, Some(0.0), Some(8.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 8.5, 8.0, Some(0.0), Some(12.5), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 14.0, 25.0, Some(0.0), Some(14.6), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.8, 17.0, Some(0.0), Some(12.3), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 13.0, 23.5, Some(0.0), Some(14.7), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); if WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_KIND) == *FIGHTER_KIND_KIRBY { - ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 8.0, Some(0.0), Some(5.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 5.0, 25.0, Some(0.0), Some(5.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 17.0, Some(0.0), Some(5.0), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 5.0, 23.5, Some(0.0), Some(5.0), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 6.5, 8.0, Some(0.0), Some(10.0), Some(20.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 2.5, 0.0, 11.5, 25.0, Some(0.0), Some(12.0), Some(27.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 9.0, 17.0, Some(0.0), Some(10.5), Some(22.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 23.0, 361, 90, 0, 45, 0.7, 0.0, 11.0, 23.5, Some(0.0), Some(12.5), Some(28.9), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 50, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_HEAD, false, Hash40::new("collision_attr_marth_shield_breaker"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 9.0); @@ -363,10 +159,9 @@ unsafe extern "C" fn lucina_special_air_n_end_max_game(agent: &mut L2CAgentBase) if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_special_air_n_end_max_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnendmaxlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -397,10 +192,9 @@ unsafe extern "C" fn lucina_special_air_n_end_max_lw_game(agent: &mut L2CAgentBa if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_special_s1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -425,10 +219,9 @@ unsafe extern "C" fn lucina_special_s1_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn lucina_special_s1_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -453,170 +246,51 @@ unsafe extern "C" fn lucina_special_s1_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_air_s1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 35, 0, 40, 6.5, 0.0, 9.0, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - frame(lua_state, 12.0); + frame(lua_state, 8.0); if is_excute(agent) { AttackModule::clear_all(boma); } - frame(lua_state, 13.0); + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); if is_excute(agent) { - FT_MOTION_RATE(agent, 15.0/(30.0-13.0)); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - frame(lua_state, 30.0); + frame(lua_state, 32.0); if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } -unsafe extern "C" fn lucina_special_air_s1_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 9.0); + frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_1"), Hash40::new("top"), 0, -1.5, -6.1, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_s2_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s2_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_s2_hi_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); - } -} - -unsafe extern "C" fn lucina_special_air_s2_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s2_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } @@ -624,10 +298,9 @@ unsafe extern "C" fn lucina_special_air_s2_hi_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_air_s2_hi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -636,7 +309,7 @@ unsafe extern "C" fn lucina_special_air_s2_hi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_s2_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -647,297 +320,41 @@ unsafe extern "C" fn lucina_special_s2_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s2_lw_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_s2_lw_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); - } -} - -unsafe extern "C" fn lucina_special_air_s2_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s2_lw_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_air_s2_lw_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); - } -} - -unsafe extern "C" fn lucina_special_s3_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_s3_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_s3_hi_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); - } -} - -unsafe extern "C" fn lucina_special_air_s3_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn lucina_special_air_s3_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_air_s3_hi_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); - } -} - -unsafe extern "C" fn lucina_special_s3_s_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - frame(lua_state, 7.0); + frame(lua_state, 8.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - frame(lua_state, 24.0); + frame(lua_state, 32.0); if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } } -unsafe extern "C" fn lucina_special_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { FLASH(agent, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 6.0); + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } @@ -945,38 +362,33 @@ unsafe extern "C" fn lucina_special_s3_s_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_s3_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); - } frame(lua_state, 4.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); + PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); } } -unsafe extern "C" fn lucina_special_air_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - frame(lua_state, 4.0); + frame(lua_state, 5.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - frame(lua_state, 7.0); + frame(lua_state, 8.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); + FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } @@ -986,59 +398,62 @@ unsafe extern "C" fn lucina_special_air_s3_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + FLASH(agent, 0, 0.24, 1, 0.7); } frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 6.0); + frame(lua_state, 7.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); } frame(lua_state, 15.0); if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_air_s3_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 3.0); + frame(lua_state, 4.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); + PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); } - frame(lua_state, 4.0); + frame(lua_state, 5.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); + PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); } } -unsafe extern "C" fn lucina_special_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - frame(lua_state, 5.0); + frame(lua_state, 4.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - frame(lua_state, 8.0); + frame(lua_state, 7.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); + FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } @@ -1048,48 +463,44 @@ unsafe extern "C" fn lucina_special_s3_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); EffectModule::set_disable_render_offset_last(boma); } - frame(lua_state, 7.0); + frame(lua_state, 6.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); } frame(lua_state, 15.0); if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_s3_lw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 4.0); + frame(lua_state, 3.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); + PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); } - frame(lua_state, 5.0); + frame(lua_state, 4.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); + PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); } } -unsafe extern "C" fn lucina_special_air_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -1113,7 +524,7 @@ unsafe extern "C" fn lucina_special_air_s3_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -1138,10 +549,9 @@ unsafe extern "C" fn lucina_special_air_s3_lw_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_air_s3_lw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -1154,53 +564,7 @@ unsafe extern "C" fn lucina_special_air_s3_lw_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_s4_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - -} - -unsafe extern "C" fn lucina_special_air_s4_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); @@ -1218,7 +582,7 @@ unsafe extern "C" fn lucina_special_air_s4_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_s4_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -1243,54 +607,9 @@ unsafe extern "C" fn lucina_special_air_s4_hi_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - -} - -unsafe extern "C" fn lucina_special_s4_s_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_s_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - } -unsafe extern "C" fn lucina_special_air_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); @@ -1306,7 +625,7 @@ unsafe extern "C" fn lucina_special_air_s4_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_s4_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -1331,93 +650,9 @@ unsafe extern "C" fn lucina_special_air_s4_s_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - -} - -unsafe extern "C" fn lucina_special_s4_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - for _ in 0..4 { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn lucina_special_s4_lw_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 13.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 19.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(agent); - } - } -unsafe extern "C" fn lucina_special_air_s4_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); @@ -1447,7 +682,7 @@ unsafe extern "C" fn lucina_special_air_s4_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_s4_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -1497,10 +732,9 @@ unsafe extern "C" fn lucina_special_air_s4_lw_effect(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); COL_NORMAL(agent); } - } -unsafe extern "C" fn lucina_special_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -1535,10 +769,9 @@ unsafe extern "C" fn lucina_special_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } - } -unsafe extern "C" fn lucina_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -1575,7 +808,7 @@ unsafe extern "C" fn lucina_special_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -1599,7 +832,7 @@ unsafe extern "C" fn lucina_special_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_special_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -1622,69 +855,73 @@ unsafe extern "C" fn lucina_special_air_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_specialnendhi", lucina_special_n_end_hi_game) - .acmd("game_specialnend", lucina_special_n_end_game) - .acmd("game_specialnendlw", lucina_special_n_end_lw_game) - .acmd("game_specialnendmaxhi", lucina_special_n_end_max_hi_game) - .acmd("game_specialnendmax", lucina_special_n_end_max_game) - .acmd("game_specialnendmaxlw", lucina_special_n_end_max_lw_game) - .acmd("game_specialairnendhi", lucina_special_air_n_end_hi_game) - .acmd("game_specialairnend", lucina_special_air_n_end_game) - .acmd("game_specialairnendlw", lucina_special_air_n_end_lw_game) - .acmd("game_specialairnendmaxhi", lucina_special_air_n_end_max_hi_game) - .acmd("game_specialairnendmax", lucina_special_air_n_end_max_game) - .acmd("game_specialairnendmaxlw", lucina_special_air_n_end_max_lw_game) - .acmd("game_specials1", lucina_special_s1_game) - .acmd("effect_specials1", lucina_special_s1_effect) - .acmd("game_specialairs1", lucina_special_air_s1_game) - .acmd("effect_specialairs1", lucina_special_air_s1_effect) - .acmd("game_specials2hi", lucina_special_s2_hi_game) - .acmd("effect_specials2hi", lucina_special_s2_hi_effect) - .acmd("sound_specials2hi", lucina_special_s2_hi_sound) - .acmd("game_specialairs2hi", lucina_special_air_s2_hi_game) - .acmd("effect_specialairs2hi", lucina_special_air_s2_hi_effect) - .acmd("sound_specialairs2hi", lucina_special_air_s2_hi_sound) - .acmd("game_specials2lw", lucina_special_s2_lw_game) - .acmd("effect_specials2lw", lucina_special_s2_lw_effect) - .acmd("sound_specials2lw", lucina_special_s2_lw_sound) - .acmd("game_specialairs2lw", lucina_special_air_s2_lw_game) - .acmd("effect_specialairs2lw", lucina_special_air_s2_lw_effect) - .acmd("sound_specialairs2lw", lucina_special_air_s2_lw_sound) - .acmd("game_specials3hi", lucina_special_s3_hi_game) - .acmd("effect_specials3hi", lucina_special_s3_hi_effect) - .acmd("sound_specials3hi", lucina_special_s3_hi_sound) - .acmd("game_specialairs3hi", lucina_special_air_s3_hi_game) - .acmd("effect_specialairs3hi", lucina_special_air_s3_hi_effect) - .acmd("sound_specialairs3hi", lucina_special_air_s3_hi_sound) - .acmd("game_specials3s", lucina_special_s3_s_game) - .acmd("effect_specials3s", lucina_special_s3_s_effect) - .acmd("sound_specials3s", lucina_special_s3_s_sound) - .acmd("game_specialairs3s", lucina_special_air_s3_s_game) - .acmd("effect_specialairs3s", lucina_special_air_s3_s_effect) - .acmd("sound_specialairs3s", lucina_special_air_s3_s_sound) - .acmd("game_specials3lw", lucina_special_s3_lw_game) - .acmd("effect_specials3lw", lucina_special_s3_lw_effect) - .acmd("sound_specials3lw", lucina_special_s3_lw_sound) - .acmd("game_specialairs3lw", lucina_special_air_s3_lw_game) - .acmd("effect_specialairs3lw", lucina_special_air_s3_lw_effect) - .acmd("sound_specialairs3lw", lucina_special_air_s3_lw_sound) - .acmd("game_specials4hi", lucina_special_s4_hi_game) - .acmd("effect_specials4hi", lucina_special_s4_hi_effect) - .acmd("game_specialairs4hi", lucina_special_air_s4_hi_game) - .acmd("effect_specialairs4hi", lucina_special_air_s4_hi_effect) - .acmd("game_specials4s", lucina_special_s4_s_game) - .acmd("effect_specials4s", lucina_special_s4_s_effect) - .acmd("game_specialairs4s", lucina_special_air_s4_s_game) - .acmd("effect_specialairs4s", lucina_special_air_s4_s_effect) - .acmd("game_specials4lw", lucina_special_s4_lw_game) - .acmd("effect_specials4lw", lucina_special_s4_lw_effect) - .acmd("game_specialairs4lw", lucina_special_air_s4_lw_game) - .acmd("effect_specialairs4lw", lucina_special_air_s4_lw_effect) - .acmd("game_specialhi", lucina_special_hi_game) - .acmd("game_specialairhi", lucina_special_air_hi_game) - .acmd("game_speciallw", lucina_special_lw_game) - .acmd("game_specialairlw", lucina_special_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("game_specialairnend", game_specialnend); + agent.acmd("game_specialnendhi", game_specialnendhi); + agent.acmd("game_specialairnendhi", game_specialnendhi); + agent.acmd("game_specialnendlw", game_specialnendlw); + agent.acmd("game_specialairnendlw", game_specialnendlw); + agent.acmd("game_specialnendmax", game_specialnendmax); + agent.acmd("game_specialairnendmax", game_specialnendmax); + agent.acmd("game_specialnendmaxhi", game_specialnendmaxhi); + agent.acmd("game_specialairnendmaxhi", game_specialnendmaxhi); + agent.acmd("game_specialnendmaxlw", game_specialnendmaxlw); + agent.acmd("game_specialairnendmaxlw", game_specialnendmaxlw); + + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); + + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); + + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/throws.rs b/fighters/lucina/src/acmd/throws.rs index 077814e04c..1a9ee21a13 100644 --- a/fighters/lucina/src/acmd/throws.rs +++ b/fighters/lucina/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn lucina_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -22,10 +21,9 @@ unsafe extern "C" fn lucina_catch_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } -unsafe extern "C" fn lucina_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -45,7 +43,7 @@ unsafe extern "C" fn lucina_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucina_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -65,10 +63,8 @@ unsafe extern "C" fn lucina_catch_turn_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_catch", lucina_catch_game) - .acmd("game_catchdash", lucina_catch_dash_game) - .acmd("game_catchturn", lucina_catch_turn_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/tilts.rs b/fighters/lucina/src/acmd/tilts.rs index ef13e4b0ce..785e84dc93 100644 --- a/fighters/lucina/src/acmd/tilts.rs +++ b/fighters/lucina/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn lucina_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -15,10 +14,9 @@ unsafe extern "C" fn lucina_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -39,10 +37,9 @@ unsafe extern "C" fn lucina_attack_hi3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn lucina_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -56,13 +53,12 @@ unsafe extern "C" fn lucina_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("lucina") - .acmd("game_attacks3", lucina_attack_s3_s_game) - .acmd("game_attackhi3", lucina_attack_hi3_game) - .acmd("game_attacklw3", lucina_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/lucina/src/lib.rs b/fighters/lucina/src/lib.rs index 5537dac979..a03316205e 100644 --- a/fighters/lucina/src/lib.rs +++ b/fighters/lucina/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,9 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucina"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/lucina/src/opff.rs b/fighters/lucina/src/opff.rs index 99358524bb..03afd6dd04 100644 --- a/fighters/lucina/src/opff.rs +++ b/fighters/lucina/src/opff.rs @@ -92,6 +92,7 @@ unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); } } + // Up Special Reverse unsafe fn up_special_reverse(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { if StatusModule::is_changing(boma) { @@ -108,6 +109,7 @@ unsafe fn up_special_reverse(boma: &mut BattleObjectModuleAccessor, status_kind: } } } + // lets lucina toggle her mask on/off with down taunt unsafe fn mask_toggle(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { let mask_is_equipped = VarModule::is_flag(boma.object(), vars::lucina::instance::EQUIP_MASK); @@ -211,8 +213,6 @@ pub unsafe fn lucina_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("lucina") - .on_line(Main, lucina_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lucina_frame_wrapper); } diff --git a/fighters/lucina/src/status.rs b/fighters/lucina/src/status.rs index a2f62d0366..eff6fd0f55 100644 --- a/fighters/lucina/src/status.rs +++ b/fighters/lucina/src/status.rs @@ -1,501 +1,13 @@ use super::*; use globals::*; // status script import - -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } +mod appeal; +mod special_s; +mod special_lw; -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { - let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); - let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); - let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); - let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); - let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; - let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; - let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; - - let mut aerial_y_speed = 0.0; - let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; - - // [v] Disable motion energy - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - - let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - // Check for the side B status you're currently in - let current_status_kind = StatusModule::status_kind(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - - // alStack192 = gravity energy - // alStack176 = stop energy - // alStack208 = motion energy - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); - aerial_y_speed = air_spd_y; - } - else{ - aerial_y_speed = 0.0; - } - let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; - let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - } - if [*FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - } - } - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - 0.into() -} - -unsafe extern "C" fn lucina_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - PostureModule::set_stick_lr(fighter.module_accessor, 0.0); - PostureModule::update_rot_y_lr(fighter.module_accessor); - lucina_specials_reset_helper(fighter); - ControlModule::reset_trigger(fighter.module_accessor); - WorkModule::set_int( fighter.module_accessor, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS); - - WorkModule::set_int64(fighter.module_accessor, - hash40("special_s1") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s1") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials_main_loop as *const () as _)) -} - -pub unsafe fn dancing_blade_transition_check(fighter: &mut L2CFighterCommon) { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { - return; - } - if !ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - return; - } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); - } - else { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); - let enable_hi_lw = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("enable_input_hi_lw")); - if enable_hi_lw == 0 { - return; - } - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); - if stick_y > -squat_stick_y { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); - } - else if stick_y < squat_stick_y { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - } - } - } -} - -unsafe extern "C" fn lucina_specials_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - dancing_blade_transition_check(fighter); - if !StatusModule::is_changing(fighter.module_accessor) { - if StatusModule::is_situation_changed(fighter.module_accessor) { - lucina_specials_mot_helper(fighter); - } - } - else { - lucina_specials_mot_helper(fighter); - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 0.into(); - } - } - lucina_specials_status_change_helper(fighter); - 0.into() -} - -unsafe extern "C" fn lucina_specials2_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - lucina_specials_reset_helper(fighter); - ControlModule::reset_trigger(fighter.module_accessor); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS - ); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s2_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s2_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s2_hi") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s2_hi") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s2_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s2_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials_main_loop as *const () as _)) -} - -unsafe extern "C" fn lucina_specials3_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s3_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s3_lw") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s3_hi") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s3_hi") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_s3_s") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND - ); - WorkModule::set_int64( - fighter.module_accessor, - hash40("special_air_s3_s") as i64, - *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR - ); - } - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - fighter.sub_shift_status_main(L2CValue::Ptr(lucina_specials3_main_loop as *const () as _)) -} - -unsafe extern "C" fn lucina_specials3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - if StatusModule::is_situation_changed(fighter.module_accessor) { - lucina_specials_mot_helper(fighter); - } - } - else { - lucina_specials_mot_helper(fighter); - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 0.into(); - } - } - if MotionModule::is_end(fighter.module_accessor) { - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - if sit != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } - 0.into() -} - -unsafe extern "C" fn lucina_specials3_exec_stop(_fighter: &mut L2CFighterCommon) -> L2CValue { - 0.into() -} - -unsafe extern "C" fn lucina_specials_substatus(fighter: &mut L2CFighterCommon, _param_1: L2CValue) -> L2CValue { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { - return 0.into(); - } - if !ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { - return 0.into(); - } - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK) { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); - } - else { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); - let enable_hi_lw = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("enable_input_hi_lw")); - if enable_hi_lw == 0 { - return 0.into(); - } - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); - if stick_y > -squat_stick_y { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); - } - else if stick_y < squat_stick_y { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); - } - } - } - 0.into() -} - -unsafe extern "C" fn lucina_specials_reset_helper(fighter: &mut L2CFighterCommon) { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); -} - -unsafe extern "C" fn lucina_specials_mot_helper(fighter: &mut L2CFighterCommon) { - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - let correct; - let mot; - if sit != *SITUATION_KIND_GROUND { - correct = *GROUND_CORRECT_KIND_AIR; - mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); - } - else { - correct = *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP; - mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); - } - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(correct)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new_raw(mot), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame( - fighter.module_accessor, - Hash40::new_raw(mot), - -1.0, - 1.0, - 0.0, - false, - false - ); - } -} - -unsafe extern "C" fn lucina_specials_status_change_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - if sit != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - return 0.into(); - } - else { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE) { - if !MotionModule::is_end(fighter.module_accessor) { - return 0.into(); - } - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - if sit != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - return 0.into(); - } - let status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS); - fighter.change_status(status.into(), false.into()); - } - 1.into() -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, hash40("special_lw")); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, hash40("special_air_lw")); - special_lw_main_motion_helper(fighter); - fighter.main_shift(special_lw_main_loop) -} - -unsafe extern "C" fn special_lw_main_motion_helper(fighter: &mut L2CFighterCommon) { - let situation = fighter.global_table[globals::SITUATION_KIND].get_i32(); - if situation != *SITUATION_KIND_GROUND { - let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); - } - } - else { - let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION); - sv_kinetic_energy!(reset_energy, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); - } - } - -} - -unsafe extern "C" fn special_lw_check_follow_up(fighter: &mut L2CFighterCommon) { - let stick_y = fighter.global_table[globals::STICK_Y].get_f32(); - let mot; - let mot_air; - if stick_y >= 0.5 { - mot = hash40("special_s4_hi"); - mot_air = hash40("special_air_s4_hi"); - } - else if stick_y <= -0.5 { - mot = hash40("special_s4_lw"); - mot_air = hash40("special_air_s4_lw") - } - else { - mot = hash40("special_s4_s"); - mot_air = hash40("special_air_s4_s") - } - let stick_x = fighter.global_table[globals::STICK_X].get_f32(); - let lr = PostureModule::lr(fighter.module_accessor); - if stick_x * lr < -0.33 { - PostureModule::reverse_lr(fighter.module_accessor); - PostureModule::update_rot_y_lr(fighter.module_accessor); - } - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, mot); - VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, mot_air); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); - special_lw_main_motion_helper(fighter); -} - -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 1.into(); - } - } - - if !StatusModule::is_changing(fighter.module_accessor) { - if VarModule::is_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) - && fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 { - special_lw_check_follow_up(fighter); - VarModule::off_flag(fighter.battle_object,vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); - } - if StatusModule::is_situation_changed(fighter.module_accessor) { - special_lw_main_motion_helper(fighter); - } - } - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - } - 0.into() -} - -// stub out mask removal at the end of taunt - -unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { - 1.into() -} - -pub fn install() { - smashline::Agent::new("lucina") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, lucina_specials_main) - .status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, lucina_specials2_main) - .status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, lucina_specials3_main) - .status(ExecStop, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, lucina_specials3_exec_stop) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main) - .status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end) - .install(); +pub fn install(agent: &mut Agent) { + appeal::install(agent); + special_s::install(agent); + special_lw::install(agent); } \ No newline at end of file diff --git a/fighters/lucina/src/status/appeal.rs b/fighters/lucina/src/status/appeal.rs new file mode 100644 index 0000000000..bf66bd4a0d --- /dev/null +++ b/fighters/lucina/src/status/appeal.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_APPEAL + +// stub out mask removal at the end of taunt +unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { + 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end); +} \ No newline at end of file diff --git a/fighters/lucina/src/status/special_lw.rs b/fighters/lucina/src/status/special_lw.rs new file mode 100644 index 0000000000..a6e4667da0 --- /dev/null +++ b/fighters/lucina/src/status/special_lw.rs @@ -0,0 +1,101 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, hash40("special_lw")); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, hash40("special_air_lw")); + special_lw_main_motion_helper(fighter); + fighter.main_shift(special_lw_main_loop) +} + +unsafe extern "C" fn special_lw_main_motion_helper(fighter: &mut L2CFighterCommon) { + let situation = fighter.global_table[globals::SITUATION_KIND].get_i32(); + if situation != *SITUATION_KIND_GROUND { + let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); + } + } + else { + let mot = VarModule::get_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION); + sv_kinetic_energy!(reset_energy, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new_raw(mot), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); + } + } + +} + +unsafe extern "C" fn special_lw_check_follow_up(fighter: &mut L2CFighterCommon) { + let stick_y = fighter.global_table[globals::STICK_Y].get_f32(); + let mot; + let mot_air; + if stick_y >= 0.5 { + mot = hash40("special_s4_hi"); + mot_air = hash40("special_air_s4_hi"); + } + else if stick_y <= -0.5 { + mot = hash40("special_s4_lw"); + mot_air = hash40("special_air_s4_lw") + } + else { + mot = hash40("special_s4_s"); + mot_air = hash40("special_air_s4_s") + } + let stick_x = fighter.global_table[globals::STICK_X].get_f32(); + let lr = PostureModule::lr(fighter.module_accessor); + if stick_x * lr < -0.33 { + PostureModule::reverse_lr(fighter.module_accessor); + PostureModule::update_rot_y_lr(fighter.module_accessor); + } + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION, mot); + VarModule::set_int64(fighter.battle_object, vars::lucina::status::SPECIAL_LW_MOTION_AIR, mot_air); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_CONTINUE_MOT); + special_lw_main_motion_helper(fighter); +} + +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 1.into(); + } + } + + if !StatusModule::is_changing(fighter.module_accessor) { + if VarModule::is_flag(fighter.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) + && fighter.global_table[globals::PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER != 0 { + special_lw_check_follow_up(fighter); + VarModule::off_flag(fighter.battle_object,vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); + } + if StatusModule::is_situation_changed(fighter.module_accessor) { + special_lw_main_motion_helper(fighter); + } + } + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[globals::SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} \ No newline at end of file diff --git a/fighters/lucina/src/status/special_s.rs b/fighters/lucina/src/status/special_s.rs new file mode 100644 index 0000000000..9a4f0d91c3 --- /dev/null +++ b/fighters/lucina/src/status/special_s.rs @@ -0,0 +1,396 @@ +use super::*; + +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } + } + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); + let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); + let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); + let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); + let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; + let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; + let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; + + let mut aerial_y_speed = 0.0; + let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; + + // [v] Disable motion energy + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + + let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + // Check for the side B status you're currently in + let current_status_kind = StatusModule::status_kind(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + + // alStack192 = gravity energy + // alStack176 = stop energy + // alStack208 = motion energy + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + aerial_y_speed = air_spd_y; + } + else{ + aerial_y_speed = 0.0; + } + let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; + let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + } + if [*FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + } + } + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + 0.into() +} + +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + PostureModule::set_stick_lr(fighter.module_accessor, 0.0); + PostureModule::update_rot_y_lr(fighter.module_accessor); + lucina_specials_reset_helper(fighter); + ControlModule::reset_trigger(fighter.module_accessor); + WorkModule::set_int( fighter.module_accessor, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS); + + WorkModule::set_int64(fighter.module_accessor, + hash40("special_s1") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s1") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) +} + +pub unsafe fn dancing_blade_transition_check(fighter: &mut L2CFighterCommon) { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { + return; + } + if !ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + return; + } + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK) { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); + } + else { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); + let enable_hi_lw = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("enable_input_hi_lw")); + if enable_hi_lw == 0 { + return; + } + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); + if stick_y > -squat_stick_y { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); + } + else if stick_y < squat_stick_y { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); + } + } + } +} + +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + dancing_blade_transition_check(fighter); + if !StatusModule::is_changing(fighter.module_accessor) { + if StatusModule::is_situation_changed(fighter.module_accessor) { + lucina_specials_mot_helper(fighter); + } + } + else { + lucina_specials_mot_helper(fighter); + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 0.into(); + } + } + lucina_specials_status_change_helper(fighter); + 0.into() +} + +unsafe extern "C" fn special_s2_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + lucina_specials_reset_helper(fighter); + ControlModule::reset_trigger(fighter.module_accessor); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS + ); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s2_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s2_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s2_hi") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s2_hi") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s2_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s2_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s3_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s3_lw") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s3_hi") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s3_hi") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_s3_s") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND + ); + WorkModule::set_int64( + fighter.module_accessor, + hash40("special_air_s3_s") as i64, + *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR + ); + } + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s3_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + if StatusModule::is_situation_changed(fighter.module_accessor) { + lucina_specials_mot_helper(fighter); + } + } + else { + lucina_specials_mot_helper(fighter); + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 0.into(); + } + } + if MotionModule::is_end(fighter.module_accessor) { + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + if sit != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } + 0.into() +} + +unsafe extern "C" fn special_s3_execstop(_fighter: &mut L2CFighterCommon) -> L2CValue { + 0.into() +} + +unsafe extern "C" fn lucina_specials_substatus(fighter: &mut L2CFighterCommon, _param_1: L2CValue) -> L2CValue { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { + return 0.into(); + } + if !ControlModule::check_button_trigger(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + return 0.into(); + } + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK) { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); + } + else { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); + let enable_hi_lw = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("enable_input_hi_lw")); + if enable_hi_lw == 0 { + return 0.into(); + } + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let squat_stick_y = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("squat_stick_y")); + if stick_y > -squat_stick_y { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_HI); + } + else if stick_y < squat_stick_y { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_LW); + } + } + } + 0.into() +} + +unsafe extern "C" fn lucina_specials_reset_helper(fighter: &mut L2CFighterCommon) { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_FAILURE); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); +} + +unsafe extern "C" fn lucina_specials_mot_helper(fighter: &mut L2CFighterCommon) { + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + let correct; + let mot; + if sit != *SITUATION_KIND_GROUND { + correct = *GROUND_CORRECT_KIND_AIR; + mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); + } + else { + correct = *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP; + mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); + } + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(correct)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new_raw(mot), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame( + fighter.module_accessor, + Hash40::new_raw(mot), + -1.0, + 1.0, + 0.0, + false, + false + ); + } +} + +unsafe extern "C" fn lucina_specials_status_change_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_SUCCESS) { + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + if sit != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + return 0.into(); + } + else { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE) { + if !MotionModule::is_end(fighter.module_accessor) { + return 0.into(); + } + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + if sit != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + return 0.into(); + } + let status = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MARTH_STATUS_SPECIAL_S_WORK_INT_CHANGE_STATUS); + fighter.change_status(status.into(), false.into()); + } + 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + + agent.status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S2, special_s2_main); + + agent.status(Main, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, special_s3_main); + agent.status(ExecStop, *FIGHTER_MARTH_STATUS_KIND_SPECIAL_S3, special_s3_execstop); +} \ No newline at end of file From 09eeefc546998e71cbf5e99531cd52298f71b6d2 Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 14:09:57 -0500 Subject: [PATCH 133/172] pyra --- fighters/eflame/src/acmd/aerials.rs | 35 +- fighters/eflame/src/acmd/ground.rs | 18 +- fighters/eflame/src/acmd/mod.rs | 16 +- fighters/eflame/src/acmd/other.rs | 1462 +----------------------- fighters/eflame/src/acmd/smashes.rs | 13 +- fighters/eflame/src/acmd/specials.rs | 52 +- fighters/eflame/src/acmd/throws.rs | 21 +- fighters/eflame/src/acmd/tilts.rs | 22 +- fighters/eflame/src/esword/acmd.rs | 1434 +++++++++++++++++++++++ fighters/eflame/src/esword/mod.rs | 9 + fighters/eflame/src/firepillar/acmd.rs | 43 + fighters/eflame/src/firepillar/mod.rs | 9 + fighters/eflame/src/lib.rs | 20 +- fighters/eflame/src/opff.rs | 7 +- fighters/eflame/src/status.rs | 23 +- 15 files changed, 1594 insertions(+), 1590 deletions(-) create mode 100644 fighters/eflame/src/esword/acmd.rs create mode 100644 fighters/eflame/src/esword/mod.rs create mode 100644 fighters/eflame/src/firepillar/acmd.rs create mode 100644 fighters/eflame/src/firepillar/mod.rs diff --git a/fighters/eflame/src/acmd/aerials.rs b/fighters/eflame/src/acmd/aerials.rs index 3dd7c2ee70..4097c85c0f 100644 --- a/fighters/eflame/src/acmd/aerials.rs +++ b/fighters/eflame/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn eflame_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -59,10 +58,9 @@ unsafe extern "C" fn eflame_attack_air_n_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn eflame_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -112,11 +110,9 @@ unsafe extern "C" fn eflame_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - - } -unsafe extern "C" fn eflame_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -166,10 +162,9 @@ unsafe extern "C" fn eflame_attack_air_b_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn eflame_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -227,10 +222,9 @@ unsafe extern "C" fn eflame_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn eflame_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -296,15 +290,16 @@ unsafe extern "C" fn eflame_attack_air_lw_game(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); FT_MOTION_RATE(agent, 0.7); } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attackairn", eflame_attack_air_n_game) - .acmd("game_attackairf", eflame_attack_air_f_game) - .acmd("game_attackairb", eflame_attack_air_b_game) - .acmd("game_attackairhi", eflame_attack_air_hi_game) - .acmd("game_attackairlw", eflame_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/eflame/src/acmd/ground.rs b/fighters/eflame/src/acmd/ground.rs index b3ec516c59..fcf002ab13 100644 --- a/fighters/eflame/src/acmd/ground.rs +++ b/fighters/eflame/src/acmd/ground.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn eflame_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -18,7 +18,7 @@ unsafe extern "C" fn eflame_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -70,7 +70,7 @@ unsafe extern "C" fn eflame_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -108,13 +108,11 @@ unsafe extern "C" fn eflame_attack_dash_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attack11", eflame_attack_11_game) - .acmd("game_attack12", eflame_attack_12_game) - .acmd("game_attackdash", eflame_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/eflame/src/acmd/mod.rs b/fighters/eflame/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/eflame/src/acmd/mod.rs +++ b/fighters/eflame/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/eflame/src/acmd/other.rs b/fighters/eflame/src/acmd/other.rs index 7f989b51c2..1ae50ca3b6 100644 --- a/fighters/eflame/src/acmd/other.rs +++ b/fighters/eflame/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -55,11 +54,10 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -70,10 +68,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -84,1444 +81,15 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn esword_game_flyflickl(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.3); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyflickr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.3); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyl(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.45); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_flyr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.45); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 6, true, false); - } - frame(lua_state, 28.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_reflectedl(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.5); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_reflectedr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.5); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - AttackModule::set_no_finish_camera(boma, 0, true, false); - AttackModule::set_no_finish_camera(boma, 1, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - AttackModule::clear(boma, 0, false); - } - frame(lua_state, 22.0); - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); - AttackModule::set_damage_shake_scale(boma, 0.5); - } -} - -unsafe extern "C" fn esword_game_rotate(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - } - frame(lua_state, 0.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.2); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - // AttackModule::set_add_reaction_frame(boma, 1, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 2, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 3, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 4, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 5, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 6, 25.0, false); - // AttackModule::set_add_reaction_frame(boma, 0, 25.0, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 25.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 33.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 40.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *WEAPON_EFLAME_ESWORD_STATUS_SPECIAL_S_FLAG_FINISH); - } - frame(lua_state, 55.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 60.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 0.5); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); -pub fn install() { - smashline::Agent::new("eflame_esword") - .acmd("game_flyflickl", esword_game_flyflickl) - .acmd("game_flyflickr", esword_game_flyflickr) - .acmd("game_flyl", esword_game_flyl) - .acmd("game_flyr", esword_game_flyr) - .acmd("game_reflectedl", esword_game_reflectedl) - .acmd("game_reflectedr", esword_game_reflectedr) - .acmd("game_rotate", esword_game_rotate) - .install(); - smashline::Agent::new("eflame") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/eflame/src/acmd/smashes.rs b/fighters/eflame/src/acmd/smashes.rs index 76251b1d58..f9267c7877 100644 --- a/fighters/eflame/src/acmd/smashes.rs +++ b/fighters/eflame/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn eflame_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -15,13 +14,10 @@ unsafe extern "C" fn eflame_attack_s4_game(agent: &mut L2CAgentBase) { } WorkModule::set_int64(boma, hash40("attack_s4_hold") as i64, *FIGHTER_EFLAME_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } - frame(lua_state, 10.0); FT_MOTION_RATE(agent, 2.0); - frame(lua_state, 12.0); FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 18.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("haver"), 17.0, 361, 76, 0, 70, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); @@ -75,11 +71,8 @@ unsafe extern "C" fn eflame_attack_s4_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attacks4", eflame_attack_s4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); } diff --git a/fighters/eflame/src/acmd/specials.rs b/fighters/eflame/src/acmd/specials.rs index 10cbbd994b..27acb3251b 100644 --- a/fighters/eflame/src/acmd/specials.rs +++ b/fighters/eflame/src/acmd/specials.rs @@ -111,52 +111,10 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn eflame_firepillar_special_hi_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 12.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 13.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn eflame_firepillar_special_hi_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); - EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.4); - EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.4); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairhijump", game_specialairhijump); + agent.acmd("game_specialairhifall", game_specialairhifall); -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_specialairhijump", game_specialairhijump) - .acmd("game_specialairhifall", game_specialairhifall) - .acmd("game_speciallw", game_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .install(); - smashline::Agent::new("eflame_firepillar") - .acmd("game_specialhi", eflame_firepillar_special_hi_game) - .acmd("effect_specialhi", eflame_firepillar_special_hi_effect) - .install(); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/eflame/src/acmd/throws.rs b/fighters/eflame/src/acmd/throws.rs index e85a21758d..7be248aa61 100644 --- a/fighters/eflame/src/acmd/throws.rs +++ b/fighters/eflame/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern fn eflame_catch_game(agent: &mut L2CAgentBase) { +unsafe extern fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -24,7 +24,7 @@ unsafe extern fn eflame_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn eflame_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -64,7 +64,7 @@ unsafe extern "C" fn eflame_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn eflame_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -110,11 +110,10 @@ unsafe extern "C" fn eflame_throw_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_catch", eflame_catch_game) - .acmd("game_catchdash", eflame_catch_dash_game) - .acmd("game_catchturn", eflame_catch_turn_game) - .acmd("game_throwlw", eflame_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/eflame/src/acmd/tilts.rs b/fighters/eflame/src/acmd/tilts.rs index 2bf44a64a9..e75451ee2b 100644 --- a/fighters/eflame/src/acmd/tilts.rs +++ b/fighters/eflame/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn eflame_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -42,10 +41,9 @@ unsafe extern "C" fn eflame_attack_s3_s_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -unsafe extern "C" fn eflame_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -86,10 +84,9 @@ unsafe extern "C" fn eflame_attack_hi3_game(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_EFLAME_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } -unsafe extern "C" fn eflame_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -148,13 +145,12 @@ unsafe extern "C" fn eflame_attack_lw3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } -pub fn install() { - smashline::Agent::new("eflame") - .acmd("game_attacks3", eflame_attack_s3_s_game) - .acmd("game_attackhi3", eflame_attack_hi3_game) - .acmd("game_attacklw3", eflame_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/eflame/src/esword/acmd.rs b/fighters/eflame/src/esword/acmd.rs new file mode 100644 index 0000000000..c12e9e8131 --- /dev/null +++ b/fighters/eflame/src/esword/acmd.rs @@ -0,0 +1,1434 @@ +use super::*; + +unsafe extern "C" fn game_flyflickl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.3); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyflickr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.3); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 40, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 55, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 60, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 50, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 7, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 40, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 65, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.45); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_flyr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.45); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -3.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 35, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 45, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 45, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 20, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 25, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 70, 100, 10, 40, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 4, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 30, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 75, 100, 10, 30, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + ATTACK(agent, 6, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 6, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 6, true, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_reflectedl(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_reflectedr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 75, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 45, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 50, 100, 10, 65, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 70, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 55, 100, 10, 60, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 0, 100, 10, 65, 2.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(2.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.5, 60, 100, 10, 50, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 3, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 40.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 20.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + AttackModule::clear(boma, 0, false); + } + frame(lua_state, 22.0); + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 55, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 50, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 50, 100, 10, 30, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, true, -1, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 0, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 1, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 5.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 5.0, false); + AttackModule::set_damage_shake_scale(boma, 0.5); + } +} + +unsafe extern "C" fn game_rotate(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + } + frame(lua_state, 0.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.2); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 0.8, 0, 60, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 0.8, 90, 70, 20, 10, 2.3, 2.5, -2.0, 0.0, Some(2.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 0.8, 120, 70, 20, 5, 1.8, 6.0, -2.0, 0.0, Some(6.0), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("sword1"), 0.8, 190, 60, 20, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 6, 0, Hash40::new("sword1"), 0.8, 120, 70, 30, 10, 1.8, 9.5, -2.0, 0.0, Some(9.5), Some(2.0), Some(0.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 8, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 1, Hash40::new("top"), 1.5, 90, 100, 10, 20, 4.5, 0.0, -1.5, -2.0, Some(0.0), Some(-1.5), Some(5.0), 0.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -3, -1.0, 3, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + // AttackModule::set_add_reaction_frame(boma, 1, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 2, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 3, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 4, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 5, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 6, 25.0, false); + // AttackModule::set_add_reaction_frame(boma, 0, 25.0, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 0.0, 367, 100, 100, 50, 2.5, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, -3, -1.0, 1, false, false, true, true, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 25.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 33.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 7, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 40.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 5.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 9.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 10.0, 65, 100, 0, 35, 3.5, 11.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *WEAPON_EFLAME_ESWORD_STATUS_SPECIAL_S_FLAG_FINISH); + } + frame(lua_state, 55.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 60.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 0.5); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flyflickl", game_flyflickl); + agent.acmd("game_flyflickr", game_flyflickr); + + agent.acmd("game_flyl", game_flyl); + agent.acmd("game_flyr", game_flyr); + + agent.acmd("game_reflectedl", game_reflectedl); + agent.acmd("game_reflectedr", game_reflectedr); + + agent.acmd("game_rotate", game_rotate); +} diff --git a/fighters/eflame/src/esword/mod.rs b/fighters/eflame/src/esword/mod.rs new file mode 100644 index 0000000000..6eae5659b4 --- /dev/null +++ b/fighters/eflame/src/esword/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("eflame_esword"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/eflame/src/firepillar/acmd.rs b/fighters/eflame/src/firepillar/acmd.rs new file mode 100644 index 0000000000..920da3e650 --- /dev/null +++ b/fighters/eflame/src/firepillar/acmd.rs @@ -0,0 +1,43 @@ +use super::*; + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 9.0, 60, 100, 0, 90, 5.0, 0.0, 23.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 8.0, 0.0, 8.0, 1.0, Some(0.0), Some(8.0), Some(-2.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 60, 100, 0, 90, 7.0, 0.0, 15.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 100, 0, 80, 5.0, 0.0, 27.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_ground"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + EFFECT(agent, Hash40::new("eflame_promrevolt_firepillar_impact"), Hash40::new("top"), 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.06, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); +} diff --git a/fighters/eflame/src/firepillar/mod.rs b/fighters/eflame/src/firepillar/mod.rs new file mode 100644 index 0000000000..6865c1f77b --- /dev/null +++ b/fighters/eflame/src/firepillar/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("eflame_firepillar"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/eflame/src/lib.rs b/fighters/eflame/src/lib.rs index ca59b11153..15022ce802 100644 --- a/fighters/eflame/src/lib.rs +++ b/fighters/eflame/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod esword; +mod firepillar; use smash::{ lib::{ @@ -37,11 +42,18 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("eflame"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + esword::install(); + firepillar::install(); + unsafe { // Disables the sword catch animation unless you are completely idle. skyline::patching::Patch::in_text(0xa0caf4).data(0x7100001F); diff --git a/fighters/eflame/src/opff.rs b/fighters/eflame/src/opff.rs index a5959103de..133a6cdbe2 100644 --- a/fighters/eflame/src/opff.rs +++ b/fighters/eflame/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn hit_cancel_blade_switch(boma: &mut BattleObjectModuleAccessor, cat1: i32, status_kind: i32, situation_kind: i32, motion_kind: u64) { if [*FIGHTER_STATUS_KIND_ATTACK_S3, *FIGHTER_STATUS_KIND_ATTACK_HI3, *FIGHTER_STATUS_KIND_ATTACK_LW3, *FIGHTER_STATUS_KIND_ATTACK_AIR, *FIGHTER_STATUS_KIND_ATTACK_DASH, *FIGHTER_STATUS_KIND_ATTACK_S4, *FIGHTER_STATUS_KIND_ATTACK_HI4, *FIGHTER_STATUS_KIND_ATTACK_LW4].contains(&status_kind) || ([*FIGHTER_STATUS_KIND_ATTACK].contains(&status_kind) && motion_kind == hash40("attack_13")){ @@ -64,8 +63,6 @@ pub unsafe fn eflame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("eflame") - .on_line(Main, eflame_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, eflame_frame_wrapper); } diff --git a/fighters/eflame/src/status.rs b/fighters/eflame/src/status.rs index 6c9b613fc4..1007288235 100644 --- a/fighters/eflame/src/status.rs +++ b/fighters/eflame/src/status.rs @@ -27,7 +27,7 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L VarModule::off_flag(fighter.battle_object, vars::eflame::instance::DISABLE_SPECIAL_HI); //Re-enable Mythra UpB - Set_Mythra_Up_Special_Cancel(fighter,false); + set_mythra_up_special_cancel(fighter,false); } if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { @@ -62,8 +62,7 @@ unsafe extern "C" fn reset_mythra_up_special_freefall(fighter: &mut L2CFighterCo } } -unsafe extern "C" fn Set_Mythra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) -{ +unsafe extern "C" fn set_mythra_up_special_cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) { //This first conditional tree is used if the player selects Pyra first if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ let object = crate::util::get_battle_object_from_id(object_id); @@ -99,18 +98,12 @@ unsafe extern "C" fn Set_Mythra_Up_Special_Cancel(fighter: &mut L2CFighterCommon } } -extern "C" fn eflame_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_EFLAME { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - } - } +extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); } -pub fn install() { - smashline::Agent::new("eflame") - .on_start(eflame_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); } From 0e057cb323fe10821783ff69ccf43c5de94e2ea3 Mon Sep 17 00:00:00 2001 From: Askew Date: Tue, 26 Mar 2024 15:13:07 -0400 Subject: [PATCH 134/172] The Cooler Richter --- fighters/simon/src/acmd/aerials.rs | 167 +-------------------- fighters/simon/src/acmd/ground.rs | 158 ++++++++++---------- fighters/simon/src/acmd/mod.rs | 18 +-- fighters/simon/src/acmd/other.rs | 190 +++++++----------------- fighters/simon/src/acmd/smashes.rs | 195 +++++++++---------------- fighters/simon/src/acmd/specials.rs | 76 ++-------- fighters/simon/src/acmd/throws.rs | 138 +++++++++-------- fighters/simon/src/acmd/tilts.rs | 181 ++++++++++------------- fighters/simon/src/axe/acmd.rs | 14 ++ fighters/simon/src/axe/mod.rs | 9 ++ fighters/simon/src/lib.rs | 15 +- fighters/simon/src/opff.rs | 6 +- fighters/simon/src/status/attacklw3.rs | 12 +- fighters/simon/src/status/attacks3.rs | 8 +- fighters/simon/src/status/mod.rs | 6 +- fighters/simon/src/whip/aerials.rs | 94 ++++++++++++ fighters/simon/src/whip/mod.rs | 13 ++ fighters/simon/src/whip/smashes.rs | 51 +++++++ fighters/simon/src/whip/tilts.rs | 26 ++++ 19 files changed, 600 insertions(+), 777 deletions(-) create mode 100644 fighters/simon/src/axe/acmd.rs create mode 100644 fighters/simon/src/axe/mod.rs create mode 100644 fighters/simon/src/whip/aerials.rs create mode 100644 fighters/simon/src/whip/mod.rs create mode 100644 fighters/simon/src/whip/smashes.rs create mode 100644 fighters/simon/src/whip/tilts.rs diff --git a/fighters/simon/src/acmd/aerials.rs b/fighters/simon/src/acmd/aerials.rs index e44fbf2c2e..bdb340503a 100644 --- a/fighters/simon/src/acmd/aerials.rs +++ b/fighters/simon/src/acmd/aerials.rs @@ -37,29 +37,6 @@ unsafe extern "C" fn simon_attack_air_n_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_whip_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 6.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 7.0); - FT_DESIRED_RATE(fighter, 25.0-7.0, 10.0); - frame(lua_state, 25.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 29.0); - FT_DESIRED_RATE(fighter, 43.0-29.0, 19.0); - -} - -unsafe extern "C" fn simon_whip_landing_air_n_game(fighter: &mut L2CAgentBase) { - let boma = fighter.boma(); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -99,27 +76,6 @@ unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - -} - unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -159,27 +115,6 @@ unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - -} - unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -219,27 +154,6 @@ unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 16.0); - FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(fighter, 1.0); - -} - unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -274,23 +188,6 @@ unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -325,23 +222,6 @@ unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -376,23 +256,6 @@ unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 14.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -426,23 +289,6 @@ unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_whip_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 15.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - -} - unsafe extern "C" fn simon_attack_air_lw_game(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -508,18 +354,7 @@ unsafe extern "C" fn simon_attack_air_lw2_game(fighter: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("simon_whip") - .acmd("game_attackairn", simon_whip_attack_air_n_game) - .acmd("game_landingairn", simon_whip_landing_air_n_game) - .acmd("game_attackairfhi", simon_whip_attack_air_f_hi_game) - .acmd("game_attackairf", simon_whip_attack_air_f_game) - .acmd("game_attackairflw", simon_whip_attack_air_f_lw_game) - .acmd("game_attackairbhi", simon_whip_attack_air_b_hi_game) - .acmd("game_attackairb", simon_whip_attack_air_b_game) - .acmd("game_attackairblw", simon_whip_attack_air_b_lw_game) - .acmd("game_attackairhi", simon_whip_attack_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { smashline::Agent::new("simon") .acmd("game_attackairn", simon_attack_air_n_game) .acmd("game_attackairfhi", simon_attack_air_f_hi_game) diff --git a/fighters/simon/src/acmd/ground.rs b/fighters/simon/src/acmd/ground.rs index 3b8e994357..8bc83c0fec 100644 --- a/fighters/simon/src/acmd/ground.rs +++ b/fighters/simon/src/acmd/ground.rs @@ -1,154 +1,152 @@ use super::*; -unsafe extern "C" fn game_attack11(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 5.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 75, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 75, 100, 25, 0, 5.0, 0.0, 8.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); // Jab lock hitbox - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 11.5, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 11.5, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_down_only(boma, 4, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_HOLD); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn game_attack12(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 0.0, 0.0,0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("arml"), 3.0, 80, 100, 25, 0, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 10.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 3.0, 80, 100, 25, 0, 4.0, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); // Jab lock hitbox - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 13.0, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 361, 100, 30, 0, 3.0, 0.0, 3.5, 13.0, Some(0.0), Some(3.5), Some(5.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_down_only(boma, 5, false); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn game_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 10.5, 50, 95, 0, 40, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 50, 95, 0, 40, 7.0, 0.0, 9.0, 7.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 16.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.5, 50, 80, 0, 35, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.5, 50, 80, 0, 35, 5.5, 0.0, 9.0, 7.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_BODY); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn effect_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, -3.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, -3.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); } frame(lua_state, 8.0); - if is_excute(fighter) { - FOOT_EFFECT(fighter, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 1.3); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 1.3); } frame(lua_state, 10.0); - if is_excute(fighter) { - FLASH(fighter, 1.0, 1.0, 1.0, 0.3); + if is_excute(agent) { + FLASH(agent, 1.0, 1.0, 1.0, 0.3); } frame(lua_state, 11.0); - if is_excute(fighter) { - EFFECT_FOLLOW_NO_STOP(fighter, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9.1, 2.4, 0, 180, 0, 1.2, true); - LAST_EFFECT_SET_RATE(fighter, 0.6); - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - COL_NORMAL(fighter); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 9.1, 2.4, 0, 180, 0, 1.2, true); + LAST_EFFECT_SET_RATE(agent, 0.6); + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + COL_NORMAL(agent); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -3.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -3.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 16.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -4.5, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 11.8, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, 11.8, 0, 180, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } } -unsafe extern "C" fn sound_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - PLAY_SEQUENCE(fighter, Hash40::new("seq_simon_rnd_attack")); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_simon_rnd_attack")); } frame(lua_state, 11.0); - if is_excute(fighter) { - PLAY_SE(fighter, Hash40::new("se_common_swing_05")); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_05")); } } -unsafe extern "C" fn expression_attackdash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_rush"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_attack11", game_attack11) - .acmd("game_attack12", game_attack12) - .acmd("game_attackdash", game_attackdash) - .acmd("effect_attackdash", effect_attackdash) - .acmd("sound_attackdash", sound_attackdash) - .acmd("expression_attackdash", expression_attackdash) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/mod.rs b/fighters/simon/src/acmd/mod.rs index 636eb505dd..095a2343a6 100644 --- a/fighters/simon/src/acmd/mod.rs +++ b/fighters/simon/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/other.rs b/fighters/simon/src/acmd/other.rs index 4d695a1e9a..8271d719ca 100644 --- a/fighters/simon/src/acmd/other.rs +++ b/fighters/simon/src/acmd/other.rs @@ -1,197 +1,107 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); - } -} - -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(fighter) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_simon_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_simon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); - PLAY_SE(fighter, Hash40::new("se_simon_whip_chain")); + PLAY_SE(agent, Hash40::new("se_simon_whip_chain")); } } -unsafe extern "C" fn simon_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn simon_axe_fly_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("axe"), 8.0, 100, 60, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 8, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - } - -} - -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("simon_axe") - .acmd("game_fly", simon_axe_fly_game) - .install(); - smashline::Agent::new("simon") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", simon_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/smashes.rs b/fighters/simon/src/acmd/smashes.rs index 64dd4553a7..1a1f00d42a 100644 --- a/fighters/simon/src/acmd/smashes.rs +++ b/fighters/simon/src/acmd/smashes.rs @@ -1,198 +1,147 @@ use super::*; -unsafe extern "C" fn simon_attack_s4_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_s4_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.0, 0.0, 6.5, 17.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 4.5, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 3.0, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 2.0, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 1.0, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.0, 0.0, 6.5, 17.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 4.5, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 3.0, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 2.0, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 1.0, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.2); + FT_MOTION_RATE(agent, 0.2); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - ATTACK(fighter, 5, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 6, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + ATTACK(agent, 5, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, 8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 6, 0, Hash40::new("top"), 3.0, 111, 100, 135, 0, 4.0, 0.0, 4.0, -8.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 18.0, 90, 88, 0, 61, 3.1, 0.0, 52.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 90, 79, 0, 60, 3.1, 0.0, 18.0, 2.0, Some(0.0), Some(52.0), Some(2.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 90, 88, 0, 61, 3.1, 0.0, 52.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 90, 79, 0, 60, 3.1, 0.0, 18.0, 2.0, Some(0.0), Some(52.0), Some(2.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_whip_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(fighter, 0.2); - frame(lua_state, 2.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1); - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 19.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(fighter, 1); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 52.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - -} - -unsafe extern "C" fn simon_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); + FT_MOTION_RATE(agent, 0.8); frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 15.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, 20.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, 30.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, 10.5, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, 20.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, 30.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, -6.2, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, -14.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, -23.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 80, 0, 60, 6.0, 0.0, 4.5, -6.2, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 40, 80, 0, 60, 4.5, 0.0, 3.5, -14.5, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 18.0, 40, 80, 0, 60, 6.0, 0.0, 3.0, -23.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_whip_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 0.8); - frame(lua_state, 13.0); - FT_MOTION_RATE(fighter, 1.0); - -} - -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_attacks4hi", simon_attack_s4_hi_game) - .acmd("game_attacks4", simon_attack_s4_s_game) - .acmd("game_attacks4lw", simon_attack_s4_lw_game) - .acmd("game_attackhi4", simon_attack_hi4_game) - .acmd("game_attacklw4", simon_attack_lw4_game) - .install(); - smashline::Agent::new("simon_whip") - .acmd("game_attackhi4", simon_whip_attack_hi4_game) - .acmd("game_attacklw4", simon_whip_attack_lw4_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/specials.rs b/fighters/simon/src/acmd/specials.rs index 723b4a68ae..a3a10c6176 100644 --- a/fighters/simon/src/acmd/specials.rs +++ b/fighters/simon/src/acmd/specials.rs @@ -1,55 +1,19 @@ - use super::*; -unsafe extern "C" fn simon_special_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); + FT_MOTION_RATE(fighter, 0.8); if is_excute(fighter) { - boma.select_cliff_hangdata_from_name("special_hi"); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - } - frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 7.0); - if is_excute(fighter) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 21.0); - if is_excute(fighter) { - AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 1, Hash40::new("top"), 6.0, 61, 92, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); - } - frame(lua_state, 22.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); } - frame(lua_state, 27.0); - if is_excute(fighter) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + frame(lua_state, 30.0); + if is_excute(fighter){ + ArticleModule::shoot(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); } - } -unsafe extern "C" fn simon_special_air_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -97,24 +61,10 @@ unsafe extern "C" fn simon_special_air_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn simon_special_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); - } - frame(lua_state, 30.0); - if is_excute(fighter){ - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - } -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_specialhi", simon_special_hi_game) - .acmd("game_specialairhi", simon_special_air_hi_game) - .acmd("game_specialn", simon_special_n_game) - .acmd("game_specialairn", simon_special_n_game) - .install(); -} + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/throws.rs b/fighters/simon/src/acmd/throws.rs index 83b771da35..9bfbb5e3f1 100644 --- a/fighters/simon/src/acmd/throws.rs +++ b/fighters/simon/src/acmd/throws.rs @@ -1,33 +1,33 @@ use super::*; -unsafe extern "C" fn simon_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.7); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.7); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 6.0); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 6.6, 0.0, Some(0.0), Some(6.6), Some(8.7), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn simon_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -50,7 +50,7 @@ unsafe extern "C" fn simon_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -73,103 +73,101 @@ unsafe extern "C" fn simon_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_throw_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 93, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 40, 93, 0, 75, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 24, 7); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 24, 7); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn simon_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 44, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 7.0, 44, 40, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 20, 4); + CHECK_FINISH_CAMERA(agent, 20, 4); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 42.0, 21.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + FT_MOTION_RATE_RANGE(agent, 18.0, 42.0, 21.0); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 42.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn simon_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 84, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 88, 84, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 35.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 89, 100, 0, 55, 2.0, 0.0, 23.0, 0.0, Some(0.0), Some(50.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 89, 100, 0, 55, 2.0, 0.0, 23.0, 0.0, Some(0.0), Some(50.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(fighter, 3, 34); + CHECK_FINISH_CAMERA(agent, 3, 34); } frame(lua_state, 36.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 65, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 68, 65, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 23.0); - if is_excute(fighter) { - FT_CATCH_STOP(fighter, 5, 1); - CHECK_FINISH_CAMERA(fighter, 5, 0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + CHECK_FINISH_CAMERA(agent, 5, 0); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -pub fn install() { - smashline::Agent::new("simon") - .acmd("game_catch", simon_catch_game) - .acmd("game_catchdash", simon_catch_dash_game) - .acmd("game_catchturn", simon_catch_turn_game) - .acmd("game_throwf", simon_throw_f_game) - .acmd("game_throwb", simon_throw_b_game) - .acmd("game_throwhi", simon_throw_hi_game) - .acmd("game_throwlw", simon_throw_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/tilts.rs b/fighters/simon/src/acmd/tilts.rs index 46d9691699..b61894156f 100644 --- a/fighters/simon/src/acmd/tilts.rs +++ b/fighters/simon/src/acmd/tilts.rs @@ -1,69 +1,48 @@ use super::*; -unsafe extern "C" fn simon_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 10.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 10.0, 7.0, Some(0.0), Some(10.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 10.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 10.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 10.0, 7.0, Some(0.0), Some(10.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 10.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_HOLD); } } -unsafe extern "C" fn simon_whip_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - frame(lua_state, 1.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(fighter, 0.5); - frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); - frame(lua_state, 11.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 23.0); - if is_excute(fighter) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - -} - -unsafe extern "C" fn simon_attack_squat_s3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacksquats3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 7.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 7.0, 7.0, Some(0.0), Some(7.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 7.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 40, 78, 0, 65, 2.6, 0.0, 7.0, 36.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 361, 70, 0, 55, 2.6, 0.0, 7.0, 7.0, Some(0.0), Some(7.0), Some(36.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 361, 70, 0, 55, 4.6, 0.0, 7.0, 7.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_squat_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -76,7 +55,7 @@ unsafe extern "C" fn simon_attack_squat_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_squat_s3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -92,7 +71,7 @@ unsafe extern "C" fn simon_attack_squat_s3_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_squat_s3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacksquats3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -108,112 +87,110 @@ unsafe extern "C" fn simon_attack_squat_s3_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn simon_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, 3.5, Some(0.0), Some(26.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 3.5, 0.0, 17.5, 3.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(fighter, 2, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 5.0, 0.0, 10.5, 2.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, 3.5, Some(0.0), Some(26.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 3.5, 0.0, 17.5, 3.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.5, 93, 70, 0, 80, 5.0, 0.0, 10.5, 2.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.5, 93, 75, 0, 60, 4.5, 0.0, 26.0, -4.0, Some(0.0), Some(26.0), Some(9.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); AttackModule::clear(boma, 2, false); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn simon_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_attackm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn simon_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 7.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 6.0, 40, 20, 0, 65, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 6.0, 40, 20, 0, 55, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 6.0, 40, 20, 0, 65, 3.0, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 6.0, 40, 20, 0, 55, 3.0, 0.0, 0.0, -1.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 28.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } -unsafe extern "C" fn simon_attack_lw32_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { JostleModule::set_status(boma, false); WorkModule::on_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_LW32_WORK_ID_FLAG_LANDING_AIR); } frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 7.0, 60, 100, 0, 50, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 7.0, 60, 100, 0, 50, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 7.0, 60, 100, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 7.0, 60, 100, 0, 50, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 7.0, 60, 100, 0, 50, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 7.0, 60, 100, 0, 50, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 20.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("kneel"), 4.0, 50, 50, 0, 60, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 1, 0, Hash40::new("footl"), 4.0, 50, 50, 0, 60, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(fighter, 2, 0, Hash40::new("hip"), 4.0, 50, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 4.0, 50, 50, 0, 60, 3.5, 0.0, 1.0, -1.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 4.0, 50, 50, 0, 60, 3.0, 0.0, 1.5, -2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 4.0, 50, 50, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } } -pub fn install() { - smashline::Agent::new("simon_whip") - .acmd("game_attacks3", simon_whip_attack_s3_s_game) - .install(); - smashline::Agent::new("simon") - .acmd("game_attacks3", simon_attack_s3_s_game) - .acmd("game_attacksquats3", simon_attack_squat_s3_game) - .acmd("effect_attacksquats3", simon_attack_squat_s3_effect) - .acmd("sound_attacksquats3", simon_attack_squat_s3_sound) - .acmd("expression_attacksquats3", simon_attack_squat_s3_expression) - .acmd("game_attackhi3", simon_attack_hi3_game) - .acmd("expression_attackhi3", simon_attack_hi3_expression) - .acmd("game_attacklw3", simon_attack_lw3_game) - .acmd("game_attacklw32", simon_attack_lw32_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attacksquats3", game_attacksquats3); + agent.acmd("effect_attacksquats3", effect_attacksquats3); + agent.acmd("sound_attacksquats3", sound_attacksquats3); + agent.acmd("expression_attacksquats3", expression_attacksquats3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attacklw32", game_attacklw32); +} \ No newline at end of file diff --git a/fighters/simon/src/axe/acmd.rs b/fighters/simon/src/axe/acmd.rs new file mode 100644 index 0000000000..42f4dc9e03 --- /dev/null +++ b/fighters/simon/src/axe/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("axe"), 8.0, 100, 60, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 8, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} \ No newline at end of file diff --git a/fighters/simon/src/axe/mod.rs b/fighters/simon/src/axe/mod.rs new file mode 100644 index 0000000000..d2afe262ac --- /dev/null +++ b/fighters/simon/src/axe/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("simon_axe"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/simon/src/lib.rs b/fighters/simon/src/lib.rs index 7bb0378152..e2b6d4b857 100644 --- a/fighters/simon/src/lib.rs +++ b/fighters/simon/src/lib.rs @@ -7,6 +7,10 @@ pub mod acmd; pub mod status; pub mod opff; +// articles +mod axe; +mod whip; + use smash::{ lib::{ L2CValue, @@ -39,7 +43,12 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("simon"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + axe::install(); + whip::install(); } diff --git a/fighters/simon/src/opff.rs b/fighters/simon/src/opff.rs index cfe6066a9b..6568c1fa88 100644 --- a/fighters/simon/src/opff.rs +++ b/fighters/simon/src/opff.rs @@ -125,8 +125,6 @@ pub unsafe fn simon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("simon") - .on_line(Main, simon_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, simon_frame_wrapper); } diff --git a/fighters/simon/src/status/attacklw3.rs b/fighters/simon/src/status/attacklw3.rs index 69bd488b51..7f9347a89d 100644 --- a/fighters/simon/src/status/attacklw3.rs +++ b/fighters/simon/src/status/attacklw3.rs @@ -37,12 +37,6 @@ unsafe extern "C" fn attack_lw32_landing_main_loop(fighter: &mut L2CFighterCommo 0.into() } -pub fn install() { - smashline::Agent::new("simon") - .status( - Main, - *FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING, - attack_lw32_landing_main, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING, attack_lw32_landing_main); +} \ No newline at end of file diff --git a/fighters/simon/src/status/attacks3.rs b/fighters/simon/src/status/attacks3.rs index d4b6291b6a..13b97d88ca 100644 --- a/fighters/simon/src/status/attacks3.rs +++ b/fighters/simon/src/status/attacks3.rs @@ -53,8 +53,6 @@ unsafe extern "C" fn attack_s3_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub fn install() { - smashline::Agent::new("simon") - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); +} \ No newline at end of file diff --git a/fighters/simon/src/status/mod.rs b/fighters/simon/src/status/mod.rs index edbba49031..3a820d1153 100644 --- a/fighters/simon/src/status/mod.rs +++ b/fighters/simon/src/status/mod.rs @@ -3,7 +3,7 @@ use super::*; mod attacklw3; mod attacks3; -pub fn install() { - attacklw3::install(); - attacks3::install(); +pub fn install(agent: &mut Agent) { + attacklw3::install(agent); + attacks3::install(agent); } diff --git a/fighters/simon/src/whip/aerials.rs b/fighters/simon/src/whip/aerials.rs new file mode 100644 index 0000000000..aff641e7e1 --- /dev/null +++ b/fighters/simon/src/whip/aerials.rs @@ -0,0 +1,94 @@ +use super::*; + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 7.0); + FT_DESIRED_RATE(agent, 25.0-7.0, 10.0); + frame(lua_state, 25.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 29.0); + FT_DESIRED_RATE(agent, 43.0-29.0, 19.0); + +} + +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 10.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 16.0); + FT_DESIRED_RATE(agent, 18.0-16.0, 3.0); + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); + +} + +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 14.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + +} + +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 15.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_landingairn", game_landingairn); + + agent.acmd("game_attackairfhi", game_attackairf); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairflw", game_attackairf); + + agent.acmd("game_attackairbhi", game_attackairb); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairblw", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); +} \ No newline at end of file diff --git a/fighters/simon/src/whip/mod.rs b/fighters/simon/src/whip/mod.rs new file mode 100644 index 0000000000..30b4704e23 --- /dev/null +++ b/fighters/simon/src/whip/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod aerials; +mod smashes; +mod tilts; + +pub fn install() { + let agent = &mut Agent::new("simon_whip"); + aerials::install(agent); + smashes::install(agent); + tilts::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/simon/src/whip/smashes.rs b/fighters/simon/src/whip/smashes.rs new file mode 100644 index 0000000000..57ec3c5bf1 --- /dev/null +++ b/fighters/simon/src/whip/smashes.rs @@ -0,0 +1,51 @@ +use super::*; + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.2); + frame(lua_state, 2.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 19.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 52.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); +} \ No newline at end of file diff --git a/fighters/simon/src/whip/tilts.rs b/fighters/simon/src/whip/tilts.rs new file mode 100644 index 0000000000..d6b3edfe15 --- /dev/null +++ b/fighters/simon/src/whip/tilts.rs @@ -0,0 +1,26 @@ +use super::*; + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 11.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 23.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); +} \ No newline at end of file From ca6514c22a2bb15e3a46ef5d536cfc7acaaa8913 Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:18:28 -0400 Subject: [PATCH 135/172] lucario crate --- fighters/lucario/src/acmd/aerials.rs | 34 ++++---- fighters/lucario/src/acmd/ground.rs | 21 +++-- fighters/lucario/src/acmd/mod.rs | 16 ++-- fighters/lucario/src/acmd/other.rs | 52 ++++++------- fighters/lucario/src/acmd/smashes.rs | 22 +++--- fighters/lucario/src/acmd/specials.rs | 94 +++++++++++------------ fighters/lucario/src/acmd/throws.rs | 26 +++---- fighters/lucario/src/acmd/tilts.rs | 22 +++--- fighters/lucario/src/lib.rs | 7 +- fighters/lucario/src/opff.rs | 8 +- fighters/lucario/src/status.rs | 30 ++++---- fighters/lucario/src/status/attack_air.rs | 8 +- fighters/lucario/src/status/attack_hi4.rs | 8 +- fighters/lucario/src/status/special_hi.rs | 10 +-- fighters/lucario/src/status/special_lw.rs | 10 +-- fighters/lucario/src/status/special_n.rs | 24 +++--- fighters/lucario/src/status/special_s.rs | 8 +- 17 files changed, 185 insertions(+), 215 deletions(-) diff --git a/fighters/lucario/src/acmd/aerials.rs b/fighters/lucario/src/acmd/aerials.rs index 1cd77d0b9e..b4a0c5ad65 100644 --- a/fighters/lucario/src/acmd/aerials.rs +++ b/fighters/lucario/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn lucario_attack_air_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -79,7 +79,7 @@ unsafe extern "C" fn lucario_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_attack_air_f_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -105,7 +105,7 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -137,7 +137,7 @@ unsafe extern "C" fn lucario_attack_air_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -168,7 +168,7 @@ unsafe extern "C" fn lucario_attack_air_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_attack_air_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -181,7 +181,7 @@ unsafe extern "C" fn lucario_attack_air_hi_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn lucario_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -230,15 +230,13 @@ unsafe extern "C" fn lucario_attack_air_lw_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attackairn", lucario_attack_air_n_game) - .acmd("game_attackairf", lucario_attack_air_f_game) - .acmd("expression_attackairf", lucario_attack_air_f_expression) - .acmd("expression_attackairf", expression_attackairf) - .acmd("game_attackairb", lucario_attack_air_b_game) - .acmd("game_attackairhi", lucario_attack_air_hi_game) - .acmd("expression_attackairhi", lucario_attack_air_hi_expression) - .acmd("game_attackairlw", lucario_attack_air_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/lucario/src/acmd/ground.rs b/fighters/lucario/src/acmd/ground.rs index e6c7da7e74..8da6f35b3c 100644 --- a/fighters/lucario/src/acmd/ground.rs +++ b/fighters/lucario/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -32,7 +32,7 @@ unsafe extern "C" fn lucario_attack_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -59,7 +59,7 @@ unsafe extern "C" fn lucario_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -79,7 +79,7 @@ unsafe extern "C" fn lucario_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -95,11 +95,10 @@ unsafe extern "C" fn lucario_attack_13_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attackdash", lucario_attack_dash_game) - .acmd("game_attack11", lucario_attack_11_game) - .acmd("game_attack12", lucario_attack_12_game) - .acmd("game_attack13", lucario_attack_13_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + } diff --git a/fighters/lucario/src/acmd/mod.rs b/fighters/lucario/src/acmd/mod.rs index a878968545..950ed27383 100644 --- a/fighters/lucario/src/acmd/mod.rs +++ b/fighters/lucario/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod tilts; mod throws; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - ground::install(); - throws::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + ground::install(agent); + throws::install(agent); } \ No newline at end of file diff --git a/fighters/lucario/src/acmd/other.rs b/fighters/lucario/src/acmd/other.rs index f1cd73e590..1852ec481b 100644 --- a/fighters/lucario/src/acmd/other.rs +++ b/fighters/lucario/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -69,7 +69,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -83,7 +83,7 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -98,7 +98,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -232,24 +232,22 @@ unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { let boma = agent.boma(); } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_cliffattack", game_cliffattack) - .acmd("game_catchattack", game_catchattack) - .acmd("game_slipattack", game_slipattack) - .acmd("game_downattackd", game_downattackd) - .acmd("game_downattacku", game_downattacku) - .acmd("game_appealhil", game_appealhi) - .acmd("game_appealhir", game_appealhi) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_cliffattack", game_cliffattack); + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("game_slipattack", game_slipattack); + agent.acmd("game_downattackd", game_downattackd); + agent.acmd("game_downattacku", game_downattacku); + agent.acmd("game_appealhil", game_appealhi); + agent.acmd("game_appealhir", game_appealhi); } diff --git a/fighters/lucario/src/acmd/smashes.rs b/fighters/lucario/src/acmd/smashes.rs index 3a4f1bcab8..9623c02dac 100644 --- a/fighters/lucario/src/acmd/smashes.rs +++ b/fighters/lucario/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -25,7 +25,7 @@ unsafe extern "C" fn lucario_attack_s4_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -116,7 +116,7 @@ unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -139,13 +139,11 @@ unsafe extern "C" fn lucario_attack_lw4_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attacks4", lucario_attack_s4_s_game) - .acmd("game_attackhi4", lucario_attack_hi4_game) - .acmd("effect_attackhi4", effect_attackhi4) - .acmd("sound_attackhi4", sound_attackhi4) - .acmd("expression_attackhi4", expression_attackhi4) - .acmd("game_attacklw4", lucario_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index 8608ef2a3a..cfc367418a 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_special_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -33,7 +33,7 @@ unsafe extern "C" fn lucario_special_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_air_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -64,7 +64,7 @@ unsafe extern "C" fn lucario_special_air_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_special_air_s_throw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsthrow(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 22.0); @@ -147,7 +147,7 @@ unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_special_air_s_throw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsthrow(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -160,7 +160,7 @@ unsafe extern "C" fn lucario_special_air_s_throw_effect(agent: &mut L2CAgentBase } } -unsafe extern "C" fn lucario_special_air_s_throw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairsthrow(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 23.0); @@ -184,7 +184,7 @@ unsafe extern "C" fn lucario_special_air_s_throw_sound(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn lucario_special_air_s_throw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialairsthrow(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -204,7 +204,7 @@ unsafe extern "C" fn lucario_special_air_s_throw_expression(agent: &mut L2CAgent } } -unsafe extern "C" fn lucario_special_hi_l_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_DESIRED_RATE(agent, 30.0, 34.0); @@ -215,7 +215,7 @@ unsafe extern "C" fn lucario_special_hi_l_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_hi_r_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_DESIRED_RATE(agent, 30.0, 34.0); @@ -226,7 +226,7 @@ unsafe extern "C" fn lucario_special_hi_r_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_air_hi_l_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_DESIRED_RATE(agent, 30.0, 34.0); @@ -241,7 +241,7 @@ unsafe extern "C" fn lucario_special_air_hi_l_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_air_hi_r_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_DESIRED_RATE(agent, 30.0, 34.0); @@ -256,7 +256,7 @@ unsafe extern "C" fn lucario_special_air_hi_r_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_hi_move_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhimove(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -275,7 +275,7 @@ unsafe extern "C" fn lucario_special_hi_move_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_hi_move_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialhimove(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -288,7 +288,7 @@ unsafe extern "C" fn lucario_special_hi_move_expression(agent: &mut L2CAgentBase } } -unsafe extern "C" fn lucario_special_hi_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhiend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); wait(lua_state, 1.0); @@ -308,7 +308,7 @@ unsafe extern "C" fn lucario_special_hi_end_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_special_air_hi_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); wait(lua_state, 1.0); @@ -561,38 +561,36 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_specials", lucario_special_s_game) - .acmd("game_specialairs", lucario_special_air_s_game) - .acmd("game_specialairsthrow", lucario_special_air_s_throw_game) - .acmd("game_specialsthrow", game_specialsthrow) - .acmd("effect_specialairsthrow", lucario_special_air_s_throw_effect) - .acmd("sound_specialairsthrow", lucario_special_air_s_throw_sound) - .acmd("expression_specialairsthrow", lucario_special_air_s_throw_expression) - .acmd("game_specialhi", lucario_special_hi_l_game) - .acmd("game_specialhi", lucario_special_hi_r_game) - .acmd("game_specialairhi", lucario_special_air_hi_l_game) - .acmd("game_specialairhi", lucario_special_air_hi_r_game) - .acmd("game_specialhimove", lucario_special_hi_move_game) - .acmd("expression_specialhimove", lucario_special_hi_move_expression) - .acmd("game_specialhiend", lucario_special_hi_end_game) - .acmd("game_specialairhiend", lucario_special_air_hi_end_game) - .acmd("game_specialnbomb", game_specialnbomb) - .acmd("effect_specialnbomb", effect_specialnbomb) - .acmd("sound_specialnbomb", sound_specialnbomb) - .acmd("expression_specialnbomb", expression_specialnbomb) - .acmd("game_specialairnbomb", game_specialairnbomb) - .acmd("effect_specialairnbomb", effect_specialairnbomb) - .acmd("sound_specialairnbomb", sound_specialairnbomb) - .acmd("expression_specialairnbomb", expression_specialairnbomb) - .acmd("game_speciallw", game_speciallw) - .acmd("effect_speciallw", effect_speciallw) - .acmd("sound_speciallw", sound_speciallw) - .acmd("sound_specialairlw", sound_speciallw) - .acmd("expression_speciallw", expression_speciallw) - .acmd("expression_specialairlw", expression_speciallw) - .acmd("game_specialairlw", game_specialairlw) - .acmd("effect_specialairlw", effect_specialairlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairsthrow", game_specialairsthrow); + agent.acmd("game_specialsthrow", game_specialsthrow); + agent.acmd("effect_specialairsthrow", effect_specialairsthrow); + agent.acmd("sound_specialairsthrow", sound_specialairsthrow); + agent.acmd("expression_specialairsthrow", expression_specialairsthrow); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_specialhimove", game_specialhimove); + agent.acmd("expression_specialhimove", expression_specialhimove); + agent.acmd("game_specialhiend", game_specialhiend); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialnbomb", game_specialnbomb); + agent.acmd("effect_specialnbomb", effect_specialnbomb); + agent.acmd("sound_specialnbomb", sound_specialnbomb); + agent.acmd("expression_specialnbomb", expression_specialnbomb); + agent.acmd("game_specialairnbomb", game_specialairnbomb); + agent.acmd("effect_specialairnbomb", effect_specialairnbomb); + agent.acmd("sound_specialairnbomb", sound_specialairnbomb); + agent.acmd("expression_specialairnbomb", expression_specialairnbomb); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/lucario/src/acmd/throws.rs b/fighters/lucario/src/acmd/throws.rs index 0f4a6dd898..fe0f0b352c 100644 --- a/fighters/lucario/src/acmd/throws.rs +++ b/fighters/lucario/src/acmd/throws.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -22,7 +22,7 @@ unsafe extern "C" fn lucario_catch_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucario_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -42,7 +42,7 @@ unsafe extern "C" fn lucario_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -176,14 +176,12 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_catch", lucario_catch_game) - .acmd("game_catchdash", lucario_catch_dash_game) - .acmd("game_catchturn", lucario_catch_turn_game) - .acmd("game_throwb", game_throwb) - .acmd("game_throwf", game_throwf) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/lucario/src/acmd/tilts.rs b/fighters/lucario/src/acmd/tilts.rs index c476497b13..6552882f99 100644 --- a/fighters/lucario/src/acmd/tilts.rs +++ b/fighters/lucario/src/acmd/tilts.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucario_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -39,7 +39,7 @@ unsafe extern "C" fn lucario_attack_s3_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -75,7 +75,7 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucario_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -94,13 +94,11 @@ unsafe extern "C" fn lucario_attack_lw3_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucario") - .acmd("game_attacks3", lucario_attack_s3_s_game) - .acmd("game_attacks3lw", lucario_attack_s3_s_game) - .acmd("game_attacks3hi", lucario_attack_s3_s_game) - .acmd("game_attackhi3", lucario_attack_hi3_game) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("game_attacklw3", lucario_attack_lw3_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/lucario/src/lib.rs b/fighters/lucario/src/lib.rs index 5537dac979..b637d5241c 100644 --- a/fighters/lucario/src/lib.rs +++ b/fighters/lucario/src/lib.rs @@ -39,7 +39,8 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucario"); + acmd::install(agent); + status::install(agent); + opff::install(agent); } \ No newline at end of file diff --git a/fighters/lucario/src/opff.rs b/fighters/lucario/src/opff.rs index 9da33e47fa..1132d99727 100644 --- a/fighters/lucario/src/opff.rs +++ b/fighters/lucario/src/opff.rs @@ -367,9 +367,7 @@ unsafe fn magic_series(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo } } -pub fn install() { - smashline::Agent::new("lucario") - .on_line(Main, lucario_frame_wrapper) - .on_line(Main, lucario_meter) - .install(); +pub fn install(agent: &mut Agent) { + Agent.on_line(Main, lucario_frame_wrapper); + agent.on_line(Main, lucario_meter); } \ No newline at end of file diff --git a/fighters/lucario/src/status.rs b/fighters/lucario/src/status.rs index 5838faff52..c627c50dc2 100644 --- a/fighters/lucario/src/status.rs +++ b/fighters/lucario/src/status.rs @@ -107,20 +107,18 @@ pub unsafe extern "C" fn pre_run(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Run() } -pub fn install() { - attack_air::install(); - attack_hi4::install(); - special_hi::install(); - special_lw::install(); - special_n::install(); - special_s::install(); - smashline::Agent::new("lucario") - .on_start(lucario_init) - .status(Main, *FIGHTER_STATUS_KIND_SHIELD_BREAK_FLY, shield_break_fly_main) - .status(Main, *FIGHTER_STATUS_KIND_DEAD, dead_main) - .status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main) - .status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk) - .status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash) - .status(Pre, *FIGHTER_STATUS_KIND_RUN, pre_run) - .install(); +pub fn install(agent: &mut Agent) { + attack_air::install(agent); + attack_hi4::install(agent); + special_hi::install(agent); + special_lw::install(agent); + special_n::install(agent); + special_s::install(agent); + agent.on_start(lucario_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SHIELD_BREAK_FLY, shield_break_fly_main); + agent.status(Main, *FIGHTER_STATUS_KIND_DEAD, dead_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_WALK, pre_walk); + agent.status(Pre, *FIGHTER_STATUS_KIND_DASH, pre_dash); + agent.status(Pre, *FIGHTER_STATUS_KIND_RUN, pre_run); } \ No newline at end of file diff --git a/fighters/lucario/src/status/attack_air.rs b/fighters/lucario/src/status/attack_air.rs index 40270449dd..6225f28b80 100644 --- a/fighters/lucario/src/status/attack_air.rs +++ b/fighters/lucario/src/status/attack_air.rs @@ -86,9 +86,7 @@ unsafe extern "C" fn status_AttackAir_Main_lucario(fighter: &mut L2CFighterCommo return false.into(); } -pub fn install() { - smashline::Agent::new("lucario") - .status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status/attack_hi4.rs b/fighters/lucario/src/status/attack_hi4.rs index 1e5c93f8e4..78767dcf06 100644 --- a/fighters/lucario/src/status/attack_hi4.rs +++ b/fighters/lucario/src/status/attack_hi4.rs @@ -90,9 +90,7 @@ unsafe extern "C" fn attack_hi_set_kinetic(fighter: &mut L2CFighterCommon) { // KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); } } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_pre) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_hi.rs b/fighters/lucario/src/status/special_hi.rs index be13247618..a6db017ab2 100644 --- a/fighters/lucario/src/status/special_hi.rs +++ b/fighters/lucario/src/status/special_hi.rs @@ -340,10 +340,8 @@ unsafe extern "C" fn lucario_special_hi_get_vec(_fighter: &mut L2CFighterCommon, vec } -pub fn install() { - smashline::Agent::new("lucario") - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH, lucario_special_hi_rush_main) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH_END, lucario_special_hi_rush_end_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH, lucario_special_hi_rush_main); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_RUSH_END, lucario_special_hi_rush_end_main); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_lw.rs b/fighters/lucario/src/status/special_lw.rs index ff4a577a97..3ef21d67cb 100644 --- a/fighters/lucario/src/status/special_lw.rs +++ b/fighters/lucario/src/status/special_lw.rs @@ -135,10 +135,8 @@ unsafe extern "C" fn special_lw_set_kinetic(fighter: &mut L2CFighterCommon) { } } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_pre) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_main) - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_init) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_main); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_init); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index 02524ca156..9348263ccb 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -457,18 +457,14 @@ pub unsafe extern "C" fn lucario_special_n_save_charge_status(fighter: &mut L2CF } -pub fn install() { - smashline::Agent::new("lucario_auraball") - .status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, auraball_shoot_pre) - .install(); - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_pre) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_end) - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_main) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_end) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_main) - .status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, auraball_shoot_pre); + agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_pre); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_end); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_end); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_s.rs b/fighters/lucario/src/status/special_s.rs index a087880c61..73bca34f64 100644 --- a/fighters/lucario/src/status/special_s.rs +++ b/fighters/lucario/src/status/special_s.rs @@ -186,9 +186,7 @@ unsafe extern "C" fn special_s_throw_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(special_s_throw_main_loop as *const () as _)) } -pub fn install() { - smashline::Agent::new("lucario") - .status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_pre) - .status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_pre); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW, special_s_throw_main); } \ No newline at end of file From 4396b46cb0183fc52fdf2d2ab1000bb2f46ed0cd Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 14:41:55 -0500 Subject: [PATCH 136/172] zero suit --- fighters/szerosuit/src/acmd/aerials.rs | 97 +++------- fighters/szerosuit/src/acmd/ground.rs | 27 ++- fighters/szerosuit/src/acmd/mod.rs | 16 +- fighters/szerosuit/src/acmd/other.rs | 94 ++------- fighters/szerosuit/src/acmd/smashes.rs | 121 ++++++------ fighters/szerosuit/src/acmd/specials.rs | 183 +++--------------- fighters/szerosuit/src/acmd/throws.rs | 105 +++++----- fighters/szerosuit/src/acmd/tilts.rs | 57 +++--- fighters/szerosuit/src/lib.rs | 19 +- fighters/szerosuit/src/opff.rs | 8 +- .../szerosuit/src/paralyzer_bullet/acmd.rs | 52 +++++ .../szerosuit/src/paralyzer_bullet/mod.rs | 9 + fighters/szerosuit/src/status.rs | 14 +- fighters/szerosuit/src/status/rebirth.rs | 15 ++ fighters/szerosuit/src/whip/acmd.rs | 104 ++++++++++ fighters/szerosuit/src/whip/mod.rs | 9 + 16 files changed, 445 insertions(+), 485 deletions(-) create mode 100644 fighters/szerosuit/src/paralyzer_bullet/acmd.rs create mode 100644 fighters/szerosuit/src/paralyzer_bullet/mod.rs create mode 100644 fighters/szerosuit/src/status/rebirth.rs create mode 100644 fighters/szerosuit/src/whip/acmd.rs create mode 100644 fighters/szerosuit/src/whip/mod.rs diff --git a/fighters/szerosuit/src/acmd/aerials.rs b/fighters/szerosuit/src/acmd/aerials.rs index 8d4b31ff3c..aadb312fc7 100644 --- a/fighters/szerosuit/src/acmd/aerials.rs +++ b/fighters/szerosuit/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn szerosuit_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); @@ -53,28 +53,9 @@ unsafe extern "C" fn szerosuit_attack_air_n_game(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } -unsafe extern "C" fn szerosuit_whip_attack_air_n_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - VisibilityModule::set_whole(boma, true); - } - frame(lua_state, 21.0); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_attack_air_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -87,7 +68,7 @@ unsafe extern "C" fn szerosuit_attack_air_n_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn szerosuit_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -131,10 +112,9 @@ unsafe extern "C" fn szerosuit_attack_air_f_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn szerosuit_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -158,10 +138,9 @@ unsafe extern "C" fn szerosuit_attack_air_b_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn szerosuit_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -201,10 +180,9 @@ unsafe extern "C" fn szerosuit_attack_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn szerosuit_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -219,7 +197,7 @@ unsafe extern "C" fn szerosuit_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let dive_motion_rate = 10.0/(50.0-14.0); @@ -254,10 +232,9 @@ unsafe extern "C" fn szerosuit_attack_air_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn szerosuit_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let dive_motion_rate = 15.0/(50.0-14.0); @@ -277,13 +254,7 @@ unsafe extern "C" fn szerosuit_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_landing_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn szerosuit_landing_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -291,7 +262,7 @@ unsafe extern "C" fn szerosuit_landing_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_landing_air_lw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -300,7 +271,7 @@ unsafe extern "C" fn szerosuit_landing_air_lw_expression(agent: &mut L2CAgentBas } } -unsafe extern "C" fn szerosuit_air_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -340,31 +311,25 @@ unsafe extern "C" fn szerosuit_air_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_landing_air_catch_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_landingairlw", null); + agent.acmd("effect_landingairlw", effect_landingairlw); + agent.acmd("expression_landingairlw", expression_landingairlw); -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attackairn", szerosuit_attack_air_n_game) - .acmd("expression_attackairn", szerosuit_attack_air_n_expression) - .acmd("game_attackairf", szerosuit_attack_air_f_game) - .acmd("game_attackairb", szerosuit_attack_air_b_game) - .acmd("game_attackairhi", szerosuit_attack_air_hi_game) - .acmd("effect_attackairhi", szerosuit_attack_air_hi_effect) - .acmd("game_attackairlw", szerosuit_attack_air_lw_game) - .acmd("effect_attackairlw", szerosuit_attack_air_lw_effect) - .acmd("game_landingairlw", szerosuit_landing_air_lw_game) - .acmd("effect_landingairlw", szerosuit_landing_air_lw_effect) - .acmd( - "expression_landingairlw", - szerosuit_landing_air_lw_expression, - ) - .acmd("game_aircatch", szerosuit_air_catch_game) - .acmd("game_aircatchlanding", szerosuit_landing_air_catch_game) - .install(); - smashline::Agent::new("szerosuit_whip") - .acmd("game_attackairn", szerosuit_whip_attack_air_n_game) - .install(); + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", null); } diff --git a/fighters/szerosuit/src/acmd/ground.rs b/fighters/szerosuit/src/acmd/ground.rs index a928fa065a..d59f43bdf2 100644 --- a/fighters/szerosuit/src/acmd/ground.rs +++ b/fighters/szerosuit/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -31,7 +30,7 @@ unsafe extern "C" fn szerosuit_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -52,7 +51,7 @@ unsafe extern "C" fn szerosuit_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -67,7 +66,7 @@ unsafe extern "C" fn szerosuit_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let attack_motion_rate = 11.0/(20.0-6.0); @@ -97,10 +96,9 @@ unsafe extern "C" fn szerosuit_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_dash_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -124,12 +122,11 @@ unsafe extern "C" fn szerosuit_attack_dash_expression(agent: &mut L2CAgentBase) } } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attack11", szerosuit_attack_11_game) - .acmd("game_attack12", szerosuit_attack_12_game) - .acmd("game_attack13", szerosuit_attack_13_game) - .acmd("game_attackdash", szerosuit_attack_dash_game) - .acmd("expression_attackdash", szerosuit_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/szerosuit/src/acmd/mod.rs b/fighters/szerosuit/src/acmd/mod.rs index 636eb505dd..08566acdd5 100644 --- a/fighters/szerosuit/src/acmd/mod.rs +++ b/fighters/szerosuit/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } diff --git a/fighters/szerosuit/src/acmd/other.rs b/fighters/szerosuit/src/acmd/other.rs index 9905aa6e66..55854ca7f1 100644 --- a/fighters/szerosuit/src/acmd/other.rs +++ b/fighters/szerosuit/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -50,7 +49,7 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -68,7 +67,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -79,60 +78,12 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - } -} - -unsafe extern "C" fn szerosuit_paralyzer_bullet_shoot_tame_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - AttackModule::enable_safe_pos(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - AttackModule::set_lerp(boma, 0, 2, 0); - AttackModule::set_lerp(boma, 1, 3, 1); - } } -unsafe extern "C" fn szerosuit_escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -143,10 +94,9 @@ unsafe extern "C" fn szerosuit_escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -157,21 +107,17 @@ unsafe extern "C" fn szerosuit_escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("szerosuit_paralyzer_bullet") - .acmd("game_shoot", szerosuit_paralyzer_bullet_shoot_game) - .acmd("game_shoottame", szerosuit_paralyzer_bullet_shoot_tame_game) - .install(); - smashline::Agent::new("szerosuit") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", szerosuit_escape_air_game) - .acmd("game_escapeairslide", szerosuit_escape_air_slide_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/szerosuit/src/acmd/smashes.rs b/fighters/szerosuit/src/acmd/smashes.rs index 16b2bfa6b1..8a2c5dd959 100644 --- a/fighters/szerosuit/src/acmd/smashes.rs +++ b/fighters/szerosuit/src/acmd/smashes.rs @@ -1,12 +1,36 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_s4_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 5.5, 7.0, 7.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_ATTACK_FLAG_S4_SELECT); + } frame(lua_state, 25.0); if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 5.5, 6.0); + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 6.0, 5.2); } frame(lua_state, 26.0); if is_excute(agent) { @@ -14,7 +38,6 @@ unsafe extern "C" fn szerosuit_attack_s4_hi_game(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -36,40 +59,14 @@ unsafe extern "C" fn szerosuit_attack_s4_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } - } -unsafe extern "C" fn szerosuit_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 12.0); - if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 5.5, 7.0, 7.0); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 5.0, 60, 100, 35, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 5.0, 40, 100, 68, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("legr"), 5.0, 38, 100, 72, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("kneer"), 5.0, 45, 90, 38, 0, 4.0, 7.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 4, 0, Hash40::new("kneer"), 5.0, 18, 90, 60, 0, 4.0, 0.5, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 5, 0, Hash40::new("legr"), 5.0, 16, 90, 67, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_ATTACK_FLAG_S4_SELECT); - } frame(lua_state, 25.0); if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 0.0, 7.0, 6.0, 5.2); + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 2.0, 7.0, 5.5, 6.0); } frame(lua_state, 26.0); if is_excute(agent) { @@ -77,6 +74,7 @@ unsafe extern "C" fn szerosuit_attack_s4_s_game(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 5.5, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneel"), 11.0, 361, 110, 0, 28, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("legl"), 11.0, 361, 110, 0, 28, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -98,10 +96,9 @@ unsafe extern "C" fn szerosuit_attack_s4_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 3.0, 3.0, 7.5, 7.5); } - } -unsafe extern "C" fn szerosuit_attack_s4_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 26.0); @@ -128,10 +125,9 @@ unsafe extern "C" fn szerosuit_attack_s4_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_hi_4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -154,38 +150,37 @@ unsafe extern "C" fn szerosuit_attack_hi_4_game(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } for _ in 0..5 { - wait(lua_state, 2.0); + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + } + frame(lua_state, 28.0); if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 1.0, 100, 25, 0, 45, 5.6, 0.0, 21.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 110, 25, 0, 45, 6.5, 0.0, 24.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(agent, 2, 1, Hash40::new("top"), 1.0, 255, 25, 0, 45, 7.5, 0.0, 29.0, 2.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); } - wait(lua_state, 1.0); + wait(lua_state, 2.0); if is_excute(agent) { AttackModule::clear_all(boma); } + frame(lua_state, 42.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } -frame(lua_state, 28.0); -if is_excute(agent) { - ATTACK(agent, 0, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 6.0, 0.0, 21.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(agent, 1, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 7.0, 0.0, 24.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - ATTACK(agent, 2, 2, Hash40::new("top"), 3.0, 80, 212, 0, 45, 8.0, 0.0, 29.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); -} -wait(lua_state, 2.0); -if is_excute(agent) { - AttackModule::clear_all(boma); -} -frame(lua_state, 42.0); -if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); -} -} -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attacks4hi", szerosuit_attack_s4_hi_game) - .acmd("game_attacks4", szerosuit_attack_s4_s_game) - .acmd("game_attacks4lw", szerosuit_attack_s4_lw_game) - .acmd("game_attackhi4", szerosuit_attack_hi_4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/szerosuit/src/acmd/specials.rs b/fighters/szerosuit/src/acmd/specials.rs index 9535fed13f..3282004d6f 100644 --- a/fighters/szerosuit/src/acmd/specials.rs +++ b/fighters/szerosuit/src/acmd/specials.rs @@ -1,32 +1,13 @@ - use super::*; -unsafe extern "C" fn szerosuit_special_n_start_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 15.0/(21.0-1.0)); -} - -unsafe extern "C" fn szerosuit_special_air_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 15.0/(21.0-1.0)); } -unsafe extern "C" fn szerosuit_special_n_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 26.0/(28.0-1.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_STATUS_SPECIAL_N_FLAG_SHOOT); - ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_PARALYZER_BULLET, false, -1); - } -} - -unsafe extern "C" fn szerosuit_special_air_n_shoot_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -37,14 +18,14 @@ unsafe extern "C" fn szerosuit_special_air_n_shoot_game(agent: &mut L2CAgentBase } } -unsafe extern "C" fn szerosuit_special_n_landing_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnlanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 9.0/(14.0-1.0)); } -unsafe extern "C" fn szerosuit_special_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -74,24 +55,7 @@ unsafe extern "C" fn szerosuit_special_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_whip_special_s_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MotionModule::set_rate(boma, (28.0-1.0)/23.0); - } - frame(lua_state, 28.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 48.0); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_special_air_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 20.0); @@ -141,80 +105,7 @@ unsafe extern "C" fn szerosuit_special_air_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_whip_special_air_s_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 48.0); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_special_s_2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 32.0); - if is_excute(agent) { - ATTACK(agent, 0, 5, Hash40::new("top"), 7.0, 110, 60, 0, 90, 6.0, 0.0, 8.0, 34.0, Some(0.0), Some(8.0), Some(30.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_WHIP); - //AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn szerosuit_whip_special_s2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MotionModule::set_rate(boma, (28.0-1.0)/23.0); - } - frame(lua_state, 28.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 57.0); - if is_excute(agent) { - VisibilityModule::set_whole(boma, false); - } -} - -unsafe extern "C" fn szerosuit_whip_special_s2_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(agent, Hash40::new("szero_pwhip"), true, true); - EFFECT_FLW_POS(agent, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 45.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("szero_gbeam_lightning"), false, true); - } - frame(lua_state, 54.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("szero_whip"), false, true); - } - frame(lua_state, 56.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("szero_whip_flash"), false, true); - } -} - -unsafe extern "C" fn szerosuit_special_air_s_2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 32.0); @@ -226,10 +117,9 @@ unsafe extern "C" fn szerosuit_special_air_s_2_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_special_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -290,10 +180,9 @@ unsafe extern "C" fn szerosuit_special_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn szerosuit_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -354,10 +243,9 @@ unsafe extern "C" fn szerosuit_special_air_hi_game(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn szerosuit_special_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -393,7 +281,7 @@ unsafe extern "C" fn szerosuit_special_lw_start_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_special_air_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -427,7 +315,7 @@ unsafe extern "C" fn szerosuit_special_air_lw_start_game(agent: &mut L2CAgentBas } } -unsafe extern "C" fn szerosuit_special_air_lw_kick_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwkick(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -450,10 +338,9 @@ unsafe extern "C" fn szerosuit_special_air_lw_kick_game(agent: &mut L2CAgentBase if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_SZEROSUIT_INSTANCE_WORK_ID_FLAG_TO_SPECIAL_LANDING); } - } -unsafe extern "C" fn szerosuit_special_air_lw_flip_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwflip(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -469,31 +356,23 @@ unsafe extern "C" fn szerosuit_special_air_lw_flip_game(agent: &mut L2CAgentBase } } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_specialnstart", szerosuit_special_n_start_game) - .acmd("game_specialairnstart", szerosuit_special_air_n_start_game) - .acmd("game_specialnshoot", szerosuit_special_n_shoot_game) - .acmd("game_specialairnshoot", szerosuit_special_air_n_shoot_game) - .acmd("game_specialnlanding", szerosuit_special_n_landing_game) - .acmd("game_specials", szerosuit_special_s_game) - .acmd("game_specialairs", szerosuit_special_air_s_game) - .acmd("game_specials2", szerosuit_special_s_2_game) - .acmd("game_specialairs2", szerosuit_special_air_s_2_game) - .acmd("game_specialhi", szerosuit_special_hi_game) - .acmd("game_specialairhi", szerosuit_special_air_hi_game) - .acmd("game_speciallwstart", szerosuit_special_lw_start_game) - .acmd( - "game_specialairlwstart", - szerosuit_special_air_lw_start_game, - ) - .acmd("game_specialairlwkick", szerosuit_special_air_lw_kick_game) - .acmd("game_specialairlwflip", szerosuit_special_air_lw_flip_game) - .install(); - smashline::Agent::new("szerosuit_whip") - .acmd("game_specials", szerosuit_whip_special_s_game) - .acmd("game_specialairs", szerosuit_whip_special_air_s_game) - .acmd("game_specials2", szerosuit_whip_special_s2_game) - .acmd("effect_specials2", szerosuit_whip_special_s2_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnshoot", game_specialnshoot); + agent.acmd("game_specialairnshoot", game_specialnshoot); + agent.acmd("game_specialnlanding", game_specialnlanding); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specials2", game_specials2); + agent.acmd("game_specialairs2", game_specials2); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("game_specialairlwkick", game_specialairlwkick); + agent.acmd("game_specialairlwflip", game_specialairlwflip); } diff --git a/fighters/szerosuit/src/acmd/throws.rs b/fighters/szerosuit/src/acmd/throws.rs index 4049a0c050..4a8d95c674 100644 --- a/fighters/szerosuit/src/acmd/throws.rs +++ b/fighters/szerosuit/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn szerosuit_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -29,10 +29,34 @@ unsafe extern "C" fn szerosuit_catch_game(agent: &mut L2CAgentBase) { if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } -unsafe extern "C" fn szerosuit_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_swing_06")); + } + wait(lua_state, 7.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_swing_06")); + } +} + +unsafe extern "C" fn expression_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); + } +} + +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -68,7 +92,7 @@ unsafe extern "C" fn szerosuit_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -102,42 +126,9 @@ unsafe extern "C" fn szerosuit_catch_turn_game(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - -} - -unsafe extern "C" fn szerosuit_catch_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_swing_06")); - } - wait(lua_state, 7.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_swing_06")); - } - -} - -unsafe extern "C" fn szerosuit_catch_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn szerosuit_catch_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, 0 as u32); - } } -unsafe extern "C" fn szerosuit_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -160,7 +151,7 @@ unsafe extern "C" fn szerosuit_throw_f_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -187,7 +178,7 @@ unsafe extern "C" fn szerosuit_throw_b_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE_RANGE(agent, 1.0, 2.0, 6.0); @@ -211,10 +202,9 @@ unsafe extern "C" fn szerosuit_throw_hi_game(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE_RANGE(agent, 1.0, 12.0, 7.0); @@ -238,20 +228,23 @@ unsafe extern "C" fn szerosuit_throw_lw_game(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_catch", szerosuit_catch_game) - .acmd("game_catchdash", szerosuit_catch_dash_game) - .acmd("game_catchturn", szerosuit_catch_turn_game) - .acmd("sound_catch", szerosuit_catch_sound) - .acmd("effect_catch", szerosuit_catch_effect) - .acmd("expression_catch", szerosuit_catch_expression) - .acmd("game_throwf", szerosuit_throw_f_game) - .acmd("game_throwb", szerosuit_throw_b_game) - .acmd("game_throwhi", szerosuit_throw_hi_game) - .acmd("game_throwlw", szerosuit_throw_lw_game) - .install(); +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("effect_catch", null); + agent.acmd("sound_catch", sound_catch); + agent.acmd("expression_catch", expression_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/szerosuit/src/acmd/tilts.rs b/fighters/szerosuit/src/acmd/tilts.rs index 2cd3414f44..0bda8e22a6 100644 --- a/fighters/szerosuit/src/acmd/tilts.rs +++ b/fighters/szerosuit/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn szerosuit_attack_s3_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -10,16 +9,14 @@ unsafe extern "C" fn szerosuit_attack_s3_hi_game(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -28,7 +25,7 @@ unsafe extern "C" fn szerosuit_attack_s3_hi_effect(agent: &mut L2CAgentBase) { } frame(lua_state, 6.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); @@ -38,10 +35,10 @@ unsafe extern "C" fn szerosuit_attack_s3_hi_effect(agent: &mut L2CAgentBase) { frame(lua_state, 17.0); if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); - } + } } -unsafe extern "C" fn szerosuit_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -50,15 +47,15 @@ unsafe extern "C" fn szerosuit_attack_s3_s_game(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 9.0, 35, 100, 0, 18, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("legl"), 9.0, 35, 100, 0, 18, 3.0, 1.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } frame(lua_state, 9.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -67,7 +64,7 @@ unsafe extern "C" fn szerosuit_attack_s3_s_effect(agent: &mut L2CAgentBase) { } frame(lua_state, 6.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 7.2, -8.5, 17, 9.5, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 7.2, -21.5, 2.5, 13.5, 1, true); LAST_EFFECT_SET_RATE(agent, 1.5); } frame(lua_state, 6.0); @@ -77,10 +74,10 @@ unsafe extern "C" fn szerosuit_attack_s3_s_effect(agent: &mut L2CAgentBase) { frame(lua_state, 17.0); if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), false, false); - } + } } -unsafe extern "C" fn szerosuit_attack_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -95,10 +92,9 @@ unsafe extern "C" fn szerosuit_attack_s3_lw_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn szerosuit_attack_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -120,7 +116,7 @@ unsafe extern "C" fn szerosuit_attack_s3_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn szerosuit_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -152,7 +148,7 @@ unsafe extern "C" fn szerosuit_attack_hi3_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -174,7 +170,7 @@ unsafe extern "C" fn szerosuit_attack_lw3_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn szerosuit_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -196,19 +192,18 @@ unsafe extern "C" fn szerosuit_attack_lw3_effect(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("szero_smash_fire"), true, false); } - } -pub fn install() { - smashline::Agent::new("szerosuit") - .acmd("game_attacks3hi", szerosuit_attack_s3_hi_game) - .acmd("effect_attacks3hi", szerosuit_attack_s3_hi_effect) - .acmd("game_attacks3", szerosuit_attack_s3_s_game) - .acmd("effect_attacks3", szerosuit_attack_s3_s_effect) - .acmd("game_attacks3lw", szerosuit_attack_s3_lw_game) - .acmd("effect_attacks3lw", szerosuit_attack_s3_lw_effect) - .acmd("game_attackhi3", szerosuit_attack_hi3_game) - .acmd("game_attacklw3", szerosuit_attack_lw3_game) - .acmd("effect_attacklw3", szerosuit_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/szerosuit/src/lib.rs b/fighters/szerosuit/src/lib.rs index af2cb7bd53..0bc993115d 100644 --- a/fighters/szerosuit/src/lib.rs +++ b/fighters/szerosuit/src/lib.rs @@ -4,8 +4,13 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles + +mod paralyzer_bullet; +mod whip; use smash::{ lib::{ @@ -38,9 +43,15 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("szerosuit"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + agent.install(); + + paralyzer_bullet::install(); + whip::install(); } diff --git a/fighters/szerosuit/src/opff.rs b/fighters/szerosuit/src/opff.rs index c158d00270..c06c3e1a86 100644 --- a/fighters/szerosuit/src/opff.rs +++ b/fighters/szerosuit/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn paralyzer_dash_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_SZEROSUIT_STATUS_KIND_SPECIAL_N_SHOOT { @@ -99,8 +98,7 @@ pub unsafe fn szerosuit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("szerosuit") - .on_line(Main, szerosuit_frame_wrapper) - .install(); + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, szerosuit_frame_wrapper); } diff --git a/fighters/szerosuit/src/paralyzer_bullet/acmd.rs b/fighters/szerosuit/src/paralyzer_bullet/acmd.rs new file mode 100644 index 0000000000..c6603ce6e4 --- /dev/null +++ b/fighters/szerosuit/src/paralyzer_bullet/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 30, 0, 2.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + } +} + +unsafe extern "C" fn game_shoottame(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + AttackModule::enable_safe_pos(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 3, 0, Hash40::new("top"), 8.0, 361, 100, 38, 0, 3.0, 0.0, 0.0, 1.6, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + AttackModule::set_lerp(boma, 0, 2, 0); + AttackModule::set_lerp(boma, 1, 3, 1); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("game_shoottame", game_shoottame); +} diff --git a/fighters/szerosuit/src/paralyzer_bullet/mod.rs b/fighters/szerosuit/src/paralyzer_bullet/mod.rs new file mode 100644 index 0000000000..46693712fe --- /dev/null +++ b/fighters/szerosuit/src/paralyzer_bullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("szerosuit_paralyzer_bullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/szerosuit/src/status.rs b/fighters/szerosuit/src/status.rs index dfea771b33..3031ff87c7 100644 --- a/fighters/szerosuit/src/status.rs +++ b/fighters/szerosuit/src/status.rs @@ -1,15 +1,7 @@ use super::*; -unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() -} +mod rebirth; -pub fn install() { - Agent::new("snake") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, szerosuit_rebirth_end) - .install(); +pub fn install(agent: &mut Agent) { + rebirth::install(agent); } diff --git a/fighters/szerosuit/src/status/rebirth.rs b/fighters/szerosuit/src/status/rebirth.rs new file mode 100644 index 0000000000..6e91c0dd37 --- /dev/null +++ b/fighters/szerosuit/src/status/rebirth.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, szerosuit_rebirth_end); +} diff --git a/fighters/szerosuit/src/whip/acmd.rs b/fighters/szerosuit/src/whip/acmd.rs new file mode 100644 index 0000000000..11359b772e --- /dev/null +++ b/fighters/szerosuit/src/whip/acmd.rs @@ -0,0 +1,104 @@ +use super::*; + +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 4.0/(8.0-1.0)); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, (28.0-1.0)/23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 48.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 48.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, (28.0-1.0)/23.0); + } + frame(lua_state, 28.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 57.0); + if is_excute(agent) { + VisibilityModule::set_whole(boma, false); + } +} + +unsafe extern "C" fn effect_specials2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("szero_whip_flash"), Hash40::new("plasmawhip1"), 1, 0, 0, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("szero_pwhip"), true, true); + EFFECT_FLW_POS(agent, Hash40::new("szero_whip"), Hash40::new("attach"), 0, 0, 0, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip2"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip3"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip4"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip5"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip6"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip7"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("szero_gbeam_lightning"), Hash40::new("plasmawhip8"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 45.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_gbeam_lightning"), false, true); + } + frame(lua_state, 54.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip"), false, true); + } + frame(lua_state, 56.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("szero_whip_flash"), false, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specials2", game_specials2); + agent.acmd("effect_specials2", effect_specials2); +} diff --git a/fighters/szerosuit/src/whip/mod.rs b/fighters/szerosuit/src/whip/mod.rs new file mode 100644 index 0000000000..a0c0cf8374 --- /dev/null +++ b/fighters/szerosuit/src/whip/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("szerosuit_whip"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From 0d5f844ce3e658dc20d6c5922e43b32cb5b65b1b Mon Sep 17 00:00:00 2001 From: mokl Date: Tue, 26 Mar 2024 14:45:39 -0500 Subject: [PATCH 137/172] fix lucario --- fighters/lucario/src/acmd/aerials.rs | 13 ------------- fighters/lucario/src/acmd/specials.rs | 28 --------------------------- fighters/lucario/src/lib.rs | 6 ++++-- fighters/lucario/src/opff.rs | 2 +- 4 files changed, 5 insertions(+), 44 deletions(-) diff --git a/fighters/lucario/src/acmd/aerials.rs b/fighters/lucario/src/acmd/aerials.rs index b4a0c5ad65..79085ae821 100644 --- a/fighters/lucario/src/acmd/aerials.rs +++ b/fighters/lucario/src/acmd/aerials.rs @@ -92,19 +92,6 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } -} - unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index cfc367418a..1a4ff5b035 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -212,33 +212,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } - -} - -unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_DESIRED_RATE(agent, 30.0, 34.0); - frame(lua_state, 21.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); - } - -} - -unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_DESIRED_RATE(agent, 30.0, 34.0); - frame(lua_state, 13.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_GRAVITY_ONOFF); - } - frame(lua_state, 21.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); - } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -253,7 +226,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LUCARIO_MACH_STATUS_WORK_ID_FLAG_RUSH_DIR); } - } unsafe extern "C" fn game_specialhimove(agent: &mut L2CAgentBase) { diff --git a/fighters/lucario/src/lib.rs b/fighters/lucario/src/lib.rs index b637d5241c..f168a6a8be 100644 --- a/fighters/lucario/src/lib.rs +++ b/fighters/lucario/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -37,10 +37,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("lucario"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); + agent.install(); } \ No newline at end of file diff --git a/fighters/lucario/src/opff.rs b/fighters/lucario/src/opff.rs index 1132d99727..2b0074f728 100644 --- a/fighters/lucario/src/opff.rs +++ b/fighters/lucario/src/opff.rs @@ -368,6 +368,6 @@ unsafe fn magic_series(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo } pub fn install(agent: &mut Agent) { - Agent.on_line(Main, lucario_frame_wrapper); + agent.on_line(Main, lucario_frame_wrapper); agent.on_line(Main, lucario_meter); } \ No newline at end of file From 9f2cebaeb33ea226df9eaffcdbf17c4663a562f0 Mon Sep 17 00:00:00 2001 From: Askew Date: Tue, 26 Mar 2024 15:47:05 -0400 Subject: [PATCH 138/172] Palutena --- fighters/palutena/src/acmd/aerials.rs | 97 +++--- fighters/palutena/src/acmd/ground.rs | 22 +- fighters/palutena/src/acmd/mod.rs | 16 +- fighters/palutena/src/acmd/other.rs | 238 ++------------- fighters/palutena/src/acmd/smashes.rs | 33 +-- fighters/palutena/src/acmd/specials.rs | 275 ++++++++---------- fighters/palutena/src/acmd/throws.rs | 34 +-- fighters/palutena/src/acmd/tilts.rs | 75 +++-- fighters/palutena/src/autoaimbullet/acmd.rs | 112 +++++++ fighters/palutena/src/autoaimbullet/mod.rs | 9 + fighters/palutena/src/explosiveflame/acmd.rs | 52 ++++ fighters/palutena/src/explosiveflame/mod.rs | 9 + fighters/palutena/src/lib.rs | 17 +- fighters/palutena/src/opff.rs | 8 +- fighters/palutena/src/reflectionboard/acmd.rs | 20 ++ fighters/palutena/src/reflectionboard/mod.rs | 9 + fighters/palutena/src/status.rs | 6 +- fighters/palutena/src/status/special_n.rs | 55 ++-- 18 files changed, 535 insertions(+), 552 deletions(-) create mode 100644 fighters/palutena/src/autoaimbullet/acmd.rs create mode 100644 fighters/palutena/src/autoaimbullet/mod.rs create mode 100644 fighters/palutena/src/explosiveflame/acmd.rs create mode 100644 fighters/palutena/src/explosiveflame/mod.rs create mode 100644 fighters/palutena/src/reflectionboard/acmd.rs create mode 100644 fighters/palutena/src/reflectionboard/mod.rs diff --git a/fighters/palutena/src/acmd/aerials.rs b/fighters/palutena/src/acmd/aerials.rs index e88c0c9900..81f42f786c 100644 --- a/fighters/palutena/src/acmd/aerials.rs +++ b/fighters/palutena/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn palutena_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -48,24 +47,20 @@ unsafe extern "C" fn palutena_attack_air_n_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.714); - } + FT_MOTION_RATE(agent, 0.714); frame(lua_state, 4.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.000); - } + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 50, 82, 0, 37, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_KICK); @@ -89,7 +84,7 @@ unsafe extern "C" fn palutena_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -113,30 +108,28 @@ unsafe extern "C" fn palutena_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { VarModule::on_flag(boma.object(), vars::palutena::status::CAN_INCREASE_COLOR); } frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 12.0/(8.0-1.0)); - } + FT_MOTION_RATE_RANGE(agent, 1.0, 8.0, 12.0); frame(lua_state, 4.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 9.0, 361, 100, 0, 30, 3.5, -1.0, -2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); ATTACK(agent, 1, 0, Hash40::new("top"), 16.0, 361, 98, 0, 31, 6.7, 0.0, 10.7, -13.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 11.0); + FT_MOTION_RATE_RANGE(agent, 11.0, 49.0, 29.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 29.0/(49.0-11.0)); AttackModule::clear_all(boma); } frame(lua_state, 34.0); @@ -146,7 +139,7 @@ unsafe extern "C" fn palutena_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -172,7 +165,7 @@ unsafe extern "C" fn palutena_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -214,7 +207,7 @@ unsafe extern "C" fn palutena_attack_air_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -236,7 +229,7 @@ unsafe extern "C" fn palutena_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -288,24 +281,7 @@ unsafe extern "C" fn palutena_attack_air_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_air_lw_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 9.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } -} - -unsafe extern "C" fn palutena_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -339,17 +315,36 @@ unsafe extern "C" fn palutena_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attackairn", palutena_attack_air_n_game) - .acmd("game_attackairf", palutena_attack_air_f_game) - .acmd("effect_attackairf", palutena_attack_air_f_effect) - .acmd("game_attackairb", palutena_attack_air_b_game) - .acmd("effect_attackairb", palutena_attack_air_b_effect) - .acmd("game_attackairhi", palutena_attack_air_hi_game) - .acmd("effect_attackairhi", palutena_attack_air_hi_effect) - .acmd("game_attackairlw", palutena_attack_air_lw_game) - .acmd("expression_attackairlw", palutena_attack_air_lw_expression) - .acmd("effect_attackairlw", palutena_attack_air_lw_effect) - .install(); +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/ground.rs b/fighters/palutena/src/acmd/ground.rs index 61c39c5e8e..1ec93b3934 100644 --- a/fighters/palutena/src/acmd/ground.rs +++ b/fighters/palutena/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn palutena_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -28,7 +28,7 @@ unsafe extern "C" fn palutena_attack_11_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_100_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -42,7 +42,7 @@ unsafe extern "C" fn palutena_attack_100_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -106,7 +106,7 @@ unsafe extern "C" fn palutena_attack_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -138,11 +138,9 @@ unsafe extern "C" fn palutena_attack_dash_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attack11", palutena_attack_11_game) - .acmd("game_attack100end", palutena_attack_100_end_game) - .acmd("game_attackdash", palutena_attack_dash_game) - .acmd("effect_attackdash", palutena_attack_dash_effect) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/mod.rs b/fighters/palutena/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/palutena/src/acmd/mod.rs +++ b/fighters/palutena/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/other.rs b/fighters/palutena/src/acmd/other.rs index 0c45c70dd2..69aedecb8c 100644 --- a/fighters/palutena/src/acmd/other.rs +++ b/fighters/palutena/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,21 +40,19 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.4); - } + FT_MOTION_RATE(agent, 1.4); frame(lua_state, 11.0); // Effectively F15 + FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -65,7 +62,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -81,185 +78,7 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_explosiveflame_reserve_wait_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - FT_MOTION_RATE(agent, 10.0); - } - -} - -unsafe extern "C" fn palutena_reflectionboard_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); - } - frame(lua_state, 210.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn palutena_autoaimbullet_shot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; - let damage = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {10.0} else {6.0}; - let paralyze = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {0.6} else {0.4}; - if !palutena { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 41, 0, 40, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_palutena_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } - else { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 65, 40, 0, 75, 2.3, 0.0, 0.0, 0.0, None, None, None, paralyze, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } -} - -unsafe extern "C" fn palutena_autoaimbullet_shot_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; - let power = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {Hash40::new("sys_hit_elec")} else {Hash40::new("sys_hit_elec_s")}; - let size = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {2.0} else {1.0}; - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_bullet_shot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - if palutena { - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - } - } - if palutena { - for _ in 0..99 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.2, 1.2, 0, 0, 0, 0.23 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 0.2, -1.4, 0, 0, 0, 0.17 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.7, 0.1, 0, 0, 0, 0.32 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - LAST_EFFECT_SET_RATE(agent, 1); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.4, 1.0, 0, 0, 0, 0.2 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.3, -1.4, 0, 0, 0, 0.15 * size, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - LAST_EFFECT_SET_RATE(agent, 3.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, power, false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); - } - wait(lua_state, 1.0); - } - } -} - -unsafe extern "C" fn palutena_explosiveflame_explode_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 6.0); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 7.2); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 8.4); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 9.6); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 10.8); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 12.0); - } - wait(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - //AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 29); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -274,7 +93,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -288,30 +107,15 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("palutena_autoaimbullet") - .acmd("game_shot", palutena_autoaimbullet_shot_game) - .acmd("effect_shot", palutena_autoaimbullet_shot_effect) - .install(); - smashline::Agent::new("palutena_reflectionboard") - .acmd("game_shoot", palutena_reflectionboard_shoot_game) - .install(); - smashline::Agent::new("palutena_explosiveflame") - .acmd("game_explode", palutena_explosiveflame_explode_game) - .install(); - // smashline::Agent::new("palutena_explosiveflame_reserve") - // .acmd("effect_wait", palutena_explosiveflame_reserve_wait_effect) - // .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/smashes.rs b/fighters/palutena/src/acmd/smashes.rs index 95c2efc4c9..91c38a18b5 100644 --- a/fighters/palutena/src/acmd/smashes.rs +++ b/fighters/palutena/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn palutena_attack_s4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -42,7 +41,7 @@ unsafe extern "C" fn palutena_attack_s4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_s4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -71,7 +70,7 @@ unsafe extern "C" fn palutena_attack_s4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); @@ -98,7 +97,7 @@ unsafe extern "C" fn palutena_attack_hi4_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -126,7 +125,7 @@ unsafe extern "C" fn palutena_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -165,7 +164,7 @@ unsafe extern "C" fn palutena_attack_lw4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -194,13 +193,13 @@ unsafe extern "C" fn palutena_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attacks4", palutena_attack_s4_game) - .acmd("effect_attacks4", palutena_attack_s4_effect) - .acmd("game_attackhi4", palutena_attack_hi4_game) - .acmd("effect_attackhi4", palutena_attack_hi4_effect) - .acmd("game_attacklw4", palutena_attack_lw4_game) - .acmd("effect_attacklw4", palutena_attack_lw4_effect) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials.rs b/fighters/palutena/src/acmd/specials.rs index 1230e739dc..9660eda878 100644 --- a/fighters/palutena/src/acmd/specials.rs +++ b/fighters/palutena/src/acmd/specials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn palutena_special_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -14,7 +13,7 @@ unsafe extern "C" fn palutena_special_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -35,7 +34,7 @@ unsafe extern "C" fn palutena_special_n_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -48,7 +47,7 @@ unsafe extern "C" fn palutena_special_n_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -65,7 +64,7 @@ unsafe extern "C" fn palutena_special_n_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_r_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {4.0} else {0.0}; @@ -95,7 +94,7 @@ unsafe extern "C" fn palutena_special_n_r_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_r_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -130,7 +129,7 @@ unsafe extern "C" fn palutena_special_n_r_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_special_n_r_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialnr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -145,7 +144,7 @@ unsafe extern "C" fn palutena_special_n_r_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_r_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialnr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -181,7 +180,7 @@ unsafe extern "C" fn palutena_special_n_r_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -232,7 +231,7 @@ unsafe extern "C" fn palutena_special_n_b_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn palutena_special_n_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -276,7 +275,7 @@ unsafe extern "C" fn palutena_special_n_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_b_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialnb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -291,7 +290,7 @@ unsafe extern "C" fn palutena_special_n_b_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_b_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialnb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -324,7 +323,7 @@ unsafe extern "C" fn palutena_special_n_b_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_y_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialny(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let hitlag = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.5} else {0.75}; @@ -353,7 +352,7 @@ unsafe extern "C" fn palutena_special_n_y_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_y_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialny(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -372,7 +371,7 @@ unsafe extern "C" fn palutena_special_n_y_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_y_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialny(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); @@ -395,7 +394,7 @@ unsafe extern "C" fn palutena_special_n_y_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_y_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialny(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -416,7 +415,7 @@ unsafe extern "C" fn palutena_special_n_y_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_p_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnp(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -457,7 +456,7 @@ unsafe extern "C" fn palutena_special_n_p_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_p_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnp(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -498,7 +497,7 @@ unsafe extern "C" fn palutena_special_n_p_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_p_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialnp(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -510,7 +509,7 @@ unsafe extern "C" fn palutena_special_n_p_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_p_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialnp(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -559,7 +558,7 @@ unsafe extern "C" fn palutena_special_n_p_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_o_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -576,7 +575,7 @@ unsafe extern "C" fn palutena_special_n_o_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_special_n_o_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialno(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -604,7 +603,7 @@ unsafe extern "C" fn palutena_special_n_o_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_o_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialno(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -613,7 +612,7 @@ unsafe extern "C" fn palutena_special_n_o_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_o_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialno(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); @@ -622,7 +621,7 @@ unsafe extern "C" fn palutena_special_n_o_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_g_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialng(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -648,7 +647,7 @@ unsafe extern "C" fn palutena_special_n_g_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_g_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialng(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -687,7 +686,7 @@ unsafe extern "C" fn palutena_special_n_g_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_g_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialng(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -709,7 +708,7 @@ unsafe extern "C" fn palutena_special_n_g_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_n_g_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialng(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 18.0); @@ -726,7 +725,7 @@ unsafe extern "C" fn palutena_special_n_g_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let current_damage = DamageModule::damage(boma, 0); @@ -742,7 +741,7 @@ unsafe extern "C" fn palutena_special_lw_game(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75) , 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); AttackModule::set_force_reaction(boma, 0, true, false); AttackModule::set_force_reaction(boma, 1, true, false); } @@ -753,34 +752,7 @@ unsafe extern "C" fn palutena_special_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_special_air_lw_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let current_damage = DamageModule::damage(boma, 0); - frame(lua_state, 4.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, (DamageModule::damage(boma, 0) - current_damage) * 0.75); - } - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn palutena_special_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -814,7 +786,28 @@ unsafe extern "C" fn palutena_special_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_lw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); + } + frame(lua_state, 19.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); + } +} + +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -840,92 +833,76 @@ unsafe extern "C" fn palutena_special_lw_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_special_lw_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); - } - frame(lua_state, 19.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); - } - wait(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); - } -} - -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_specialn", palutena_special_n_game) - .acmd("game_specialairn", palutena_special_n_game) - .acmd("effect_specialn", palutena_special_n_effect) - .acmd("effect_specialairn", palutena_special_n_effect) - .acmd("sound_specialn", palutena_special_n_sound) - .acmd("sound_specialairn", palutena_special_n_sound) - .acmd("expression_specialn", palutena_special_n_expression) - .acmd("expression_specialairn", palutena_special_n_expression) - .acmd("game_specialnr", palutena_special_n_r_game) - .acmd("game_specialairnr", palutena_special_n_r_game) - .acmd("effect_specialnr", palutena_special_n_r_effect) - .acmd("effect_specialairnr", palutena_special_n_r_effect) - .acmd("sound_specialnr", palutena_special_n_r_sound) - .acmd("sound_specialairnr", palutena_special_n_r_sound) - .acmd("expression_specialnr", palutena_special_n_r_expression) - .acmd("expression_specialairnr", palutena_special_n_r_expression) - .acmd("game_specialnb", palutena_special_n_b_game) - .acmd("game_specialairnb", palutena_special_n_b_game) - .acmd("effect_specialnb", palutena_special_n_b_effect) - .acmd("effect_specialairnb", palutena_special_n_b_effect) - .acmd("sound_specialnb", palutena_special_n_b_sound) - .acmd("sound_specialairnb", palutena_special_n_b_sound) - .acmd("expression_specialnb", palutena_special_n_b_expression) - .acmd("expression_specialairnb", palutena_special_n_b_expression) - .acmd("game_specialny", palutena_special_n_y_game) - .acmd("game_specialairny", palutena_special_n_y_game) - .acmd("effect_specialny", palutena_special_n_y_effect) - .acmd("effect_specialairny", palutena_special_n_y_effect) - .acmd("sound_specialny", palutena_special_n_y_sound) - .acmd("sound_specialairny", palutena_special_n_y_sound) - .acmd("expression_specialny", palutena_special_n_y_expression) - .acmd("expression_specialairny", palutena_special_n_y_expression) - .acmd("game_specialnp", palutena_special_n_p_game) - .acmd("game_specialairnp", palutena_special_n_p_game) - .acmd("effect_specialnp", palutena_special_n_p_effect) - .acmd("effect_specialairnp", palutena_special_n_p_effect) - .acmd("sound_specialnp", palutena_special_n_p_sound) - .acmd("sound_specialairnp", palutena_special_n_p_sound) - .acmd("expression_specialnp", palutena_special_n_p_expression) - .acmd("expression_specialairnp", palutena_special_n_p_expression) - .acmd("game_specialno", palutena_special_n_o_game) - .acmd("game_specialairno", palutena_special_n_o_game) - .acmd("effect_specialno", palutena_special_n_o_effect) - .acmd("effect_specialairno", palutena_special_n_o_effect) - .acmd("sound_specialno", palutena_special_n_o_sound) - .acmd("sound_specialairno", palutena_special_n_o_sound) - .acmd("expression_specialno", palutena_special_n_o_expression) - .acmd("expression_specialairno", palutena_special_n_o_expression) - .acmd("game_specialng", palutena_special_n_g_game) - .acmd("game_specialairng", palutena_special_n_g_game) - .acmd("effect_specialng", palutena_special_n_g_effect) - .acmd("effect_specialairng", palutena_special_n_g_effect) - .acmd("sound_specialng", palutena_special_n_g_sound) - .acmd("sound_specialairng", palutena_special_n_g_sound) - .acmd("expression_specialng", palutena_special_n_g_expression) - .acmd("expression_specialairng", palutena_special_n_g_expression) - .acmd("game_speciallw", palutena_special_lw_game) - .acmd("game_specialairlw", palutena_special_air_lw_game) - .acmd("effect_speciallw", palutena_special_lw_effect) - .acmd("effect_specialairlw", palutena_special_lw_effect) - .acmd("expression_speciallw", palutena_special_lw_expression) - .acmd("expression_specialairlw", palutena_special_lw_expression) - .acmd("sound_speciallw", palutena_special_lw_sound) - .acmd("sound_specialairlw", palutena_special_lw_sound) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + + agent.acmd("game_specialnr", game_specialnr); + agent.acmd("game_specialairnr", game_specialnr); + agent.acmd("effect_specialnr", effect_specialnr); + agent.acmd("effect_specialairnr", effect_specialnr); + agent.acmd("sound_specialnr", sound_specialnr); + agent.acmd("sound_specialairnr", sound_specialnr); + agent.acmd("expression_specialnr", expression_specialnr); + agent.acmd("expression_specialairnr", expression_specialnr); + + agent.acmd("game_specialnb", game_specialnb); + agent.acmd("game_specialairnb", game_specialnb); + agent.acmd("effect_specialnb", effect_specialnb); + agent.acmd("effect_specialairnb", effect_specialnb); + agent.acmd("sound_specialnb", sound_specialnb); + agent.acmd("sound_specialairnb", sound_specialnb); + agent.acmd("expression_specialnb", expression_specialnb); + agent.acmd("expression_specialairnb", expression_specialnb); + + agent.acmd("game_specialny", game_specialny); + agent.acmd("game_specialairny", game_specialny); + agent.acmd("effect_specialny", effect_specialny); + agent.acmd("effect_specialairny", effect_specialny); + agent.acmd("sound_specialny", sound_specialny); + agent.acmd("sound_specialairny", sound_specialny); + agent.acmd("expression_specialny", expression_specialny); + agent.acmd("expression_specialairny", expression_specialny); + + agent.acmd("game_specialnp", game_specialnp); + agent.acmd("game_specialairnp", game_specialnp); + agent.acmd("effect_specialnp", effect_specialnp); + agent.acmd("effect_specialairnp", effect_specialnp); + agent.acmd("sound_specialnp", sound_specialnp); + agent.acmd("sound_specialairnp", sound_specialnp); + agent.acmd("expression_specialnp", expression_specialnp); + agent.acmd("expression_specialairnp", expression_specialnp); + + agent.acmd("game_specialno", game_specialno); + agent.acmd("game_specialairno", game_specialno); + agent.acmd("effect_specialno", effect_specialno); + agent.acmd("effect_specialairno", effect_specialno); + agent.acmd("sound_specialno", sound_specialno); + agent.acmd("sound_specialairno", sound_specialno); + agent.acmd("expression_specialno", expression_specialno); + agent.acmd("expression_specialairno", expression_specialno); + + agent.acmd("game_specialng", game_specialng); + agent.acmd("game_specialairng", game_specialng); + agent.acmd("effect_specialng", effect_specialng); + agent.acmd("effect_specialairng", effect_specialng); + agent.acmd("sound_specialng", sound_specialng); + agent.acmd("sound_specialairng", sound_specialng); + agent.acmd("expression_specialng", expression_specialng); + agent.acmd("expression_specialairng", expression_specialng); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/throws.rs b/fighters/palutena/src/acmd/throws.rs index 7c772738dd..00eb1c93be 100644 --- a/fighters/palutena/src/acmd/throws.rs +++ b/fighters/palutena/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn palutena_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -21,7 +21,7 @@ unsafe extern "C" fn palutena_catch_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn palutena_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -61,7 +61,7 @@ unsafe extern "C" fn palutena_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_throw_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -82,7 +82,7 @@ unsafe extern "C" fn palutena_throw_f_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -105,7 +105,7 @@ unsafe extern "C" fn palutena_throw_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -126,7 +126,7 @@ unsafe extern "C" fn palutena_throw_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE_RANGE(agent, 1.0, 24.0, 18.0); @@ -150,14 +150,12 @@ unsafe extern "C" fn palutena_throw_lw_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_catch", palutena_catch_game) - .acmd("game_catchdash", palutena_catch_dash_game) - .acmd("game_catchturn", palutena_catch_turn_game) - .acmd("game_throwf", palutena_throw_f_game) - .acmd("game_throwb", palutena_throw_b_game) - .acmd("game_throwhi", palutena_throw_hi_game) - .acmd("game_throwlw", palutena_throw_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/tilts.rs b/fighters/palutena/src/acmd/tilts.rs index 8a1ef7b03e..cf256245d1 100644 --- a/fighters/palutena/src/acmd/tilts.rs +++ b/fighters/palutena/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn palutena_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 11.0/(16.0-0.0)); @@ -45,7 +44,7 @@ unsafe extern "C" fn palutena_attack_s3_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -145,7 +144,7 @@ unsafe extern "C" fn palutena_attack_s3_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -184,7 +183,7 @@ unsafe extern "C" fn palutena_attack_hi3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -283,7 +282,7 @@ unsafe extern "C" fn palutena_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn palutena_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -327,28 +326,7 @@ unsafe extern "C" fn palutena_attack_lw3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn palutena_attack_lw3_expression(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - } - frame(lua_state, 13.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 34.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); - } -} - -unsafe extern "C" fn palutena_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -447,14 +425,35 @@ unsafe extern "C" fn palutena_attack_lw3_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("palutena") - .acmd("game_attacks3", palutena_attack_s3_s_game) - .acmd("effect_attacks3", palutena_attack_s3_s_effect) - .acmd("game_attackhi3", palutena_attack_hi3_game) - .acmd("effect_attackhi3", palutena_attack_hi3_effect) - .acmd("game_attacklw3", palutena_attack_lw3_game) - .acmd("expression_attacklw3", palutena_attack_lw3_expression) - .acmd("effect_attacklw3", palutena_attack_lw3_effect) - .install(); +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 15); + } } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); +} \ No newline at end of file diff --git a/fighters/palutena/src/autoaimbullet/acmd.rs b/fighters/palutena/src/autoaimbullet/acmd.rs new file mode 100644 index 0000000000..bc0554cc1a --- /dev/null +++ b/fighters/palutena/src/autoaimbullet/acmd.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; + let damage = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {10.0} else {6.0}; + let paralyze = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {0.6} else {0.4}; + if !palutena { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 361, 41, 0, 40, 2.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_palutena_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } + else { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 65, 40, 0, 75, 2.3, 0.0, 0.0, 0.0, None, None, None, paralyze, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamss"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } +} + +unsafe extern "C" fn effect_shot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let palutena = owner_module_accessor.kind() == *FIGHTER_KIND_PALUTENA; + let power = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {Hash40::new("sys_hit_elec")} else {Hash40::new("sys_hit_elec_s")}; + let size = if VarModule::is_flag(owner_module_accessor.object(), vars::palutena::instance::POWERED) {2.0} else {1.0}; + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_bullet_shot"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + if palutena { + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + } + } + if palutena { + for _ in 0..99 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.2, 1.2, 0, 0, 0, 0.23 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 0.2, -1.4, 0, 0, 0, 0.17 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.7, 0.1, 0, 0, 0, 0.32 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + LAST_EFFECT_SET_RATE(agent, 1); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 1.4, 1.0, 0, 0, 0, 0.2 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, power, Hash40::new("top"), 0.0, 2.3, -1.4, 0, 0, 0, 0.15 * size, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + LAST_EFFECT_SET_RATE(agent, 3.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_elec"), Hash40::new("top"), 0.0, 0.0, 0.0, 0, 0, 0, 1.3, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.40, 0.001); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, power, false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); + } + wait(lua_state, 1.0); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shot", game_shot); + agent.acmd("effect_shot", effect_shot); +} \ No newline at end of file diff --git a/fighters/palutena/src/autoaimbullet/mod.rs b/fighters/palutena/src/autoaimbullet/mod.rs new file mode 100644 index 0000000000..adc6deb010 --- /dev/null +++ b/fighters/palutena/src/autoaimbullet/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("palutena_autoaimbullet"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/explosiveflame/acmd.rs b/fighters/palutena/src/explosiveflame/acmd.rs new file mode 100644 index 0000000000..754835eabc --- /dev/null +++ b/fighters/palutena/src/explosiveflame/acmd.rs @@ -0,0 +1,52 @@ +use super::*; + +unsafe extern "C" fn game_explode(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 160, 100, 50, 0, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.7, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 6.0); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 7.2); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 8.4); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 9.6); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 10.8); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 12.0); + } + wait(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + //AREA_WIND_2ND_RAD(agent, 0, 1, 0.02, 1000, 1, 0, 0, 29); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 5.5, 84, 141, 0, 60, 15.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -2.7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_explode", game_explode); +} \ No newline at end of file diff --git a/fighters/palutena/src/explosiveflame/mod.rs b/fighters/palutena/src/explosiveflame/mod.rs new file mode 100644 index 0000000000..7c34dc2a21 --- /dev/null +++ b/fighters/palutena/src/explosiveflame/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("palutena_explosiveflame"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/lib.rs b/fighters/palutena/src/lib.rs index 5537dac979..76d5108212 100644 --- a/fighters/palutena/src/lib.rs +++ b/fighters/palutena/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +// articles +mod autoaimbullet; +mod explosiveflame; +mod reflectionboard; + use smash::{ lib::{ L2CValue, @@ -39,7 +44,13 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("palutena"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + autoaimbullet::install(); + explosiveflame::install(); + reflectionboard::install(); } \ No newline at end of file diff --git a/fighters/palutena/src/opff.rs b/fighters/palutena/src/opff.rs index 8a07c188c4..c87d0ea54d 100644 --- a/fighters/palutena/src/opff.rs +++ b/fighters/palutena/src/opff.rs @@ -354,11 +354,9 @@ pub extern "C" fn reflection_board_callback(weapon: &mut smash::lua2cpp::L2CFigh } } -pub fn install() { - smashline::Agent::new("palutena") - .on_line(Main, palutena_frame_wrapper) - .on_line(Main, palu_power_board) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, palutena_frame_wrapper); + agent.on_line(Main, palu_power_board); smashline::Agent::new("palutena_reflectionboard") .on_line(Main, reflection_board_callback) .install(); diff --git a/fighters/palutena/src/reflectionboard/acmd.rs b/fighters/palutena/src/reflectionboard/acmd.rs new file mode 100644 index 0000000000..28f3a5c2d0 --- /dev/null +++ b/fighters/palutena/src/reflectionboard/acmd.rs @@ -0,0 +1,20 @@ +use super::*; + +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 125, 40, 0, 75, 5.0, 0.0, 8.5, 0.0, Some(0.0), Some(-4.5), Some(0.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 40, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.1); + } + frame(lua_state, 210.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); +} \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/mod.rs b/fighters/palutena/src/reflectionboard/mod.rs new file mode 100644 index 0000000000..f024ea67bf --- /dev/null +++ b/fighters/palutena/src/reflectionboard/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("palutena_reflectionboard"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/palutena/src/status.rs b/fighters/palutena/src/status.rs index 6fcdf034d7..237d9af2f0 100644 --- a/fighters/palutena/src/status.rs +++ b/fighters/palutena/src/status.rs @@ -2,6 +2,6 @@ use super::*; mod special_n; -pub fn install() { - special_n::install(); -} +pub fn install(agent: &mut Agent) { + special_n::install(agent); +} \ No newline at end of file diff --git a/fighters/palutena/src/status/special_n.rs b/fighters/palutena/src/status/special_n.rs index e7cc369cb9..f649d18bd9 100644 --- a/fighters/palutena/src/status/special_n.rs +++ b/fighters/palutena/src/status/special_n.rs @@ -515,35 +515,28 @@ unsafe extern "C" fn special_n_g_end(fighter: &mut L2CFighterCommon) -> L2CValue return 0.into() } -pub fn install() { - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_R, special_n_r_pre) - .status(Main, statuses::palutena::SPECIAL_N_R, special_n_r_main) - .status(End, statuses::palutena::SPECIAL_N_R, special_n_r_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_B, special_n_b_pre) - .status(Main, statuses::palutena::SPECIAL_N_B, special_n_b_main) - .status(End, statuses::palutena::SPECIAL_N_B, special_n_b_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_Y, special_n_y_pre) - .status(Main, statuses::palutena::SPECIAL_N_Y, special_n_y_main) - .status(End, statuses::palutena::SPECIAL_N_Y, special_n_y_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_P, special_n_p_pre) - .status(Main, statuses::palutena::SPECIAL_N_P, special_n_p_main) - .status(End, statuses::palutena::SPECIAL_N_P, special_n_p_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_O, special_n_o_pre) - .status(Main, statuses::palutena::SPECIAL_N_O, special_n_o_main) - .status(End, statuses::palutena::SPECIAL_N_O, special_n_o_end) - .install(); - smashline::Agent::new("palutena") - .status(Pre, statuses::palutena::SPECIAL_N_G, special_n_g_pre) - .status(Main, statuses::palutena::SPECIAL_N_G, special_n_g_main) - .status(End, statuses::palutena::SPECIAL_N_G, special_n_g_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::palutena::SPECIAL_N_R, special_n_r_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_R, special_n_r_main); + agent.status(End, statuses::palutena::SPECIAL_N_R, special_n_r_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_B, special_n_b_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_B, special_n_b_main); + agent.status(End, statuses::palutena::SPECIAL_N_B, special_n_b_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_Y, special_n_y_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_Y, special_n_y_main); + agent.status(End, statuses::palutena::SPECIAL_N_Y, special_n_y_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_P, special_n_p_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_P, special_n_p_main); + agent.status(End, statuses::palutena::SPECIAL_N_P, special_n_p_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_O, special_n_o_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_O, special_n_o_main); + agent.status(End, statuses::palutena::SPECIAL_N_O, special_n_o_end); + + agent.status(Pre, statuses::palutena::SPECIAL_N_G, special_n_g_pre); + agent.status(Main, statuses::palutena::SPECIAL_N_G, special_n_g_main); + agent.status(End, statuses::palutena::SPECIAL_N_G, special_n_g_end); } \ No newline at end of file From 729c8bdd01e82f1de6e83ab94087a64675b4bdea Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:14:44 -0400 Subject: [PATCH 139/172] lucas --- fighters/lucas/src/acmd/aerials.rs | 86 ++++++++-------- fighters/lucas/src/acmd/ground.rs | 44 ++++---- fighters/lucas/src/acmd/mod.rs | 16 +-- fighters/lucas/src/acmd/other.rs | 146 ++++----------------------- fighters/lucas/src/acmd/smashes.rs | 60 ++++++----- fighters/lucas/src/acmd/specials.rs | 126 ++++++++++++----------- fighters/lucas/src/acmd/throws.rs | 20 ++-- fighters/lucas/src/acmd/tilts.rs | 44 ++++---- fighters/lucas/src/lib.rs | 14 ++- fighters/lucas/src/opff.rs | 10 +- fighters/lucas/src/pkfire/acmd.rs | 78 ++++++++++++++ fighters/lucas/src/pkfire/mod.rs | 9 ++ fighters/lucas/src/pkthunder/acmd.rs | 34 +++++++ fighters/lucas/src/pkthunder/mod.rs | 9 ++ fighters/lucas/src/status.rs | 26 ++--- 15 files changed, 369 insertions(+), 353 deletions(-) create mode 100644 fighters/lucas/src/pkfire/acmd.rs create mode 100644 fighters/lucas/src/pkfire/mod.rs create mode 100644 fighters/lucas/src/pkthunder/acmd.rs create mode 100644 fighters/lucas/src/pkthunder/mod.rs diff --git a/fighters/lucas/src/acmd/aerials.rs b/fighters/lucas/src/acmd/aerials.rs index a2b3cd7643..9a7aadfbdd 100644 --- a/fighters/lucas/src/acmd/aerials.rs +++ b/fighters/lucas/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucas_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -44,7 +44,7 @@ unsafe extern "C" fn lucas_attack_air_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_n_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -98,7 +98,7 @@ unsafe extern "C" fn lucas_attack_air_n_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_n_sound (agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairn (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -124,7 +124,7 @@ unsafe extern "C" fn lucas_attack_air_n_sound (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_landing_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -140,7 +140,7 @@ unsafe extern "C" fn lucas_landing_air_n_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_landing_air_n_effect (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_landingairn (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -150,7 +150,7 @@ unsafe extern "C" fn lucas_landing_air_n_effect (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -185,7 +185,7 @@ unsafe extern "C" fn lucas_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -199,7 +199,7 @@ unsafe extern "C" fn lucas_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -247,7 +247,7 @@ unsafe extern "C" fn lucas_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -277,7 +277,7 @@ unsafe extern "C" fn lucas_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_b_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -287,7 +287,7 @@ unsafe extern "C" fn lucas_attack_air_b_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -308,7 +308,7 @@ unsafe extern "C" fn lucas_attack_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -323,7 +323,7 @@ unsafe extern "C" fn lucas_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -336,7 +336,7 @@ unsafe extern "C" fn lucas_attack_air_hi_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -387,7 +387,7 @@ unsafe extern "C" fn lucas_attack_air_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -422,7 +422,7 @@ unsafe extern "C" fn lucas_attack_air_lw_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_lw_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -445,7 +445,7 @@ unsafe extern "C" fn lucas_attack_air_lw_sound(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_air_lw_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -464,7 +464,7 @@ unsafe extern "C" fn lucas_attack_air_lw_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -502,7 +502,7 @@ unsafe extern "C" fn lucas_attack_air_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_air_catch_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_aircatch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -518,7 +518,7 @@ unsafe extern "C" fn lucas_attack_air_catch_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn lucas_landing_air_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -534,27 +534,25 @@ unsafe extern "C" fn lucas_landing_air_catch_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attackairn", lucas_attack_air_n_game) - .acmd("effect_attackairn", lucas_attack_air_n_effect) - .acmd("sound_attackairn", lucas_attack_air_n_sound) - .acmd("game_landingairn", lucas_landing_air_n_game) - .acmd("effect_landingairn", lucas_landing_air_n_effect) - .acmd("game_attackairf", lucas_attack_air_f_game) - .acmd("effect_attackairf", lucas_attack_air_f_effect) - .acmd("game_attackairb", lucas_attack_air_b_game) - .acmd("effect_attackairb", lucas_attack_air_b_effect) - .acmd("expression_attackairb", lucas_attack_air_b_expression) - .acmd("game_attackairhi", lucas_attack_air_hi_game) - .acmd("effect_attackairhi", lucas_attack_air_hi_effect) - .acmd("expression_attackairhi", lucas_attack_air_hi_expression) - .acmd("game_attackairlw", lucas_attack_air_lw_game) - .acmd("effect_attackairlw", lucas_attack_air_lw_effect) - .acmd("sound_attackairlw", lucas_attack_air_lw_sound) - .acmd("expression_attackairlw", lucas_attack_air_lw_expression) - .acmd("game_aircatch", lucas_attack_air_catch_game) - .acmd("expression_aircatch", lucas_attack_air_catch_expression) - .acmd("game_aircatchlanding", lucas_landing_air_catch_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("game_landingairn", game_landingairn); + agent.acmd("effect_landingairn", effect_landingairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("expression_aircatch", expression_aircatch); + agent.acmd("game_aircatchlanding", game_aircatchlanding); + } diff --git a/fighters/lucas/src/acmd/ground.rs b/fighters/lucas/src/acmd/ground.rs index 8553a1bce7..54f3a5ebbf 100644 --- a/fighters/lucas/src/acmd/ground.rs +++ b/fighters/lucas/src/acmd/ground.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucas_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn lucas_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_11_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn lucas_attack_11_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -66,7 +66,7 @@ unsafe extern "C" fn lucas_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_12_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -86,7 +86,7 @@ unsafe extern "C" fn lucas_attack_12_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -101,7 +101,7 @@ unsafe extern "C" fn lucas_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_13_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -120,7 +120,7 @@ unsafe extern "C" fn lucas_attack_13_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -144,7 +144,7 @@ unsafe extern "C" fn lucas_attack_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_dash_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -167,7 +167,7 @@ unsafe extern "C" fn lucas_attack_dash_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -182,7 +182,7 @@ unsafe extern "C" fn lucas_attack_dash_sound(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_dash_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -204,17 +204,15 @@ unsafe extern "C" fn lucas_attack_dash_expression(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attack11", lucas_attack_11_game) - .acmd("effect_attack11", lucas_attack_11_effect) - .acmd("game_attack12", lucas_attack_12_game) - .acmd("effect_attack12", lucas_attack_12_effect) - .acmd("game_attack13", lucas_attack_13_game) - .acmd("effect_attack13", lucas_attack_13_effect) - .acmd("game_attackdash", lucas_attack_dash_game) - .acmd("effect_attackdash", lucas_attack_dash_effect) - .acmd("sound_attackdash", lucas_attack_dash_sound) - .acmd("expression_attackdash", lucas_attack_dash_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/lucas/src/acmd/mod.rs b/fighters/lucas/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/lucas/src/acmd/mod.rs +++ b/fighters/lucas/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/lucas/src/acmd/other.rs b/fighters/lucas/src/acmd/other.rs index 7224d84c03..172015fc3c 100644 --- a/fighters/lucas/src/acmd/other.rs +++ b/fighters/lucas/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -59,7 +59,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -73,58 +73,7 @@ unsafe extern "C" fn lucas_turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_pkfire_shoot_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - AttackModule::enable_safe_pos(boma); - } -} - -unsafe extern "C" fn lucas_pkfire_shoot_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - for i in 1..=50 { - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_RATE(agent, 0.25); - } - wait(lua_state, 8.0); - } -} - -unsafe extern "C" fn lucas_pkfire_pillar_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - //if is_excute(agent) { - // ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - // ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - //} - //wait(lua_state, 10.0); - //if is_excute(agent) { - // AttackModule::clear_all(boma); - // AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); - //} -} - -unsafe extern "C" fn lucas_pkfire_pillar_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); - EFFECT(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - /* - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); - } - */ -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -139,7 +88,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -152,16 +101,7 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } - -unsafe extern "C" fn lucas_pkfire_pillar_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_s")); - } -} - -unsafe extern "C" fn lucas_appeal_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 40.0); @@ -172,7 +112,7 @@ unsafe extern "C" fn lucas_appeal_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_appeal_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -185,60 +125,18 @@ unsafe extern "C" fn lucas_appeal_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_pkthunder_game_move(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - wait(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} - -unsafe extern "C" fn lucas_pkthunder_game_move_child(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - AttackModule::set_attack_composition_speed(boma, 1, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} - -pub fn install() { - smashline::Agent::new("lucas_pkthunder") - .acmd("game_move", lucas_pkthunder_game_move) - .acmd("game_movechild", lucas_pkthunder_game_move_child) - .install(); - smashline::Agent::new("lucas_pkfire") - .acmd("game_shoot", lucas_pkfire_shoot_game) - .acmd("effect_shoot", lucas_pkfire_shoot_effect) - .acmd("game_pillar", lucas_pkfire_pillar_game) - .acmd("effect_pillar", lucas_pkfire_pillar_effect) - .acmd("sound_pillar", lucas_pkfire_pillar_sound) - .install(); - smashline::Agent::new("lucas") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", lucas_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .acmd("game_appealhir", lucas_appeal_hi_game) - .acmd("game_appealhil", lucas_appeal_hi_game) - .acmd("game_appeallwr", lucas_appeal_lw_game) - .acmd("game_appeallwl", lucas_appeal_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealhir", game_appealhir); + agent.acmd("game_appealhil", game_appealhir); + agent.acmd("game_appeallwr", game_appeallwr); + agent.acmd("game_appeallwl", game_appeallwr); } diff --git a/fighters/lucas/src/acmd/smashes.rs b/fighters/lucas/src/acmd/smashes.rs index 285c12efed..ae6290c7b5 100644 --- a/fighters/lucas/src/acmd/smashes.rs +++ b/fighters/lucas/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucas_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { @@ -129,7 +129,7 @@ unsafe extern "C" fn lucas_attack_s4_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_s4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 9.0); if is_excute(agent){ @@ -150,7 +150,7 @@ unsafe extern "C" fn lucas_attack_s4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_s4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); if is_excute(agent) { @@ -193,7 +193,7 @@ unsafe extern "C" fn lucas_attack_s4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { @@ -278,7 +278,7 @@ unsafe extern "C" fn lucas_attack_hi4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -350,7 +350,7 @@ unsafe extern "C" fn lucas_attack_hi4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_hi4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 6.0); if is_excute(agent) { @@ -378,7 +378,7 @@ unsafe extern "C" fn lucas_attack_hi4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { @@ -434,7 +434,7 @@ unsafe extern "C" fn lucas_attack_lw4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); if is_excute(agent) { @@ -458,7 +458,7 @@ unsafe extern "C" fn lucas_attack_lw4_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -495,7 +495,7 @@ unsafe extern "C" fn lucas_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -527,7 +527,7 @@ unsafe extern "C" fn lucas_attack_lw4_expression(agent: &mut L2CAgentBase) { // LW4PT2 -unsafe extern "C" fn lucas_attack_lw4_pt2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); @@ -561,7 +561,7 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_pt2_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 4.0); if is_excute(agent) { @@ -569,7 +569,7 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_pt2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -594,7 +594,7 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_lw4_pt2_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacklw42(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -620,21 +620,19 @@ unsafe extern "C" fn lucas_attack_lw4_pt2_expression(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attacks4", lucas_attack_s4_s_game) - .acmd("sound_attacks4", lucas_attack_s4_sound) - .acmd("effect_attacks4", lucas_attack_s4_effect) - .acmd("game_attackhi4", lucas_attack_hi4_game) - .acmd("effect_attackhi4", lucas_attack_hi4_effect) - .acmd("sound_attackhi4", lucas_attack_hi4_sound) - .acmd("game_attacklw4", lucas_attack_lw4_game) - .acmd("sound_attacklw4", lucas_attack_lw4_sound) - .acmd("effect_attacklw4", lucas_attack_lw4_effect) - .acmd("expression_attacklw4", lucas_attack_lw4_expression) - .acmd("game_attacklw42", lucas_attack_lw4_pt2_game) - .acmd("sound_attacklw42", lucas_attack_lw4_pt2_sound) - .acmd("effect_attacklw42", lucas_attack_lw4_pt2_effect) - .acmd("expression_attacklw42", lucas_attack_lw4_pt2_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); + agent.acmd("game_attacklw42", game_attacklw42); + agent.acmd("sound_attacklw42", sound_attacklw42); + agent.acmd("effect_attacklw42", effect_attacklw42); + agent.acmd("expression_attacklw42", expression_attacklw42); } diff --git a/fighters/lucas/src/acmd/specials.rs b/fighters/lucas/src/acmd/specials.rs index c6c01f9a99..789e12c2f9 100644 --- a/fighters/lucas/src/acmd/specials.rs +++ b/fighters/lucas/src/acmd/specials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucas_special_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -16,7 +16,7 @@ unsafe extern "C" fn lucas_special_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_air_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -29,7 +29,7 @@ unsafe extern "C" fn lucas_special_air_s_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -38,7 +38,7 @@ unsafe extern "C" fn lucas_special_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_s_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -61,7 +61,7 @@ unsafe extern "C" fn lucas_special_s_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -105,7 +105,7 @@ unsafe extern "C" fn lucas_special_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -152,7 +152,7 @@ unsafe extern "C" fn lucas_special_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -161,7 +161,7 @@ unsafe extern "C" fn lucas_special_lw_start_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_air_lw_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -174,7 +174,7 @@ unsafe extern "C" fn lucas_special_air_lw_start_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_lw_start_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -185,7 +185,7 @@ unsafe extern "C" fn lucas_special_lw_start_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_lw_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -212,7 +212,7 @@ unsafe extern "C" fn lucas_special_lw_hold_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_lw_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -228,7 +228,7 @@ unsafe extern "C" fn lucas_special_lw_end_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_lw_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -250,7 +250,7 @@ unsafe extern "C" fn lucas_special_lw_end_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_lw_hit_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -273,7 +273,7 @@ unsafe extern "C" fn lucas_special_lw_hit_effect(agent: &mut L2CAgentBase) { // SPECIAL N START // -unsafe extern "C" fn lucas_special_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); @@ -287,7 +287,7 @@ unsafe extern "C" fn lucas_special_n_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_special_n_start_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); @@ -300,14 +300,14 @@ unsafe extern "C" fn lucas_special_n_start_sound(agent: &mut L2CAgentBase) { // SPECIAL N HOLD // -unsafe extern "C" fn lucas_special_n_hold_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { // INTENTIONALLY LEFT BLANK /* if agent.kind() == *FIGHTER_KIND_KIRBY { WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); } */ } -unsafe extern "C" fn lucas_special_n_hold_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnhold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -344,7 +344,7 @@ unsafe extern "C" fn lucas_special_n_hold_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_n_hold_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairnhold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); if is_excute(agent) { @@ -355,7 +355,7 @@ unsafe extern "C" fn lucas_special_n_hold_sound(agent: &mut L2CAgentBase) { // SPECIAL N FIRE // -unsafe extern "C" fn lucas_special_n_fire_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { @@ -387,7 +387,7 @@ unsafe extern "C" fn lucas_special_n_fire_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_n_fire_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); if is_excute(agent) { @@ -415,7 +415,7 @@ unsafe extern "C" fn lucas_special_n_fire_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_special_n_fire_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairnfire(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 2.0); if is_excute(agent) { @@ -425,7 +425,7 @@ unsafe extern "C" fn lucas_special_n_fire_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialhiend(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -439,46 +439,44 @@ unsafe extern "C" fn game_fallspecial(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_specials", lucas_special_s_game) - .acmd("game_specialairs", lucas_special_air_s_game) - .acmd("effect_specialairs", lucas_special_s_effect) - .acmd("effect_specials", lucas_special_s_effect) - .acmd("sound_specials", lucas_special_s_sound) - .acmd("sound_specialairs", lucas_special_s_sound) - .acmd("game_specialairhi", lucas_special_air_hi_game) - .acmd("effect_specialairhi", lucas_special_air_hi_effect) - .acmd("game_speciallwstart", lucas_special_lw_start_game) - .acmd("game_specialairlwstart", lucas_special_air_lw_start_game) - .acmd("effect_speciallwstart", lucas_special_lw_start_effect) - .acmd("effect_specialairlwstart", lucas_special_lw_start_effect) - .acmd("game_speciallwhold", lucas_special_lw_hold_game) - .acmd("game_specialairlwhold", lucas_special_lw_hold_game) - .acmd("game_speciallwend", lucas_special_lw_end_game) - .acmd("game_specialairlwend", lucas_special_lw_end_game) - .acmd("effect_speciallwend", lucas_special_lw_end_effect) - .acmd("effect_specialairlwend", lucas_special_lw_end_effect) - .acmd("effect_speciallwhit", lucas_special_lw_hit_effect) - .acmd("effect_specialairlwhit", lucas_special_lw_hit_effect) - .acmd("game_specialnstart", lucas_special_n_start_game) - .acmd("game_specialairnstart", lucas_special_n_start_game) - .acmd("sound_specialnstart", lucas_special_n_start_sound) - .acmd("sound_specialairnstart", lucas_special_n_start_sound) - .acmd("game_specialnhold", lucas_special_n_hold_game) - .acmd("game_specialairnhold", lucas_special_n_hold_game) - .acmd("effect_specialnhold", lucas_special_n_hold_effect) - .acmd("effect_specialairnhold", lucas_special_n_hold_effect) - .acmd("sound_specialairnhold", lucas_special_n_hold_sound) - .acmd("sound_specialnhold", lucas_special_n_hold_sound) - .acmd("game_specialnfire", lucas_special_n_fire_game) - .acmd("game_specialairnfire", lucas_special_n_fire_game) - .acmd("effect_specialnfire", lucas_special_n_fire_effect) - .acmd("effect_specialairnfire", lucas_special_n_fire_effect) - .acmd("sound_specialairnfire", lucas_special_n_fire_sound) - .acmd("sound_specialnfire", lucas_special_n_fire_sound) - .acmd("game_specialairhiend", game_specialhiend) - .acmd("game_specialhiend", game_specialhiend) - .acmd("game_fallspecial", game_fallspecial) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("effect_specials", effect_specialairs); + agent.acmd("sound_specials", sound_specials); + agent.acmd("sound_specialairs", sound_specials); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_speciallwstart", game_speciallwstart); + agent.acmd("game_specialairlwstart", game_specialairlwstart); + agent.acmd("effect_speciallwstart", effect_speciallwstart); + agent.acmd("effect_specialairlwstart", effect_speciallwstart); + agent.acmd("game_speciallwhold", game_speciallwhold); + agent.acmd("game_specialairlwhold", game_speciallwhold); + agent.acmd("game_speciallwend", game_speciallwend); + agent.acmd("game_specialairlwend", game_speciallwend); + agent.acmd("effect_speciallwend", effect_speciallwend); + agent.acmd("effect_specialairlwend", effect_speciallwend); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("sound_specialnstart", sound_specialnstart); + agent.acmd("sound_specialairnstart", sound_specialnstart); + agent.acmd("game_specialnhold", game_specialnhold); + agent.acmd("game_specialairnhold", game_specialnhold); + agent.acmd("effect_specialnhold", effect_specialnhold); + agent.acmd("effect_specialairnhold", effect_specialnhold); + agent.acmd("sound_specialairnhold", sound_specialairnhold); + agent.acmd("sound_specialnhold", sound_specialairnhold); + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialairnfire); + agent.acmd("sound_specialnfire", sound_specialairnfire); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhiend", game_specialairhiend); + agent.acmd("game_fallspecial", game_fallspecial); } diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index c7a4bdabc0..180b908a1b 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -211,15 +211,13 @@ unsafe extern "C" fn expression_throwlw(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_catch", game_catch) - .acmd("game_catchdash", game_catchdash) - .acmd("game_catchturn", game_catchturn) - .acmd("game_throwf", game_throwf) - .acmd("game_throwb", game_throwb) - .acmd("game_throwhi", game_throwhi) - .acmd("game_throwlw", game_throwlw) - .acmd("expression_throwlw", expression_throwlw) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("expression_throwlw", expression_throwlw); } diff --git a/fighters/lucas/src/acmd/tilts.rs b/fighters/lucas/src/acmd/tilts.rs index b7492cf84f..94c926f895 100644 --- a/fighters/lucas/src/acmd/tilts.rs +++ b/fighters/lucas/src/acmd/tilts.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn lucas_attack_s3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn lucas_attack_s3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_s3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn lucas_attack_s3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn lucas_attack_s3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -68,7 +68,7 @@ unsafe extern "C" fn lucas_attack_s3_expression(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -94,7 +94,7 @@ unsafe extern "C" fn lucas_attack_hi3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -120,7 +120,7 @@ unsafe extern "C" fn lucas_attack_hi3_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 4.0); @@ -139,7 +139,7 @@ unsafe extern "C" fn lucas_attack_lw3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn lucas_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -164,20 +164,18 @@ unsafe extern "C" fn lucas_attack_lw3_effect(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("lucas") - .acmd("game_attacks3lw", lucas_attack_s3_game) - .acmd("game_attacks3", lucas_attack_s3_game) - .acmd("game_attacks3hi", lucas_attack_s3_game) - .acmd("effect_attacks3lw", lucas_attack_s3_effect) - .acmd("effect_attacks3", lucas_attack_s3_effect) - .acmd("effect_attacks3hi", lucas_attack_s3_effect) - .acmd("expression_attacks3lw", lucas_attack_s3_expression) - .acmd("expression_attacks3", lucas_attack_s3_expression) - .acmd("expression_attacks3hi", lucas_attack_s3_expression) - .acmd("game_attackhi3", lucas_attack_hi3_game) - .acmd("effect_attackhi3", lucas_attack_hi3_effect) - .acmd("game_attacklw3", lucas_attack_lw3_game) - .acmd("effect_attacklw3", lucas_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attacks3", game_attacks3lw); + agent.acmd("game_attacks3hi", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("effect_attacks3", effect_attacks3lw); + agent.acmd("effect_attacks3hi", effect_attacks3lw); + agent.acmd("expression_attacks3lw", expression_attacks3lw); + agent.acmd("expression_attacks3", expression_attacks3lw); + agent.acmd("expression_attacks3hi", expression_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/lucas/src/lib.rs b/fighters/lucas/src/lib.rs index d822b8c43b..40d63830ff 100644 --- a/fighters/lucas/src/lib.rs +++ b/fighters/lucas/src/lib.rs @@ -6,6 +6,9 @@ pub mod acmd; pub mod status; pub mod opff; +mod pkfire; +mod pkthunder; + use smash::{ lib::{ L2CValue, @@ -38,7 +41,12 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("lucas"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + pkfire::install(); + pkthunder::install(); } \ No newline at end of file diff --git a/fighters/lucas/src/opff.rs b/fighters/lucas/src/opff.rs index 037c17ed8b..5bbb239e48 100644 --- a/fighters/lucas/src/opff.rs +++ b/fighters/lucas/src/opff.rs @@ -455,11 +455,7 @@ pub extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase } } -pub fn install() { - smashline::Agent::new("lucas") - .on_line(Main, lucas_frame_wrapper) - .install(); - smashline::Agent::new("lucas_pkthunder") - .on_line(Main, pkthunder_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, lucas_frame_wrapper); + agent.on_line(Main, pkthunder_callback); } \ No newline at end of file diff --git a/fighters/lucas/src/pkfire/acmd.rs b/fighters/lucas/src/pkfire/acmd.rs new file mode 100644 index 0000000000..84ce8021e1 --- /dev/null +++ b/fighters/lucas/src/pkfire/acmd.rs @@ -0,0 +1,78 @@ +use super::*; +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 60, 10, 0, 60, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + AttackModule::enable_safe_pos(boma); + } +} +unsafe extern "C" fn effect_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for i in 1..=50 { + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_bullet_ed"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("lucas_pkfr_bullet_ed"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_RATE(agent, 0.25); + } + wait(lua_state, 8.0); + } +} + +unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + //if is_excute(agent) { + // ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 7.0, 0.0, 2.0, 2.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + // ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 45, 10, 0, 20, 5.0, 0.0, 7.0, 8.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + //} + //wait(lua_state, 10.0); + //if is_excute(agent) { + // AttackModule::clear_all(boma); + // AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); + //} +} +unsafe extern "C" fn effect_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("lucas_pkfi_start"), Hash40::new("lucas_pkfi_start"), Hash40::new("top"), -0.5, 0, 0, 0, 0, 0, 1, true, *EF_FLIP_YZ); + EFFECT(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + /* + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("lucas_pkfi_bomb"), Hash40::new("top"), 0, -4.5, -2.7, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, true); + } + */ +} +unsafe extern "C" fn sound_pillar(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_s")); + } +} +unsafe extern "C" fn lucas_pkthunder_game_move_child(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + AttackModule::set_attack_composition_speed(boma, 1, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot", game_shoot); + agent.acmd("effect_shoot", effect_shoot); + agent.acmd("game_pillar", game_pillar); + agent.acmd("effect_pillar", effect_pillar); + agent.acmd("sound_pillar", sound_pillar); +} diff --git a/fighters/lucas/src/pkfire/mod.rs b/fighters/lucas/src/pkfire/mod.rs new file mode 100644 index 0000000000..44e6808439 --- /dev/null +++ b/fighters/lucas/src/pkfire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("lucas_pkfire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/acmd.rs b/fighters/lucas/src/pkthunder/acmd.rs new file mode 100644 index 0000000000..5228c11acc --- /dev/null +++ b/fighters/lucas/src/pkthunder/acmd.rs @@ -0,0 +1,34 @@ +use super::*; +unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + wait(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 50, 0, 70, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 2.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 48, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} +unsafe extern "C" fn game_movechild(fighter: &mut L2CAgentBase) { + let lua_state = fighter.lua_state_agent; + let boma = fighter.boma(); + if is_excute(fighter) { + ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + AttackModule::set_attack_composition_speed(boma, 1, true); + } + wait(lua_state, 1.0); + if is_excute(fighter) { + if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + } + } +} + + +pub fn install(agent: &mut Agent) { + agent.acmd("game_move", game_move); + agent.acmd("game_movechild", game_movechild); +} diff --git a/fighters/lucas/src/pkthunder/mod.rs b/fighters/lucas/src/pkthunder/mod.rs new file mode 100644 index 0000000000..5fadb6a06a --- /dev/null +++ b/fighters/lucas/src/pkthunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("lucas_pkthunder"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucas/src/status.rs b/fighters/lucas/src/status.rs index 90620cfe3c..3cdd984986 100644 --- a/fighters/lucas/src/status.rs +++ b/fighters/lucas/src/status.rs @@ -438,19 +438,15 @@ unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) 0.into() } -pub fn install() { - smashline::Agent::new("lucas") - .on_start(lucas_reset) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre) - .status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air) - .status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end) - .status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi) - .status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack,) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4) - .install(); - smashline::Agent::new("lucas_pkthunder") - .status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_start(lucas_reset); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); + agent.status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); + agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack,); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4); + agent.status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); } \ No newline at end of file From a71da793fee961e13438b376a34cfb175a9d9c98 Mon Sep 17 00:00:00 2001 From: BEANSS0328 <140671376+BEANSS0328@users.noreply.github.com> Date: Tue, 26 Mar 2024 20:31:28 -0400 Subject: [PATCH 140/172] the end. --- fighters/edge/src/acmd/aerials.rs | 44 ++++--- fighters/edge/src/acmd/ground.rs | 28 +++-- fighters/edge/src/acmd/mod.rs | 16 +-- fighters/edge/src/acmd/other.rs | 136 +++------------------- fighters/edge/src/acmd/smashes.rs | 28 +++-- fighters/edge/src/acmd/specials.rs | 68 ++++++----- fighters/edge/src/acmd/throws.rs | 44 ++++--- fighters/edge/src/acmd/tilts.rs | 52 ++++----- fighters/edge/src/fire/acmd.rs | 38 ++++++ fighters/edge/src/fire/mod.rs | 9 ++ fighters/edge/src/flare1/acmd.rs | 21 ++++ fighters/edge/src/flare1/mod.rs | 9 ++ fighters/edge/src/flare2/acmd.rs | 39 +++++++ fighters/edge/src/flare2/mod.rs | 9 ++ fighters/edge/src/flash/acmd.rs | 30 +++++ fighters/edge/src/flash/mod.rs | 9 ++ fighters/edge/src/lib.rs | 20 +++- fighters/edge/src/opff.rs | 10 +- fighters/edge/src/status/edge_fire_fly.rs | 8 +- fighters/edge/src/status/mod.rs | 8 +- fighters/edge/src/status/special_hi.rs | 6 +- fighters/edge/src/status/special_n.rs | 6 +- 22 files changed, 347 insertions(+), 291 deletions(-) create mode 100644 fighters/edge/src/fire/acmd.rs create mode 100644 fighters/edge/src/fire/mod.rs create mode 100644 fighters/edge/src/flare1/acmd.rs create mode 100644 fighters/edge/src/flare1/mod.rs create mode 100644 fighters/edge/src/flare2/acmd.rs create mode 100644 fighters/edge/src/flare2/mod.rs create mode 100644 fighters/edge/src/flash/acmd.rs create mode 100644 fighters/edge/src/flash/mod.rs diff --git a/fighters/edge/src/acmd/aerials.rs b/fighters/edge/src/acmd/aerials.rs index 7dbcddf2ad..7c51857d15 100644 --- a/fighters/edge/src/acmd/aerials.rs +++ b/fighters/edge/src/acmd/aerials.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -49,7 +49,7 @@ unsafe extern "C" fn sephiroth_attack_air_n_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_air_n_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -89,7 +89,7 @@ unsafe extern "C" fn sephiroth_attack_air_n_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -141,7 +141,7 @@ unsafe extern "C" fn sephiroth_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_air_f_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -181,7 +181,7 @@ unsafe extern "C" fn sephiroth_attack_air_f_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -218,7 +218,7 @@ unsafe extern "C" fn sephiroth_attack_air_b_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_air_b_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -269,7 +269,7 @@ unsafe extern "C" fn sephiroth_attack_air_b_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -309,7 +309,7 @@ unsafe extern "C" fn sephiroth_attack_air_hi_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -369,7 +369,7 @@ unsafe extern "C" fn sephiroth_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -432,7 +432,7 @@ unsafe extern "C" fn sephiroth_attack_air_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_air_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -484,17 +484,15 @@ unsafe extern "C" fn sephiroth_attack_air_lw_effect(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attackairn", sephiroth_attack_air_n_game) - .acmd("effect_attackairn", sephiroth_attack_air_n_effect) - .acmd("game_attackairf", sephiroth_attack_air_f_game) - .acmd("effect_attackairf", sephiroth_attack_air_f_effect) - .acmd("game_attackairb", sephiroth_attack_air_b_game) - .acmd("effect_attackairb", sephiroth_attack_air_b_effect) - .acmd("game_attackairhi", sephiroth_attack_air_hi_game) - .acmd("effect_attackairhi", sephiroth_attack_air_hi_effect) - .acmd("game_attackairlw", sephiroth_attack_air_lw_game) - .acmd("effect_attackairlw", sephiroth_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/edge/src/acmd/ground.rs b/fighters/edge/src/acmd/ground.rs index 87ce3f4521..6c43d6e234 100644 --- a/fighters/edge/src/acmd/ground.rs +++ b/fighters/edge/src/acmd/ground.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -25,7 +25,7 @@ unsafe extern "C" fn sephiroth_attack_11_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_11_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -49,7 +49,7 @@ unsafe extern "C" fn sephiroth_attack_11_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -74,7 +74,7 @@ unsafe extern "C" fn sephiroth_attack_12_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -109,7 +109,7 @@ unsafe extern "C" fn sephiroth_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_13_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -144,7 +144,7 @@ unsafe extern "C" fn sephiroth_attack_13_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.8); @@ -171,13 +171,11 @@ unsafe extern "C" fn sephiroth_attack_dash_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attack11", sephiroth_attack_11_game) - .acmd("expression_attack11", sephiroth_attack_11_expression) - .acmd("game_attack12", sephiroth_attack_12_game) - .acmd("game_attack13", sephiroth_attack_13_game) - .acmd("effect_attack13", sephiroth_attack_13_effect) - .acmd("game_attackdash", sephiroth_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/edge/src/acmd/mod.rs b/fighters/edge/src/acmd/mod.rs index 9d951ba688..3c5f6b840f 100644 --- a/fighters/edge/src/acmd/mod.rs +++ b/fighters/edge/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod tilts; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index 86de41081b..9361bfd1b6 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -55,7 +55,7 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -68,7 +68,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -83,88 +83,6 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } } - -unsafe extern "C" fn edge_fire_special_n1_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn edge_fire_special_n2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn edge_fire_burst_s_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - AttackModule::disable_tip(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 6.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn edge_flare1_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::disable_tip(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); - AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); - } - -} - -unsafe extern "C" fn edge_flare2_exp_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 1.0); - if is_excute(agent) { - if !WorkModule::is_flag(boma, *WEAPON_EDGE_FLARE2_INSTANCE_WORK_ID_FLAG_REFLECT) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } - } -} - -unsafe extern "C" fn edge_flare2_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 15, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn edge_flare2_try_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - unsafe extern "C" fn edge_flash_game_attack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -190,7 +108,7 @@ unsafe extern "C" fn edge_flash_game_attack(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -205,7 +123,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -219,33 +137,15 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("edge_fire") - .acmd("game_specialn1", edge_fire_special_n1_game) - .acmd("game_specialn2", edge_fire_special_n2_game) - .acmd("game_bursts", edge_fire_burst_s_game) - .install(); - smashline::Agent::new("edge_flare1") - .acmd("game_fly", edge_flare1_fly_game) - .install(); - smashline::Agent::new("edge_flare2") - .acmd("game_exp", edge_flare2_exp_game) - .acmd("game_fly", edge_flare2_fly_game) - .acmd("game_try", edge_flare2_try_game) - .install(); - smashline::Agent::new("edge_flash") - .acmd("game_attack", edge_flash_game_attack) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/edge/src/acmd/smashes.rs b/fighters/edge/src/acmd/smashes.rs index a0f18170d2..84255a1616 100644 --- a/fighters/edge/src/acmd/smashes.rs +++ b/fighters/edge/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn sephiroth_attack_s4_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -50,7 +50,7 @@ unsafe extern "C" fn sephiroth_attack_s4_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_s4_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -106,7 +106,7 @@ unsafe extern "C" fn sephiroth_attack_s4_s_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_hi4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -167,7 +167,7 @@ unsafe extern "C" fn sephiroth_attack_hi4_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_hi4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -231,7 +231,7 @@ unsafe extern "C" fn sephiroth_attack_hi4_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn sephiroth_attack_lw4_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -290,7 +290,7 @@ unsafe extern "C" fn sephiroth_attack_lw4_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sephiroth_attack_lw4_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -361,13 +361,11 @@ unsafe extern "C" fn sephiroth_attack_lw4_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attacks4", sephiroth_attack_s4_s_game) - .acmd("effect_attacks4", sephiroth_attack_s4_s_effect) - .acmd("game_attackhi4", sephiroth_attack_hi4_game) - .acmd("effect_attackhi4", sephiroth_attack_hi4_effect) - .acmd("game_attacklw4", sephiroth_attack_lw4_game) - .acmd("effect_attacklw4", sephiroth_attack_lw4_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", game_attackhi4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/edge/src/acmd/specials.rs b/fighters/edge/src/acmd/specials.rs index 8e895611e1..0ec01b8a9e 100644 --- a/fighters/edge/src/acmd/specials.rs +++ b/fighters/edge/src/acmd/specials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn edge_special_n_start(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 20.0); @@ -35,7 +35,7 @@ unsafe extern "C" fn edge_special_n_start(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_n1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -59,7 +59,7 @@ unsafe extern "C" fn edge_special_n1_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_special_n2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -149,7 +149,7 @@ unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_hi2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -197,7 +197,7 @@ unsafe extern "C" fn edge_special_hi2_game(agent: &mut L2CAgentBase) { FighterSpecializer_Edge::clear_special_hi_jostle_area(boma); } -unsafe extern "C" fn edge_special_hi2_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -383,7 +383,7 @@ unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_hi1_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -409,7 +409,7 @@ unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_hi2_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialhi2end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -424,7 +424,7 @@ unsafe extern "C" fn edge_special_hi2_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_air_hi_2_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi2end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let mut kb_angle = 0; @@ -458,7 +458,7 @@ unsafe extern "C" fn edge_special_air_hi_2_end_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -478,7 +478,7 @@ unsafe extern "C" fn edge_special_lw_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_special_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -496,7 +496,7 @@ unsafe extern "C" fn edge_special_lw_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_special_lw_hit_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -525,7 +525,7 @@ unsafe extern "C" fn edge_special_lw_hit_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_special_lw_hit_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -536,32 +536,30 @@ unsafe extern "C" fn edge_special_lw_hit_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_specialnstart", edge_special_n_start) - .acmd("game_specialairnstart", edge_special_n_start) - .acmd("game_specialn1", edge_special_n1_game) - .acmd("game_specialairn1", edge_special_n1_game) - .acmd("game_specialn2", edge_special_n2_game) - .acmd("game_specialairn2", edge_special_n2_game) +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); //.acmd("game_specialhistart", game_specialhistart) //.acmd("effect_specialhistart", effect_specialhistart) //.acmd("game_specialairhistart", game_specialairhistart) - .acmd("game_specialhi2", edge_special_hi2_game) - .acmd("effect_specialhi2", edge_special_hi2_effect) + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); //.acmd("game_specialhi1", game_specialhi1) //.acmd("effect_specialhi1", effect_specialhi1) - .acmd("game_specialhi1end", edge_special_hi1_end_game) - .acmd("game_specialairhi1end", game_specialairhi1end) - .acmd("game_specialhi2end", edge_special_hi2_end_game) - .acmd("game_specialairhi2end", edge_special_air_hi_2_end_game) - .acmd("game_speciallw", edge_special_lw_game) - .acmd("game_specialairlw", edge_special_lw_game) - .acmd("effect_speciallw", edge_special_lw_effect) - .acmd("effect_specialairlw", edge_special_lw_effect) - .acmd("game_speciallwhit", edge_special_lw_hit_game) - .acmd("game_specialairlwhit", edge_special_lw_hit_game) - .acmd("effect_speciallwhit", edge_special_lw_hit_effect) - .acmd("effect_specialairlwhit", edge_special_lw_hit_effect) - .install(); + agent.acmd("game_specialhi1end", game_specialhi1end); + agent.acmd("game_specialairhi1end", game_specialairhi1end); + agent.acmd("game_specialhi2end", game_specialhi2end); + agent.acmd("game_specialairhi2end", game_specialairhi2end); + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); + agent.acmd("effect_speciallwhit", effect_speciallwhit); + agent.acmd("effect_specialairlwhit", effect_speciallwhit); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/throws.rs b/fighters/edge/src/acmd/throws.rs index e487f2af25..c2325db343 100644 --- a/fighters/edge/src/acmd/throws.rs +++ b/fighters/edge/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn edge_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -21,7 +21,7 @@ unsafe extern "C" fn edge_catch_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -41,7 +41,7 @@ unsafe extern "C" fn edge_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -61,7 +61,7 @@ unsafe extern "C" fn edge_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -85,7 +85,7 @@ unsafe extern "C" fn edge_throw_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_throw_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -117,7 +117,7 @@ unsafe extern "C" fn edge_throw_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_throw_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 16.0); @@ -159,7 +159,7 @@ unsafe extern "C" fn edge_throw_hi_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_hi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -177,7 +177,7 @@ unsafe extern "C" fn edge_throw_hi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_hi_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -190,7 +190,7 @@ unsafe extern "C" fn edge_throw_hi_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_throw_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -211,7 +211,7 @@ unsafe extern "C" fn edge_throw_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_throw_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -251,17 +251,15 @@ unsafe extern "C" fn edge_throw_lw_effect(agent: &mut L2CAgentBase) { } } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_catch", edge_catch_game) - .acmd("game_catchdash", edge_catch_dash_game) - .acmd("game_catchturn", edge_catch_turn_game) - .acmd("game_throwb", edge_throw_b_game) - .acmd("game_throwhi", edge_throw_hi_game) - .acmd("effect_throwhi", edge_throw_hi_effect) - .acmd("sound_throwhi", edge_throw_hi_sound) - .acmd("expression_throwhi", edge_throw_hi_expression) - .acmd("game_throwlw", edge_throw_lw_game) - .acmd("effect_throwlw", edge_throw_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("effect_throwlw", effect_throwlw); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/tilts.rs b/fighters/edge/src/acmd/tilts.rs index 204a3113f1..02c00cf290 100644 --- a/fighters/edge/src/acmd/tilts.rs +++ b/fighters/edge/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn edge_attack_s3_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -36,7 +36,7 @@ unsafe extern "C" fn edge_attack_s3_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_s3_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -85,7 +85,7 @@ unsafe extern "C" fn edge_attack_s3_hi_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -121,7 +121,7 @@ unsafe extern "C" fn edge_attack_s3_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_s3_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -170,7 +170,7 @@ unsafe extern "C" fn edge_attack_s3_s_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_s3_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -206,7 +206,7 @@ unsafe extern "C" fn edge_attack_s3_lw_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_s3_lw_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -259,7 +259,7 @@ unsafe extern "C" fn edge_attack_s3_lw_effect(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -294,7 +294,7 @@ unsafe extern "C" fn edge_attack_hi3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.5); @@ -330,7 +330,7 @@ unsafe extern "C" fn edge_attack_hi3_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_attack_hi3_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -348,7 +348,7 @@ unsafe extern "C" fn edge_attack_hi3_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_attack_hi3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -364,7 +364,7 @@ unsafe extern "C" fn edge_attack_hi3_expression(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -390,7 +390,7 @@ unsafe extern "C" fn edge_attack_lw3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn edge_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -425,19 +425,17 @@ unsafe extern "C" fn edge_attack_lw3_effect(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("edge") - .acmd("game_attacks3hi", edge_attack_s3_hi_game) - .acmd("effect_attacks3hi", edge_attack_s3_hi_effect) - .acmd("game_attacks3", edge_attack_s3_s_game) - .acmd("effect_attacks3", edge_attack_s3_s_effect) - .acmd("game_attacks3lw", edge_attack_s3_lw_game) - .acmd("effect_attacks3lw", edge_attack_s3_lw_effect) - .acmd("game_attackhi3", edge_attack_hi3_game) - .acmd("effect_attackhi3", edge_attack_hi3_effect) - .acmd("sound_attackhi3", edge_attack_hi3_sound) - .acmd("expression_attackhi3", edge_attack_hi3_expression) - .acmd("game_attacklw3", edge_attack_lw3_game) - .acmd("effect_attacklw3", edge_attack_lw3_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); } \ No newline at end of file diff --git a/fighters/edge/src/fire/acmd.rs b/fighters/edge/src/fire/acmd.rs new file mode 100644 index 0000000000..e42052e59a --- /dev/null +++ b/fighters/edge/src/fire/acmd.rs @@ -0,0 +1,38 @@ +use super::*; + +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + +} + +unsafe extern "C" fn game_bursts(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 9, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 6, false, *BATTLE_OBJECT_ID_INVALID as u32); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AttackModule::disable_tip(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 70, 64, 0, 77, 12.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -5, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 6.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_bursts", game_bursts); +} \ No newline at end of file diff --git a/fighters/edge/src/fire/mod.rs b/fighters/edge/src/fire/mod.rs new file mode 100644 index 0000000000..c5d86a9b30 --- /dev/null +++ b/fighters/edge/src/fire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_fire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flare1/acmd.rs b/fighters/edge/src/flare1/acmd.rs new file mode 100644 index 0000000000..160178e2e6 --- /dev/null +++ b/fighters/edge/src/flare1/acmd.rs @@ -0,0 +1,21 @@ +use super::*; +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::disable_tip(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 2.0, 0.0, -1.0, 0.0, Some(0.0), Some(-1.0), Some(-8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 361, 30, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 3, 0, Hash40::new("top"), 2.0, 361, 100, 0, 10, 3.5, 0.0, -1.0, -1.5, Some(0.0), Some(-1.0), Some(-6.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, -1.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); + } + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_fly", game_fly); +} diff --git a/fighters/edge/src/flare1/mod.rs b/fighters/edge/src/flare1/mod.rs new file mode 100644 index 0000000000..219c3c32e6 --- /dev/null +++ b/fighters/edge/src/flare1/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flare1"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flare2/acmd.rs b/fighters/edge/src/flare2/acmd.rs new file mode 100644 index 0000000000..c92bab393f --- /dev/null +++ b/fighters/edge/src/flare2/acmd.rs @@ -0,0 +1,39 @@ +use super::*; +unsafe extern "C" fn game_exp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 75, 0, 50, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 1.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *WEAPON_EDGE_FLARE2_INSTANCE_WORK_ID_FLAG_REFLECT) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } + } +} + +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_furafura"), 15, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 50, 75, 0, 65, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.4, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 45, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +unsafe extern "C" fn game_try(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackl"), 2, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 53, 75, 0, 50, 1.5, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_exp", game_exp); + agent.acmd("game_fly", game_fly); + agent.acmd("game_try", game_try); +} diff --git a/fighters/edge/src/flare2/mod.rs b/fighters/edge/src/flare2/mod.rs new file mode 100644 index 0000000000..0573cdb060 --- /dev/null +++ b/fighters/edge/src/flare2/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flare2"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flash/acmd.rs b/fighters/edge/src/flash/acmd.rs new file mode 100644 index 0000000000..804b8976c2 --- /dev/null +++ b/fighters/edge/src/flash/acmd.rs @@ -0,0 +1,30 @@ +use super::*; + +unsafe extern "C" fn game_attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let edge = utils::util::get_battle_object_from_id(owner_id); + if VarModule::is_flag(edge, vars::edge::status::FLASH_HOLD) { + let pos_x = PostureModule::pos_x(boma); + let pos_y = PostureModule::pos_y(boma); + let facing = PostureModule::lr(boma); + PostureModule::set_pos(boma, &Vector3f::new(pos_x + (35.0 * PostureModule::lr(boma)), pos_y, 0.0)); + } + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 16.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { +agent.acmd("game_attack", game_attack); +} diff --git a/fighters/edge/src/flash/mod.rs b/fighters/edge/src/flash/mod.rs new file mode 100644 index 0000000000..07ec161372 --- /dev/null +++ b/fighters/edge/src/flash/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("edge_flash"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/lib.rs b/fighters/edge/src/lib.rs index c033917585..c8eaa3feed 100644 --- a/fighters/edge/src/lib.rs +++ b/fighters/edge/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +mod fire; +mod flare1; +mod flare2; +mod flash; + use smash::{ lib::{ L2CValue, @@ -39,7 +44,16 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - opff::install(); - status::install(); + let agent = &mut Agent::new("edge"); + acmd::install(agent); + opff::install(agent); + status::install(agent); + + agent.install(); + + fire::install(); + flare1::install(); + flare2::install(); + flash::install(); + } \ No newline at end of file diff --git a/fighters/edge/src/opff.rs b/fighters/edge/src/opff.rs index 1ff9b4df49..05c32d7e5d 100644 --- a/fighters/edge/src/opff.rs +++ b/fighters/edge/src/opff.rs @@ -127,11 +127,7 @@ pub extern "C" fn shadowflare_orb_callback(weapon: &mut smash::lua2cpp::L2CFight } } -pub fn install() { - smashline::Agent::new("edge") - .on_line(Main, edge_frame_wrapper) - .install(); - smashline::Agent::new("edge_flaredummy") - .on_line(Main, shadowflare_orb_callback) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, edge_frame_wrapper); + agent.on_line(Main, shadowflare_orb_callback); } \ No newline at end of file diff --git a/fighters/edge/src/status/edge_fire_fly.rs b/fighters/edge/src/status/edge_fire_fly.rs index abfe6cf7b1..38e798d381 100644 --- a/fighters/edge/src/status/edge_fire_fly.rs +++ b/fighters/edge/src/status/edge_fire_fly.rs @@ -89,9 +89,7 @@ unsafe extern "C" fn sub_fly(fighter: &mut L2CWeaponCommon, status: L2CValue) -> return 1.into() } -pub fn install() { - smashline::Agent::new("edge_fire") - .status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, fly_s_main) - .status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, fly_m_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, fly_s_main); + agent.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, fly_m_main); } \ No newline at end of file diff --git a/fighters/edge/src/status/mod.rs b/fighters/edge/src/status/mod.rs index b34c1e9582..aaafb095ba 100644 --- a/fighters/edge/src/status/mod.rs +++ b/fighters/edge/src/status/mod.rs @@ -4,8 +4,8 @@ mod special_n; mod special_hi; mod edge_fire_fly; -pub fn install() { - special_n::install(); - special_hi::install(); - edge_fire_fly::install(); +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_hi::install(agent); + edge_fire_fly::install(agent); } \ No newline at end of file diff --git a/fighters/edge/src/status/special_hi.rs b/fighters/edge/src/status/special_hi.rs index 9a7a942f63..beabbce680 100644 --- a/fighters/edge/src/status/special_hi.rs +++ b/fighters/edge/src/status/special_hi.rs @@ -490,11 +490,9 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // 0.into() // } -pub fn install() { - smashline::Agent::new("edge") +pub fn install(agent: &mut Agent) { //.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_pre) //.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_main) - .status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_rush_main) + agent.status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_rush_main); //.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_end) - .install(); } \ No newline at end of file diff --git a/fighters/edge/src/status/special_n.rs b/fighters/edge/src/status/special_n.rs index a966ead199..75c2231fc5 100644 --- a/fighters/edge/src/status/special_n.rs +++ b/fighters/edge/src/status/special_n.rs @@ -101,8 +101,6 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par } } -pub fn install() { - smashline::Agent::new("edge") - .status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); } \ No newline at end of file From 022789e976f3dd289b09c97d3f87d6ca88f186fb Mon Sep 17 00:00:00 2001 From: Askew Date: Tue, 26 Mar 2024 20:51:04 -0400 Subject: [PATCH 141/172] Kept ya waiting huh --- fighters/snake/src/acmd/aerials.rs | 26 +- fighters/snake/src/acmd/ground.rs | 23 +- fighters/snake/src/acmd/mod.rs | 18 +- fighters/snake/src/acmd/other.rs | 415 ++------------------- fighters/snake/src/acmd/smashes.rs | 298 ++++++++------- fighters/snake/src/acmd/specials.rs | 443 ++++++++--------------- fighters/snake/src/acmd/throws.rs | 19 +- fighters/snake/src/acmd/tilts.rs | 23 +- fighters/snake/src/c4/acmd.rs | 215 +++++++++++ fighters/snake/src/c4/mod.rs | 9 + fighters/snake/src/cypher/acmd.rs | 9 + fighters/snake/src/cypher/mod.rs | 9 + fighters/snake/src/lib.rs | 23 +- fighters/snake/src/nikita/acmd.rs | 14 + fighters/snake/src/nikita/mod.rs | 9 + fighters/snake/src/nikitamissile/acmd.rs | 106 ++++++ fighters/snake/src/nikitamissile/mod.rs | 9 + fighters/snake/src/opff.rs | 10 +- fighters/snake/src/status/appeal.rs | 34 +- fighters/snake/src/status/attack_s4.rs | 18 +- fighters/snake/src/status/catch.rs | 36 +- fighters/snake/src/status/mod.rs | 16 +- fighters/snake/src/status/special_s.rs | 13 +- fighters/snake/src/trenchmortar/acmd.rs | 22 ++ fighters/snake/src/trenchmortar/mod.rs | 9 + 25 files changed, 850 insertions(+), 976 deletions(-) create mode 100644 fighters/snake/src/c4/acmd.rs create mode 100644 fighters/snake/src/c4/mod.rs create mode 100644 fighters/snake/src/cypher/acmd.rs create mode 100644 fighters/snake/src/cypher/mod.rs create mode 100644 fighters/snake/src/nikita/acmd.rs create mode 100644 fighters/snake/src/nikita/mod.rs create mode 100644 fighters/snake/src/nikitamissile/acmd.rs create mode 100644 fighters/snake/src/nikitamissile/mod.rs create mode 100644 fighters/snake/src/trenchmortar/acmd.rs create mode 100644 fighters/snake/src/trenchmortar/mod.rs diff --git a/fighters/snake/src/acmd/aerials.rs b/fighters/snake/src/acmd/aerials.rs index d96b71eb77..71a89f55c9 100644 --- a/fighters/snake/src/acmd/aerials.rs +++ b/fighters/snake/src/acmd/aerials.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn snake_attack_air_n_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -70,7 +70,7 @@ unsafe extern "C" fn snake_attack_air_n_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_air_f_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -106,7 +106,7 @@ unsafe extern "C" fn snake_attack_air_f_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_air_b_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -145,7 +145,7 @@ unsafe extern "C" fn snake_attack_air_b_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_air_hi_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -175,7 +175,7 @@ unsafe extern "C" fn snake_attack_air_hi_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_air_lw_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -244,12 +244,10 @@ unsafe extern "C" fn snake_attack_air_lw_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attackairn", snake_attack_air_n_game) - .acmd("game_attackairf", snake_attack_air_f_game) - .acmd("game_attackairb", snake_attack_air_b_game) - .acmd("game_attackairhi", snake_attack_air_hi_game) - .acmd("game_attackairlw", snake_attack_air_lw_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/ground.rs b/fighters/snake/src/acmd/ground.rs index 1ad6af84b3..b788fcb8cd 100644 --- a/fighters/snake/src/acmd/ground.rs +++ b/fighters/snake/src/acmd/ground.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn snake_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -24,7 +23,7 @@ unsafe extern "C" fn snake_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -48,7 +47,7 @@ unsafe extern "C" fn snake_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); @@ -63,7 +62,7 @@ unsafe extern "C" fn snake_attack_13_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -90,11 +89,9 @@ unsafe extern "C" fn snake_attack_dash_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attack11", snake_attack_11_game) - .acmd("game_attack12", snake_attack_12_game) - .acmd("game_attack13", snake_attack_13_game) - .acmd("game_attackdash", snake_attack_dash_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/mod.rs b/fighters/snake/src/acmd/mod.rs index 636eb505dd..095a2343a6 100644 --- a/fighters/snake/src/acmd/mod.rs +++ b/fighters/snake/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); -} +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::install(agent); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index df96433b8c..ee62dfb1ff 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -41,7 +40,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 13.0); @@ -51,7 +50,7 @@ unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -69,7 +68,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -83,7 +82,7 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_side_taunt_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealsr(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 20.0); @@ -92,12 +91,12 @@ unsafe extern "C" fn snake_side_taunt_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_up_taunt_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealhir(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - AREA_WIND_2ND_arg10(agent, 0, 2, 360/*angle*/, 10/*size*/, 1, 0, 12, 30, 30, 80); + AREA_WIND_2ND_arg10(agent, 0, 2, 360, 10, 1, 0, 12, 30, 30, 80); // physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); } frame(lua_state, 30.0); @@ -106,7 +105,7 @@ unsafe extern "C" fn snake_up_taunt_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_down_taunt_explode_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_appealendexplode(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_DESIRED_RATE(agent, 80.0, 50.0); @@ -132,7 +131,7 @@ unsafe extern "C" fn snake_down_taunt_explode_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_down_taunt_explode_exp(agent : &mut L2CAgentBase) { +unsafe extern "C" fn expression_appealendexplode(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -150,7 +149,7 @@ unsafe extern "C" fn snake_down_taunt_explode_exp(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_down_taunt_explode_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealendexplode(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 15.0); @@ -162,16 +161,13 @@ unsafe extern "C" fn snake_down_taunt_explode_snd(agent : &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("se_snake_special_l04")); PLAY_SE(agent, Hash40::new("se_snake_squat")); } - // frame(lua_state, 70.0); - // if is_excute(agent) { - // } frame(lua_state, 75.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_snake_special_l05")); } } -unsafe extern "C" fn snake_down_taunt_explode_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_appealendexplode(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 75.0); @@ -180,233 +176,7 @@ unsafe extern "C" fn snake_down_taunt_explode_eff(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_trenchmortar_bullet_impact_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - KineticModule::unable_energy(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_KINETIC_ENERGY_ID_GRAVITY); - VisibilityModule::set_int64(boma, hash40("main") as i64, hash40("impact") as i64); - AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - } - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_STATUS_FLAG_ENABLE_ADVANCE_STATUS); - } -} - -unsafe extern "C" fn snake_c4_target_game(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - if VarModule::is_flag(agent.object(), vars::snake::instance::SELF_STICK) { - SEARCH(agent, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - else { - SEARCH(agent, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); - } - } -} - -unsafe extern "C" fn snake_c4_stick_other_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); - } - for _ in 0..5 { - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - } - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - for _ in 0..10 { - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - } - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); - } -} - -unsafe extern "C" fn snake_c4_stick_target_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - - } -} - -unsafe extern "C" fn snake_c4_stick_target_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); - } - wait(lua_state, 60.0); - if is_excute(agent) { - //EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready2"), false, false); - } - wait(lua_state, 90.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - for _ in 0..4 { - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); - } - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); - } - wait(lua_state, 150.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - for _ in 0..10 { - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); - } - } - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); - } -} - -unsafe extern "C" fn snake_c4_stick_target_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_C3){ - PLAY_SE(agent, Hash40::new("se_snake_special_l08")); - } - else{ - PLAY_SE(agent, Hash40::new("se_snake_special_l03")); - } - PLAY_SE(agent, Hash40::new("se_snake_final02")); - } -} - -unsafe extern "C" fn snake_c4_explosion_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - // Hitbox for opponents - ATTACK(agent, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - // Snake-only hitbox - ATTACK(agent, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); - VisibilityModule::set_whole(boma, false); - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); - } - frame(lua_state, 1.0); - if is_excute(agent) { - AttackModule::set_size(boma, 0, 17.0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 2.0); - if is_excute(agent) { - if !WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ - AttackModule::clear_all(boma); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ - AttackModule::clear_all(boma); - } - } -} - -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); @@ -421,7 +191,7 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -435,145 +205,24 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -//tranq gun - -unsafe extern "C" fn snake_tranq_gun_start_snd(agent : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_gun_shoot_snd(agent : &mut L2CAgentBase) { -} +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); -//tranq dart + agent.acmd("sound_appealsr", sound_appealsr); + agent.acmd("sound_appealhir", sound_appealhir); -unsafe extern "C" fn snake_tranq_dart_fly_game(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); - } -} - -unsafe extern "C" fn snake_tranq_dart_fly_snd(agent : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_dart_fly_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); - // LAST_PARTICLE_SET_COLOR(agent, 0.6, 0.6, 2.8); - LAST_PARTICLE_SET_COLOR(agent, 2.5, 2.5, 0.0); - LAST_EFFECT_SET_RATE(agent, 0.001); + agent.acmd("game_appealendexplode", game_appealendexplode); + agent.acmd("effect_appealendexplode", effect_appealendexplode); + agent.acmd("sound_appealendexplode", sound_appealendexplode); + agent.acmd("expression_appealendexplode", expression_appealendexplode); - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - } - for _ in 0..5 { - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke"), true, true); - EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke2"), true, true); - EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke3"), true, true); - } - wait(lua_state, 5.0); - } -} - -unsafe extern "C" fn snake_tranq_dart_fall_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - } -} - -unsafe extern "C" fn snake_tranq_dart_explode_game(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); - } -} - -unsafe extern "C" fn snake_tranq_dart_fall_explode_game(agent : &mut L2CAgentBase) { -} - -unsafe extern "C" fn snake_tranq_dart_explode_snd(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let sfx = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); - } -} - -unsafe extern "C" fn snake_tranq_dart_explode_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn snake_tranq_dart_land_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); - } -} -//// - -pub fn install() { - smashline::Agent::new("snake") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflyhi_sound) - .acmd("sound_damageflyn", damageflyhi_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflyhi_sound) - .acmd("game_dash", dash_game) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", turn_dash_game) - .acmd("sound_appealsr", snake_side_taunt_snd) - .acmd("sound_appealhir", snake_up_taunt_snd) - .acmd("game_appealendexplode", snake_down_taunt_explode_game) - .acmd("expression_appealendexplode", snake_down_taunt_explode_exp) - .acmd("sound_appealendexplode", snake_down_taunt_explode_snd) - .acmd("effect_appealendexplode", snake_down_taunt_explode_eff) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("snake_c4") - .acmd("game_establishtarget", snake_c4_target_game) - .acmd("effect_stickother", snake_c4_stick_other_effect) - .acmd("game_sticktarget", snake_c4_stick_target_game) - .acmd("effect_sticktarget", snake_c4_stick_target_effect) - .acmd("sound_sticktarget", snake_c4_stick_target_sound) - .acmd("game_explosion", snake_c4_explosion_game) - .install(); - smashline::Agent::new("snake_nikita") - .acmd("sound_start", snake_tranq_gun_start_snd) - .acmd("sound_shoot", snake_tranq_gun_shoot_snd) - .install(); - smashline::Agent::new("snake_nikitamissile") - .acmd("game_fly", snake_tranq_dart_fly_game) - .acmd("game_flyattackcommon", snake_tranq_dart_fly_game) - .acmd("game_stopfall", snake_tranq_dart_fly_game) - .acmd("sound_fly", snake_tranq_dart_fly_snd) - .acmd("sound_stopfall", snake_tranq_dart_fly_snd) - .acmd("effect_fly", snake_tranq_dart_fly_eff) - .acmd("effect_stopfall", snake_tranq_dart_fall_eff) - .acmd("game_explosion", snake_tranq_dart_explode_game) - .acmd("game_fallexplosion", snake_tranq_dart_fall_explode_game) - .acmd("game_hiexplosion", snake_tranq_dart_fall_explode_game) - .acmd("sound_explosion", snake_tranq_dart_explode_snd) - .acmd("sound_fallexplosion", snake_tranq_dart_explode_snd) - .acmd("sound_hiexplosion", snake_tranq_dart_explode_snd) - .acmd("effect_explosion", snake_tranq_dart_explode_eff) - .acmd("effect_hiexplosion", snake_tranq_dart_explode_eff) - .acmd("effect_fallexplosion", snake_tranq_dart_land_eff) - .install(); - smashline::Agent::new("snake_trenchmortar") - .acmd("game_impact", snake_trenchmortar_bullet_impact_game) - .install(); -} + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/smashes.rs b/fighters/snake/src/acmd/smashes.rs index addffdbd21..9670cea08a 100644 --- a/fighters/snake/src/acmd/smashes.rs +++ b/fighters/snake/src/acmd/smashes.rs @@ -1,8 +1,21 @@ use super::*; -//first hit +unsafe extern "C" fn effect_attacks4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 5.0); + for _ in 0..34 { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); + } + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + } + } +} -unsafe extern "C" fn snake_side_smash_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; @@ -44,23 +57,33 @@ unsafe extern "C" fn snake_side_smash_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_expr(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 13.0); if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 15.0); + frame(lua_state, 16.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } - frame(lua_state, 16.0); + frame(lua_state, 17.0); if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 15.0); @@ -74,52 +97,23 @@ unsafe extern "C" fn snake_side_smash_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 13.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 16.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 17.0); + frame(lua_state, 15.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } - frame(lua_state, 21.0); + frame(lua_state, 16.0); if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 4); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); - } -} - -//charge - -unsafe extern "C" fn snake_side_smash_charge_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 5.0); - for _ in 0..34 { - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), -2, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, true); - } - wait(lua_state, 5.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); - } + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -//second hit - -unsafe extern "C" fn snake_side_smash_2_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4s2(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; @@ -156,23 +150,29 @@ unsafe extern "C" fn snake_side_smash_2_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_2_expr(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4s2(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 8.0); if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } - frame(lua_state, 7.0); + frame(lua_state, 9.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 8.0); + frame(lua_state, 13.0); if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_2_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4s2(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); @@ -186,31 +186,23 @@ unsafe extern "C" fn snake_side_smash_2_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_2_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4s2(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 8.0); if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 9.0); + frame(lua_state, 7.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, 0); } - frame(lua_state, 13.0); + frame(lua_state, 8.0); if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 4); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -//third hit - -unsafe extern "C" fn snake_side_smash_3_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4s3(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 1.0); @@ -234,23 +226,29 @@ unsafe extern "C" fn snake_side_smash_3_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_3_expr(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4s3(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 8.0); if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); } - frame(lua_state, 8.0); + frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 9.0); + frame(lua_state, 13.0); if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + AFTER_IMAGE_OFF(agent, 4); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); } } -unsafe extern "C" fn snake_side_smash_3_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacks4s3(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 9.0); @@ -264,31 +262,52 @@ unsafe extern "C" fn snake_side_smash_3_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_smash_3_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks4s3(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 8.0); if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 4, Hash40::new("haver"), 0.0, 0.0, 0.0, Hash40::new("haver"), 0.0, 5.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3, 0.11, 0, 0, 0, 0.34, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light1"), Hash40::new("haver"), 0, 3.5, 0.05, 0, 180, 0, 0.15, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_killsword_light2"), Hash40::new("haver"), 0, -0.1, 0, 0, 0, 0, 0.5, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(lua_state, 10.0); + frame(lua_state, 8.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, 0); } - frame(lua_state, 13.0); + frame(lua_state, 9.0); if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 4); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light1"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_killsword_light2"), false, true); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + } +} + +unsafe extern "C" fn effect_attacklw4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 5.0); + for _ in 0..34 { + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); + } + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); + } } } -////changed down-smash to spinning double kick +unsafe extern "C" fn expression_attacklw4charge(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma: &mut BattleObjectModuleAccessor = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, 0); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, 0); + } +} -unsafe extern "C" fn snake_down_smash_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); @@ -321,28 +340,7 @@ unsafe extern "C" fn snake_down_smash_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_down_smash_snd(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_02")); - } - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_l")); - PLAY_SE(agent, Hash40::new("se_snake_smash_l01")); - } - frame(lua_state, 31.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); - // PLAY_SE(agent, Hash40::new("vc_snake_attack04")); - // PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_s")); - PLAY_SE(agent, Hash40::new("se_snake_smash_l02")); - } -} - -unsafe extern "C" fn snake_down_smash_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); frame(lua_state, 7.0); @@ -370,56 +368,48 @@ unsafe extern "C" fn snake_down_smash_eff(agent : &mut L2CAgentBase) { } } -//charge - -unsafe extern "C" fn snake_down_smash_charge_exp(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_attacklw4(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma: &mut BattleObjectModuleAccessor = agent.boma(); + frame(lua_state, 8.0); if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.2, 0.2, -1, 0.7, 0.5, -1, Hash40::new("invalid")); - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, 0); + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); } - frame(lua_state, 60.0); + frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, 0); + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_l")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l01")); } -} - -unsafe extern "C" fn snake_down_smash_charge_eff(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma: &mut BattleObjectModuleAccessor = agent.boma(); - frame(lua_state, 5.0); - for _ in 0..34 { - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 1, 4, 0, 10, 0, 0, 0, true); - } - wait(lua_state, 5.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, false); - } + frame(lua_state, 31.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack")); + // PLAY_SE(agent, Hash40::new("vc_snake_attack04")); + // PLAY_SEQUENCE(agent, Hash40::new("seq_snake_rnd_attack_smash_s")); + PLAY_SE(agent, Hash40::new("se_snake_smash_l02")); } } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attacks4", snake_side_smash_game) - .acmd("expression_attacks4", snake_side_smash_expr) - .acmd("sound_attacks4", snake_side_smash_snd) - .acmd("effect_attacks4", snake_side_smash_eff) - .acmd("effect_attacks4charge", snake_side_smash_charge_eff) - .acmd("game_attacks4s2", snake_side_smash_2_game) - .acmd("expression_attacks4s2", snake_side_smash_2_expr) - .acmd("sound_attacks4s2", snake_side_smash_2_snd) - .acmd("effect_attacks4s2", snake_side_smash_2_eff) - .acmd("game_attacks4s3", snake_side_smash_3_game) - .acmd("expression_attacks4s3", snake_side_smash_3_expr) - .acmd("sound_attacks4s3", snake_side_smash_3_snd) - .acmd("effect_attacks4s3", snake_side_smash_3_eff) - .acmd("game_attacklw4", snake_down_smash_game) - .acmd("sound_attacklw4", snake_down_smash_snd) - .acmd("effect_attacklw4", snake_down_smash_eff) - .acmd("expression_attacklw4charge", snake_down_smash_charge_exp) - .acmd("effect_attacklw4charge", snake_down_smash_charge_eff) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("expression_attacks4", expression_attacks4); + + agent.acmd("game_attacks4s2", game_attacks4s2); + agent.acmd("effect_attacks4s2", effect_attacks4s2); + agent.acmd("sound_attacks4s2", sound_attacks4s2); + agent.acmd("expression_attacks4s2", expression_attacks4s2); + + agent.acmd("game_attacks4s3", game_attacks4s3); + agent.acmd("effect_attacks4s3", effect_attacks4s3); + agent.acmd("sound_attacks4s3", sound_attacks4s3); + agent.acmd("expression_attacks4s3", expression_attacks4s3); + + agent.acmd("effect_attacklw4charge", effect_attacklw4charge); + agent.acmd("expression_attacklw4charge", expression_attacklw4charge); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("effect_attacklw4", effect_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/specials.rs b/fighters/snake/src/acmd/specials.rs index b0a7efc3fb..9aafc77f46 100644 --- a/fighters/snake/src/acmd/specials.rs +++ b/fighters/snake/src/acmd/specials.rs @@ -1,124 +1,7 @@ - use super::*; use smash::app::lua_bind::ItemManager::get_num_of_active_item; -unsafe extern "C" fn snake_special_hi_start_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 2.0); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - } - frame(lua_state, 7.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn snake_special_air_hi_start_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 2.0); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); - } - frame(lua_state, 7.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn snake_special_lw_blast_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); - if is_excute(agent) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(agent, 1.0); - -} - -unsafe extern "C" fn snake_special_lw_squat_blast_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 1.0); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); - if is_excute(agent) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(agent, 1.0); - -} - -unsafe extern "C" fn snake_special_air_lw_blast_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); - } - frame(lua_state, 8.0); - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 27.0); - FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); - if is_excute(agent) { - if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { - WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); - } - } - frame(lua_state, 40.0); - FT_MOTION_RATE(agent, 1.0); - -} - -unsafe extern "C" fn snake_special_n_start_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -167,116 +50,7 @@ unsafe extern "C" fn snake_special_n_start_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_special_air_n_start_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); - } - frame(lua_state, 7.0); - if is_excute(agent) { - /* - if (ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || (ControlModule::get_stick_y(boma) >= 0.5)){ - if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { - if(get_num_of_active_item(*ITEM_KIND_SENSORBOMB) < 1){ - VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SENSORBOMB), 0, 0, false, false); - } - } - } - else if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || (ControlModule::get_stick_y(boma) <= -0.5)){ - if VarModule::get_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER) < 2 { - if(get_num_of_active_item(*ITEM_KIND_SMOKESCREEN) < 1){ - VarModule::inc_int(agent.battle_object, vars::snake::instance::SNAKE_GRENADE_COUNTER); - ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_SMOKESCREEN), 0, 0, false, false); - } - } - } - */ - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE, false, 0); - ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, false, 0); - if(ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN)){ - ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 8.0); - if is_excute(agent) { - CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - frame(lua_state, 9.0); - if is_excute(agent) { - if ArticleModule::is_exist(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_GRENADE_PIN, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - frame(lua_state, 10.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.333); - } - -} - -unsafe extern "C" fn game_specialairhihang(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); - } - frame(lua_state, 41.0); - if is_excute(agent) { - WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_STICK); - } - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); - WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 89.0); - if is_excute(agent) { - WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_TIME_OUT); - } -} - -unsafe extern "C" fn game_cypher_detach(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - //ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 2.5, 0.0, 1.5, -3.2, Some(0.0), Some(1.5), Some(3.2), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - //ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 42, 17, 0, 63, 3.0, 0.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - } -} - -//new self-stick scripts - -unsafe extern "C" fn snake_down_special_floor(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn snake_down_special_crouch_floor(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn snake_down_special_air_floor(agent : &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn snake_side_special_game(agent : &mut L2CAgentBase) { +unsafe extern "C" fn game_specialsstart(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -341,22 +115,41 @@ unsafe extern "C" fn snake_side_special_game(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_special_expr(agent : &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsstart(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 3.0); if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); } - frame(lua_state, 21.0); + frame(lua_state, 16.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); + } + } + frame(lua_state, 24.0); if is_excute(agent) { if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); + } + } + frame(lua_state, 25.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { + EFFECT_FOLLOW(agent, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); } } } -unsafe extern "C" fn snake_side_special_snd(agent : &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialsstart(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -390,69 +183,155 @@ unsafe extern "C" fn snake_side_special_snd(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn snake_side_special_eff(agent : &mut L2CAgentBase) { +unsafe extern "C" fn expression_specialsstart(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 3.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -3, 10, 0, 0, 0, 0, 0.4, true); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); } - frame(lua_state, 16.0); + frame(lua_state, 21.0); if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -1, 10, 10, 0, 0, 0, 0.6, true); + if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); } } - frame(lua_state, 24.0); +} + +unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_bananagun_shot"), Hash40::new("haver"), 0, 0.5, 3, 0, 0, 0, 0.4, true); - } + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); } - frame(lua_state, 25.0); + frame(lua_state, 2.0); if is_excute(agent) { - if !VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_NEED_RELEOAD) { - EFFECT_FOLLOW(agent, Hash40::new("sys_erace_smoke"), Hash40::new("haver"), 0, 1, 4.5, 0, 0, 0, 0.2, true); + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_CYPHER, false, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, -2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 361, 55, 0, 30, 5.5, 0.0, 8.75, 2.0, None, None, None, 0.8, 1.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_BODY); + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} + +unsafe extern "C" fn game_speciallwblast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 27.0); + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { + if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL)) { + WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } - frame(lua_state, 30.0); + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); + +} + +unsafe extern "C" fn game_speciallwsquatblast(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - EFFECT_FOLLOW(agent, Hash40::new("sys_piyo"), Hash40::new("head"), 2.5, 0, 2, 0, 80, 0, 1.0, true); + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP); + } + frame(lua_state, 1.0); + if is_excute(agent) { + CORRECT(agent, *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, false, 0); + } + frame(lua_state, 8.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 27.0); + FT_MOTION_RATE_RANGE(agent, 27.0, 40.0, 13.0); + if is_excute(agent) { + if !(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_GUARD)) { + WorkModule::on_flag(boma, *FIGHTER_SNAKE_STATUS_SPECIAL_LW_EXPLODING_FLAG_C4_STARTUP); } } + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); + } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_specialhistart", snake_special_hi_start_game) - .acmd("game_specialairhistart", snake_special_air_hi_start_game) - .acmd("game_speciallwblast", snake_special_lw_blast_game) - .acmd( - "game_speciallwsquatblast", - snake_special_lw_squat_blast_game, - ) - .acmd("game_specialairlwblast", snake_special_air_lw_blast_game) - .acmd("game_specialnstart", snake_special_n_start_game) - .acmd("game_specialairnstart", snake_special_air_n_start_game) - .acmd("game_specialairhihang", game_specialairhihang) - .acmd("game_speciallwselfstick", snake_down_special_floor) - .acmd( - "game_speciallwsquatselfstick", - snake_down_special_crouch_floor, - ) - .acmd("game_specialairlwselfstick", snake_down_special_air_floor) - .acmd("game_specialsstart", snake_side_special_game) - .acmd("game_specialairsstart", snake_side_special_game) - .acmd("expression_specialsstart", snake_side_special_expr) - .acmd("expression_specialairsstart", snake_side_special_expr) - .acmd("sound_specialsstart", snake_side_special_snd) - .acmd("sound_specialairsstart", snake_side_special_snd) - .acmd("effect_specialsstart", snake_side_special_eff) - .acmd("effect_specialairsstart", snake_side_special_eff) - .install(); - smashline::Agent::new("snake_cypher") - .acmd("game_detach", game_cypher_detach) - .install(); +unsafe extern "C" fn game_specialairhihang(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + //damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 7); + } + frame(lua_state, 41.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_STICK); + } + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); + WorkModule::unable_transition_term_group_ex(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_SPECIAL_HI); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 89.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_SNAKE_STATUS_CYPHER_HANG_TRANS_ID_CUT_TIME_OUT); + } +} + +unsafe extern "C" fn game_speciallwselfstick(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn game_speciallwsquatselfstick(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ArticleModule::change_status(boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, *WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specialairsstart", game_specialsstart); + agent.acmd("effect_specialsstart", effect_specialsstart); + agent.acmd("effect_specialairsstart", effect_specialsstart); + agent.acmd("sound_specialsstart", sound_specialsstart); + agent.acmd("sound_specialairsstart", sound_specialsstart); + agent.acmd("expression_specialsstart", expression_specialsstart); + agent.acmd("expression_specialairsstart", expression_specialsstart); + + agent.acmd("game_specialhistart", game_specialhistart); + agent.acmd("game_specialairhistart", game_specialhistart); + agent.acmd("game_specialairhihang", game_specialairhihang); + + agent.acmd("game_speciallwblast", game_speciallwblast); + agent.acmd("game_specialairlwblast", game_speciallwblast); + agent.acmd("game_speciallwsquatblast", game_speciallwsquatblast); + + agent.acmd("game_speciallwselfstick", game_speciallwselfstick); + agent.acmd("game_specialairlwselfstick", game_speciallwselfstick); + agent.acmd("game_speciallwsquatselfstick", game_speciallwsquatselfstick); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/throws.rs b/fighters/snake/src/acmd/throws.rs index 23ef97ca53..54b2c86f79 100644 --- a/fighters/snake/src/acmd/throws.rs +++ b/fighters/snake/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn snake_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -25,7 +24,7 @@ unsafe extern "C" fn snake_catch_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -47,7 +46,7 @@ unsafe extern "C" fn snake_catch_dash_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.3); } -unsafe extern "C" fn snake_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 1.1); @@ -70,10 +69,8 @@ unsafe extern "C" fn snake_catch_turn_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.43); } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_catch", snake_catch_game) - .acmd("game_catchdash", snake_catch_dash_game) - .acmd("game_catchturn", snake_catch_turn_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); +} \ No newline at end of file diff --git a/fighters/snake/src/acmd/tilts.rs b/fighters/snake/src/acmd/tilts.rs index 87f168bcd8..7ead5b46c1 100644 --- a/fighters/snake/src/acmd/tilts.rs +++ b/fighters/snake/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn snake_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -26,7 +25,7 @@ unsafe extern "C" fn snake_attack_s3_s_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_s3_s2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -52,7 +51,7 @@ unsafe extern "C" fn snake_attack_s3_s2_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -83,7 +82,7 @@ unsafe extern "C" fn snake_attack_hi3_game(agent: &mut L2CAgentBase) { } -unsafe extern "C" fn snake_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -117,11 +116,9 @@ unsafe extern "C" fn snake_attack_lw3_game(agent: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("snake") - .acmd("game_attacks3", snake_attack_s3_s_game) - .acmd("game_attacks3s2", snake_attack_s3_s2_game) - .acmd("game_attackhi3", snake_attack_hi3_game) - .acmd("game_attacklw3", snake_attack_lw3_game) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); +} \ No newline at end of file diff --git a/fighters/snake/src/c4/acmd.rs b/fighters/snake/src/c4/acmd.rs new file mode 100644 index 0000000000..4c50195778 --- /dev/null +++ b/fighters/snake/src/c4/acmd.rs @@ -0,0 +1,215 @@ +use super::*; + +unsafe extern "C" fn game_establishtarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let entry_id = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + if VarModule::is_flag(agent.object(), vars::snake::instance::SELF_STICK) { + SEARCH(agent, 0, 0, Hash40::new("rot"), 0.1, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } + else { + SEARCH(agent, 0, 0, Hash40::new("rot"), 5.0, 0.0, -3.0, 0.0, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, true); + } + } +} + +unsafe extern "C" fn game_sticktarget(agent: &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_sticktarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_final_lockon_ready2"), Hash40::new("top"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); + } + wait(lua_state, 60.0); + if is_excute(agent) { + //EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("snake_final_lockon_ready2"), false, false); + } + wait(lua_state, 90.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + for _ in 0..4 { + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + for _ in 0..10 { + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + } +} + +unsafe extern "C" fn sound_sticktarget(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_C3){ + PLAY_SE(agent, Hash40::new("se_snake_special_l08")); + } + else{ + PLAY_SE(agent, Hash40::new("se_snake_special_l03")); + } + PLAY_SE(agent, Hash40::new("se_snake_final02")); + } +} + +unsafe extern "C" fn effect_stickother(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.65, true); + } + for _ in 0..5 { + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.5, true); + } + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 0.3, true); + } + wait(lua_state, 150.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_light"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_c4_flash"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + for _ in 0..10 { + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke2"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke3"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke4"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 1.5, true); + } + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("snake_missile_smoke"), Hash40::new("top"), 0, 1.025, 0.7, 0, 0, 0, 10.0, true); + } +} + +unsafe extern "C" fn game_explosion(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + // Hitbox for opponents + ATTACK(agent, 0, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + // Snake-only hitbox + ATTACK(agent, 1, 0, Hash40::new("rot"), 16.0, 86, 78, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + VisibilityModule::set_whole(boma, false); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); + } + frame(lua_state, 1.0); + if is_excute(agent) { + AttackModule::set_size(boma, 0, 17.0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + if !WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ + AttackModule::clear_all(boma); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *WEAPON_SNAKE_C4_INSTANCE_WORK_ID_FLAG_GROUND){ + AttackModule::clear_all(boma); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_establishtarget", game_establishtarget); + agent.acmd("game_sticktarget", game_sticktarget); + agent.acmd("effect_sticktarget", effect_sticktarget); + agent.acmd("sound_sticktarget", sound_sticktarget); + agent.acmd("effect_stickother", effect_stickother); + agent.acmd("game_explosion", game_explosion); +} \ No newline at end of file diff --git a/fighters/snake/src/c4/mod.rs b/fighters/snake/src/c4/mod.rs new file mode 100644 index 0000000000..4ca8d53264 --- /dev/null +++ b/fighters/snake/src/c4/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_c4"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/cypher/acmd.rs b/fighters/snake/src/cypher/acmd.rs new file mode 100644 index 0000000000..6a76177d9b --- /dev/null +++ b/fighters/snake/src/cypher/acmd.rs @@ -0,0 +1,9 @@ +use super::*; + +unsafe extern "C" fn game_detach(agent: &mut L2CAgentBase) { + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_detach", game_detach); +} \ No newline at end of file diff --git a/fighters/snake/src/cypher/mod.rs b/fighters/snake/src/cypher/mod.rs new file mode 100644 index 0000000000..ff869df0d5 --- /dev/null +++ b/fighters/snake/src/cypher/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_cypher"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/lib.rs b/fighters/snake/src/lib.rs index d3bd76b48d..4da379e781 100644 --- a/fighters/snake/src/lib.rs +++ b/fighters/snake/src/lib.rs @@ -7,6 +7,13 @@ pub mod acmd; pub mod opff; pub mod status; +// articles +mod c4; +mod cypher; +mod nikita; +mod nikitamissile; +mod trenchmortar; + use smash::{ lib::{ L2CValue, @@ -39,7 +46,15 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); -} + let agent = &mut Agent::new("snake"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); + + c4::install(); + cypher::install(); + nikita::install(); + nikitamissile::install(); + trenchmortar::install(); +} \ No newline at end of file diff --git a/fighters/snake/src/nikita/acmd.rs b/fighters/snake/src/nikita/acmd.rs new file mode 100644 index 0000000000..dd01f765b6 --- /dev/null +++ b/fighters/snake/src/nikita/acmd.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn sound_start(agent : &mut L2CAgentBase) { + +} + +unsafe extern "C" fn sound_shoot(agent : &mut L2CAgentBase) { + +} + +pub fn install(agent: &mut Agent) { + agent.acmd("sound_start", sound_start); + agent.acmd("sound_shoot", sound_shoot); +} \ No newline at end of file diff --git a/fighters/snake/src/nikita/mod.rs b/fighters/snake/src/nikita/mod.rs new file mode 100644 index 0000000000..7bf36d9bf4 --- /dev/null +++ b/fighters/snake/src/nikita/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_nikita"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/nikitamissile/acmd.rs b/fighters/snake/src/nikitamissile/acmd.rs new file mode 100644 index 0000000000..469a90c6ee --- /dev/null +++ b/fighters/snake/src/nikitamissile/acmd.rs @@ -0,0 +1,106 @@ +use super::*; + + +unsafe extern "C" fn game_fly(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sleep_ex"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 361, 0, 0, 0, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_OBJECT); + } +} + +unsafe extern "C" fn effect_fly(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.3, true); + // LAST_PARTICLE_SET_COLOR(agent, 0.6, 0.6, 2.8); + LAST_PARTICLE_SET_COLOR(agent, 2.5, 2.5, 0.0); + LAST_EFFECT_SET_RATE(agent, 0.001); + + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + } + for _ in 0..5 { + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke2"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("snake_missile_smoke3"), true, true); + } + wait(lua_state, 5.0); + } +} + +unsafe extern "C" fn sound_fly(agent : &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_stopfall(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_item_killsword1"), Hash40::new("tex_item_killsword2"), 3, Hash40::new("top"), 0.0, 0.35, -1.5, Hash40::new("haver"), 0.0, -0.25, 1.45, true, Hash40::new("null"), Hash40::new("top"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2); + } +} + +unsafe extern "C" fn game_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 45, 0, 0, 30, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BOMB); + } +} + +unsafe extern "C" fn effect_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_piyo"), Hash40::new("top"), 0, 0, 0, 0, 180, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_explosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + let sfx = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); + } +} + +unsafe extern "C" fn game_hiexplosion(agent : &mut L2CAgentBase) { + +} + +unsafe extern "C" fn effect_fallexplosion(agent : &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_erace_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.3, 0, 0, 0, 0, 0, 0, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_flyattackcommon", game_fly); + + agent.acmd("game_fly", game_fly); + agent.acmd("effect_fly", effect_fly); + agent.acmd("sound_fly", sound_fly); + + agent.acmd("game_stopfall", game_fly); + agent.acmd("effect_stopfall", effect_stopfall); + agent.acmd("sound_stopfall", sound_fly); + + agent.acmd("game_explosion", game_explosion); + agent.acmd("effect_explosion", effect_explosion); + agent.acmd("sound_explosion", sound_explosion); + + agent.acmd("game_hiexplosion", game_hiexplosion); + agent.acmd("effect_hiexplosion", effect_explosion); + agent.acmd("sound_hiexplosion", sound_explosion); + + agent.acmd("game_fallexplosion", game_hiexplosion); + agent.acmd("effect_fallexplosion", effect_fallexplosion); + agent.acmd("sound_fallexplosion", sound_explosion); +} \ No newline at end of file diff --git a/fighters/snake/src/nikitamissile/mod.rs b/fighters/snake/src/nikitamissile/mod.rs new file mode 100644 index 0000000000..17dcc77f00 --- /dev/null +++ b/fighters/snake/src/nikitamissile/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_nikitamissile"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/snake/src/opff.rs b/fighters/snake/src/opff.rs index bc33500656..5b9d6f2e95 100644 --- a/fighters/snake/src/opff.rs +++ b/fighters/snake/src/opff.rs @@ -141,9 +141,7 @@ unsafe extern "C" fn c4_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { } } } -pub fn install() { - smashline::Agent::new("snake") - .on_line(Main, snake_frame_wrapper) - .on_line(Main, c4_callback) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.on_line(Main, snake_frame_wrapper); + agent.on_line(Main, c4_callback); +} \ No newline at end of file diff --git a/fighters/snake/src/status/appeal.rs b/fighters/snake/src/status/appeal.rs index 0254d905b4..afbde0b565 100644 --- a/fighters/snake/src/status/appeal.rs +++ b/fighters/snake/src/status/appeal.rs @@ -205,29 +205,11 @@ unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCom ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); return 0.into() } -pub fn install() { - smashline::Agent::new("snake") - .status(Main, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_main) - .status(End, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_end) - .status( - Main, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, - snake_down_taunt_wait_status_main, - ) - .status( - End, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, - snake_down_taunt_wait_status_end, - ) - .status( - Main, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, - snake_down_taunt_end_status_main, - ) - .status( - End, - *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, - snake_down_taunt_end_status_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_main); + agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_end); + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, snake_down_taunt_wait_status_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, snake_down_taunt_wait_status_end); + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, snake_down_taunt_end_status_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, snake_down_taunt_end_status_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/attack_s4.rs b/fighters/snake/src/status/attack_s4.rs index 8548062446..f7bd2bcac6 100644 --- a/fighters/snake/src/status/attack_s4.rs +++ b/fighters/snake/src/status/attack_s4.rs @@ -17,17 +17,7 @@ unsafe extern "C" fn snake_side_smash_status_end(fighter: &mut L2CFighterCommon) smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4)(fighter) } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_ATTACK_S4, - snake_side_smash_status_main, - ) - .status( - End, - *FIGHTER_STATUS_KIND_ATTACK_S4, - snake_side_smash_status_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, snake_side_smash_status_main); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, snake_side_smash_status_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/catch.rs b/fighters/snake/src/status/catch.rs index b3ec60c94c..87384d0e98 100644 --- a/fighters/snake/src/status/catch.rs +++ b/fighters/snake/src/status/catch.rs @@ -210,32 +210,10 @@ unsafe extern "C" fn snake_grab_wait_status_end(fighter: &mut L2CFighterCommon) smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_WAIT)(fighter) } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_PULL, - snake_grab_pull_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, - snake_grab_dash_pull_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_ATTACK, - snake_grab_attack_status_main, - ) - .status( - Main, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - snake_grab_wait_status_main, - ) - .status( - End, - *FIGHTER_STATUS_KIND_CATCH_WAIT, - snake_grab_wait_status_end, - ) - .install(); -} +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, snake_grab_pull_status_main); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, snake_grab_dash_pull_status_main); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_ATTACK, snake_grab_attack_status_main); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, snake_grab_wait_status_main); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_WAIT, snake_grab_wait_status_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/mod.rs b/fighters/snake/src/status/mod.rs index ff13908a80..be984fbe36 100644 --- a/fighters/snake/src/status/mod.rs +++ b/fighters/snake/src/status/mod.rs @@ -38,12 +38,10 @@ unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub fn install() { - Agent::new("snake") - .status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end) - .install(); - appeal::install(); - attack_s4::install(); - catch::install(); - special_s::install(); -} +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end); + appeal::install(agent); + attack_s4::install(agent); + catch::install(agent); + special_s::install(agent); +} \ No newline at end of file diff --git a/fighters/snake/src/status/special_s.rs b/fighters/snake/src/status/special_s.rs index fa5c191071..a93184b993 100644 --- a/fighters/snake/src/status/special_s.rs +++ b/fighters/snake/src/status/special_s.rs @@ -64,12 +64,7 @@ pub unsafe fn change_motion_by_situation(fighter: &mut L2CFighterCommon, skip_ch MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new_raw(motion), -1.0, 1.0, 0.0, false, false); } } -pub fn install() { - smashline::Agent::new("snake") - .status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_S, - snake_side_special_status_main, - ) - .install(); -} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, snake_side_special_status_main); +} \ No newline at end of file diff --git a/fighters/snake/src/trenchmortar/acmd.rs b/fighters/snake/src/trenchmortar/acmd.rs new file mode 100644 index 0000000000..5f904ae58c --- /dev/null +++ b/fighters/snake/src/trenchmortar/acmd.rs @@ -0,0 +1,22 @@ +use super::*; + +unsafe extern "C" fn game_impact(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + KineticModule::unable_energy(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_KINETIC_ENERGY_ID_GRAVITY); + VisibilityModule::set_int64(boma, hash40("main") as i64, hash40("impact") as i64); + AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 77, 80, 0, 45, 12.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, true, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *WEAPON_SNAKE_TRENCHMORTAR_BULLET_STATUS_FLAG_ENABLE_ADVANCE_STATUS); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_impact", game_impact); +} \ No newline at end of file diff --git a/fighters/snake/src/trenchmortar/mod.rs b/fighters/snake/src/trenchmortar/mod.rs new file mode 100644 index 0000000000..9a9fae0a35 --- /dev/null +++ b/fighters/snake/src/trenchmortar/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("snake_trenchmortar"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file From f8b3963c847b7f6aeae9994dbeaf52fa35cbaf6f Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Wed, 27 Mar 2024 00:12:34 -0400 Subject: [PATCH 142/172] Misc changes --- fighters/bayonetta/src/acmd/other.rs | 10 +++++----- fighters/brave/src/acmd/other.rs | 10 +++++----- fighters/brave/src/acmd/smashes.rs | 4 ++-- fighters/brave/src/acmd/tilts.rs | 4 ++-- fighters/ness/src/lib.rs | 5 +++++ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 02c5830816..ca2a0aef5c 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -281,10 +281,10 @@ unsafe extern "C" fn sound_justshieldoff(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damagefly); - agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflytop", sound_damageflyhi); agent.acmd("sound_damageflyroll", sound_damageflyroll); agent.acmd("game_dash", game_dash); diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index 58ba67849b..35e877bced 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -163,10 +163,10 @@ unsafe extern "C" fn effect_specialairlw8(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damagefly); - agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyhi", sound_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflyhi); + agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflytop", sound_damageflyhi); agent.acmd("sound_damageflyroll", sound_damageflyroll); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); diff --git a/fighters/brave/src/acmd/smashes.rs b/fighters/brave/src/acmd/smashes.rs index d3bea7f5c6..2b6757d01c 100644 --- a/fighters/brave/src/acmd/smashes.rs +++ b/fighters/brave/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -410,7 +410,7 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("expression_attacks4", expression_attacks4); diff --git a/fighters/brave/src/acmd/tilts.rs b/fighters/brave/src/acmd/tilts.rs index 71caf0cbc6..07361f9bd2 100644 --- a/fighters/brave/src/acmd/tilts.rs +++ b/fighters/brave/src/acmd/tilts.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -186,7 +186,7 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attacks3s); + agent.acmd("game_attacks3", game_attacks3); agent.acmd("game_attacks3s2", game_attacks3s2); agent.acmd("expression_attacks3s2", expression_attacks3s2); agent.acmd("game_attackhi3", game_attackhi3); diff --git a/fighters/ness/src/lib.rs b/fighters/ness/src/lib.rs index 871472111f..8b617982fc 100644 --- a/fighters/ness/src/lib.rs +++ b/fighters/ness/src/lib.rs @@ -7,6 +7,11 @@ pub mod acmd; pub mod status; pub mod opff; +mod pkfire; +mod pkflash; +mod pkthunder; +mod yoyo; + use smash::{ lib::{ L2CValue, From a06c519beda4d93a8c85931438b74d80eaa6d4f8 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 09:14:02 -0500 Subject: [PATCH 143/172] standardize lib files --- fighters/demon/src/lib.rs | 7 +- fighters/dolly/src/lib.rs | 7 +- fighters/edge/src/lib.rs | 6 +- fighters/falco/src/lib.rs | 2 +- fighters/fox/src/lib.rs | 2 +- fighters/gamewatch/src/lib.rs | 4 +- fighters/ganon/src/lib.rs | 4 +- fighters/gaogaen/src/lib.rs | 1 - fighters/iceclimber/src/lib.rs | 5 +- fighters/kirby/src/lib.rs | 2 +- fighters/littlemac/src/lib.rs | 7 +- fighters/lucas/src/lib.rs | 7 +- fighters/luigi/src/lib.rs | 21 +--- fighters/luigi/src/status.rs | 136 ++----------------------- fighters/luigi/src/status/special_s.rs | 134 ++++++++++++++++++++++++ fighters/mario/src/lib.rs | 35 +++++-- fighters/mariod/src/lib.rs | 2 +- fighters/miigunner/src/lib.rs | 6 +- fighters/murabito/src/lib.rs | 7 +- fighters/ness/src/lib.rs | 14 ++- fighters/palutena/src/lib.rs | 6 +- fighters/pfushigisou/src/lib.rs | 2 +- fighters/pikmin/src/lib.rs | 11 +- fighters/pit/src/lib.rs | 1 + fighters/reflet/src/lib.rs | 2 +- fighters/roy/src/lib.rs | 2 +- fighters/samus/src/lib.rs | 5 +- fighters/samusd/src/lib.rs | 8 +- fighters/sheik/src/lib.rs | 1 + fighters/simon/src/lib.rs | 4 +- fighters/snake/src/lib.rs | 4 +- fighters/sonic/src/lib.rs | 2 +- fighters/toonlink/src/lib.rs | 2 +- fighters/trail/src/lib.rs | 2 +- fighters/wolf/src/lib.rs | 2 +- 35 files changed, 268 insertions(+), 195 deletions(-) create mode 100644 fighters/luigi/src/status/special_s.rs diff --git a/fighters/demon/src/lib.rs b/fighters/demon/src/lib.rs index df364ac1e7..48aad9d948 100644 --- a/fighters/demon/src/lib.rs +++ b/fighters/demon/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod blaster; @@ -39,12 +41,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("demon"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); blaster::install(); diff --git a/fighters/dolly/src/lib.rs b/fighters/dolly/src/lib.rs index 80743bca83..8805736c89 100644 --- a/fighters/dolly/src/lib.rs +++ b/fighters/dolly/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod wave; mod burst; @@ -40,12 +42,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("dolly"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); wave::install(); diff --git a/fighters/edge/src/lib.rs b/fighters/edge/src/lib.rs index c8eaa3feed..d136982208 100644 --- a/fighters/edge/src/lib.rs +++ b/fighters/edge/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod fire; mod flare1; @@ -42,13 +44,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("edge"); acmd::install(agent); opff::install(agent); status::install(agent); - agent.install(); fire::install(); diff --git a/fighters/falco/src/lib.rs b/fighters/falco/src/lib.rs index 7020500b8d..51ab638a94 100644 --- a/fighters/falco/src/lib.rs +++ b/fighters/falco/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/fox/src/lib.rs b/fighters/fox/src/lib.rs index eee04662c4..bfb731b631 100644 --- a/fighters/fox/src/lib.rs +++ b/fighters/fox/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ diff --git a/fighters/gamewatch/src/lib.rs b/fighters/gamewatch/src/lib.rs index 85d12321ec..0aa9743393 100644 --- a/fighters/gamewatch/src/lib.rs +++ b/fighters/gamewatch/src/lib.rs @@ -4,10 +4,11 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles + mod breath; mod parachute; mod rescue; @@ -42,6 +43,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("gamewatch"); diff --git a/fighters/ganon/src/lib.rs b/fighters/ganon/src/lib.rs index 19a0ae8c2e..4f04447f5b 100644 --- a/fighters/ganon/src/lib.rs +++ b/fighters/ganon/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ @@ -42,7 +42,7 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("ganon"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/gaogaen/src/lib.rs b/fighters/gaogaen/src/lib.rs index 32cc939ec2..5eabf0f167 100644 --- a/fighters/gaogaen/src/lib.rs +++ b/fighters/gaogaen/src/lib.rs @@ -7,7 +7,6 @@ pub mod acmd; pub mod opff; pub mod status; - use smash::{ lib::{ L2CValue, diff --git a/fighters/iceclimber/src/lib.rs b/fighters/iceclimber/src/lib.rs index 041c56b595..c3159b7f5d 100644 --- a/fighters/iceclimber/src/lib.rs +++ b/fighters/iceclimber/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod blizzard; @@ -39,6 +41,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let popo = &mut Agent::new("popo"); diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index 96c35f5d64..3991a674b6 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ diff --git a/fighters/littlemac/src/lib.rs b/fighters/littlemac/src/lib.rs index 9e93ab7e48..df03f89185 100644 --- a/fighters/littlemac/src/lib.rs +++ b/fighters/littlemac/src/lib.rs @@ -3,8 +3,10 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + mod vtable_hook; use smash::{ @@ -37,11 +39,12 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("littlemac"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/lucas/src/lib.rs b/fighters/lucas/src/lib.rs index 40d63830ff..390e594eee 100644 --- a/fighters/lucas/src/lib.rs +++ b/fighters/lucas/src/lib.rs @@ -3,8 +3,11 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles mod pkfire; mod pkthunder; @@ -43,8 +46,8 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("lucas"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); pkfire::install(); diff --git a/fighters/luigi/src/lib.rs b/fighters/luigi/src/lib.rs index b077dca39d..6e6209236a 100644 --- a/fighters/luigi/src/lib.rs +++ b/fighters/luigi/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod obakyumu; @@ -41,19 +43,7 @@ use utils::{ consts::*, }; use smashline::*; - -extern "C" fn luigi_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_LUIGI { - return; - } - - VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); - VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); - } -} +#[macro_use] extern crate smash_script; pub fn calculate_misfire_number(fighter: &mut L2CFighterCommon) { unsafe { @@ -71,10 +61,9 @@ pub fn calculate_misfire_number(fighter: &mut L2CFighterCommon) { pub fn install() { let agent = &mut Agent::new("luigi"); - status::install(agent); acmd::install(agent); opff::install(agent); - agent.on_start(luigi_reset); + status::install(agent); agent.install(); obakyumu::install(); diff --git a/fighters/luigi/src/status.rs b/fighters/luigi/src/status.rs index 78de0d0c5e..262fb7166d 100644 --- a/fighters/luigi/src/status.rs +++ b/fighters/luigi/src/status.rs @@ -1,136 +1,18 @@ use super::*; -mod special_n; - -unsafe extern "C" fn special_s_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_S_CHARGE_MELEE_NO_RANDOM) { - let should_do_effect = if VarModule::is_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED) { - VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); - true - } else if VarModule::countdown_int(fighter.battle_object, vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE, 0) { - super::calculate_misfire_number(fighter); - true - } else { - false - }; - if should_do_effect { - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); - EffectModule::req_common(fighter.module_accessor, Hash40::new("charge_max"), 0.0) as u32; - } - } - 0.into() -} - -unsafe extern "C" fn special_s_charge_uniq_process(fighter: &mut L2CFighterCommon) -> L2CValue { - let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - let charge_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame")); - - if charge_frame <= charge { - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING) { - EffectModule::req_common(fighter.module_accessor, Hash40::new("charge_max"), 0.0); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); - } - MotionModule::set_rate(fighter.module_accessor, 0.0); - } - - WorkModule::add_float(fighter.module_accessor, WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_speed_mul")), *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - 0.into() -} - -unsafe fn special_s_charge_motion_check(fighter: &mut L2CFighterCommon) { - let (kinetic, gc_kind, motion, mtrans) = if fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND { - (*FIGHTER_KINETIC_TYPE_GROUND_STOP, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK), Hash40::new("special_s_hold"), *SITUATION_KIND_AIR) - } else { - (*FIGHTER_KINETIC_TYPE_AIR_STOP, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR), Hash40::new("special_air_s_hold"), *SITUATION_KIND_GROUND) - }; - KineticModule::change_kinetic(fighter.module_accessor, kinetic); - GroundModule::correct(fighter.module_accessor, gc_kind); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, motion, -1.0, 1.0, 0.0, false, false); - } else { - MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FIRST); - } - let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - let charge_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame")); - if charge_frame <= charge { - MotionModule::set_rate(fighter.module_accessor, 0.0); - } - WorkModule::set_int(fighter.module_accessor, mtrans, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_INT_MTRANS); -} -unsafe extern "C" fn special_s_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.is_button_off(Buttons::Special) { - let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - let charge_frame_max = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame_max")); - if charge_frame_max <= charge && fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status(FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_BREATH.into(), false.into()); - return 0.into(); - } - if !StatusModule::is_changing(fighter.module_accessor) { - let mtrans = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_INT_MTRANS); - if mtrans != fighter.global_table[globals::PREV_SITUATION_KIND].get_i32() && mtrans == fighter.global_table[globals::SITUATION_KIND].get_i32() { - special_s_charge_motion_check(fighter); - } - } - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) - && fighter.global_table[globals::CURRENT_FRAME].get_i32() >= 3 - && fighter.is_button_on(Buttons::Guard | Buttons::GuardHold) { - VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); - let mult = VarModule::get_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); - let diminish_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "misfire.storage_diminish_mul"); - let diminish_min = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "misfire.storage_diminish_min"); - VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, (mult * diminish_mul).max(diminish_min)); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE); - let smoke_eff = VarModule::get_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE); - let pulse_eff = VarModule::get_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE); - if smoke_eff != -1 { - EffectModule::kill(fighter.module_accessor, smoke_eff as u32, true, true); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); - } - if pulse_eff != -1 { - EffectModule::kill(fighter.module_accessor, pulse_eff as u32, true, true); - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); - EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - } - } - } else { - fighter.change_status(FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_RAM.into(), true.into()); - } - 0.into() -} +mod special_n; +mod special_s; -unsafe extern "C" fn special_s_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_BONUS) { - WorkModule::set_float(fighter.module_accessor, WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_bonus")), *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - } else { - WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); - } - - if !StopModule::is_stop(fighter.module_accessor) { - special_s_charge_uniq_process(fighter); - } - special_s_charge_motion_check(fighter); - fighter.global_table[globals::SUB_STATUS2].assign(&L2CValue::Ptr(special_s_charge_uniq_process as *const () as _)); - fighter.main_shift(special_s_charge_main_loop) -} - -unsafe extern "C" fn special_s_charge_end(fighter: &mut L2CFighterCommon) -> L2CValue { - EffectModule::remove_common(fighter.module_accessor, Hash40::new("charge_max")); - 0.into() -} - -unsafe extern "C" fn special_s_charge_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); - 0.into() } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_n::install(agent); - agent.status(Init,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_init,); - agent.status(Main,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_main,); - agent.status(End,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_end,); - agent.status(Exit,*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE,special_s_charge_exit,); + special_s::install(agent); } diff --git a/fighters/luigi/src/status/special_s.rs b/fighters/luigi/src/status/special_s.rs new file mode 100644 index 0000000000..eaa7ab6b3a --- /dev/null +++ b/fighters/luigi/src/status/special_s.rs @@ -0,0 +1,134 @@ +use super::*; + +unsafe extern "C" fn special_s_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_S_CHARGE_MELEE_NO_RANDOM) { + let should_do_effect = if VarModule::is_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED) { + VarModule::off_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + true + } else if VarModule::countdown_int(fighter.battle_object, vars::luigi::instance::REMAINING_SPECIAL_S_UNTIL_MISFIRE, 0) { + super::calculate_misfire_number(fighter); + true + } else { + false + }; + if should_do_effect { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); + EffectModule::req_common(fighter.module_accessor, Hash40::new("charge_max"), 0.0) as u32; + } + } + 0.into() +} + +unsafe extern "C" fn special_s_charge_uniq_process(fighter: &mut L2CFighterCommon) -> L2CValue { + let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + let charge_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame")); + + if charge_frame <= charge { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING) { + EffectModule::req_common(fighter.module_accessor, Hash40::new("charge_max"), 0.0); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); + } + MotionModule::set_rate(fighter.module_accessor, 0.0); + } + + WorkModule::add_float(fighter.module_accessor, WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_speed_mul")), *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + 0.into() +} + +unsafe fn special_s_charge_motion_check(fighter: &mut L2CFighterCommon) { + let (kinetic, gc_kind, motion, mtrans) = if fighter.global_table[globals::SITUATION_KIND] == SITUATION_KIND_GROUND { + (*FIGHTER_KINETIC_TYPE_GROUND_STOP, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK), Hash40::new("special_s_hold"), *SITUATION_KIND_AIR) + } else { + (*FIGHTER_KINETIC_TYPE_AIR_STOP, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR), Hash40::new("special_air_s_hold"), *SITUATION_KIND_GROUND) + }; + KineticModule::change_kinetic(fighter.module_accessor, kinetic); + GroundModule::correct(fighter.module_accessor, gc_kind); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, motion, -1.0, 1.0, 0.0, false, false); + } else { + MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FIRST); + } + let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + let charge_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame")); + if charge_frame <= charge { + MotionModule::set_rate(fighter.module_accessor, 0.0); + } + WorkModule::set_int(fighter.module_accessor, mtrans, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_INT_MTRANS); +} + +unsafe extern "C" fn special_s_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.is_button_off(Buttons::Special) { + let charge = WorkModule::get_float(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + let charge_frame_max = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_frame_max")); + if charge_frame_max <= charge && fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.change_status(FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_BREATH.into(), false.into()); + return 0.into(); + } + if !StatusModule::is_changing(fighter.module_accessor) { + let mtrans = WorkModule::get_int(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_INT_MTRANS); + if mtrans != fighter.global_table[globals::PREV_SITUATION_KIND].get_i32() && mtrans == fighter.global_table[globals::SITUATION_KIND].get_i32() { + special_s_charge_motion_check(fighter); + } + } + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) + && fighter.global_table[globals::CURRENT_FRAME].get_i32() >= 3 + && fighter.is_button_on(Buttons::Guard | Buttons::GuardHold) { + VarModule::on_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED); + let mult = VarModule::get_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); + let diminish_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "misfire.storage_diminish_mul"); + let diminish_min = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "misfire.storage_diminish_min"); + VarModule::set_float(fighter.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, (mult * diminish_mul).max(diminish_min)); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE); + let smoke_eff = VarModule::get_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE); + let pulse_eff = VarModule::get_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE); + if smoke_eff != -1 { + EffectModule::kill(fighter.module_accessor, smoke_eff as u32, true, true); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); + } + if pulse_eff != -1 { + EffectModule::kill(fighter.module_accessor, pulse_eff as u32, true, true); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); + EFFECT_FOLLOW(fighter, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); + } + } + } else { + fighter.change_status(FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_RAM.into(), true.into()); + } + 0.into() +} + +unsafe extern "C" fn special_s_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, -1); + VarModule::set_int(fighter.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, -1); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_BONUS) { + WorkModule::set_float(fighter.module_accessor, WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("charge_bonus")), *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + } else { + WorkModule::set_float(fighter.module_accessor, 0.0, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_WORK_FLOAT_CHARGE); + } + + if !StopModule::is_stop(fighter.module_accessor) { + special_s_charge_uniq_process(fighter); + } + special_s_charge_motion_check(fighter); + fighter.global_table[globals::SUB_STATUS2].assign(&L2CValue::Ptr(special_s_charge_uniq_process as *const () as _)); + fighter.main_shift(special_s_charge_main_loop) +} + +unsafe extern "C" fn special_s_charge_end(fighter: &mut L2CFighterCommon) -> L2CValue { + EffectModule::remove_common(fighter.module_accessor, Hash40::new("charge_max")); + 0.into() +} + +unsafe extern "C" fn special_s_charge_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_FLASHING); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_init,); + agent.status(Main, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_main,); + agent.status(End, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_end,); + agent.status(Exit, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_exit,); +} diff --git a/fighters/mario/src/lib.rs b/fighters/mario/src/lib.rs index 05ca7e37d8..1a87764694 100644 --- a/fighters/mario/src/lib.rs +++ b/fighters/mario/src/lib.rs @@ -14,27 +14,44 @@ mod pump; mod pumpwater; use smash::{ + lib::{ + L2CValue, + LuaConst, + }, app::{ - self, - lua_bind::*, - sv_animcmd::{frame, wait}, *, + self, + sv_animcmd::{ + frame, + wait + }, + lua_bind::* }, hash40, - lib::lua_const::*, - lib::{L2CValue, LuaConst}, + lib::{ + lua_const::* + }, lua2cpp::*, - phx::*, + phx::* +}; +use smash_script::{ + *, + macros::* +}; +use utils::{ + *, + util::*, + ext::*, + consts::*, }; -use smash_script::{macros::*, *}; use smashline::*; -use utils::{consts::*, ext::*, util::*, *}; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("mario"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); fireball::install(); diff --git a/fighters/mariod/src/lib.rs b/fighters/mariod/src/lib.rs index 212a87e277..fc14fb8aae 100644 --- a/fighters/mariod/src/lib.rs +++ b/fighters/mariod/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/miigunner/src/lib.rs b/fighters/miigunner/src/lib.rs index b173d09a2e..9c9ebab32c 100644 --- a/fighters/miigunner/src/lib.rs +++ b/fighters/miigunner/src/lib.rs @@ -4,10 +4,11 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles + mod attackairf_bullet; mod bottomshoot; mod fullthrottle; @@ -48,12 +49,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("miigunner"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); attackairf_bullet::install(); diff --git a/fighters/murabito/src/lib.rs b/fighters/murabito/src/lib.rs index 34f0c1e254..6ccb9ff693 100644 --- a/fighters/murabito/src/lib.rs +++ b/fighters/murabito/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod bowlingball; mod bullet; @@ -44,12 +46,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("murabito"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); bowlingball::install(); diff --git a/fighters/ness/src/lib.rs b/fighters/ness/src/lib.rs index 8b617982fc..9fcb992f33 100644 --- a/fighters/ness/src/lib.rs +++ b/fighters/ness/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; + +// articles mod pkfire; mod pkflash; @@ -42,11 +44,17 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("ness"); - acmd::install(agent); - status::install(agent); + acmd::install(agent); opff::install(agent); + status::install(agent); agent.install(); + + pkfire::install(); + pkflash::install(); + pkthunder::install(); + yoyo::install(); } \ No newline at end of file diff --git a/fighters/palutena/src/lib.rs b/fighters/palutena/src/lib.rs index 76d5108212..9c1e62fc55 100644 --- a/fighters/palutena/src/lib.rs +++ b/fighters/palutena/src/lib.rs @@ -4,10 +4,11 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles + mod autoaimbullet; mod explosiveflame; mod reflectionboard; @@ -42,12 +43,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("palutena"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); autoaimbullet::install(); diff --git a/fighters/pfushigisou/src/lib.rs b/fighters/pfushigisou/src/lib.rs index fc1e6fdc4c..021b8e6cb6 100644 --- a/fighters/pfushigisou/src/lib.rs +++ b/fighters/pfushigisou/src/lib.rs @@ -42,7 +42,7 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("pfushigisou"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); } diff --git a/fighters/pikmin/src/lib.rs b/fighters/pikmin/src/lib.rs index 7cfbd543c5..0976ddb828 100644 --- a/fighters/pikmin/src/lib.rs +++ b/fighters/pikmin/src/lib.rs @@ -3,9 +3,13 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod pikmin; -pub mod status; + pub mod opff; +pub mod status; + +// articles + +pub mod pikmin; use smash::{ lib::{ @@ -37,12 +41,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("pikmin"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); pikmin::install(); diff --git a/fighters/pit/src/lib.rs b/fighters/pit/src/lib.rs index b671cd5bbc..d846ebcd81 100644 --- a/fighters/pit/src/lib.rs +++ b/fighters/pit/src/lib.rs @@ -41,6 +41,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("pit"); diff --git a/fighters/reflet/src/lib.rs b/fighters/reflet/src/lib.rs index 00f13c2702..35474ae73e 100644 --- a/fighters/reflet/src/lib.rs +++ b/fighters/reflet/src/lib.rs @@ -48,8 +48,8 @@ use smashline::*; pub fn install() { let agent = &mut Agent::new("reflet"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); gigafire::install(); diff --git a/fighters/roy/src/lib.rs b/fighters/roy/src/lib.rs index 28c7a9eb2d..fa24d112b4 100644 --- a/fighters/roy/src/lib.rs +++ b/fighters/roy/src/lib.rs @@ -4,7 +4,6 @@ pub mod acmd; -//pub mod status; pub mod opff; pub mod status; @@ -38,6 +37,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("roy"); diff --git a/fighters/samus/src/lib.rs b/fighters/samus/src/lib.rs index aae03064ca..57a0dad032 100644 --- a/fighters/samus/src/lib.rs +++ b/fighters/samus/src/lib.rs @@ -4,8 +4,10 @@ pub mod acmd; -//pub mod status; pub mod opff; +//pub mod status; + +// articles mod cshot; mod supermissile; @@ -40,6 +42,7 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("samus"); diff --git a/fighters/samusd/src/lib.rs b/fighters/samusd/src/lib.rs index 7a5858761e..ec0e0ba9d9 100644 --- a/fighters/samusd/src/lib.rs +++ b/fighters/samusd/src/lib.rs @@ -3,8 +3,11 @@ #![allow(non_snake_case)] pub mod acmd; -pub mod status; + pub mod opff; +pub mod status; + +// articles mod bomb; mod cshot; @@ -41,12 +44,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("samusd"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); bomb::install(); diff --git a/fighters/sheik/src/lib.rs b/fighters/sheik/src/lib.rs index 8fad20c773..d2e3f25266 100644 --- a/fighters/sheik/src/lib.rs +++ b/fighters/sheik/src/lib.rs @@ -5,6 +5,7 @@ pub mod acmd; pub mod opff; +//pub mod status; // articles diff --git a/fighters/simon/src/lib.rs b/fighters/simon/src/lib.rs index e2b6d4b857..f1a1650195 100644 --- a/fighters/simon/src/lib.rs +++ b/fighters/simon/src/lib.rs @@ -8,6 +8,7 @@ pub mod status; pub mod opff; // articles + mod axe; mod whip; @@ -41,12 +42,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("simon"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); axe::install(); diff --git a/fighters/snake/src/lib.rs b/fighters/snake/src/lib.rs index 4da379e781..4bf54ab2ed 100644 --- a/fighters/snake/src/lib.rs +++ b/fighters/snake/src/lib.rs @@ -8,6 +8,7 @@ pub mod opff; pub mod status; // articles + mod c4; mod cypher; mod nikita; @@ -44,12 +45,13 @@ use utils::{ consts::*, }; use smashline::*; +#[macro_use] extern crate smash_script; pub fn install() { let agent = &mut Agent::new("snake"); acmd::install(agent); - status::install(agent); opff::install(agent); + status::install(agent); agent.install(); c4::install(); diff --git a/fighters/sonic/src/lib.rs b/fighters/sonic/src/lib.rs index 57d149b2e5..31af2689fa 100644 --- a/fighters/sonic/src/lib.rs +++ b/fighters/sonic/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/toonlink/src/lib.rs b/fighters/toonlink/src/lib.rs index 0f3c10662d..3def8a8e49 100644 --- a/fighters/toonlink/src/lib.rs +++ b/fighters/toonlink/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ diff --git a/fighters/trail/src/lib.rs b/fighters/trail/src/lib.rs index 16a4af1655..b01bf0a032 100644 --- a/fighters/trail/src/lib.rs +++ b/fighters/trail/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/wolf/src/lib.rs b/fighters/wolf/src/lib.rs index c8dd59c984..ada167b68c 100644 --- a/fighters/wolf/src/lib.rs +++ b/fighters/wolf/src/lib.rs @@ -6,8 +6,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles From 98ebe71b1fb3e817805e0b0464bf8fd950fc2182 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 10:01:15 -0500 Subject: [PATCH 144/172] a-f cleanup --- .../src/{status/mod.rs => status.rs} | 1 + fighters/bayonetta/src/status/attack.rs | 2 +- fighters/bayonetta/src/status/attackair.rs | 7 +- fighters/bayonetta/src/status/batwithin.rs | 5 +- fighters/bayonetta/src/status/escape.rs | 7 +- fighters/bayonetta/src/status/jumpaerial.rs | 9 +- fighters/bayonetta/src/status/specialairs.rs | 7 +- fighters/bayonetta/src/status/specialn.rs | 10 +- fighters/bayonetta/src/status/specials.rs | 7 +- fighters/bayonetta/src/wickedweavearm/acmd.rs | 1 - fighters/chrom/src/acmd/mod.rs | 1 + fighters/chrom/src/acmd/other.rs | 3 - fighters/chrom/src/acmd/throws.rs | 1 - fighters/chrom/src/acmd/tilts.rs | 5 +- fighters/chrom/src/status.rs | 84 +- fighters/chrom/src/status/special_s.rs | 87 ++ fighters/cloud/src/acmd/aerials.rs | 10 +- fighters/cloud/src/acmd/ground.rs | 12 +- fighters/cloud/src/acmd/other.rs | 4 - fighters/cloud/src/acmd/smashes.rs | 6 +- fighters/cloud/src/acmd/specials.rs | 20 +- fighters/cloud/src/acmd/throws.rs | 2 - fighters/cloud/src/acmd/tilts.rs | 5 +- fighters/diddy/src/acmd/aerials.rs | 9 +- fighters/diddy/src/acmd/ground.rs | 4 +- fighters/diddy/src/acmd/mod.rs | 1 + fighters/diddy/src/acmd/other.rs | 4 - fighters/diddy/src/acmd/smashes.rs | 5 +- fighters/diddy/src/acmd/specials.rs | 97 +- fighters/diddy/src/acmd/throws.rs | 4 +- fighters/diddy/src/acmd/tilts.rs | 4 +- fighters/diddy/src/status.rs | 28 +- fighters/diddy/src/status/jump_squat.rs | 12 + fighters/diddy/src/status/special_n.rs | 1 - fighters/diddy/src/status/special_s.rs | 7 +- fighters/diddy/src/status/special_s_jump.rs | 3 +- fighters/edge/src/acmd/aerials.rs | 10 +- fighters/edge/src/acmd/ground.rs | 5 +- fighters/edge/src/acmd/mod.rs | 1 + fighters/edge/src/acmd/other.rs | 18 +- fighters/edge/src/acmd/smashes.rs | 10 +- fighters/edge/src/acmd/specials.rs | 17 +- fighters/edge/src/acmd/throws.rs | 7 +- fighters/edge/src/acmd/tilts.rs | 95 +- fighters/edge/src/fire/acmd.rs | 19 +- fighters/edge/src/fire/mod.rs | 2 + .../edge_fire_fly.rs => fire/status.rs} | 0 fighters/edge/src/flare1/acmd.rs | 1 + fighters/edge/src/flare2/acmd.rs | 1 + fighters/edge/src/flaredummy/mod.rs | 9 + fighters/edge/src/flaredummy/opff.rs | 28 + fighters/edge/src/flash/acmd.rs | 2 +- fighters/edge/src/lib.rs | 2 + fighters/edge/src/opff.rs | 24 - .../edge/src/{status/mod.rs => status.rs} | 2 - fighters/elight/src/acmd/aerials.rs | 15 +- fighters/elight/src/acmd/ground.rs | 2 +- fighters/elight/src/acmd/mod.rs | 1 + fighters/elight/src/acmd/smashes.rs | 7 +- fighters/elight/src/acmd/specials.rs | 902 +++++++++--------- fighters/elight/src/acmd/throws.rs | 3 +- fighters/elight/src/acmd/tilts.rs | 6 +- fighters/elight/src/opff.rs | 1 - fighters/elight/src/status.rs | 18 +- fighters/falco/src/acmd/aerials.rs | 12 +- fighters/falco/src/acmd/ground.rs | 5 +- fighters/falco/src/acmd/mod.rs | 1 + fighters/falco/src/acmd/other.rs | 2 - fighters/falco/src/acmd/smashes.rs | 3 - fighters/falco/src/acmd/specials.rs | 69 +- fighters/falco/src/acmd/throws.rs | 3 +- fighters/falco/src/acmd/tilts.rs | 103 +- fighters/falco/src/blaster_bullet/acmd.rs | 3 +- fighters/falco/src/illusion/acmd.rs | 1 + fighters/falco/src/status.rs | 3 +- fighters/lucas/src/pkthunder/acmd.rs | 16 +- fighters/packun/src/acmd/other.rs | 8 +- fighters/simon/src/acmd/specials.rs | 51 +- 78 files changed, 888 insertions(+), 1075 deletions(-) rename fighters/bayonetta/src/{status/mod.rs => status.rs} (96%) create mode 100644 fighters/chrom/src/status/special_s.rs create mode 100644 fighters/diddy/src/status/jump_squat.rs rename fighters/edge/src/{status/edge_fire_fly.rs => fire/status.rs} (100%) create mode 100644 fighters/edge/src/flaredummy/mod.rs create mode 100644 fighters/edge/src/flaredummy/opff.rs rename fighters/edge/src/{status/mod.rs => status.rs} (73%) diff --git a/fighters/bayonetta/src/status/mod.rs b/fighters/bayonetta/src/status.rs similarity index 96% rename from fighters/bayonetta/src/status/mod.rs rename to fighters/bayonetta/src/status.rs index 05e7f27caf..772baae544 100644 --- a/fighters/bayonetta/src/status/mod.rs +++ b/fighters/bayonetta/src/status.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; mod attack; mod batwithin; diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index 44f84d009c..54a7ab708f 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -1,7 +1,7 @@ use super::*; use globals::*; -// FIGHTER_STATUS_KIND_ATTACK // +// FIGHTER_STATUS_KIND_ATTACK unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); diff --git a/fighters/bayonetta/src/status/attackair.rs b/fighters/bayonetta/src/status/attackair.rs index 8fd9b75d4e..a229b5c538 100644 --- a/fighters/bayonetta/src/status/attackair.rs +++ b/fighters/bayonetta/src/status/attackair.rs @@ -1,15 +1,13 @@ use super::*; -use globals::*; - -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) } -// FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F // +// FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F unsafe extern "C" fn attack_air_f_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); @@ -68,5 +66,6 @@ unsafe extern "C" fn fair_motion(fighter: &mut L2CFighterCommon) -> L2CValue { pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F,attack_air_f_main,); } diff --git a/fighters/bayonetta/src/status/batwithin.rs b/fighters/bayonetta/src/status/batwithin.rs index 850ac86fc8..d4b599b238 100644 --- a/fighters/bayonetta/src/status/batwithin.rs +++ b/fighters/bayonetta/src/status/batwithin.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN // +// FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN unsafe extern "C" fn batwithin_end(fighter: &mut L2CFighterCommon) -> L2CValue { let batwithin_status_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_BAYONETTA_STATUS_WORK_ID_BATWITHIN_INT_STATUS_KIND); diff --git a/fighters/bayonetta/src/status/escape.rs b/fighters/bayonetta/src/status/escape.rs index de53e347b7..4e5f1fe089 100644 --- a/fighters/bayonetta/src/status/escape.rs +++ b/fighters/bayonetta/src/status/escape.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_STATUS_KIND_ESCAPE_F // +// FIGHTER_STATUS_KIND_ESCAPE_F unsafe extern "C" fn escape_f_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] != FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN { @@ -12,7 +9,7 @@ unsafe extern "C" fn escape_f_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -// FIGHTER_STATUS_KIND_ESCAPE_B // +// FIGHTER_STATUS_KIND_ESCAPE_B unsafe extern "C" fn escape_b_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] != FIGHTER_BAYONETTA_STATUS_KIND_BATWITHIN { diff --git a/fighters/bayonetta/src/status/jumpaerial.rs b/fighters/bayonetta/src/status/jumpaerial.rs index 53067e28bd..7620239c85 100644 --- a/fighters/bayonetta/src/status/jumpaerial.rs +++ b/fighters/bayonetta/src/status/jumpaerial.rs @@ -1,11 +1,8 @@ use super::*; -use globals::*; - +// FIGHTER_STATUS_KIND_JUMP_AERIAL -// FIGHTER_STATUS_KIND_JUMP_AERIAL // - -unsafe extern "C" fn jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_JumpAerial(); let frame = fighter.global_table[CURRENT_FRAME].get_i32() as f32; if frame <= fighter.get_param_float("param_special_hi", "jump_count_reset_frame") { @@ -22,5 +19,5 @@ unsafe extern "C" fn jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_end); + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_end); } diff --git a/fighters/bayonetta/src/status/specialairs.rs b/fighters/bayonetta/src/status/specialairs.rs index 3ac4521fde..4d823c04ab 100644 --- a/fighters/bayonetta/src/status/specialairs.rs +++ b/fighters/bayonetta/src/status/specialairs.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D unsafe extern "C" fn bayonetta_specialairs_d_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_BAYONETTA_SPECIAL_AIR_S); @@ -40,7 +37,7 @@ unsafe extern "C" fn bayonetta_special_air_s_d_main_loop(fighter: &mut L2CFighte 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U unsafe extern "C" fn bayonetta_specialairs_u_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); diff --git a/fighters/bayonetta/src/status/specialn.rs b/fighters/bayonetta/src/status/specialn.rs index aa6dd9483d..71b8de5f41 100644 --- a/fighters/bayonetta/src/status/specialn.rs +++ b/fighters/bayonetta/src/status/specialn.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; - - -// FIGHTER_STATUS_KIND_SPECIAL_N // +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { @@ -30,7 +27,7 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE unsafe extern "C" fn special_n_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); @@ -79,7 +76,7 @@ unsafe extern "C" fn special_n_charge_main_loop(fighter: &mut L2CFighterCommon) return 0.into(); } -// statuses::bayonetta::SPECIAL_N_CANCEL // +// statuses::bayonetta::SPECIAL_N_CANCEL unsafe extern "C" fn special_n_cancel_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -224,7 +221,6 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - //.on_start(bayonetta_init) agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); agent.status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init); diff --git a/fighters/bayonetta/src/status/specials.rs b/fighters/bayonetta/src/status/specials.rs index 2bbb0795e4..3366793877 100644 --- a/fighters/bayonetta/src/status/specials.rs +++ b/fighters/bayonetta/src/status/specials.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S unsafe extern "C" fn bayonetta_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); @@ -50,7 +49,7 @@ unsafe extern "C" fn bayonetta_special_s_main_loop(fighter: &mut L2CFighterCommo 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_edge // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_EDGE unsafe extern "C" fn bayonetta_special_s_edge_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -98,7 +97,7 @@ unsafe extern "C" fn bayonetta_special_s_edge_main_loop(fighter: &mut L2CFighter 0.into() } -// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_KICK // +// FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_KICK unsafe extern "C" fn bayonetta_special_s_kick_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs index ac40c20fee..764358d296 100644 --- a/fighters/bayonetta/src/wickedweavearm/acmd.rs +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -208,7 +208,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("game_attacks4lw", game_attacks4lw); diff --git a/fighters/chrom/src/acmd/mod.rs b/fighters/chrom/src/acmd/mod.rs index 095a2343a6..4ef668d792 100644 --- a/fighters/chrom/src/acmd/mod.rs +++ b/fighters/chrom/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index 0b5aed94a8..f81feb4d1c 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -77,7 +76,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { @@ -89,7 +87,6 @@ unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { VarModule::on_flag(agent.battle_object, vars::chrom::instance::TRAIL_EFFECT); } } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/chrom/src/acmd/throws.rs b/fighters/chrom/src/acmd/throws.rs index 237f4e56ba..f0e8ed63aa 100644 --- a/fighters/chrom/src/acmd/throws.rs +++ b/fighters/chrom/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/chrom/src/acmd/tilts.rs b/fighters/chrom/src/acmd/tilts.rs index 6cb3c8cbca..93e8cc2fbc 100644 --- a/fighters/chrom/src/acmd/tilts.rs +++ b/fighters/chrom/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -76,7 +75,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -114,13 +112,14 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/chrom/src/status.rs b/fighters/chrom/src/status.rs index f78ee9461c..3e8058434a 100644 --- a/fighters/chrom/src/status.rs +++ b/fighters/chrom/src/status.rs @@ -2,88 +2,8 @@ use super::*; use globals::*; // status script import +mod special_s; -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } - -pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { - let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); - let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); - let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); - let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); - let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; - let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; - let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; - - let mut aerial_y_speed = 0.0; - let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; - - // [v] Disable motion energy - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - - let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - // Check for the side B status you're currently in - let current_status_kind = StatusModule::status_kind(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - - // alStack192 = gravity energy - // alStack176 = stop energy - // alStack208 = motion energy - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - smash::app::lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::enable(motion_energy); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); - aerial_y_speed = air_spd_y; - } - else{ - aerial_y_speed = 0.0; - } - let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; - let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - smash::app::lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::enable(stop_energy); - smash::app::lua_bind::KineticEnergy::enable(gravity_energy); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - } - if [*FIGHTER_ROY_STATUS_KIND_SPECIAL_S3, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - smash::app::lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::enable(motion_energy); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - smash::app::lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - smash::app::lua_bind::KineticEnergy::enable(stop_energy); - smash::app::lua_bind::KineticEnergy::enable(gravity_energy); - } - } - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - 0.into() -} pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/chrom/src/status/special_s.rs b/fighters/chrom/src/status/special_s.rs new file mode 100644 index 0000000000..1bd7109e0b --- /dev/null +++ b/fighters/chrom/src/status/special_s.rs @@ -0,0 +1,87 @@ +use super::*; + +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } + } + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); + let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); + let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); + let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); + let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; + let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; + let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; + + let mut aerial_y_speed = 0.0; + let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; + + // [v] Disable motion energy + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + + let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + // Check for the side B status you're currently in + let current_status_kind = StatusModule::status_kind(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + + // alStack192 = gravity energy + // alStack176 = stop energy + // alStack208 = motion energy + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + smash::app::lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::enable(motion_energy); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + aerial_y_speed = air_spd_y; + } + else{ + aerial_y_speed = 0.0; + } + let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; + let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + smash::app::lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::enable(stop_energy); + smash::app::lua_bind::KineticEnergy::enable(gravity_energy); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + } + if [*FIGHTER_ROY_STATUS_KIND_SPECIAL_S3, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + smash::app::lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::enable(motion_energy); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + smash::app::lua_bind::KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + smash::app::lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + smash::app::lua_bind::KineticEnergy::enable(stop_energy); + smash::app::lua_bind::KineticEnergy::enable(gravity_energy); + } + } + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); +} \ No newline at end of file diff --git a/fighters/cloud/src/acmd/aerials.rs b/fighters/cloud/src/acmd/aerials.rs index 6aa001b793..6c67b40024 100644 --- a/fighters/cloud/src/acmd/aerials.rs +++ b/fighters/cloud/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -34,7 +33,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -77,7 +75,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -125,7 +122,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -168,7 +164,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -247,7 +242,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -275,13 +269,17 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/cloud/src/acmd/ground.rs b/fighters/cloud/src/acmd/ground.rs index 7b78ac6f21..58f6fbf527 100644 --- a/fighters/cloud/src/acmd/ground.rs +++ b/fighters/cloud/src/acmd/ground.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -80,10 +78,10 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { ATTACK(agent, 3, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 3.0, 0.0, 12.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); } -//frame(lua_state, 10.0); -//if is_excute(agent) { -// ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); -//} + //frame(lua_state, 10.0); + //if is_excute(agent) { + // ATTACK(agent, 4, 0, Hash40::new("haver"), 11.0, 60, 70, 0, 100, 4.0, 0.0, 14.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); + //} frame(lua_state, 14.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 65, 60, 0, 100, 2.5, 0.0, 8.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CLOUD_HIT, *ATTACK_REGION_SWORD); @@ -96,12 +94,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/cloud/src/acmd/other.rs b/fighters/cloud/src/acmd/other.rs index 229ac90b28..aea353b109 100644 --- a/fighters/cloud/src/acmd/other.rs +++ b/fighters/cloud/src/acmd/other.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -81,14 +80,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -102,7 +99,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/cloud/src/acmd/smashes.rs b/fighters/cloud/src/acmd/smashes.rs index 8e56004493..4be8904b9a 100644 --- a/fighters/cloud/src/acmd/smashes.rs +++ b/fighters/cloud/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -40,7 +39,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -119,7 +117,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { @@ -173,13 +170,14 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/cloud/src/acmd/specials.rs b/fighters/cloud/src/acmd/specials.rs index 5ee503a754..b8c5dae8e5 100644 --- a/fighters/cloud/src/acmd/specials.rs +++ b/fighters/cloud/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { @@ -37,7 +36,6 @@ unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } - } unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { @@ -73,7 +71,6 @@ unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_SPECIAL_FALL); } - } unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { @@ -106,7 +103,6 @@ unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { @@ -142,7 +138,6 @@ unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); } - } unsafe extern "C" fn game_specials1_lb(agent: &mut L2CAgentBase) { @@ -170,7 +165,6 @@ unsafe extern "C" fn game_specials1_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } unsafe extern "C" fn game_specialairs1_lb(agent: &mut L2CAgentBase) { @@ -198,7 +192,6 @@ unsafe extern "C" fn game_specialairs1_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } unsafe extern "C" fn game_specials2_lb(agent: &mut L2CAgentBase) { @@ -223,7 +216,6 @@ unsafe extern "C" fn game_specials2_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } unsafe extern "C" fn game_specialairs2_lb(agent: &mut L2CAgentBase) { @@ -248,7 +240,6 @@ unsafe extern "C" fn game_specialairs2_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); } - } unsafe extern "C" fn game_specials3_lb(agent: &mut L2CAgentBase) { @@ -310,7 +301,6 @@ unsafe extern "C" fn game_specials3_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } - } unsafe extern "C" fn game_specialairs3_lb(agent: &mut L2CAgentBase) { @@ -368,7 +358,6 @@ unsafe extern "C" fn game_specialairs3_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x25813802b6)); } - } unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -437,7 +426,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_SHIFT); } - } unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { @@ -477,7 +465,6 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 2.0, 0.0, 2.0, 10.4, Some(0.0), Some(2.0), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 45, 80, 0, 60, 4.0, 0.0, 4.6, 9.4, Some(0.0), Some(4.2), Some(-1.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - } unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { @@ -503,7 +490,6 @@ unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); } - } unsafe extern "C" fn game_specialhi_lb(agent: &mut L2CAgentBase) { @@ -579,7 +565,6 @@ unsafe extern "C" fn game_specialhi_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_specialairhi_lb(agent: &mut L2CAgentBase) { @@ -655,7 +640,6 @@ unsafe extern "C" fn game_specialairhi_lb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { @@ -710,7 +694,6 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { @@ -765,7 +748,6 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { @@ -779,11 +761,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairs2_lb", game_specialairs2_lb); agent.acmd("game_specials3_lb", game_specials3_lb); agent.acmd("game_specialairs3_lb", game_specialairs3_lb); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("game_specialhi2fall", game_specialhi2fall); agent.acmd("game_specialhi_lb", game_specialhi_lb); agent.acmd("game_specialairhi_lb", game_specialairhi_lb); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/cloud/src/acmd/throws.rs b/fighters/cloud/src/acmd/throws.rs index 0a093b565f..e285d08d44 100644 --- a/fighters/cloud/src/acmd/throws.rs +++ b/fighters/cloud/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -23,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/cloud/src/acmd/tilts.rs b/fighters/cloud/src/acmd/tilts.rs index d90a6a9143..83d48a7aac 100644 --- a/fighters/cloud/src/acmd/tilts.rs +++ b/fighters/cloud/src/acmd/tilts.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { @@ -70,7 +69,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -112,13 +110,14 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/diddy/src/acmd/aerials.rs b/fighters/diddy/src/acmd/aerials.rs index dc719c2191..2feab39b29 100644 --- a/fighters/diddy/src/acmd/aerials.rs +++ b/fighters/diddy/src/acmd/aerials.rs @@ -43,7 +43,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -77,7 +76,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -104,7 +102,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -146,7 +143,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { @@ -215,16 +211,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/diddy/src/acmd/ground.rs b/fighters/diddy/src/acmd/ground.rs index c7d352f825..1c8635c6b4 100644 --- a/fighters/diddy/src/acmd/ground.rs +++ b/fighters/diddy/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -50,7 +49,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -87,7 +85,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.7); frame(lua_state, 40.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -117,6 +114,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/diddy/src/acmd/mod.rs b/fighters/diddy/src/acmd/mod.rs index 3c5f6b840f..8fac8b3047 100644 --- a/fighters/diddy/src/acmd/mod.rs +++ b/fighters/diddy/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod ground; mod other; diff --git a/fighters/diddy/src/acmd/other.rs b/fighters/diddy/src/acmd/other.rs index 8fecf771fd..13a70379a5 100644 --- a/fighters/diddy/src/acmd/other.rs +++ b/fighters/diddy/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -70,14 +69,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -91,7 +88,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/diddy/src/acmd/smashes.rs b/fighters/diddy/src/acmd/smashes.rs index fce919a73f..22e73271e7 100644 --- a/fighters/diddy/src/acmd/smashes.rs +++ b/fighters/diddy/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -140,7 +139,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -172,12 +170,13 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/diddy/src/acmd/specials.rs b/fighters/diddy/src/acmd/specials.rs index d3d9f92974..357b8908c8 100644 --- a/fighters/diddy/src/acmd/specials.rs +++ b/fighters/diddy/src/acmd/specials.rs @@ -1,14 +1,16 @@ - use super::*; -unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); if is_excute(agent) { - KineticModule::clear_speed_all(boma); - KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - + ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } @@ -77,7 +79,6 @@ unsafe extern "C" fn game_specialsstick(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairsjump(agent: &mut L2CAgentBase) { @@ -104,83 +105,33 @@ unsafe extern "C" fn game_specialairskick(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 8.0/(31.0 - 1.0)); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn effect_specialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn sound_specialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn expression_specialncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn game_specialairncancel(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 8.0/(35.0 - 1.0)); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, -1); - } - frame(lua_state, 21.0); if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_DIDDY_GENERATE_ARTICLE_GUN, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + KineticModule::clear_speed_all(boma); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + SET_SPEED_EX(agent, 0, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } -unsafe extern "C" fn effect_specialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn sound_specialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn expression_specialairncancel(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_specialncancel", game_specialncancel); + agent.acmd("effect_specialncancel", null); + agent.acmd("sound_specialncancel", null); + agent.acmd("expression_specialncancel", null); + agent.acmd("game_specialairncancel", game_specialncancel); + agent.acmd("effect_specialairncancel", null); + agent.acmd("sound_specialairncancel", null); + agent.acmd("expression_specialairncancel", null); + agent.acmd("game_specialsstickattack", game_specialsstickattack); agent.acmd("game_specialsstickattack2", game_specialsstickattack2); agent.acmd("game_specialsstick", game_specialsstick); agent.acmd("game_specialairsjump", game_specialairsjump); agent.acmd("game_specialairskick", game_specialairskick); - agent.acmd("game_specialncancel", game_specialncancel); - agent.acmd("effect_specialncancel", effect_specialncancel); - agent.acmd("sound_specialncancel", sound_specialncancel); - agent.acmd("expression_specialncancel", expression_specialncancel); - agent.acmd("game_specialairncancel", game_specialairncancel); - agent.acmd("effect_specialairncancel", effect_specialairncancel); - agent.acmd("sound_specialairncancel", sound_specialairncancel); - agent.acmd("expression_specialairncancel", expression_specialairncancel); + + agent.acmd("game_specialairhistart", game_specialairhistart); } diff --git a/fighters/diddy/src/acmd/throws.rs b/fighters/diddy/src/acmd/throws.rs index 54e664a1b3..1f793f2059 100644 --- a/fighters/diddy/src/acmd/throws.rs +++ b/fighters/diddy/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -142,7 +141,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/diddy/src/acmd/tilts.rs b/fighters/diddy/src/acmd/tilts.rs index 613c4e0b8d..c57cf068a1 100644 --- a/fighters/diddy/src/acmd/tilts.rs +++ b/fighters/diddy/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -14,7 +13,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -31,10 +29,10 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/diddy/src/status.rs b/fighters/diddy/src/status.rs index 31cae2b882..ce6502e4dc 100644 --- a/fighters/diddy/src/status.rs +++ b/fighters/diddy/src/status.rs @@ -2,18 +2,10 @@ use super::*; use globals::*; mod special_n; - mod special_s; mod special_s_jump; - mod special_hi; - -// FIGHTER_STATUS_KIND_JUMP_SQUAT - -unsafe extern "C" fn end_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_JumpSquat(); - 0.into() -} +mod jump_squat; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -33,22 +25,18 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn diddy_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_DIDDY { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_n::install(agent); special_s::install(agent); special_s_jump::install(agent); special_hi::install(agent); - agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat); - agent.on_start(diddy_init); - agent.install(); + jump_squat::install(agent); } \ No newline at end of file diff --git a/fighters/diddy/src/status/jump_squat.rs b/fighters/diddy/src/status/jump_squat.rs new file mode 100644 index 0000000000..8c287119b3 --- /dev/null +++ b/fighters/diddy/src/status/jump_squat.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP_SQUAT + +unsafe extern "C" fn end_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_JumpSquat(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat); +} \ No newline at end of file diff --git a/fighters/diddy/src/status/special_n.rs b/fighters/diddy/src/status/special_n.rs index f81593bb7d..35ee799189 100644 --- a/fighters/diddy/src/status/special_n.rs +++ b/fighters/diddy/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { diff --git a/fighters/diddy/src/status/special_s.rs b/fighters/diddy/src/status/special_s.rs index ab9d529ffd..6824e47558 100644 --- a/fighters/diddy/src/status/special_s.rs +++ b/fighters/diddy/src/status/special_s.rs @@ -1,13 +1,12 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file diff --git a/fighters/diddy/src/status/special_s_jump.rs b/fighters/diddy/src/status/special_s_jump.rs index f75cc3ebff..41e4f78c0e 100644 --- a/fighters/diddy/src/status/special_s_jump.rs +++ b/fighters/diddy/src/status/special_s_jump.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { let start_speed_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("monkey_flip_jump_start_spd_y")); diff --git a/fighters/edge/src/acmd/aerials.rs b/fighters/edge/src/acmd/aerials.rs index 7c51857d15..0ecae63d52 100644 --- a/fighters/edge/src/acmd/aerials.rs +++ b/fighters/edge/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -46,7 +45,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -86,7 +84,6 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("edge_light_impact2"), false, false); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -138,7 +135,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -429,7 +425,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -481,18 +476,21 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/edge/src/acmd/ground.rs b/fighters/edge/src/acmd/ground.rs index 6c43d6e234..861b8ce13e 100644 --- a/fighters/edge/src/acmd/ground.rs +++ b/fighters/edge/src/acmd/ground.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { @@ -71,7 +70,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -141,7 +139,6 @@ unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("edge_attack_dash2"), Hash40::new("swordl1"), -3.0, 0, -1.0, 0, 0, 0, 0.65, true); LAST_EFFECT_SET_RATE(agent, 0.75); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -168,7 +165,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { @@ -177,5 +173,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/edge/src/acmd/mod.rs b/fighters/edge/src/acmd/mod.rs index 3c5f6b840f..8fac8b3047 100644 --- a/fighters/edge/src/acmd/mod.rs +++ b/fighters/edge/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod ground; mod other; diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index 9361bfd1b6..4997cf69de 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -52,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -81,8 +79,8 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } + unsafe extern "C" fn edge_flash_game_attack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -112,7 +110,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -126,7 +123,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -138,14 +134,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/edge/src/acmd/smashes.rs b/fighters/edge/src/acmd/smashes.rs index 84255a1616..cda73f3273 100644 --- a/fighters/edge/src/acmd/smashes.rs +++ b/fighters/edge/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -47,7 +46,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -103,7 +101,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { @@ -164,7 +161,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -228,7 +224,6 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { FOOT_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -4.5, 0, 2, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); LAST_EFFECT_SET_RATE(agent, 1.1); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -341,8 +336,7 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("edge_smashlw_smoke"), Hash40::new("top"), 0, 0, 27, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - } - else{ + } else { frame(lua_state, 21.0); if is_excute(agent) { EFFECT_FLW_POS(agent, Hash40::new("edge_sword_flash2"), Hash40::new("swordl2"), 22, 0, 0.8, 0, 0, 0, 1.2, true); @@ -363,9 +357,11 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", game_attackhi4); agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/edge/src/acmd/specials.rs b/fighters/edge/src/acmd/specials.rs index 0ec01b8a9e..67911918fc 100644 --- a/fighters/edge/src/acmd/specials.rs +++ b/fighters/edge/src/acmd/specials.rs @@ -56,7 +56,6 @@ unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_EDGE_STATUS_SPECIAL_N_FLAG_ENABLE_FALL_SPEED); } - } unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { @@ -80,7 +79,6 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { } frame(lua_state, 60.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { @@ -107,7 +105,6 @@ unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { else if !VarModule::is_flag(boma.object(), vars::edge::instance::SPECIAL_HI_BLADE_DASH_NO_HITBOX) { FT_MOTION_RATE(agent, 2.0); } - } unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { @@ -493,7 +490,6 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { @@ -522,7 +518,6 @@ unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.15); frame(lua_state, 50.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { @@ -543,17 +538,19 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairn1", game_specialn1); agent.acmd("game_specialn2", game_specialn2); agent.acmd("game_specialairn2", game_specialn2); - //.acmd("game_specialhistart", game_specialhistart) - //.acmd("effect_specialhistart", effect_specialhistart) - //.acmd("game_specialairhistart", game_specialairhistart) + + // agent.acmd("game_specialhistart", game_specialhistart); + // agent.acmd("effect_specialhistart", effect_specialhistart); + // agent.acmd("game_specialairhistart", game_specialairhistart); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("effect_specialhi2", effect_specialhi2); - //.acmd("game_specialhi1", game_specialhi1) - //.acmd("effect_specialhi1", effect_specialhi1) + // agent.acmd("game_specialhi1", game_specialhi1); + // agent.acmd("effect_specialhi1", effect_specialhi1); agent.acmd("game_specialhi1end", game_specialhi1end); agent.acmd("game_specialairhi1end", game_specialairhi1end); agent.acmd("game_specialhi2end", game_specialhi2end); agent.acmd("game_specialairhi2end", game_specialairhi2end); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); diff --git a/fighters/edge/src/acmd/throws.rs b/fighters/edge/src/acmd/throws.rs index c2325db343..7f5321c8f1 100644 --- a/fighters/edge/src/acmd/throws.rs +++ b/fighters/edge/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -82,7 +81,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -114,7 +112,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { } frame(lua_state, 40.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_throwhi(agent: &mut L2CAgentBase) { @@ -208,7 +205,6 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn effect_throwlw(agent: &mut L2CAgentBase) { @@ -255,11 +251,14 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); agent.acmd("effect_throwhi", effect_throwhi); agent.acmd("sound_throwhi", sound_throwhi); agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwlw", game_throwlw); agent.acmd("effect_throwlw", effect_throwlw); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/tilts.rs b/fighters/edge/src/acmd/tilts.rs index 02c00cf290..c366c67a1f 100644 --- a/fighters/edge/src/acmd/tilts.rs +++ b/fighters/edge/src/acmd/tilts.rs @@ -1,42 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.6); - } - frame(lua_state, 6.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } - frame(lua_state, 13.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); - } - frame(lua_state, 13.5); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); - ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 14.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -65,7 +29,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); LAST_EFFECT_SET_RATE(agent, 1.4); - EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); } frame(lua_state, 17.0); if is_excute(agent) { @@ -82,10 +46,9 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -118,10 +81,9 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -150,7 +112,7 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -7, 0, -1.6, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); LAST_EFFECT_SET_RATE(agent, 1.4); - EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.8, 10.4, 3.6, 0.84, 35, 4.1, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("edge_slash_arc"), Hash40::new("top"), 1.5, 12.85, 2.9, -20.3, 33, -8.8, 1, true); } frame(lua_state, 17.0); if is_excute(agent) { @@ -167,7 +129,41 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - +} + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(13.5-13.0)); + } + frame(lua_state, 13.5); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0/(14.0-13.5)); + ATTACK(agent, 0, 0, Hash40::new("arml"), 6.0, 361, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("swordl1"), 6.0, 361, 100, 0, 40, 3.5, 5.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 11.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("swordl1"), 12.0, 361, 100, 0, 41, 4.0, 17.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("swordl1"), 9.0, 361, 102, 0, 41, 3.5, 21.5, 0.0, 0.0,None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 14.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -203,7 +199,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -256,7 +251,6 @@ unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("edge_attack_dash_aura"), false, false); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -291,7 +285,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -387,7 +380,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -422,20 +414,21 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 11, 0, -2, 0, 0, 0, 0.35, 0, 0, 3, 0, 0, 0, false); LAST_EFFECT_SET_RATE(agent, 0.7); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); agent.acmd("sound_attackhi3", sound_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } \ No newline at end of file diff --git a/fighters/edge/src/fire/acmd.rs b/fighters/edge/src/fire/acmd.rs index e42052e59a..36d077f04b 100644 --- a/fighters/edge/src/fire/acmd.rs +++ b/fighters/edge/src/fire/acmd.rs @@ -1,17 +1,5 @@ use super::*; -unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - unsafe extern "C" fn game_bursts(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -31,8 +19,11 @@ unsafe extern "C" fn game_bursts(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn1", game_specialn1); - agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialn1", null); + agent.acmd("game_specialn2", null); + agent.acmd("game_bursts", game_bursts); } \ No newline at end of file diff --git a/fighters/edge/src/fire/mod.rs b/fighters/edge/src/fire/mod.rs index c5d86a9b30..97c5fa6456 100644 --- a/fighters/edge/src/fire/mod.rs +++ b/fighters/edge/src/fire/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod status; pub fn install() { let agent = &mut Agent::new("edge_fire"); acmd::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/edge/src/status/edge_fire_fly.rs b/fighters/edge/src/fire/status.rs similarity index 100% rename from fighters/edge/src/status/edge_fire_fly.rs rename to fighters/edge/src/fire/status.rs diff --git a/fighters/edge/src/flare1/acmd.rs b/fighters/edge/src/flare1/acmd.rs index 160178e2e6..39f08ea808 100644 --- a/fighters/edge/src/flare1/acmd.rs +++ b/fighters/edge/src/flare1/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/edge/src/flare2/acmd.rs b/fighters/edge/src/flare2/acmd.rs index c92bab393f..9274f73fc5 100644 --- a/fighters/edge/src/flare2/acmd.rs +++ b/fighters/edge/src/flare2/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_exp(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/edge/src/flaredummy/mod.rs b/fighters/edge/src/flaredummy/mod.rs new file mode 100644 index 0000000000..cb155c70fd --- /dev/null +++ b/fighters/edge/src/flaredummy/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod opff; + +pub fn install() { + let agent = &mut Agent::new("edge_flaredummy"); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/edge/src/flaredummy/opff.rs b/fighters/edge/src/flaredummy/opff.rs new file mode 100644 index 0000000000..4a5137f983 --- /dev/null +++ b/fighters/edge/src/flaredummy/opff.rs @@ -0,0 +1,28 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn shadowflare_orb_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status(*WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_FLY) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let sephiroth = utils::util::get_battle_object_from_id(owner_id); + let sephiroth_boma = &mut *(*sephiroth).module_accessor; + let sephiroth_status_kind = StatusModule::status_kind(sephiroth_boma); + if sephiroth_status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH && AttackModule::is_infliction_status(sephiroth_boma, *COLLISION_KIND_MASK_HIT) { + // Explode if Sephiroth hits the target marked with this set of orbs with Blade Dash + let x_distance = PostureModule::pos_x(weapon.module_accessor) - PostureModule::pos_x(sephiroth_boma); + let y_distance = PostureModule::pos_y(weapon.module_accessor) - PostureModule::pos_y(sephiroth_boma); + let tolerance = 20.0; + if x_distance.abs() <= tolerance && y_distance.abs() <= tolerance{ + StatusModule::change_status_force(weapon.module_accessor, *WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_TRY, false); + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, shadowflare_orb_callback); +} \ No newline at end of file diff --git a/fighters/edge/src/flash/acmd.rs b/fighters/edge/src/flash/acmd.rs index 804b8976c2..d56eac00d4 100644 --- a/fighters/edge/src/flash/acmd.rs +++ b/fighters/edge/src/flash/acmd.rs @@ -26,5 +26,5 @@ unsafe extern "C" fn game_attack(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { -agent.acmd("game_attack", game_attack); + agent.acmd("game_attack", game_attack); } diff --git a/fighters/edge/src/lib.rs b/fighters/edge/src/lib.rs index d136982208..9024786d6c 100644 --- a/fighters/edge/src/lib.rs +++ b/fighters/edge/src/lib.rs @@ -12,6 +12,7 @@ pub mod status; mod fire; mod flare1; mod flare2; +mod flaredummy; mod flash; use smash::{ @@ -56,6 +57,7 @@ pub fn install() { fire::install(); flare1::install(); flare2::install(); + flaredummy::install(); flash::install(); } \ No newline at end of file diff --git a/fighters/edge/src/opff.rs b/fighters/edge/src/opff.rs index 05c32d7e5d..f6e8609078 100644 --- a/fighters/edge/src/opff.rs +++ b/fighters/edge/src/opff.rs @@ -104,30 +104,6 @@ pub unsafe fn edge_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn shadowflare_orb_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() != WEAPON_KIND_EDGE_FLAREDUMMY { - return - } - if weapon.is_status(*WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_FLY) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let sephiroth = utils::util::get_battle_object_from_id(owner_id); - let sephiroth_boma = &mut *(*sephiroth).module_accessor; - let sephiroth_status_kind = StatusModule::status_kind(sephiroth_boma); - if sephiroth_status_kind == *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH && AttackModule::is_infliction_status(sephiroth_boma, *COLLISION_KIND_MASK_HIT) { - // Explode if Sephiroth hits the target marked with this set of orbs with Blade Dash - let x_distance = PostureModule::pos_x(weapon.module_accessor) - PostureModule::pos_x(sephiroth_boma); - let y_distance = PostureModule::pos_y(weapon.module_accessor) - PostureModule::pos_y(sephiroth_boma); - let tolerance = 20.0; - if x_distance.abs() <= tolerance && y_distance.abs() <= tolerance{ - StatusModule::change_status_force(weapon.module_accessor, *WEAPON_EDGE_FLAREDUMMY_STATUS_KIND_TRY, false); - } - } - } - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, edge_frame_wrapper); - agent.on_line(Main, shadowflare_orb_callback); } \ No newline at end of file diff --git a/fighters/edge/src/status/mod.rs b/fighters/edge/src/status.rs similarity index 73% rename from fighters/edge/src/status/mod.rs rename to fighters/edge/src/status.rs index aaafb095ba..b5f6c219a6 100644 --- a/fighters/edge/src/status/mod.rs +++ b/fighters/edge/src/status.rs @@ -2,10 +2,8 @@ use super::*; mod special_n; mod special_hi; -mod edge_fire_fly; pub fn install(agent: &mut Agent) { special_n::install(agent); special_hi::install(agent); - edge_fire_fly::install(agent); } \ No newline at end of file diff --git a/fighters/elight/src/acmd/aerials.rs b/fighters/elight/src/acmd/aerials.rs index e88cd18860..a3a131169a 100644 --- a/fighters/elight/src/acmd/aerials.rs +++ b/fighters/elight/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -67,11 +66,8 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } -unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) {} - unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -111,7 +107,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -165,7 +160,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -293,14 +287,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); - agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_landingairn", null); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/elight/src/acmd/ground.rs b/fighters/elight/src/acmd/ground.rs index 4430acaa38..18e5727cec 100644 --- a/fighters/elight/src/acmd/ground.rs +++ b/fighters/elight/src/acmd/ground.rs @@ -127,11 +127,11 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } FT_MOTION_RATE(agent, 0.75); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/elight/src/acmd/mod.rs b/fighters/elight/src/acmd/mod.rs index 095a2343a6..4ef668d792 100644 --- a/fighters/elight/src/acmd/mod.rs +++ b/fighters/elight/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/elight/src/acmd/smashes.rs b/fighters/elight/src/acmd/smashes.rs index 15b1efa298..9d9fc88b2a 100644 --- a/fighters/elight/src/acmd/smashes.rs +++ b/fighters/elight/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -20,10 +19,8 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); WorkModule::set_int64(boma, hash40("attack_s4_hold") as i64, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_INT_ESWORD_INHERIT_OPEN_MOTION_KIND); } - frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 18.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 38, 65, 0, 65, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -63,10 +60,8 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - frame(lua_state, 42.0); FT_MOTION_RATE(agent, 0.8); - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -136,10 +131,10 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index b5a8d6c5dc..3385055a15 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { @@ -37,7 +36,6 @@ unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ if is_excute(agent) { ArticleModule::add_motion_partial(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, Hash40::new("to_open"), 10.0, 10.0, false, false, 0.0, false, true, false); @@ -590,603 +588,580 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsstart (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } - frame(lua_state, 12.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - } - frame(lua_state, 13.0); + let boma = agent.boma(); + frame(lua_state, 1.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); + MotionModule::set_rate(boma, 2.0); } } -unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - manage_sword_motion(agent, Hash40::new("to_open")); - - frame(lua_state, 13.0); - FT_MOTION_RATE(agent, 0.75); - - frame(lua_state, 21.0); - FT_MOTION_RATE(agent, 1.0); - - frame(lua_state, 24.0); - if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); - } - - frame(lua_state, 25.0); - manage_sword_motion(agent, Hash40::new("to_close")); +unsafe extern "C" fn effect_specialsstart (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } } -unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 1.0); +unsafe extern "C" fn effect_specialairsstart (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } +} +unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.7); + JostleModule::set_status(agent.module_accessor, false); + VarModule::off_flag(agent.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); + } + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 30, 100, 40, 35, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 35, 100, 40, 25, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::set_int(agent.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); + if ArticleModule::get_num(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); + ArticleModule::set_rate(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); + } + VisibilityModule::set_whole(agent.module_accessor, false); + } + frame(lua_state, 3.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); + } + frame(lua_state, 8.0); if is_excute(agent) { - notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); + ATTACK(agent, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - - manage_sword_motion(agent, Hash40::new("to_open")); - - frame(lua_state, 23.0); + frame(lua_state, 10.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + AttackModule::clear(boma, 1, false); + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - - frame(lua_state, 24.0); - + frame(lua_state, 11.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } - - frame(lua_state, 25.0); + frame(lua_state, 12.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + AttackModule::clear_all(boma); } - - frame(lua_state, 26.0); + frame(lua_state, 18.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + MotionModule::set_rate(boma, (22.0-18.0)/1.0); } - - frame(lua_state, 27.0); + frame(lua_state, 23.0); + if is_excute(agent) { + MotionModule::set_rate(boma, 1.0); + } + frame(lua_state, 30.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + MotionModule::set_rate(boma, 3.0); + } + if is_excute(agent) { + WorkModule::off_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); } - - frame(lua_state, 29.0); - manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn effect_specialairhi1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.2); - } - frame(lua_state, 12.0); + let boma = agent.boma(); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 22.0); + frame(lua_state, 8.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT(agent, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + } } - frame(lua_state, 23.0); + frame(lua_state, 36.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } -unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.2); - } - - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } - - frame(lua_state, 22.0); + let boma = agent.boma(); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT(agent, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } - - frame(lua_state, 27.0); + frame(lua_state, 8.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); + } } } -unsafe extern "C" fn sound_specialairhi1(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - - frame(lua_state, 16.0); + let boma = agent.boma(); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_elight_special_h01_rand")); + ItemModule::set_have_item_visibility(boma, false, 0); } - - frame(lua_state, 23.0); + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 8.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_elight_special_h02_01_shot")); + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashlarge"), 0); } -} - -unsafe extern "C" fn sound_specialairhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 16.0); + frame(lua_state, 10.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashsmall"), 0); + } + frame(lua_state, 15.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_elight_special_h02_rand")); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - - frame(lua_state, 23.0); + frame(lua_state, 22.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_elight_special_h03_shot")); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } -} - -unsafe extern "C" fn expression_specialairhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - + frame(lua_state, 29.0); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } - - frame(lua_state, 24.0); + frame(lua_state, 37.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn expression_specialairhi2(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + let rand = sv_math::rand(hash40("fighter"), 6) as i32; + let rand1 = sv_math::rand(hash40("fighter"), 2) as i32; + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R) { + if rand1 == 0 { //if you hold taunt, do foresight voicelines + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight01")); + } + else if rand1 == 1 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight02")); + } + } + else { //else just run the normal voice pool + if rand == 0 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_s01")); + } + else if rand == 1 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack04")); + } + else if rand == 2 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack05")); + } + else if rand == 3 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack06")); + } + else if rand == 4 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack09")); + } + else if rand == 5 { + PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_l05")); + } + } } - - frame(lua_state, 27.0); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); + frame(lua_state, 2.0); + if is_excute(agent) { //slash noise + PLAY_SE(agent, Hash40::new("se_elight_special_s02_end")); } } -unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + } + frame(lua_state, 2.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.85); + } +} +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.0); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); + EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); + } +} +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { - notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); - let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); - if PostureModule::lr(agent.module_accessor) > 0.0 { - angle *= -1.0; - } - angle = 80.0 - angle.to_degrees() / 2.0; - if angle < 0.0 { - angle += 360.0; - } - ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } - - frame(lua_state, 3.0); + frame(lua_state, 10.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } - - frame(lua_state, 4.0); + frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::clear(agent.module_accessor, 2, false); - AttackModule::clear(agent.module_accessor, 3, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); - //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_elight_sword1"), Hash40::new("tex_elight_sword2"), 5, Hash40::new("sword1"), 0.0, 0.0, -0.08, Hash40::new("sword1"), 15.5, 0.0, -0.08, false, Hash40::new("null"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } - - frame(lua_state, 6.0); + frame(lua_state, 13.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); + LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), -1, 0, 0, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, false); } +} - frame(lua_state, 10.0); - - manage_sword_motion(agent, Hash40::new("to_close")); +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + manage_sword_motion(agent, Hash40::new("to_open")); - frame(lua_state, 6.0); - FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 0.75); - frame(lua_state, 12.0); + frame(lua_state, 21.0); FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 24.0); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); + } + + frame(lua_state, 25.0); + manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn effect_specialairhijump(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); } - frame(lua_state, 3.0); + + manage_sword_motion(agent, Hash40::new("to_open")); + + frame(lua_state, 23.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.5); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 5.0); + + frame(lua_state, 24.0); + if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 3); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 8.0); + + frame(lua_state, 25.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } - frame(lua_state, 9.0); + + frame(lua_state, 26.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_light"), false, false); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } -} -unsafe extern "C" fn game_specialairsstart (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); + frame(lua_state, 27.0); if is_excute(agent) { - MotionModule::set_rate(boma, 2.0); + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } -} - -unsafe extern "C" fn effect_specialsstart (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } -} -unsafe extern "C" fn effect_specialairsstart (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_start"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_flash"), Hash40::new("rot"), 0, -1.5, 4.8, 0, 0, 0, 1, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - } + frame(lua_state, 29.0); + manage_sword_motion(agent, Hash40::new("to_close")); } -unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.7); - JostleModule::set_status(agent.module_accessor, false); - VarModule::off_flag(agent.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); - } - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); - //ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 30, 100, 40, 35, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - //ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 35, 100, 40, 25, 5.0, 0.0, 6.0, 8.0, Some(0.0), Some(6.0), Some(12.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::set_int(agent.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); - if ArticleModule::get_num(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); - ArticleModule::set_rate(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); - } - VisibilityModule::set_whole(agent.module_accessor, false); - } - frame(lua_state, 3.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("waist"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); - } +unsafe extern "C" fn effect_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("rot"), 15.0, 90, 105, 0, 45, 3.25, 0.0, -1.5, 4.8, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("rot"), 7.0, 120, 100, 65, 30, 10.0, 0.0, -1.5, 4.8, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 5.0, Some(0.0), Some(0.0), Some(21.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); if is_excute(agent) { - ATTACK(agent, 7, 0, Hash40::new("rot"), 4.0, 361, 75, 0, 20, 3.0, 0.0, 0.0, 21.0, Some(0.0), Some(0.0), Some(35.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 14, 0, 3.3, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 12.0); if is_excute(agent) { - AttackModule::clear_all(boma); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } - - frame(lua_state, 18.0); + frame(lua_state, 22.0); if is_excute(agent) { - MotionModule::set_rate(boma, (22.0-18.0)/1.0); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 23.0); - if is_excute(agent) { - MotionModule::set_rate(boma, 1.0); - } - frame(lua_state, 30.0); + frame(lua_state, 23.0); if is_excute(agent) { - MotionModule::set_rate(boma, 3.0); - } - if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.boma(); if is_excute(agent) { - EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0.0, -3.7, 3.8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword1"), 12, 0, -1.7, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_open"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); } - frame(lua_state, 8.0); + frame(lua_state, 22.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); - } + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_open"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT(agent, Hash40::new("elight_lay_dust_shot"), Hash40::new("sword1"), 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 36.0); + frame(lua_state, 27.0); if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), -12, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); } } -unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.boma(); + frame(lua_state, 16.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -4.2, 3.5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_photon_speedline"), Hash40::new("top"), 0, 7, 0, 0, 180, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); + PLAY_SE(agent, Hash40::new("vc_elight_special_h01_rand")); } - frame(lua_state, 8.0); + frame(lua_state, 23.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ - EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); - } + PLAY_SE(agent, Hash40::new("se_elight_special_h02_01_shot")); } } -unsafe extern "C" fn expression_specials(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.boma(); + frame(lua_state, 16.0); if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); + PLAY_SE(agent, Hash40::new("vc_elight_special_h02_rand")); } - frame(lua_state, 6.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 8.0); + frame(lua_state, 23.0); if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashlarge"), 0); + PLAY_SE(agent, Hash40::new("se_elight_special_h03_shot")); } - frame(lua_state, 10.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_79_slashsmall"), 0); - } - frame(lua_state, 15.0); +} + +unsafe extern "C" fn expression_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(lua_state, 22.0); + frame(lua_state, 24.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); } - frame(lua_state, 29.0); +} + +unsafe extern "C" fn expression_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(lua_state, 37.0); + frame(lua_state, 27.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_attacks"), 5, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); } } -unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.boma(); + + frame(lua_state, 1.0); if is_excute(agent) { - let rand = sv_math::rand(hash40("fighter"), 6) as i32; - let rand1 = sv_math::rand(hash40("fighter"), 2) as i32; - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_LW) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_L) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_S_R) { - if rand1 == 0 { //if you hold taunt, do foresight voicelines - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight01")); - } - else if rand1 == 1 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_escapeforesight02")); - } + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); + let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); + if PostureModule::lr(agent.module_accessor) > 0.0 { + angle *= -1.0; } - else { //else just run the normal voice pool - if rand == 0 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_s01")); - } - else if rand == 1 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack04")); - } - else if rand == 2 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack05")); - } - else if rand == 3 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack06")); - } - else if rand == 4 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_attack09")); - } - else if rand == 5 { - PLAY_SE_REMAIN(agent, Hash40::new("vc_elight_special_l05")); - } + angle = 80.0 - angle.to_degrees() / 2.0; + if angle < 0.0 { + angle += 360.0; } + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, angle as u64, 100, 110, 0, 4.0, 10.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, angle as u64, 100, 110, 0, 4.0, 0.0, 17.0, 13.0, Some(0.0), Some(4.0), Some(13.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); } - frame(lua_state, 2.0); - if is_excute(agent) { //slash noise - PLAY_SE(agent, Hash40::new("se_elight_special_s02_end")); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 57, 10, 0, 60, 4.0, 0.0, 22.0, 5.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0, 80, 10, 0, 50, 4.0, 0.0, 22.0, 13.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 68, 10, 0, 75, 4.0, 0.0, 10.0, 7.0,Some( 0.0), Some(15.0), Some(7.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 7.0, 75, 10, 0, 70, 4.0, 0.0, 10.0, 15.0,Some( 0.0), Some(15.0), Some(15.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 2, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 3, 5.0, false); } -} - -unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, -3.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(agent, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::clear(agent.module_accessor, 2, false); + AttackModule::clear(agent.module_accessor, 3, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); + //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); } - frame(lua_state, 2.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.5, 0, 0, 3, 0, 0, 0, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 1.2, 0, 0, 3, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.9, 0, 0, 3, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.85); - } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 10.0); + manage_sword_motion(agent, Hash40::new("to_close")); + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("elight_photon_vanish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_photon_body_lihgt"), Hash40::new("hip"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_l"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - LAST_EFFECT_SET_RATE(agent, 1.0); - LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); - EFFECT_FOLLOW(agent, Hash40::new("elight_photon_sword_close"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_slash5_light"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_body_lihgt"), false, true); - EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); - } -} -unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairhijump(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 5.0/(12.0-1.0)); - - frame(lua_state, 12.0); - FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("elight_lay_lump"), Hash40::new("top"), 0, 0, -4, 0, 0, 0, 0.8, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_beam_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("elight_sword_light"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), -2, 11, 15, 0, 0, 0, 0.85, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_beam_m"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("elight_sword_close_m"), Hash40::new("sword1"), 0, 0, 0, 0, 90, 0, 1, true); + LAST_EFFECT_SET_OFFSET_TO_CAMERA_FLAT(agent, -0.3); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("elight_sword_light"), false, false); + } } pub fn install(agent: &mut Agent) { @@ -1194,18 +1169,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairn", game_specialn); agent.acmd("game_specialn2", game_specialn2); agent.acmd("game_specialairn2", game_specialairn2); - agent.acmd("effect_specialhistart", effect_specialhistart); - agent.acmd("game_specialairhi1", game_specialairhi1); - agent.acmd("game_specialairhi2", game_specialairhi2); - agent.acmd("effect_specialairhi1", effect_specialairhi1); - agent.acmd("effect_specialairhi2", effect_specialairhi2); - agent.acmd("sound_specialairhi1", sound_specialairhi1); - agent.acmd("sound_specialairhi2", sound_specialairhi2); - agent.acmd("expression_specialairhi1", expression_specialairhi1); - agent.acmd("expression_specialairhi2", expression_specialairhi2); - agent.acmd("game_specialairhijump", game_specialairhijump); - agent.acmd("effect_specialairhijump", effect_specialairhijump); - agent.acmd("game_specialairsstart", game_specialairsstart); + + agent.acmd("game_specialairsstart", game_specialairsstart); agent.acmd("game_specialsstart", game_specialairsstart); agent.acmd("effect_specialsstart", effect_specialsstart); agent.acmd("effect_specialairsstart", effect_specialairsstart); @@ -1219,6 +1184,19 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairs", sound_specials); agent.acmd("effect_specialsend", effect_specialsend); agent.acmd("effect_specialairsend", effect_specialairsend); + + agent.acmd("effect_specialhistart", effect_specialhistart); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi1", effect_specialairhi1); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("sound_specialairhi1", sound_specialairhi1); + agent.acmd("sound_specialairhi2", sound_specialairhi2); + agent.acmd("expression_specialairhi1", expression_specialairhi1); + agent.acmd("expression_specialairhi2", expression_specialairhi2); + agent.acmd("game_specialairhijump", game_specialairhijump); + agent.acmd("effect_specialairhijump", effect_specialairhijump); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/elight/src/acmd/throws.rs b/fighters/elight/src/acmd/throws.rs index 8ecc5c0bcb..abad618df0 100644 --- a/fighters/elight/src/acmd/throws.rs +++ b/fighters/elight/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -113,12 +112,12 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } - } pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/elight/src/acmd/tilts.rs b/fighters/elight/src/acmd/tilts.rs index bbf0ab2830..98d69419c0 100644 --- a/fighters/elight/src/acmd/tilts.rs +++ b/fighters/elight/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -56,7 +55,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -114,7 +112,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -193,11 +190,12 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/elight/src/opff.rs b/fighters/elight/src/opff.rs index a38aa13d44..815a1dafe0 100644 --- a/fighters/elight/src/opff.rs +++ b/fighters/elight/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn hit_cancel_blade_switch(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if (fighter.is_status_one_of(&[ diff --git a/fighters/elight/src/status.rs b/fighters/elight/src/status.rs index 6eb076c6cd..51098717aa 100644 --- a/fighters/elight/src/status.rs +++ b/fighters/elight/src/status.rs @@ -90,23 +90,19 @@ unsafe extern "C" fn Set_Pyra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, } } -extern "C" fn elight_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_ELIGHT { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_hi_attack::install(agent); special_hi_jump::install(agent); special_hi_finish::install(agent); special_hi_finish2::install(agent); special_hi::install(agent); - agent.on_start(elight_init); - agent.install(); } \ No newline at end of file diff --git a/fighters/falco/src/acmd/aerials.rs b/fighters/falco/src/acmd/aerials.rs index c22933c3cd..d1f026bc88 100644 --- a/fighters/falco/src/acmd/aerials.rs +++ b/fighters/falco/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -128,7 +127,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { @@ -146,7 +144,6 @@ unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_falco_attackair_n01")); } - } unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { @@ -183,7 +180,6 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), -2, 10, 3, -35, -4, -144, 1.3, true); LAST_EFFECT_SET_RATE(agent, 2); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -219,7 +215,6 @@ unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_falco_attackhard_l01")); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -255,7 +250,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -271,7 +265,6 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0.0, 10.5, -10.0, 0, 0, 0, 1.35, 0, 0, 0, 0, 0, 360, true); LAST_EFFECT_SET_RATE(agent, 1.3); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -317,7 +310,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase){ @@ -378,15 +370,19 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("sound_attackairf", sound_attackairf); agent.acmd("game_landingairf", game_landingairf); agent.acmd("effect_attackairf", effect_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("sound_attackairb", sound_attackairb); agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/falco/src/acmd/ground.rs b/fighters/falco/src/acmd/ground.rs index a7ab5e404e..df317ce89a 100644 --- a/fighters/falco/src/acmd/ground.rs +++ b/fighters/falco/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -24,7 +23,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -46,7 +44,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { @@ -89,12 +86,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/falco/src/acmd/mod.rs b/fighters/falco/src/acmd/mod.rs index 08566acdd5..689753c3a5 100644 --- a/fighters/falco/src/acmd/mod.rs +++ b/fighters/falco/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index 458834c23d..f74459f7d8 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -70,7 +69,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_passivewalljump(agent: &mut L2CAgentBase) { diff --git a/fighters/falco/src/acmd/smashes.rs b/fighters/falco/src/acmd/smashes.rs index e0623fd75a..c5d91f6961 100644 --- a/fighters/falco/src/acmd/smashes.rs +++ b/fighters/falco/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -32,7 +31,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -100,7 +98,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index 920479b6a4..fa4ea2e8b1 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { @@ -15,6 +14,15 @@ unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_falco_special_n02")); + } +} + unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -270,24 +278,6 @@ unsafe extern "C" fn expression_speciallwloop(agent: &mut L2CAgentBase) { ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattacks"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } -unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn sound_speciallwend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -300,26 +290,6 @@ unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn falco_special_n_start_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_falco_special_n02")); - } - -} - -unsafe extern "C" fn falco_special_air_n_start_sound(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_falco_special_n02")); - } - -} - // #[acmd_script( agent = "falco", script = "sound_specialairhi" , category = ACMD_SOUND , low_priority)] // unsafe fn falco_special_air_hi_sound(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; @@ -344,14 +314,19 @@ unsafe extern "C" fn falco_special_air_n_start_sound(agent: &mut L2CAgentBase) { // } +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_specialnstart", game_specialnstart); agent.acmd("game_specialnloop", game_specialnloop); agent.acmd("game_specialairnstart", game_specialairnstart); agent.acmd("game_specialairnloop", game_specialairnloop); + agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhiholdair", game_specialhiholdair); agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_specialairlw); agent.acmd("effect_speciallw", effect_speciallw); @@ -368,14 +343,14 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairlwloop", sound_speciallwloop); agent.acmd("expression_speciallwloop", expression_speciallwloop); agent.acmd("expression_specialairlwloop", expression_speciallwloop); - agent.acmd("game_speciallwend", game_speciallwend); - agent.acmd("game_specialairlwend", game_speciallwend); - agent.acmd("effect_speciallwend", effect_speciallwend); - agent.acmd("effect_specialairlwend", effect_speciallwend); - agent.acmd("sound_speciallwend", sound_speciallwend); - agent.acmd("sound_specialairlwend", sound_speciallwend); + agent.acmd("game_speciallwend", null); + agent.acmd("game_specialairlwend", null); + agent.acmd("effect_speciallwend", null); + agent.acmd("effect_specialairlwend", null); + agent.acmd("sound_speciallwend", null); + agent.acmd("sound_specialairlwend", null); agent.acmd("expression_speciallwend", expression_speciallwend); agent.acmd("expression_specialairlwend", expression_speciallwend); - agent.acmd("sound_specialnstart", falco_special_n_start_sound); - agent.acmd("sound_specialairnstart", falco_special_air_n_start_sound); + agent.acmd("sound_specialnstart", sound_specialnstart); + agent.acmd("sound_specialairnstart", sound_specialnstart); } diff --git a/fighters/falco/src/acmd/throws.rs b/fighters/falco/src/acmd/throws.rs index 4d63214fda..db3e4dde07 100644 --- a/fighters/falco/src/acmd/throws.rs +++ b/fighters/falco/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -64,6 +62,7 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { GrabModule::set_rebound(boma, false); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); diff --git a/fighters/falco/src/acmd/tilts.rs b/fighters/falco/src/acmd/tilts.rs index c372d4182c..bd064356d5 100644 --- a/fighters/falco/src/acmd/tilts.rs +++ b/fighters/falco/src/acmd/tilts.rs @@ -1,6 +1,52 @@ - use super::*; +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -45,56 +91,8 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent){ FT_MOTION_RATE(agent, 1.200) } - } -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 6.0, 361, 80, 0, 42, 3.2, 5.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("legr"), 6.0, 361, 80, 0, 42, 3.5, 3.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("hip"), 6.0, 361, 80, 0, 42, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -117,7 +115,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 12.0/(28.0-20.0)); frame(lua_state, 28.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -134,10 +131,12 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) {; - agent.acmd("game_attackhi3", game_attackhi3); - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/falco/src/blaster_bullet/acmd.rs b/fighters/falco/src/blaster_bullet/acmd.rs index 6f64e83dd5..d4f4b9d96a 100644 --- a/fighters/falco/src/blaster_bullet/acmd.rs +++ b/fighters/falco/src/blaster_bullet/acmd.rs @@ -24,6 +24,7 @@ unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 55, 5, 0, 1.5, 0.0, 0.0, 0.5, Some(0.0), Some(0.0), Some(-9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); } } + unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 90, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); @@ -33,13 +34,13 @@ unsafe extern "C" fn game_flythrowhi(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_flythrowb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 4.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 50, 80, 0, 60, 5.0, 0.0, 0.0, 8.0, None, None, None, 0.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FALCO_BLASTER, *ATTACK_REGION_ENERGY); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_fly", game_fly); diff --git a/fighters/falco/src/illusion/acmd.rs b/fighters/falco/src/illusion/acmd.rs index ab6d88691b..9fc59cd0b6 100644 --- a/fighters/falco/src/illusion/acmd.rs +++ b/fighters/falco/src/illusion/acmd.rs @@ -8,6 +8,7 @@ unsafe extern "C" fn game_moveair(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 50, 0, 40, 3.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_moveair", game_moveair); } diff --git a/fighters/falco/src/status.rs b/fighters/falco/src/status.rs index e555bcf98a..ca34a95e77 100644 --- a/fighters/falco/src/status.rs +++ b/fighters/falco/src/status.rs @@ -19,8 +19,9 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_s::install(agent); special_hi::install(agent); special_lw::install(agent); - agent.on_start(on_start); } diff --git a/fighters/lucas/src/pkthunder/acmd.rs b/fighters/lucas/src/pkthunder/acmd.rs index 5228c11acc..d86073adb7 100644 --- a/fighters/lucas/src/pkthunder/acmd.rs +++ b/fighters/lucas/src/pkthunder/acmd.rs @@ -12,17 +12,17 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } } } -unsafe extern "C" fn game_movechild(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); +unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); AttackModule::set_attack_composition_speed(boma, 1, true); } wait(lua_state, 1.0); - if is_excute(fighter) { - if VarModule::is_flag(fighter.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(fighter, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { + ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); } } } diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 541214dc3c..1a052027c1 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -1,11 +1,11 @@ use super::*; -unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } diff --git a/fighters/simon/src/acmd/specials.rs b/fighters/simon/src/acmd/specials.rs index a3a10c6176..70589185b1 100644 --- a/fighters/simon/src/acmd/specials.rs +++ b/fighters/simon/src/acmd/specials.rs @@ -1,64 +1,63 @@ use super::*; -unsafe extern "C" fn game_specialn(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.8); - if is_excute(fighter) { - ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); } frame(lua_state, 30.0); - if is_excute(fighter){ - ArticleModule::shoot(fighter.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + if is_excute(agent){ + ArticleModule::shoot(agent.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); } } -unsafe extern "C" fn game_specialhi(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 95, 100, 155, 0, 8.5, 0.0, 9.5, 10.5, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); AttackModule::clear_all(boma); } frame(lua_state, 9.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 80, 0, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 20.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear(boma, 0, false); - ATTACK(fighter, 1, 1, Hash40::new("top"), 6.0, 61, 95, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 1, Hash40::new("top"), 6.0, 61, 95, 0, 85, 6.0, 0.0, 23.0, 9.5, Some(0.0), Some(6.0), Some(7.5), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_WHIP); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } - } pub fn install(agent: &mut Agent) { From 12b23814303b6455046489c7fc749fd1940696fd Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 10:39:27 -0500 Subject: [PATCH 145/172] gotta sweep sweep sweep --- fighters/bayonetta/src/status/attack.rs | 1 - fighters/brave/src/acmd/aerials.rs | 10 +-- fighters/brave/src/acmd/ground.rs | 2 +- fighters/brave/src/acmd/other.rs | 18 ++--- fighters/brave/src/acmd/smashes.rs | 66 ++++++++--------- fighters/brave/src/acmd/throws.rs | 5 +- fighters/brave/src/acmd/tilts.rs | 6 +- fighters/captain/src/acmd/mod.rs | 1 + fighters/captain/src/status.rs | 2 + fighters/captain/src/status/special_lw.rs | 1 - fighters/daisy/src/status.rs | 1 + fighters/daisy/src/status/attack_air.rs | 1 - fighters/daisy/src/status/special_lw.rs | 1 - fighters/daisy/src/status/special_s.rs | 1 - fighters/daisy/src/status/uniq_float.rs | 1 - fighters/dedede/src/status.rs | 1 + fighters/dedede/src/status/special_hi.rs | 2 +- fighters/dedede/src/status/special_lw.rs | 2 +- fighters/demon/src/acmd/mod.rs | 1 + fighters/demon/src/status.rs | 1 + fighters/demon/src/status/attack.rs | 3 +- fighters/demon/src/status/attack_air.rs | 1 - fighters/demon/src/status/attack_combo.rs | 1 - fighters/demon/src/status/dash.rs | 3 +- fighters/demon/src/status/dash_back.rs | 3 +- fighters/demon/src/status/landing.rs | 3 +- fighters/demon/src/status/turn_dash.rs | 3 +- fighters/diddy/src/status.rs | 1 + fighters/diddy/src/status/special_hi.rs | 1 - fighters/diddy/src/status/special_n.rs | 2 + fighters/dolly/src/acmd/mod.rs | 1 + fighters/dolly/src/status.rs | 1 + fighters/dolly/src/status/dash_back.rs | 2 - fighters/dolly/src/status/guard_off.rs | 2 - fighters/dolly/src/status/landing.rs | 1 - fighters/dolly/src/status/special_hi.rs | 1 - fighters/dolly/src/status/special_s.rs | 9 +-- fighters/dolly/src/status/super_special.rs | 3 +- fighters/dolly/src/status/super_special2.rs | 3 +- fighters/dolly/src/status/turn_dash.rs | 3 +- fighters/dolly/src/status/wait.rs | 3 +- fighters/donkey/src/acmd/mod.rs | 1 + fighters/donkey/src/status/shoulder.rs | 2 - fighters/donkey/src/status/super_lift.rs | 2 - fighters/duckhunt/src/acmd/mod.rs | 1 + fighters/duckhunt/src/status.rs | 2 + fighters/duckhunt/src/status/attacks3.rs | 1 - fighters/duckhunt/src/status/special_n.rs | 1 - fighters/duckhunt/src/status/special_s.rs | 1 - fighters/gamewatch/src/acmd/aerials.rs | 22 ++---- fighters/gamewatch/src/acmd/ground.rs | 3 +- fighters/gamewatch/src/acmd/mod.rs | 1 + fighters/gamewatch/src/acmd/other.rs | 12 ++- fighters/gamewatch/src/acmd/smashes.rs | 5 +- fighters/gamewatch/src/acmd/specials.rs | 10 +-- fighters/gamewatch/src/acmd/throws.rs | 11 +-- fighters/gamewatch/src/acmd/tilts.rs | 5 +- fighters/gamewatch/src/breath/acmd.rs | 4 +- fighters/gamewatch/src/status.rs | 23 +++--- fighters/ganon/src/acmd/aerials.rs | 5 -- fighters/ganon/src/acmd/ground.rs | 2 - fighters/ganon/src/acmd/mod.rs | 1 + fighters/ganon/src/acmd/other.rs | 6 -- fighters/ganon/src/acmd/smashes.rs | 4 - fighters/ganon/src/acmd/throws.rs | 2 +- fighters/ganon/src/acmd/tilts.rs | 41 +++++----- fighters/ganon/src/status.rs | 11 ++- .../ganon/src/status/special_air_s_catch.rs | 1 - fighters/ganon/src/status/special_lw.rs | 1 - fighters/ganon/src/status/special_s.rs | 1 - fighters/gaogaen/src/status.rs | 1 + fighters/ike/src/status.rs | 2 + fighters/inkling/src/status.rs | 2 + fighters/jack/src/status.rs | 2 + fighters/kamui/src/status.rs | 2 + fighters/ken/src/status.rs | 1 + fighters/kirby/src/status.rs | 2 + fighters/koopa/src/status.rs | 1 + fighters/koopajr/src/status.rs | 2 + fighters/krool/src/status.rs | 74 ++----------------- fighters/krool/src/status/attack_lw4.rs | 71 ++++++++++++++++++ fighters/link/src/status.rs | 1 + fighters/littlemac/src/status.rs | 15 ++-- fighters/lucario/src/status.rs | 1 + fighters/luigi/src/status.rs | 2 + fighters/mario/src/status.rs | 1 + fighters/mariod/src/status.rs | 1 + fighters/marth/src/status.rs | 1 + fighters/master/src/status.rs | 1 + .../src/{status/mod.rs => status.rs} | 2 + fighters/mewtwo/src/status.rs | 1 + fighters/miifighter/src/status.rs | 1 + fighters/miigunner/src/status.rs | 2 + fighters/miiswordsman/src/status.rs | 1 - fighters/murabito/src/status.rs | 1 - fighters/packun/src/status.rs | 1 + .../pacman/src/{status/mod.rs => status.rs} | 3 +- fighters/palutena/src/status.rs | 2 + .../peach/src/{status/mod.rs => status.rs} | 19 ++--- fighters/pfushigisou/src/status.rs | 1 + fighters/pickel/src/status.rs | 1 + fighters/pikmin/src/status.rs | 3 + fighters/pit/src/{status/mod.rs => status.rs} | 3 +- .../pitb/src/{status/mod.rs => status.rs} | 3 +- fighters/plizardon/src/status.rs | 2 + fighters/reflet/src/status.rs | 2 + fighters/ridley/src/status.rs | 1 + fighters/robot/src/status.rs | 1 + fighters/rockman/src/status.rs | 1 + fighters/rosetta/src/status.rs | 2 + fighters/ryu/src/status.rs | 1 + fighters/samusd/src/status.rs | 2 + fighters/shizue/src/status.rs | 2 + fighters/shulk/src/status.rs | 2 + .../simon/src/{status/mod.rs => status.rs} | 2 + .../snake/src/{status/mod.rs => status.rs} | 2 + fighters/sonic/src/status.rs | 2 + fighters/szerosuit/src/status.rs | 2 + fighters/tantan/src/status.rs | 1 - fighters/toonlink/src/status.rs | 1 + fighters/trail/src/status.rs | 1 + fighters/wario/src/status.rs | 1 + fighters/wiifit/src/status.rs | 1 + fighters/wolf/src/status.rs | 2 + fighters/yoshi/src/status.rs | 1 + fighters/younglink/src/status.rs | 1 + fighters/zelda/src/status.rs | 6 +- 127 files changed, 311 insertions(+), 311 deletions(-) create mode 100644 fighters/krool/src/status/attack_lw4.rs rename fighters/metaknight/src/{status/mod.rs => status.rs} (78%) rename fighters/pacman/src/{status/mod.rs => status.rs} (71%) rename fighters/peach/src/{status/mod.rs => status.rs} (80%) rename fighters/pit/src/{status/mod.rs => status.rs} (78%) rename fighters/pitb/src/{status/mod.rs => status.rs} (71%) rename fighters/simon/src/{status/mod.rs => status.rs} (78%) rename fighters/snake/src/{status/mod.rs => status.rs} (97%) diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index 54a7ab708f..f58d32141a 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK diff --git a/fighters/brave/src/acmd/aerials.rs b/fighters/brave/src/acmd/aerials.rs index 78bc4225c5..021008f3fc 100644 --- a/fighters/brave/src/acmd/aerials.rs +++ b/fighters/brave/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -42,7 +41,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } frame(lua_state, 42.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -84,7 +82,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -124,7 +121,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -186,7 +182,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } frame(lua_state, 35.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -267,15 +262,18 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/brave/src/acmd/ground.rs b/fighters/brave/src/acmd/ground.rs index 3297768667..9e261d3a1b 100644 --- a/fighters/brave/src/acmd/ground.rs +++ b/fighters/brave/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -167,6 +166,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_attack11", expression_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index 35e877bced..b7b5da0d9b 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -50,7 +49,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -76,14 +74,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -97,7 +93,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -163,16 +158,19 @@ unsafe extern "C" fn effect_specialairlw8(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_speciallw8", effect_speciallw8); agent.acmd("effect_specialairlw8", effect_specialairlw8); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/smashes.rs b/fighters/brave/src/acmd/smashes.rs index 2b6757d01c..c89e42ca0d 100644 --- a/fighters/brave/src/acmd/smashes.rs +++ b/fighters/brave/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -37,7 +36,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 4.0); } - } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { @@ -93,7 +91,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } - } unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { @@ -122,7 +119,6 @@ unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_brave_smash_s02")); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -183,35 +179,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_02")); - } - frame(lua_state, 9.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_brave_smash_h01")); - } - frame(lua_state, 11.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_brave_attack09")); - } - frame(lua_state, 13.0); - if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { - frame(lua_state, 17.0); - WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); - PLAY_SE(agent, Hash40::new("se_brave_special_s05")); - } - frame(lua_state, 43.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_brave_smash_h02")); - } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -257,7 +224,33 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("brave_lightning3_sword"), false, true); } +} +unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_02")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h01")); + } + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_brave_attack09")); + } + frame(lua_state, 13.0); + if WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_CRITICAL_HIT) { + frame(lua_state, 17.0); + WorkModule::is_flag(boma, *FIGHTER_BRAVE_INSTANCE_WORK_ID_FLAG_PLAY_MISS_SE); + PLAY_SE(agent, Hash40::new("se_brave_special_s05")); + } + frame(lua_state, 43.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_brave_smash_h02")); + } } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -312,7 +305,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -376,7 +368,6 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BRAVE_INSTANCE_WORK_ID_INT_EFFECT_KIND_SWORD_FLARE, false, true); } - } unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { @@ -406,7 +397,6 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("se_brave_special_l19")); } } - } pub fn install(agent: &mut Agent) { @@ -414,9 +404,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("sound_attackhi4", sound_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/brave/src/acmd/throws.rs b/fighters/brave/src/acmd/throws.rs index 9b36085b6e..ab7450924b 100644 --- a/fighters/brave/src/acmd/throws.rs +++ b/fighters/brave/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -158,8 +157,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/brave/src/acmd/tilts.rs b/fighters/brave/src/acmd/tilts.rs index 07361f9bd2..e0c094af4b 100644 --- a/fighters/brave/src/acmd/tilts.rs +++ b/fighters/brave/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -34,7 +33,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { @@ -64,7 +62,6 @@ unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks3s2(agent: &mut L2CAgentBase) { @@ -134,7 +131,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -189,7 +185,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("game_attacks3s2", game_attacks3s2); agent.acmd("expression_attacks3s2", expression_attacks3s2); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/captain/src/acmd/mod.rs b/fighters/captain/src/acmd/mod.rs index 095a2343a6..4ef668d792 100644 --- a/fighters/captain/src/acmd/mod.rs +++ b/fighters/captain/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/captain/src/status.rs b/fighters/captain/src/status.rs index 12b375c06e..b95c044be5 100644 --- a/fighters/captain/src/status.rs +++ b/fighters/captain/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_lw; diff --git a/fighters/captain/src/status/special_lw.rs b/fighters/captain/src/status/special_lw.rs index 067acf903a..43fa7dc866 100644 --- a/fighters/captain/src/status/special_lw.rs +++ b/fighters/captain/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_lw_end_init(fighter: &mut L2CFighterCommon) -> L2CValue { let start_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_KICK_START_SITUATION); diff --git a/fighters/daisy/src/status.rs b/fighters/daisy/src/status.rs index ec19b4605f..123803f5ee 100644 --- a/fighters/daisy/src/status.rs +++ b/fighters/daisy/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod attack_air; mod special_s; diff --git a/fighters/daisy/src/status/attack_air.rs b/fighters/daisy/src/status/attack_air.rs index 188055037e..a1acee8303 100644 --- a/fighters/daisy/src/status/attack_air.rs +++ b/fighters/daisy/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_AIR diff --git a/fighters/daisy/src/status/special_lw.rs b/fighters/daisy/src/status/special_lw.rs index aa27794843..1393cd0985 100644 --- a/fighters/daisy/src/status/special_lw.rs +++ b/fighters/daisy/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_LW diff --git a/fighters/daisy/src/status/special_s.rs b/fighters/daisy/src/status/special_s.rs index 47a3d30ead..744719383c 100644 --- a/fighters/daisy/src/status/special_s.rs +++ b/fighters/daisy/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP diff --git a/fighters/daisy/src/status/uniq_float.rs b/fighters/daisy/src/status/uniq_float.rs index ecc48ca209..b1e5d8a0f8 100644 --- a/fighters/daisy/src/status/uniq_float.rs +++ b/fighters/daisy/src/status/uniq_float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status.rs index a6868f101c..6cabc2fcc3 100644 --- a/fighters/dedede/src/status.rs +++ b/fighters/dedede/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_hi; mod special_lw; diff --git a/fighters/dedede/src/status/special_hi.rs b/fighters/dedede/src/status/special_hi.rs index 220e091b89..a466e41851 100644 --- a/fighters/dedede/src/status/special_hi.rs +++ b/fighters/dedede/src/status/special_hi.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; +// FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE unsafe extern "C" fn specialhifailure_main(fighter: &mut L2CFighterCommon) -> L2CValue{ MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); diff --git a/fighters/dedede/src/status/special_lw.rs b/fighters/dedede/src/status/special_lw.rs index e44e8b10b8..a3c6e4a1e1 100644 --- a/fighters/dedede/src/status/special_lw.rs +++ b/fighters/dedede/src/status/special_lw.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; +// FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT unsafe extern "C" fn speciallwjumpsquat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ diff --git a/fighters/demon/src/acmd/mod.rs b/fighters/demon/src/acmd/mod.rs index 6376aca099..bc42bd3b54 100644 --- a/fighters/demon/src/acmd/mod.rs +++ b/fighters/demon/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod jabs; mod ground; diff --git a/fighters/demon/src/status.rs b/fighters/demon/src/status.rs index e81352ca08..68f52254a9 100644 --- a/fighters/demon/src/status.rs +++ b/fighters/demon/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod wait; mod dash; diff --git a/fighters/demon/src/status/attack.rs b/fighters/demon/src/status/attack.rs index 38d0d98f96..3e8581865b 100644 --- a/fighters/demon/src/status/attack.rs +++ b/fighters/demon/src/status/attack.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_ATTACK // +// FIGHTER_STATUS_KIND_ATTACK // Here to force Kazuya to only use neutral attack to continue the combo. unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/demon/src/status/attack_air.rs b/fighters/demon/src/status/attack_air.rs index 724a1a9ced..c000a1fd39 100644 --- a/fighters/demon/src/status/attack_air.rs +++ b/fighters/demon/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_AIR // // For fixing momentum transfer diff --git a/fighters/demon/src/status/attack_combo.rs b/fighters/demon/src/status/attack_combo.rs index 5db2376777..1f66ad97fa 100644 --- a/fighters/demon/src/status/attack_combo.rs +++ b/fighters/demon/src/status/attack_combo.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; diff --git a/fighters/demon/src/status/dash.rs b/fighters/demon/src/status/dash.rs index 3327bf5da6..36f0996c2e 100644 --- a/fighters/demon/src/status/dash.rs +++ b/fighters/demon/src/status/dash.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_DASH pub unsafe extern "C" fn status_dash(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_Dash_Sub(); diff --git a/fighters/demon/src/status/dash_back.rs b/fighters/demon/src/status/dash_back.rs index b5d2a53343..f83c3b27d0 100644 --- a/fighters/demon/src/status/dash_back.rs +++ b/fighters/demon/src/status/dash_back.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_DEMON_STATUS_KIND_DASH_BACK utils::import_noreturn!(common::shoto_status::{ fgc_end_dashback diff --git a/fighters/demon/src/status/landing.rs b/fighters/demon/src/status/landing.rs index 3bd62849ed..07c9175fcf 100644 --- a/fighters/demon/src/status/landing.rs +++ b/fighters/demon/src/status/landing.rs @@ -1,11 +1,10 @@ use super::*; -use globals::*; extern "Rust" { fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; } -// FIGHTER_STATUS_KIND_LANDING // +// FIGHTER_STATUS_KIND_LANDING pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_landing_main(fighter) diff --git a/fighters/demon/src/status/turn_dash.rs b/fighters/demon/src/status/turn_dash.rs index a0cccb8b30..4eba60cf24 100644 --- a/fighters/demon/src/status/turn_dash.rs +++ b/fighters/demon/src/status/turn_dash.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_TURN_DASH // +// FIGHTER_STATUS_KIND_TURN_DASH pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); diff --git a/fighters/diddy/src/status.rs b/fighters/diddy/src/status.rs index ce6502e4dc..f75c70b3d7 100644 --- a/fighters/diddy/src/status.rs +++ b/fighters/diddy/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; mod special_s; diff --git a/fighters/diddy/src/status/special_hi.rs b/fighters/diddy/src/status/special_hi.rs index c7a8cd0f90..f111f6dabc 100644 --- a/fighters/diddy/src/status/special_hi.rs +++ b/fighters/diddy/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_DIDDY_STATUS_KIND_SPECIAL_HI_CHARGE_DAMAGE diff --git a/fighters/diddy/src/status/special_n.rs b/fighters/diddy/src/status/special_n.rs index 35ee799189..f5f0db7d25 100644 --- a/fighters/diddy/src/status/special_n.rs +++ b/fighters/diddy/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); diff --git a/fighters/dolly/src/acmd/mod.rs b/fighters/dolly/src/acmd/mod.rs index 095a2343a6..4ef668d792 100644 --- a/fighters/dolly/src/acmd/mod.rs +++ b/fighters/dolly/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/dolly/src/status.rs b/fighters/dolly/src/status.rs index bfae4b8a15..d67eff7a3d 100644 --- a/fighters/dolly/src/status.rs +++ b/fighters/dolly/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod wait; mod turn_dash; diff --git a/fighters/dolly/src/status/dash_back.rs b/fighters/dolly/src/status/dash_back.rs index c22ac225e3..a8d70ac7e9 100644 --- a/fighters/dolly/src/status/dash_back.rs +++ b/fighters/dolly/src/status/dash_back.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import utils::import_noreturn!(common::shoto_status::{ fgc_end_dashback, diff --git a/fighters/dolly/src/status/guard_off.rs b/fighters/dolly/src/status/guard_off.rs index de81ca3842..ec81b557cf 100644 --- a/fighters/dolly/src/status/guard_off.rs +++ b/fighters/dolly/src/status/guard_off.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { let rate = fighter.status_GuardOff_Common().get_f32(); diff --git a/fighters/dolly/src/status/landing.rs b/fighters/dolly/src/status/landing.rs index 3bd62849ed..091019c42d 100644 --- a/fighters/dolly/src/status/landing.rs +++ b/fighters/dolly/src/status/landing.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; diff --git a/fighters/dolly/src/status/special_hi.rs b/fighters/dolly/src/status/special_hi.rs index 24e942c7c1..79295eb1c0 100644 --- a/fighters/dolly/src/status/special_hi.rs +++ b/fighters/dolly/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP diff --git a/fighters/dolly/src/status/special_s.rs b/fighters/dolly/src/status/special_s.rs index 8bf5a4dcd6..d98ce7fdd5 100644 --- a/fighters/dolly/src/status/special_s.rs +++ b/fighters/dolly/src/status/special_s.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -10,7 +9,7 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND // +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -19,7 +18,7 @@ pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) 0.into() } -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B // +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -28,7 +27,7 @@ pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND // +// FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { diff --git a/fighters/dolly/src/status/super_special.rs b/fighters/dolly/src/status/super_special.rs index 57bd5c8829..187dfc15ca 100644 --- a/fighters/dolly/src/status/super_special.rs +++ b/fighters/dolly/src/status/super_special.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL // +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2CValue { // Only use meter if you didn't cancel directly from a different super diff --git a/fighters/dolly/src/status/super_special2.rs b/fighters/dolly/src/status/super_special2.rs index dea2eef9f0..f1b8f322db 100644 --- a/fighters/dolly/src/status/super_special2.rs +++ b/fighters/dolly/src/status/super_special2.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 // +// FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2CValue { // Only use meter if you didn't cancel directly from a different supper diff --git a/fighters/dolly/src/status/turn_dash.rs b/fighters/dolly/src/status/turn_dash.rs index cb959f91c7..3ef5fbb5cb 100644 --- a/fighters/dolly/src/status/turn_dash.rs +++ b/fighters/dolly/src/status/turn_dash.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_TURN_DASH // +// FIGHTER_STATUS_KIND_TURN_DASH pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { app::FighterSpecializer_Dolly::update_opponent_lr_1on1( diff --git a/fighters/dolly/src/status/wait.rs b/fighters/dolly/src/status/wait.rs index a0f2187bb9..a8ee262329 100644 --- a/fighters/dolly/src/status/wait.rs +++ b/fighters/dolly/src/status/wait.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_WAIT // +// FIGHTER_STATUS_KIND_WAIT pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Wait() diff --git a/fighters/donkey/src/acmd/mod.rs b/fighters/donkey/src/acmd/mod.rs index 08566acdd5..689753c3a5 100644 --- a/fighters/donkey/src/acmd/mod.rs +++ b/fighters/donkey/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/donkey/src/status/shoulder.rs b/fighters/donkey/src/status/shoulder.rs index 6a066bd4b6..4b92bf4209 100644 --- a/fighters/donkey/src/status/shoulder.rs +++ b/fighters/donkey/src/status/shoulder.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import /// cargo carry diff --git a/fighters/donkey/src/status/super_lift.rs b/fighters/donkey/src/status/super_lift.rs index 3a8258dbe6..a00a619b13 100644 --- a/fighters/donkey/src/status/super_lift.rs +++ b/fighters/donkey/src/status/super_lift.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import /// heavy item carry diff --git a/fighters/duckhunt/src/acmd/mod.rs b/fighters/duckhunt/src/acmd/mod.rs index 095a2343a6..4ef668d792 100644 --- a/fighters/duckhunt/src/acmd/mod.rs +++ b/fighters/duckhunt/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/duckhunt/src/status.rs b/fighters/duckhunt/src/status.rs index 42ac2f22d8..485e01d74d 100644 --- a/fighters/duckhunt/src/status.rs +++ b/fighters/duckhunt/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attacks3; mod special_n; diff --git a/fighters/duckhunt/src/status/attacks3.rs b/fighters/duckhunt/src/status/attacks3.rs index cc16bf0bfc..0a92620750 100644 --- a/fighters/duckhunt/src/status/attacks3.rs +++ b/fighters/duckhunt/src/status/attacks3.rs @@ -1,6 +1,5 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_S3 diff --git a/fighters/duckhunt/src/status/special_n.rs b/fighters/duckhunt/src/status/special_n.rs index 4c93896c11..09a1f920bd 100644 --- a/fighters/duckhunt/src/status/special_n.rs +++ b/fighters/duckhunt/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_N diff --git a/fighters/duckhunt/src/status/special_s.rs b/fighters/duckhunt/src/status/special_s.rs index 4822ea15d1..dc1565e116 100644 --- a/fighters/duckhunt/src/status/special_s.rs +++ b/fighters/duckhunt/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S diff --git a/fighters/gamewatch/src/acmd/aerials.rs b/fighters/gamewatch/src/acmd/aerials.rs index 88ae996c38..e27f591687 100644 --- a/fighters/gamewatch/src/acmd/aerials.rs +++ b/fighters/gamewatch/src/acmd/aerials.rs @@ -71,7 +71,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -110,7 +109,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { @@ -119,7 +117,6 @@ unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -197,7 +194,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { @@ -206,7 +202,6 @@ unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::change_motion(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, Hash40::new("landing_air_b"), false, 1.0); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -230,7 +225,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_BREATH, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { @@ -296,13 +290,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - } unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { @@ -316,20 +303,25 @@ unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { slope!(agent, *DAMAGE_NO_REACTION_MODE_NORMAL, *WEAPON_INKLING_ROLLER_INSTANCE_WORK_ID_FLOAT_B); ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, 0 as u32); } - } +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("game_landingairf", game_landingairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("sound_attackairhi", sound_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_landingairlw", null); agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/gamewatch/src/acmd/ground.rs b/fighters/gamewatch/src/acmd/ground.rs index 6c74ff576b..9f2b1a68c1 100644 --- a/fighters/gamewatch/src/acmd/ground.rs +++ b/fighters/gamewatch/src/acmd/ground.rs @@ -24,7 +24,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { @@ -71,11 +70,11 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { JostleModule::set_status(boma, true); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gamewatch/src/acmd/mod.rs b/fighters/gamewatch/src/acmd/mod.rs index 08566acdd5..689753c3a5 100644 --- a/fighters/gamewatch/src/acmd/mod.rs +++ b/fighters/gamewatch/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/gamewatch/src/acmd/other.rs b/fighters/gamewatch/src/acmd/other.rs index 57e47348e0..34ad0051fa 100644 --- a/fighters/gamewatch/src/acmd/other.rs +++ b/fighters/gamewatch/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -8,7 +7,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -40,7 +38,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_appealhil(agent: &mut L2CAgentBase) { @@ -63,7 +60,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -77,7 +73,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -96,7 +91,6 @@ unsafe extern "C" fn game_down(agent: &mut L2CAgentBase) { if is_excute(agent) { sv_kinetic_energy!(set_limit_speed, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.0, 0.0); } - } unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { @@ -106,21 +100,25 @@ unsafe extern "C" fn game_passive(agent: &mut L2CAgentBase) { if is_excute(agent) { SET_SPEED_EX(agent, 0, 0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_appealhil", sound_appealhil); agent.acmd("sound_appealhir", sound_appealhir); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_downforwardd", game_down); agent.acmd("game_downforwardu", game_down); + agent.acmd("game_downbackd", game_down); agent.acmd("game_downbacku", game_down); + agent.acmd("game_passivestandf", game_passive); agent.acmd("game_passivestandb", game_passive); } diff --git a/fighters/gamewatch/src/acmd/smashes.rs b/fighters/gamewatch/src/acmd/smashes.rs index 614f330ba4..2cbbec8953 100644 --- a/fighters/gamewatch/src/acmd/smashes.rs +++ b/fighters/gamewatch/src/acmd/smashes.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { WHOLE_HIT(agent, *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -77,12 +75,13 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("game_attackhi4r", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gamewatch/src/acmd/specials.rs b/fighters/gamewatch/src/acmd/specials.rs index 397e62e586..47d131584e 100644 --- a/fighters/gamewatch/src/acmd/specials.rs +++ b/fighters/gamewatch/src/acmd/specials.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { @@ -69,7 +68,6 @@ unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials3(agent: &mut L2CAgentBase) { @@ -86,7 +84,6 @@ unsafe extern "C" fn game_specials3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials4(agent: &mut L2CAgentBase) { @@ -103,7 +100,6 @@ unsafe extern "C" fn game_specials4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials5(agent: &mut L2CAgentBase) { @@ -126,7 +122,6 @@ unsafe extern "C" fn game_specials5(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials6(agent: &mut L2CAgentBase) { @@ -160,7 +155,6 @@ unsafe extern "C" fn game_specials7(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials8(agent: &mut L2CAgentBase) { @@ -193,7 +187,6 @@ unsafe extern "C" fn game_specials9(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -246,7 +239,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } frame(lua_state, 43.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn expression_specialhi(agent: &mut L2CAgentBase) { @@ -347,6 +339,7 @@ unsafe extern "C" fn expression_specialhiopen(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialn", game_specialn); agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specials1", game_specials1); agent.acmd("game_specialairs1", game_specials1); agent.acmd("game_specials2", game_specials2); @@ -365,6 +358,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairs8", game_specials8); agent.acmd("game_specials9", game_specials9); agent.acmd("game_specialairs9", game_specials9); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialhi); agent.acmd("expression_specialhi", expression_specialhi); diff --git a/fighters/gamewatch/src/acmd/throws.rs b/fighters/gamewatch/src/acmd/throws.rs index 1ac2aaec2a..373d40af97 100644 --- a/fighters/gamewatch/src/acmd/throws.rs +++ b/fighters/gamewatch/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -44,7 +43,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -66,7 +64,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { @@ -107,7 +104,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -149,7 +145,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_GAMEWATCH_STATUS_THROW_FLAG_SET_STOCK_ICON); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -192,7 +187,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { } frame(lua_state, 36.0); FT_MOTION_RATE(agent, 2.0); - } unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { @@ -240,15 +234,18 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.5); frame(lua_state, 47.0); FT_MOTION_RATE(agent, 1.0); - } pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gamewatch/src/acmd/tilts.rs b/fighters/gamewatch/src/acmd/tilts.rs index 145bf466e3..253cd37277 100644 --- a/fighters/gamewatch/src/acmd/tilts.rs +++ b/fighters/gamewatch/src/acmd/tilts.rs @@ -24,7 +24,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -71,7 +70,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { VisibilityModule::set_default_int64(boma, Hash40::new("lhand").hash as i64); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -106,11 +104,12 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_NORMAL_WEAPON, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gamewatch/src/breath/acmd.rs b/fighters/gamewatch/src/breath/acmd.rs index 42139c9972..144a6e40ce 100644 --- a/fighters/gamewatch/src/breath/acmd.rs +++ b/fighters/gamewatch/src/breath/acmd.rs @@ -1,8 +1,6 @@ use super::*; -unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { - -} +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairhi", game_attackairhi); diff --git a/fighters/gamewatch/src/status.rs b/fighters/gamewatch/src/status.rs index 43cff53337..e8fa3b3eae 100644 --- a/fighters/gamewatch/src/status.rs +++ b/fighters/gamewatch/src/status.rs @@ -45,23 +45,18 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn gamewatch_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_GAMEWATCH { - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - smashline::Agent::new("gamewatch") - .on_start(gamewatch_init) - .install(); + agent.on_start(on_start); + special_hi::install(agent); special_hi_open::install(agent); } diff --git a/fighters/ganon/src/acmd/aerials.rs b/fighters/ganon/src/acmd/aerials.rs index 47b9d0c04b..98d2e36c51 100644 --- a/fighters/ganon/src/acmd/aerials.rs +++ b/fighters/ganon/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -44,7 +43,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -83,7 +81,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -133,7 +130,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -201,7 +197,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { diff --git a/fighters/ganon/src/acmd/ground.rs b/fighters/ganon/src/acmd/ground.rs index 62bcf531c5..2b1793fe93 100644 --- a/fighters/ganon/src/acmd/ground.rs +++ b/fighters/ganon/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -74,7 +73,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/ganon/src/acmd/mod.rs b/fighters/ganon/src/acmd/mod.rs index 08566acdd5..689753c3a5 100644 --- a/fighters/ganon/src/acmd/mod.rs +++ b/fighters/ganon/src/acmd/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod aerials; mod tilts; mod other; diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index de3d5c3757..aa2ff890a2 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -70,7 +69,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { @@ -84,7 +82,6 @@ unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { if is_excute(agent) { damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { @@ -98,7 +95,6 @@ unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { if is_excute(agent) { damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { @@ -112,7 +108,6 @@ unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { if is_excute(agent) { damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { @@ -126,7 +121,6 @@ unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { if is_excute(agent) { damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/ganon/src/acmd/smashes.rs b/fighters/ganon/src/acmd/smashes.rs index d1c93b1801..b503daf510 100644 --- a/fighters/ganon/src/acmd/smashes.rs +++ b/fighters/ganon/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -36,7 +35,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -72,7 +70,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -128,7 +125,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/ganon/src/acmd/throws.rs b/fighters/ganon/src/acmd/throws.rs index 72c6427337..d79dc7eb46 100644 --- a/fighters/ganon/src/acmd/throws.rs +++ b/fighters/ganon/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -115,5 +114,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catchturn", game_catchturn); agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/ganon/src/acmd/tilts.rs b/fighters/ganon/src/acmd/tilts.rs index 21a46b6fe5..54676e7d96 100644 --- a/fighters/ganon/src/acmd/tilts.rs +++ b/fighters/ganon/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -28,7 +27,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { @@ -50,7 +48,6 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -80,7 +77,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { @@ -209,7 +205,6 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { @@ -378,26 +373,24 @@ unsafe extern "C" fn expression_attacklw32(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("ganon") - .acmd("game_attacks3", game_attacks3) - .acmd("game_attacks3hi", game_attacks3hi) - .acmd("game_attacks3lw", game_attacks3lw) - .acmd("effect_attacks3hi", effect_attacks3hi) - .acmd("effect_attacks3lw", effect_attacks3lw) + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("effect_attacks3lw", effect_attacks3lw); - .acmd("game_attackhi3", game_attackhi3) - .acmd("effect_attackhi3", effect_attackhi3) - .acmd("sound_attackhi3", sound_attackhi3) - .acmd("expression_attackhi3", expression_attackhi3) + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); - .acmd("game_attacklw3", game_attacklw3) - .acmd("effect_attacklw3", effect_attacklw3) - .acmd("sound_attacklw3", sound_attacklw3) - .acmd("expression_attacklw3", expression_attacklw3) + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("effect_attacklw3", effect_attacklw3); + agent.acmd("sound_attacklw3", sound_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); - .acmd("game_attacklw32", game_attacklw32) - .acmd("effect_attacklw32", effect_attacklw32) - .acmd("sound_attacklw32", sound_attacklw32) - .acmd("expression_attacklw32", expression_attacklw32) - .install(); + agent.acmd("game_attacklw32", game_attacklw32); + agent.acmd("effect_attacklw32", effect_attacklw32); + agent.acmd("sound_attacklw32", sound_attacklw32); + agent.acmd("expression_attacklw32", expression_attacklw32); } diff --git a/fighters/ganon/src/status.rs b/fighters/ganon/src/status.rs index bd6c806a54..a5a57bb194 100644 --- a/fighters/ganon/src/status.rs +++ b/fighters/ganon/src/status.rs @@ -27,12 +27,10 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn on_start(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on agent init - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on agent init + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(should_use_special_n_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { @@ -42,6 +40,7 @@ pub unsafe fn ganon_set_air(fighter: &mut L2CFighterCommon) { pub fn install(agent: &mut Agent) { agent.on_start(on_start); + attack_lw3::install(agent); special_n::install(agent); special_n_float::install(agent); diff --git a/fighters/ganon/src/status/special_air_s_catch.rs b/fighters/ganon/src/status/special_air_s_catch.rs index d265f16711..1189be4a19 100644 --- a/fighters/ganon/src/status/special_air_s_catch.rs +++ b/fighters/ganon/src/status/special_air_s_catch.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_air_s_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::set_rate(fighter.module_accessor, 0.0); diff --git a/fighters/ganon/src/status/special_lw.rs b/fighters/ganon/src/status/special_lw.rs index 558b2a2496..697749294d 100644 --- a/fighters/ganon/src/status/special_lw.rs +++ b/fighters/ganon/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/ganon/src/status/special_s.rs b/fighters/ganon/src/status/special_s.rs index 7eae73ab4a..514b284ace 100644 --- a/fighters/ganon/src/status/special_s.rs +++ b/fighters/ganon/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { diff --git a/fighters/gaogaen/src/status.rs b/fighters/gaogaen/src/status.rs index 6dd690475d..5009cbf8cd 100644 --- a/fighters/gaogaen/src/status.rs +++ b/fighters/gaogaen/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod attack_lw4; mod special_n; diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status.rs index 71900d8f04..4057dfddd8 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/inkling/src/status.rs b/fighters/inkling/src/status.rs index a7e01599d8..b1e6ce299d 100644 --- a/fighters/inkling/src/status.rs +++ b/fighters/inkling/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s; mod guard; diff --git a/fighters/jack/src/status.rs b/fighters/jack/src/status.rs index a04b0dd03f..14fdc5a421 100644 --- a/fighters/jack/src/status.rs +++ b/fighters/jack/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import pub mod doyle; pub mod special_lw; diff --git a/fighters/kamui/src/status.rs b/fighters/kamui/src/status.rs index eea8ca5953..868a42d6c1 100644 --- a/fighters/kamui/src/status.rs +++ b/fighters/kamui/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_lw; diff --git a/fighters/ken/src/status.rs b/fighters/ken/src/status.rs index 0452ed2e0d..a63082a4e6 100644 --- a/fighters/ken/src/status.rs +++ b/fighters/ken/src/status.rs @@ -1,6 +1,7 @@ use super::*; use globals::*; // status script import + mod finals; mod special_cmd4; mod special_hi; diff --git a/fighters/kirby/src/status.rs b/fighters/kirby/src/status.rs index 8e15004725..8e7c927802 100644 --- a/fighters/kirby/src/status.rs +++ b/fighters/kirby/src/status.rs @@ -1,5 +1,7 @@ use super::*; use globals::*; +// status script import + mod special_hi_h; mod gaogaen_special_n; mod luigi_special_n; diff --git a/fighters/koopa/src/status.rs b/fighters/koopa/src/status.rs index 5d524b77bc..40ab5e6ae5 100644 --- a/fighters/koopa/src/status.rs +++ b/fighters/koopa/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; mod special_s; diff --git a/fighters/koopajr/src/status.rs b/fighters/koopajr/src/status.rs index 7a58272752..09368e7f41 100644 --- a/fighters/koopajr/src/status.rs +++ b/fighters/koopajr/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s_jump; diff --git a/fighters/krool/src/status.rs b/fighters/krool/src/status.rs index 233c4d0940..ce211810af 100644 --- a/fighters/krool/src/status.rs +++ b/fighters/krool/src/status.rs @@ -1,73 +1,10 @@ use super::*; use globals::*; -mod special_hi; -mod special_lw; - - -// FIGHTER_STATUS_KIND_ATTACK_LW4 // - -pub unsafe extern "C" fn attack_lw4_main(agent: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); - agent.attack_lw4_mtrans(); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - if !StopModule::is_stop(agent.module_accessor) { - agent.status_ThrowKirby_Uniq(L2CValue::Bool(false)); - } - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); - agent.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn attack_lw4_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(agent.module_accessor) - && !WorkModule::is_enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) - && !MotionModule::is_end(agent.module_accessor) { - agent.sub_status_uniq_process_ThrowKirby_execFixPos(); - return 0.into() - } - agent.status_AttackLw4_Main() -} - -pub unsafe extern "C" fn attack_lw4_map_correction(agent: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(agent.module_accessor); - let prev_frame = MotionModule::prev_frame(agent.module_accessor); - let start_air_frame = 2.0; - let fall_start_frame = 19.0; - let fall_stop_frame = 20.0; - let landing_frame = 21.0; +// status script import - if frame <= fall_start_frame { - return 0.into() - } - if prev_frame < start_air_frame && frame >= start_air_frame { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); - } - if agent.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if prev_frame < fall_stop_frame && frame >= fall_stop_frame { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_mul(agent.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_add(agent.lua_state_agent); - MotionModule::set_frame(agent.module_accessor, fall_stop_frame, true); - MotionModule::set_rate(agent.module_accessor, 0.0); - } - } - else { - if frame < landing_frame { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - MotionModule::set_frame(agent.module_accessor, landing_frame, true); - MotionModule::set_rate(agent.module_accessor, 1.0); - } - } - 0.into() -} +mod special_hi; +mod special_lw; +mod attack_lw4; // handle damage to belly #[no_mangle] @@ -117,6 +54,5 @@ pub unsafe extern "C" fn krool_belly_damage_hook_impl(damage: f32, fighter: *mut pub fn install(agent: &mut Agent) { special_hi::install(agent); special_lw::install(agent); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); - agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); + attack_lw4::install(agent); } \ No newline at end of file diff --git a/fighters/krool/src/status/attack_lw4.rs b/fighters/krool/src/status/attack_lw4.rs new file mode 100644 index 0000000000..99225a6666 --- /dev/null +++ b/fighters/krool/src/status/attack_lw4.rs @@ -0,0 +1,71 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_LW4 + +pub unsafe extern "C" fn attack_lw4_main(agent: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); + agent.attack_lw4_mtrans(); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + if !StopModule::is_stop(agent.module_accessor) { + agent.status_ThrowKirby_Uniq(L2CValue::Bool(false)); + } + agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); + agent.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn attack_lw4_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(agent.module_accessor) + && !WorkModule::is_enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) + && !MotionModule::is_end(agent.module_accessor) { + agent.sub_status_uniq_process_ThrowKirby_execFixPos(); + return 0.into() + } + agent.status_AttackLw4_Main() +} + +pub unsafe extern "C" fn attack_lw4_map_correction(agent: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(agent.module_accessor); + let prev_frame = MotionModule::prev_frame(agent.module_accessor); + let start_air_frame = 2.0; + let fall_start_frame = 19.0; + let fall_stop_frame = 20.0; + let landing_frame = 21.0; + + if frame <= fall_start_frame { + return 0.into() + } + if prev_frame < start_air_frame && frame >= start_air_frame { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); + } + if agent.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if prev_frame < fall_stop_frame && frame >= fall_stop_frame { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_mul(agent.lua_state_agent); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_add(agent.lua_state_agent); + MotionModule::set_frame(agent.module_accessor, fall_stop_frame, true); + MotionModule::set_rate(agent.module_accessor, 0.0); + } + } + else { + if frame < landing_frame { + KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + MotionModule::set_frame(agent.module_accessor, landing_frame, true); + MotionModule::set_rate(agent.module_accessor, 1.0); + } + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); +} \ No newline at end of file diff --git a/fighters/link/src/status.rs b/fighters/link/src/status.rs index 33a892d007..8876be00dd 100644 --- a/fighters/link/src/status.rs +++ b/fighters/link/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; mod special_hi; diff --git a/fighters/littlemac/src/status.rs b/fighters/littlemac/src/status.rs index 1d452fde49..7858fa8f42 100644 --- a/fighters/littlemac/src/status.rs +++ b/fighters/littlemac/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_s; @@ -14,20 +16,17 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -unsafe extern "C" fn littlemac_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_LITTLEMAC { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_n::install(agent); special_s::install(agent); special_hi::install(agent); special_lw::install(agent); special_lw_cancel::install(agent); - agent.on_start(littlemac_init); } \ No newline at end of file diff --git a/fighters/lucario/src/status.rs b/fighters/lucario/src/status.rs index c627c50dc2..0dffd0210f 100644 --- a/fighters/lucario/src/status.rs +++ b/fighters/lucario/src/status.rs @@ -1,6 +1,7 @@ use super::*; use globals::*; // status script import + mod attack_air; mod attack_hi4; mod special_hi; diff --git a/fighters/luigi/src/status.rs b/fighters/luigi/src/status.rs index 262fb7166d..536938482e 100644 --- a/fighters/luigi/src/status.rs +++ b/fighters/luigi/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_s; diff --git a/fighters/mario/src/status.rs b/fighters/mario/src/status.rs index 516ffee3d6..afa7561d70 100644 --- a/fighters/mario/src/status.rs +++ b/fighters/mario/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; diff --git a/fighters/mariod/src/status.rs b/fighters/mariod/src/status.rs index 0abb279e56..f4bd6bd874 100644 --- a/fighters/mariod/src/status.rs +++ b/fighters/mariod/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; diff --git a/fighters/marth/src/status.rs b/fighters/marth/src/status.rs index 3c515ac4e7..c0cec6331e 100644 --- a/fighters/marth/src/status.rs +++ b/fighters/marth/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_s; diff --git a/fighters/master/src/status.rs b/fighters/master/src/status.rs index 1bfd8a0b7b..48aaa3bbdf 100644 --- a/fighters/master/src/status.rs +++ b/fighters/master/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod rebirth; diff --git a/fighters/metaknight/src/status/mod.rs b/fighters/metaknight/src/status.rs similarity index 78% rename from fighters/metaknight/src/status/mod.rs rename to fighters/metaknight/src/status.rs index dc3f430310..9b9df78449 100644 --- a/fighters/metaknight/src/status/mod.rs +++ b/fighters/metaknight/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s; mod attack_100; diff --git a/fighters/mewtwo/src/status.rs b/fighters/mewtwo/src/status.rs index 49cd29c0a1..2e1ae00267 100644 --- a/fighters/mewtwo/src/status.rs +++ b/fighters/mewtwo/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod jump_aerial; mod attack_air; diff --git a/fighters/miifighter/src/status.rs b/fighters/miifighter/src/status.rs index e491edc9bd..1ed37a180b 100644 --- a/fighters/miifighter/src/status.rs +++ b/fighters/miifighter/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import //Forces Grounded Earthquake punch on the ground diff --git a/fighters/miigunner/src/status.rs b/fighters/miigunner/src/status.rs index c0176bc8fc..e7692b1a7f 100644 --- a/fighters/miigunner/src/status.rs +++ b/fighters/miigunner/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import // Prevents side special from being used if a missile is present unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status.rs index d7d0fc2a16..93ff942ac8 100644 --- a/fighters/miiswordsman/src/status.rs +++ b/fighters/miiswordsman/src/status.rs @@ -2,7 +2,6 @@ use super::*; use globals::*; // status script import - // FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD unsafe extern "C" fn pre_final_hold(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/murabito/src/status.rs b/fighters/murabito/src/status.rs index fc2f651b14..81e63ff07c 100644 --- a/fighters/murabito/src/status.rs +++ b/fighters/murabito/src/status.rs @@ -2,7 +2,6 @@ use super::*; use globals::*; // status script import - // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S) { diff --git a/fighters/packun/src/status.rs b/fighters/packun/src/status.rs index 920098d296..89ba59574b 100644 --- a/fighters/packun/src/status.rs +++ b/fighters/packun/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_hi; mod special_s; diff --git a/fighters/pacman/src/status/mod.rs b/fighters/pacman/src/status.rs similarity index 71% rename from fighters/pacman/src/status/mod.rs rename to fighters/pacman/src/status.rs index 25c9d60b6b..39bab6e6bc 100644 --- a/fighters/pacman/src/status/mod.rs +++ b/fighters/pacman/src/status.rs @@ -1,5 +1,6 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_s; diff --git a/fighters/palutena/src/status.rs b/fighters/palutena/src/status.rs index 237d9af2f0..7e6f95f68a 100644 --- a/fighters/palutena/src/status.rs +++ b/fighters/palutena/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_n; diff --git a/fighters/peach/src/status/mod.rs b/fighters/peach/src/status.rs similarity index 80% rename from fighters/peach/src/status/mod.rs rename to fighters/peach/src/status.rs index 92931ae11a..f17c47fe6a 100644 --- a/fighters/peach/src/status/mod.rs +++ b/fighters/peach/src/status.rs @@ -1,5 +1,6 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod attack_air; mod jump_aerial; @@ -60,17 +61,17 @@ unsafe extern "C" fn float_check_air_jump_aerial(fighter: &mut L2CFighterCommon) 0.into() } -extern "C" fn peach_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[0x33].assign(&L2CValue::Ptr(float_check_air_jump_aerial as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + attack_air::install(agent); jump_aerial::install(agent); special_hi::install(agent); diff --git a/fighters/pfushigisou/src/status.rs b/fighters/pfushigisou/src/status.rs index 2988605c87..6c85d47bf4 100644 --- a/fighters/pfushigisou/src/status.rs +++ b/fighters/pfushigisou/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import #[skyline::hook(replace=request_change_pokemon)] unsafe fn request_change_pokemon() -> bool { diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status.rs index 112c29e98b..800fb34a60 100644 --- a/fighters/pickel/src/status.rs +++ b/fighters/pickel/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod attack_air_lw; mod entry; diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status.rs index adf9d1fa76..1cfe25b624 100644 --- a/fighters/pikmin/src/status.rs +++ b/fighters/pikmin/src/status.rs @@ -1,4 +1,7 @@ use super::*; +use globals::*; +// status script import + mod escape_air; mod attack_air; mod rebirth; diff --git a/fighters/pit/src/status/mod.rs b/fighters/pit/src/status.rs similarity index 78% rename from fighters/pit/src/status/mod.rs rename to fighters/pit/src/status.rs index afabf459a5..bd3c2188e3 100644 --- a/fighters/pit/src/status/mod.rs +++ b/fighters/pit/src/status.rs @@ -1,5 +1,6 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_s; mod special_hi; diff --git a/fighters/pitb/src/status/mod.rs b/fighters/pitb/src/status.rs similarity index 71% rename from fighters/pitb/src/status/mod.rs rename to fighters/pitb/src/status.rs index 2c47e30dd3..77dac10f3b 100644 --- a/fighters/pitb/src/status/mod.rs +++ b/fighters/pitb/src/status.rs @@ -1,5 +1,6 @@ use super::*; -use smashline::*; +use globals::*; +// status script import mod special_hi; diff --git a/fighters/plizardon/src/status.rs b/fighters/plizardon/src/status.rs index 2f49f8b895..f470a2c344 100644 --- a/fighters/plizardon/src/status.rs +++ b/fighters/plizardon/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s; diff --git a/fighters/reflet/src/status.rs b/fighters/reflet/src/status.rs index 9a84243059..5eaeffe5f6 100644 --- a/fighters/reflet/src/status.rs +++ b/fighters/reflet/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attack_air; diff --git a/fighters/ridley/src/status.rs b/fighters/ridley/src/status.rs index e1cc5d0272..da6b1473da 100644 --- a/fighters/ridley/src/status.rs +++ b/fighters/ridley/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_n; mod special_s; diff --git a/fighters/robot/src/status.rs b/fighters/robot/src/status.rs index 7e48213d5d..bd3c2188e3 100644 --- a/fighters/robot/src/status.rs +++ b/fighters/robot/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_s; mod special_hi; diff --git a/fighters/rockman/src/status.rs b/fighters/rockman/src/status.rs index b3f34201e6..4981a3e83a 100644 --- a/fighters/rockman/src/status.rs +++ b/fighters/rockman/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import pub mod helper; mod walk; diff --git a/fighters/rosetta/src/status.rs b/fighters/rosetta/src/status.rs index b1cf1bc23f..e350772d91 100644 --- a/fighters/rosetta/src/status.rs +++ b/fighters/rosetta/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_hi; diff --git a/fighters/ryu/src/status.rs b/fighters/ryu/src/status.rs index e250572785..b124477418 100644 --- a/fighters/ryu/src/status.rs +++ b/fighters/ryu/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod finals; mod special_cmd4; diff --git a/fighters/samusd/src/status.rs b/fighters/samusd/src/status.rs index d93d6436d3..db02b2a0fa 100644 --- a/fighters/samusd/src/status.rs +++ b/fighters/samusd/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attack_air; mod float; diff --git a/fighters/shizue/src/status.rs b/fighters/shizue/src/status.rs index f92bf42a35..672583d419 100644 --- a/fighters/shizue/src/status.rs +++ b/fighters/shizue/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_hi; diff --git a/fighters/shulk/src/status.rs b/fighters/shulk/src/status.rs index f7aab4bc92..50ae277fd4 100644 --- a/fighters/shulk/src/status.rs +++ b/fighters/shulk/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_s; diff --git a/fighters/simon/src/status/mod.rs b/fighters/simon/src/status.rs similarity index 78% rename from fighters/simon/src/status/mod.rs rename to fighters/simon/src/status.rs index 3a820d1153..c29711155a 100644 --- a/fighters/simon/src/status/mod.rs +++ b/fighters/simon/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod attacklw3; mod attacks3; diff --git a/fighters/snake/src/status/mod.rs b/fighters/snake/src/status.rs similarity index 97% rename from fighters/snake/src/status/mod.rs rename to fighters/snake/src/status.rs index be984fbe36..7699533302 100644 --- a/fighters/snake/src/status/mod.rs +++ b/fighters/snake/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod appeal; mod attack_s4; diff --git a/fighters/sonic/src/status.rs b/fighters/sonic/src/status.rs index a98aea6c58..755f0bf05e 100644 --- a/fighters/sonic/src/status.rs +++ b/fighters/sonic/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod wait; mod dash; diff --git a/fighters/szerosuit/src/status.rs b/fighters/szerosuit/src/status.rs index 3031ff87c7..48aaa3bbdf 100644 --- a/fighters/szerosuit/src/status.rs +++ b/fighters/szerosuit/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod rebirth; diff --git a/fighters/tantan/src/status.rs b/fighters/tantan/src/status.rs index 096df389f7..3e793eca2b 100644 --- a/fighters/tantan/src/status.rs +++ b/fighters/tantan/src/status.rs @@ -2,7 +2,6 @@ use super::*; use globals::*; // status script import - /// Re-enables the ability to use aerial specials when connecting to ground or cliff unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { //remove double dragon effect diff --git a/fighters/toonlink/src/status.rs b/fighters/toonlink/src/status.rs index 098ec67405..6694e3bd13 100644 --- a/fighters/toonlink/src/status.rs +++ b/fighters/toonlink/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_hi; diff --git a/fighters/trail/src/status.rs b/fighters/trail/src/status.rs index ba7678e8a2..8f5329c2cf 100644 --- a/fighters/trail/src/status.rs +++ b/fighters/trail/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod jump_aerial; mod attack_lw4; diff --git a/fighters/wario/src/status.rs b/fighters/wario/src/status.rs index 43e035471c..3b6cfb8238 100644 --- a/fighters/wario/src/status.rs +++ b/fighters/wario/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_s; mod special_hi; diff --git a/fighters/wiifit/src/status.rs b/fighters/wiifit/src/status.rs index ed098d1eee..8a78a0fb93 100644 --- a/fighters/wiifit/src/status.rs +++ b/fighters/wiifit/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod special_s; diff --git a/fighters/wolf/src/status.rs b/fighters/wolf/src/status.rs index 31859e1c73..ebc51138a1 100644 --- a/fighters/wolf/src/status.rs +++ b/fighters/wolf/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s; mod special_hi; diff --git a/fighters/yoshi/src/status.rs b/fighters/yoshi/src/status.rs index ffea087cff..868ccc1e9b 100644 --- a/fighters/yoshi/src/status.rs +++ b/fighters/yoshi/src/status.rs @@ -1,6 +1,7 @@ use super::*; use globals::*; utils::import!(common::djc::attack_air_main_status); +// status script import mod guard_on; mod guard_off; diff --git a/fighters/younglink/src/status.rs b/fighters/younglink/src/status.rs index fd99eaaa48..35d8b31153 100644 --- a/fighters/younglink/src/status.rs +++ b/fighters/younglink/src/status.rs @@ -1,5 +1,6 @@ use super::*; use globals::*; +// status script import mod attack_s4; mod special_hi; diff --git a/fighters/zelda/src/status.rs b/fighters/zelda/src/status.rs index ab6200a623..d0209c53b8 100644 --- a/fighters/zelda/src/status.rs +++ b/fighters/zelda/src/status.rs @@ -1,6 +1,8 @@ -use smash::app::sv_battle_object::module_accessor; - use super::*; +use globals::*; +// status script import + +use smash::app::sv_battle_object::module_accessor; // Prevents side special from being used if a Din's Fire is present unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { From 2e6f8bcfbdc464fc8d3c9e95241bcb4c7136bc3d Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 10:46:38 -0500 Subject: [PATCH 146/172] greninja conflicts --- fighters/gekkouga/src/acmd/ground.rs | 3 +-- fighters/gekkouga/src/shuriken/acmd.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fighters/gekkouga/src/acmd/ground.rs b/fighters/gekkouga/src/acmd/ground.rs index 5f9bff48bb..523815bff8 100644 --- a/fighters/gekkouga/src/acmd/ground.rs +++ b/fighters/gekkouga/src/acmd/ground.rs @@ -49,7 +49,7 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn gekkouga_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -66,7 +66,6 @@ unsafe extern "C" fn gekkouga_attack_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { diff --git a/fighters/gekkouga/src/shuriken/acmd.rs b/fighters/gekkouga/src/shuriken/acmd.rs index 35b5be6d02..ab78edc146 100644 --- a/fighters/gekkouga/src/shuriken/acmd.rs +++ b/fighters/gekkouga/src/shuriken/acmd.rs @@ -1,14 +1,15 @@ use super::*; + unsafe extern "C" fn game_shot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); -if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 55, 45, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -1.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 75, 85, 0, 35, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -5.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); -} - + attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); + } } + pub fn install(agent: &mut Agent) { agent.acmd("game_shot", game_shot); } \ No newline at end of file From fcf3520b8ee522d77c9d41ac867f65661dfc3be8 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 11:06:19 -0500 Subject: [PATCH 147/172] standardize acmd/mod.rs --- fighters/bayonetta/src/acmd/mod.rs | 12 ++++++------ fighters/brave/src/acmd/mod.rs | 12 ++++++------ fighters/buddy/src/acmd/mod.rs | 12 ++++++------ fighters/captain/src/acmd/mod.rs | 12 ++++++------ fighters/chrom/src/acmd/mod.rs | 12 ++++++------ fighters/cloud/src/acmd/mod.rs | 12 ++++++------ fighters/daisy/src/acmd/mod.rs | 13 +++++++------ fighters/dedede/src/acmd/mod.rs | 13 +++++++------ fighters/demon/src/acmd/mod.rs | 12 ++++++------ fighters/diddy/src/acmd/mod.rs | 12 ++++++------ fighters/dolly/src/acmd/mod.rs | 12 ++++++------ fighters/donkey/src/acmd/mod.rs | 14 +++++++------- fighters/duckhunt/src/acmd/mod.rs | 12 ++++++------ fighters/edge/src/acmd/mod.rs | 12 ++++++------ fighters/eflame/src/acmd/mod.rs | 13 +++++++------ fighters/elight/src/acmd/mod.rs | 12 ++++++------ fighters/falco/src/acmd/mod.rs | 14 +++++++------- fighters/fox/src/acmd/mod.rs | 15 ++++++++------- fighters/gamewatch/src/acmd/mod.rs | 14 +++++++------- fighters/ganon/src/acmd/mod.rs | 14 +++++++------- fighters/gaogaen/src/acmd/mod.rs | 15 ++++++++------- fighters/gekkouga/src/acmd/mod.rs | 15 ++++++++------- fighters/iceclimber/src/acmd/mod.rs | 13 +++++++------ fighters/ike/src/acmd/mod.rs | 15 ++++++++------- fighters/inkling/src/acmd/mod.rs | 15 ++++++++------- fighters/jack/src/acmd/mod.rs | 15 ++++++++------- fighters/kamui/src/acmd/mod.rs | 15 ++++++++------- fighters/ken/src/acmd/mod.rs | 15 ++++++++------- fighters/kirby/src/acmd/mod.rs | 15 ++++++++------- fighters/koopa/src/acmd/mod.rs | 13 +++++++------ fighters/koopajr/src/acmd/mod.rs | 13 +++++++------ fighters/krool/src/acmd/mod.rs | 13 +++++++------ fighters/link/src/acmd/mod.rs | 13 +++++++------ fighters/littlemac/src/acmd/mod.rs | 13 +++++++------ fighters/lucario/src/acmd/mod.rs | 13 +++++++------ fighters/lucas/src/acmd/mod.rs | 13 +++++++------ fighters/lucina/src/acmd/mod.rs | 13 +++++++------ fighters/luigi/src/acmd/mod.rs | 13 +++++++------ fighters/mario/src/acmd/mod.rs | 15 ++++++++------- fighters/mariod/src/acmd/mod.rs | 15 ++++++++------- fighters/marth/src/acmd/mod.rs | 15 ++++++++------- fighters/master/src/acmd/mod.rs | 13 +++++++------ fighters/metaknight/src/acmd/mod.rs | 13 +++++++------ fighters/mewtwo/src/acmd/mod.rs | 13 +++++++------ fighters/miifighter/src/acmd/mod.rs | 13 +++++++------ fighters/miigunner/src/acmd/mod.rs | 13 +++++++------ fighters/miiswordsman/src/acmd/mod.rs | 13 +++++++------ fighters/murabito/src/acmd/mod.rs | 13 +++++++------ fighters/ness/src/acmd/mod.rs | 13 +++++++------ fighters/packun/src/acmd/mod.rs | 13 +++++++------ fighters/pacman/src/acmd/mod.rs | 13 +++++++------ fighters/palutena/src/acmd/mod.rs | 13 +++++++------ fighters/peach/src/acmd/mod.rs | 12 ++++++------ fighters/pfushigisou/src/acmd/mod.rs | 13 +++++++------ fighters/pichu/src/acmd/mod.rs | 13 +++++++------ fighters/pickel/src/acmd/mod.rs | 13 +++++++------ fighters/pikachu/src/acmd/mod.rs | 13 +++++++------ fighters/pikmin/src/acmd/mod.rs | 12 ++++++------ fighters/pit/src/acmd/mod.rs | 13 +++++++------ fighters/pitb/src/acmd/mod.rs | 13 +++++++------ fighters/plizardon/src/acmd/mod.rs | 13 +++++++------ fighters/purin/src/acmd/mod.rs | 13 +++++++------ fighters/pzenigame/src/acmd/mod.rs | 13 +++++++------ fighters/reflet/src/acmd/mod.rs | 13 +++++++------ fighters/ridley/src/acmd/mod.rs | 15 ++++++++------- fighters/robot/src/acmd/mod.rs | 15 ++++++++------- fighters/rockman/src/acmd/mod.rs | 15 ++++++++------- fighters/rosetta/src/acmd/mod.rs | 15 ++++++++------- fighters/roy/src/acmd/mod.rs | 15 ++++++++------- fighters/ryu/src/acmd/mod.rs | 19 ++++++++++--------- fighters/samus/src/acmd/mod.rs | 15 ++++++++------- fighters/samusd/src/acmd/mod.rs | 15 ++++++++------- fighters/sheik/src/acmd/mod.rs | 15 ++++++++------- fighters/shizue/src/acmd/mod.rs | 15 ++++++++------- fighters/shulk/src/acmd/mod.rs | 15 ++++++++------- fighters/simon/src/acmd/mod.rs | 13 +++++++------ fighters/snake/src/acmd/mod.rs | 13 +++++++------ fighters/sonic/src/acmd/mod.rs | 15 ++++++++------- fighters/szerosuit/src/acmd/mod.rs | 15 ++++++++------- fighters/tantan/src/acmd/mod.rs | 15 ++++++++------- fighters/toonlink/src/acmd/mod.rs | 15 ++++++++------- fighters/trail/src/acmd/mod.rs | 17 +++++++++-------- fighters/wario/src/acmd/mod.rs | 15 ++++++++------- fighters/wiifit/src/acmd/mod.rs | 15 ++++++++------- fighters/wolf/src/acmd/mod.rs | 15 ++++++++------- fighters/yoshi/src/acmd/mod.rs | 15 ++++++++------- fighters/younglink/src/acmd/mod.rs | 15 ++++++++------- fighters/zelda/src/acmd/mod.rs | 15 ++++++++------- 88 files changed, 639 insertions(+), 569 deletions(-) diff --git a/fighters/bayonetta/src/acmd/mod.rs b/fighters/bayonetta/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/bayonetta/src/acmd/mod.rs +++ b/fighters/bayonetta/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/brave/src/acmd/mod.rs b/fighters/brave/src/acmd/mod.rs index 2bf41a9158..d8a22387b4 100644 --- a/fighters/brave/src/acmd/mod.rs +++ b/fighters/brave/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; mod smashes; -mod other; -mod ground; +mod aerials; mod specials; mod throws; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); smashes::install(agent); - other::install(agent); - ground::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/buddy/src/acmd/mod.rs b/fighters/buddy/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/buddy/src/acmd/mod.rs +++ b/fighters/buddy/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/captain/src/acmd/mod.rs b/fighters/captain/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/captain/src/acmd/mod.rs +++ b/fighters/captain/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/chrom/src/acmd/mod.rs b/fighters/chrom/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/chrom/src/acmd/mod.rs +++ b/fighters/chrom/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/cloud/src/acmd/mod.rs b/fighters/cloud/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/cloud/src/acmd/mod.rs +++ b/fighters/cloud/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/daisy/src/acmd/mod.rs b/fighters/daisy/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/daisy/src/acmd/mod.rs +++ b/fighters/daisy/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/dedede/src/acmd/mod.rs b/fighters/dedede/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/dedede/src/acmd/mod.rs +++ b/fighters/dedede/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/demon/src/acmd/mod.rs b/fighters/demon/src/acmd/mod.rs index bc42bd3b54..8f58255a0a 100644 --- a/fighters/demon/src/acmd/mod.rs +++ b/fighters/demon/src/acmd/mod.rs @@ -1,21 +1,21 @@ use super::*; -mod aerials; mod jabs; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); jabs::install(agent); ground::install(agent); - other::install(agent); + tilts::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - tilts::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/diddy/src/acmd/mod.rs b/fighters/diddy/src/acmd/mod.rs index 8fac8b3047..d8a22387b4 100644 --- a/fighters/diddy/src/acmd/mod.rs +++ b/fighters/diddy/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/dolly/src/acmd/mod.rs b/fighters/dolly/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/dolly/src/acmd/mod.rs +++ b/fighters/dolly/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/donkey/src/acmd/mod.rs b/fighters/donkey/src/acmd/mod.rs index 689753c3a5..d8a22387b4 100644 --- a/fighters/donkey/src/acmd/mod.rs +++ b/fighters/donkey/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/duckhunt/src/acmd/mod.rs b/fighters/duckhunt/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/duckhunt/src/acmd/mod.rs +++ b/fighters/duckhunt/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/edge/src/acmd/mod.rs b/fighters/edge/src/acmd/mod.rs index 8fac8b3047..d8a22387b4 100644 --- a/fighters/edge/src/acmd/mod.rs +++ b/fighters/edge/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/eflame/src/acmd/mod.rs b/fighters/eflame/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/eflame/src/acmd/mod.rs +++ b/fighters/eflame/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/elight/src/acmd/mod.rs b/fighters/elight/src/acmd/mod.rs index 4ef668d792..d8a22387b4 100644 --- a/fighters/elight/src/acmd/mod.rs +++ b/fighters/elight/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/falco/src/acmd/mod.rs b/fighters/falco/src/acmd/mod.rs index 689753c3a5..d8a22387b4 100644 --- a/fighters/falco/src/acmd/mod.rs +++ b/fighters/falco/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/fox/src/acmd/mod.rs b/fighters/fox/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/fox/src/acmd/mod.rs +++ b/fighters/fox/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gamewatch/src/acmd/mod.rs b/fighters/gamewatch/src/acmd/mod.rs index 689753c3a5..d8a22387b4 100644 --- a/fighters/gamewatch/src/acmd/mod.rs +++ b/fighters/gamewatch/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ganon/src/acmd/mod.rs b/fighters/ganon/src/acmd/mod.rs index 689753c3a5..d8a22387b4 100644 --- a/fighters/ganon/src/acmd/mod.rs +++ b/fighters/ganon/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gaogaen/src/acmd/mod.rs b/fighters/gaogaen/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/gaogaen/src/acmd/mod.rs +++ b/fighters/gaogaen/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/gekkouga/src/acmd/mod.rs b/fighters/gekkouga/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/gekkouga/src/acmd/mod.rs +++ b/fighters/gekkouga/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/iceclimber/src/acmd/mod.rs b/fighters/iceclimber/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/iceclimber/src/acmd/mod.rs +++ b/fighters/iceclimber/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/ike/src/acmd/mod.rs b/fighters/ike/src/acmd/mod.rs index 534f81f03e..d8a22387b4 100644 --- a/fighters/ike/src/acmd/mod.rs +++ b/fighters/ike/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/inkling/src/acmd/mod.rs b/fighters/inkling/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/inkling/src/acmd/mod.rs +++ b/fighters/inkling/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/jack/src/acmd/mod.rs b/fighters/jack/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/jack/src/acmd/mod.rs +++ b/fighters/jack/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/kamui/src/acmd/mod.rs b/fighters/kamui/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/kamui/src/acmd/mod.rs +++ b/fighters/kamui/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ken/src/acmd/mod.rs b/fighters/ken/src/acmd/mod.rs index 3c8323a05d..3975bab577 100644 --- a/fighters/ken/src/acmd/mod.rs +++ b/fighters/ken/src/acmd/mod.rs @@ -1,20 +1,21 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; mod finals; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); finals::install(agent); -} +} \ No newline at end of file diff --git a/fighters/kirby/src/acmd/mod.rs b/fighters/kirby/src/acmd/mod.rs index f95d5929cc..9f8d2915e0 100644 --- a/fighters/kirby/src/acmd/mod.rs +++ b/fighters/kirby/src/acmd/mod.rs @@ -1,22 +1,23 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; mod copy; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); copy::install(agent); -} +} \ No newline at end of file diff --git a/fighters/koopa/src/acmd/mod.rs b/fighters/koopa/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/koopa/src/acmd/mod.rs +++ b/fighters/koopa/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/koopajr/src/acmd/mod.rs b/fighters/koopajr/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/koopajr/src/acmd/mod.rs +++ b/fighters/koopajr/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/krool/src/acmd/mod.rs b/fighters/krool/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/krool/src/acmd/mod.rs +++ b/fighters/krool/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/link/src/acmd/mod.rs b/fighters/link/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/link/src/acmd/mod.rs +++ b/fighters/link/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/littlemac/src/acmd/mod.rs b/fighters/littlemac/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/littlemac/src/acmd/mod.rs +++ b/fighters/littlemac/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucario/src/acmd/mod.rs b/fighters/lucario/src/acmd/mod.rs index 950ed27383..d8a22387b4 100644 --- a/fighters/lucario/src/acmd/mod.rs +++ b/fighters/lucario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; -mod tilts; mod throws; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); - ground::install(agent); throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucas/src/acmd/mod.rs b/fighters/lucas/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/lucas/src/acmd/mod.rs +++ b/fighters/lucas/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/lucina/src/acmd/mod.rs b/fighters/lucina/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/lucina/src/acmd/mod.rs +++ b/fighters/lucina/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/luigi/src/acmd/mod.rs b/fighters/luigi/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/luigi/src/acmd/mod.rs +++ b/fighters/luigi/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/mario/src/acmd/mod.rs b/fighters/mario/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/mario/src/acmd/mod.rs +++ b/fighters/mario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/mariod/src/acmd/mod.rs b/fighters/mariod/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/mariod/src/acmd/mod.rs +++ b/fighters/mariod/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/marth/src/acmd/mod.rs b/fighters/marth/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/marth/src/acmd/mod.rs +++ b/fighters/marth/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/master/src/acmd/mod.rs b/fighters/master/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/master/src/acmd/mod.rs +++ b/fighters/master/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/mod.rs b/fighters/metaknight/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/metaknight/src/acmd/mod.rs +++ b/fighters/metaknight/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/mewtwo/src/acmd/mod.rs b/fighters/mewtwo/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/mewtwo/src/acmd/mod.rs +++ b/fighters/mewtwo/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/mod.rs b/fighters/miifighter/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/miifighter/src/acmd/mod.rs +++ b/fighters/miifighter/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/mod.rs b/fighters/miigunner/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/miigunner/src/acmd/mod.rs +++ b/fighters/miigunner/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/mod.rs b/fighters/miiswordsman/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/miiswordsman/src/acmd/mod.rs +++ b/fighters/miiswordsman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/murabito/src/acmd/mod.rs b/fighters/murabito/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/murabito/src/acmd/mod.rs +++ b/fighters/murabito/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/ness/src/acmd/mod.rs b/fighters/ness/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/ness/src/acmd/mod.rs +++ b/fighters/ness/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/packun/src/acmd/mod.rs b/fighters/packun/src/acmd/mod.rs index d1292b6c83..55d396290e 100644 --- a/fighters/packun/src/acmd/mod.rs +++ b/fighters/packun/src/acmd/mod.rs @@ -1,11 +1,12 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; #[repr(C)] pub struct StanceInfo { @@ -52,11 +53,11 @@ impl From for StanceInfo { } pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pacman/src/acmd/mod.rs b/fighters/pacman/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/pacman/src/acmd/mod.rs +++ b/fighters/pacman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/mod.rs b/fighters/palutena/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/palutena/src/acmd/mod.rs +++ b/fighters/palutena/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/peach/src/acmd/mod.rs b/fighters/peach/src/acmd/mod.rs index efc1b5718a..d8a22387b4 100644 --- a/fighters/peach/src/acmd/mod.rs +++ b/fighters/peach/src/acmd/mod.rs @@ -1,19 +1,19 @@ use super::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; -mod tilts; mod throws; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); ground::install(agent); - other::install(agent); + tilts::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); - tilts::install(agent); throws::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pfushigisou/src/acmd/mod.rs b/fighters/pfushigisou/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/pfushigisou/src/acmd/mod.rs +++ b/fighters/pfushigisou/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pichu/src/acmd/mod.rs b/fighters/pichu/src/acmd/mod.rs index 867f6e305d..690e658e8f 100644 --- a/fighters/pichu/src/acmd/mod.rs +++ b/fighters/pichu/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pickel/src/acmd/mod.rs b/fighters/pickel/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/pickel/src/acmd/mod.rs +++ b/fighters/pickel/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pikachu/src/acmd/mod.rs b/fighters/pikachu/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/pikachu/src/acmd/mod.rs +++ b/fighters/pikachu/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pikmin/src/acmd/mod.rs b/fighters/pikmin/src/acmd/mod.rs index 5b79a4e6b2..ab44329253 100644 --- a/fighters/pikmin/src/acmd/mod.rs +++ b/fighters/pikmin/src/acmd/mod.rs @@ -1,20 +1,20 @@ use super::*; use smash::lib::lua_const::*; -mod aerials; mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pit/src/acmd/mod.rs b/fighters/pit/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/pit/src/acmd/mod.rs +++ b/fighters/pit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pitb/src/acmd/mod.rs b/fighters/pitb/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/pitb/src/acmd/mod.rs +++ b/fighters/pitb/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/plizardon/src/acmd/mod.rs b/fighters/plizardon/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/plizardon/src/acmd/mod.rs +++ b/fighters/plizardon/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/purin/src/acmd/mod.rs b/fighters/purin/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/purin/src/acmd/mod.rs +++ b/fighters/purin/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/pzenigame/src/acmd/mod.rs b/fighters/pzenigame/src/acmd/mod.rs index 3c5f6b840f..d8a22387b4 100644 --- a/fighters/pzenigame/src/acmd/mod.rs +++ b/fighters/pzenigame/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/reflet/src/acmd/mod.rs b/fighters/reflet/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/reflet/src/acmd/mod.rs +++ b/fighters/reflet/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/ridley/src/acmd/mod.rs b/fighters/ridley/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/ridley/src/acmd/mod.rs +++ b/fighters/ridley/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/robot/src/acmd/mod.rs b/fighters/robot/src/acmd/mod.rs index 534f81f03e..d8a22387b4 100644 --- a/fighters/robot/src/acmd/mod.rs +++ b/fighters/robot/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/rockman/src/acmd/mod.rs b/fighters/rockman/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/rockman/src/acmd/mod.rs +++ b/fighters/rockman/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/rosetta/src/acmd/mod.rs b/fighters/rosetta/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/rosetta/src/acmd/mod.rs +++ b/fighters/rosetta/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/roy/src/acmd/mod.rs b/fighters/roy/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/roy/src/acmd/mod.rs +++ b/fighters/roy/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/ryu/src/acmd/mod.rs b/fighters/ryu/src/acmd/mod.rs index 5cbd77b66f..3975bab577 100644 --- a/fighters/ryu/src/acmd/mod.rs +++ b/fighters/ryu/src/acmd/mod.rs @@ -1,20 +1,21 @@ use super::*; -mod aerials; -mod finals; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; +mod finals; pub fn install(agent: &mut Agent) { - aerials::install(agent); - finals::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); + finals::install(agent); +} \ No newline at end of file diff --git a/fighters/samus/src/acmd/mod.rs b/fighters/samus/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/samus/src/acmd/mod.rs +++ b/fighters/samus/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/samusd/src/acmd/mod.rs b/fighters/samusd/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/samusd/src/acmd/mod.rs +++ b/fighters/samusd/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/sheik/src/acmd/mod.rs b/fighters/sheik/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/sheik/src/acmd/mod.rs +++ b/fighters/sheik/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/shizue/src/acmd/mod.rs b/fighters/shizue/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/shizue/src/acmd/mod.rs +++ b/fighters/shizue/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/shulk/src/acmd/mod.rs b/fighters/shulk/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/shulk/src/acmd/mod.rs +++ b/fighters/shulk/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/simon/src/acmd/mod.rs b/fighters/simon/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/simon/src/acmd/mod.rs +++ b/fighters/simon/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/snake/src/acmd/mod.rs b/fighters/snake/src/acmd/mod.rs index 095a2343a6..d8a22387b4 100644 --- a/fighters/snake/src/acmd/mod.rs +++ b/fighters/snake/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); + other::install(agent); } \ No newline at end of file diff --git a/fighters/sonic/src/acmd/mod.rs b/fighters/sonic/src/acmd/mod.rs index 534f81f03e..d8a22387b4 100644 --- a/fighters/sonic/src/acmd/mod.rs +++ b/fighters/sonic/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/szerosuit/src/acmd/mod.rs b/fighters/szerosuit/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/szerosuit/src/acmd/mod.rs +++ b/fighters/szerosuit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/tantan/src/acmd/mod.rs b/fighters/tantan/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/tantan/src/acmd/mod.rs +++ b/fighters/tantan/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/toonlink/src/acmd/mod.rs b/fighters/toonlink/src/acmd/mod.rs index 534f81f03e..d8a22387b4 100644 --- a/fighters/toonlink/src/acmd/mod.rs +++ b/fighters/toonlink/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/trail/src/acmd/mod.rs b/fighters/trail/src/acmd/mod.rs index 0e204f42d2..d8a22387b4 100644 --- a/fighters/trail/src/acmd/mod.rs +++ b/fighters/trail/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; -mod tilts; + mod ground; -mod other; -mod specials; +mod tilts; mod smashes; +mod aerials; +mod specials; mod throws; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wario/src/acmd/mod.rs b/fighters/wario/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/wario/src/acmd/mod.rs +++ b/fighters/wario/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wiifit/src/acmd/mod.rs b/fighters/wiifit/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/wiifit/src/acmd/mod.rs +++ b/fighters/wiifit/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/wolf/src/acmd/mod.rs b/fighters/wolf/src/acmd/mod.rs index 534f81f03e..d8a22387b4 100644 --- a/fighters/wolf/src/acmd/mod.rs +++ b/fighters/wolf/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + mod ground; -mod other; +mod tilts; mod smashes; +mod aerials; mod specials; mod throws; -mod tilts; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/yoshi/src/acmd/mod.rs b/fighters/yoshi/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/yoshi/src/acmd/mod.rs +++ b/fighters/yoshi/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/younglink/src/acmd/mod.rs b/fighters/younglink/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/younglink/src/acmd/mod.rs +++ b/fighters/younglink/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file diff --git a/fighters/zelda/src/acmd/mod.rs b/fighters/zelda/src/acmd/mod.rs index 08566acdd5..d8a22387b4 100644 --- a/fighters/zelda/src/acmd/mod.rs +++ b/fighters/zelda/src/acmd/mod.rs @@ -1,18 +1,19 @@ use super::*; -mod aerials; + +mod ground; mod tilts; -mod other; mod smashes; +mod aerials; mod specials; mod throws; -mod ground; +mod other; pub fn install(agent: &mut Agent) { - aerials::install(agent); + ground::install(agent); tilts::install(agent); - other::install(agent); smashes::install(agent); + aerials::install(agent); specials::install(agent); throws::install(agent); - ground::install(agent); -} + other::install(agent); +} \ No newline at end of file From 8c1c8ef78a843851e2b536c5f38bc3d7016b2b14 Mon Sep 17 00:00:00 2001 From: Askew Date: Wed, 27 Mar 2024 12:58:26 -0400 Subject: [PATCH 148/172] More cleanup --- fighters/brave/src/crash/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/crash/acmd/mod.rs | 7 ------- fighters/brave/src/deathball/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/deathball/acmd/mod.rs | 7 ------- fighters/brave/src/explosion/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/explosion/acmd/mod.rs | 7 ------- fighters/brave/src/fireball/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/fireball/acmd/mod.rs | 7 ------- fighters/brave/src/spark/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/spark/acmd/mod.rs | 7 ------- fighters/brave/src/tornado/{acmd/specials.rs => acmd.rs} | 0 fighters/brave/src/tornado/acmd/mod.rs | 7 ------- 12 files changed, 42 deletions(-) rename fighters/brave/src/crash/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/crash/acmd/mod.rs rename fighters/brave/src/deathball/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/deathball/acmd/mod.rs rename fighters/brave/src/explosion/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/explosion/acmd/mod.rs rename fighters/brave/src/fireball/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/fireball/acmd/mod.rs rename fighters/brave/src/spark/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/spark/acmd/mod.rs rename fighters/brave/src/tornado/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/brave/src/tornado/acmd/mod.rs diff --git a/fighters/brave/src/crash/acmd/specials.rs b/fighters/brave/src/crash/acmd.rs similarity index 100% rename from fighters/brave/src/crash/acmd/specials.rs rename to fighters/brave/src/crash/acmd.rs diff --git a/fighters/brave/src/crash/acmd/mod.rs b/fighters/brave/src/crash/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/crash/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/brave/src/deathball/acmd/specials.rs b/fighters/brave/src/deathball/acmd.rs similarity index 100% rename from fighters/brave/src/deathball/acmd/specials.rs rename to fighters/brave/src/deathball/acmd.rs diff --git a/fighters/brave/src/deathball/acmd/mod.rs b/fighters/brave/src/deathball/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/deathball/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/brave/src/explosion/acmd/specials.rs b/fighters/brave/src/explosion/acmd.rs similarity index 100% rename from fighters/brave/src/explosion/acmd/specials.rs rename to fighters/brave/src/explosion/acmd.rs diff --git a/fighters/brave/src/explosion/acmd/mod.rs b/fighters/brave/src/explosion/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/explosion/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/brave/src/fireball/acmd/specials.rs b/fighters/brave/src/fireball/acmd.rs similarity index 100% rename from fighters/brave/src/fireball/acmd/specials.rs rename to fighters/brave/src/fireball/acmd.rs diff --git a/fighters/brave/src/fireball/acmd/mod.rs b/fighters/brave/src/fireball/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/fireball/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/brave/src/spark/acmd/specials.rs b/fighters/brave/src/spark/acmd.rs similarity index 100% rename from fighters/brave/src/spark/acmd/specials.rs rename to fighters/brave/src/spark/acmd.rs diff --git a/fighters/brave/src/spark/acmd/mod.rs b/fighters/brave/src/spark/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/spark/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/brave/src/tornado/acmd/specials.rs b/fighters/brave/src/tornado/acmd.rs similarity index 100% rename from fighters/brave/src/tornado/acmd/specials.rs rename to fighters/brave/src/tornado/acmd.rs diff --git a/fighters/brave/src/tornado/acmd/mod.rs b/fighters/brave/src/tornado/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/brave/src/tornado/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file From 82b269ee2787b00f173f3cfa5af4871183231b62 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 13:24:05 -0500 Subject: [PATCH 149/172] g-l cleanup --- fighters/edge/src/status.rs | 2 + fighters/edge/src/status/special_hi.rs | 1 - fighters/edge/src/status/special_n.rs | 1 - fighters/gaogaen/src/acmd/aerials.rs | 10 +- fighters/gaogaen/src/acmd/ground.rs | 2 +- fighters/gaogaen/src/acmd/other.rs | 2 - fighters/gaogaen/src/acmd/smashes.rs | 4 +- fighters/gaogaen/src/acmd/specials.rs | 3 + fighters/gaogaen/src/acmd/throws.rs | 5 +- fighters/gaogaen/src/acmd/tilts.rs | 23 +- fighters/gaogaen/src/status/attack_lw4.rs | 4 +- fighters/gaogaen/src/status/special_n.rs | 1 - fighters/gekkouga/src/acmd/aerials.rs | 12 +- fighters/gekkouga/src/acmd/ground.rs | 3 +- fighters/gekkouga/src/acmd/other.rs | 5 - fighters/gekkouga/src/acmd/smashes.rs | 6 +- fighters/gekkouga/src/acmd/specials.rs | 1 - fighters/gekkouga/src/acmd/throws.rs | 4 +- fighters/gekkouga/src/acmd/tilts.rs | 33 +- fighters/gekkouga/src/opff.rs | 2 +- fighters/ike/src/acmd/aerials.rs | 9 +- fighters/ike/src/acmd/ground.rs | 3 +- fighters/ike/src/acmd/other.rs | 4 - fighters/ike/src/acmd/smashes.rs | 5 +- fighters/ike/src/acmd/specials.rs | 5 +- fighters/ike/src/acmd/throws.rs | 9 +- fighters/ike/src/acmd/tilts.rs | 24 +- fighters/ike/src/opff.rs | 4 +- fighters/ike/src/status.rs | 28 +- fighters/ike/src/status/rebirth.rs | 14 + fighters/jack/src/acmd/aerials.rs | 15 +- fighters/jack/src/acmd/ground.rs | 7 +- fighters/jack/src/acmd/other.rs | 59 +-- fighters/jack/src/acmd/smashes.rs | 6 +- fighters/jack/src/acmd/specials.rs | 3 +- fighters/jack/src/acmd/throws.rs | 2 +- fighters/jack/src/acmd/tilts.rs | 47 +- fighters/jack/src/doyle/mod.rs | 2 + .../src/{status/doyle.rs => doyle/status.rs} | 0 fighters/jack/src/fire/acmd.rs | 2 +- fighters/jack/src/opff.rs | 3 +- fighters/jack/src/status.rs | 18 +- fighters/ken/src/acmd/aerials.rs | 8 +- fighters/ken/src/acmd/finals.rs | 1 + fighters/ken/src/acmd/ground.rs | 4 +- fighters/ken/src/acmd/other.rs | 36 +- fighters/ken/src/acmd/smashes.rs | 4 +- .../ken/src/acmd/specials/special_command.rs | 1 - fighters/ken/src/acmd/specials/special_hi.rs | 1 - fighters/ken/src/acmd/specials/special_lw.rs | 17 +- fighters/ken/src/acmd/specials/special_n.rs | 1 - fighters/ken/src/acmd/specials/special_s.rs | 2 - fighters/ken/src/acmd/throws.rs | 5 +- fighters/ken/src/acmd/tilts.rs | 169 +++---- fighters/ken/src/hadoken/acmd.rs | 1 + fighters/ken/src/status.rs | 350 +------------ fighters/ken/src/status/attack.rs | 196 ++++++++ fighters/ken/src/status/dash.rs | 41 ++ fighters/ken/src/status/finals.rs | 4 +- fighters/ken/src/status/guard.rs | 85 ++++ fighters/ken/src/status/special_cmd4.rs | 2 - fighters/ken/src/status/special_hi.rs | 5 +- fighters/ken/src/status/special_lw.rs | 23 +- fighters/ken/src/status/special_n.rs | 15 +- fighters/ken/src/status/special_s.rs | 8 +- fighters/koopajr/src/acmd/aerials.rs | 11 +- fighters/koopajr/src/acmd/ground.rs | 3 +- fighters/koopajr/src/acmd/other.rs | 94 +--- fighters/koopajr/src/acmd/smashes.rs | 26 +- fighters/koopajr/src/acmd/specials.rs | 32 +- fighters/koopajr/src/acmd/throws.rs | 3 +- fighters/koopajr/src/acmd/tilts.rs | 22 +- fighters/koopajr/src/cannonball/acmd.rs | 1 + fighters/koopajr/src/lib.rs | 2 + fighters/koopajr/src/opff.rs | 25 - fighters/koopajr/src/remainclown/mod.rs | 9 + fighters/koopajr/src/remainclown/opff.rs | 18 + fighters/koopajr/src/status.rs | 29 +- fighters/koopajr/src/status/rebirth.rs | 15 + .../koopajr/src/status/special_hi_damage.rs | 3 - .../koopajr/src/status/special_hi_escape.rs | 5 +- fighters/koopajr/src/status/special_s_jump.rs | 2 - fighters/krool/src/acmd/aerials.rs | 7 +- fighters/krool/src/acmd/ground.rs | 2 +- fighters/krool/src/acmd/other.rs | 9 +- fighters/krool/src/acmd/smashes.rs | 31 +- fighters/krool/src/acmd/specials.rs | 6 +- fighters/krool/src/acmd/throws.rs | 7 +- fighters/krool/src/acmd/tilts.rs | 35 +- fighters/krool/src/backpack/acmd.rs | 1 - fighters/link/src/lib.rs | 2 +- fighters/link/src/status/special_hi.rs | 1 - fighters/link/src/status/special_n.rs | 1 - fighters/littlemac/src/acmd/aerials.rs | 9 +- fighters/littlemac/src/acmd/ground.rs | 5 +- fighters/littlemac/src/acmd/other.rs | 4 +- fighters/littlemac/src/acmd/smashes.rs | 73 ++- fighters/littlemac/src/acmd/specials.rs | 7 +- fighters/littlemac/src/acmd/throws.rs | 5 +- fighters/littlemac/src/acmd/tilts.rs | 5 +- fighters/littlemac/src/opff.rs | 1 + fighters/littlemac/src/status/special_hi.rs | 1 - fighters/littlemac/src/status/special_lw.rs | 1 - .../littlemac/src/status/special_lw_cancel.rs | 1 - fighters/littlemac/src/status/special_n.rs | 1 - fighters/littlemac/src/status/special_s.rs | 1 - fighters/lucario/src/acmd/aerials.rs | 8 +- fighters/lucario/src/acmd/ground.rs | 67 ++- fighters/lucario/src/acmd/other.rs | 20 +- fighters/lucario/src/acmd/smashes.rs | 6 +- fighters/lucario/src/acmd/specials.rs | 183 ++++--- fighters/lucario/src/acmd/throws.rs | 6 +- fighters/lucario/src/acmd/tilts.rs | 3 +- fighters/lucario/src/status.rs | 29 +- fighters/lucario/src/status/attack_air.rs | 2 - fighters/lucario/src/status/attack_hi4.rs | 2 - fighters/lucario/src/status/special_hi.rs | 2 - fighters/lucario/src/status/special_lw.rs | 2 - fighters/lucario/src/status/special_n.rs | 2 - fighters/lucario/src/status/special_s.rs | 2 - fighters/lucas/src/acmd/aerials.rs | 12 +- fighters/lucas/src/acmd/ground.rs | 5 +- fighters/lucas/src/acmd/other.rs | 18 +- fighters/lucas/src/acmd/smashes.rs | 3 +- fighters/lucas/src/acmd/specials.rs | 366 +++++++------- fighters/lucas/src/acmd/throws.rs | 8 +- fighters/lucas/src/acmd/tilts.rs | 33 +- fighters/lucas/src/opff.rs | 7 - fighters/lucas/src/pkthunder/mod.rs | 4 + fighters/lucas/src/pkthunder/opff.rs | 14 + fighters/lucas/src/pkthunder/status.rs | 26 + fighters/lucas/src/status.rs | 458 +----------------- fighters/lucas/src/status/attack_air.rs | 11 + fighters/lucas/src/status/attack_lw4.rs | 35 ++ fighters/lucas/src/status/special_hi.rs | 193 ++++++++ fighters/lucas/src/status/special_n.rs | 190 ++++++++ fighters/luigi/src/acmd/aerials.rs | 10 +- fighters/luigi/src/acmd/ground.rs | 5 +- fighters/luigi/src/acmd/other.rs | 148 +----- fighters/luigi/src/acmd/smashes.rs | 48 +- fighters/luigi/src/acmd/specials.rs | 144 +++--- fighters/luigi/src/acmd/throws.rs | 60 ++- fighters/luigi/src/acmd/tilts.rs | 14 +- fighters/luigi/src/obakyumu/acmd.rs | 2 + fighters/luigi/src/opff.rs | 1 - fighters/luigi/src/status/special_n.rs | 1 - 146 files changed, 1868 insertions(+), 2170 deletions(-) create mode 100644 fighters/ike/src/status/rebirth.rs rename fighters/jack/src/{status/doyle.rs => doyle/status.rs} (100%) create mode 100644 fighters/ken/src/status/attack.rs create mode 100644 fighters/ken/src/status/dash.rs create mode 100644 fighters/ken/src/status/guard.rs create mode 100644 fighters/koopajr/src/remainclown/mod.rs create mode 100644 fighters/koopajr/src/remainclown/opff.rs create mode 100644 fighters/koopajr/src/status/rebirth.rs create mode 100644 fighters/lucas/src/pkthunder/opff.rs create mode 100644 fighters/lucas/src/pkthunder/status.rs create mode 100644 fighters/lucas/src/status/attack_air.rs create mode 100644 fighters/lucas/src/status/attack_lw4.rs create mode 100644 fighters/lucas/src/status/special_hi.rs create mode 100644 fighters/lucas/src/status/special_n.rs diff --git a/fighters/edge/src/status.rs b/fighters/edge/src/status.rs index b5f6c219a6..8876be00dd 100644 --- a/fighters/edge/src/status.rs +++ b/fighters/edge/src/status.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_n; mod special_hi; diff --git a/fighters/edge/src/status/special_hi.rs b/fighters/edge/src/status/special_hi.rs index beabbce680..5b0bc1084e 100644 --- a/fighters/edge/src/status/special_hi.rs +++ b/fighters/edge/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn edge_special_hi_param_int_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { let param = edge_special_hi_param_helper_inner(hash, charged_rush).get_u64(); diff --git a/fighters/edge/src/status/special_n.rs b/fighters/edge/src/status/special_n.rs index 75c2231fc5..bbcd2cb93a 100644 --- a/fighters/edge/src/status/special_n.rs +++ b/fighters/edge/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("special_n_start").into(), Hash40::new("special_air_n_start").into(), false.into()); diff --git a/fighters/gaogaen/src/acmd/aerials.rs b/fighters/gaogaen/src/acmd/aerials.rs index d496910125..a618700148 100644 --- a/fighters/gaogaen/src/acmd/aerials.rs +++ b/fighters/gaogaen/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -28,7 +27,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -62,7 +60,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -86,7 +83,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -122,7 +118,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -174,14 +169,17 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gaogaen/src/acmd/ground.rs b/fighters/gaogaen/src/acmd/ground.rs index 10ccb68f91..2e92169396 100644 --- a/fighters/gaogaen/src/acmd/ground.rs +++ b/fighters/gaogaen/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -123,5 +122,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index 3e9b49948d..df2e2f439e 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -54,7 +54,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -82,7 +81,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/gaogaen/src/acmd/smashes.rs b/fighters/gaogaen/src/acmd/smashes.rs index 834725a6c3..cadaa574d1 100644 --- a/fighters/gaogaen/src/acmd/smashes.rs +++ b/fighters/gaogaen/src/acmd/smashes.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_GAOGAEN_INSTANCE_WORK_ID_FLAG_IS_FOLLOW_THROUGH); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -117,6 +115,8 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gaogaen/src/acmd/specials.rs b/fighters/gaogaen/src/acmd/specials.rs index 3719e95227..f02c0f96a6 100644 --- a/fighters/gaogaen/src/acmd/specials.rs +++ b/fighters/gaogaen/src/acmd/specials.rs @@ -1090,6 +1090,7 @@ unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialn", game_specialn); agent.acmd("game_specialairn", game_specialn); + agent.acmd("game_specialsstart", game_specialsstart); agent.acmd("effect_specialsstart", effect_specialsstart); agent.acmd("game_specialairsstart", game_specialairsstart); @@ -1100,6 +1101,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairslariat", game_specialairslariat); agent.acmd("game_specialsshoulder", game_specialsshoulder); agent.acmd("game_specialairsshoulder",game_specialairsshoulder,); + agent.acmd("game_specialhistart", game_specialhistart); agent.acmd("game_specialairhistart", game_specialairhistart); agent.acmd("effect_specialairhistart",effect_specialairhistart,); @@ -1107,6 +1109,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairhiturn",effect_specialairhiturn,); agent.acmd("game_specialairhifall", game_specialairhifall); agent.acmd("game_specialhibound", game_specialhibound); + agent.acmd("game_speciallwstart", game_speciallwstart); agent.acmd("game_specialairlwstart", game_speciallwstart); } \ No newline at end of file diff --git a/fighters/gaogaen/src/acmd/throws.rs b/fighters/gaogaen/src/acmd/throws.rs index 814bd29234..7f5c1eaaad 100644 --- a/fighters/gaogaen/src/acmd/throws.rs +++ b/fighters/gaogaen/src/acmd/throws.rs @@ -316,7 +316,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, if VarModule::is_flag(boma.object(), vars::common::instance::IS_HEAVY_ATTACK) {1.0} else {26.0/(52.0 - 15.0)}); REVERSE_LR(agent); } - } unsafe extern "C" fn effect_throwb(agent: &mut L2CAgentBase) { @@ -570,13 +569,17 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_catchturn", effect_catchturn); agent.acmd("game_catchdash", game_catchdash); agent.acmd("effect_catchdash", effect_catchdash); + agent.acmd("game_throwf", game_throwf); agent.acmd("effect_throwf", effect_throwf); + agent.acmd("game_throwb", game_throwb); agent.acmd("effect_throwb", effect_throwb); + agent.acmd("game_throwhi", game_throwhi); agent.acmd("effect_throwhi", effect_throwhi); agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("game_throwlw", game_throwlw); agent.acmd("effect_throwlw", effect_throwlw); } diff --git a/fighters/gaogaen/src/acmd/tilts.rs b/fighters/gaogaen/src/acmd/tilts.rs index b0ee5aad41..f3b5667d9b 100644 --- a/fighters/gaogaen/src/acmd/tilts.rs +++ b/fighters/gaogaen/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -14,10 +13,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -26,11 +24,11 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 12.0); @@ -43,10 +41,9 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -55,7 +52,7 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 7.5, 8.0, -4.0, 0, 0, 1.0, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("gaogaen_thrust"), Hash40::new("gaogaen_thrust"), Hash40::new("top"), 0, 10.0, 8.0, -38, 0, 0, 1.0, true, *EF_FLIP_YZ); } } @@ -72,7 +69,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -155,16 +151,17 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_NORMAL); JostleModule::set_status(boma, true); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/gaogaen/src/status/attack_lw4.rs b/fighters/gaogaen/src/status/attack_lw4.rs index f79c674164..c98fab6a9f 100644 --- a/fighters/gaogaen/src/status/attack_lw4.rs +++ b/fighters/gaogaen/src/status/attack_lw4.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_ATTACK_LW4 // +// FIGHTER_STATUS_KIND_ATTACK_LW4 pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); @@ -65,6 +64,7 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo } 0.into() } + pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); agent.status(MapCorrection,*FIGHTER_STATUS_KIND_ATTACK_LW4,attack_lw4_map_correction,); diff --git a/fighters/gaogaen/src/status/special_n.rs b/fighters/gaogaen/src/status/special_n.rs index 802140304d..88182ed0b0 100644 --- a/fighters/gaogaen/src/status/special_n.rs +++ b/fighters/gaogaen/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_N diff --git a/fighters/gekkouga/src/acmd/aerials.rs b/fighters/gekkouga/src/acmd/aerials.rs index 699cf228c1..ff5752201d 100644 --- a/fighters/gekkouga/src/acmd/aerials.rs +++ b/fighters/gekkouga/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -27,7 +26,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -39,7 +37,6 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), -0.0, 8, 0, 0, 0, 0, 1.0, true); LAST_EFFECT_SET_RATE(agent, 0.5); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -69,7 +66,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -92,7 +88,6 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_sword"), false, false); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -151,7 +146,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -187,7 +181,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -230,15 +223,18 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/gekkouga/src/acmd/ground.rs b/fighters/gekkouga/src/acmd/ground.rs index 523815bff8..df22dd5faa 100644 --- a/fighters/gekkouga/src/acmd/ground.rs +++ b/fighters/gekkouga/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -96,12 +95,12 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_water_impact"), false, false); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/gekkouga/src/acmd/other.rs b/fighters/gekkouga/src/acmd/other.rs index bce4503143..67d89a8234 100644 --- a/fighters/gekkouga/src/acmd/other.rs +++ b/fighters/gekkouga/src/acmd/other.rs @@ -53,7 +53,6 @@ unsafe extern "C" fn game_jumpaerialback(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_GEKKOUGA_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LW_BOUND); } - } unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -67,7 +66,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -99,14 +97,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -120,7 +116,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/gekkouga/src/acmd/smashes.rs b/fighters/gekkouga/src/acmd/smashes.rs index 01a50f2987..1135bde3f1 100644 --- a/fighters/gekkouga/src/acmd/smashes.rs +++ b/fighters/gekkouga/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -18,7 +17,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -60,7 +58,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -90,11 +87,12 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/gekkouga/src/acmd/specials.rs b/fighters/gekkouga/src/acmd/specials.rs index 4c4e84ab87..3370df1a53 100644 --- a/fighters/gekkouga/src/acmd/specials.rs +++ b/fighters/gekkouga/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; pub fn install(agent: &mut Agent) {} diff --git a/fighters/gekkouga/src/acmd/throws.rs b/fighters/gekkouga/src/acmd/throws.rs index 15d2301daf..c468101f05 100644 --- a/fighters/gekkouga/src/acmd/throws.rs +++ b/fighters/gekkouga/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -84,7 +83,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.8); frame(lua_state, 43.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { @@ -129,7 +127,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); agent.acmd("expression_throwf", expression_throwf); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/gekkouga/src/acmd/tilts.rs b/fighters/gekkouga/src/acmd/tilts.rs index 05e1b4b7e3..d71ac02600 100644 --- a/fighters/gekkouga/src/acmd/tilts.rs +++ b/fighters/gekkouga/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -17,26 +16,24 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { } frame(lua_state, 38.0); FT_MOTION_RATE(agent, 1.0); - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -52,23 +49,21 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { } frame(lua_state, 38.0); FT_MOTION_RATE(agent, 1.0); - } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 7.8, 7.5, -10, -40, 20, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 0, 9, 5, -40, -40, 55, 1.1, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 1.7); } frame(lua_state, 10.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 8.5, 18.5, 0, 0, 0, 1.0, true); + EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 13.5, 15.5, 0, 0, 0, 1.0, true); FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -88,7 +83,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { } frame(lua_state, 38.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -104,7 +98,6 @@ unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 3.5, 15.5, 0, 0, 0, 1.0, true); FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -120,7 +113,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -156,7 +148,6 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("sys_spin_wind_s"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("gekkouga_attack_arc"), true, true); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -193,7 +184,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -208,19 +198,20 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("gekkouga_water_impact"), Hash40::new("top"), 0.0, 2.0, 15.0, 0, 0, 0, 1.0, true); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/gekkouga/src/opff.rs b/fighters/gekkouga/src/opff.rs index d0c9f92704..50f938d179 100644 --- a/fighters/gekkouga/src/opff.rs +++ b/fighters/gekkouga/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn max_water_shuriken_dc(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32, frame: f32) { if status_kind == *FIGHTER_GEKKOUGA_STATUS_KIND_SPECIAL_N_MAX_SHOT { if frame > 12.0 { @@ -105,6 +104,7 @@ pub unsafe fn gekkouga_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, gekkouga_frame_wrapper); } diff --git a/fighters/ike/src/acmd/aerials.rs b/fighters/ike/src/acmd/aerials.rs index 34def8c468..ef6d4a8ca2 100644 --- a/fighters/ike/src/acmd/aerials.rs +++ b/fighters/ike/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -47,7 +46,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -125,7 +123,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -227,7 +224,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -287,7 +283,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -340,12 +335,16 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("effect_landingairlw", effect_landingairlw); diff --git a/fighters/ike/src/acmd/ground.rs b/fighters/ike/src/acmd/ground.rs index c6023df207..a2512c3446 100644 --- a/fighters/ike/src/acmd/ground.rs +++ b/fighters/ike/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -93,7 +92,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { @@ -124,6 +122,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("expression_attackdash", expression_attackdash); } \ No newline at end of file diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 99713e191b..68a26b4715 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { @@ -177,7 +175,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -191,7 +188,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/ike/src/acmd/smashes.rs b/fighters/ike/src/acmd/smashes.rs index b9ebd1d7cc..20bfd52752 100644 --- a/fighters/ike/src/acmd/smashes.rs +++ b/fighters/ike/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -85,7 +84,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("ike_sword2"), false, false); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -111,7 +109,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -264,8 +261,10 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ike/src/acmd/specials.rs b/fighters/ike/src/acmd/specials.rs index 4cb9c5a668..e3ae813dfb 100644 --- a/fighters/ike/src/acmd/specials.rs +++ b/fighters/ike/src/acmd/specials.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { @@ -45,7 +44,6 @@ unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { @@ -420,7 +418,6 @@ unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); FT_MOTION_RATE(agent, 0.82); - } unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { @@ -555,6 +552,7 @@ unsafe extern "C" fn game_specialhi4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) {; agent.acmd("game_specialnend", game_specialnend); agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("game_specialsstart", game_specialsstart); agent.acmd("game_specialairsstart", game_specialairsstart); agent.acmd("effect_specialshold", effect_specialshold); @@ -570,6 +568,7 @@ pub fn install(agent: &mut Agent) {; agent.acmd("expression_specialairsattack", expression_specialsattack); agent.acmd("effect_specialsend", effect_specialsend); agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("game_specialhi1", game_specialhi1); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("game_specialairhi2", game_specialairhi2); diff --git a/fighters/ike/src/acmd/throws.rs b/fighters/ike/src/acmd/throws.rs index 9e81c03e0b..89f6d65a04 100644 --- a/fighters/ike/src/acmd/throws.rs +++ b/fighters/ike/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -97,7 +95,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -130,7 +127,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -160,7 +156,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { @@ -190,8 +185,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ike/src/acmd/tilts.rs b/fighters/ike/src/acmd/tilts.rs index 50e64d5841..bc317fb9de 100644 --- a/fighters/ike/src/acmd/tilts.rs +++ b/fighters/ike/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -26,13 +25,16 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); + } + frame(lua_state, 42.0); if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -57,14 +59,9 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } frame(lua_state, 17.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 22.0/(42.0-17.0)); - } - frame(lua_state, 42.0); if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -99,7 +96,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { @@ -157,7 +153,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -196,7 +191,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { @@ -220,13 +214,15 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("expression_attacks3", expression_attacks3); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("expression_attacks3hi", expression_attacks3); - agent.acmd("expression_attacks3", expression_attacks3); agent.acmd("expression_attacks3lw", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/ike/src/opff.rs b/fighters/ike/src/opff.rs index c250573ef5..4fcf51d5d7 100644 --- a/fighters/ike/src/opff.rs +++ b/fighters/ike/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn aether_drift(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, stick_x: f32, facing: f32) { if situation_kind != *SITUATION_KIND_AIR { return; @@ -458,6 +457,7 @@ pub unsafe fn ike_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { - agent.on_line(Main, ike_frame_wrapper); + agent.on_line(Main, ike_frame_wrapper); } diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status.rs index 4057dfddd8..1502179946 100644 --- a/fighters/ike/src/status.rs +++ b/fighters/ike/src/status.rs @@ -2,6 +2,8 @@ use super::*; use globals::*; // status script import +mod rebirth; + // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::ike::instance::DISABLE_SPECIAL_S) { @@ -32,26 +34,14 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn ike_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_IKE { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VisibilityModule::set_int64(fighter.module_accessor, hash40("sword") as i64, hash40("sword_normal") as i64); - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(ike_init); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end); + agent.on_start(on_start); + + rebirth::install(agent); } diff --git a/fighters/ike/src/status/rebirth.rs b/fighters/ike/src/status/rebirth.rs new file mode 100644 index 0000000000..53f7821302 --- /dev/null +++ b/fighters/ike/src/status/rebirth.rs @@ -0,0 +1,14 @@ +use super::*; + +unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + VisibilityModule::set_int64(fighter.module_accessor, hash40("sword") as i64, hash40("sword_normal") as i64); + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end); +} diff --git a/fighters/jack/src/acmd/aerials.rs b/fighters/jack/src/acmd/aerials.rs index ed56b292a8..5067fdb433 100644 --- a/fighters/jack/src/acmd/aerials.rs +++ b/fighters/jack/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -45,7 +44,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -76,7 +74,6 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { AFTER_IMAGE_OFF(agent, 0); } - } unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { @@ -103,7 +100,6 @@ unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -185,7 +181,6 @@ unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -243,7 +238,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -272,7 +266,6 @@ unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -319,7 +312,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { @@ -330,7 +322,6 @@ unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -408,7 +399,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { @@ -441,7 +431,6 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); } - } pub fn install(agent: &mut Agent) { @@ -449,13 +438,17 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("expression_attackairn", expression_attackairn); agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("game_landingairf", game_landingairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("game_landingairhi", game_landingairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); agent.acmd("game_landingairlw", game_landingairlw); diff --git a/fighters/jack/src/acmd/ground.rs b/fighters/jack/src/acmd/ground.rs index b8a19cb1f7..976edeba23 100644 --- a/fighters/jack/src/acmd/ground.rs +++ b/fighters/jack/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -19,7 +18,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -43,7 +41,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -65,7 +62,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -113,7 +109,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -166,7 +161,6 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 5, 0, -2.5, 0, 0, 0, 0.35, 0, 0, 1.5, 0, 0, 0, false); } } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { @@ -194,6 +188,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); agent.acmd("expression_attackdash", expression_attackdash); diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 9c48b96e8b..4af7defec1 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -41,50 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_appealhil(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - frame(lua_state, 5.0); - -} - -unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - frame(lua_state, 5.0); - -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -92,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -120,13 +74,12 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -140,7 +93,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -171,21 +123,14 @@ unsafe extern "C" fn sound_attacklw3_ex(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - } + pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); agent.acmd("sound_damageflylw", sound_damagefly); agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - - agent.acmd("game_appealhil", game_appealhil); - agent.acmd("game_appealhir", game_appealhir); - agent.acmd("game_appealsl", game_appealsl); - agent.acmd("game_appealsr", game_appealsr); - agent.acmd("game_appeallwl", game_appeallwl); - agent.acmd("game_appeallwr", game_appeallwr); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); diff --git a/fighters/jack/src/acmd/smashes.rs b/fighters/jack/src/acmd/smashes.rs index fc283ccf50..1427e8a2e5 100644 --- a/fighters/jack/src/acmd/smashes.rs +++ b/fighters/jack/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -63,7 +62,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { } } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -141,7 +139,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { @@ -228,13 +225,14 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/jack/src/acmd/specials.rs b/fighters/jack/src/acmd/specials.rs index 81340ea9a9..1e885e642e 100644 --- a/fighters/jack/src/acmd/specials.rs +++ b/fighters/jack/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialairndown(agent: &mut L2CAgentBase) { @@ -57,7 +56,6 @@ unsafe extern "C" fn game_specialairndown(agent: &mut L2CAgentBase) { } wait(lua_state, 6.0); } - } unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -224,6 +222,7 @@ unsafe extern "C" fn game_specialairhif(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialairndown", game_specialairndown); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); agent.acmd("effect_specialairhi", effect_specialairhi); diff --git a/fighters/jack/src/acmd/throws.rs b/fighters/jack/src/acmd/throws.rs index bdcf30a07e..af6bef8eb9 100644 --- a/fighters/jack/src/acmd/throws.rs +++ b/fighters/jack/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -88,5 +87,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index f6cb1b62ab..544c56da56 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -1,11 +1,12 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } @@ -18,13 +19,13 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); @@ -34,16 +35,15 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 93, 100, 20, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 40, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 3.0, 180, 100, 10, 0, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("knife"), 3.0, 35, 100, 20, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 2, 0, Hash40::new("armr"), 3.0, 35, 100, 25, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 3.0, 35, 100, 25, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } @@ -56,13 +56,13 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 4.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("knife"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 2, 0, Hash40::new("armr"), 5.0, 40, 110, 0, 45, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 5.0, 40, 110, 0, 45, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE) { AttackModule::set_size(boma, 2, 0.0); - ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 40, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 40, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 40, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 0.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("knife"), 10.0, 45, 65, 0, 60, 4.5, 0.0, 3.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 45, 65, 0, 60, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("shoulderr"), 10.0, 45, 65, 0, 60, 4.0, 1.0, 0.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); } } frame(lua_state, 18.0); @@ -72,7 +72,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -110,7 +109,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -139,7 +137,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3 (agent: &mut L2CAgentBase) { @@ -173,7 +170,6 @@ unsafe extern "C" fn effect_attackhi3 (agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("jack_knife_spin"), false, true); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -218,7 +214,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -230,7 +225,6 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); EFFECT(agent, Hash40::new("jack_gun_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { @@ -298,7 +292,6 @@ unsafe extern "C" fn game_attacklw3_ex(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3_ex(agent: &mut L2CAgentBase) { @@ -318,7 +311,6 @@ unsafe extern "C" fn effect_attacklw3_ex(agent: &mut L2CAgentBase) { EFFECT(agent, Hash40::new("jack_gunspecial_muzzle"), Hash40::new("gunl"), 0, 0.8, 1.9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { @@ -343,15 +335,18 @@ unsafe extern "C" fn expression_attacklw3_ex(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); + agent.acmd("game_attacklw3_ex", game_attacklw3_ex); agent.acmd("effect_attacklw3_ex", effect_attacklw3_ex); agent.acmd("expression_attacklw3_ex", expression_attacklw3_ex); diff --git a/fighters/jack/src/doyle/mod.rs b/fighters/jack/src/doyle/mod.rs index 24f72bd3d5..8c9ed0e0d8 100644 --- a/fighters/jack/src/doyle/mod.rs +++ b/fighters/jack/src/doyle/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod status; pub fn install() { let agent = &mut Agent::new("jack_doyle"); acmd::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/jack/src/status/doyle.rs b/fighters/jack/src/doyle/status.rs similarity index 100% rename from fighters/jack/src/status/doyle.rs rename to fighters/jack/src/doyle/status.rs diff --git a/fighters/jack/src/fire/acmd.rs b/fighters/jack/src/fire/acmd.rs index 72fff391d8..246f5248eb 100644 --- a/fighters/jack/src/fire/acmd.rs +++ b/fighters/jack/src/fire/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -51,7 +52,6 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/jack/src/opff.rs b/fighters/jack/src/opff.rs index f6aa0a99e2..3b15bb66ca 100644 --- a/fighters/jack/src/opff.rs +++ b/fighters/jack/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn wings_of_rebellion_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if boma.is_status(*FIGHTER_JACK_STATUS_KIND_SPECIAL_HI2_RUSH) && boma.status_frame() == 1 { @@ -25,7 +24,6 @@ unsafe fn wings_of_rebellion_cancel(boma: &mut BattleObjectModuleAccessor, statu boma.change_status_req(*FIGHTER_STATUS_KIND_ATTACK_AIR, false); } } - } } @@ -185,6 +183,7 @@ pub unsafe fn jack_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, jack_frame_wrapper); } diff --git a/fighters/jack/src/status.rs b/fighters/jack/src/status.rs index 14fdc5a421..6ff33ff4a4 100644 --- a/fighters/jack/src/status.rs +++ b/fighters/jack/src/status.rs @@ -2,7 +2,6 @@ use super::*; use globals::*; // status script import -pub mod doyle; pub mod special_lw; pub mod summon; pub mod dispatch; @@ -63,20 +62,15 @@ unsafe extern "C" fn jack_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2C 1.into() } -extern "C" fn jack_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() != *FIGHTER_KIND_JACK { - return; - } - - set_move_customizer(fighter, jack_move_customizer); - jack_move_customizer(fighter); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(jack_special_lw_uniq as *const () as _)); - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + set_move_customizer(fighter, jack_move_customizer); + jack_move_customizer(fighter); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(jack_special_lw_uniq as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + dispatch::install(agent); - doyle::install(agent); summon::install(agent); } diff --git a/fighters/ken/src/acmd/aerials.rs b/fighters/ken/src/acmd/aerials.rs index b90605ceb6..b238670c2f 100644 --- a/fighters/ken/src/acmd/aerials.rs +++ b/fighters/ken/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -40,7 +39,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -83,7 +81,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -150,7 +147,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { boma.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -258,10 +254,14 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ken/src/acmd/finals.rs b/fighters/ken/src/acmd/finals.rs index 749a408b02..b3c50937a4 100644 --- a/fighters/ken/src/acmd/finals.rs +++ b/fighters/ken/src/acmd/finals.rs @@ -493,6 +493,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_final_hit3", game_final_hit3); agent.acmd("game_final_hit4", game_final_hit4); agent.acmd("game_final_hitfinal", game_final_hitfinal); + agent.acmd("game_final2", game_final2); agent.acmd("game_finalair2", game_final2); } diff --git a/fighters/ken/src/acmd/ground.rs b/fighters/ken/src/acmd/ground.rs index 4c1067fe2e..766a1e05d5 100644 --- a/fighters/ken/src/acmd/ground.rs +++ b/fighters/ken/src/acmd/ground.rs @@ -1,11 +1,8 @@ - use super::*; unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - } frame(lua_state, 2.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, true); @@ -197,5 +194,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_attack11s", expression_attack11s); agent.acmd("expression_attack11nears", expression_attack11s); agent.acmd("expression_attack12", expression_attack11s); + agent.acmd("game_attackdash", game_attackdash); } \ No newline at end of file diff --git a/fighters/ken/src/acmd/other.rs b/fighters/ken/src/acmd/other.rs index ae2d95f54e..040495f3b0 100644 --- a/fighters/ken/src/acmd/other.rs +++ b/fighters/ken/src/acmd/other.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -25,7 +25,7 @@ unsafe extern "C" fn damageflyhi_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn damageflyroll_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -50,7 +50,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ken_turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -61,14 +61,12 @@ unsafe extern "C" fn ken_turn_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -79,10 +77,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { boma.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -105,14 +102,17 @@ unsafe extern "C" fn sound_guarddamage(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", damageflyhi_sound); - agent.acmd("sound_damageflylw", damageflyhi_sound); - agent.acmd("sound_damageflyn", damageflyhi_sound); - agent.acmd("sound_damageflyroll", damageflyroll_sound); - agent.acmd("sound_damageflytop", damageflyhi_sound); - agent.acmd("sound_dash", dash_sound); - agent.acmd("game_turndash", ken_turn_dash_game); - agent.acmd("game_escapeair", escape_air_game); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_guarddamage", sound_guarddamage); } diff --git a/fighters/ken/src/acmd/smashes.rs b/fighters/ken/src/acmd/smashes.rs index 387e7ed5fa..b54be01ada 100644 --- a/fighters/ken/src/acmd/smashes.rs +++ b/fighters/ken/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -66,7 +65,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } frame(lua_state, 24.0); FT_MOTION_RATE_RANGE(agent, 24.0, 53.0, 19.0); - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -170,9 +168,11 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/ken/src/acmd/specials/special_command.rs b/fighters/ken/src/acmd/specials/special_command.rs index c8b1d9caa7..5dbf6aea3c 100644 --- a/fighters/ken/src/acmd/specials/special_command.rs +++ b/fighters/ken/src/acmd/specials/special_command.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackcommand1(agent: &mut L2CAgentBase) { diff --git a/fighters/ken/src/acmd/specials/special_hi.rs b/fighters/ken/src/acmd/specials/special_hi.rs index e3eea55e50..716f8644b5 100644 --- a/fighters/ken/src/acmd/specials/special_hi.rs +++ b/fighters/ken/src/acmd/specials/special_hi.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index 37469a8c1b..37c6d056f2 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { @@ -10,8 +9,6 @@ unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { } - unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); if is_excute(agent) { @@ -128,23 +125,17 @@ unsafe extern "C" fn effect_specialairlwstepf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { - // stub -} - -unsafe extern "C" fn effect_specialairlwstart(agent: &mut L2CAgentBase) { - // stub -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_speciallwinstall", game_speciallwinstall); - agent.acmd("effect_speciallwinstall", effect_speciallwinstall); + agent.acmd("effect_speciallwinstall", null); agent.acmd("sound_speciallwinstall", sound_speciallwinstall); agent.acmd("expression_speciallwinstall", expression_speciallwinstall); agent.acmd("game_speciallwstepf", game_speciallwstepf); agent.acmd("effect_speciallwstepf", effect_speciallwstepf); agent.acmd("game_specialairlwstepf", game_specialairlwstepf); agent.acmd("effect_specialairlwstepf", effect_specialairlwstepf); - agent.acmd("effect_speciallwstart", effect_speciallwstart); - agent.acmd("effect_specialairlwstart", effect_specialairlwstart); + agent.acmd("effect_speciallwstart", null); + agent.acmd("effect_specialairlwstart", null); } diff --git a/fighters/ken/src/acmd/specials/special_n.rs b/fighters/ken/src/acmd/specials/special_n.rs index c54b1b0b9b..4a1de6cc4e 100644 --- a/fighters/ken/src/acmd/specials/special_n.rs +++ b/fighters/ken/src/acmd/specials/special_n.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { diff --git a/fighters/ken/src/acmd/specials/special_s.rs b/fighters/ken/src/acmd/specials/special_s.rs index 0a33a66f78..09143c6e32 100644 --- a/fighters/ken/src/acmd/specials/special_s.rs +++ b/fighters/ken/src/acmd/specials/special_s.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { @@ -147,7 +146,6 @@ unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { if is_excute(agent) { boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { diff --git a/fighters/ken/src/acmd/throws.rs b/fighters/ken/src/acmd/throws.rs index 194b5a8311..fd315ad587 100644 --- a/fighters/ken/src/acmd/throws.rs +++ b/fighters/ken/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -217,9 +216,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); agent.acmd("effect_throwhi", effect_throwhi); agent.acmd("sound_throwhi", sound_throwhi); diff --git a/fighters/ken/src/acmd/tilts.rs b/fighters/ken/src/acmd/tilts.rs index 0317cf45be..6635c33f12 100644 --- a/fighters/ken/src/acmd/tilts.rs +++ b/fighters/ken/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { @@ -161,87 +160,6 @@ unsafe extern "C" fn game_attackhi3w(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let mut attr = Hash40::new("collision_attr_normal"); - let mut dmg = 1.0; - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - attr = Hash40::new("collision_attr_fire"); - dmg = 1.10; - } - if is_excute(agent) { - agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); - } - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); - } - frame(lua_state, 2.0); - if is_excute(agent) { - agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(agent.battle_object, true); - // GROUND ONLY - // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground - ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - // AIR ONLY - // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage - ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - MeterModule::watch_damage(agent.battle_object, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); - agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); - } - frame(lua_state, 14.0); - if is_excute(agent) { - agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - } -} - -unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let mut attr = Hash40::new("collision_attr_normal"); - let mut dmg = 1.0; - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - attr = Hash40::new("collision_attr_fire"); - dmg = 1.10; - } - frame(lua_state, 7.0); - if is_excute(agent) { - boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - MeterModule::watch_damage(agent.battle_object, true); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - MeterModule::watch_damage(agent.battle_object, false); - } - wait(lua_state, 10.0); - if is_excute(agent) { - boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); - boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); - } -} - unsafe extern "C" fn game_attackhi3s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -362,6 +280,87 @@ unsafe extern "C" fn expression_attackhi3s(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_attacklw3w(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut attr = Hash40::new("collision_attr_normal"); + let mut dmg = 1.0; + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + attr = Hash40::new("collision_attr_fire"); + dmg = 1.10; + } + if is_excute(agent) { + agent.on_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_ATTACK_DISABLE_MINI_JUMP_ATTACK); + } + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 5.0); + } + frame(lua_state, 2.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + // GROUND ONLY + // the grounded spike angle is used to push opponents away a desired distance without lifting them off the ground + ATTACK(agent, 0, 0, Hash40::new("legl"), 1.6 * dmg, 290, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 1.6 * dmg, 290, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneel"), 1.6 * dmg, 295, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + // AIR ONLY + // the angle 365 is used to allow opponents to fall into the ground without spiking them offstage + ATTACK(agent, 3, 0, Hash40::new("legl"), 1.6 * dmg, 365, 100, 33, 0, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.5, 1.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 5, 0, Hash40::new("kneel"), 1.6 * dmg, 365, 100, 33, 0, 3.0, 5.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MeterModule::watch_damage(agent.battle_object, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL); + agent.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL); + } + frame(lua_state, 14.0); + if is_excute(agent) { + agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + } +} + +unsafe extern "C" fn game_attacklw3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let mut attr = Hash40::new("collision_attr_normal"); + let mut dmg = 1.0; + if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { + attr = Hash40::new("collision_attr_fire"); + dmg = 1.10; + } + frame(lua_state, 7.0); + if is_excute(agent) { + boma.on_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + boma.on_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0 * dmg, 74, 46, 0, 57, 3.8, 0.0, 2.8, 12.0, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0 * dmg, 80, 46, 0, 57, 3.3, 0.0, 2.2, 15.7, Some(0.0), Some(3.8), Some(7.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KEN_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MeterModule::watch_damage(agent.battle_object, false); + } + wait(lua_state, 10.0); + if is_excute(agent) { + boma.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); + boma.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + } +} + pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3w", game_attacks3w); agent.acmd("game_attacknearw", game_attacks3w); @@ -373,11 +372,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_attacknearw", expression_attacks3w); agent.acmd("game_attacks3s", game_attacks3s); agent.acmd("effect_attacks3s", effect_attacks3s); + agent.acmd("game_attackhi3w", game_attackhi3w); - agent.acmd("game_attacklw3w", game_attacklw3w); - agent.acmd("game_attacklw3s", game_attacklw3s); agent.acmd("game_attackhi3s", game_attackhi3s); agent.acmd("effect_attackhi3s", effect_attackhi3s); agent.acmd("sound_attackhi3s", sound_attackhi3s); agent.acmd("expression_attackhi3s", expression_attackhi3s); + + agent.acmd("game_attacklw3w", game_attacklw3w); + agent.acmd("game_attacklw3s", game_attacklw3s); } diff --git a/fighters/ken/src/hadoken/acmd.rs b/fighters/ken/src/hadoken/acmd.rs index b196c224b2..6aa1c3d307 100644 --- a/fighters/ken/src/hadoken/acmd.rs +++ b/fighters/ken/src/hadoken/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/ken/src/status.rs b/fighters/ken/src/status.rs index a63082a4e6..5033b6f4a7 100644 --- a/fighters/ken/src/status.rs +++ b/fighters/ken/src/status.rs @@ -8,6 +8,9 @@ mod special_hi; mod special_lw; mod special_n; mod special_s; +mod attack; +mod dash; +mod guard; utils::import_noreturn!(common::shoto_status::{ fgc_end_dashback, ryu_idkwhatthisis2 @@ -24,19 +27,6 @@ extern "Rust" { fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; } -extern "C" fn ken_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_KEN { - return; - } - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ken_check_special_command as *const () as _)); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); - } -} - // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S) { @@ -56,7 +46,6 @@ unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterComm } unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // resets IS_USE_EX_SPECIAL if !fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_HI, @@ -322,336 +311,39 @@ pub unsafe extern "C" fn ken_check_special_command(fighter: &mut L2CFighterCommo false.into() } -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() -} -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_RYU_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // - -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, - ) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_near_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK11, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk(fighter); - } - fighter.global_table[SUB_STATUS3] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk4(fighter, false.into()); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_main_loop as *const () as _)) -} - -unsafe extern "C" fn ken_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - } - if ComboModule::count(fighter.module_accessor) == 1 { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); - let attack_start_cancel_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_start_cancel_frame"), - ); - if current_frame < attack_start_cancel_frame { - if ryu_kara_cancel(fighter).get_bool() { - return 1.into(); - } - } - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter - .sub_wait_ground_check_common(false.into()) - .get_bool() - { - return 1.into(); - } - } - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("attack_11_w"), - hash40("attack_11_s"), - hash40("attack_11_near_s"), - ] - .contains(&mot) - { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, - ) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, - ) { - if ControlModule::check_button_off( - fighter.module_accessor, - *CONTROL_PAD_BUTTON_ATTACK, - ) { - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let attack_hi3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_hi3_stick_y"), - ); - let cont; - if !(stick_y < attack_hi3_stick_y) { - cont = false; - } else { - let attack_lw3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_lw3_stick_y"), - ); - if !(attack_lw3_stick_y < stick_y) { - cont = false; - } else { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let attack_s3_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_s3_stick_x"), - ); - cont = stick_x < attack_s3_stick_x; - } - } - if cont { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, - ) { - let button_on_frame = WorkModule::get_int( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, - ); - let attack_11_s_button_on_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_11_s_button_on_frame"), - ); - if attack_11_s_button_on_frame <= button_on_frame as f32 { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - // if 0 < WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { - // if !StopModule::is_stop(fighter.module_accessor) { - // if fighter.sub_check_button_jump().get_bool() { - - // } - // } - // } - if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { - if !MotionModule::is_end(fighter.module_accessor) { - common::shoto_status::ryu_idkwhatthisis2(fighter); - } else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } else { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_WAIT // +// FIGHTER_STATUS_KIND_WAIT pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Wait() } -// FIGHTER_STATUS_KIND_LANDING // +// FIGHTER_STATUS_KIND_LANDING pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_landing_main(fighter) } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ken_check_special_command as *const () as _)); + VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); +} + pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); + finals::install(agent); special_cmd4::install(agent); special_hi::install(agent); special_lw::install(agent); special_n::install(agent); special_s::install(agent); - - agent.on_start(ken_init); - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); - agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); - agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); + attack::install(agent); + dash::install(agent); + guard::install(agent); } diff --git a/fighters/ken/src/status/attack.rs b/fighters/ken/src/status/attack.rs new file mode 100644 index 0000000000..b9084e09e9 --- /dev/null +++ b/fighters/ken/src/status/attack.rs @@ -0,0 +1,196 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, + ) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_near_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK11, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk(fighter); + } + fighter.global_table[SUB_STATUS3] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk4(fighter, false.into()); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn ken_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + } + if ComboModule::count(fighter.module_accessor) == 1 { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); + let attack_start_cancel_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_start_cancel_frame"), + ); + if current_frame < attack_start_cancel_frame { + if ryu_kara_cancel(fighter).get_bool() { + return 1.into(); + } + } + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter + .sub_wait_ground_check_common(false.into()) + .get_bool() + { + return 1.into(); + } + } + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("attack_11_w"), + hash40("attack_11_s"), + hash40("attack_11_near_s"), + ] + .contains(&mot) + { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, + ) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, + ) { + if ControlModule::check_button_off( + fighter.module_accessor, + *CONTROL_PAD_BUTTON_ATTACK, + ) { + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let attack_hi3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_hi3_stick_y"), + ); + let cont; + if !(stick_y < attack_hi3_stick_y) { + cont = false; + } else { + let attack_lw3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_lw3_stick_y"), + ); + if !(attack_lw3_stick_y < stick_y) { + cont = false; + } else { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let attack_s3_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_s3_stick_x"), + ); + cont = stick_x < attack_s3_stick_x; + } + } + if cont { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, + ) { + let button_on_frame = WorkModule::get_int( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, + ); + let attack_11_s_button_on_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_11_s_button_on_frame"), + ); + if attack_11_s_button_on_frame <= button_on_frame as f32 { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + // if 0 < WorkModule::get_int(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { + // if !StopModule::is_stop(fighter.module_accessor) { + // if fighter.sub_check_button_jump().get_bool() { + + // } + // } + // } + if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { + if !MotionModule::is_end(fighter.module_accessor) { + common::shoto_status::ryu_idkwhatthisis2(fighter); + } else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } else { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); +} diff --git a/fighters/ken/src/status/dash.rs b/fighters/ken/src/status/dash.rs new file mode 100644 index 0000000000..4f22e05fad --- /dev/null +++ b/fighters/ken/src/status/dash.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +// FIGHTER_RYU_STATUS_KIND_DASH_BACK + +pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); +} diff --git a/fighters/ken/src/status/finals.rs b/fighters/ken/src/status/finals.rs index 9ba673d229..ca6ad65544 100644 --- a/fighters/ken/src/status/finals.rs +++ b/fighters/ken/src/status/finals.rs @@ -1,8 +1,6 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_STATUS_KIND_FINAL // +// FIGHTER_STATUS_KIND_FINAL pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); diff --git a/fighters/ken/src/status/guard.rs b/fighters/ken/src/status/guard.rs new file mode 100644 index 0000000000..1a679e2ab1 --- /dev/null +++ b/fighters/ken/src/status/guard.rs @@ -0,0 +1,85 @@ +use super::*; + +pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_main) +} + +unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); +} diff --git a/fighters/ken/src/status/special_cmd4.rs b/fighters/ken/src/status/special_cmd4.rs index 48c692f571..f9bcadf982 100644 --- a/fighters/ken/src/status/special_cmd4.rs +++ b/fighters/ken/src/status/special_cmd4.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; pub unsafe extern "C" fn ken_attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/ken/src/status/special_hi.rs b/fighters/ken/src/status/special_hi.rs index 36417804b8..2a356b3150 100644 --- a/fighters/ken/src/status/special_hi.rs +++ b/fighters/ken/src/status/special_hi.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; -use smashline::*; - -// FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP diff --git a/fighters/ken/src/status/special_lw.rs b/fighters/ken/src/status/special_lw.rs index 1861050fae..82f282c7ad 100644 --- a/fighters/ken/src/status/special_lw.rs +++ b/fighters/ken/src/status/special_lw.rs @@ -1,23 +1,13 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); - agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init); - agent.status(Pre, statuses::ken::INSTALL, special_lw_install_pre); - agent.status(Main, statuses::ken::INSTALL, special_lw_install_main); - agent.status(End, statuses::ken::INSTALL, special_lw_install_end); -} - -// FIGHTER_STATUS_KIND_SPECIAL_LW // +// FIGHTER_STATUS_KIND_SPECIAL_LW pub unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.change_status(FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F.into(), true.into()); return 1.into(); } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F pub unsafe extern "C" fn special_lw_step_f_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -26,7 +16,6 @@ pub unsafe extern "C" fn special_lw_step_f_init(fighter: &mut L2CFighterCommon) smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F)(fighter) } - unsafe extern "C" fn special_lw_install_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -138,3 +127,11 @@ unsafe extern "C" fn special_lw_install_set_kinetic(fighter: &mut L2CFighterComm KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); } } + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init); + agent.status(Pre, statuses::ken::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ken::INSTALL, special_lw_install_main); + agent.status(End, statuses::ken::INSTALL, special_lw_install_end); +} \ No newline at end of file diff --git a/fighters/ken/src/status/special_n.rs b/fighters/ken/src/status/special_n.rs index 32fe164f92..961a8d7693 100644 --- a/fighters/ken/src/status/special_n.rs +++ b/fighters/ken/src/status/special_n.rs @@ -1,13 +1,6 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n); - agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command); -} - -// FIGHTER_STATUS_KIND_SPECIAL_N // +// FIGHTER_STATUS_KIND_SPECIAL_N pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { @@ -17,7 +10,7 @@ pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CVal smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { @@ -27,3 +20,7 @@ pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) - smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND)(fighter) } +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command); +} \ No newline at end of file diff --git a/fighters/ken/src/status/special_s.rs b/fighters/ken/src/status/special_s.rs index 2ed9744614..25e9b9914d 100644 --- a/fighters/ken/src/status/special_s.rs +++ b/fighters/ken/src/status/special_s.rs @@ -1,8 +1,6 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -11,7 +9,7 @@ pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { @@ -20,7 +18,7 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { diff --git a/fighters/koopajr/src/acmd/aerials.rs b/fighters/koopajr/src/acmd/aerials.rs index abf0cc4261..2b61b91351 100644 --- a/fighters/koopajr/src/acmd/aerials.rs +++ b/fighters/koopajr/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -32,7 +31,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -66,7 +64,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { @@ -75,7 +72,6 @@ unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -137,7 +133,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -188,7 +183,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { @@ -199,16 +193,19 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_LANDING_ATTACK_AIR_SQUAT); JostleModule::set_status(boma, true); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("game_landingairf", game_landingairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/koopajr/src/acmd/ground.rs b/fighters/koopajr/src/acmd/ground.rs index 5d9ca30460..4d88651030 100644 --- a/fighters/koopajr/src/acmd/ground.rs +++ b/fighters/koopajr/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -78,11 +77,11 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/koopajr/src/acmd/other.rs b/fighters/koopajr/src/acmd/other.rs index aa62173e1c..a73f616784 100644 --- a/fighters/koopajr/src/acmd/other.rs +++ b/fighters/koopajr/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -127,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -153,14 +76,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -174,7 +95,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -189,7 +109,6 @@ unsafe extern "C" fn game_specialhijrescape(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - if !WorkModule::is_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE) { frame(lua_state, 29.0); if is_excute(agent) { @@ -213,15 +132,18 @@ unsafe extern "C" fn game_specialhijrescape(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_specialhijrescape", game_specialhijrescape); } diff --git a/fighters/koopajr/src/acmd/smashes.rs b/fighters/koopajr/src/acmd/smashes.rs index 232c5bcccb..767b68ebb9 100644 --- a/fighters/koopajr/src/acmd/smashes.rs +++ b/fighters/koopajr/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -18,8 +17,8 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); if is_excute(agent) { @@ -27,16 +26,15 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 35.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -53,8 +51,8 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 8.0, 16.5, Some(0.0), Some(12.5), Some(16.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 7.0, 9.7, Some(0.0), Some(12.0), Some(9.7), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 93, 0, 0, 20, 5.0, 0.0, 12.0, 15.0, Some(0.0), Some(16.5), Some(14.5), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 361, 0, 0, 20, 3.5, 0.0, 10.0, 8.3, Some(0.0), Some(15.0), Some(7.8), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 15.0); if is_excute(agent) { @@ -62,13 +60,12 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 35.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 129, 0, 40, 7.0, 0.0, 9.0, 17.0, Some(0.0), Some(12.0), Some(17.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 46, 126, 0, 40, 7.0, 0.0, 13.0, 16.0, Some(0.0), Some(16.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -103,7 +100,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -144,7 +140,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -173,13 +168,14 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FT_MOTION_RATE(agent, 0.880); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/koopajr/src/acmd/specials.rs b/fighters/koopajr/src/acmd/specials.rs index a39ece404b..c8e3bd6152 100644 --- a/fighters/koopajr/src/acmd/specials.rs +++ b/fighters/koopajr/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; /* #[acmd_script( agent = "koopajr_remainclown", script = "game_specialhiclownfall" , category = ACMD_GAME , low_priority)] @@ -63,18 +62,6 @@ unsafe extern "C" fn effect_specialnshoot(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - if !VarModule::is_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { - ArticleModule::generate_article(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MECHAKOOPA, false, 0); - VarModule::on_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); - } - } -} - unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -169,16 +156,31 @@ unsafe extern "C" fn game_specialhijrfall(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + if !VarModule::is_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA) { + ArticleModule::generate_article(boma, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_MECHAKOOPA, false, 0); + VarModule::on_flag(agent.object(), vars::koopajr::instance::DISABLE_MECHAKOOPA); + } + } +} + pub fn install(agent: &mut Agent) { agent.acmd("game_specialnshoot", game_specialnshoot); agent.acmd("game_specialairnshoot", game_specialnshoot); agent.acmd("effect_specialnshoot", effect_specialnshoot); - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_specials", game_specials); agent.acmd("game_specialsspin", game_specialsspin); agent.acmd("game_specialairs", game_specialairs); agent.acmd("game_specialairsspin", game_specialairsspin); + agent.acmd("game_specialhijrrise", game_specialhijrrise); agent.acmd("game_specialhijrfall", game_specialhijrfall); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); } diff --git a/fighters/koopajr/src/acmd/throws.rs b/fighters/koopajr/src/acmd/throws.rs index 9c556b3e0b..46b65aa188 100644 --- a/fighters/koopajr/src/acmd/throws.rs +++ b/fighters/koopajr/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -121,6 +120,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/koopajr/src/acmd/tilts.rs b/fighters/koopajr/src/acmd/tilts.rs index 640f91a382..a75e9374df 100644 --- a/fighters/koopajr/src/acmd/tilts.rs +++ b/fighters/koopajr/src/acmd/tilts.rs @@ -1,36 +1,33 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 7.0); + frame(lua_state, 8.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 8.0); + frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 3.0, 0.0, 0.0, 0.0, Some(4.5), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); ATTACK(agent, 1, 0, Hash40::new("clownarml1"), 7.5, 361, 90, 0, 55, 5.0, -3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.5, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ATTACK(agent, 2, 0, Hash40::new("clownarml1"), 9.0, 361, 90, 0, 55, 3.5, 8.5, 0.0, 0.0, Some(12.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } wait(lua_state, 5.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -47,7 +44,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -63,7 +59,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -104,13 +99,14 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/koopajr/src/cannonball/acmd.rs b/fighters/koopajr/src/cannonball/acmd.rs index 117f3d12c7..b0db2a6ff5 100644 --- a/fighters/koopajr/src/cannonball/acmd.rs +++ b/fighters/koopajr/src/cannonball/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_hop(weapon: &mut L2CAgentBase) { let lua_state = weapon.lua_state_agent; let boma = weapon.boma(); diff --git a/fighters/koopajr/src/lib.rs b/fighters/koopajr/src/lib.rs index c345a920c7..7b7974cbe1 100644 --- a/fighters/koopajr/src/lib.rs +++ b/fighters/koopajr/src/lib.rs @@ -10,6 +10,7 @@ pub mod status; // articles mod cannonball; +mod remainclown; use smash::{ lib::{ @@ -51,4 +52,5 @@ pub fn install() { agent.install(); cannonball::install(); + remainclown::install(); } \ No newline at end of file diff --git a/fighters/koopajr/src/opff.rs b/fighters/koopajr/src/opff.rs index 8854895f10..fb44cd92f8 100644 --- a/fighters/koopajr/src/opff.rs +++ b/fighters/koopajr/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn clown_cannon_shield_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { if status_kind == *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_N_HOLD { if frame > 16.0 { @@ -139,30 +138,6 @@ pub unsafe fn koopajr_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn koopajr_weapon_remainclown_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - if StatusModule::status_kind(boma) == *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_FALL - && AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { - StatusModule::change_status_request_from_script(boma, *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_BURST, true); - } - } -} - -pub extern "C" fn koopajr_weapon_frame_wrapper(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - koopajr_weapon_frame(weapon) - } -} - -pub unsafe fn koopajr_weapon_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - //if let Some(info) = WeaponFrameInfo::weapon_update_and_get(weapon) { - // - //} -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, koopajr_frame_wrapper); - agent.on_line(Main, koopajr_weapon_remainclown_frame); - agent.on_line(Main, koopajr_weapon_frame_wrapper); } diff --git a/fighters/koopajr/src/remainclown/mod.rs b/fighters/koopajr/src/remainclown/mod.rs new file mode 100644 index 0000000000..117f0d9088 --- /dev/null +++ b/fighters/koopajr/src/remainclown/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod opff; + +pub fn install() { + let agent = &mut Agent::new("koopajr_remainclown"); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/koopajr/src/remainclown/opff.rs b/fighters/koopajr/src/remainclown/opff.rs new file mode 100644 index 0000000000..2a161e8f20 --- /dev/null +++ b/fighters/koopajr/src/remainclown/opff.rs @@ -0,0 +1,18 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn koopajr_weapon_remainclown_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + if StatusModule::status_kind(boma) == *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_FALL + && AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + StatusModule::change_status_request_from_script(boma, *WEAPON_KOOPAJR_REMAINCLOWN_STATUS_KIND_BURST, true); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, koopajr_weapon_remainclown_frame); +} diff --git a/fighters/koopajr/src/status.rs b/fighters/koopajr/src/status.rs index 09368e7f41..b3984ef4a5 100644 --- a/fighters/koopajr/src/status.rs +++ b/fighters/koopajr/src/status.rs @@ -3,11 +3,10 @@ use globals::*; // status script import mod special_s_jump; - mod special_hi_escape; mod special_hi_damage; +mod rebirth; - // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::koopajr::instance::DISABLE_SPECIAL_S) { @@ -26,29 +25,17 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn koopajr_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_KOOPAJR { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn koopajr_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_s_jump::install(agent); special_hi_escape::install(agent); special_hi_damage::install(agent); - agent.on_start(koopajr_init); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end); - agent.install(); + rebirth::install(agent); } \ No newline at end of file diff --git a/fighters/koopajr/src/status/rebirth.rs b/fighters/koopajr/src/status/rebirth.rs new file mode 100644 index 0000000000..5c3ecc9e75 --- /dev/null +++ b/fighters/koopajr/src/status/rebirth.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn koopajr_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_KOOPAJR_GENERATE_ARTICLE_KART, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, koopajr_rebirth_end); +} \ No newline at end of file diff --git a/fighters/koopajr/src/status/special_hi_damage.rs b/fighters/koopajr/src/status/special_hi_damage.rs index f5972e1df4..98931276fb 100644 --- a/fighters/koopajr/src/status/special_hi_damage.rs +++ b/fighters/koopajr/src/status/special_hi_damage.rs @@ -1,7 +1,4 @@ use super::*; -use globals::*; -// status script import - // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_DAMAGE_END diff --git a/fighters/koopajr/src/status/special_hi_escape.rs b/fighters/koopajr/src/status/special_hi_escape.rs index 2fee653579..9e38ed072e 100644 --- a/fighters/koopajr/src/status/special_hi_escape.rs +++ b/fighters/koopajr/src/status/special_hi_escape.rs @@ -1,9 +1,6 @@ use super::*; -use globals::*; -// status script import - -// FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE // +// FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE pub unsafe extern "C" fn pre_special_hi_escape(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_ESCAPE_AIR); diff --git a/fighters/koopajr/src/status/special_s_jump.rs b/fighters/koopajr/src/status/special_s_jump.rs index d13c7a2f77..6e659b85af 100644 --- a/fighters/koopajr/src/status/special_s_jump.rs +++ b/fighters/koopajr/src/status/special_s_jump.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_S_JUMP diff --git a/fighters/krool/src/acmd/aerials.rs b/fighters/krool/src/acmd/aerials.rs index 518c72fd45..b648ba78dd 100644 --- a/fighters/krool/src/acmd/aerials.rs +++ b/fighters/krool/src/acmd/aerials.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -62,7 +61,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -102,7 +100,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -223,11 +220,15 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/krool/src/acmd/ground.rs b/fighters/krool/src/acmd/ground.rs index 01f97c61f6..95bdcfce95 100644 --- a/fighters/krool/src/acmd/ground.rs +++ b/fighters/krool/src/acmd/ground.rs @@ -151,7 +151,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { @@ -160,5 +159,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attack12", effect_attack12); agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/krool/src/acmd/other.rs b/fighters/krool/src/acmd/other.rs index 62641dec24..6bdde01fda 100644 --- a/fighters/krool/src/acmd/other.rs +++ b/fighters/krool/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -61,7 +60,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -85,14 +83,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -106,7 +102,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -151,12 +146,16 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealsl", game_appeals); agent.acmd("game_appealsr", game_appeals); agent.acmd("game_appeallwr", game_appeallw); diff --git a/fighters/krool/src/acmd/smashes.rs b/fighters/krool/src/acmd/smashes.rs index 08244c3058..0d39bddac1 100644 --- a/fighters/krool/src/acmd/smashes.rs +++ b/fighters/krool/src/acmd/smashes.rs @@ -1,8 +1,12 @@ use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 12.0); if is_excute(agent) { if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { @@ -16,24 +20,19 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { frame(lua_state, 19.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_sttacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 12.0); if is_excute(agent) { if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { @@ -47,15 +46,14 @@ unsafe extern "C" fn game_sttacks4s(agent: &mut L2CAgentBase) { frame(lua_state, 19.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_OFF); - ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 96, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 100, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 100, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("arml"), 19.0, 361, 92, 0, 40, 6.0, 6.5, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 16.5, 361, 96, 0, 40, 4.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderl"), 16.5, 361, 96, 0, 40, 5.5, -2.0, 0.0, 0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 4.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -86,7 +84,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -232,10 +229,12 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); agent.acmd("game_attacks4hi", game_attacks4hi); - agent.acmd("game_attacks4", game_sttacks4s); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/krool/src/acmd/specials.rs b/fighters/krool/src/acmd/specials.rs index ad4e0ce7ed..997365f6ca 100644 --- a/fighters/krool/src/acmd/specials.rs +++ b/fighters/krool/src/acmd/specials.rs @@ -43,7 +43,6 @@ unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_SHOOT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_KROOL_STATUS_SPECIAL_N_FLAG_NO_SHOOT_CANCEL); } - } unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { @@ -137,7 +136,6 @@ unsafe extern "C" fn game_specialnloop(agent: &mut L2CAgentBase) { SEARCH(agent, 0, 0, Hash40::new("top"), 7.0, 0.0, 8.0, 11.0, Some(0.0), Some(8.0), Some(60.0), *COLLISION_KIND_MASK_AH, *HIT_STATUS_MASK_ALL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true); } } - } unsafe extern "C" fn effect_specialnloop(agent: &mut L2CAgentBase) { @@ -235,7 +233,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - } unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { @@ -401,8 +398,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnloop", game_specialnloop); agent.acmd("effect_specialnloop", effect_specialnloop); agent.acmd("effect_specialairnloop", effect_specialnloop); + agent.acmd("game_specialsthrow", game_specials); agent.acmd("game_specialairsthrow", game_specials); + agent.acmd("effect_specialhistart", effect_specialhistart); agent.acmd("sound_specialhistart", sound_specialhistart); agent.acmd("sound_specialairhistart", sound_specialhistart); @@ -410,6 +409,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialhi", effect_specialhi); agent.acmd("sound_specialhi", sound_specialhi); agent.acmd("expression_specialhi", expression_specialhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); diff --git a/fighters/krool/src/acmd/throws.rs b/fighters/krool/src/acmd/throws.rs index a76275d229..1868957b9e 100644 --- a/fighters/krool/src/acmd/throws.rs +++ b/fighters/krool/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -255,12 +254,18 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_specialnspitf", game_specialnspitf); agent.acmd("game_specialairnspitf", game_specialnspitf); + agent.acmd("game_specialnspitb", game_specialnspitb); agent.acmd("game_specialairnspitb", game_specialnspitb); } diff --git a/fighters/krool/src/acmd/tilts.rs b/fighters/krool/src/acmd/tilts.rs index 56707e6054..9e14258bad 100644 --- a/fighters/krool/src/acmd/tilts.rs +++ b/fighters/krool/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -18,7 +17,7 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); @@ -27,10 +26,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -39,16 +37,16 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); if is_excute(agent) { - EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } -unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -65,7 +63,7 @@ unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { let hitlag = 1.0 + 0.025 * (charge as f32); let sound = if charge >= 10 { *COLLISION_SOUND_ATTR_HEAVY } else { *COLLISION_SOUND_ATTR_PUNCH }; let shieldstun = 1.0 + 0.02 * (charge as f32); - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 11.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 5.0, 0.0, 14.0, 15.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 11.0 + damage, 361, 75, 0, 63, 6.5, 0.0, 11.0, 8.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 2, 0, Hash40::new("havel"), 13.0 + damage, 42, 75, 0, 60, 7.0, 0.0, 0.0, 0.0, None, None, None, hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, sound, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, shieldstun); @@ -74,10 +72,9 @@ unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -86,12 +83,12 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 13, 7, 24, -55, -7, 1.4, true, *EF_FLIP_YZ, 0.4); - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 16, 7, -4, -55, -139, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), -4, 16.5, 5, -10, -55, 16, 1.4, true, *EF_FLIP_YZ, 0.4); + EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("krool_attack_s3_arc"), Hash40::new("krool_attack_s3_arc"), Hash40::new("top"), 4, 18, 5, -351, -55, 185, 1.4, true, *EF_FLIP_YZ, 0.4); } frame(lua_state, 12.0); if is_excute(agent) { - EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 12, 24, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); + EFFECT_ALPHA(agent, Hash40::new("krool_attack_s3_impact"), Hash40::new("top"), 0, 20, 22, 0, 0, 0, 1.7, 0, 0, 0, 0, 0, 360, true, 1); } } @@ -121,7 +118,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -212,7 +208,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } frame(lua_state, 38.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { @@ -321,17 +316,19 @@ unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("effect_attacks3hi", effect_attacks3hi); - agent.acmd("game_attacks3", game_attacks3s); - agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); agent.acmd("sound_attacks3hi", sound_attacks3); agent.acmd("sound_attacks3", sound_attacks3); agent.acmd("sound_attacks3lw", sound_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("sound_attackhi3", sound_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); agent.acmd("sound_attacklw3", sound_attacklw3); diff --git a/fighters/krool/src/backpack/acmd.rs b/fighters/krool/src/backpack/acmd.rs index ad07212a85..ca43b0f288 100644 --- a/fighters/krool/src/backpack/acmd.rs +++ b/fighters/krool/src/backpack/acmd.rs @@ -45,7 +45,6 @@ unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/link/src/lib.rs b/fighters/link/src/lib.rs index eb3b99d89c..b326cc8906 100644 --- a/fighters/link/src/lib.rs +++ b/fighters/link/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/link/src/status/special_hi.rs b/fighters/link/src/status/special_hi.rs index 9f208f7e35..3cd616c434 100644 --- a/fighters/link/src/status/special_hi.rs +++ b/fighters/link/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI diff --git a/fighters/link/src/status/special_n.rs b/fighters/link/src/status/special_n.rs index 655c069212..844bc6bf68 100644 --- a/fighters/link/src/status/special_n.rs +++ b/fighters/link/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_N diff --git a/fighters/littlemac/src/acmd/aerials.rs b/fighters/littlemac/src/acmd/aerials.rs index 4db8b384f3..e42fb8a949 100644 --- a/fighters/littlemac/src/acmd/aerials.rs +++ b/fighters/littlemac/src/acmd/aerials.rs @@ -30,7 +30,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -82,7 +81,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -127,7 +125,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -161,7 +158,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -234,7 +230,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -269,12 +264,16 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/littlemac/src/acmd/ground.rs b/fighters/littlemac/src/acmd/ground.rs index 8e7fade53b..508252544c 100644 --- a/fighters/littlemac/src/acmd/ground.rs +++ b/fighters/littlemac/src/acmd/ground.rs @@ -20,7 +20,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { VarModule::on_flag(agent.battle_object, vars::littlemac::instance::IS_LATE_DLE_INPUT); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -87,7 +85,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { @@ -183,7 +180,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { @@ -215,6 +211,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); agent.acmd("sound_attack13", sound_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/littlemac/src/acmd/other.rs b/fighters/littlemac/src/acmd/other.rs index d07e0220a1..32356781ee 100644 --- a/fighters/littlemac/src/acmd/other.rs +++ b/fighters/littlemac/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -66,7 +65,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -104,8 +102,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/littlemac/src/acmd/smashes.rs b/fighters/littlemac/src/acmd/smashes.rs index 4956ae5954..ac0cbfa0c8 100644 --- a/fighters/littlemac/src/acmd/smashes.rs +++ b/fighters/littlemac/src/acmd/smashes.rs @@ -1,7 +1,7 @@ use smash::app::sv_animcmd::get_value_float; use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -9,41 +9,43 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(agent, 14.0, 16.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 15.0, 3.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - frame(lua_state, 16.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } - frame(lua_state, 14.0); + frame(lua_state, 12.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); - LAST_EFFECT_SET_RATE(agent, 1.5); - FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 18.0); + frame(lua_state, 13.0); if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); } } -unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -51,40 +53,36 @@ unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); - FT_MOTION_RATE_RANGE(agent, 14.0, 15.0, 3.0); + FT_MOTION_RATE_RANGE(agent, 14.0, 16.0, 3.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 17.0, 41, 89, 0, 34, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 15.0, 41, 89, 0, 34, 3.5, -1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("bust"), 15.0, 41, 89, 0, 34, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("hip"), 15.0, 41, 89, 0, 34, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 4, 0, Hash40::new("kneel"), 15.0, 41, 89, 0, 34, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 16.0, 80, 87, 0, 35, 4.0, 3.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 80, 87, 0, 35, 3.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("bust"), 13.0, 80, 87, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("hip"), 13.0, 80, 87, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } - frame(lua_state, 15.0); + frame(lua_state, 16.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 0, 0, true); } - frame(lua_state, 12.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 13.0); + frame(lua_state, 14.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_line"), Hash40::new("top"), -1, 8.5, -10, 0, 4, 0, 1.05, false); + EFFECT_FOLLOW(agent, Hash40::new("littlemac_attack_arc"), Hash40::new("top"), -2, 10, -2, -10, 20, 75, 0.7, false); + LAST_EFFECT_SET_RATE(agent, 1.5); + FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 1, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); } - frame(lua_state, 14.0); + frame(lua_state, 18.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 11, 9, -1, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 360, false); + EFFECT_OFF_KIND(agent, Hash40::new("littlemac_attack_arc"), true, true); } } @@ -106,7 +104,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -134,7 +131,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -205,7 +201,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { JostleModule::set_status(boma, true); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -254,13 +249,15 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("effect_attacks4hi", effect_attacks4hi); - agent.acmd("game_attacks4", game_attacks4s); - agent.acmd("effect_attacks4", effect_attacks4s); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/littlemac/src/acmd/specials.rs b/fighters/littlemac/src/acmd/specials.rs index 441411c01f..9ca535e4a4 100644 --- a/fighters/littlemac/src/acmd/specials.rs +++ b/fighters/littlemac/src/acmd/specials.rs @@ -88,7 +88,6 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_LITTLEMAC_STATUS_SPECIAL_N_FLAG_KO_GRAVITY); } - } unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { @@ -139,7 +138,6 @@ unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); } - } unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { @@ -187,7 +185,6 @@ unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); } - } unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { @@ -216,7 +213,6 @@ unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { if is_excute(agent) { AreaModule::erase_wind(boma, 0); } - } unsafe extern "C" fn game_specialsjump(agent: &mut L2CAgentBase) { @@ -279,7 +275,6 @@ unsafe extern "C" fn game_specialairsblow(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn effect_specialairsblow(agent: &mut L2CAgentBase) { @@ -394,9 +389,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairn2", sound_specialn2); agent.acmd("expression_specialn2", expression_specialn2); agent.acmd("expression_specialairn2", expression_specialn2); + agent.acmd("game_specialsjump", game_specialsjump); agent.acmd("game_specialairsblow", game_specialairsblow); agent.acmd("effect_specialairsblow", effect_specialairsblow); + agent.acmd("game_specialhistart", game_specialhistart); agent.acmd("game_specialairhistart", game_specialairhistart); agent.acmd("game_specialhi", game_specialhi); diff --git a/fighters/littlemac/src/acmd/throws.rs b/fighters/littlemac/src/acmd/throws.rs index cce945a937..ee6d66a161 100644 --- a/fighters/littlemac/src/acmd/throws.rs +++ b/fighters/littlemac/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -167,8 +166,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/littlemac/src/acmd/tilts.rs b/fighters/littlemac/src/acmd/tilts.rs index d3873359ff..29702fec5f 100644 --- a/fighters/littlemac/src/acmd/tilts.rs +++ b/fighters/littlemac/src/acmd/tilts.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -46,7 +45,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -76,7 +74,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { JostleModule::set_status(boma, true); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -99,7 +96,9 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/littlemac/src/opff.rs b/fighters/littlemac/src/opff.rs index 3adad78944..0ec66fdd4b 100644 --- a/fighters/littlemac/src/opff.rs +++ b/fighters/littlemac/src/opff.rs @@ -146,6 +146,7 @@ pub unsafe fn littlemac_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, littlemac_frame_wrapper); } diff --git a/fighters/littlemac/src/status/special_hi.rs b/fighters/littlemac/src/status/special_hi.rs index 5d084f859a..16c86070ce 100644 --- a/fighters/littlemac/src/status/special_hi.rs +++ b/fighters/littlemac/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_HI_JUMP diff --git a/fighters/littlemac/src/status/special_lw.rs b/fighters/littlemac/src/status/special_lw.rs index a111adf3ad..0026a53259 100644 --- a/fighters/littlemac/src/status/special_lw.rs +++ b/fighters/littlemac/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_lw_old_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START); diff --git a/fighters/littlemac/src/status/special_lw_cancel.rs b/fighters/littlemac/src/status/special_lw_cancel.rs index 41c9db13f2..ba69614dbd 100644 --- a/fighters/littlemac/src/status/special_lw_cancel.rs +++ b/fighters/littlemac/src/status/special_lw_cancel.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_lw_cancel_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/littlemac/src/status/special_n.rs b/fighters/littlemac/src/status/special_n.rs index 31b8e5ed50..86ec813fd8 100644 --- a/fighters/littlemac/src/status/special_n.rs +++ b/fighters/littlemac/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/littlemac/src/status/special_s.rs b/fighters/littlemac/src/status/special_s.rs index 0ae3ba0a88..4715e53fc7 100644 --- a/fighters/littlemac/src/status/special_s.rs +++ b/fighters/littlemac/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_S_JUMP diff --git a/fighters/lucario/src/acmd/aerials.rs b/fighters/lucario/src/acmd/aerials.rs index 79085ae821..7915ce378e 100644 --- a/fighters/lucario/src/acmd/aerials.rs +++ b/fighters/lucario/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -76,7 +75,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -152,7 +150,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -214,16 +211,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/lucario/src/acmd/ground.rs b/fighters/lucario/src/acmd/ground.rs index 8da6f35b3c..e894ca0e8d 100644 --- a/fighters/lucario/src/acmd/ground.rs +++ b/fighters/lucario/src/acmd/ground.rs @@ -1,37 +1,5 @@ - use super::*; -unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); - } - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); - frame(lua_state, 5.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 7.0); - if is_excute(agent) { - MeterModule::watch_damage(agent.battle_object, true); - ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(agent) { - MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(boma); - } -} - unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -95,10 +63,41 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_FORCE_AURAPOWER_ATTACK_POWER_MUL); + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 5.0); + } + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 7.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, true); + ATTACK(agent, 0, 0, Hash40::new("footl"), 8.0, 55, 66, 0, 38, 3.6, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 8.0, 55, 66, 0, 43, 3.6, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 55, 66, 0, 48, 3.8, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("footl"), 7.0, 75, 55, 0, 25, 2.9, 2.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("hip"), 7.0, 75, 55, 0, 30, 3.0, 2.2, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 75, 55, 0, 35, 3.5, 0.0, 4.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + MeterModule::watch_damage(agent.battle_object, false); + AttackModule::clear_all(boma); + } +} + pub fn install(agent: &mut Agent) { - agent.acmd("game_attackdash", game_attackdash); agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); - + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/lucario/src/acmd/other.rs b/fighters/lucario/src/acmd/other.rs index 1852ec481b..db1d08cbc3 100644 --- a/fighters/lucario/src/acmd/other.rs +++ b/fighters/lucario/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -48,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -80,7 +78,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -233,21 +230,28 @@ unsafe extern "C" fn game_appealhi(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_cliffattack", game_cliffattack); + agent.acmd("game_catchattack", game_catchattack); + agent.acmd("game_slipattack", game_slipattack); + agent.acmd("game_downattackd", game_downattackd); agent.acmd("game_downattacku", game_downattacku); + agent.acmd("game_appealhil", game_appealhi); agent.acmd("game_appealhir", game_appealhi); } diff --git a/fighters/lucario/src/acmd/smashes.rs b/fighters/lucario/src/acmd/smashes.rs index 9623c02dac..410a5c4f8c 100644 --- a/fighters/lucario/src/acmd/smashes.rs +++ b/fighters/lucario/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -50,7 +48,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -68,7 +65,6 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("lucario_appeal_hadou"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); } - } unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { @@ -141,9 +137,11 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); agent.acmd("sound_attackhi4", sound_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index 1a4ff5b035..b224779900 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -1,6 +1,84 @@ - use super::*; +unsafe extern "C" fn game_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + } +} + +unsafe extern "C" fn effect_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 35.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); + } +} + +unsafe extern "C" fn expression_specialnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 35.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); + let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); + VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); + } +} + +unsafe extern "C" fn effect_specialairnbomb(agent: &mut L2CAgentBase) {} + +unsafe extern "C" fn sound_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); + } +} + +unsafe extern "C" fn expression_specialairnbomb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 35.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -30,7 +108,6 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { ArticleModule::generate_article(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_QIGONG, false, 0); } } - } unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { @@ -244,7 +321,6 @@ unsafe extern "C" fn game_specialhimove(agent: &mut L2CAgentBase) { if is_excute(agent) { GroundModule::set_passable_check(boma, true); } - } unsafe extern "C" fn expression_specialhimove(agent: &mut L2CAgentBase) { @@ -301,88 +377,6 @@ unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - -} - -unsafe extern "C" fn game_specialnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 37.0); - if is_excute(agent) { - ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); - let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); - } -} - -unsafe extern "C" fn effect_specialnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 35.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sound_specialnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 37.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); - } -} - -unsafe extern "C" fn expression_specialnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 35.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn game_specialairnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 37.0); - if is_excute(agent) { - ArticleModule::shoot(boma, *FIGHTER_LUCARIO_GENERATE_ARTICLE_AURABALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); - MeterModule::drain_direct(agent.battle_object, MeterModule::meter_per_level(agent.battle_object)); - let frames = 120.max(VarModule::get_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME)); - VarModule::set_int(agent.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames); - } -} - -unsafe extern "C" fn effect_specialairnbomb(agent: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn sound_specialairnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 37.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("vc_lucario_013")); - } -} - -unsafe extern "C" fn expression_specialairnbomb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 35.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { @@ -534,6 +528,15 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnbomb", game_specialnbomb); + agent.acmd("effect_specialnbomb", effect_specialnbomb); + agent.acmd("sound_specialnbomb", sound_specialnbomb); + agent.acmd("expression_specialnbomb", expression_specialnbomb); + agent.acmd("game_specialairnbomb", game_specialairnbomb); + agent.acmd("effect_specialairnbomb", effect_specialairnbomb); + agent.acmd("sound_specialairnbomb", sound_specialairnbomb); + agent.acmd("expression_specialairnbomb", expression_specialairnbomb); + agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specialairs); agent.acmd("game_specialairsthrow", game_specialairsthrow); @@ -541,6 +544,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairsthrow", effect_specialairsthrow); agent.acmd("sound_specialairsthrow", sound_specialairsthrow); agent.acmd("expression_specialairsthrow", expression_specialairsthrow); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); @@ -549,14 +553,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_specialhimove", expression_specialhimove); agent.acmd("game_specialhiend", game_specialhiend); agent.acmd("game_specialairhiend", game_specialairhiend); - agent.acmd("game_specialnbomb", game_specialnbomb); - agent.acmd("effect_specialnbomb", effect_specialnbomb); - agent.acmd("sound_specialnbomb", sound_specialnbomb); - agent.acmd("expression_specialnbomb", expression_specialnbomb); - agent.acmd("game_specialairnbomb", game_specialairnbomb); - agent.acmd("effect_specialairnbomb", effect_specialairnbomb); - agent.acmd("sound_specialairnbomb", sound_specialairnbomb); - agent.acmd("expression_specialairnbomb", expression_specialairnbomb); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); agent.acmd("sound_speciallw", sound_speciallw); diff --git a/fighters/lucario/src/acmd/throws.rs b/fighters/lucario/src/acmd/throws.rs index fe0f0b352c..f60c8a22db 100644 --- a/fighters/lucario/src/acmd/throws.rs +++ b/fighters/lucario/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -19,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -180,8 +178,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/lucario/src/acmd/tilts.rs b/fighters/lucario/src/acmd/tilts.rs index 6552882f99..ae0486e0a3 100644 --- a/fighters/lucario/src/acmd/tilts.rs +++ b/fighters/lucario/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -98,7 +97,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("game_attacks3lw", game_attacks3); agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/lucario/src/status.rs b/fighters/lucario/src/status.rs index 0dffd0210f..ee0517bebd 100644 --- a/fighters/lucario/src/status.rs +++ b/fighters/lucario/src/status.rs @@ -16,21 +16,6 @@ extern "C" { fn store_event_table(event: *const app::LinkEvent) -> L2CValue; } -extern "C" fn lucario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_LUCARIO { - return; - } - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - MeterModule::reset(fighter.battle_object); - MeterModule::set_meter_cap(fighter.object(), 2); - MeterModule::set_meter_per_level(fighter.object(), 100.0); - MeterModule::add(fighter.battle_object, dbg!(MeterModule::meter_per_level(fighter.battle_object))); - VarModule::off_flag(fighter.battle_object, vars::lucario::instance::METER_IS_BURNOUT); - } -} - unsafe extern "C" fn should_use_special_lw_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::lucario::instance::DISABLE_SPECIAL_LW) { false.into() @@ -108,14 +93,26 @@ pub unsafe extern "C" fn pre_run(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Run() } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(should_use_special_lw_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + MeterModule::reset(fighter.battle_object); + MeterModule::set_meter_cap(fighter.object(), 2); + MeterModule::set_meter_per_level(fighter.object(), 100.0); + MeterModule::add(fighter.battle_object, dbg!(MeterModule::meter_per_level(fighter.battle_object))); + VarModule::off_flag(fighter.battle_object, vars::lucario::instance::METER_IS_BURNOUT); +} + pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + attack_air::install(agent); attack_hi4::install(agent); special_hi::install(agent); special_lw::install(agent); special_n::install(agent); special_s::install(agent); - agent.on_start(lucario_init); + agent.status(Main, *FIGHTER_STATUS_KIND_SHIELD_BREAK_FLY, shield_break_fly_main); agent.status(Main, *FIGHTER_STATUS_KIND_DEAD, dead_main); agent.status(Main, *FIGHTER_STATUS_KIND_ENTRY, entry_main); diff --git a/fighters/lucario/src/status/attack_air.rs b/fighters/lucario/src/status/attack_air.rs index 6225f28b80..352e6ba9ef 100644 --- a/fighters/lucario/src/status/attack_air.rs +++ b/fighters/lucario/src/status/attack_air.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import pub unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { // if under USpecial penalty and next status would have been landing, use special landing instead diff --git a/fighters/lucario/src/status/attack_hi4.rs b/fighters/lucario/src/status/attack_hi4.rs index 78767dcf06..a75043930a 100644 --- a/fighters/lucario/src/status/attack_hi4.rs +++ b/fighters/lucario/src/status/attack_hi4.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import pub unsafe extern "C" fn attack_hi4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/lucario/src/status/special_hi.rs b/fighters/lucario/src/status/special_hi.rs index a6db017ab2..3e2aa86c50 100644 --- a/fighters/lucario/src/status/special_hi.rs +++ b/fighters/lucario/src/status/special_hi.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_HI_BOUND diff --git a/fighters/lucario/src/status/special_lw.rs b/fighters/lucario/src/status/special_lw.rs index 3ef21d67cb..42ecca05c9 100644 --- a/fighters/lucario/src/status/special_lw.rs +++ b/fighters/lucario/src/status/special_lw.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import unsafe extern "C" fn lucario_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index 9348263ccb..ff07229bb2 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT diff --git a/fighters/lucario/src/status/special_s.rs b/fighters/lucario/src/status/special_s.rs index 73bca34f64..e73485f5cb 100644 --- a/fighters/lucario/src/status/special_s.rs +++ b/fighters/lucario/src/status/special_s.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -// status script import // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW // diff --git a/fighters/lucas/src/acmd/aerials.rs b/fighters/lucas/src/acmd/aerials.rs index 9a7aadfbdd..4347a5939e 100644 --- a/fighters/lucas/src/acmd/aerials.rs +++ b/fighters/lucas/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -182,7 +181,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -244,7 +242,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -384,7 +381,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL_AERIAL, false); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -442,7 +438,6 @@ unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_lucas_attackair_l04")); } - } unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { @@ -540,19 +535,24 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("game_landingairn", game_landingairn); agent.acmd("effect_landingairn", effect_landingairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairlw", sound_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_aircatch", game_aircatch); agent.acmd("expression_aircatch", expression_aircatch); agent.acmd("game_aircatchlanding", game_aircatchlanding); - } +} diff --git a/fighters/lucas/src/acmd/ground.rs b/fighters/lucas/src/acmd/ground.rs index 54f3a5ebbf..06dfa6f2c0 100644 --- a/fighters/lucas/src/acmd/ground.rs +++ b/fighters/lucas/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -141,7 +140,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -164,7 +162,6 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } - } unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { @@ -179,7 +176,6 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_STEP(agent, Hash40::new("se_lucas_step_left_m")); } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { @@ -211,6 +207,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attack12", effect_attack12); agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); agent.acmd("sound_attackdash", sound_attackdash); diff --git a/fighters/lucas/src/acmd/other.rs b/fighters/lucas/src/acmd/other.rs index 172015fc3c..5d10fb1af6 100644 --- a/fighters/lucas/src/acmd/other.rs +++ b/fighters/lucas/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -70,14 +69,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -91,7 +88,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -101,6 +97,7 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } + unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -126,15 +123,18 @@ unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appealhir", game_appealhir); agent.acmd("game_appealhil", game_appealhir); agent.acmd("game_appeallwr", game_appeallwr); diff --git a/fighters/lucas/src/acmd/smashes.rs b/fighters/lucas/src/acmd/smashes.rs index ae6290c7b5..8fd42911f2 100644 --- a/fighters/lucas/src/acmd/smashes.rs +++ b/fighters/lucas/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -624,9 +623,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); diff --git a/fighters/lucas/src/acmd/specials.rs b/fighters/lucas/src/acmd/specials.rs index 789e12c2f9..4ebaa2722e 100644 --- a/fighters/lucas/src/acmd/specials.rs +++ b/fighters/lucas/src/acmd/specials.rs @@ -1,6 +1,156 @@ - use super::*; +// SPECIAL N START // + +unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack06")); + } +} + +// SPECIAL N HOLD // + +unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { + // INTENTIONALLY LEFT BLANK + /* if agent.kind() == *FIGHTER_KIND_KIRBY { + WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + } */ +} + +unsafe extern "C" fn effect_specialnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + for i in 1..=50 { + if is_excute(agent) { + if i%2==0 { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); + EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); + } + if i%4==0 { + EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); + } + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent){ + COL_NORMAL(agent); + } + wait(lua_state, 1.0); + } +} + +unsafe extern "C" fn sound_specialairnhold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); + PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); + } +} + +// SPECIAL N FIRE // + +unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); + } + wait(lua_state, 2.0); + if is_excute(agent) { + if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); + VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + } + AttackModule::clear_all(boma); + } + } else { + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + } + } +} + +unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); + EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } + for _ in 1..=5 { + if is_excute(agent) { + FLASH(agent, 0.01, 0.5, 1, 0.4); + } + wait(lua_state, 1.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0.6); + } + wait(lua_state, 1.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + wait(lua_state, 3.0) + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialairnfire(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack05")); + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } +} + unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -152,6 +302,14 @@ unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + agent.select_cliff_hangdata_from_name("special_air_hi_end"); + } +} + unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -182,7 +340,6 @@ unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("lucas_psi_hold"), Hash40::new("havel"), -0.3, -4.0, 0.1, 0, 0, 0, 0.5, true); EFFECT_FOLLOW(agent, Hash40::new("lucas_psimagnet_start"), Hash40::new("trans"), 0, 6.5, 10, 0, 0, 0, 0.25, false); } - } unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { @@ -209,7 +366,6 @@ unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { } wait(lua_state, 9.0); } - } unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { @@ -225,7 +381,6 @@ unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FT_MOTION_RATE(agent, 0.800); } - } unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { @@ -247,7 +402,6 @@ unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { if is_excute(agent) { COL_NORMAL(agent); } - } unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { @@ -271,168 +425,6 @@ unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { } } -// SPECIAL N START // - -unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 10, 0, 0, 55, 14.0, 0.0, 10.0, 0.0, None, None, None, 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); - PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack06")); - } - -} - -// SPECIAL N HOLD // - -unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { - // INTENTIONALLY LEFT BLANK - /* if agent.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - } */ -} - -unsafe extern "C" fn effect_specialnhold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 9, 0, 9, 0, 0, 0, false); - FLASH(agent, 0.01, 0.5, 1, 0.4); - } - for i in 1..=50 { - if is_excute(agent) { - if i%2==0 { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_hold"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.5, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_status_defense_up"), false, false); - EFFECT_FLW_POS(agent, Hash40::new("sys_status_defense_up"), Hash40::new("top"), 0, sv_math::rand(hash40("fighter"), 4) as i32 + 12, sv_math::rand(hash40("fighter"), 4) as i32 - 2, 0, 0, 0, 0.2, true); - } - if i%4==0 { - EFFECT_FLW_POS(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, false); - } - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent){ - COL_NORMAL(agent); - } - wait(lua_state, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent){ - COL_NORMAL(agent); - } - wait(lua_state, 1.0); - } -} - -unsafe extern "C" fn sound_specialairnhold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_lucas_special_h02")); - PLAY_STATUS(agent, Hash40::new("se_lucas_pk_charge")); - } -} - -// SPECIAL N FIRE // - -unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if !VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT) { - frame(lua_state, 2.0); - if is_excute(agent) { - VarModule::on_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 45, 60, 0, 60, 3.0, 0.0, 10.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_ice"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 50, 11.0, 0.0, 10.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_PSI); - } - wait(lua_state, 2.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF) { - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - VarModule::set_float(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0.0); - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - } - AttackModule::clear_all(boma); - } - } else { - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkfr_hold"), false, false); - } - frame(lua_state, 2.0); - if is_excute(agent) { - VarModule::off_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - } - - } -} - -unsafe extern "C" fn effect_specialnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkt_hold"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.9, true); - EFFECT_FLW_POS(agent, Hash40::new("lucas_pkfr_bomb_max"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.5, true); - EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 0, 11, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } - for _ in 1..=5 { - if is_excute(agent) { - FLASH(agent, 0.01, 0.5, 1, 0.4); - } - wait(lua_state, 1.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0.6); - } - wait(lua_state, 1.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - wait(lua_state, 3.0) - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucas_pkt_hold"), false, false); - } -} - -unsafe extern "C" fn sound_specialairnfire(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE_REMAIN(agent, Hash40::new("vc_lucas_attack05")); - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_l")); - PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); - } -} - -unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - agent.select_cliff_hangdata_from_name("special_air_hi_end"); - } -} - unsafe extern "C" fn game_fallspecial(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.select_cliff_hangdata_from_name("special_air_hi_end"); @@ -440,14 +432,35 @@ unsafe extern "C" fn game_fallspecial(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("sound_specialnstart", sound_specialnstart); + agent.acmd("sound_specialairnstart", sound_specialnstart); + agent.acmd("game_specialnhold", game_specialnhold); + agent.acmd("game_specialairnhold", game_specialnhold); + agent.acmd("effect_specialnhold", effect_specialnhold); + agent.acmd("effect_specialairnhold", effect_specialnhold); + agent.acmd("sound_specialairnhold", sound_specialairnhold); + agent.acmd("sound_specialnhold", sound_specialairnhold); + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialairnfire); + agent.acmd("sound_specialnfire", sound_specialairnfire); + agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specialairs); agent.acmd("effect_specialairs", effect_specialairs); agent.acmd("effect_specials", effect_specialairs); agent.acmd("sound_specials", sound_specials); agent.acmd("sound_specialairs", sound_specials); + agent.acmd("game_specialairhi", game_specialairhi); agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_specialairhiend", game_specialairhiend); + agent.acmd("game_specialhiend", game_specialairhiend); + agent.acmd("game_speciallwstart", game_speciallwstart); agent.acmd("game_specialairlwstart", game_specialairlwstart); agent.acmd("effect_speciallwstart", effect_speciallwstart); @@ -460,23 +473,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairlwend", effect_speciallwend); agent.acmd("effect_speciallwhit", effect_speciallwhit); agent.acmd("effect_specialairlwhit", effect_speciallwhit); - agent.acmd("game_specialnstart", game_specialnstart); - agent.acmd("game_specialairnstart", game_specialnstart); - agent.acmd("sound_specialnstart", sound_specialnstart); - agent.acmd("sound_specialairnstart", sound_specialnstart); - agent.acmd("game_specialnhold", game_specialnhold); - agent.acmd("game_specialairnhold", game_specialnhold); - agent.acmd("effect_specialnhold", effect_specialnhold); - agent.acmd("effect_specialairnhold", effect_specialnhold); - agent.acmd("sound_specialairnhold", sound_specialairnhold); - agent.acmd("sound_specialnhold", sound_specialairnhold); - agent.acmd("game_specialnfire", game_specialnfire); - agent.acmd("game_specialairnfire", game_specialnfire); - agent.acmd("effect_specialnfire", effect_specialnfire); - agent.acmd("effect_specialairnfire", effect_specialnfire); - agent.acmd("sound_specialairnfire", sound_specialairnfire); - agent.acmd("sound_specialnfire", sound_specialairnfire); - agent.acmd("game_specialairhiend", game_specialairhiend); - agent.acmd("game_specialhiend", game_specialairhiend); + agent.acmd("game_fallspecial", game_fallspecial); } diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index 180b908a1b..7d507c0550 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -129,7 +129,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -151,7 +150,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { REVERSE_LR(agent); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -191,7 +189,6 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn expression_throwlw(agent: &mut L2CAgentBase) { @@ -208,16 +205,19 @@ unsafe extern "C" fn expression_throwlw(agent: &mut L2CAgentBase) { QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); agent.acmd("expression_throwlw", expression_throwlw); } diff --git a/fighters/lucas/src/acmd/tilts.rs b/fighters/lucas/src/acmd/tilts.rs index 94c926f895..9b15a13386 100644 --- a/fighters/lucas/src/acmd/tilts.rs +++ b/fighters/lucas/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -23,10 +22,9 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 2.5, 3.0); } - } -unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -51,7 +49,7 @@ unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attacks3lw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -65,7 +63,6 @@ unsafe extern "C" fn expression_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -91,7 +88,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { //StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -117,7 +113,6 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -136,7 +131,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -161,21 +155,22 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("lucas_psi_atk"), false, false); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3lw", game_attacks3lw); - agent.acmd("game_attacks3", game_attacks3lw); - agent.acmd("game_attacks3hi", game_attacks3lw); - agent.acmd("effect_attacks3lw", effect_attacks3lw); - agent.acmd("effect_attacks3", effect_attacks3lw); - agent.acmd("effect_attacks3hi", effect_attacks3lw); - agent.acmd("expression_attacks3lw", expression_attacks3lw); - agent.acmd("expression_attacks3", expression_attacks3lw); - agent.acmd("expression_attacks3hi", expression_attacks3lw); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("effect_attacks3hi", effect_attacks3); + agent.acmd("effect_attacks3lw", effect_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/lucas/src/opff.rs b/fighters/lucas/src/opff.rs index 5bbb239e48..5cc4f84151 100644 --- a/fighters/lucas/src/opff.rs +++ b/fighters/lucas/src/opff.rs @@ -449,13 +449,6 @@ pub unsafe fn lucas_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, lucas_frame_wrapper); - agent.on_line(Main, pkthunder_callback); } \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/mod.rs b/fighters/lucas/src/pkthunder/mod.rs index 5fadb6a06a..af9658895b 100644 --- a/fighters/lucas/src/pkthunder/mod.rs +++ b/fighters/lucas/src/pkthunder/mod.rs @@ -1,9 +1,13 @@ use super::*; mod acmd; +mod opff; +mod status; pub fn install() { let agent = &mut Agent::new("lucas_pkthunder"); acmd::install(agent); + opff::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/opff.rs b/fighters/lucas/src/pkthunder/opff.rs new file mode 100644 index 0000000000..be026d0489 --- /dev/null +++ b/fighters/lucas/src/pkthunder/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pkthunder_callback); +} \ No newline at end of file diff --git a/fighters/lucas/src/pkthunder/status.rs b/fighters/lucas/src/pkthunder/status.rs new file mode 100644 index 0000000000..f8818f7bf0 --- /dev/null +++ b/fighters/lucas/src/pkthunder/status.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +// WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE // + +unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { + if !VarModule::is_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE) { + let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let parent_object = get_battle_object_from_id(parent_id as u32); + if !parent_object.is_null() + && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_LUCAS + && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD { + VarModule::on_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE); + MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); + return 0.into(); + } + smashline::original_status(Exec, weapon, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); +} \ No newline at end of file diff --git a/fighters/lucas/src/status.rs b/fighters/lucas/src/status.rs index 3cdd984986..d8ff1e91f1 100644 --- a/fighters/lucas/src/status.rs +++ b/fighters/lucas/src/status.rs @@ -3,450 +3,24 @@ use globals::*; utils::import!(common::djc::attack_air_main_status); // status script import -// FIGHTER RESET // +mod attack_air; +mod attack_lw4; +mod special_n; +mod special_hi; -extern "C" fn lucas_reset(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_LUCAS { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), charge_time, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } - } -} - -// SPECIAL N // - -unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ - if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - return 0.into(); - } - else { - smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) - } -} - -// SPECIAL N HOLD // - -unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - // - // OLD SPECIAL N STATUS MAIN CODE // - // - // let time = fighter.get_param_int("param_special_n", "time"); - // let nobang_time = fighter.get_param_int("param_special_n", "nobang_time"); - // fighter.set_int(time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME); - // fighter.set_int(nobang_time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); - - // if !StopModule::is_stop(fighter.module_accessor) { - // lucas_special_n_hold_main_sub_status(fighter, false.into()); - // } - // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - // fighter.main_shift(lucas_special_n_hold_main_loop) - if !StopModule::is_stop(fighter.module_accessor) { - lucas_special_n_hold_main_sub_status(fighter, false.into()); - } - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - fighter.main_shift(lucas_special_n_hold_main_loop) - -} - -unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { - // - // OLD PK FREEZE EXPLOSION CODE // - // - // if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE) - // && !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) - // { - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); - // fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED); - // ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, false, -1); - // } - - // if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) { - // return; - // } - // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME, 0); - // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME, 0); - // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) { - // return; - // } - // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME) <= 0 { - // if fighter.is_button_off(Buttons::Special) { - // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); - // return; - // } - // } - // if dbg!(fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME)) <= 0 { - // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); - // return; - // } -} - -unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { - // - // OLD SPECIAL N SUBSTATUS CODE // - // - // if arg.get_bool() { - // lucas_special_n_check_explosion(fighter); - // } - // if !fighter.is_situation(*SITUATION_KIND_GROUND) { - // if !arg.get_bool() { - // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); - // } - // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { - // KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - // } else { - // KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - // } - // } - // 0.into() - - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - if !arg.get_bool() { - WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); - } - if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } else { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - } - 0.into() -} - -unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - // - // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // - // - // let nobang_time = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); - // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) - // && nobang_time <= 0 - // { - // fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - // return 1.into(); - // } - // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); - // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { - // // else block - // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, - // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), - // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - // } - // 1.into() - - /// let charge = "attack_up_charge_time" - /// - /// set_charge(charge) - /// - /// dec_charge() - /// if charge == 0 then IS_ATTACK_UP = true && set_charge(charge) - - if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && fighter.is_button_on(Buttons::Special) { - if VarModule::countdown_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0) { - let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); - return 1.into(); - } - } else { - fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_END.into(), false.into()); - return 1.into(); - } - let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); - if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { - // else block - lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, - *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), - Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); - } - 1.into() -} - -unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( - fighter: &mut L2CFighterCommon, - mtrans_kind_work_id: i32, - flag_work_id: i32, - ground_kinetic_type: i32, - air_kinetic_type: i32, - ground_motion_kind: Hash40, - aerial_motion_kind: Hash40, - ground_correct_kind: i32 -) { - if !fighter.is_situation(*SITUATION_KIND_GROUND) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - KineticModule::change_kinetic(fighter.module_accessor, air_kinetic_type); - if !fighter.is_flag(flag_work_id) { - MotionModule::change_motion(fighter.module_accessor, aerial_motion_kind, 0.0, 1.0, false, 0.0, false, false); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, aerial_motion_kind, -1.0, 1.0, 0.0, false, false); - } - fighter.set_int(*SITUATION_KIND_GROUND, mtrans_kind_work_id); - } else { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(ground_correct_kind)); - KineticModule::change_kinetic(fighter.module_accessor, ground_kinetic_type); - if !fighter.is_flag(flag_work_id) { - MotionModule::change_motion(fighter.module_accessor, ground_motion_kind, 0.0, 1.0, false, 0.0, false, false); - } else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, ground_motion_kind, -1.0, 1.0, 0.0, false, false); - } - fighter.set_int(*SITUATION_KIND_AIR, mtrans_kind_work_id); - } - fighter.on_flag(flag_work_id); -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -// WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE // - -unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { - if !VarModule::is_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE) { - let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let parent_object = get_battle_object_from_id(parent_id as u32); - if !parent_object.is_null() - && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_LUCAS - && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD { - VarModule::on_flag(weapon.object(), vars::lucas::status::THUNDER_LOOSE); - MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); - return 0.into(); - } - smashline::original_status(Exec, weapon, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); - } - 0.into() -} - -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD // - -unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER) { - LinkModule::unlink(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER); - } - if [*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { - EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); - fighter.set_int(0, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); - } - 0.into() -} - -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK // - -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_SHOOT) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, //Repair later for ledge slipoffs? Anyone? - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_WALL_BRAKE); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("special_air_hi"), - 0.0, - 1.0, - false, - 0.0, - false, - false, - ); - if !StopModule::is_stop(fighter.module_accessor) { - sub_special_hi_attack(fighter); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) -} - -unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - // this does...something? - if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } else { - if fighter.is_situation(*SITUATION_KIND_AIR) { - KineticModule::enable_energy( - fighter.module_accessor, - *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - ); - } else { - KineticModule::unable_energy( - fighter.module_accessor, - *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, - ); - } - } - if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { - AttackModule::clear_inflict_kind_status(fighter.module_accessor); - } - 0.into() -} - -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END) { - fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); - let attack_end_brake = fighter.get_param_float("param_special_hi", "attack_end_brake"); - let special_hi_angle = fighter.get_float(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_FLOAT_DIR); - let brake_x = - attack_end_brake * special_hi_angle.cos() * PostureModule::lr(fighter.module_accessor); - let brake_y = attack_end_brake * special_hi_angle.sin(); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, brake_x, brake_y); - app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - } - /* - if fighter.is_prev_situation(*SITUATION_KIND_AIR) { - if fighter.is_situation(*SITUATION_KIND_GROUND) { - let attack_ground_speed_xmul = fighter.get_param_float("param_special_hi", "attack_ground_speed_xmul"); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, attack_ground_speed_xmul, attack_ground_speed_xmul, attack_ground_speed_xmul); - app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); - } - } - */ - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) - && fighter.is_situation(*SITUATION_KIND_GROUND) - { - let attack_ground_end_speed_xmul = - fighter.get_param_float("param_special_hi", "attack_ground_end_speed_xmul"); - - fighter.clear_lua_stack(); - lua_args!( - fighter, - FIGHTER_KINETIC_ENERGY_ID_STOP, - attack_ground_end_speed_xmul, - attack_ground_end_speed_xmul, - attack_ground_end_speed_xmul - ); - app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); - - fighter.change_status( - FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), - false.into(), - ); - return 1.into(); - } - // [insert stubbed redirection/bonk function here] - // LOL good riddance fucker - 0.into() - } else { - fighter.set_int64( - hash40("special_air_hi_attack_end") as i64, - *FIGHTER_LUCAS_INSTANCE_WORK_ID_INT_SPECIAL_AIR_END_MOTION, - ); - fighter.change_status( - FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END.into(), - false.into(), - ); - 1.into() - } -} - -pub unsafe extern "C" fn attack_lw4(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_AttackLw4_common(); - fighter.main_shift(status_attacklw4_main_param) -} - -unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - let combo = ComboModule::count(fighter.module_accessor) as i32; - let lw4_combo_max = 2; - if combo < lw4_combo_max && fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_ATTACK_TRIGGER != 0 && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { - ComboModule::set(fighter.module_accessor, 2); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_lw4_2"), 0.0, 1.0, false, 0.0, false, false); - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) - && fighter.sub_wait_ground_check_common(false.into()).get_bool() { - return 1.into(); - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 1.into(); - } - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), charge_time, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); } pub fn install(agent: &mut Agent) { - agent.on_start(lucas_reset); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre); - agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); - agent.status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); - agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi); - agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack,); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4); - agent.status(Exec, *WEAPON_LUCAS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); + agent.on_start(on_start); + + attack_air::install(agent); + attack_lw4::install(agent); + special_n::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/lucas/src/status/attack_air.rs b/fighters/lucas/src/status/attack_air.rs new file mode 100644 index 0000000000..7759657264 --- /dev/null +++ b/fighters/lucas/src/status/attack_air.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/attack_lw4.rs b/fighters/lucas/src/status/attack_lw4.rs new file mode 100644 index 0000000000..80518a07c4 --- /dev/null +++ b/fighters/lucas/src/status/attack_lw4.rs @@ -0,0 +1,35 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_LW4 + +pub unsafe extern "C" fn attack_lw4(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_AttackLw4_common(); + fighter.main_shift(status_attacklw4_main_param) +} + +unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + let combo = ComboModule::count(fighter.module_accessor) as i32; + let lw4_combo_max = 2; + if combo < lw4_combo_max && fighter.global_table[PAD_FLAG].get_i32() & *FIGHTER_PAD_FLAG_ATTACK_TRIGGER != 0 && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO) { + ComboModule::set(fighter.module_accessor, 2); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_lw4_2"), 0.0, 1.0, false, 0.0, false, false); + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) + && fighter.sub_wait_ground_check_common(false.into()).get_bool() { + return 1.into(); + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 1.into(); + } + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/special_hi.rs b/fighters/lucas/src/status/special_hi.rs new file mode 100644 index 0000000000..0768d007ec --- /dev/null +++ b/fighters/lucas/src/status/special_hi.rs @@ -0,0 +1,193 @@ +use super::*; + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD // + +unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER) { + LinkModule::unlink(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER); + } + if [*FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { + EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); + fighter.set_int(0, *FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); + } + 0.into() +} + +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK // + +pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_SHOOT) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, //Repair later for ledge slipoffs? Anyone? + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_LINK_SPECIAL_HI_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_WALL_BRAKE); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("special_air_hi"), + 0.0, + 1.0, + false, + 0.0, + false, + false, + ); + if !StopModule::is_stop(fighter.module_accessor) { + sub_special_hi_attack(fighter); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); + fighter.main_shift(special_hi_attack_main) +} + +unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + // this does...something? + if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } else { + if fighter.is_situation(*SITUATION_KIND_AIR) { + KineticModule::enable_energy( + fighter.module_accessor, + *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + ); + } else { + KineticModule::unable_energy( + fighter.module_accessor, + *FIGHTER_KINETIC_ENERGY_ID_GRAVITY, + ); + } + } + if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { + AttackModule::clear_inflict_kind_status(fighter.module_accessor); + } + 0.into() +} + +unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END) { + fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_ATTACK_END); + let attack_end_brake = fighter.get_param_float("param_special_hi", "attack_end_brake"); + let special_hi_angle = fighter.get_float(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_WORK_FLOAT_DIR); + let brake_x = + attack_end_brake * special_hi_angle.cos() * PostureModule::lr(fighter.module_accessor); + let brake_y = attack_end_brake * special_hi_angle.sin(); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, brake_x, brake_y); + app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + } + /* + if fighter.is_prev_situation(*SITUATION_KIND_AIR) { + if fighter.is_situation(*SITUATION_KIND_GROUND) { + let attack_ground_speed_xmul = fighter.get_param_float("param_special_hi", "attack_ground_speed_xmul"); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, attack_ground_speed_xmul, attack_ground_speed_xmul, attack_ground_speed_xmul); + app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); + } + } + */ + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) + && fighter.is_situation(*SITUATION_KIND_GROUND) + { + let attack_ground_end_speed_xmul = + fighter.get_param_float("param_special_hi", "attack_ground_end_speed_xmul"); + + fighter.clear_lua_stack(); + lua_args!( + fighter, + FIGHTER_KINETIC_ENERGY_ID_STOP, + attack_ground_end_speed_xmul, + attack_ground_end_speed_xmul, + attack_ground_end_speed_xmul + ); + app::sv_kinetic_energy::mul_speed(fighter.lua_state_agent); + + fighter.change_status( + FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), + false.into(), + ); + return 1.into(); + } + // [insert stubbed redirection/bonk function here] + // LOL good riddance fucker + 0.into() + } else { + fighter.set_int64( + hash40("special_air_hi_attack_end") as i64, + *FIGHTER_LUCAS_INSTANCE_WORK_ID_INT_SPECIAL_AIR_END_MOTION, + ); + fighter.change_status( + FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END.into(), + false.into(), + ); + 1.into() + } +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); + agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack); +} \ No newline at end of file diff --git a/fighters/lucas/src/status/special_n.rs b/fighters/lucas/src/status/special_n.rs new file mode 100644 index 0000000000..b35dd616c5 --- /dev/null +++ b/fighters/lucas/src/status/special_n.rs @@ -0,0 +1,190 @@ +use super::*; + +// SPECIAL N + +unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ + if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + return 0.into(); + } + else { + smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) + } +} + +// SPECIAL N HOLD + +unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + // + // OLD SPECIAL N STATUS MAIN CODE // + // + // let time = fighter.get_param_int("param_special_n", "time"); + // let nobang_time = fighter.get_param_int("param_special_n", "nobang_time"); + // fighter.set_int(time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME); + // fighter.set_int(nobang_time, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); + // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); + + // if !StopModule::is_stop(fighter.module_accessor) { + // lucas_special_n_hold_main_sub_status(fighter, false.into()); + // } + // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); + // fighter.main_shift(lucas_special_n_hold_main_loop) + if !StopModule::is_stop(fighter.module_accessor) { + lucas_special_n_hold_main_sub_status(fighter, false.into()); + } + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); + fighter.main_shift(lucas_special_n_hold_main_loop) + +} + +unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { + // + // OLD PK FREEZE EXPLOSION CODE // + // + // if fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE) + // && !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) + // { + // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + // fighter.on_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED); + // ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, false, -1); + // } + + // if !fighter.is_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_ALREADY_GENERATED) { + // return; + // } + // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME, 0); + // WorkModule::count_down_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME, 0); + // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) { + // return; + // } + // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME) <= 0 { + // if fighter.is_button_off(Buttons::Special) { + // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); + // return; + // } + // } + // if dbg!(fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_TIME)) <= 0 { + // ArticleModule::shoot(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), fighter.is_button_off(Buttons::Special)); + // return; + // } +} + +unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { + // + // OLD SPECIAL N SUBSTATUS CODE // + // + // if arg.get_bool() { + // lucas_special_n_check_explosion(fighter); + // } + // if !fighter.is_situation(*SITUATION_KIND_GROUND) { + // if !arg.get_bool() { + // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); + // } + // if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { + // KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + // } else { + // KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + // } + // } + // 0.into() + + if !fighter.is_situation(*SITUATION_KIND_GROUND) { + if !arg.get_bool() { + WorkModule::dec_int(fighter.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME); + } + if fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_STOP_Y_TIME) > 0 { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } else { + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + } + 0.into() +} + +unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + // + // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // + // + // let nobang_time = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_NOBANG_TIME); + // if !ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_PK_FREEZE) + // && nobang_time <= 0 + // { + // fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + // return 1.into(); + // } + // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); + // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { + // // else block + // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), + // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + // } + // 1.into() + + /// let charge = "attack_up_charge_time" + /// + /// set_charge(charge) + /// + /// dec_charge() + /// if charge == 0 then IS_ATTACK_UP = true && set_charge(charge) + + if !VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) && fighter.is_button_on(Buttons::Special) { + if VarModule::countdown_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, 0) { + let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL, charge_time); + VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::on_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); + return 1.into(); + } + } else { + fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_END.into(), false.into()); + return 1.into(); + } + let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); + if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { + // else block + lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), + Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); + } + 1.into() +} + +unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( + fighter: &mut L2CFighterCommon, + mtrans_kind_work_id: i32, + flag_work_id: i32, + ground_kinetic_type: i32, + air_kinetic_type: i32, + ground_motion_kind: Hash40, + aerial_motion_kind: Hash40, + ground_correct_kind: i32 +) { + if !fighter.is_situation(*SITUATION_KIND_GROUND) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + KineticModule::change_kinetic(fighter.module_accessor, air_kinetic_type); + if !fighter.is_flag(flag_work_id) { + MotionModule::change_motion(fighter.module_accessor, aerial_motion_kind, 0.0, 1.0, false, 0.0, false, false); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, aerial_motion_kind, -1.0, 1.0, 0.0, false, false); + } + fighter.set_int(*SITUATION_KIND_GROUND, mtrans_kind_work_id); + } else { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(ground_correct_kind)); + KineticModule::change_kinetic(fighter.module_accessor, ground_kinetic_type); + if !fighter.is_flag(flag_work_id) { + MotionModule::change_motion(fighter.module_accessor, ground_motion_kind, 0.0, 1.0, false, 0.0, false, false); + } else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, ground_motion_kind, -1.0, 1.0, 0.0, false, false); + } + fighter.set_int(*SITUATION_KIND_AIR, mtrans_kind_work_id); + } + fighter.on_flag(flag_work_id); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main); +} \ No newline at end of file diff --git a/fighters/luigi/src/acmd/aerials.rs b/fighters/luigi/src/acmd/aerials.rs index 481425b3f6..a3dc857141 100644 --- a/fighters/luigi/src/acmd/aerials.rs +++ b/fighters/luigi/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -23,7 +22,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -53,7 +51,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -85,7 +82,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -122,7 +118,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -181,16 +176,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.000); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/luigi/src/acmd/ground.rs b/fighters/luigi/src/acmd/ground.rs index 2613bd78f9..b70f786bb7 100644 --- a/fighters/luigi/src/acmd/ground.rs +++ b/fighters/luigi/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -20,7 +19,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -42,7 +40,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -133,7 +130,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - } pub fn install(agent: &mut Agent) { @@ -141,5 +137,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/luigi/src/acmd/other.rs b/fighters/luigi/src/acmd/other.rs index 259690c30b..e9c3daa0d5 100644 --- a/fighters/luigi/src/acmd/other.rs +++ b/fighters/luigi/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -137,14 +61,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -158,7 +80,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -169,71 +90,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 5.0); - if is_excute(agent) { - if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { - ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER) { - ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); - ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("catch"), false, 0.0); - ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, -1); - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, (13.0-1.0)/5.0); - } - frame(lua_state, 13.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, 1.0); - GrabModule::set_rebound(boma, true); - SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); - } - frame(lua_state, 14.0); - if is_excute(agent) { - //CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - //ArticleModule::shoot(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } - game_CaptureCutCommon(agent); - wait(lua_state, 2.0); - if is_excute(agent) { - grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); - GrabModule::set_rebound(boma, false); - } - wait(lua_state, 20.0); - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - -} - -unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_luigi_plunger_shoot")); - } -} pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("game_catch", game_catch); - agent.acmd("sound_catch", sound_catch); } diff --git a/fighters/luigi/src/acmd/smashes.rs b/fighters/luigi/src/acmd/smashes.rs index f62a89d649..509a3f5cdc 100644 --- a/fighters/luigi/src/acmd/smashes.rs +++ b/fighters/luigi/src/acmd/smashes.rs @@ -1,23 +1,25 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -27,8 +29,8 @@ unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { frame(lua_state, 12.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); LAST_EFFECT_SET_RATE(agent, 1.25); @@ -44,27 +46,22 @@ unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 42, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 42, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 3.8, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("shoulderl"), 15.0, 52, 119, 0, 20, 4.3, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("shoulderr"), 15.0, 52, 119, 0, 20, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -74,8 +71,8 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { frame(lua_state, 12.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); - EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 8, 0, 0, -5, 0, 1.1, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_NONE); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("luigi_smash_thrust"), Hash40::new("luigi_smash_thrust"), Hash40::new("top"), 0.5, 6.5, 1, -25, 0, 0, 1.1, true, *EF_FLIP_YZ); EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("handl"), 3.0, 0.0, 0.0, 0, 90, 90, 0.175, true); EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0, 90, 90, 1.0, true); LAST_EFFECT_SET_RATE(agent, 1.25); @@ -105,7 +102,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { @@ -154,7 +150,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -184,16 +179,17 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); - agent.acmd("effect_attacks4hi", effect_attacks4hi); agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("effect_attacks4hi", effect_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/luigi/src/acmd/specials.rs b/fighters/luigi/src/acmd/specials.rs index a7d773f596..aa330367db 100644 --- a/fighters/luigi/src/acmd/specials.rs +++ b/fighters/luigi/src/acmd/specials.rs @@ -7,7 +7,6 @@ unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); } - } unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { @@ -31,7 +30,6 @@ unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); } - } unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { @@ -41,7 +39,6 @@ unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); } - } unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { @@ -54,7 +51,6 @@ unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } unsafe extern "C" fn game_specialnthunder(agent: &mut L2CAgentBase) { @@ -300,6 +296,71 @@ unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + wait(lua_state, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); + WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + wait(lua_state, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + } + frame(lua_state, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -330,7 +391,6 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_LW_FLAG_RISE); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { @@ -373,72 +433,6 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_LW_BUOYANCY); AttackModule::clear_all(boma); } - -} - -unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 88, 88, 0, 50, 2.2, 1.2, 6.0, 7.0, Some(-1.2), Some(6.0), Some(7.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BAT, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - wait(lua_state, 1.0); - if is_excute(agent) { - SA_SET(agent, *SITUATION_KIND_AIR); - } - frame(lua_state, 10.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 24.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 80, 0, 40, 2.7, 0.0, 6.0, 5.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("head"), 1.0, 80, 1, 0, 1, 5.8, 2.0, 2.2, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("hip"), 1.0, 80, 1, 0, 1, 4.7, 0.0, 4.8, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_coin"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_COIN, *ATTACK_REGION_PUNCH); - WorkModule::off_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_HI_FLAG_CRITICAL_HIT); - } - wait(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - wait(lua_state, 1.0); - if is_excute(agent) { - SA_SET(agent, *SITUATION_KIND_AIR); - } - frame(lua_state, 10.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 24.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } } pub fn install(agent: &mut Agent) { @@ -450,6 +444,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairn", sound_specialn); agent.acmd("expression_specialn", expression_specialn); agent.acmd("expression_specialairn", expression_specialn); + agent.acmd("game_specialnthunder", game_specialnthunder); agent.acmd("game_specialairnthunder", game_specialnthunder); agent.acmd("effect_specialnthunder", effect_specialnthunder); @@ -458,6 +453,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairnthunder", sound_specialnthunder); agent.acmd("expression_specialnthunder",expression_specialnthunder,); agent.acmd("expression_specialairnthunder",expression_specialnthunder); + agent.acmd("game_specialairsstart", game_specialairsstart); agent.acmd("effect_specialsstart", effect_specialsstart); agent.acmd("effect_specialairsstart", effect_specialsstart); @@ -467,8 +463,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialsdischarge", game_specialsdischarge); agent.acmd("effect_specialsdischarge", effect_specialsdischarge); agent.acmd("game_specialairsend", game_specialairsend); - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/luigi/src/acmd/throws.rs b/fighters/luigi/src/acmd/throws.rs index be56ddc577..8b72a677f5 100644 --- a/fighters/luigi/src/acmd/throws.rs +++ b/fighters/luigi/src/acmd/throws.rs @@ -1,5 +1,60 @@ use super::*; +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE_RANGE(agent, 1.0, 13.0, 5.0); + if is_excute(agent) { + if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU) { + ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + if ArticleModule::is_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER) { + ArticleModule::remove_exist(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, false, -1); + ArticleModule::change_motion(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, smash::phx::Hash40::new("catch"), false, 0.0); + ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, -1); + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, (13.0-1.0)/5.0); + } + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ArticleModule::set_rate(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_OBAKYUMU, 1.0); + GrabModule::set_rebound(boma, true); + SEARCH(agent, 0, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_NORMAL, 1, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_BODY_HEAD, false); + } + frame(lua_state, 14.0); + if is_excute(agent) { + //CATCH(fighter, 0, Hash40::new("throw"), 3.0, 0.0, 0.0, -1.5, None, None, None, *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + CATCH(agent, 0, Hash40::new("top"), 3.5, 0.0, 6.6, 1.0, Some(0.0), Some(6.6), Some(9.0), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + //ArticleModule::shoot(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } + game_CaptureCutCommon(agent); + wait(lua_state, 2.0); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); + GrabModule::set_rebound(boma, false); + } + wait(lua_state, 20.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_PLUNGER, false, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_luigi_plunger_shoot")); + } +} + unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -53,10 +108,13 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("sound_catch", sound_catch); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/luigi/src/acmd/tilts.rs b/fighters/luigi/src/acmd/tilts.rs index ed8a96fe0a..d51330b4f7 100644 --- a/fighters/luigi/src/acmd/tilts.rs +++ b/fighters/luigi/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -14,10 +13,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -30,7 +28,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -47,7 +44,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -63,7 +59,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -79,13 +74,14 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/luigi/src/obakyumu/acmd.rs b/fighters/luigi/src/obakyumu/acmd.rs index 4b3f0bdb15..75e0a2aaaf 100644 --- a/fighters/luigi/src/obakyumu/acmd.rs +++ b/fighters/luigi/src/obakyumu/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -8,6 +9,7 @@ unsafe extern "C" fn effect_catch(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_RATE(agent, 0.75); } } + pub fn install(agent: &mut Agent) { agent.acmd("effect_catch", effect_catch); } diff --git a/fighters/luigi/src/opff.rs b/fighters/luigi/src/opff.rs index e885cc361b..db3ec306b8 100644 --- a/fighters/luigi/src/opff.rs +++ b/fighters/luigi/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn luigi_missle_ledgegrab(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_END) { if StatusModule::is_changing(fighter.module_accessor) { diff --git a/fighters/luigi/src/status/special_n.rs b/fighters/luigi/src/status/special_n.rs index 6d5ba80ad0..e03f5b6344 100644 --- a/fighters/luigi/src/status/special_n.rs +++ b/fighters/luigi/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { From e18513ccc2c457df1398f9f642096877adaad643 Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 14:21:23 -0500 Subject: [PATCH 150/172] m cleanup --- fighters/mario/src/acmd/aerials.rs | 36 ++-- fighters/mario/src/acmd/ground.rs | 21 +-- fighters/mario/src/acmd/other.rs | 34 ++-- fighters/mario/src/acmd/smashes.rs | 32 ++-- fighters/mario/src/acmd/specials.rs | 72 ++++---- fighters/mario/src/acmd/throws.rs | 18 +- fighters/mario/src/acmd/tilts.rs | 35 ++-- fighters/mario/src/fireball/acmd.rs | 2 +- fighters/mario/src/pump/acmd.rs | 6 +- fighters/mario/src/pumpwater/acmd.rs | 30 +--- fighters/mario/src/status.rs | 60 +------ fighters/mario/src/status/rebirth.rs | 16 ++ fighters/mario/src/status/special_lw.rs | 41 +++++ fighters/mario/src/status/special_n.rs | 3 +- fighters/mariod/src/acmd/aerials.rs | 8 +- fighters/mariod/src/acmd/ground.rs | 5 +- fighters/mariod/src/acmd/other.rs | 5 +- fighters/mariod/src/acmd/smashes.rs | 40 ++--- fighters/mariod/src/acmd/specials.rs | 7 +- fighters/mariod/src/acmd/throws.rs | 7 +- fighters/mariod/src/acmd/tilts.rs | 23 ++- fighters/mariod/src/status.rs | 25 +-- fighters/mariod/src/status/rebirth.rs | 16 ++ fighters/mariod/src/status/special_n.rs | 3 +- fighters/metaknight/src/acmd/aerials.rs | 6 +- fighters/metaknight/src/acmd/ground.rs | 2 +- fighters/metaknight/src/acmd/other.rs | 2 - fighters/metaknight/src/acmd/smashes.rs | 7 +- fighters/metaknight/src/acmd/specials.rs | 157 +++++++++--------- fighters/metaknight/src/acmd/throws.rs | 8 +- fighters/metaknight/src/acmd/tilts.rs | 9 +- fighters/metaknight/src/opff.rs | 1 - fighters/metaknight/src/status/attack_100.rs | 3 +- fighters/metaknight/src/status/special_s.rs | 1 - fighters/mewtwo/src/acmd/aerials.rs | 8 +- fighters/mewtwo/src/acmd/ground.rs | 4 +- fighters/mewtwo/src/acmd/other.rs | 4 - fighters/mewtwo/src/acmd/smashes.rs | 22 +-- fighters/mewtwo/src/acmd/specials.rs | 4 +- fighters/mewtwo/src/acmd/throws.rs | 4 +- fighters/mewtwo/src/acmd/tilts.rs | 58 +++---- fighters/mewtwo/src/opff.rs | 1 - fighters/mewtwo/src/status.rs | 3 +- fighters/mewtwo/src/status/attack_air.rs | 2 - fighters/mewtwo/src/status/float.rs | 1 - fighters/miifighter/src/acmd/aerials.rs | 8 +- fighters/miifighter/src/acmd/ground.rs | 1 + fighters/miifighter/src/acmd/other.rs | 3 - fighters/miifighter/src/acmd/smashes.rs | 42 ++--- fighters/miifighter/src/acmd/specials.rs | 10 +- fighters/miifighter/src/acmd/throws.rs | 6 +- fighters/miifighter/src/acmd/tilts.rs | 9 +- fighters/miigunner/src/acmd/aerials.rs | 6 - fighters/miigunner/src/acmd/ground.rs | 1 + fighters/miigunner/src/acmd/other.rs | 4 +- fighters/miigunner/src/acmd/smashes.rs | 5 +- fighters/miigunner/src/acmd/specials.rs | 5 - fighters/miigunner/src/acmd/tilts.rs | 2 + fighters/miigunner/src/opff.rs | 29 ---- fighters/miigunner/src/status.rs | 14 +- fighters/miigunner/src/supermissile/mod.rs | 2 + fighters/miigunner/src/supermissile/opff.rs | 34 ++++ fighters/miiswordsman/src/acmd/aerials.rs | 5 +- fighters/miiswordsman/src/acmd/ground.rs | 5 +- fighters/miiswordsman/src/acmd/other.rs | 94 ++--------- fighters/miiswordsman/src/acmd/smashes.rs | 5 +- fighters/miiswordsman/src/acmd/specials.rs | 24 ++- fighters/miiswordsman/src/acmd/throws.rs | 8 +- fighters/miiswordsman/src/acmd/tilts.rs | 4 +- fighters/miiswordsman/src/lib.rs | 4 +- fighters/miiswordsman/src/opff.rs | 7 - fighters/miiswordsman/src/status.rs | 4 + fighters/miiswordsman/src/tornado/mod.rs | 9 - .../src/{tornado => tornadoshot}/acmd.rs | 4 +- fighters/miiswordsman/src/tornadoshot/mod.rs | 11 ++ fighters/miiswordsman/src/tornadoshot/opff.rs | 14 ++ fighters/murabito/src/acmd/aerials.rs | 10 +- fighters/murabito/src/acmd/ground.rs | 1 - fighters/murabito/src/acmd/other.rs | 6 +- fighters/murabito/src/acmd/smashes.rs | 5 +- fighters/murabito/src/acmd/specials.rs | 4 +- fighters/murabito/src/acmd/throws.rs | 3 + fighters/murabito/src/acmd/tilts.rs | 6 +- fighters/murabito/src/bowlingball/acmd.rs | 2 + fighters/murabito/src/bullet/acmd.rs | 2 + fighters/murabito/src/clayrocket/acmd.rs | 3 +- fighters/murabito/src/clayrocket/mod.rs | 2 + fighters/murabito/src/clayrocket/opff.rs | 14 ++ fighters/murabito/src/firework/acmd.rs | 1 + fighters/murabito/src/flowerpot/acmd.rs | 1 + fighters/murabito/src/flowerpot/mod.rs | 2 + fighters/murabito/src/flowerpot/opff.rs | 16 ++ fighters/murabito/src/opff.rs | 15 -- fighters/murabito/src/slingshot/acmd.rs | 13 +- fighters/murabito/src/status.rs | 112 ++----------- fighters/murabito/src/status/attack_air.rs | 40 +++++ fighters/murabito/src/status/jump.rs | 50 ++++++ fighters/murabito/src/status/special_s.rs | 12 ++ 98 files changed, 740 insertions(+), 811 deletions(-) create mode 100644 fighters/mario/src/status/rebirth.rs create mode 100644 fighters/mario/src/status/special_lw.rs create mode 100644 fighters/mariod/src/status/rebirth.rs create mode 100644 fighters/miigunner/src/supermissile/opff.rs delete mode 100644 fighters/miiswordsman/src/tornado/mod.rs rename fighters/miiswordsman/src/{tornado => tornadoshot}/acmd.rs (90%) create mode 100644 fighters/miiswordsman/src/tornadoshot/mod.rs create mode 100644 fighters/miiswordsman/src/tornadoshot/opff.rs create mode 100644 fighters/murabito/src/clayrocket/opff.rs create mode 100644 fighters/murabito/src/flowerpot/opff.rs create mode 100644 fighters/murabito/src/status/attack_air.rs create mode 100644 fighters/murabito/src/status/jump.rs create mode 100644 fighters/murabito/src/status/special_s.rs diff --git a/fighters/mario/src/acmd/aerials.rs b/fighters/mario/src/acmd/aerials.rs index 0ea81e68e5..51a0b45a03 100644 --- a/fighters/mario/src/acmd/aerials.rs +++ b/fighters/mario/src/acmd/aerials.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -126,7 +125,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -172,7 +170,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -196,7 +193,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -242,22 +238,22 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.game_acmd("game_attackairn", game_attackairn); - agent.game_acmd("game_attackairf", game_attackairf); - agent.effect_acmd("effect_attackairf", effect_attackairf); - agent.game_acmd("game_attackairb", game_attackairb); - agent.effect_acmd("effect_attackairb", effect_attackairb); - agent.game_acmd("game_attackairhi", game_attackairhi); - agent.game_acmd("game_attackairlw", game_attackairlw); - agent.effect_acmd("effect_attackairlw", effect_attackairlw); - agent.sound_acmd("sound_attackairlw", sound_attackairlw); - agent.expression_acmd("expression_attackairlw", expression_attackairlw); - agent.game_acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("expression_attackairlw", expression_attackairlw); + agent.acmd("game_landingairlw", null); } diff --git a/fighters/mario/src/acmd/ground.rs b/fighters/mario/src/acmd/ground.rs index eacd617018..aa3719df50 100644 --- a/fighters/mario/src/acmd/ground.rs +++ b/fighters/mario/src/acmd/ground.rs @@ -19,7 +19,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { @@ -58,7 +57,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { @@ -91,7 +89,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { @@ -160,16 +157,16 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_attack11", game_attack11); - agent.effect_acmd("effect_attack11", effect_attack11); - agent.game_acmd("game_attack12", game_attack12); - agent.effect_acmd("effect_attack12", effect_attack12); - agent.game_acmd("game_attack13", game_attack13); - agent.effect_acmd("effect_attack13", effect_attack13); - agent.expression_acmd("expression_attack13", expression_attack13); - agent.game_acmd("game_attackdash", game_attackdash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("effect_attack11", effect_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("effect_attack12", effect_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("effect_attack13", effect_attack13); + agent.acmd("expression_attack13", expression_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mario/src/acmd/other.rs b/fighters/mario/src/acmd/other.rs index 74365489d1..9d8989ddd9 100644 --- a/fighters/mario/src/acmd/other.rs +++ b/fighters/mario/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -48,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -78,7 +76,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -169,18 +166,21 @@ unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.sound_acmd("sound_damageflyhi", sound_damagefly); - agent.sound_acmd("sound_damageflylw", sound_damagefly); - agent.sound_acmd("sound_damageflyn", sound_damagefly); - agent.sound_acmd("sound_damageflytop", sound_damagefly); - agent.sound_acmd("sound_damageflyroll", sound_damageflyroll); - agent.game_acmd("game_dash", game_dash); - agent.sound_acmd("sound_dash", sound_dash); - agent.game_acmd("game_turndash", game_turndash); - agent.game_acmd("game_escapeair", game_escapeair); - agent.game_acmd("game_escapeairslide", game_escapeairslide); - agent.game_acmd("game_appealsl", game_appealsl); - agent.game_acmd("game_appealsr", game_appealsr); - agent.expression_acmd("expression_appealsl", expression_appeals); - agent.expression_acmd("expression_appealsr", expression_appeals); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("game_appealsl", game_appealsl); + agent.acmd("game_appealsr", game_appealsr); + agent.acmd("expression_appealsl", expression_appeals); + agent.acmd("expression_appealsr", expression_appeals); } diff --git a/fighters/mario/src/acmd/smashes.rs b/fighters/mario/src/acmd/smashes.rs index 466f08dfc6..eb41e46f98 100644 --- a/fighters/mario/src/acmd/smashes.rs +++ b/fighters/mario/src/acmd/smashes.rs @@ -1,9 +1,12 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); @@ -14,16 +17,11 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 14.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); @@ -34,7 +32,6 @@ unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -54,7 +51,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -89,7 +85,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { JostleModule::set_status(boma, true); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -137,14 +132,15 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_attacks4hi", game_attacks4hi); - agent.game_acmd("game_attacks4", game_attacks4s); - agent.game_acmd("game_attacks4lw", game_attacks4lw); - agent.game_acmd("game_attackhi4", game_attackhi4); - agent.effect_acmd("effect_attackhi4", effect_attackhi4); - agent.game_acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("effect_attackhi4", effect_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mario/src/acmd/specials.rs b/fighters/mario/src/acmd/specials.rs index 871dd70523..93129ccbaf 100644 --- a/fighters/mario/src/acmd/specials.rs +++ b/fighters/mario/src/acmd/specials.rs @@ -16,7 +16,6 @@ unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 21.0, 49.0, 23.0); frame(lua_state, 49.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } - } unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { @@ -365,7 +363,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); } } - } unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { @@ -447,7 +444,6 @@ unsafe extern "C" fn game_speciallwlight(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); - } unsafe extern "C" fn effect_speciallwlight(agent: &mut L2CAgentBase) { @@ -496,7 +492,6 @@ unsafe extern "C" fn sound_speciallwlight(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("vc_mario_attack05")); PLAY_SE(agent, Hash40::new("se_mario_attackair_l01")); } - } unsafe extern "C" fn expression_speciallwlight(agent: &mut L2CAgentBase) { @@ -511,7 +506,6 @@ unsafe extern "C" fn expression_speciallwlight(agent: &mut L2CAgentBase) { } ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } unsafe extern "C" fn game_specialairlwlight(agent: &mut L2CAgentBase) { @@ -562,7 +556,6 @@ unsafe extern "C" fn game_specialairlwlight(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 48.0, 52.0, 7.0); frame(lua_state, 52.0); FT_MOTION_RATE_RANGE(agent, 52.0, 95.0, 35.0); - } } @@ -614,7 +607,6 @@ unsafe extern "C" fn effect_specialairlwlight(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_ALPHA(agent, 0.2); EFFECT_FOLLOW(agent, Hash40::new("sys_starrod_splash"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, true); LAST_EFFECT_SET_ALPHA(agent, 0.2); - } } } @@ -638,34 +630,38 @@ unsafe extern "C" fn sound_specialairlwlight(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_specialn", game_specialn); - agent.game_acmd("game_specialairn", game_specialn); - agent.effect_acmd("effect_specialn", effect_specialn); - agent.effect_acmd("effect_specialairn", effect_specialn); - agent.sound_acmd("sound_specialn", sound_specialn); - agent.sound_acmd("sound_specialairn", sound_specialn); - agent.expression_acmd("expression_specialn", expression_specialn); - agent.expression_acmd("expression_specialairn", expression_specialn); - agent.game_acmd("game_specialnfire", game_specialnfire); - agent.game_acmd("game_specialairnfire", game_specialnfire); - agent.effect_acmd("effect_specialnfire", effect_specialnfire); - agent.effect_acmd("effect_specialairnfire", effect_specialnfire); - agent.sound_acmd("sound_specialnfire", sound_specialnfire); - agent.sound_acmd("sound_specialairnfire", sound_specialnfire); - agent.expression_acmd("expression_specialnfire", expression_specialnfire); - agent.expression_acmd("expression_specialairnfire", expression_specialnfire); - agent.game_acmd("game_specials", game_specials); - agent.game_acmd("game_specialairs", game_specialairs); - agent.game_acmd("game_specialhi", game_specialhi); - agent.game_acmd("game_specialairhi", game_specialhi); - agent.effect_acmd("effect_specialhi", effect_specialhi); - agent.effect_acmd("effect_specialairhi", effect_specialairhi); - agent.game_acmd("game_speciallwlight", game_speciallwlight); - agent.effect_acmd("effect_speciallwlight", effect_speciallwlight); - agent.sound_acmd("sound_speciallwlight", sound_speciallwlight); - agent.expression_acmd("expression_speciallwlight", expression_speciallwlight); - agent.expression_acmd("expression_specialairlwlight", expression_speciallwlight); - agent.game_acmd("game_specialairlwlight", game_specialairlwlight); - agent.effect_acmd("effect_specialairlwlight", effect_specialairlwlight); - agent.sound_acmd("sound_specialairlwlight", sound_specialairlwlight); + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + + agent.acmd("game_specialnfire", game_specialnfire); + agent.acmd("game_specialairnfire", game_specialnfire); + agent.acmd("effect_specialnfire", effect_specialnfire); + agent.acmd("effect_specialairnfire", effect_specialnfire); + agent.acmd("sound_specialnfire", sound_specialnfire); + agent.acmd("sound_specialairnfire", sound_specialnfire); + agent.acmd("expression_specialnfire", expression_specialnfire); + agent.acmd("expression_specialairnfire", expression_specialnfire); + + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialairs", game_specialairs); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("effect_specialairhi", effect_specialairhi); + + agent.acmd("game_speciallwlight", game_speciallwlight); + agent.acmd("effect_speciallwlight", effect_speciallwlight); + agent.acmd("sound_speciallwlight", sound_speciallwlight); + agent.acmd("expression_speciallwlight", expression_speciallwlight); + agent.acmd("expression_specialairlwlight", expression_speciallwlight); + agent.acmd("game_specialairlwlight", game_specialairlwlight); + agent.acmd("effect_specialairlwlight", effect_specialairlwlight); + agent.acmd("sound_specialairlwlight", sound_specialairlwlight); } diff --git a/fighters/mario/src/acmd/throws.rs b/fighters/mario/src/acmd/throws.rs index 857706d76f..fbb5f211fc 100644 --- a/fighters/mario/src/acmd/throws.rs +++ b/fighters/mario/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -42,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -63,7 +61,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { @@ -150,15 +147,14 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_catch", game_catch); - agent.game_acmd("game_catchdash", game_catchdash); - agent.game_acmd("game_catchturn", game_catchturn); - agent.game_acmd("game_throwf", game_throwf); - agent.game_acmd("game_throwb", game_throwb); - agent.game_acmd("game_throwhi", game_throwhi); - agent.game_acmd("game_throwlw", game_throwlw); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mario/src/acmd/tilts.rs b/fighters/mario/src/acmd/tilts.rs index 1c39052cf7..59b002c602 100644 --- a/fighters/mario/src/acmd/tilts.rs +++ b/fighters/mario/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -13,15 +13,14 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); if is_excute(agent) { @@ -29,7 +28,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -42,15 +41,14 @@ unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); if is_excute(agent) { @@ -72,7 +70,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -107,7 +104,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -124,16 +120,17 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_attacks3hi", game_attacks3hi); - agent.effect_acmd("effect_attacks3hi", effect_attacks3hi); - agent.game_acmd("game_attacks3", game_attacks3s); - agent.effect_acmd("effect_attacks3", effect_attacks3s); - agent.game_acmd("game_attacks3lw", game_attacks3lw); - agent.effect_acmd("effect_attacks3lw", effect_attacks3lw); - agent.game_acmd("game_attackhi3", game_attackhi3); - agent.game_acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("effect_attacks3lw", effect_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/mario/src/fireball/acmd.rs b/fighters/mario/src/fireball/acmd.rs index 80b2e0290e..25728e1d03 100644 --- a/fighters/mario/src/fireball/acmd.rs +++ b/fighters/mario/src/fireball/acmd.rs @@ -18,5 +18,5 @@ unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.game_acmd("game_regular", game_regular); + agent.acmd("game_regular", game_regular); } \ No newline at end of file diff --git a/fighters/mario/src/pump/acmd.rs b/fighters/mario/src/pump/acmd.rs index 64b83e17d8..62107595aa 100644 --- a/fighters/mario/src/pump/acmd.rs +++ b/fighters/mario/src/pump/acmd.rs @@ -1,9 +1,7 @@ use super::*; -unsafe extern "C" fn effect_light(agent: &mut L2CAgentBase) { - -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.effect_acmd("effect_light", effect_light); + agent.acmd("effect_light", null); } \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd.rs b/fighters/mario/src/pumpwater/acmd.rs index 7963891209..8a336dd9a0 100644 --- a/fighters/mario/src/pumpwater/acmd.rs +++ b/fighters/mario/src/pumpwater/acmd.rs @@ -1,29 +1,11 @@ use super::*; -unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn effect_regular(agent: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn sound_regular(agent: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn effect_hit(agent: &mut L2CAgentBase) { - -} - -unsafe extern "C" fn effect_clash(agent: &mut L2CAgentBase) { - -} +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.game_acmd("game_regular", game_regular); - agent.effect_acmd("effect_regular", effect_regular); - agent.sound_acmd("sound_regular", sound_regular); - agent.effect_acmd("effect_hit", effect_hit); - agent.effect_acmd("effect_clash", effect_clash); + agent.acmd("game_regular", null); + agent.acmd("effect_regular", null); + agent.acmd("sound_regular", null); + agent.acmd("effect_hit", null); + agent.acmd("effect_clash", null); } \ No newline at end of file diff --git a/fighters/mario/src/status.rs b/fighters/mario/src/status.rs index afa7561d70..0d5dd715ff 100644 --- a/fighters/mario/src/status.rs +++ b/fighters/mario/src/status.rs @@ -3,6 +3,8 @@ use globals::*; // status script import mod special_n; +mod special_lw; +mod rebirth; unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { // Reset cape stall flag on landing or ledgegrab @@ -13,60 +15,14 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn mario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_MARIO { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT); - return 1.into() -} - -unsafe extern "C" fn special_lw_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings(fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_LW as u32, - 0 - ); - - return 0.into() -} - -unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - EffectModule::remove_post_effect_line(fighter.module_accessor, 0x1e, true); - fighter.status_end_Rebirth(); - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + special_n::install(agent); - agent.on_start(mario_init); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); - agent.status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end); + special_lw::install(agent); + rebirth::install(agent); } diff --git a/fighters/mario/src/status/rebirth.rs b/fighters/mario/src/status/rebirth.rs new file mode 100644 index 0000000000..3f9cac1aa9 --- /dev/null +++ b/fighters/mario/src/status/rebirth.rs @@ -0,0 +1,16 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + EffectModule::remove_post_effect_line(fighter.module_accessor, 0x1e, true); + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end); +} diff --git a/fighters/mario/src/status/special_lw.rs b/fighters/mario/src/status/special_lw.rs new file mode 100644 index 0000000000..94ada36752 --- /dev/null +++ b/fighters/mario/src/status/special_lw.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT); + return 1.into() +} + +unsafe extern "C" fn special_lw_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings(fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_LW | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_LW as u32, + 0 + ); + + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Pre, *FIGHTER_MARIO_STATUS_KIND_SPECIAL_LW_SHOOT, special_lw_shoot_pre); +} diff --git a/fighters/mario/src/status/special_n.rs b/fighters/mario/src/status/special_n.rs index 30d28f8bac..ca63676638 100644 --- a/fighters/mario/src/status/special_n.rs +++ b/fighters/mario/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/mariod/src/acmd/aerials.rs b/fighters/mariod/src/acmd/aerials.rs index 92f3499589..07c6cc3bef 100644 --- a/fighters/mariod/src/acmd/aerials.rs +++ b/fighters/mariod/src/acmd/aerials.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -62,7 +61,6 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -95,7 +93,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -247,7 +244,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -285,12 +281,16 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/mariod/src/acmd/ground.rs b/fighters/mariod/src/acmd/ground.rs index 9c9232ec5a..25ce4a09ee 100644 --- a/fighters/mariod/src/acmd/ground.rs +++ b/fighters/mariod/src/acmd/ground.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { @@ -86,7 +84,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { @@ -155,7 +152,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } pub fn install(agent: &mut Agent) { @@ -166,5 +162,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); agent.acmd("expression_attack13", expression_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/mariod/src/acmd/other.rs b/fighters/mariod/src/acmd/other.rs index 8bee90c9cb..2d9243f051 100644 --- a/fighters/mariod/src/acmd/other.rs +++ b/fighters/mariod/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -68,7 +67,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -230,10 +228,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("sound_jumpback", sound_jumpback); agent.acmd("sound_jumpfront", sound_jumpfront); agent.acmd("sound_jumpbackmini", sound_jumpbackmini); diff --git a/fighters/mariod/src/acmd/smashes.rs b/fighters/mariod/src/acmd/smashes.rs index e517afe53b..611a8ba867 100644 --- a/fighters/mariod/src/acmd/smashes.rs +++ b/fighters/mariod/src/acmd/smashes.rs @@ -1,8 +1,12 @@ use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); @@ -13,10 +17,9 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -29,15 +32,15 @@ unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.0); @@ -54,13 +57,9 @@ unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("shoulderr"), 16.0, 361, 95, 0, 25, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); @@ -71,10 +70,9 @@ unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks4s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -87,15 +85,15 @@ unsafe extern "C" fn effect_attacks4s(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 9, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("mariod_smash_wind"), Hash40::new("top"), 0, 10, 11, -25, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 14.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, 0, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 7, -1, -15, -2, 0, 0.8, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); } frame(lua_state, 15.0); if is_excute(agent) { - EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 8, 9, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); + EFFECT_FLIP(agent, Hash40::new("mariod_smash_impact"), Hash40::new("mariod_smash_impact"), Hash40::new("top"), 1, 10, 8.75, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 0.85); } frame(lua_state, 16.0); @@ -129,7 +127,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { @@ -212,7 +209,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { JostleModule::set_status(boma, true); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -249,7 +245,6 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -279,7 +274,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -324,14 +318,16 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("effect_attacks4hi", effect_attacks4hi); - agent.acmd("game_attacks4", game_attacks4s); - agent.acmd("effect_attacks4", effect_attacks4s); agent.acmd("game_attacks4lw", game_attacks4lw); agent.acmd("effect_attacks4lw", effect_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/mariod/src/acmd/specials.rs b/fighters/mariod/src/acmd/specials.rs index b93a2cef2f..2ac59119d0 100644 --- a/fighters/mariod/src/acmd/specials.rs +++ b/fighters/mariod/src/acmd/specials.rs @@ -155,7 +155,6 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { } frame(lua_state, 46.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { @@ -235,7 +234,6 @@ unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { } frame(lua_state, 46.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { @@ -618,6 +616,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairn", effect_specialn); agent.acmd("sound_specialn", sound_specialn); agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("game_specialnchill", game_specialnchill); agent.acmd("game_specialairnchill", game_specialnchill); agent.acmd("effect_specialnchill", effect_specialnchill); @@ -626,15 +625,19 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairnchill", sound_specialnchill); agent.acmd("expression_specialnchill", expression_specialnchill); agent.acmd("expression_specialairnchill", expression_specialnchill); + agent.acmd("game_specials", game_specials); agent.acmd("effect_specials", effect_specials); agent.acmd("game_specialairs", game_specialairs); agent.acmd("effect_specialairs", effect_specialairs); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("effect_specialhi", effect_specialhi); agent.acmd("game_specialairhi", game_specialairhi); agent.acmd("effect_specialairhi", effect_specialairhi); + agent.acmd("game_landingfallspecial", game_landingfallspecial); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); agent.acmd("game_specialairlw", game_specialairlw); diff --git a/fighters/mariod/src/acmd/throws.rs b/fighters/mariod/src/acmd/throws.rs index 2476add8e5..b1ef2233e5 100644 --- a/fighters/mariod/src/acmd/throws.rs +++ b/fighters/mariod/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -111,7 +110,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -149,15 +147,18 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mariod/src/acmd/tilts.rs b/fighters/mariod/src/acmd/tilts.rs index d72b1f6879..b3f7e01e81 100644 --- a/fighters/mariod/src/acmd/tilts.rs +++ b/fighters/mariod/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -13,15 +13,14 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); if is_excute(agent) { @@ -29,7 +28,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -42,15 +41,14 @@ unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 5, 9.0, 10, -39, 154, 0.95, true, *EF_FLIP_YZ); + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 7, 7.5, 30, -60, 135, 0.95, true, *EF_FLIP_YZ); } frame(lua_state, 5.0); if is_excute(agent) { @@ -72,7 +70,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -107,7 +104,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -124,7 +120,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -142,13 +137,15 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("effect_attacks3hi", effect_attacks3hi); - agent.acmd("game_attacks3", game_attacks3s); - agent.acmd("effect_attacks3", effect_attacks3s); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/mariod/src/status.rs b/fighters/mariod/src/status.rs index f4bd6bd874..0ad612ba3d 100644 --- a/fighters/mariod/src/status.rs +++ b/fighters/mariod/src/status.rs @@ -3,6 +3,7 @@ use globals::*; // status script import mod special_n; +mod rebirth; unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { // Reset cape stall flag on landing or ledgegrab @@ -13,27 +14,13 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn mariod_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_MARIOD { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn mariod_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - fighter.status_end_Rebirth(); - 0.into() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - special_n::install(agent); - agent.on_start(mariod_init); - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, mariod_rebirth_end); + agent.on_start(on_start); - // Pill Fix for respawn platform - let _ = skyline::patching::Patch::in_text(0xcc9e34).data(0x14000047u32); + special_n::install(agent); + rebirth::install(agent); } diff --git a/fighters/mariod/src/status/rebirth.rs b/fighters/mariod/src/status/rebirth.rs new file mode 100644 index 0000000000..31804d04a2 --- /dev/null +++ b/fighters/mariod/src/status/rebirth.rs @@ -0,0 +1,16 @@ +use super::*; + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); + + // Pill Fix for respawn platform + let _ = skyline::patching::Patch::in_text(0xcc9e34).data(0x14000047u32); +} diff --git a/fighters/mariod/src/status/special_n.rs b/fighters/mariod/src/status/special_n.rs index edde53e003..49a2eeeb81 100644 --- a/fighters/mariod/src/status/special_n.rs +++ b/fighters/mariod/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/metaknight/src/acmd/aerials.rs b/fighters/metaknight/src/acmd/aerials.rs index 630923c803..3297998682 100644 --- a/fighters/metaknight/src/acmd/aerials.rs +++ b/fighters/metaknight/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -31,7 +30,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { @@ -277,14 +275,18 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); agent.acmd("sound_attackairf", sound_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("sound_attackairb", sound_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/metaknight/src/acmd/ground.rs b/fighters/metaknight/src/acmd/ground.rs index 4a2970b3ed..b0ef051c09 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -191,12 +191,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack100", game_attack100); agent.acmd("effect_attack100", effect_attack100); agent.acmd("sound_attack100start", sound_attack100start); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index df09d0ca75..fc45f98b6b 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/metaknight/src/acmd/smashes.rs b/fighters/metaknight/src/acmd/smashes.rs index 96f21a3693..27288629c9 100644 --- a/fighters/metaknight/src/acmd/smashes.rs +++ b/fighters/metaknight/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -17,7 +16,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { @@ -80,7 +78,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -108,7 +105,6 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -135,7 +131,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -161,8 +156,10 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); } diff --git a/fighters/metaknight/src/acmd/specials.rs b/fighters/metaknight/src/acmd/specials.rs index a7ce4a04a3..83a941dc64 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnspin(agent: &mut L2CAgentBase) { @@ -9,7 +8,6 @@ unsafe extern "C" fn game_specialnspin(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 8.0, 0.0, 11.0, 5.0, Some(0.0), Some(11.0), Some(-5.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); ATTACK(agent, 2, 0, Hash40::new("top"), 1.0, 367, 0, 0, 40, 9.0, 0.0, 8.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } - } unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { @@ -69,6 +67,76 @@ unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_specialairsfinish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, true); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + MotionModule::set_rate(boma, 2.0); + } +} + +unsafe extern "C" fn game_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + JostleModule::set_status(boma, false); + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); + } +} + +unsafe extern "C" fn effect_specialsdrill(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 2.0); + for i in 1..8 { + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); + } + } + frame(lua_state, 43.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); + } +} + unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -292,7 +360,6 @@ unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallwsubf(agent: &mut L2CAgentBase) { @@ -307,7 +374,6 @@ unsafe extern "C" fn game_speciallwsubf(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_METAKNIGHT_STATUS_SPECIAL_LW_ATTACK_FLAG_SITUATION_CHANGE); } - } unsafe extern "C" fn game_specialairlwf(agent: &mut L2CAgentBase) { @@ -384,7 +450,6 @@ unsafe extern "C" fn game_speciallwb(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallwsubb(agent: &mut L2CAgentBase) { @@ -431,7 +496,6 @@ unsafe extern "C" fn game_specialairlwb(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallwsubairb(agent: &mut L2CAgentBase) { @@ -448,76 +512,6 @@ unsafe extern "C" fn game_speciallwsubairb(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairsfinish(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - JostleModule::set_status(boma, true); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 5.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 10.0, 70, 60, 0, 80, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 70, 60, 0, 40, 8.0, 0.0, 6.5, 1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - MotionModule::set_rate(boma, 2.0); - } -} - -unsafe extern "C" fn game_specialsdrill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - JostleModule::set_status(boma, false); - ATTACK(agent, 0, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 5.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 1.1, 367, 50, 30, 80, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 367, 50, 30, 80, 6.0, 0.0, 6.5, 1.0, None, None, None, 0.6, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); - } -} - -unsafe extern "C" fn effect_specialsdrill(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("metaknight_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 2.0); - for i in 1..8 { - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 20, 90, 0, 0, 0.5, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 15, 90, 0, 0, 0.8, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 10, 90, 0, 0, 1.1, 0, 0, 10, 20, 15, 360, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_spin_wind_s"), Hash40::new("rot"), 0, 0, 5, 90, 0, 0, 1.4, 0, 0, 10, 20, 15, 360, true); - } - } - frame(lua_state, 43.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("metaknight_drilllush_end"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("metaknight_drilllush_end_wind"), Hash40::new("haver"), 0, 16, 0, 0, 0, 0, 1, false); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_specialnspin", game_specialnspin); agent.acmd("game_specialairnend", game_specialnend); @@ -526,10 +520,17 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialnspingroundeffect", effect_specialnspingroundeffect); agent.acmd("effect_specialnstart", effect_specialnstart); agent.acmd("effect_specialairnend", effect_specialairnend); + + agent.acmd("game_specialairsfinish", game_specialairsfinish); + agent.acmd("game_specialsend", game_specialairsfinish); + agent.acmd("game_specialsdrill", game_specialsdrill); + agent.acmd("effect_specialsdrill", effect_specialsdrill); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialhiloop", game_specialhiloop); agent.acmd("effect_specialhiloop", effect_specialhiloop); agent.acmd("effect_specialhi", effect_specialhi); + agent.acmd("game_speciallwf", game_speciallwf); agent.acmd("game_speciallwsubf", game_speciallwsubf); agent.acmd("game_specialairlwf", game_specialairlwf); @@ -538,8 +539,4 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_speciallwsubb", game_speciallwsubb); agent.acmd("game_specialairlwb", game_specialairlwb); agent.acmd("game_speciallwsubairb", game_speciallwsubairb); - agent.acmd("game_specialairsfinish", game_specialairsfinish); - agent.acmd("game_specialsend", game_specialairsfinish); - agent.acmd("game_specialsdrill", game_specialsdrill); - agent.acmd("effect_specialsdrill", effect_specialsdrill); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/throws.rs b/fighters/metaknight/src/acmd/throws.rs index 13eda22739..cb55cdae00 100644 --- a/fighters/metaknight/src/acmd/throws.rs +++ b/fighters/metaknight/src/acmd/throws.rs @@ -19,7 +19,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -41,7 +40,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -63,7 +61,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { @@ -89,7 +86,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -184,8 +180,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/metaknight/src/acmd/tilts.rs b/fighters/metaknight/src/acmd/tilts.rs index 2771991e80..c64e7e036e 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn metaknight_attack_s3_s_game(agent: &mut L2CAgentBase) { @@ -19,7 +18,6 @@ unsafe extern "C" fn metaknight_attack_s3_s_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { @@ -63,7 +61,6 @@ unsafe extern "C" fn metaknight_attack_s3_s2_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn metaknight_attack_s3_s3_game(agent: &mut L2CAgentBase) { @@ -78,7 +75,6 @@ unsafe extern "C" fn metaknight_attack_s3_s3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn metaknight_attack_hi3_game(agent: &mut L2CAgentBase) { @@ -104,7 +100,6 @@ unsafe extern "C" fn metaknight_attack_hi3_game(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn metaknight_attack_hi3_expression(agent: &mut L2CAgentBase) { @@ -130,7 +125,6 @@ unsafe extern "C" fn metaknight_attack_hi3_expression(agent: &mut L2CAgentBase) if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); } - } unsafe extern "C" fn metaknight_attack_lw3_game(agent: &mut L2CAgentBase) { @@ -150,7 +144,6 @@ unsafe extern "C" fn metaknight_attack_lw3_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.75); frame(lua_state, 22.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -175,8 +168,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("game_attacks3s2", metaknight_attack_s3_s2_game); agent.acmd("game_attacks3s3", metaknight_attack_s3_s3_game); + agent.acmd("game_attackhi3", metaknight_attack_hi3_game); agent.acmd("expression_attackhi3", metaknight_attack_hi3_expression); + agent.acmd("game_attacklw3", metaknight_attack_lw3_game); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/metaknight/src/opff.rs b/fighters/metaknight/src/opff.rs index 257759781a..1432905979 100644 --- a/fighters/metaknight/src/opff.rs +++ b/fighters/metaknight/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn dim_cape_early_attack_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, frame: f32) { if StatusModule::is_changing(boma) { diff --git a/fighters/metaknight/src/status/attack_100.rs b/fighters/metaknight/src/status/attack_100.rs index 995563b93a..d32a1abc01 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_100 unsafe extern "C" fn metaknight_attack100_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_Attack100_common(); diff --git a/fighters/metaknight/src/status/special_s.rs b/fighters/metaknight/src/status/special_s.rs index f872d7ebfe..0b40de65b9 100644 --- a/fighters/metaknight/src/status/special_s.rs +++ b/fighters/metaknight/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_METAKNIGHT_STATUS_KIND_SPECIAL_S_END diff --git a/fighters/mewtwo/src/acmd/aerials.rs b/fighters/mewtwo/src/acmd/aerials.rs index 640f650786..c991909446 100644 --- a/fighters/mewtwo/src/acmd/aerials.rs +++ b/fighters/mewtwo/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -33,7 +32,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -191,7 +189,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -261,17 +258,20 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/mewtwo/src/acmd/ground.rs b/fighters/mewtwo/src/acmd/ground.rs index 91bce5ae6a..9b8b20358e 100644 --- a/fighters/mewtwo/src/acmd/ground.rs +++ b/fighters/mewtwo/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -34,7 +33,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { @@ -50,7 +48,6 @@ unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -101,6 +98,7 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/mewtwo/src/acmd/other.rs b/fighters/mewtwo/src/acmd/other.rs index 25ab0e1196..52cc7b7ff2 100644 --- a/fighters/mewtwo/src/acmd/other.rs +++ b/fighters/mewtwo/src/acmd/other.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -77,14 +76,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -103,7 +100,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/mewtwo/src/acmd/smashes.rs b/fighters/mewtwo/src/acmd/smashes.rs index c03f605be5..388bfa5709 100644 --- a/fighters/mewtwo/src/acmd/smashes.rs +++ b/fighters/mewtwo/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -18,17 +17,16 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -45,14 +43,13 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 9.5, 9.2, Some(0.0), Some(9.5), Some(10.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 9.5, 19.200001, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 361, 95, 0, 30, 4.0, 0.0, 10.2, 8.6, Some(0.0), Some(10.7), Some(9.8), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 361, 93, 0, 30, 6.3, 0.0, 15.5, 17.299999, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 22.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -79,7 +76,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -122,7 +118,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { @@ -168,14 +163,15 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/mewtwo/src/acmd/specials.rs b/fighters/mewtwo/src/acmd/specials.rs index b188b1beb2..93a43e7c8a 100644 --- a/fighters/mewtwo/src/acmd/specials.rs +++ b/fighters/mewtwo/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { frame(lua_state, 40.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MEWTWO_STATUS_SPECIAL_S_FLAG_HIT); - } } @@ -126,9 +124,11 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specials", game_specials); agent.acmd("effect_specials", effect_specials); + agent.acmd("game_specialhistart", game_specialhistart); agent.acmd("game_specialairhistart", game_specialairhistart); agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/mewtwo/src/acmd/throws.rs b/fighters/mewtwo/src/acmd/throws.rs index 44eb33db20..cd6ee3a611 100644 --- a/fighters/mewtwo/src/acmd/throws.rs +++ b/fighters/mewtwo/src/acmd/throws.rs @@ -20,7 +20,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -82,7 +81,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { } frame(lua_state, 78.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { @@ -117,6 +115,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index 55eee1058f..3596297063 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -30,22 +29,22 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); if is_excute(agent) { let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), }; LAST_EFFECT_SET_RATE(agent, 1.3); } @@ -55,7 +54,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -72,7 +71,7 @@ unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -101,22 +100,22 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); if is_excute(agent) { let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { - 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), - _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), + 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 2 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("mewtwo_tail_attack_a_03"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 3 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("mewtwo_tail_attack_a_04"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 4 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("mewtwo_tail_attack_a_05"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 5 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("mewtwo_tail_attack_a_06"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 6 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("mewtwo_tail_attack_a_07"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + 7 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("mewtwo_tail_attack_a_08"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), + _ => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), }; LAST_EFFECT_SET_RATE(agent, 1.3); } @@ -126,7 +125,7 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -343,17 +342,20 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } } + pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("effect_attacks3hi", effect_attacks3hi); - agent.acmd("expression_attacks3hi", expression_attacks3hi); agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); + agent.acmd("expression_attacks3hi", expression_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); agent.acmd("expression_attacks3lw", expression_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/mewtwo/src/opff.rs b/fighters/mewtwo/src/opff.rs index db199ee4b9..d11ba1a4d9 100644 --- a/fighters/mewtwo/src/opff.rs +++ b/fighters/mewtwo/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn actionable_teleport_air(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32, frame: f32) { if StatusModule::is_changing(fighter.module_accessor) diff --git a/fighters/mewtwo/src/status.rs b/fighters/mewtwo/src/status.rs index 2e1ae00267..7c1b8456b6 100644 --- a/fighters/mewtwo/src/status.rs +++ b/fighters/mewtwo/src/status.rs @@ -32,10 +32,11 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + jump_aerial::install(agent); attack_air::install(agent); float::install(agent); fall::install(agent); special_n::install(agent); - agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/attack_air.rs b/fighters/mewtwo/src/status/attack_air.rs index 805842ce5f..ac74254b5f 100644 --- a/fighters/mewtwo/src/status/attack_air.rs +++ b/fighters/mewtwo/src/status/attack_air.rs @@ -1,7 +1,5 @@ use super::*; -use globals::*; utils::import!(common::djc::attack_air_main_status); -// status script import extern "Rust" { #[link_name = "attack_air_float_pre"] diff --git a/fighters/mewtwo/src/status/float.rs b/fighters/mewtwo/src/status/float.rs index 1f44e3186f..bdabc3bf4a 100644 --- a/fighters/mewtwo/src/status/float.rs +++ b/fighters/mewtwo/src/status/float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "float_pre_common"] diff --git a/fighters/miifighter/src/acmd/aerials.rs b/fighters/miifighter/src/acmd/aerials.rs index 6bd7d7056c..b48fa2cedd 100644 --- a/fighters/miifighter/src/acmd/aerials.rs +++ b/fighters/miifighter/src/acmd/aerials.rs @@ -32,7 +32,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -76,7 +75,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -105,7 +103,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -136,7 +133,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -180,9 +176,13 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/ground.rs b/fighters/miifighter/src/acmd/ground.rs index 69f7c5cda4..7b3f909c96 100644 --- a/fighters/miifighter/src/acmd/ground.rs +++ b/fighters/miifighter/src/acmd/ground.rs @@ -94,5 +94,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index c216d0b1fc..cbf70c04ac 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -71,14 +71,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -92,7 +90,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/miifighter/src/acmd/smashes.rs b/fighters/miifighter/src/acmd/smashes.rs index e98839d8c2..91978fb383 100644 --- a/fighters/miifighter/src/acmd/smashes.rs +++ b/fighters/miifighter/src/acmd/smashes.rs @@ -1,24 +1,21 @@ use super::*; -unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 4.0); + frame(lua_state, 6.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(lua_state, 8.0); + frame(lua_state, 14.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 5.5, 6.5); } - wait(lua_state, 5.0); + frame(lua_state, 17.0); if is_excute(agent) { - HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 4.0, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 3.0, -0.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { @@ -26,22 +23,25 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 6.0); + frame(lua_state, 4.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(lua_state, 14.0); + frame(lua_state, 8.0); if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 4.0, 5.5, 6.5); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 15.0, 84, 90, 0, 35, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); } - frame(lua_state, 17.0); + wait(lua_state, 5.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 4.0, 4.5, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 3.0, -0.2, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("arml"), 18.0, 361, 102, 0, 35, 2.5, -4.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 84, 93, 0, 32, 3.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 2.0); if is_excute(agent) { @@ -70,9 +70,11 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) {; - agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("game_attacks4", game_attacks4); agent.acmd("game_attacks4hi", game_attacks4); agent.acmd("game_attacks4lw", game_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miifighter/src/acmd/specials.rs b/fighters/miifighter/src/acmd/specials.rs index c0f100a2e6..c0d0ca2325 100644 --- a/fighters/miifighter/src/acmd/specials.rs +++ b/fighters/miifighter/src/acmd/specials.rs @@ -342,7 +342,6 @@ unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); sv_kinetic_energy!(set_accel_y_mul, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); } - } unsafe extern "C" fn effect_specialhi12(agent: &mut L2CAgentBase) { @@ -466,7 +465,6 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); } - } unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { @@ -551,7 +549,6 @@ unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); } - } unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { @@ -794,7 +791,6 @@ unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { @@ -1131,9 +1127,11 @@ pub fn install(agent: &mut Agent) {; agent.acmd("game_specialairn2start", game_specialn2start); agent.acmd("game_specialn2finish", game_specialn2finish); agent.acmd("game_specialairn2finish", game_specialairn2finish); + agent.acmd("game_specials1end", game_specials1end); agent.acmd("game_specialairs1end", game_specialairs1end); agent.acmd("game_specialairs2start", game_specialairs2start); + agent.acmd("game_specialhi1", game_specialhi1); agent.acmd("effect_specialhi1", effect_specialhi1); agent.acmd("effect_specialairhi1", effect_specialhi1); @@ -1147,6 +1145,7 @@ pub fn install(agent: &mut Agent) {; agent.acmd("expression_specialairhi12", expression_specialhi12); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("game_speciallw1", game_speciallw1); agent.acmd("effect_speciallw1", effect_speciallw1); agent.acmd("sound_speciallw1", sound_speciallw1); @@ -1156,14 +1155,17 @@ pub fn install(agent: &mut Agent) {; agent.acmd("game_speciallw1loop", game_speciallw1loop); agent.acmd("effect_speciallw1loop", effect_speciallw1loop); agent.acmd("game_speciallw1landing", game_speciallw1landing); + agent.acmd("game_specialhi3", game_specialhi3); agent.acmd("game_specialairhi3", game_specialhi3); agent.acmd("effect_specialhi3", effect_specialhi3); agent.acmd("effect_specialairhi3", effect_specialairhi3); + agent.acmd("game_speciallw2start", game_speciallw2start); agent.acmd("game_specialairlw2start", game_specialairlw2start); agent.acmd("game_specialairlw2kick", game_specialairlw2kick); agent.acmd("game_specialairlw2autoattack", game_specialairlw2autoattack); + agent.acmd("game_speciallw3catch", game_speciallw3catch); agent.acmd("game_specialairlw3catch", game_speciallw3catch); agent.acmd("game_speciallw3throw", game_speciallw3throw); diff --git a/fighters/miifighter/src/acmd/throws.rs b/fighters/miifighter/src/acmd/throws.rs index e9f12488a2..e27787afcf 100644 --- a/fighters/miifighter/src/acmd/throws.rs +++ b/fighters/miifighter/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -164,15 +163,18 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miifighter/src/acmd/tilts.rs b/fighters/miifighter/src/acmd/tilts.rs index fef6548ab5..3aa348aed0 100644 --- a/fighters/miifighter/src/acmd/tilts.rs +++ b/fighters/miifighter/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -15,7 +15,7 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -102,7 +102,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.0, 3.0); } - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { @@ -127,10 +126,12 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/miigunner/src/acmd/aerials.rs b/fighters/miigunner/src/acmd/aerials.rs index c55302d24b..d23df70cf2 100644 --- a/fighters/miigunner/src/acmd/aerials.rs +++ b/fighters/miigunner/src/acmd/aerials.rs @@ -27,7 +27,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -207,7 +206,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -235,7 +233,6 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } - } unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { @@ -331,7 +328,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -527,7 +523,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -568,7 +563,6 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_COLOR(agent, 0.15, 0.55, 10.0); } } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/miigunner/src/acmd/ground.rs b/fighters/miigunner/src/acmd/ground.rs index ac80aa6aa8..7fc1e33e0f 100644 --- a/fighters/miigunner/src/acmd/ground.rs +++ b/fighters/miigunner/src/acmd/ground.rs @@ -103,5 +103,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/other.rs b/fighters/miigunner/src/acmd/other.rs index 9237e2b151..db59a08e34 100644 --- a/fighters/miigunner/src/acmd/other.rs +++ b/fighters/miigunner/src/acmd/other.rs @@ -50,7 +50,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -84,7 +83,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -122,9 +120,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miigunner/src/acmd/smashes.rs b/fighters/miigunner/src/acmd/smashes.rs index cffdbe9124..8a9ba26354 100644 --- a/fighters/miigunner/src/acmd/smashes.rs +++ b/fighters/miigunner/src/acmd/smashes.rs @@ -30,7 +30,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -112,7 +111,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -140,11 +138,12 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials.rs b/fighters/miigunner/src/acmd/specials.rs index 5864640bef..482fdfc90f 100644 --- a/fighters/miigunner/src/acmd/specials.rs +++ b/fighters/miigunner/src/acmd/specials.rs @@ -8,7 +8,6 @@ unsafe extern "C" fn game_specialn1start(agent: &mut L2CAgentBase) { ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); } - } unsafe extern "C" fn game_specialnifiremax(agent: &mut L2CAgentBase) { @@ -102,7 +101,6 @@ unsafe extern "C" fn effect_specialn1firemax(agent: &mut L2CAgentBase) { } } } - } unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { @@ -122,7 +120,6 @@ unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("se_miigunner_final04")); } } - } unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { @@ -143,7 +140,6 @@ unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { @@ -156,7 +152,6 @@ unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { frame(lua_state, 16.0); FT_MOTION_RATE_RANGE(agent, 16.0, 30.0, 6.0); frame(lua_state, 25.0); - } unsafe extern "C" fn effect_specialn3start(agent: &mut L2CAgentBase) { diff --git a/fighters/miigunner/src/acmd/tilts.rs b/fighters/miigunner/src/acmd/tilts.rs index 2e5d2ba371..3e09d31c14 100644 --- a/fighters/miigunner/src/acmd/tilts.rs +++ b/fighters/miigunner/src/acmd/tilts.rs @@ -97,6 +97,8 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miigunner/src/opff.rs b/fighters/miigunner/src/opff.rs index 53f5197b30..cecd34c0d2 100644 --- a/fighters/miigunner/src/opff.rs +++ b/fighters/miigunner/src/opff.rs @@ -316,35 +316,6 @@ pub unsafe fn miigunner_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn miigunner_missile_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - let boma = weapon.boma(); - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - // Ensure the boma's owner is Mii Gunner - if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { - let gunner = utils::util::get_battle_object_from_id(owner_id); - let gunner_boma = &mut *(*gunner).module_accessor; - if StatusModule::status_kind(boma) == *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_STRAIGHT - && gunner_boma.is_cat_flag(Cat1::SpecialS) - && VarModule::is_flag(gunner, vars::miigunner::instance::DETONATE_READY) { - if WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ATTACK) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ATTACK) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_SPECIAL) - || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_JUMP) { - StatusModule::change_status_request_from_script(boma, *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_S_BURST, false); - VarModule::on_flag(gunner, vars::miigunner::status::MISSILE_DETONATE); - VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); - gunner_boma.clear_commands(Cat1::SpecialS); // Clear command so Gunner doesn't immediately fire another missile - } - } - } - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, miigunner_frame_wrapper); - smashline::Agent::new("miigunner_supermissile") - .on_line(Main, miigunner_missile_frame) - .install(); } diff --git a/fighters/miigunner/src/status.rs b/fighters/miigunner/src/status.rs index e7692b1a7f..cca4ade626 100644 --- a/fighters/miigunner/src/status.rs +++ b/fighters/miigunner/src/status.rs @@ -24,16 +24,12 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn miigunner_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_MIIGUNNER { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(miigunner_init); + agent.on_start(on_start); } \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/mod.rs b/fighters/miigunner/src/supermissile/mod.rs index 082bf2a9d8..d901f209f5 100644 --- a/fighters/miigunner/src/supermissile/mod.rs +++ b/fighters/miigunner/src/supermissile/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("miigunner_supermissile"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/miigunner/src/supermissile/opff.rs b/fighters/miigunner/src/supermissile/opff.rs new file mode 100644 index 0000000000..359cbdcce8 --- /dev/null +++ b/fighters/miigunner/src/supermissile/opff.rs @@ -0,0 +1,34 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn miigunner_missile_frame(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + let boma = weapon.boma(); + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + // Ensure the boma's owner is Mii Gunner + if sv_battle_object::kind(owner_id) == *FIGHTER_KIND_MIIGUNNER { + let gunner = utils::util::get_battle_object_from_id(owner_id); + let gunner_boma = &mut *(*gunner).module_accessor; + if StatusModule::status_kind(boma) == *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_STRAIGHT + && gunner_boma.is_cat_flag(Cat1::SpecialS) + && VarModule::is_flag(gunner, vars::miigunner::instance::DETONATE_READY) { + if WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_ATTACK) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_ATTACK) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_SPECIAL) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_AIR_SPECIAL) + || WorkModule::is_enable_transition_term_group(gunner_boma, *FIGHTER_STATUS_TRANSITION_GROUP_CHK_GROUND_JUMP) { + StatusModule::change_status_request_from_script(boma, *WEAPON_MIIGUNNER_SUPERMISSILE_STATUS_KIND_S_BURST, false); + VarModule::on_flag(gunner, vars::miigunner::status::MISSILE_DETONATE); + VarModule::off_flag(gunner, vars::miigunner::instance::DETONATE_READY); + gunner_boma.clear_commands(Cat1::SpecialS); // Clear command so Gunner doesn't immediately fire another missile + } + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, miigunner_missile_frame); +} diff --git a/fighters/miiswordsman/src/acmd/aerials.rs b/fighters/miiswordsman/src/acmd/aerials.rs index b37950b805..c168f9ceb0 100644 --- a/fighters/miiswordsman/src/acmd/aerials.rs +++ b/fighters/miiswordsman/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -221,9 +220,13 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/miiswordsman/src/acmd/ground.rs b/fighters/miiswordsman/src/acmd/ground.rs index c759efe274..d0a0056a6a 100644 --- a/fighters/miiswordsman/src/acmd/ground.rs +++ b/fighters/miiswordsman/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -51,7 +49,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { @@ -68,7 +65,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -118,6 +114,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("expression_attackdash", expression_attackdash); } diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index c1e7a87aa0..4123017e55 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -1,56 +1,7 @@ - use super::*; use smash::app::sv_battle_object; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } -} -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } -} -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -74,6 +25,7 @@ unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} } } + unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -88,30 +40,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02"));} - } -} + unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -121,6 +50,7 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { } } + unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -138,6 +68,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { PLAY_STEP(agent, Hash40::new("se_miiswordsman_step_left_m")); } } + unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -151,6 +82,7 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } } + // #[acmd_script( agent = "miiswordsman_tornadoshot", script = "game_fly" , category = ACMD_GAME , low_priority)] // unsafe fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; @@ -166,6 +98,7 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { // ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); // } // } + unsafe extern "C" fn miiswordsman_wave_fly_game(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -251,11 +184,11 @@ unsafe extern "C" fn miiswordsman_wave_fly_effect(agent: &mut L2CAgentBase) { } } } + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -269,7 +202,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -281,14 +213,16 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/miiswordsman/src/acmd/smashes.rs b/fighters/miiswordsman/src/acmd/smashes.rs index efe78872ee..81350989ee 100644 --- a/fighters/miiswordsman/src/acmd/smashes.rs +++ b/fighters/miiswordsman/src/acmd/smashes.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -118,7 +117,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 29.0/(58.0-26.0)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { @@ -195,12 +193,13 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("expression_attackhi4", expression_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs index 20f218705b..1bd7241ff5 100644 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ b/fighters/miiswordsman/src/acmd/specials.rs @@ -93,7 +93,6 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { } frame(lua_state, 36.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { @@ -1786,6 +1785,7 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg pub fn install(agent: &mut Agent) { agent.acmd("game_specialn1", game_specialn1); agent.acmd("game_specialairn1", game_specialn1); + agent.acmd("game_specialn2", game_specialn2); agent.acmd("game_specialairn2", game_specialn2); agent.acmd("effect_specialn2", effect_specialn2); @@ -1794,6 +1794,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairn2", sound_specialn2); agent.acmd("expression_specialn2", expression_specialn2); agent.acmd("expression_specialairn2", expression_specialn2); + agent.acmd("game_specialn3end", game_specialn3end); agent.acmd("game_specialn3endturn", game_specialn3end); agent.acmd("game_specialn3endmax", game_specialn3end); @@ -1802,49 +1803,58 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairn3endturn", game_specialairn3end); agent.acmd("game_specialairn3endmax", game_specialairn3end); agent.acmd("game_specialairn3endmaxturn", game_specialairn3end); + agent.acmd("game_specials1start", game_specials1start); agent.acmd("game_specialairs1start", game_specialairs1start); agent.acmd("game_specials1", game_specials1); agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("game_specials2dash", game_specials2dash); agent.acmd("game_specials2attack", game_specials2attack); agent.acmd("effect_specials2attack", effect_specials2attack); agent.acmd("game_specialairs2dash", game_specialairs2dash); agent.acmd("game_specialairs2attack", game_specialairs2attack); agent.acmd("effect_specialairs2attack", effect_specialairs2attack); + agent.acmd("game_specials3_1", game_specials3_1); agent.acmd("game_specials3_1hi", game_specials3_1hi); agent.acmd("game_specials3_1lw", game_specials3_1lw); agent.acmd("game_specialairs3_1", game_specialairs3_1); agent.acmd("game_specialairs3_1hi", game_specialairs3_1hi); agent.acmd("game_specialairs3_1lw", game_specialairs3_1lw); + agent.acmd("game_specialhi1start", game_specialhi1start); agent.acmd("game_specialairhi1", game_specialairhi1); agent.acmd("game_specialhi1end", game_specialhi1end); agent.acmd("game_specialairhi1end", game_specialairhi1end); + agent.acmd("game_specialhi2hold", game_specialhi2hold); agent.acmd("game_specialhi2holdair", game_specialhi2holdair); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("effect_specialhi2", effect_specialhi2); agent.acmd("game_specialhi2landing", game_specialhi2landing); agent.acmd("game_specialhi2fall", game_specialhi2fall); + agent.acmd("game_specialhi3", game_specialhi3); agent.acmd("game_specialairhi3", game_specialairhi3); + agent.acmd("game_speciallw1hit", game_speciallw1hit); agent.acmd("game_specialairlw1hit", game_specialairlw1hit); - //.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game) - //.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game) - //.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game) - //.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game) + //agent.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game); + //agent.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game); + //agent.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game); + //agent.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game); + agent.acmd("game_speciallw2", game_speciallw2); agent.acmd("game_specialairlw2", game_speciallw2); agent.acmd("effect_speciallw2", effect_speciallw2); agent.acmd("effect_specialairlw2", effect_speciallw2); agent.acmd("sound_speciallw2", sound_speciallw2); agent.acmd("sound_specialairlw2", sound_speciallw2); + agent.acmd("game_speciallw3", game_speciallw3); - //.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game) + //agent.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game); agent.acmd("game_specialairlw3", game_specialairlw3); agent.acmd("game_specialairlw3end", game_specialairlw3end); - //.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game) + //agent.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/throws.rs b/fighters/miiswordsman/src/acmd/throws.rs index 81a161a39c..e3c83f42a6 100644 --- a/fighters/miiswordsman/src/acmd/throws.rs +++ b/fighters/miiswordsman/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -19,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -40,7 +38,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -61,7 +58,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { @@ -177,8 +173,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/miiswordsman/src/acmd/tilts.rs b/fighters/miiswordsman/src/acmd/tilts.rs index 2d8e581068..642fc339ec 100644 --- a/fighters/miiswordsman/src/acmd/tilts.rs +++ b/fighters/miiswordsman/src/acmd/tilts.rs @@ -23,7 +23,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { @@ -81,12 +80,13 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/miiswordsman/src/lib.rs b/fighters/miiswordsman/src/lib.rs index b1c09844f9..14a5aa6eed 100644 --- a/fighters/miiswordsman/src/lib.rs +++ b/fighters/miiswordsman/src/lib.rs @@ -11,7 +11,7 @@ pub mod status; mod chakram; mod lightshuriken; -mod tornado; +mod tornadoshot; use smash::{ lib::{ @@ -54,5 +54,5 @@ pub fn install() { chakram::install(); lightshuriken::install(); - tornado::install(); + tornadoshot::install(); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/opff.rs b/fighters/miiswordsman/src/opff.rs index 37d6cc01c8..c37b6c84f4 100644 --- a/fighters/miiswordsman/src/opff.rs +++ b/fighters/miiswordsman/src/opff.rs @@ -291,13 +291,6 @@ pub unsafe fn miiswordsman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) } } -pub extern "C" fn tornadoshot_frame(weapon: &mut L2CFighterBase) { - unsafe { - ModelModule::set_joint_scale(weapon.module_accessor, Hash40::new("top"), &Vector3f::new(0.6, 0.6, 0.6)); - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, miiswordsman_frame_wrapper); - agent.on_line(Main, tornadoshot_frame); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status.rs index 93ff942ac8..cac8cad7eb 100644 --- a/fighters/miiswordsman/src/status.rs +++ b/fighters/miiswordsman/src/status.rs @@ -1,6 +1,10 @@ use super::*; use globals::*; // status script import + +// yeah these need to get separated into their own individual files later loool +// delete these comments when thats done +// - love, mokl // FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD diff --git a/fighters/miiswordsman/src/tornado/mod.rs b/fighters/miiswordsman/src/tornado/mod.rs deleted file mode 100644 index 6cab71f019..0000000000 --- a/fighters/miiswordsman/src/tornado/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -use super::*; - -mod acmd; - -pub fn install() { - let agent = &mut Agent::new("miiswordsman_tornado"); - acmd::install(agent); - agent.install(); -} \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornado/acmd.rs b/fighters/miiswordsman/src/tornadoshot/acmd.rs similarity index 90% rename from fighters/miiswordsman/src/tornado/acmd.rs rename to fighters/miiswordsman/src/tornadoshot/acmd.rs index f31adc0499..df4f56e562 100644 --- a/fighters/miiswordsman/src/tornado/acmd.rs +++ b/fighters/miiswordsman/src/tornadoshot/acmd.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); @@ -16,5 +16,5 @@ unsafe extern "C" fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) } pub fn install(agent: &mut Agent) { - agent.acmd("game_fly", miiswordsman_tornadoshot_fly_game); + agent.acmd("game_fly", game_fly); } diff --git a/fighters/miiswordsman/src/tornadoshot/mod.rs b/fighters/miiswordsman/src/tornadoshot/mod.rs new file mode 100644 index 0000000000..7c8a24408d --- /dev/null +++ b/fighters/miiswordsman/src/tornadoshot/mod.rs @@ -0,0 +1,11 @@ +use super::*; + +mod acmd; +mod opff; + +pub fn install() { + let agent = &mut Agent::new("miiswordsman_tornadoshot"); + acmd::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/tornadoshot/opff.rs b/fighters/miiswordsman/src/tornadoshot/opff.rs new file mode 100644 index 0000000000..7c68411d70 --- /dev/null +++ b/fighters/miiswordsman/src/tornadoshot/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn tornadoshot_frame(weapon: &mut L2CFighterBase) { + unsafe { + ModelModule::set_joint_scale(weapon.module_accessor, Hash40::new("top"), &Vector3f::new(0.6, 0.6, 0.6)); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, tornadoshot_frame); +} \ No newline at end of file diff --git a/fighters/murabito/src/acmd/aerials.rs b/fighters/murabito/src/acmd/aerials.rs index 7b65eff055..2dc437c23a 100644 --- a/fighters/murabito/src/acmd/aerials.rs +++ b/fighters/murabito/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -25,7 +24,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -66,7 +64,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } //Not an ideal solution as hitbox will appear a frame before effects begin. Will have to revisit this in the future for a better solution @@ -84,7 +81,6 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("murabito_erase_smoke"), Hash40::new("top"), 0.0, 4.5, -10.0, 0, -90, 0, 0.75, true); LAST_EFFECT_SET_RATE(agent, 1.25); } - } unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { @@ -98,7 +94,6 @@ unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_murabito_smash_h02")); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -173,7 +168,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -223,15 +217,17 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("sound_attackairb", sound_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/murabito/src/acmd/ground.rs b/fighters/murabito/src/acmd/ground.rs index 93ffe11e4c..e18057c132 100644 --- a/fighters/murabito/src/acmd/ground.rs +++ b/fighters/murabito/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { diff --git a/fighters/murabito/src/acmd/other.rs b/fighters/murabito/src/acmd/other.rs index 62ecd817a8..652f26cce4 100644 --- a/fighters/murabito/src/acmd/other.rs +++ b/fighters/murabito/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -8,7 +7,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -32,14 +30,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -53,7 +49,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -68,6 +63,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/murabito/src/acmd/smashes.rs b/fighters/murabito/src/acmd/smashes.rs index 613cb13d8f..868df8e393 100644 --- a/fighters/murabito/src/acmd/smashes.rs +++ b/fighters/murabito/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -139,7 +138,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -221,7 +219,6 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } - } unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { @@ -254,7 +251,9 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/murabito/src/acmd/specials.rs b/fighters/murabito/src/acmd/specials.rs index cbf991aa02..b1dc543a46 100644 --- a/fighters/murabito/src/acmd/specials.rs +++ b/fighters/murabito/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { @@ -33,7 +32,6 @@ unsafe extern "C" fn game_speciallw3hit(agent: &mut L2CAgentBase) { ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } } - } unsafe extern "C" fn game_specialairlw3hit(agent: &mut L2CAgentBase) { @@ -45,11 +43,11 @@ unsafe extern "C" fn game_specialairlw3hit(agent: &mut L2CAgentBase) { ItemModule::have_item(boma, app::ItemKind(*ITEM_KIND_WOOD), 0, 0, false, false); } } - } pub fn install(agent: &mut Agent) { agent.acmd("game_speciallw1", game_speciallw1); + agent.acmd("game_speciallw3hit", game_speciallw3hit); agent.acmd("game_specialairlw3hit", game_specialairlw3hit); } diff --git a/fighters/murabito/src/acmd/throws.rs b/fighters/murabito/src/acmd/throws.rs index cb1ebbf2e6..3f115ebd78 100644 --- a/fighters/murabito/src/acmd/throws.rs +++ b/fighters/murabito/src/acmd/throws.rs @@ -156,7 +156,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/murabito/src/acmd/tilts.rs b/fighters/murabito/src/acmd/tilts.rs index 82a9f95db9..9f448521bb 100644 --- a/fighters/murabito/src/acmd/tilts.rs +++ b/fighters/murabito/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -28,7 +27,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_UMBRELLA, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -62,7 +60,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -138,7 +135,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.8, 3.0); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -198,7 +194,9 @@ unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); agent.acmd("sound_attacklw3", sound_attacklw3); diff --git a/fighters/murabito/src/bowlingball/acmd.rs b/fighters/murabito/src/bowlingball/acmd.rs index 336c9276c6..1d71786036 100644 --- a/fighters/murabito/src/bowlingball/acmd.rs +++ b/fighters/murabito/src/bowlingball/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -11,6 +12,7 @@ unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_fall", game_fall); } diff --git a/fighters/murabito/src/bullet/acmd.rs b/fighters/murabito/src/bullet/acmd.rs index d2bed759d1..76b39d3764 100644 --- a/fighters/murabito/src/bullet/acmd.rs +++ b/fighters/murabito/src/bullet/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_shootf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -16,6 +17,7 @@ unsafe extern "C" fn game_shootf(agent: &mut L2CAgentBase) { } } + pub fn install(agent: &mut Agent) { agent.acmd("game_shootf", game_shootf); } diff --git a/fighters/murabito/src/clayrocket/acmd.rs b/fighters/murabito/src/clayrocket/acmd.rs index debb646847..7506b224b5 100644 --- a/fighters/murabito/src/clayrocket/acmd.rs +++ b/fighters/murabito/src/clayrocket/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -6,8 +7,8 @@ unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 110, 55, 0, 75, 4.0, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -3.5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } - } + pub fn install(agent: &mut Agent) { agent.acmd("game_fly", game_fly); } diff --git a/fighters/murabito/src/clayrocket/mod.rs b/fighters/murabito/src/clayrocket/mod.rs index 0b8b60fac7..50e099bcc2 100644 --- a/fighters/murabito/src/clayrocket/mod.rs +++ b/fighters/murabito/src/clayrocket/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("murabito_clayrocket"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/murabito/src/clayrocket/opff.rs b/fighters/murabito/src/clayrocket/opff.rs new file mode 100644 index 0000000000..74c9e943b9 --- /dev/null +++ b/fighters/murabito/src/clayrocket/opff.rs @@ -0,0 +1,14 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn clayrocket_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, clayrocket_callback); +} \ No newline at end of file diff --git a/fighters/murabito/src/firework/acmd.rs b/fighters/murabito/src/firework/acmd.rs index 3267692fad..32724eaaa3 100644 --- a/fighters/murabito/src/firework/acmd.rs +++ b/fighters/murabito/src/firework/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/murabito/src/flowerpot/acmd.rs b/fighters/murabito/src/flowerpot/acmd.rs index 10ce283e14..75941a5a8d 100644 --- a/fighters/murabito/src/flowerpot/acmd.rs +++ b/fighters/murabito/src/flowerpot/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/murabito/src/flowerpot/mod.rs b/fighters/murabito/src/flowerpot/mod.rs index c18cc8ac53..5137fa6406 100644 --- a/fighters/murabito/src/flowerpot/mod.rs +++ b/fighters/murabito/src/flowerpot/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("murabito_flowerpot"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/murabito/src/flowerpot/opff.rs b/fighters/murabito/src/flowerpot/opff.rs new file mode 100644 index 0000000000..92c44f1170 --- /dev/null +++ b/fighters/murabito/src/flowerpot/opff.rs @@ -0,0 +1,16 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn flowerpot_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status( *WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_THROWED ) && AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { + weapon.change_status(WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_BURST.into(), false.into()); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, flowerpot_callback); +} \ No newline at end of file diff --git a/fighters/murabito/src/opff.rs b/fighters/murabito/src/opff.rs index 29d99c0265..93c5f00d27 100644 --- a/fighters/murabito/src/opff.rs +++ b/fighters/murabito/src/opff.rs @@ -108,21 +108,6 @@ pub unsafe fn murabito_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn article_frame_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.kind() == *WEAPON_KIND_MURABITO_FLOWERPOT { - if weapon.is_status( *WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_THROWED ) && AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) { - weapon.change_status(WEAPON_MURABITO_FLOWERPOT_STATUS_KIND_BURST.into(), false.into()); - } - } else if weapon.kind() == *WEAPON_KIND_MURABITO_CLAYROCKET { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } else { - return; - } - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, murabito_frame_wrapper); - agent.on_line(Main, article_frame_callback); } \ No newline at end of file diff --git a/fighters/murabito/src/slingshot/acmd.rs b/fighters/murabito/src/slingshot/acmd.rs index 8b64bb3da4..7e510f37f9 100644 --- a/fighters/murabito/src/slingshot/acmd.rs +++ b/fighters/murabito/src/slingshot/acmd.rs @@ -1,12 +1,7 @@ use super::*; -unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - - } - -} + +unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairb", null); } diff --git a/fighters/murabito/src/status.rs b/fighters/murabito/src/status.rs index 81e63ff07c..03c2dc31ba 100644 --- a/fighters/murabito/src/status.rs +++ b/fighters/murabito/src/status.rs @@ -1,6 +1,10 @@ use super::*; use globals::*; // status script import + +mod attack_air; +mod jump; +mod special_s; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -20,106 +24,16 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn murabito_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_MURABITO { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -// FIGHTER_STATUS_KIND_SPECIAL_S // - -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::on_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); - 0.into() -} - -// FIGHTER_STATUS_KIND_JUMP // - -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { - if !fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - } - return L2CValue::I32(1); - } - } - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_POWBLOCK_QUAKE_JUMP); - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - return L2CValue::I32(0); -} - -pub unsafe extern "C" fn jump(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { - fighter.sub_jump_item_rocketbelt(); - fighter.status_Jump_sub(L2CValue::Hash40s("invalid"), L2CValue::F32(0.0)); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) - } - else { - // uncomment to let sideB ride remove double jump on hit - //let jump_count_max = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT_MAX); - //WorkModule::set_int(fighter.module_accessor, jump_count_max, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); - fighter.status_Jump_sub(L2CValue::new_hash(hash40("jump_b")), L2CValue::F32(0.0)); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) - } -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_attack_air(); - let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - if [hash40("attack_air_hi")].contains(&motion) { - // Usually there's code in here to check for the random turnip pulls. However... we don't want that. - // Instead, we want to force the turnip count to go in a rotation of 1 > 2 > 3 > 1 > 2 > 3 ... - let mut turnip_num_hi = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI); - // Adds 1 to the turnip count. If the new turnip count is not 1, 2, or 3, reset it back to 1. - turnip_num_hi += 1; - if !(1..=3).contains(&turnip_num_hi) { - turnip_num_hi = 1; - } - VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI, turnip_num_hi); - WorkModule::set_int(fighter.module_accessor, turnip_num_hi, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); - - } else if [hash40("attack_air_lw")].contains(&motion) { - let mut turnip_num_lw = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW); - turnip_num_lw += 1; - if !(1..=3).contains(&turnip_num_lw) { - turnip_num_lw = 1; - } - VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW, turnip_num_lw); - WorkModule::set_int(fighter.module_accessor, turnip_num_lw, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); - - } else if [ - hash40("attack_air_f"), - hash40("attack_air_b") - ].contains(&motion) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); - } - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(murabito_init); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); - agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); + agent.on_start(on_start); + + attack_air::install(agent); + jump::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/murabito/src/status/attack_air.rs b/fighters/murabito/src/status/attack_air.rs new file mode 100644 index 0000000000..47bc969f33 --- /dev/null +++ b/fighters/murabito/src/status/attack_air.rs @@ -0,0 +1,40 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR + +pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air(); + let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); + if [hash40("attack_air_hi")].contains(&motion) { + // Usually there's code in here to check for the random turnip pulls. However... we don't want that. + // Instead, we want to force the turnip count to go in a rotation of 1 > 2 > 3 > 1 > 2 > 3 ... + let mut turnip_num_hi = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI); + // Adds 1 to the turnip count. If the new turnip count is not 1, 2, or 3, reset it back to 1. + turnip_num_hi += 1; + if !(1..=3).contains(&turnip_num_hi) { + turnip_num_hi = 1; + } + VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_HI, turnip_num_hi); + WorkModule::set_int(fighter.module_accessor, turnip_num_hi, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); + + } else if [hash40("attack_air_lw")].contains(&motion) { + let mut turnip_num_lw = VarModule::get_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW); + turnip_num_lw += 1; + if !(1..=3).contains(&turnip_num_lw) { + turnip_num_lw = 1; + } + VarModule::set_int(fighter.battle_object, vars::murabito::instance::TURNIP_NUM_LW, turnip_num_lw); + WorkModule::set_int(fighter.module_accessor, turnip_num_lw, *FIGHTER_MURABITO_INSTANCE_WORK_ID_INT_TURNIP_NUM); + + } else if [ + hash40("attack_air_f"), + hash40("attack_air_b") + ].contains(&motion) { + notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, FIGHTER_LOG_DATA_INT_SHOOT_NUM); + } + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_AttackAir_Main as *const () as _)) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); +} \ No newline at end of file diff --git a/fighters/murabito/src/status/jump.rs b/fighters/murabito/src/status/jump.rs new file mode 100644 index 0000000000..2d82b30146 --- /dev/null +++ b/fighters/murabito/src/status/jump.rs @@ -0,0 +1,50 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP + +pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { + if !fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + } + return L2CValue::I32(1); + } + } + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_JUMP_MINI); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_STATUS_JUMP_FLAG_POWBLOCK_QUAKE_JUMP); + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + return L2CValue::I32(0); +} + +pub unsafe extern "C" fn jump(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { + fighter.sub_jump_item_rocketbelt(); + fighter.status_Jump_sub(L2CValue::Hash40s("invalid"), L2CValue::F32(0.0)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) + } + else { + // uncomment to let sideB ride remove double jump on hit + //let jump_count_max = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT_MAX); + //WorkModule::set_int(fighter.module_accessor, jump_count_max, *FIGHTER_INSTANCE_WORK_ID_INT_JUMP_COUNT); + fighter.status_Jump_sub(L2CValue::new_hash(hash40("jump_b")), L2CValue::F32(0.0)); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Jump_Main as *const () as _)) + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump); +} \ No newline at end of file diff --git a/fighters/murabito/src/status/special_s.rs b/fighters/murabito/src/status/special_s.rs new file mode 100644 index 0000000000..bfd8a41ce1 --- /dev/null +++ b/fighters/murabito/src/status/special_s.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S // + +pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::on_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); +} \ No newline at end of file From 50d3b0017b811d0e01040b84d4cdaf7d9472653c Mon Sep 17 00:00:00 2001 From: mokl Date: Wed, 27 Mar 2024 14:49:35 -0500 Subject: [PATCH 151/172] contain status files to their respective folders i like this structure more i've decided. matches the style of acmd script packaging --- .../src/{status.rs => status/mod.rs} | 0 .../buddy/src/{status.rs => status/mod.rs} | 0 .../captain/src/{status.rs => status/mod.rs} | 0 .../chrom/src/{status.rs => status/mod.rs} | 0 .../daisy/src/{status.rs => status/mod.rs} | 0 .../dedede/src/{status.rs => status/mod.rs} | 0 .../demon/src/{status.rs => status/mod.rs} | 0 .../diddy/src/{status.rs => status/mod.rs} | 0 .../dolly/src/{status.rs => status/mod.rs} | 0 .../donkey/src/{status.rs => status/mod.rs} | 0 .../duckhunt/src/{status.rs => status/mod.rs} | 0 .../edge/src/{status.rs => status/mod.rs} | 0 .../eflame/src/{status.rs => status/mod.rs} | 0 .../elight/src/{status.rs => status/mod.rs} | 214 +++++++++--------- .../falco/src/{status.rs => status/mod.rs} | 0 fighters/fox/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../ganon/src/{status.rs => status/mod.rs} | 0 .../gaogaen/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 fighters/ike/src/{status.rs => status/mod.rs} | 0 .../inkling/src/{status.rs => status/mod.rs} | 0 .../jack/src/{status.rs => status/mod.rs} | 0 .../kamui/src/{status.rs => status/mod.rs} | 0 fighters/ken/src/{status.rs => status/mod.rs} | 0 .../kirby/src/{status.rs => status/mod.rs} | 0 .../koopa/src/{status.rs => status/mod.rs} | 0 .../koopajr/src/{status.rs => status/mod.rs} | 0 .../krool/src/{status.rs => status/mod.rs} | 0 .../link/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../lucario/src/{status.rs => status/mod.rs} | 0 .../lucas/src/{status.rs => status/mod.rs} | 0 .../lucina/src/{status.rs => status/mod.rs} | 0 .../luigi/src/{status.rs => status/mod.rs} | 0 .../mario/src/{status.rs => status/mod.rs} | 0 .../mariod/src/{status.rs => status/mod.rs} | 0 .../marth/src/{status.rs => status/mod.rs} | 0 .../master/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../mewtwo/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../murabito/src/{status.rs => status/mod.rs} | 0 .../ness/src/{status.rs => status/mod.rs} | 0 .../packun/src/{status.rs => status/mod.rs} | 0 .../pacman/src/{status.rs => status/mod.rs} | 0 .../palutena/src/{status.rs => status/mod.rs} | 0 .../peach/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../pickel/src/{status.rs => status/mod.rs} | 0 .../pikmin/src/{status.rs => status/mod.rs} | 0 fighters/pit/src/{status.rs => status/mod.rs} | 0 .../pitb/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../purin/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../reflet/src/{status.rs => status/mod.rs} | 0 .../ridley/src/{status.rs => status/mod.rs} | 0 .../robot/src/{status.rs => status/mod.rs} | 0 .../rockman/src/{status.rs => status/mod.rs} | 0 .../rosetta/src/{status.rs => status/mod.rs} | 0 fighters/roy/src/{status.rs => status/mod.rs} | 0 fighters/ryu/src/{status.rs => status/mod.rs} | 0 .../samusd/src/{status.rs => status/mod.rs} | 0 .../shizue/src/{status.rs => status/mod.rs} | 0 .../shulk/src/{status.rs => status/mod.rs} | 0 .../simon/src/{status.rs => status/mod.rs} | 0 .../snake/src/{status.rs => status/mod.rs} | 0 .../sonic/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../tantan/src/{status.rs => status/mod.rs} | 0 .../toonlink/src/{status.rs => status/mod.rs} | 0 .../trail/src/{status.rs => status/mod.rs} | 0 .../wario/src/{status.rs => status/mod.rs} | 0 .../wiifit/src/{status.rs => status/mod.rs} | 0 .../wolf/src/{status.rs => status/mod.rs} | 0 .../yoshi/src/{status.rs => status/mod.rs} | 0 .../src/{status.rs => status/mod.rs} | 0 .../zelda/src/{status.rs => status/mod.rs} | 0 81 files changed, 107 insertions(+), 107 deletions(-) rename fighters/bayonetta/src/{status.rs => status/mod.rs} (100%) rename fighters/buddy/src/{status.rs => status/mod.rs} (100%) rename fighters/captain/src/{status.rs => status/mod.rs} (100%) rename fighters/chrom/src/{status.rs => status/mod.rs} (100%) rename fighters/daisy/src/{status.rs => status/mod.rs} (100%) rename fighters/dedede/src/{status.rs => status/mod.rs} (100%) rename fighters/demon/src/{status.rs => status/mod.rs} (100%) rename fighters/diddy/src/{status.rs => status/mod.rs} (100%) rename fighters/dolly/src/{status.rs => status/mod.rs} (100%) rename fighters/donkey/src/{status.rs => status/mod.rs} (100%) rename fighters/duckhunt/src/{status.rs => status/mod.rs} (100%) rename fighters/edge/src/{status.rs => status/mod.rs} (100%) rename fighters/eflame/src/{status.rs => status/mod.rs} (100%) rename fighters/elight/src/{status.rs => status/mod.rs} (97%) rename fighters/falco/src/{status.rs => status/mod.rs} (100%) rename fighters/fox/src/{status.rs => status/mod.rs} (100%) rename fighters/gamewatch/src/{status.rs => status/mod.rs} (100%) rename fighters/ganon/src/{status.rs => status/mod.rs} (100%) rename fighters/gaogaen/src/{status.rs => status/mod.rs} (100%) rename fighters/iceclimber/src/{status.rs => status/mod.rs} (100%) rename fighters/ike/src/{status.rs => status/mod.rs} (100%) rename fighters/inkling/src/{status.rs => status/mod.rs} (100%) rename fighters/jack/src/{status.rs => status/mod.rs} (100%) rename fighters/kamui/src/{status.rs => status/mod.rs} (100%) rename fighters/ken/src/{status.rs => status/mod.rs} (100%) rename fighters/kirby/src/{status.rs => status/mod.rs} (100%) rename fighters/koopa/src/{status.rs => status/mod.rs} (100%) rename fighters/koopajr/src/{status.rs => status/mod.rs} (100%) rename fighters/krool/src/{status.rs => status/mod.rs} (100%) rename fighters/link/src/{status.rs => status/mod.rs} (100%) rename fighters/littlemac/src/{status.rs => status/mod.rs} (100%) rename fighters/lucario/src/{status.rs => status/mod.rs} (100%) rename fighters/lucas/src/{status.rs => status/mod.rs} (100%) rename fighters/lucina/src/{status.rs => status/mod.rs} (100%) rename fighters/luigi/src/{status.rs => status/mod.rs} (100%) rename fighters/mario/src/{status.rs => status/mod.rs} (100%) rename fighters/mariod/src/{status.rs => status/mod.rs} (100%) rename fighters/marth/src/{status.rs => status/mod.rs} (100%) rename fighters/master/src/{status.rs => status/mod.rs} (100%) rename fighters/metaknight/src/{status.rs => status/mod.rs} (100%) rename fighters/mewtwo/src/{status.rs => status/mod.rs} (100%) rename fighters/miifighter/src/{status.rs => status/mod.rs} (100%) rename fighters/miigunner/src/{status.rs => status/mod.rs} (100%) rename fighters/miiswordsman/src/{status.rs => status/mod.rs} (100%) rename fighters/murabito/src/{status.rs => status/mod.rs} (100%) rename fighters/ness/src/{status.rs => status/mod.rs} (100%) rename fighters/packun/src/{status.rs => status/mod.rs} (100%) rename fighters/pacman/src/{status.rs => status/mod.rs} (100%) rename fighters/palutena/src/{status.rs => status/mod.rs} (100%) rename fighters/peach/src/{status.rs => status/mod.rs} (100%) rename fighters/pfushigisou/src/{status.rs => status/mod.rs} (100%) rename fighters/pickel/src/{status.rs => status/mod.rs} (100%) rename fighters/pikmin/src/{status.rs => status/mod.rs} (100%) rename fighters/pit/src/{status.rs => status/mod.rs} (100%) rename fighters/pitb/src/{status.rs => status/mod.rs} (100%) rename fighters/plizardon/src/{status.rs => status/mod.rs} (100%) rename fighters/purin/src/{status.rs => status/mod.rs} (100%) rename fighters/pzenigame/src/{status.rs => status/mod.rs} (100%) rename fighters/reflet/src/{status.rs => status/mod.rs} (100%) rename fighters/ridley/src/{status.rs => status/mod.rs} (100%) rename fighters/robot/src/{status.rs => status/mod.rs} (100%) rename fighters/rockman/src/{status.rs => status/mod.rs} (100%) rename fighters/rosetta/src/{status.rs => status/mod.rs} (100%) rename fighters/roy/src/{status.rs => status/mod.rs} (100%) rename fighters/ryu/src/{status.rs => status/mod.rs} (100%) rename fighters/samusd/src/{status.rs => status/mod.rs} (100%) rename fighters/shizue/src/{status.rs => status/mod.rs} (100%) rename fighters/shulk/src/{status.rs => status/mod.rs} (100%) rename fighters/simon/src/{status.rs => status/mod.rs} (100%) rename fighters/snake/src/{status.rs => status/mod.rs} (100%) rename fighters/sonic/src/{status.rs => status/mod.rs} (100%) rename fighters/szerosuit/src/{status.rs => status/mod.rs} (100%) rename fighters/tantan/src/{status.rs => status/mod.rs} (100%) rename fighters/toonlink/src/{status.rs => status/mod.rs} (100%) rename fighters/trail/src/{status.rs => status/mod.rs} (100%) rename fighters/wario/src/{status.rs => status/mod.rs} (100%) rename fighters/wiifit/src/{status.rs => status/mod.rs} (100%) rename fighters/wolf/src/{status.rs => status/mod.rs} (100%) rename fighters/yoshi/src/{status.rs => status/mod.rs} (100%) rename fighters/younglink/src/{status.rs => status/mod.rs} (100%) rename fighters/zelda/src/{status.rs => status/mod.rs} (100%) diff --git a/fighters/bayonetta/src/status.rs b/fighters/bayonetta/src/status/mod.rs similarity index 100% rename from fighters/bayonetta/src/status.rs rename to fighters/bayonetta/src/status/mod.rs diff --git a/fighters/buddy/src/status.rs b/fighters/buddy/src/status/mod.rs similarity index 100% rename from fighters/buddy/src/status.rs rename to fighters/buddy/src/status/mod.rs diff --git a/fighters/captain/src/status.rs b/fighters/captain/src/status/mod.rs similarity index 100% rename from fighters/captain/src/status.rs rename to fighters/captain/src/status/mod.rs diff --git a/fighters/chrom/src/status.rs b/fighters/chrom/src/status/mod.rs similarity index 100% rename from fighters/chrom/src/status.rs rename to fighters/chrom/src/status/mod.rs diff --git a/fighters/daisy/src/status.rs b/fighters/daisy/src/status/mod.rs similarity index 100% rename from fighters/daisy/src/status.rs rename to fighters/daisy/src/status/mod.rs diff --git a/fighters/dedede/src/status.rs b/fighters/dedede/src/status/mod.rs similarity index 100% rename from fighters/dedede/src/status.rs rename to fighters/dedede/src/status/mod.rs diff --git a/fighters/demon/src/status.rs b/fighters/demon/src/status/mod.rs similarity index 100% rename from fighters/demon/src/status.rs rename to fighters/demon/src/status/mod.rs diff --git a/fighters/diddy/src/status.rs b/fighters/diddy/src/status/mod.rs similarity index 100% rename from fighters/diddy/src/status.rs rename to fighters/diddy/src/status/mod.rs diff --git a/fighters/dolly/src/status.rs b/fighters/dolly/src/status/mod.rs similarity index 100% rename from fighters/dolly/src/status.rs rename to fighters/dolly/src/status/mod.rs diff --git a/fighters/donkey/src/status.rs b/fighters/donkey/src/status/mod.rs similarity index 100% rename from fighters/donkey/src/status.rs rename to fighters/donkey/src/status/mod.rs diff --git a/fighters/duckhunt/src/status.rs b/fighters/duckhunt/src/status/mod.rs similarity index 100% rename from fighters/duckhunt/src/status.rs rename to fighters/duckhunt/src/status/mod.rs diff --git a/fighters/edge/src/status.rs b/fighters/edge/src/status/mod.rs similarity index 100% rename from fighters/edge/src/status.rs rename to fighters/edge/src/status/mod.rs diff --git a/fighters/eflame/src/status.rs b/fighters/eflame/src/status/mod.rs similarity index 100% rename from fighters/eflame/src/status.rs rename to fighters/eflame/src/status/mod.rs diff --git a/fighters/elight/src/status.rs b/fighters/elight/src/status/mod.rs similarity index 97% rename from fighters/elight/src/status.rs rename to fighters/elight/src/status/mod.rs index 51098717aa..851d82ee05 100644 --- a/fighters/elight/src/status.rs +++ b/fighters/elight/src/status/mod.rs @@ -1,108 +1,108 @@ -use super::*; - -mod special_hi_attack; -mod special_hi_jump; -mod special_hi_finish; -mod special_hi_finish2; -mod special_hi; - -/// Prevents side b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S) { - false.into() - } else { - true.into() - } -} - -/// Prevents up b from being used again in air when it has been disabled by up-b fall -unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI) { - false.into() - } else { - true.into() - } -} - -/// Re-enables the ability to use aerial specials when connecting to ground or cliff -unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, - *FIGHTER_STATUS_KIND_DAMAGE_AIR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, - *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, - *FIGHTER_STATUS_KIND_DAMAGE_FALL]; - - if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)) - || fighter.is_status_one_of(damage_statuses) || fighter.is_status(*FIGHTER_STATUS_KIND_LANDING){ - //Re-enable Mythra UpB - VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI); - //Re-enable Mythra SideB - VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S); - - //Re-enable Pyra UpB - Set_Pyra_Up_Special_Cancel(fighter,false); - } - if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) - || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { - VarModule::off_flag(fighter.battle_object, vars::elight::instance::UP_SPECIAL_FREEFALL); - } - return true.into(); -} - -unsafe extern "C" fn Set_Pyra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) -{ - //This first conditional tree is used if the player selects Pyra first - if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ - let object = crate::util::get_battle_object_from_id(object_id); - if !object.is_null() { - let object = unsafe { &mut *object }; - let kind = object.kind as i32; - if kind == *FIGHTER_KIND_EFLAME { - if cancel_state { - VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - else{ - VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - return; - } - } - } - //This is used if the player selects Mythra first - if let Some(object_id) = Some(fighter.battle_object_id - 0x10000){ - let object = crate::util::get_battle_object_from_id(object_id); - if !object.is_null() { - let object = unsafe { &mut *object }; - let kind = object.kind as i32; - if kind == *FIGHTER_KIND_EFLAME { - if cancel_state { - VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - else{ - VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); - } - } - } - } -} - -unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { - // set the callbacks on fighter init - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); -} - -pub fn install(agent: &mut Agent) { - agent.on_start(on_start); - - special_hi_attack::install(agent); - special_hi_jump::install(agent); - special_hi_finish::install(agent); - special_hi_finish2::install(agent); - special_hi::install(agent); +use super::*; + +mod special_hi_attack; +mod special_hi_jump; +mod special_hi_finish; +mod special_hi_finish2; +mod special_hi; + +/// Prevents side b from being used again in air when it has been disabled by up-b fall +unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S) { + false.into() + } else { + true.into() + } +} + +/// Prevents up b from being used again in air when it has been disabled by up-b fall +unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI) { + false.into() + } else { + true.into() + } +} + +/// Re-enables the ability to use aerial specials when connecting to ground or cliff +unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { + let damage_statuses = &[*FIGHTER_STATUS_KIND_DAMAGE, + *FIGHTER_STATUS_KIND_DAMAGE_AIR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_ROLL, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_METEOR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U, + *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D, + *FIGHTER_STATUS_KIND_DAMAGE_FALL]; + + if (fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF)) + || fighter.is_status_one_of(damage_statuses) || fighter.is_status(*FIGHTER_STATUS_KIND_LANDING){ + //Re-enable Mythra UpB + VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_HI); + //Re-enable Mythra SideB + VarModule::off_flag(fighter.battle_object, vars::elight::instance::DISABLE_SPECIAL_S); + + //Re-enable Pyra UpB + Set_Pyra_Up_Special_Cancel(fighter,false); + } + if fighter.is_situation(*SITUATION_KIND_GROUND) || fighter.is_situation(*SITUATION_KIND_CLIFF) + || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]) { + VarModule::off_flag(fighter.battle_object, vars::elight::instance::UP_SPECIAL_FREEFALL); + } + return true.into(); +} + +unsafe extern "C" fn Set_Pyra_Up_Special_Cancel(fighter: &mut L2CFighterCommon, cancel_state: bool) +{ + //This first conditional tree is used if the player selects Pyra first + if let Some(object_id) = Some(fighter.battle_object_id + 0x10000){ + let object = crate::util::get_battle_object_from_id(object_id); + if !object.is_null() { + let object = unsafe { &mut *object }; + let kind = object.kind as i32; + if kind == *FIGHTER_KIND_EFLAME { + if cancel_state { + VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + else{ + VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + return; + } + } + } + //This is used if the player selects Mythra first + if let Some(object_id) = Some(fighter.battle_object_id - 0x10000){ + let object = crate::util::get_battle_object_from_id(object_id); + if !object.is_null() { + let object = unsafe { &mut *object }; + let kind = object.kind as i32; + if kind == *FIGHTER_KIND_EFLAME { + if cancel_state { + VarModule::on_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + else{ + VarModule::off_flag(object, vars::eflame::instance::DISABLE_SPECIAL_HI); + } + } + } + } +} + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_hi_attack::install(agent); + special_hi_jump::install(agent); + special_hi_finish::install(agent); + special_hi_finish2::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/falco/src/status.rs b/fighters/falco/src/status/mod.rs similarity index 100% rename from fighters/falco/src/status.rs rename to fighters/falco/src/status/mod.rs diff --git a/fighters/fox/src/status.rs b/fighters/fox/src/status/mod.rs similarity index 100% rename from fighters/fox/src/status.rs rename to fighters/fox/src/status/mod.rs diff --git a/fighters/gamewatch/src/status.rs b/fighters/gamewatch/src/status/mod.rs similarity index 100% rename from fighters/gamewatch/src/status.rs rename to fighters/gamewatch/src/status/mod.rs diff --git a/fighters/ganon/src/status.rs b/fighters/ganon/src/status/mod.rs similarity index 100% rename from fighters/ganon/src/status.rs rename to fighters/ganon/src/status/mod.rs diff --git a/fighters/gaogaen/src/status.rs b/fighters/gaogaen/src/status/mod.rs similarity index 100% rename from fighters/gaogaen/src/status.rs rename to fighters/gaogaen/src/status/mod.rs diff --git a/fighters/iceclimber/src/status.rs b/fighters/iceclimber/src/status/mod.rs similarity index 100% rename from fighters/iceclimber/src/status.rs rename to fighters/iceclimber/src/status/mod.rs diff --git a/fighters/ike/src/status.rs b/fighters/ike/src/status/mod.rs similarity index 100% rename from fighters/ike/src/status.rs rename to fighters/ike/src/status/mod.rs diff --git a/fighters/inkling/src/status.rs b/fighters/inkling/src/status/mod.rs similarity index 100% rename from fighters/inkling/src/status.rs rename to fighters/inkling/src/status/mod.rs diff --git a/fighters/jack/src/status.rs b/fighters/jack/src/status/mod.rs similarity index 100% rename from fighters/jack/src/status.rs rename to fighters/jack/src/status/mod.rs diff --git a/fighters/kamui/src/status.rs b/fighters/kamui/src/status/mod.rs similarity index 100% rename from fighters/kamui/src/status.rs rename to fighters/kamui/src/status/mod.rs diff --git a/fighters/ken/src/status.rs b/fighters/ken/src/status/mod.rs similarity index 100% rename from fighters/ken/src/status.rs rename to fighters/ken/src/status/mod.rs diff --git a/fighters/kirby/src/status.rs b/fighters/kirby/src/status/mod.rs similarity index 100% rename from fighters/kirby/src/status.rs rename to fighters/kirby/src/status/mod.rs diff --git a/fighters/koopa/src/status.rs b/fighters/koopa/src/status/mod.rs similarity index 100% rename from fighters/koopa/src/status.rs rename to fighters/koopa/src/status/mod.rs diff --git a/fighters/koopajr/src/status.rs b/fighters/koopajr/src/status/mod.rs similarity index 100% rename from fighters/koopajr/src/status.rs rename to fighters/koopajr/src/status/mod.rs diff --git a/fighters/krool/src/status.rs b/fighters/krool/src/status/mod.rs similarity index 100% rename from fighters/krool/src/status.rs rename to fighters/krool/src/status/mod.rs diff --git a/fighters/link/src/status.rs b/fighters/link/src/status/mod.rs similarity index 100% rename from fighters/link/src/status.rs rename to fighters/link/src/status/mod.rs diff --git a/fighters/littlemac/src/status.rs b/fighters/littlemac/src/status/mod.rs similarity index 100% rename from fighters/littlemac/src/status.rs rename to fighters/littlemac/src/status/mod.rs diff --git a/fighters/lucario/src/status.rs b/fighters/lucario/src/status/mod.rs similarity index 100% rename from fighters/lucario/src/status.rs rename to fighters/lucario/src/status/mod.rs diff --git a/fighters/lucas/src/status.rs b/fighters/lucas/src/status/mod.rs similarity index 100% rename from fighters/lucas/src/status.rs rename to fighters/lucas/src/status/mod.rs diff --git a/fighters/lucina/src/status.rs b/fighters/lucina/src/status/mod.rs similarity index 100% rename from fighters/lucina/src/status.rs rename to fighters/lucina/src/status/mod.rs diff --git a/fighters/luigi/src/status.rs b/fighters/luigi/src/status/mod.rs similarity index 100% rename from fighters/luigi/src/status.rs rename to fighters/luigi/src/status/mod.rs diff --git a/fighters/mario/src/status.rs b/fighters/mario/src/status/mod.rs similarity index 100% rename from fighters/mario/src/status.rs rename to fighters/mario/src/status/mod.rs diff --git a/fighters/mariod/src/status.rs b/fighters/mariod/src/status/mod.rs similarity index 100% rename from fighters/mariod/src/status.rs rename to fighters/mariod/src/status/mod.rs diff --git a/fighters/marth/src/status.rs b/fighters/marth/src/status/mod.rs similarity index 100% rename from fighters/marth/src/status.rs rename to fighters/marth/src/status/mod.rs diff --git a/fighters/master/src/status.rs b/fighters/master/src/status/mod.rs similarity index 100% rename from fighters/master/src/status.rs rename to fighters/master/src/status/mod.rs diff --git a/fighters/metaknight/src/status.rs b/fighters/metaknight/src/status/mod.rs similarity index 100% rename from fighters/metaknight/src/status.rs rename to fighters/metaknight/src/status/mod.rs diff --git a/fighters/mewtwo/src/status.rs b/fighters/mewtwo/src/status/mod.rs similarity index 100% rename from fighters/mewtwo/src/status.rs rename to fighters/mewtwo/src/status/mod.rs diff --git a/fighters/miifighter/src/status.rs b/fighters/miifighter/src/status/mod.rs similarity index 100% rename from fighters/miifighter/src/status.rs rename to fighters/miifighter/src/status/mod.rs diff --git a/fighters/miigunner/src/status.rs b/fighters/miigunner/src/status/mod.rs similarity index 100% rename from fighters/miigunner/src/status.rs rename to fighters/miigunner/src/status/mod.rs diff --git a/fighters/miiswordsman/src/status.rs b/fighters/miiswordsman/src/status/mod.rs similarity index 100% rename from fighters/miiswordsman/src/status.rs rename to fighters/miiswordsman/src/status/mod.rs diff --git a/fighters/murabito/src/status.rs b/fighters/murabito/src/status/mod.rs similarity index 100% rename from fighters/murabito/src/status.rs rename to fighters/murabito/src/status/mod.rs diff --git a/fighters/ness/src/status.rs b/fighters/ness/src/status/mod.rs similarity index 100% rename from fighters/ness/src/status.rs rename to fighters/ness/src/status/mod.rs diff --git a/fighters/packun/src/status.rs b/fighters/packun/src/status/mod.rs similarity index 100% rename from fighters/packun/src/status.rs rename to fighters/packun/src/status/mod.rs diff --git a/fighters/pacman/src/status.rs b/fighters/pacman/src/status/mod.rs similarity index 100% rename from fighters/pacman/src/status.rs rename to fighters/pacman/src/status/mod.rs diff --git a/fighters/palutena/src/status.rs b/fighters/palutena/src/status/mod.rs similarity index 100% rename from fighters/palutena/src/status.rs rename to fighters/palutena/src/status/mod.rs diff --git a/fighters/peach/src/status.rs b/fighters/peach/src/status/mod.rs similarity index 100% rename from fighters/peach/src/status.rs rename to fighters/peach/src/status/mod.rs diff --git a/fighters/pfushigisou/src/status.rs b/fighters/pfushigisou/src/status/mod.rs similarity index 100% rename from fighters/pfushigisou/src/status.rs rename to fighters/pfushigisou/src/status/mod.rs diff --git a/fighters/pickel/src/status.rs b/fighters/pickel/src/status/mod.rs similarity index 100% rename from fighters/pickel/src/status.rs rename to fighters/pickel/src/status/mod.rs diff --git a/fighters/pikmin/src/status.rs b/fighters/pikmin/src/status/mod.rs similarity index 100% rename from fighters/pikmin/src/status.rs rename to fighters/pikmin/src/status/mod.rs diff --git a/fighters/pit/src/status.rs b/fighters/pit/src/status/mod.rs similarity index 100% rename from fighters/pit/src/status.rs rename to fighters/pit/src/status/mod.rs diff --git a/fighters/pitb/src/status.rs b/fighters/pitb/src/status/mod.rs similarity index 100% rename from fighters/pitb/src/status.rs rename to fighters/pitb/src/status/mod.rs diff --git a/fighters/plizardon/src/status.rs b/fighters/plizardon/src/status/mod.rs similarity index 100% rename from fighters/plizardon/src/status.rs rename to fighters/plizardon/src/status/mod.rs diff --git a/fighters/purin/src/status.rs b/fighters/purin/src/status/mod.rs similarity index 100% rename from fighters/purin/src/status.rs rename to fighters/purin/src/status/mod.rs diff --git a/fighters/pzenigame/src/status.rs b/fighters/pzenigame/src/status/mod.rs similarity index 100% rename from fighters/pzenigame/src/status.rs rename to fighters/pzenigame/src/status/mod.rs diff --git a/fighters/reflet/src/status.rs b/fighters/reflet/src/status/mod.rs similarity index 100% rename from fighters/reflet/src/status.rs rename to fighters/reflet/src/status/mod.rs diff --git a/fighters/ridley/src/status.rs b/fighters/ridley/src/status/mod.rs similarity index 100% rename from fighters/ridley/src/status.rs rename to fighters/ridley/src/status/mod.rs diff --git a/fighters/robot/src/status.rs b/fighters/robot/src/status/mod.rs similarity index 100% rename from fighters/robot/src/status.rs rename to fighters/robot/src/status/mod.rs diff --git a/fighters/rockman/src/status.rs b/fighters/rockman/src/status/mod.rs similarity index 100% rename from fighters/rockman/src/status.rs rename to fighters/rockman/src/status/mod.rs diff --git a/fighters/rosetta/src/status.rs b/fighters/rosetta/src/status/mod.rs similarity index 100% rename from fighters/rosetta/src/status.rs rename to fighters/rosetta/src/status/mod.rs diff --git a/fighters/roy/src/status.rs b/fighters/roy/src/status/mod.rs similarity index 100% rename from fighters/roy/src/status.rs rename to fighters/roy/src/status/mod.rs diff --git a/fighters/ryu/src/status.rs b/fighters/ryu/src/status/mod.rs similarity index 100% rename from fighters/ryu/src/status.rs rename to fighters/ryu/src/status/mod.rs diff --git a/fighters/samusd/src/status.rs b/fighters/samusd/src/status/mod.rs similarity index 100% rename from fighters/samusd/src/status.rs rename to fighters/samusd/src/status/mod.rs diff --git a/fighters/shizue/src/status.rs b/fighters/shizue/src/status/mod.rs similarity index 100% rename from fighters/shizue/src/status.rs rename to fighters/shizue/src/status/mod.rs diff --git a/fighters/shulk/src/status.rs b/fighters/shulk/src/status/mod.rs similarity index 100% rename from fighters/shulk/src/status.rs rename to fighters/shulk/src/status/mod.rs diff --git a/fighters/simon/src/status.rs b/fighters/simon/src/status/mod.rs similarity index 100% rename from fighters/simon/src/status.rs rename to fighters/simon/src/status/mod.rs diff --git a/fighters/snake/src/status.rs b/fighters/snake/src/status/mod.rs similarity index 100% rename from fighters/snake/src/status.rs rename to fighters/snake/src/status/mod.rs diff --git a/fighters/sonic/src/status.rs b/fighters/sonic/src/status/mod.rs similarity index 100% rename from fighters/sonic/src/status.rs rename to fighters/sonic/src/status/mod.rs diff --git a/fighters/szerosuit/src/status.rs b/fighters/szerosuit/src/status/mod.rs similarity index 100% rename from fighters/szerosuit/src/status.rs rename to fighters/szerosuit/src/status/mod.rs diff --git a/fighters/tantan/src/status.rs b/fighters/tantan/src/status/mod.rs similarity index 100% rename from fighters/tantan/src/status.rs rename to fighters/tantan/src/status/mod.rs diff --git a/fighters/toonlink/src/status.rs b/fighters/toonlink/src/status/mod.rs similarity index 100% rename from fighters/toonlink/src/status.rs rename to fighters/toonlink/src/status/mod.rs diff --git a/fighters/trail/src/status.rs b/fighters/trail/src/status/mod.rs similarity index 100% rename from fighters/trail/src/status.rs rename to fighters/trail/src/status/mod.rs diff --git a/fighters/wario/src/status.rs b/fighters/wario/src/status/mod.rs similarity index 100% rename from fighters/wario/src/status.rs rename to fighters/wario/src/status/mod.rs diff --git a/fighters/wiifit/src/status.rs b/fighters/wiifit/src/status/mod.rs similarity index 100% rename from fighters/wiifit/src/status.rs rename to fighters/wiifit/src/status/mod.rs diff --git a/fighters/wolf/src/status.rs b/fighters/wolf/src/status/mod.rs similarity index 100% rename from fighters/wolf/src/status.rs rename to fighters/wolf/src/status/mod.rs diff --git a/fighters/yoshi/src/status.rs b/fighters/yoshi/src/status/mod.rs similarity index 100% rename from fighters/yoshi/src/status.rs rename to fighters/yoshi/src/status/mod.rs diff --git a/fighters/younglink/src/status.rs b/fighters/younglink/src/status/mod.rs similarity index 100% rename from fighters/younglink/src/status.rs rename to fighters/younglink/src/status/mod.rs diff --git a/fighters/zelda/src/status.rs b/fighters/zelda/src/status/mod.rs similarity index 100% rename from fighters/zelda/src/status.rs rename to fighters/zelda/src/status/mod.rs From 5f3a6f44dcd6c3d240023ce57b7c2bea071fbad1 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Wed, 27 Mar 2024 16:32:37 -0400 Subject: [PATCH 152/172] Update aerials.rs --- fighters/buddy/src/acmd/aerials.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index 78f39ccc0c..a98c6b7352 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -409,7 +409,7 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -429,5 +429,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); - agent.acmd("game_landingairlw", null); + agent.acmd("game_landingairlw", stub); } From f3561b30ae6d8a792967f74ab939581b4cdcd0b2 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 08:53:36 -0500 Subject: [PATCH 153/172] n-q cleanup theres no q fighters but im technically not wrong also standardized "null" fns to "stub" --- fighters/diddy/src/acmd/specials.rs | 14 +- fighters/duckhunt/src/acmd/other.rs | 6 +- fighters/edge/src/fire/acmd.rs | 6 +- fighters/elight/src/acmd/aerials.rs | 4 +- fighters/falco/src/acmd/specials.rs | 14 +- fighters/gamewatch/src/acmd/aerials.rs | 4 +- fighters/kamui/src/acmd/aerials.rs | 4 +- fighters/ken/src/acmd/specials/special_lw.rs | 8 +- fighters/mario/src/acmd/aerials.rs | 4 +- fighters/mario/src/pump/acmd.rs | 4 +- fighters/mario/src/pumpwater/acmd.rs | 12 +- fighters/murabito/src/slingshot/acmd.rs | 4 +- fighters/ness/src/acmd/aerials.rs | 179 +++++++------ fighters/ness/src/acmd/ground.rs | 4 +- fighters/ness/src/acmd/other.rs | 18 +- fighters/ness/src/acmd/smashes.rs | 5 +- fighters/ness/src/acmd/specials.rs | 15 +- fighters/ness/src/acmd/throws.rs | 8 +- fighters/ness/src/acmd/tilts.rs | 13 +- fighters/ness/src/opff.rs | 7 - fighters/ness/src/pkfire/acmd.rs | 3 +- fighters/ness/src/pkflash/acmd.rs | 1 + fighters/ness/src/pkthunder/acmd.rs | 7 +- fighters/ness/src/pkthunder/mod.rs | 4 + fighters/ness/src/pkthunder/opff.rs | 12 + fighters/ness/src/pkthunder/status.rs | 26 ++ fighters/ness/src/status/attack_air.rs | 11 + fighters/ness/src/status/mod.rs | 108 +------- fighters/ness/src/status/special_hi.rs | 83 ++++++ fighters/ness/src/yoyo/acmd.rs | 2 + fighters/packun/src/acmd/other.rs | 4 +- fighters/palutena/src/acmd/aerials.rs | 5 - fighters/palutena/src/acmd/ground.rs | 4 +- fighters/palutena/src/acmd/other.rs | 4 +- fighters/palutena/src/acmd/smashes.rs | 1 - fighters/palutena/src/acmd/specials.rs | 2 - fighters/palutena/src/acmd/throws.rs | 5 +- fighters/palutena/src/acmd/tilts.rs | 3 - fighters/palutena/src/opff.rs | 17 -- fighters/palutena/src/reflectionboard/acmd.rs | 1 - fighters/palutena/src/reflectionboard/mod.rs | 2 + fighters/palutena/src/reflectionboard/opff.rs | 21 ++ fighters/palutena/src/status/special_n.rs | 1 - fighters/peach/src/acmd/aerials.rs | 7 +- fighters/peach/src/acmd/ground.rs | 1 + fighters/peach/src/acmd/other.rs | 1 - fighters/peach/src/acmd/smashes.rs | 1 - fighters/peach/src/acmd/specials.rs | 4 +- fighters/peach/src/acmd/throws.rs | 4 +- fighters/peach/src/acmd/tilts.rs | 4 +- fighters/peach/src/opff.rs | 2 + fighters/pfushigisou/src/acmd/aerials.rs | 12 +- fighters/pfushigisou/src/acmd/ground.rs | 2 +- fighters/pfushigisou/src/acmd/other.rs | 2 - fighters/pfushigisou/src/acmd/smashes.rs | 15 +- fighters/pfushigisou/src/acmd/specials.rs | 6 +- fighters/pfushigisou/src/acmd/throws.rs | 2 - fighters/pfushigisou/src/acmd/tilts.rs | 6 +- fighters/pfushigisou/src/status/mod.rs | 14 +- fighters/pfushigisou/src/status/special_lw.rs | 17 ++ fighters/pickel/src/status/mod.rs | 5 +- fighters/pikachu/src/acmd/aerials.rs | 12 +- fighters/pikmin/src/acmd/aerials.rs | 243 +++++++++--------- fighters/pikmin/src/acmd/ground.rs | 1 + fighters/pikmin/src/acmd/other.rs | 50 +--- fighters/pikmin/src/acmd/smashes.rs | 1 - fighters/pikmin/src/acmd/specials.rs | 12 +- fighters/pikmin/src/acmd/tilts.rs | 5 +- fighters/pikmin/src/opff.rs | 1 + fighters/pikmin/src/pikmin/acmd/aerials.rs | 4 + fighters/pikmin/src/pikmin/acmd/other.rs | 1 - fighters/pikmin/src/pikmin/acmd/smashes.rs | 85 +++--- fighters/pikmin/src/pikmin/acmd/specials.rs | 44 ++-- fighters/pikmin/src/pikmin/acmd/throws.rs | 44 ++-- fighters/pikmin/src/pikmin/status.rs | 12 +- fighters/pikmin/src/status/attack_air.rs | 1 - fighters/pikmin/src/status/escape_air.rs | 1 - fighters/pikmin/src/status/rebirth.rs | 1 - fighters/pit/src/acmd/aerials.rs | 9 +- fighters/pit/src/acmd/ground.rs | 17 +- fighters/pit/src/acmd/other.rs | 115 ++------- fighters/pit/src/acmd/smashes.rs | 3 +- fighters/pit/src/acmd/specials.rs | 2 + fighters/pit/src/acmd/throws.rs | 3 +- fighters/pit/src/acmd/tilts.rs | 5 +- fighters/pit/src/status/special_hi.rs | 1 - fighters/pit/src/status/special_s.rs | 1 - fighters/pitb/src/acmd/aerials.rs | 9 +- fighters/pitb/src/acmd/ground.rs | 1 + fighters/pitb/src/acmd/other.rs | 4 - fighters/pitb/src/acmd/smashes.rs | 4 +- fighters/pitb/src/acmd/specials.rs | 4 +- fighters/pitb/src/acmd/throws.rs | 3 +- fighters/pitb/src/acmd/tilts.rs | 6 +- fighters/pitb/src/opff.rs | 1 - fighters/pitb/src/status/special_hi.rs | 13 +- fighters/plizardon/src/acmd/aerials.rs | 11 +- fighters/plizardon/src/acmd/ground.rs | 2 +- fighters/plizardon/src/acmd/other.rs | 4 - fighters/plizardon/src/acmd/smashes.rs | 6 +- fighters/plizardon/src/acmd/specials.rs | 1 - fighters/plizardon/src/acmd/throws.rs | 2 +- fighters/plizardon/src/acmd/tilts.rs | 24 +- fighters/plizardon/src/opff.rs | 2 +- fighters/plizardon/src/status/mod.rs | 26 +- fighters/plizardon/src/status/special_lw.rs | 12 + fighters/plizardon/src/status/special_s.rs | 3 +- fighters/pzenigame/src/acmd/aerials.rs | 20 +- fighters/pzenigame/src/acmd/ground.rs | 3 +- fighters/pzenigame/src/acmd/other.rs | 2 - fighters/pzenigame/src/acmd/smashes.rs | 32 +-- fighters/pzenigame/src/acmd/specials.rs | 3 - fighters/pzenigame/src/acmd/throws.rs | 2 - fighters/pzenigame/src/acmd/tilts.rs | 14 +- fighters/pzenigame/src/opff.rs | 2 +- fighters/pzenigame/src/status/mod.rs | 27 +- fighters/pzenigame/src/status/run.rs | 13 + fighters/pzenigame/src/status/special_lw.rs | 14 + fighters/pzenigame/src/status/special_s.rs | 13 + fighters/robot/src/acmd/specials.rs | 10 +- fighters/robot/src/status/special_hi.rs | 10 +- fighters/robot/src/status/special_s.rs | 14 +- fighters/sonic/src/acmd/specials.rs | 6 +- fighters/szerosuit/src/acmd/aerials.rs | 6 +- fighters/szerosuit/src/acmd/throws.rs | 4 +- fighters/younglink/src/acmd/throws.rs | 4 +- 126 files changed, 815 insertions(+), 961 deletions(-) create mode 100644 fighters/ness/src/pkthunder/opff.rs create mode 100644 fighters/ness/src/pkthunder/status.rs create mode 100644 fighters/ness/src/status/attack_air.rs create mode 100644 fighters/ness/src/status/special_hi.rs create mode 100644 fighters/palutena/src/reflectionboard/opff.rs create mode 100644 fighters/pfushigisou/src/status/special_lw.rs create mode 100644 fighters/plizardon/src/status/special_lw.rs create mode 100644 fighters/pzenigame/src/status/run.rs create mode 100644 fighters/pzenigame/src/status/special_lw.rs create mode 100644 fighters/pzenigame/src/status/special_s.rs diff --git a/fighters/diddy/src/acmd/specials.rs b/fighters/diddy/src/acmd/specials.rs index 357b8908c8..9641e7b8e9 100644 --- a/fighters/diddy/src/acmd/specials.rs +++ b/fighters/diddy/src/acmd/specials.rs @@ -115,17 +115,17 @@ unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_specialncancel", game_specialncancel); - agent.acmd("effect_specialncancel", null); - agent.acmd("sound_specialncancel", null); - agent.acmd("expression_specialncancel", null); + agent.acmd("effect_specialncancel", stub); + agent.acmd("sound_specialncancel", stub); + agent.acmd("expression_specialncancel", stub); agent.acmd("game_specialairncancel", game_specialncancel); - agent.acmd("effect_specialairncancel", null); - agent.acmd("sound_specialairncancel", null); - agent.acmd("expression_specialairncancel", null); + agent.acmd("effect_specialairncancel", stub); + agent.acmd("sound_specialairncancel", stub); + agent.acmd("expression_specialairncancel", stub); agent.acmd("game_specialsstickattack", game_specialsstickattack); agent.acmd("game_specialsstickattack2", game_specialsstickattack2); diff --git a/fighters/duckhunt/src/acmd/other.rs b/fighters/duckhunt/src/acmd/other.rs index 286182b86a..e6b1140c53 100644 --- a/fighters/duckhunt/src/acmd/other.rs +++ b/fighters/duckhunt/src/acmd/other.rs @@ -127,7 +127,7 @@ unsafe extern "C" fn expression_appeals(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); @@ -143,8 +143,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("effect_appealsl", null); - agent.acmd("effect_appealsr", null); + agent.acmd("effect_appealsl", stub); + agent.acmd("effect_appealsr", stub); agent.acmd("sound_appealsl", sound_appeals); agent.acmd("sound_appealsr", sound_appeals); agent.acmd("expression_appealsl", expression_appeals); diff --git a/fighters/edge/src/fire/acmd.rs b/fighters/edge/src/fire/acmd.rs index 36d077f04b..bf91f3bc97 100644 --- a/fighters/edge/src/fire/acmd.rs +++ b/fighters/edge/src/fire/acmd.rs @@ -19,11 +19,11 @@ unsafe extern "C" fn game_bursts(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn1", null); - agent.acmd("game_specialn2", null); + agent.acmd("game_specialn1", stub); + agent.acmd("game_specialn2", stub); agent.acmd("game_bursts", game_bursts); } \ No newline at end of file diff --git a/fighters/elight/src/acmd/aerials.rs b/fighters/elight/src/acmd/aerials.rs index a3a131169a..372d11099e 100644 --- a/fighters/elight/src/acmd/aerials.rs +++ b/fighters/elight/src/acmd/aerials.rs @@ -289,11 +289,11 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); - agent.acmd("game_landingairn", null); + agent.acmd("game_landingairn", stub); agent.acmd("game_attackairf", game_attackairf); diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index fa4ea2e8b1..9549c17447 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -314,7 +314,7 @@ unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { // } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_specialnstart", game_specialnstart); @@ -343,12 +343,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairlwloop", sound_speciallwloop); agent.acmd("expression_speciallwloop", expression_speciallwloop); agent.acmd("expression_specialairlwloop", expression_speciallwloop); - agent.acmd("game_speciallwend", null); - agent.acmd("game_specialairlwend", null); - agent.acmd("effect_speciallwend", null); - agent.acmd("effect_specialairlwend", null); - agent.acmd("sound_speciallwend", null); - agent.acmd("sound_specialairlwend", null); + agent.acmd("game_speciallwend", stub); + agent.acmd("game_specialairlwend", stub); + agent.acmd("effect_speciallwend", stub); + agent.acmd("effect_specialairlwend", stub); + agent.acmd("sound_speciallwend", stub); + agent.acmd("sound_specialairlwend", stub); agent.acmd("expression_speciallwend", expression_speciallwend); agent.acmd("expression_specialairlwend", expression_speciallwend); agent.acmd("sound_specialnstart", sound_specialnstart); diff --git a/fighters/gamewatch/src/acmd/aerials.rs b/fighters/gamewatch/src/acmd/aerials.rs index e27f591687..e8197fc324 100644 --- a/fighters/gamewatch/src/acmd/aerials.rs +++ b/fighters/gamewatch/src/acmd/aerials.rs @@ -305,7 +305,7 @@ unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -322,6 +322,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_landingairlw", null); + agent.acmd("game_landingairlw", stub); agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/kamui/src/acmd/aerials.rs b/fighters/kamui/src/acmd/aerials.rs index 257522e3ac..f2222999b7 100644 --- a/fighters/kamui/src/acmd/aerials.rs +++ b/fighters/kamui/src/acmd/aerials.rs @@ -347,7 +347,7 @@ unsafe extern "C" fn effect_landingairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -366,6 +366,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); - agent.acmd("game_landingairlw", null); + agent.acmd("game_landingairlw", stub); agent.acmd("effect_landingairlw", effect_landingairlw); } diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index 37c6d056f2..d4d43f6e83 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -125,17 +125,17 @@ unsafe extern "C" fn effect_specialairlwstepf(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_speciallwinstall", game_speciallwinstall); - agent.acmd("effect_speciallwinstall", null); + agent.acmd("effect_speciallwinstall", stub); agent.acmd("sound_speciallwinstall", sound_speciallwinstall); agent.acmd("expression_speciallwinstall", expression_speciallwinstall); agent.acmd("game_speciallwstepf", game_speciallwstepf); agent.acmd("effect_speciallwstepf", effect_speciallwstepf); agent.acmd("game_specialairlwstepf", game_specialairlwstepf); agent.acmd("effect_specialairlwstepf", effect_specialairlwstepf); - agent.acmd("effect_speciallwstart", null); - agent.acmd("effect_specialairlwstart", null); + agent.acmd("effect_speciallwstart", stub); + agent.acmd("effect_specialairlwstart", stub); } diff --git a/fighters/mario/src/acmd/aerials.rs b/fighters/mario/src/acmd/aerials.rs index 51a0b45a03..bc5db3fb17 100644 --- a/fighters/mario/src/acmd/aerials.rs +++ b/fighters/mario/src/acmd/aerials.rs @@ -238,7 +238,7 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -255,5 +255,5 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairlw", sound_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); - agent.acmd("game_landingairlw", null); + agent.acmd("game_landingairlw", stub); } diff --git a/fighters/mario/src/pump/acmd.rs b/fighters/mario/src/pump/acmd.rs index 62107595aa..bcb15741e8 100644 --- a/fighters/mario/src/pump/acmd.rs +++ b/fighters/mario/src/pump/acmd.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("effect_light", null); + agent.acmd("effect_light", stub); } \ No newline at end of file diff --git a/fighters/mario/src/pumpwater/acmd.rs b/fighters/mario/src/pumpwater/acmd.rs index 8a336dd9a0..fb93efb831 100644 --- a/fighters/mario/src/pumpwater/acmd.rs +++ b/fighters/mario/src/pumpwater/acmd.rs @@ -1,11 +1,11 @@ use super::*; -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("game_regular", null); - agent.acmd("effect_regular", null); - agent.acmd("sound_regular", null); - agent.acmd("effect_hit", null); - agent.acmd("effect_clash", null); + agent.acmd("game_regular", stub); + agent.acmd("effect_regular", stub); + agent.acmd("sound_regular", stub); + agent.acmd("effect_hit", stub); + agent.acmd("effect_clash", stub); } \ No newline at end of file diff --git a/fighters/murabito/src/slingshot/acmd.rs b/fighters/murabito/src/slingshot/acmd.rs index 7e510f37f9..53d339490d 100644 --- a/fighters/murabito/src/slingshot/acmd.rs +++ b/fighters/murabito/src/slingshot/acmd.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairb", null); + agent.acmd("game_attackairb", stub); } diff --git a/fighters/ness/src/acmd/aerials.rs b/fighters/ness/src/acmd/aerials.rs index 0bef0c6926..341c95823f 100644 --- a/fighters/ness/src/acmd/aerials.rs +++ b/fighters/ness/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -25,7 +24,33 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + agent.clear_lua_stack(); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4.7, 4, 40, 0, -13, 0.7, true); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + agent.pop_lua_stack(1); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + agent.pop_lua_stack(1); + } + frame(lua_state, 11.0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + agent.pop_lua_stack(1); + agent.clear_lua_stack(); + lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + agent.pop_lua_stack(1); + } } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -68,7 +93,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -115,7 +139,20 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } +} +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -2, 3.7, 3, 0, 180, 0, 0.85, true, *EF_FLIP_YZ); + LAST_PARTICLE_SET_COLOR(agent, 0.2, 1, 0.8); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("ness_psi_atk"), Hash40::new("ness_psi_atk"), Hash40::new("top"), -3.0, 4, -8.45, 0, 180, 0, 1.24, true, *EF_FLIP_YZ); + } } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -147,76 +184,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - MotionModule::set_rate(boma, 2.72); - frame(lua_state, 19.0); - MotionModule::set_rate(boma, 1.0); - frame(lua_state, 20.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 270, 74, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 270, 37, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - } - frame(lua_state, 24.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 45, 74, 0, 30, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 27.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 39.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn effect_attackairn (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - agent.clear_lua_stack(); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4.7, 4, 40, 0, -13, 0.7, true); - lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); - agent.pop_lua_stack(1); - lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); - agent.pop_lua_stack(1); - } - frame(lua_state, 11.0); - if is_excute(agent) { - agent.clear_lua_stack(); - lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); - agent.pop_lua_stack(1); - agent.clear_lua_stack(); - lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); - agent.pop_lua_stack(1); - } -} - -unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -2, 3.7, 3, 0, 180, 0, 0.85, true, *EF_FLIP_YZ); - LAST_PARTICLE_SET_COLOR(agent, 0.2, 1, 0.8); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("ness_psi_atk"), Hash40::new("ness_psi_atk"), Hash40::new("top"), -3.0, 4, -8.45, 0, 180, 0, 1.24, true, *EF_FLIP_YZ); - } -} - unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -254,20 +221,6 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4.0, 0, 0, 0, 0, 0.27, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.3); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0.3 * PostureModule::lr(boma), -0.9, 0, 0, 0, 0, 1.5, true); - } -} - unsafe extern "C" fn sound_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -292,17 +245,63 @@ unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + MotionModule::set_rate(boma, 2.72); + frame(lua_state, 19.0); + MotionModule::set_rate(boma, 1.0); + frame(lua_state, 20.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + ATTACK(agent, 0, 0, Hash40::new("kneer"), 14.0, 270, 74, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 270, 37, 0, 37, 6.0, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 12.0, 45, 74, 0, 30, 4.5, 2.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PSI); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 27.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 39.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, -4.0, 0, 0, 0, 0, 0.27, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("ness_psi_atk"), Hash40::new("top"), 0.3 * PostureModule::lr(boma), -0.9, 0, 0, 0, 0, 1.5, true); + } +} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); - agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairhi", sound_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/ness/src/acmd/ground.rs b/fighters/ness/src/acmd/ground.rs index db0862646a..e42706853f 100644 --- a/fighters/ness/src/acmd/ground.rs +++ b/fighters/ness/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -42,7 +40,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -79,5 +76,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ness/src/acmd/other.rs b/fighters/ness/src/acmd/other.rs index 8b543f12e4..086e445640 100644 --- a/fighters/ness/src/acmd/other.rs +++ b/fighters/ness/src/acmd/other.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -70,13 +69,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -90,7 +88,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -126,15 +123,18 @@ unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflyhi); - agent.acmd("sound_damageflyn", sound_damageflyhi); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflyhi); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("effect_jumpaerialfront", effect_jumpaerialfront); agent.acmd("effect_jumpaerialback", effect_jumpaerialback); } diff --git a/fighters/ness/src/acmd/smashes.rs b/fighters/ness/src/acmd/smashes.rs index 8305efa1fe..45d0674925 100644 --- a/fighters/ness/src/acmd/smashes.rs +++ b/fighters/ness/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -36,7 +35,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { VisibilityModule::set_int64(boma, Hash40::new("bat").hash as i64, Hash40::new("bat_invisible").hash as i64); } - } unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { @@ -158,10 +156,13 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("expression_attackhi4", expression_attackhi4); agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index c4e3492ed1..75328d92e3 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -1,11 +1,5 @@ use super::*; -unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { -} - -unsafe extern "C" fn game_specialairnfire(agent: &mut L2CAgentBase) { -} - unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -192,14 +186,19 @@ unsafe extern "C" fn effect_specialairlwend (agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { - agent.acmd("game_specialnfire", game_specialnfire); - agent.acmd("game_specialairnfire", game_specialairnfire); + agent.acmd("game_specialnfire", stub); + agent.acmd("game_specialairnfire", stub); + agent.acmd("sound_specials", sound_specials); agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specialairs); agent.acmd("sound_specialairs", sound_specialairs); + agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallwhold", game_speciallwhold); agent.acmd("game_specialairlwhold", game_specialairlwhold); agent.acmd("game_speciallwend", game_speciallwend); diff --git a/fighters/ness/src/acmd/throws.rs b/fighters/ness/src/acmd/throws.rs index 86663abcee..dbb6afbe51 100644 --- a/fighters/ness/src/acmd/throws.rs +++ b/fighters/ness/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -43,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -64,7 +61,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { @@ -177,8 +173,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ness/src/acmd/tilts.rs b/fighters/ness/src/acmd/tilts.rs index 56aae59d8b..189b8901e7 100644 --- a/fighters/ness/src/acmd/tilts.rs +++ b/fighters/ness/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -13,10 +12,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -28,7 +26,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -44,7 +41,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -100,14 +96,15 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO_INPUT); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/ness/src/opff.rs b/fighters/ness/src/opff.rs index 4d464256fc..65179afc4d 100644 --- a/fighters/ness/src/opff.rs +++ b/fighters/ness/src/opff.rs @@ -213,13 +213,6 @@ pub unsafe fn ness_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub unsafe extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, ness_frame_wrapper); - agent.on_line(Main, pkthunder_callback); } \ No newline at end of file diff --git a/fighters/ness/src/pkfire/acmd.rs b/fighters/ness/src/pkfire/acmd.rs index 163ec3bb1f..924b477276 100644 --- a/fighters/ness/src/pkfire/acmd.rs +++ b/fighters/ness/src/pkfire/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,7 +8,6 @@ unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 1.75, 68, 30, 0, 10, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); } - } unsafe extern "C" fn game_pillarair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; @@ -17,7 +17,6 @@ unsafe extern "C" fn game_pillarair(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 1.75, 58, 45, 0, 14, 4.5, 0.0, 9.6, 2.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PSI); AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/ness/src/pkflash/acmd.rs b/fighters/ness/src/pkflash/acmd.rs index e77b1bbd86..a3d27dc89e 100644 --- a/fighters/ness/src/pkflash/acmd.rs +++ b/fighters/ness/src/pkflash/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_bang(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/ness/src/pkthunder/acmd.rs b/fighters/ness/src/pkthunder/acmd.rs index eb55368710..ac19f44d09 100644 --- a/fighters/ness/src/pkthunder/acmd.rs +++ b/fighters/ness/src/pkthunder/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -12,6 +13,7 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } } } + unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -25,7 +27,8 @@ unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { } } } + pub fn install(agent: &mut Agent) { -agent.acmd("game_move", game_move); -agent.acmd("game_movechild", game_movechild); + agent.acmd("game_move", game_move); + agent.acmd("game_movechild", game_movechild); } diff --git a/fighters/ness/src/pkthunder/mod.rs b/fighters/ness/src/pkthunder/mod.rs index b14502e9d8..872632b8ab 100644 --- a/fighters/ness/src/pkthunder/mod.rs +++ b/fighters/ness/src/pkthunder/mod.rs @@ -1,9 +1,13 @@ use super::*; mod acmd; +mod opff; +mod status; pub fn install() { let agent = &mut Agent::new("ness_pkthunder"); acmd::install(agent); + opff::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/ness/src/pkthunder/opff.rs b/fighters/ness/src/pkthunder/opff.rs new file mode 100644 index 0000000000..5d856f6729 --- /dev/null +++ b/fighters/ness/src/pkthunder/opff.rs @@ -0,0 +1,12 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub unsafe extern "C" fn pkthunder_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + WorkModule::on_flag(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_FLAG_NO_DEAD); +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, pkthunder_callback); +} \ No newline at end of file diff --git a/fighters/ness/src/pkthunder/status.rs b/fighters/ness/src/pkthunder/status.rs new file mode 100644 index 0000000000..b869509b58 --- /dev/null +++ b/fighters/ness/src/pkthunder/status.rs @@ -0,0 +1,26 @@ +use super::*; +use globals::*; +utils::import!(common::djc::attack_air_main_status); +// status script import + +// WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE + +unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { + if !VarModule::is_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE) { + let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); + let parent_object = get_battle_object_from_id(parent_id as u32); + if !parent_object.is_null() + && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_NESS + && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD { + VarModule::on_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE); + MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); + return 0.into(); + } + smashline::original_status(Exec, weapon, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); +} \ No newline at end of file diff --git a/fighters/ness/src/status/attack_air.rs b/fighters/ness/src/status/attack_air.rs new file mode 100644 index 0000000000..31f24d518e --- /dev/null +++ b/fighters/ness/src/status/attack_air.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR // + +pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { + common::djc::attack_air_main_status(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); +} \ No newline at end of file diff --git a/fighters/ness/src/status/mod.rs b/fighters/ness/src/status/mod.rs index 262a4244f2..49290a2399 100644 --- a/fighters/ness/src/status/mod.rs +++ b/fighters/ness/src/status/mod.rs @@ -3,110 +3,10 @@ use globals::*; utils::import!(common::djc::attack_air_main_status); // status script import -// WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE - -unsafe extern "C" fn move_exec(weapon: &mut L2CFighterCommon) -> L2CValue { - if !VarModule::is_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE) { - let parent_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID); - let parent_object = get_battle_object_from_id(parent_id as u32); - if !parent_object.is_null() - && sv_battle_object::kind(parent_id as u32) == *FIGHTER_KIND_NESS - && StatusModule::status_kind((*parent_object).module_accessor) != *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD { - VarModule::on_flag(weapon.object(), vars::ness::status::THUNDER_LOOSE); - MotionModule::change_motion_force_inherit_frame(weapon.module_accessor, Hash40::new("move"), 0.0, 1.0, 1.0); - return 0.into(); - } - smashline::original_status(Exec, weapon, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE)(weapon); - } - 0.into() -} - -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD // - -unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if LinkModule::is_link(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER) { - LinkModule::unlink(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER); - } - if [*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - if fighter.get_int(*FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { - EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); - fighter.set_int(0, *FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_ATTACK_AIR // - -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { - common::djc::attack_air_main_status(fighter) -} - -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK // - -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); - if !StopModule::is_stop(fighter.module_accessor) { - sub_special_hi_attack(fighter); - } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) -} - -unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - // this does...something? - if !fighter.is_flag(*FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else { - if fighter.is_situation(*SITUATION_KIND_AIR) { - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else { - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - } - if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { - AttackModule::clear_inflict_kind_status(fighter.module_accessor); - } - 0.into() -} - -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into(); - } - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.is_flag(*FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) && fighter.is_situation(*SITUATION_KIND_GROUND) { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), false.into()); - return 1.into(); - } - // [insert stubbed redirection/bonk function here] - // LOL good riddance fucker - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && fighter.status_frame() >= 38 { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); - let fall_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "fall_max_x_mul"); - sv_kinetic_energy!( - set_stable_speed, - fighter, - FIGHTER_KINETIC_ENERGY_ID_CONTROL, - air_speed_x_stable * fall_x_mul, - 0.0 - ); - } - 0.into() - } - else { - fighter.change_status(FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END.into(), false.into()); - 1.into() - } -} +mod attack_air; +mod special_hi; pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); - agent.status(End, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); - agent.status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack); - agent.status(Exec, *WEAPON_NESS_PK_THUNDER_STATUS_KIND_MOVE, move_exec); + attack_air::install(agent); + special_hi::install(agent); } \ No newline at end of file diff --git a/fighters/ness/src/status/special_hi.rs b/fighters/ness/src/status/special_hi.rs new file mode 100644 index 0000000000..816c31f750 --- /dev/null +++ b/fighters/ness/src/status/special_hi.rs @@ -0,0 +1,83 @@ +use super::*; + +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD // + +unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER) { + LinkModule::unlink(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER); + } + if [*FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_REFLECT].contains(&fighter.global_table[STATUS_KIND].get_i32()) { + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_THUNDER, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + if fighter.get_int(*FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) != 0 { + EffectModule::detach(fighter.module_accessor, fighter.get_int(*FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE) as u32, 5); + fighter.set_int(0, *FIGHTER_NESS_STATUS_SPECIAL_HI_WORK_INT_GUIDE_EFFECT_HANDLE); + } + 0.into() +} + +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK // + +pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); + if !StopModule::is_stop(fighter.module_accessor) { + sub_special_hi_attack(fighter); + } + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); + fighter.main_shift(special_hi_attack_main) +} + +unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + // this does...something? + if !fighter.is_flag(*FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_ATTACK_FALL_START) { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else { + if fighter.is_situation(*SITUATION_KIND_AIR) { + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else { + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + } + if AttackModule::is_infliction(fighter.module_accessor, *COLLISION_KIND_MASK_ALL) { + AttackModule::clear_inflict_kind_status(fighter.module_accessor); + } + 0.into() +} + +unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into(); + } + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.is_flag(*FIGHTER_NESS_STATUS_SPECIAL_HI_FLAG_LANDING_ENABLE) && fighter.is_situation(*SITUATION_KIND_GROUND) { + fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(), false.into()); + return 1.into(); + } + // [insert stubbed redirection/bonk function here] + // LOL good riddance fucker + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && fighter.status_frame() >= 38 { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let fall_x_mul = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "fall_max_x_mul"); + sv_kinetic_energy!( + set_stable_speed, + fighter, + FIGHTER_KINETIC_ENERGY_ID_CONTROL, + air_speed_x_stable * fall_x_mul, + 0.0 + ); + } + 0.into() + } + else { + fighter.change_status(FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_END.into(), false.into()); + 1.into() + } +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); + agent.status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack); +} \ No newline at end of file diff --git a/fighters/ness/src/yoyo/acmd.rs b/fighters/ness/src/yoyo/acmd.rs index fd5f4e18c0..f8ed9bc81d 100644 --- a/fighters/ness/src/yoyo/acmd.rs +++ b/fighters/ness/src/yoyo/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -19,6 +20,7 @@ unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { } frame(lua_state, 37.0); } + unsafe extern "C" fn game_attacklw4 (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 1a052027c1..6d3a9d1784 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -243,7 +243,7 @@ unsafe extern "C" fn sound_appeallw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); @@ -259,7 +259,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_appealhir", sound_appealhi); agent.acmd("game_appealhi2", game_appealhi2); - agent.acmd("effect_appealhi2", null); + agent.acmd("effect_appealhi2", stub); agent.acmd("sound_appealhi2", sound_appealhi2); agent.acmd("expression_appealhi2", expression_appealhi2); diff --git a/fighters/palutena/src/acmd/aerials.rs b/fighters/palutena/src/acmd/aerials.rs index 81f42f786c..e664008898 100644 --- a/fighters/palutena/src/acmd/aerials.rs +++ b/fighters/palutena/src/acmd/aerials.rs @@ -44,7 +44,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -81,7 +80,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -136,7 +134,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -204,7 +201,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -278,7 +274,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { diff --git a/fighters/palutena/src/acmd/ground.rs b/fighters/palutena/src/acmd/ground.rs index 1ec93b3934..e46fbbeca2 100644 --- a/fighters/palutena/src/acmd/ground.rs +++ b/fighters/palutena/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -25,7 +24,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { @@ -103,7 +101,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 20.0/(40.0-18.0)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -141,6 +138,7 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/other.rs b/fighters/palutena/src/acmd/other.rs index 69aedecb8c..05b48cf3cc 100644 --- a/fighters/palutena/src/acmd/other.rs +++ b/fighters/palutena/src/acmd/other.rs @@ -49,7 +49,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -75,7 +74,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -113,9 +111,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/smashes.rs b/fighters/palutena/src/acmd/smashes.rs index 91c38a18b5..b67da2998d 100644 --- a/fighters/palutena/src/acmd/smashes.rs +++ b/fighters/palutena/src/acmd/smashes.rs @@ -94,7 +94,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { diff --git a/fighters/palutena/src/acmd/specials.rs b/fighters/palutena/src/acmd/specials.rs index 9660eda878..838e0d77b7 100644 --- a/fighters/palutena/src/acmd/specials.rs +++ b/fighters/palutena/src/acmd/specials.rs @@ -572,7 +572,6 @@ unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_REFLECTIONBOARD, false, 0); } - } unsafe extern "C" fn effect_specialno(agent: &mut L2CAgentBase) { @@ -749,7 +748,6 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { diff --git a/fighters/palutena/src/acmd/throws.rs b/fighters/palutena/src/acmd/throws.rs index 00eb1c93be..d34f0dfa44 100644 --- a/fighters/palutena/src/acmd/throws.rs +++ b/fighters/palutena/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -154,8 +153,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/palutena/src/acmd/tilts.rs b/fighters/palutena/src/acmd/tilts.rs index cf256245d1..bb3992bf77 100644 --- a/fighters/palutena/src/acmd/tilts.rs +++ b/fighters/palutena/src/acmd/tilts.rs @@ -41,7 +41,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); } - } unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { @@ -180,7 +179,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -323,7 +321,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 12.0/(35.0-25.0)); AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { diff --git a/fighters/palutena/src/opff.rs b/fighters/palutena/src/opff.rs index c87d0ea54d..8ef0556fb8 100644 --- a/fighters/palutena/src/opff.rs +++ b/fighters/palutena/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -341,23 +340,7 @@ pub unsafe fn palutena_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -pub extern "C" fn reflection_board_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - unsafe { - if weapon.is_status(*WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_SHOOT) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let palutena = utils::util::get_battle_object_from_id(owner_id); - let palutena_boma = &mut *(*palutena).module_accessor; - if AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_ATTACK){ - StatusModule::change_status_request_from_script(weapon.module_accessor, *WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_BREAK, false); - } - } - } -} - pub fn install(agent: &mut Agent) { agent.on_line(Main, palutena_frame_wrapper); agent.on_line(Main, palu_power_board); - smashline::Agent::new("palutena_reflectionboard") - .on_line(Main, reflection_board_callback) - .install(); } \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/acmd.rs b/fighters/palutena/src/reflectionboard/acmd.rs index 28f3a5c2d0..fb48bb1e42 100644 --- a/fighters/palutena/src/reflectionboard/acmd.rs +++ b/fighters/palutena/src/reflectionboard/acmd.rs @@ -12,7 +12,6 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/palutena/src/reflectionboard/mod.rs b/fighters/palutena/src/reflectionboard/mod.rs index f024ea67bf..8cf73eee3e 100644 --- a/fighters/palutena/src/reflectionboard/mod.rs +++ b/fighters/palutena/src/reflectionboard/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("palutena_reflectionboard"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/palutena/src/reflectionboard/opff.rs b/fighters/palutena/src/reflectionboard/opff.rs new file mode 100644 index 0000000000..e32424b626 --- /dev/null +++ b/fighters/palutena/src/reflectionboard/opff.rs @@ -0,0 +1,21 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +pub extern "C" fn reflection_board_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + unsafe { + if weapon.is_status(*WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_SHOOT) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let palutena = utils::util::get_battle_object_from_id(owner_id); + let palutena_boma = &mut *(*palutena).module_accessor; + if AttackModule::is_infliction_status(weapon.module_accessor, *COLLISION_KIND_MASK_ATTACK){ + StatusModule::change_status_request_from_script(weapon.module_accessor, *WEAPON_PALUTENA_REFLECTIONBOARD_STATUS_KIND_BREAK, false); + } + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, reflection_board_callback); +} \ No newline at end of file diff --git a/fighters/palutena/src/status/special_n.rs b/fighters/palutena/src/status/special_n.rs index f649d18bd9..c4061656ca 100644 --- a/fighters/palutena/src/status/special_n.rs +++ b/fighters/palutena/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // red: burn attack unsafe extern "C" fn special_n_r_pre(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/peach/src/acmd/aerials.rs b/fighters/peach/src/acmd/aerials.rs index f923f10d99..20e15ebc42 100644 --- a/fighters/peach/src/acmd/aerials.rs +++ b/fighters/peach/src/acmd/aerials.rs @@ -53,7 +53,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -149,7 +147,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -204,9 +201,13 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/peach/src/acmd/ground.rs b/fighters/peach/src/acmd/ground.rs index 1e4835826c..f115a73e1d 100644 --- a/fighters/peach/src/acmd/ground.rs +++ b/fighters/peach/src/acmd/ground.rs @@ -79,6 +79,7 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/peach/src/acmd/other.rs b/fighters/peach/src/acmd/other.rs index 79d2e229e5..f4a8ca2374 100644 --- a/fighters/peach/src/acmd/other.rs +++ b/fighters/peach/src/acmd/other.rs @@ -61,7 +61,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/peach/src/acmd/smashes.rs b/fighters/peach/src/acmd/smashes.rs index fd09d93b96..b46800c026 100644 --- a/fighters/peach/src/acmd/smashes.rs +++ b/fighters/peach/src/acmd/smashes.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/peach/src/acmd/specials.rs b/fighters/peach/src/acmd/specials.rs index 9647751a8f..7deecb5704 100644 --- a/fighters/peach/src/acmd/specials.rs +++ b/fighters/peach/src/acmd/specials.rs @@ -78,7 +78,6 @@ unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { @@ -140,7 +139,6 @@ unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { @@ -199,8 +197,10 @@ unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialshitend", game_specialshitend); + agent.acmd("game_specialhistart", game_specialhistart); agent.acmd("game_specialairhistart", game_specialairhistart); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); agent.acmd("sound_speciallw", sound_speciallw); diff --git a/fighters/peach/src/acmd/throws.rs b/fighters/peach/src/acmd/throws.rs index e8cdedc80b..eacd46f30a 100644 --- a/fighters/peach/src/acmd/throws.rs +++ b/fighters/peach/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -178,7 +177,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/peach/src/acmd/tilts.rs b/fighters/peach/src/acmd/tilts.rs index 6acba0a75d..d705f213c9 100644 --- a/fighters/peach/src/acmd/tilts.rs +++ b/fighters/peach/src/acmd/tilts.rs @@ -19,7 +19,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -88,12 +87,13 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.0, 3.0); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/peach/src/opff.rs b/fighters/peach/src/opff.rs index 96bf79acf5..5b43136b88 100644 --- a/fighters/peach/src/opff.rs +++ b/fighters/peach/src/opff.rs @@ -12,6 +12,7 @@ unsafe fn float_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32) } } } + unsafe fn wall_bounce(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if status_kind == *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP { let lr = PostureModule::lr(boma); @@ -91,6 +92,7 @@ pub unsafe fn peach_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, peach_frame_wrapper); } diff --git a/fighters/pfushigisou/src/acmd/aerials.rs b/fighters/pfushigisou/src/acmd/aerials.rs index d44f3cfcf2..146d2f38bf 100644 --- a/fighters/pfushigisou/src/acmd/aerials.rs +++ b/fighters/pfushigisou/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -35,7 +34,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { @@ -51,7 +49,6 @@ unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } */ - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -76,7 +73,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -90,7 +86,6 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -123,7 +118,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -162,7 +156,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -190,15 +183,18 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) {; agent.acmd("game_attackairn", game_attackairn); agent.acmd("game_landingairn", game_landingairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pfushigisou/src/acmd/ground.rs b/fighters/pfushigisou/src/acmd/ground.rs index 9160749e8e..ecddddf9ee 100644 --- a/fighters/pfushigisou/src/acmd/ground.rs +++ b/fighters/pfushigisou/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -104,5 +103,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pfushigisou/src/acmd/other.rs b/fighters/pfushigisou/src/acmd/other.rs index 924750837f..6439f3bd16 100644 --- a/fighters/pfushigisou/src/acmd/other.rs +++ b/fighters/pfushigisou/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -84,7 +83,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/pfushigisou/src/acmd/smashes.rs b/fighters/pfushigisou/src/acmd/smashes.rs index abbec567ba..456e9881f3 100644 --- a/fighters/pfushigisou/src/acmd/smashes.rs +++ b/fighters/pfushigisou/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -17,10 +16,9 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -36,7 +34,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -55,7 +52,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -84,7 +80,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -121,14 +116,14 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.000); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pfushigisou/src/acmd/specials.rs b/fighters/pfushigisou/src/acmd/specials.rs index 68f95a2f7e..cacc52b7e5 100644 --- a/fighters/pfushigisou/src/acmd/specials.rs +++ b/fighters/pfushigisou/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { @@ -16,7 +15,6 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.000); } - } unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { @@ -34,7 +32,6 @@ unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.000); } - } unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -53,7 +50,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -89,12 +85,12 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/pfushigisou/src/acmd/throws.rs b/fighters/pfushigisou/src/acmd/throws.rs index f1da1aa97b..32c6b421da 100644 --- a/fighters/pfushigisou/src/acmd/throws.rs +++ b/fighters/pfushigisou/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/pfushigisou/src/acmd/tilts.rs b/fighters/pfushigisou/src/acmd/tilts.rs index f9e70a828d..7d4a9083d8 100644 --- a/fighters/pfushigisou/src/acmd/tilts.rs +++ b/fighters/pfushigisou/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -27,7 +26,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -61,7 +59,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -96,11 +93,12 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pfushigisou/src/status/mod.rs b/fighters/pfushigisou/src/status/mod.rs index 6c85d47bf4..868a42d6c1 100644 --- a/fighters/pfushigisou/src/status/mod.rs +++ b/fighters/pfushigisou/src/status/mod.rs @@ -2,18 +2,8 @@ use super::*; use globals::*; // status script import -#[skyline::hook(replace=request_change_pokemon)] -unsafe fn request_change_pokemon() -> bool { - return false; -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; - let object = utils::util::get_battle_object_from_id(parent_id); - VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) -} +mod special_lw; pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + special_lw::install(agent); } diff --git a/fighters/pfushigisou/src/status/special_lw.rs b/fighters/pfushigisou/src/status/special_lw.rs new file mode 100644 index 0000000000..0c6fbf55c5 --- /dev/null +++ b/fighters/pfushigisou/src/status/special_lw.rs @@ -0,0 +1,17 @@ +use super::*; + +#[skyline::hook(replace=request_change_pokemon)] +unsafe fn request_change_pokemon() -> bool { + return false; +} + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; + let object = utils::util::get_battle_object_from_id(parent_id); + VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} diff --git a/fighters/pickel/src/status/mod.rs b/fighters/pickel/src/status/mod.rs index 800fb34a60..abfd373d47 100644 --- a/fighters/pickel/src/status/mod.rs +++ b/fighters/pickel/src/status/mod.rs @@ -34,9 +34,6 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - skyline::install_hooks!( - stuff_hook - ); agent.on_start(on_start); attack_air_lw::install(agent); @@ -46,4 +43,6 @@ pub fn install(agent: &mut Agent) { rebirth::install(agent); recreate_table::install(agent); special_s::install(agent); + + skyline::install_hooks!(stuff_hook); } diff --git a/fighters/pikachu/src/acmd/aerials.rs b/fighters/pikachu/src/acmd/aerials.rs index 023b53369d..1182d759d8 100644 --- a/fighters/pikachu/src/acmd/aerials.rs +++ b/fighters/pikachu/src/acmd/aerials.rs @@ -260,7 +260,7 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -273,14 +273,14 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("sound_attackairb", sound_attackairb); agent.acmd("expression_attackairb", expression_attackairb); - agent.acmd("game_landingairb", null); + agent.acmd("game_landingairb", stub); agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_landingairlw", null); - agent.acmd("effect_landingairlw", null); - agent.acmd("sound_landingairlw", null); - agent.acmd("expression_landingairlw", null); + agent.acmd("game_landingairlw", stub); + agent.acmd("effect_landingairlw", stub); + agent.acmd("sound_landingairlw", stub); + agent.acmd("expression_landingairlw", stub); } diff --git a/fighters/pikmin/src/acmd/aerials.rs b/fighters/pikmin/src/acmd/aerials.rs index ecb56af493..1021848270 100644 --- a/fighters/pikmin/src/acmd/aerials.rs +++ b/fighters/pikmin/src/acmd/aerials.rs @@ -2,26 +2,45 @@ use super::*; use globals::*; use std::ops::Index; -unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); + frame(lua_state, 2.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - frame(lua_state, 3.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 6.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 7.0, 3.0); + frame(lua_state, 7.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 23.0, 20.0); if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 10.0); + frame(lua_state, 11.0); + if is_excute(agent) { + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 23.0); + FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { AttackModule::clear_all(boma); } @@ -29,38 +48,50 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 42.0); + frame(lua_state, 40.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + frame(lua_state, 7.0); if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n01")); } - frame(lua_state, 4.0); + wait(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n02")); + } + wait(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n03")); } +} +unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + } frame(lua_state, 5.0); if is_excute(agent) { - if (pikmin_count != 0) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(lua_state, 32.0); if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -70,83 +101,49 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } frame(lua_state, 3.0); FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 8.0); + frame(lua_state, 6.0); if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 55, 70, 0, 62, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 55, 70, 0, 62, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 20.0); + frame(lua_state, 10.0); if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 42.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } -unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if is_excute(agent) { ItemModule::set_have_item_visibility(boma, false, 0); } - frame(lua_state, 6.0); + frame(lua_state, 4.0); if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - - //With Pikmin - frame(lua_state, 7.0); + frame(lua_state, 5.0); if is_excute(agent) { if (pikmin_count != 0) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - - frame(lua_state, 34.0); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, true, 0); - } -} - -unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); - } - frame(lua_state, 7.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - } - } - frame(lua_state, 25.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } frame(lua_state, 32.0); if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); + ItemModule::set_have_item_visibility(boma, true, 0); } } @@ -180,7 +177,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -194,7 +190,6 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - //With Pikmin frame(lua_state, 8.0); if is_excute(agent) { @@ -202,7 +197,6 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - //Without Pikmin frame(lua_state, 9.0); if is_excute(agent) { @@ -210,115 +204,116 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } } - frame(lua_state, 32.0); if is_excute(agent) { ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 2.0); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 1.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - FT_MOTION_RATE_RANGE(agent, 2.0, 7.0, 3.0); - frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(agent, 7.0, 23.0, 20.0); + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 8.0); if is_excute(agent) { - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 75, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 75, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 2, 0, Hash40::new("head"), 5.0, 75, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - } WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 11.0); - if is_excute(agent) { let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if (pikmin_count == 0) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 4.5, 62, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.5, 62, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 2, 0, Hash40::new("head"), 4.5, 62, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); - if (pikmin_count == 0) { - ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 50, 100, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 50, 100, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); - ATTACK(agent, 2, 0, Hash40::new("head"), 4.0, 50, 100, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0.0, 0.0, 10, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 95, 90, 0, 52, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 95, 90, 0, 52, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); } } - frame(lua_state, 23.0); - FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 20.0); if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 40.0); - if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } - } -unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { } - -unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 7.0); + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n01")); + ItemModule::set_have_item_visibility(boma, false, 0); } - wait(lua_state, 4.0); + frame(lua_state, 6.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n02")); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - wait(lua_state, 7.0); + //With Pikmin + frame(lua_state, 7.0); if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_pikmin_attackair_n03")); + if (pikmin_count != 0) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + } + frame(lua_state, 34.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); } } -unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); + WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); } - frame(lua_state, 5.0); + frame(lua_state, 7.0); if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(lua_state, 7.0); + let pikmin_count = WorkModule::get_int(boma, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + if (pikmin_count == 0) { + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 5.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("handr"), 4.0, 270, 90, 0, 42, 3.5, 3.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + ATTACK(agent, 1, 0, Hash40::new("shoulderr"), 4.0, 270, 90, 0, 42, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0.0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PIKMIN); + } + } + frame(lua_state, 25.0); if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + AttackModule::clear_all(boma); } frame(lua_state, 32.0); if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, true, 0); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", stub); + agent.acmd("sound_attackairn", sound_attackairn); + agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_attackairb", game_attackairb); - agent.acmd("expression_attackairb", expression_attackairb); - agent.acmd("game_attackairn", game_attackairn); - agent.acmd("effect_attackairn", effect_attackairn); - agent.acmd("sound_attackairn", sound_attackairn); - agent.acmd("expression_attackairn", expression_attackairn); } diff --git a/fighters/pikmin/src/acmd/ground.rs b/fighters/pikmin/src/acmd/ground.rs index e8da77ea1b..67ff7a6de3 100644 --- a/fighters/pikmin/src/acmd/ground.rs +++ b/fighters/pikmin/src/acmd/ground.rs @@ -60,5 +60,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index 50bb308b86..ee0ad8b72d 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -1,46 +1,5 @@ - use super::*; -unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - PLAY_FLY_VOICE(agent, Hash40::new("seq_pikmin_rnd_futtobi01"), Hash40::new("seq_pikmin_rnd_futtobi02")); - } -} - unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -52,7 +11,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -93,7 +51,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -107,7 +64,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -119,14 +75,10 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damagefly); - agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pikmin/src/acmd/smashes.rs b/fighters/pikmin/src/acmd/smashes.rs index 4c4e84ab87..3370df1a53 100644 --- a/fighters/pikmin/src/acmd/smashes.rs +++ b/fighters/pikmin/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/acmd/specials.rs b/fighters/pikmin/src/acmd/specials.rs index 200f309de8..8ce28871ac 100644 --- a/fighters/pikmin/src/acmd/specials.rs +++ b/fighters/pikmin/src/acmd/specials.rs @@ -29,12 +29,6 @@ unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialnfailure(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -65,12 +59,14 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specials); agent.acmd("game_specialnstart", game_specialnstart); - agent.acmd("game_specialnfailure", game_specialnfailure); - agent.acmd("game_specialairnfailure", game_specialnfailure); + agent.acmd("game_specialnfailure", stub); + agent.acmd("game_specialairnfailure", stub); agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); agent.acmd("effect_speciallw", effect_speciallw); diff --git a/fighters/pikmin/src/acmd/tilts.rs b/fighters/pikmin/src/acmd/tilts.rs index 9459f863a9..209c16cfb6 100644 --- a/fighters/pikmin/src/acmd/tilts.rs +++ b/fighters/pikmin/src/acmd/tilts.rs @@ -24,7 +24,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -40,7 +39,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -66,11 +64,12 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attackhi3", game_attackhi3); } diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 81ea209e34..930cec8fad 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -169,6 +169,7 @@ pub unsafe fn pikmin_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, pikmin_frame_wrapper); } diff --git a/fighters/pikmin/src/pikmin/acmd/aerials.rs b/fighters/pikmin/src/pikmin/acmd/aerials.rs index b0e83af3f1..daf6f6aa8d 100644 --- a/fighters/pikmin/src/pikmin/acmd/aerials.rs +++ b/fighters/pikmin/src/pikmin/acmd/aerials.rs @@ -178,21 +178,25 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn_b", effect_attackairn); agent.acmd("effect_attackairn_w", effect_attackairn); agent.acmd("effect_attackairn_v", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("game_attackairf_y", game_attackairf); agent.acmd("game_attackairf_b", game_attackairf); agent.acmd("game_attackairf_w", game_attackairf); agent.acmd("game_attackairf_v", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("game_attackairb_y", game_attackairb); agent.acmd("game_attackairb_b", game_attackairb); agent.acmd("game_attackairb_w", game_attackairb); agent.acmd("game_attackairb_v", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("game_attackairhi_y", game_attackairhi); agent.acmd("game_attackairhi_b", game_attackairhi); agent.acmd("game_attackairhi_w", game_attackairhi); agent.acmd("game_attackairhi_v", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("game_attackairlw_y", game_attackairlw); agent.acmd("game_attackairlw_b", game_attackairlw); diff --git a/fighters/pikmin/src/pikmin/acmd/other.rs b/fighters/pikmin/src/pikmin/acmd/other.rs index 4c4e84ab87..3370df1a53 100644 --- a/fighters/pikmin/src/pikmin/acmd/other.rs +++ b/fighters/pikmin/src/pikmin/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; pub fn install(agent: &mut Agent) {} diff --git a/fighters/pikmin/src/pikmin/acmd/smashes.rs b/fighters/pikmin/src/pikmin/acmd/smashes.rs index 2982d75526..45b65ac9a4 100644 --- a/fighters/pikmin/src/pikmin/acmd/smashes.rs +++ b/fighters/pikmin/src/pikmin/acmd/smashes.rs @@ -3,6 +3,33 @@ use super::PikminInfo; use std::ops::Index; use globals::*; +unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); + let p = PikminInfo::from(variation); + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); + let dmg = 20.3; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 3.0); + if is_excute(agent) { + let dmg = 14.0; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 6.0); + if is_excute(agent) { + let dmg = 8.4; + ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); + } + wait(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + } +} + unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -53,48 +80,22 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks4sjump(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); - let p = PikminInfo::from(variation); - if is_excute(agent) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_XLU), 0); - let dmg = 20.3; - ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 4.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -10.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 3.0); - if is_excute(agent) { - let dmg = 14.0; - ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7.0 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_M, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 6.0); - if is_excute(agent) { - let dmg = 8.4; - ATTACK(agent, 0, 0, Hash40::new("head1"), dmg * p.dmg, 361, 75, 0, 33, 3.0, 0.0, 0.0, 0.0, None, None, None, p.hitlag, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4.2 + (dmg * p.shield_dmg), 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr, *ATTACK_SOUND_LEVEL_S, p.sound, *ATTACK_REGION_PIKMIN); - } - wait(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - } +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4sjump", game_attacks4sjump); + agent.acmd("game_attacks4sjump_b", game_attacks4sjump); + agent.acmd("game_attacks4sjump_v", game_attacks4sjump); + agent.acmd("game_attacks4sjump_w", game_attacks4sjump); + agent.acmd("game_attacks4sjump_y", game_attacks4sjump); -} + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attackhi4_b", game_attackhi4); + agent.acmd("game_attackhi4_v", game_attackhi4); + agent.acmd("game_attackhi4_w", game_attackhi4); + agent.acmd("game_attackhi4_y", game_attackhi4); -pub fn install(agent: &mut Agent) { - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attackhi4_b", game_attackhi4); - agent.acmd("game_attackhi4_v", game_attackhi4); - agent.acmd("game_attackhi4_w", game_attackhi4); - agent.acmd("game_attackhi4_y", game_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); - agent.acmd("game_attacklw4_b", game_attacklw4); - agent.acmd("game_attacklw4_v", game_attacklw4); - agent.acmd("game_attacklw4_w", game_attacklw4); - agent.acmd("game_attacklw4_y", game_attacklw4); - agent.acmd("game_attacks4sjump", game_attacks4sjump); - agent.acmd("game_attacks4sjump_b", game_attacks4sjump); - agent.acmd("game_attacks4sjump_v", game_attacks4sjump); - agent.acmd("game_attacks4sjump_w", game_attacks4sjump); - agent.acmd("game_attacks4sjump_y", game_attacks4sjump); + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attacklw4_b", game_attacklw4); + agent.acmd("game_attacklw4_v", game_attacklw4); + agent.acmd("game_attacklw4_w", game_attacklw4); + agent.acmd("game_attacklw4_y", game_attacklw4); } diff --git a/fighters/pikmin/src/pikmin/acmd/specials.rs b/fighters/pikmin/src/pikmin/acmd/specials.rs index 54cd67bd40..eccb23ebc2 100644 --- a/fighters/pikmin/src/pikmin/acmd/specials.rs +++ b/fighters/pikmin/src/pikmin/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_spsremved(agent: &mut L2CAgentBase) { @@ -149,24 +148,27 @@ unsafe extern "C" fn game_spsthrown_y(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { -agent.acmd("game_spsremved", game_spsremved); -agent.acmd("game_spsremved_b", game_spsremved); -agent.acmd("game_spsremved_v", game_spsremved); -agent.acmd("game_spsremved_w", game_spsremved); -agent.acmd("game_spsremved_y", game_spsremved); -agent.acmd("game_splwairrespond", game_spsremved); -agent.acmd("game_splwairrespond_b", game_spsremved); -agent.acmd("game_splwairrespond_v", game_spsremved); -agent.acmd("game_splwairrespond_w", game_spsremved); -agent.acmd("game_splwairrespond_y", game_spsremved); -agent.acmd("game_spntakenoutstart", game_spntakenoutstart); -agent.acmd("game_spntakenoutstart_y", game_spntakenoutstart); -agent.acmd("game_spntakenoutstart_b", game_spntakenoutstart); -agent.acmd("game_spntakenoutstart_w", game_spntakenoutstart); -agent.acmd("game_spntakenoutstart_v", game_spntakenoutstart); -agent.acmd("game_spsthrown", game_spsthrown); -agent.acmd("game_spsthrown_b", game_spsthrown_b); -agent.acmd("game_spsthrown_v", game_spsthrown_v); -agent.acmd("game_spsthrown_w", game_spsthrown_w); -agent.acmd("game_spsthrown_y", game_spsthrown_y); + agent.acmd("game_spsremved", game_spsremved); + agent.acmd("game_spsremved_b", game_spsremved); + agent.acmd("game_spsremved_v", game_spsremved); + agent.acmd("game_spsremved_w", game_spsremved); + agent.acmd("game_spsremved_y", game_spsremved); + + agent.acmd("game_splwairrespond", game_spsremved); + agent.acmd("game_splwairrespond_b", game_spsremved); + agent.acmd("game_splwairrespond_v", game_spsremved); + agent.acmd("game_splwairrespond_w", game_spsremved); + agent.acmd("game_splwairrespond_y", game_spsremved); + + agent.acmd("game_spntakenoutstart", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_y", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_b", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_w", game_spntakenoutstart); + agent.acmd("game_spntakenoutstart_v", game_spntakenoutstart); + + agent.acmd("game_spsthrown", game_spsthrown); + agent.acmd("game_spsthrown_b", game_spsthrown_b); + agent.acmd("game_spsthrown_v", game_spsthrown_v); + agent.acmd("game_spsthrown_w", game_spsthrown_w); + agent.acmd("game_spsthrown_y", game_spsthrown_y); } \ No newline at end of file diff --git a/fighters/pikmin/src/pikmin/acmd/throws.rs b/fighters/pikmin/src/pikmin/acmd/throws.rs index 989e528ba2..29c2751054 100644 --- a/fighters/pikmin/src/pikmin/acmd/throws.rs +++ b/fighters/pikmin/src/pikmin/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -103,24 +102,27 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) {; - agent.acmd("game_throwb", game_throwb); - agent.acmd("game_throwb_b", game_throwb); - agent.acmd("game_throwb_v", game_throwb); - agent.acmd("game_throwb_w", game_throwb); - agent.acmd("game_throwb_y", game_throwb); - agent.acmd("game_throwf", game_throwf); - agent.acmd("game_throwf_b", game_throwf); - agent.acmd("game_throwf_v", game_throwf); - agent.acmd("game_throwf_w", game_throwf); - agent.acmd("game_throwf_y", game_throwf); - agent.acmd("game_throwhi", game_throwhi); - agent.acmd("game_throwhi_b", game_throwhi); - agent.acmd("game_throwhi_v", game_throwhi); - agent.acmd("game_throwhi_w", game_throwhi); - agent.acmd("game_throwhi_y", game_throwhi); - agent.acmd("game_throwlw", game_throwlw); - agent.acmd("game_throwlw_b", game_throwlw); - agent.acmd("game_throwlw_v", game_throwlw); - agent.acmd("game_throwlw_w", game_throwlw); - agent.acmd("game_throwlw_y", game_throwlw); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwb_b", game_throwb); + agent.acmd("game_throwb_v", game_throwb); + agent.acmd("game_throwb_w", game_throwb); + agent.acmd("game_throwb_y", game_throwb); + + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwf_b", game_throwf); + agent.acmd("game_throwf_v", game_throwf); + agent.acmd("game_throwf_w", game_throwf); + agent.acmd("game_throwf_y", game_throwf); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwhi_b", game_throwhi); + agent.acmd("game_throwhi_v", game_throwhi); + agent.acmd("game_throwhi_w", game_throwhi); + agent.acmd("game_throwhi_y", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwlw_b", game_throwlw); + agent.acmd("game_throwlw_v", game_throwlw); + agent.acmd("game_throwlw_w", game_throwlw); + agent.acmd("game_throwlw_y", game_throwlw); } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index da9e1b18c9..6e94996bf2 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -88,14 +88,6 @@ pub unsafe extern "C" fn special_s_cling_remove_end(agent: &mut L2CFighterCommon } pub fn install(agent: &mut Agent) { - agent.status( - Main, - *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, - special_s_cling_main, - ); - agent.status( - End, - *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, - special_s_cling_remove_end, - ); + agent.status(Main, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, special_s_cling_main); + agent.status(End, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, special_s_cling_remove_end); } diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 13f5a6f9f9..16facb534e 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; pub unsafe extern "C" fn attack_air_main(agent: &mut L2CFighterCommon) -> L2CValue { agent.sub_attack_air(); diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index cfabf68ac4..19defee9c0 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index 863ee7a762..9b39de71ef 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); diff --git a/fighters/pit/src/acmd/aerials.rs b/fighters/pit/src/acmd/aerials.rs index 39993fb529..dfcd68acb3 100644 --- a/fighters/pit/src/acmd/aerials.rs +++ b/fighters/pit/src/acmd/aerials.rs @@ -31,7 +31,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -103,7 +102,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -133,7 +131,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -189,7 +186,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -235,7 +231,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { @@ -257,10 +252,14 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pit/src/acmd/ground.rs b/fighters/pit/src/acmd/ground.rs index 3c3e53e205..5255545616 100644 --- a/fighters/pit/src/acmd/ground.rs +++ b/fighters/pit/src/acmd/ground.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn pit_attack_11_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn pit_attack_11_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_attack_12_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -55,7 +55,7 @@ unsafe extern "C" fn pit_attack_12_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn pit_attack_13_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -77,7 +77,7 @@ unsafe extern "C" fn pit_attack_13_game(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn pit_attack_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.85); @@ -93,8 +93,9 @@ unsafe extern "C" fn pit_attack_dash_game(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", pit_attack_11_game); - agent.acmd("game_attack12", pit_attack_12_game); - agent.acmd("game_attack13", pit_attack_13_game); - agent.acmd("game_attackdash", pit_attack_dash_game); + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attack13", game_attack13); + + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pit/src/acmd/other.rs b/fighters/pit/src/acmd/other.rs index 19dbec85d0..c68eb7d6b7 100644 --- a/fighters/pit/src/acmd/other.rs +++ b/fighters/pit/src/acmd/other.rs @@ -1,69 +1,6 @@ use super::*; -unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); - } - frame(lua_state, 13.0); - if is_excute(agent) { - WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); - } -} - -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -103,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02"));} - } -} - unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -146,6 +58,19 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); + } +} + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -176,13 +101,15 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_turndash", game_turndash); - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/pit/src/acmd/smashes.rs b/fighters/pit/src/acmd/smashes.rs index 69675e1228..bce8d735b5 100644 --- a/fighters/pit/src/acmd/smashes.rs +++ b/fighters/pit/src/acmd/smashes.rs @@ -26,7 +26,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -81,10 +80,10 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); } diff --git a/fighters/pit/src/acmd/specials.rs b/fighters/pit/src/acmd/specials.rs index 51b3fdd9fa..b238ca029d 100644 --- a/fighters/pit/src/acmd/specials.rs +++ b/fighters/pit/src/acmd/specials.rs @@ -148,10 +148,12 @@ unsafe extern "C" fn effect_speciallwendl(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnfires", game_specialairnfires); agent.acmd("game_specialairnfirehi", game_specialairnfirehi); + agent.acmd("game_specialsstart", game_specialsstart); agent.acmd("game_specialsend", game_specialsend); agent.acmd("game_specialairsstart", game_specialairsstart); agent.acmd("game_specialairsend", game_specialairsend); + agent.acmd("effect_speciallwstartl", effect_speciallwstartl); agent.acmd("effect_speciallwstartr", effect_speciallwstartl); agent.acmd("effect_specialairlwstartl", effect_speciallwstartl); diff --git a/fighters/pit/src/acmd/throws.rs b/fighters/pit/src/acmd/throws.rs index f2b4e7917f..6ffc68c2f9 100644 --- a/fighters/pit/src/acmd/throws.rs +++ b/fighters/pit/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -112,6 +111,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pit/src/acmd/tilts.rs b/fighters/pit/src/acmd/tilts.rs index 121ab10c4e..14412557b8 100644 --- a/fighters/pit/src/acmd/tilts.rs +++ b/fighters/pit/src/acmd/tilts.rs @@ -12,7 +12,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -40,7 +39,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } frame(lua_state, 34.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -58,7 +56,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 30.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -83,7 +80,9 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pit/src/status/special_hi.rs b/fighters/pit/src/status/special_hi.rs index 1ef80bdd74..b45f8a7588 100644 --- a/fighters/pit/src/status/special_hi.rs +++ b/fighters/pit/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END diff --git a/fighters/pit/src/status/special_s.rs b/fighters/pit/src/status/special_s.rs index 01202f41f2..4402fa1a75 100644 --- a/fighters/pit/src/status/special_s.rs +++ b/fighters/pit/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END)(fighter); diff --git a/fighters/pitb/src/acmd/aerials.rs b/fighters/pitb/src/acmd/aerials.rs index f2d5c341cf..8a497a4560 100644 --- a/fighters/pitb/src/acmd/aerials.rs +++ b/fighters/pitb/src/acmd/aerials.rs @@ -30,7 +30,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -143,7 +142,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -173,7 +171,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -225,7 +222,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -271,7 +267,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { @@ -295,10 +290,14 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("expression_attackairlw", expression_attackairlw); } diff --git a/fighters/pitb/src/acmd/ground.rs b/fighters/pitb/src/acmd/ground.rs index 40de149b14..6cdcc954aa 100644 --- a/fighters/pitb/src/acmd/ground.rs +++ b/fighters/pitb/src/acmd/ground.rs @@ -96,5 +96,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index 075288c792..2f69626846 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -85,14 +84,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -106,7 +103,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/pitb/src/acmd/smashes.rs b/fighters/pitb/src/acmd/smashes.rs index 3d80f726f1..4d412622bc 100644 --- a/fighters/pitb/src/acmd/smashes.rs +++ b/fighters/pitb/src/acmd/smashes.rs @@ -26,7 +26,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -81,7 +80,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -116,6 +114,8 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pitb/src/acmd/specials.rs b/fighters/pitb/src/acmd/specials.rs index 92871dedbe..54470d0b58 100644 --- a/fighters/pitb/src/acmd/specials.rs +++ b/fighters/pitb/src/acmd/specials.rs @@ -105,7 +105,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_PIT_STATUS_SPECIAL_HI_RUSH_FLAG_BACK_ANGLE); JostleModule::set_status(boma, true); } - } unsafe extern "C" fn game_speciallwstartl(agent: &mut L2CAgentBase) { @@ -149,14 +148,15 @@ unsafe extern "C" fn game_speciallwhold(agent: &mut L2CAgentBase) { shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 0, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, 1, *FIGHTER_PIT_REFLECTOR_GROUP_SPECIAL_LW); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_specialsstart", game_specialsstart); agent.acmd("game_specialsend", game_specialsend); agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_speciallwstartl", game_speciallwstartl); agent.acmd("game_speciallwstartr", game_speciallwstartl); agent.acmd("game_specialairlwstartl", game_speciallwstartl); diff --git a/fighters/pitb/src/acmd/throws.rs b/fighters/pitb/src/acmd/throws.rs index 5611fa3966..7ac7294158 100644 --- a/fighters/pitb/src/acmd/throws.rs +++ b/fighters/pitb/src/acmd/throws.rs @@ -23,7 +23,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -114,6 +113,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/pitb/src/acmd/tilts.rs b/fighters/pitb/src/acmd/tilts.rs index a8271e50a7..d6657c56b7 100644 --- a/fighters/pitb/src/acmd/tilts.rs +++ b/fighters/pitb/src/acmd/tilts.rs @@ -16,7 +16,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -44,7 +43,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } frame(lua_state, 34.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -62,7 +60,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 30.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -82,12 +79,13 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("pitb_sword"), true, true); EFFECT_OFF_KIND(agent, Hash40::new("pitb_atk_wind"), true, true); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/pitb/src/opff.rs b/fighters/pitb/src/opff.rs index 0c292175b5..d5a8c11cd1 100644 --- a/fighters/pitb/src/opff.rs +++ b/fighters/pitb/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bow_lc(boma: &mut BattleObjectModuleAccessor) { if boma.is_status(*FIGHTER_PIT_STATUS_KIND_SPECIAL_N_SHOOT) { if boma.is_prev_situation(*SITUATION_KIND_AIR) && boma.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/pitb/src/status/special_hi.rs b/fighters/pitb/src/status/special_hi.rs index e99e467a9e..7c9d7d3503 100644 --- a/fighters/pitb/src/status/special_hi.rs +++ b/fighters/pitb/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END @@ -75,14 +74,6 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(agent: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status( - Pre, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_pre, - ); - agent.status( - Main, - *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, - special_hi_rush_end_main, - ); + agent.status(Pre, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_pre); + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); } diff --git a/fighters/plizardon/src/acmd/aerials.rs b/fighters/plizardon/src/acmd/aerials.rs index c26abb81ad..a51969c411 100644 --- a/fighters/plizardon/src/acmd/aerials.rs +++ b/fighters/plizardon/src/acmd/aerials.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -59,7 +58,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -79,7 +77,6 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_COLOR(agent, 10.0, 1.0, 1.0); LAST_EFFECT_SET_ALPHA(agent, 0.8); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -113,7 +110,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -150,7 +146,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -164,7 +159,6 @@ unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -204,16 +198,19 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/plizardon/src/acmd/ground.rs b/fighters/plizardon/src/acmd/ground.rs index e27f785e63..baed427075 100644 --- a/fighters/plizardon/src/acmd/ground.rs +++ b/fighters/plizardon/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -94,5 +93,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/plizardon/src/acmd/other.rs b/fighters/plizardon/src/acmd/other.rs index 185ac23637..b181458c3f 100644 --- a/fighters/plizardon/src/acmd/other.rs +++ b/fighters/plizardon/src/acmd/other.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { @@ -65,7 +64,6 @@ unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -79,7 +77,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -113,7 +110,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/plizardon/src/acmd/smashes.rs b/fighters/plizardon/src/acmd/smashes.rs index 9ccc1e2af0..294e0ae6e4 100644 --- a/fighters/plizardon/src/acmd/smashes.rs +++ b/fighters/plizardon/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -100,7 +98,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -126,11 +123,12 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/plizardon/src/acmd/specials.rs b/fighters/plizardon/src/acmd/specials.rs index 511c6dce06..32b916e1f3 100644 --- a/fighters/plizardon/src/acmd/specials.rs +++ b/fighters/plizardon/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { diff --git a/fighters/plizardon/src/acmd/throws.rs b/fighters/plizardon/src/acmd/throws.rs index 5737d8ebf7..edb3e789e4 100644 --- a/fighters/plizardon/src/acmd/throws.rs +++ b/fighters/plizardon/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -103,5 +102,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/plizardon/src/acmd/tilts.rs b/fighters/plizardon/src/acmd/tilts.rs index 3b88a4f6d9..fabd6e7ca8 100644 --- a/fighters/plizardon/src/acmd/tilts.rs +++ b/fighters/plizardon/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -9,12 +9,11 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -28,10 +27,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -40,11 +38,12 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.9, 21.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 13.5, 19.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 1, 0, Hash40::new("fire"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 2, 0, Hash40::new("tail3"), 7.0, 361, 100, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); - ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 6.8, 18.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); + ATTACK(agent, 3, 0, Hash40::new("top"), 11.0, 40, 104, 0, 45, 4.0, 0.0, 12.2, 17.200001, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_TAIL); ATTACK(agent, 4, 0, Hash40::new("tail2"), 7.0, 361, 100, 0, 40, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_TAIL); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -58,7 +57,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -89,7 +87,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -106,7 +103,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -135,7 +131,6 @@ unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -154,7 +149,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -176,11 +170,13 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/plizardon/src/opff.rs b/fighters/plizardon/src/opff.rs index e8b5b88f67..51a040f4ad 100644 --- a/fighters/plizardon/src/opff.rs +++ b/fighters/plizardon/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn flame_cancel(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, frame: f32) { let prev_situation = StatusModule::prev_situation_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_SPECIAL_N || situation_kind != *SITUATION_KIND_GROUND || prev_situation != *SITUATION_KIND_AIR { @@ -99,6 +98,7 @@ pub unsafe fn plizardon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, plizardon_frame_wrapper); } diff --git a/fighters/plizardon/src/status/mod.rs b/fighters/plizardon/src/status/mod.rs index f470a2c344..23cda6ed7c 100644 --- a/fighters/plizardon/src/status/mod.rs +++ b/fighters/plizardon/src/status/mod.rs @@ -3,6 +3,7 @@ use globals::*; // status script import mod special_s; +mod special_lw; // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -22,26 +23,15 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn plizardon_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_PLIZARDON { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; - let object = utils::util::get_battle_object_from_id(parent_id); - VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(plizardon_init); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); - agent.install(); + agent.on_start(on_start); + special_s::install(agent); + special_lw::install(agent); } diff --git a/fighters/plizardon/src/status/special_lw.rs b/fighters/plizardon/src/status/special_lw.rs new file mode 100644 index 0000000000..6af9c12dca --- /dev/null +++ b/fighters/plizardon/src/status/special_lw.rs @@ -0,0 +1,12 @@ +use super::*; + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; + let object = utils::util::get_battle_object_from_id(parent_id); + VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} diff --git a/fighters/plizardon/src/status/special_s.rs b/fighters/plizardon/src/status/special_s.rs index 46954650ab..3f3f9f4c07 100644 --- a/fighters/plizardon/src/status/special_s.rs +++ b/fighters/plizardon/src/status/special_s.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); diff --git a/fighters/pzenigame/src/acmd/aerials.rs b/fighters/pzenigame/src/acmd/aerials.rs index 1873d33c28..04e2f100d7 100644 --- a/fighters/pzenigame/src/acmd/aerials.rs +++ b/fighters/pzenigame/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -47,7 +45,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -75,13 +72,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - -} - -unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -111,7 +101,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -154,15 +143,20 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); - agent.acmd("game_landingairb", game_landingairb); + agent.acmd("game_landingairb", stub); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/pzenigame/src/acmd/ground.rs b/fighters/pzenigame/src/acmd/ground.rs index 759f1f9817..53417382b7 100644 --- a/fighters/pzenigame/src/acmd/ground.rs +++ b/fighters/pzenigame/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -78,12 +77,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/pzenigame/src/acmd/other.rs b/fighters/pzenigame/src/acmd/other.rs index 48da1c1fcc..39509d7cdf 100644 --- a/fighters/pzenigame/src/acmd/other.rs +++ b/fighters/pzenigame/src/acmd/other.rs @@ -139,7 +139,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -153,7 +152,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/pzenigame/src/acmd/smashes.rs b/fighters/pzenigame/src/acmd/smashes.rs index f82c342b3a..d65d07c6f8 100644 --- a/fighters/pzenigame/src/acmd/smashes.rs +++ b/fighters/pzenigame/src/acmd/smashes.rs @@ -1,14 +1,17 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 20.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); if is_excute(agent) { @@ -18,21 +21,16 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.700); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 20.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 4.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 5.4, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); - ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 5.6, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 4.2, 0.0, 6.8, 7.8, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.6, 0.0, 8.0, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); + ATTACK(agent, 2, 0, Hash40::new("top"), 15.0, 361, 111, 0, 35, 3.4, 0.0, 9.8, 18.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_water"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_WATER, *ATTACK_REGION_WATER); } wait(lua_state, 3.0); if is_excute(agent) { @@ -42,7 +40,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.700); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -62,7 +59,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.700); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -109,12 +105,12 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.500); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/pzenigame/src/acmd/specials.rs b/fighters/pzenigame/src/acmd/specials.rs index 6d831522b0..e63efa98e4 100644 --- a/fighters/pzenigame/src/acmd/specials.rs +++ b/fighters/pzenigame/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -80,7 +78,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/pzenigame/src/acmd/throws.rs b/fighters/pzenigame/src/acmd/throws.rs index 825b0e9aae..7e1da6082e 100644 --- a/fighters/pzenigame/src/acmd/throws.rs +++ b/fighters/pzenigame/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/pzenigame/src/acmd/tilts.rs b/fighters/pzenigame/src/acmd/tilts.rs index 00515bb24e..93d9400d4e 100644 --- a/fighters/pzenigame/src/acmd/tilts.rs +++ b/fighters/pzenigame/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -21,10 +20,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -44,7 +42,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -68,7 +65,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -88,7 +84,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -110,13 +105,14 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/pzenigame/src/opff.rs b/fighters/pzenigame/src/opff.rs index 230b50cfb2..9a0ea868f3 100644 --- a/fighters/pzenigame/src/opff.rs +++ b/fighters/pzenigame/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, cat1: i32) { //PM-like neutral-b canceling if status_kind == *FIGHTER_STATUS_KIND_SPECIAL_N { @@ -106,6 +105,7 @@ pub unsafe fn pzenigame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, pzenigame_frame_wrapper); } diff --git a/fighters/pzenigame/src/status/mod.rs b/fighters/pzenigame/src/status/mod.rs index a3f83c9921..8c81a7f0f3 100644 --- a/fighters/pzenigame/src/status/mod.rs +++ b/fighters/pzenigame/src/status/mod.rs @@ -2,27 +2,12 @@ use super::*; use globals::*; // status script import -pub unsafe extern "C" fn end_run(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_end_Run(); - MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); - 0.into() -} - -unsafe extern "C" fn pzenigame_special_s_loop_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let ret = smashline::original_status(Main, fighter, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP)(fighter); - DamageModule::set_damage_lock(fighter.module_accessor, false); - ret -} - -unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; - let object = utils::util::get_battle_object_from_id(parent_id); - VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff - smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) -} +mod run; +mod special_s; +mod special_lw; pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_RUN, end_run); - agent.status(Main,*FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP,pzenigame_special_s_loop_main); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + run::install(agent); + special_s::install(agent); + special_lw::install(agent); } diff --git a/fighters/pzenigame/src/status/run.rs b/fighters/pzenigame/src/status/run.rs new file mode 100644 index 0000000000..22e0c8416f --- /dev/null +++ b/fighters/pzenigame/src/status/run.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_STATUS_KIND_RUN + +pub unsafe extern "C" fn run_end(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_end_Run(); + MotionAnimcmdModule::enable_skip_delay_update(fighter.module_accessor); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_RUN, run_end); +} diff --git a/fighters/pzenigame/src/status/special_lw.rs b/fighters/pzenigame/src/status/special_lw.rs new file mode 100644 index 0000000000..072070aa07 --- /dev/null +++ b/fighters/pzenigame/src/status/special_lw.rs @@ -0,0 +1,14 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; + let object = utils::util::get_battle_object_from_id(parent_id); + VarModule::on_flag(object, vars::ptrainer::instance::IS_SWITCH_BACKWARDS); // we will turn this off in opff + smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_LW)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); +} \ No newline at end of file diff --git a/fighters/pzenigame/src/status/special_s.rs b/fighters/pzenigame/src/status/special_s.rs new file mode 100644 index 0000000000..66dbb19be2 --- /dev/null +++ b/fighters/pzenigame/src/status/special_s.rs @@ -0,0 +1,13 @@ +use super::*; + +// FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP + +unsafe extern "C" fn special_s_loop_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let ret = smashline::original_status(Main, fighter, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP)(fighter); + DamageModule::set_damage_lock(fighter.module_accessor, false); + ret +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_PZENIGAME_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_main); +} diff --git a/fighters/robot/src/acmd/specials.rs b/fighters/robot/src/acmd/specials.rs index f5a247c49b..ff21273e5d 100644 --- a/fighters/robot/src/acmd/specials.rs +++ b/fighters/robot/src/acmd/specials.rs @@ -458,7 +458,7 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_specials", game_specials); @@ -500,8 +500,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_speciallw); - agent.acmd("sound_specialsstart", null); - agent.acmd("sound_specialairsstart", null); - agent.acmd("sound_specialsend", null); - agent.acmd("sound_specialairsend", null); + agent.acmd("sound_specialsstart", stub); + agent.acmd("sound_specialairsstart", stub); + agent.acmd("sound_specialsend", stub); + agent.acmd("sound_specialairsend", stub); } diff --git a/fighters/robot/src/status/special_hi.rs b/fighters/robot/src/status/special_hi.rs index 630dbb1bdd..b1bc3973fb 100644 --- a/fighters/robot/src/status/special_hi.rs +++ b/fighters/robot/src/status/special_hi.rs @@ -413,7 +413,7 @@ unsafe extern "C" fn special_hi_keep_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn null_status(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn stub_status(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } @@ -423,8 +423,8 @@ pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_main); agent.status(End, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, special_hi_keep_end); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, null_status); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, null_status); - agent.status(Init, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); - agent.status(Exec, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, null_status); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_HI, stub_status); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_HI, stub_status); + agent.status(Init, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, stub_status); + agent.status(Exec, *FIGHTER_ROBOT_STATUS_KIND_SPECIAL_HI_KEEP, stub_status); } \ No newline at end of file diff --git a/fighters/robot/src/status/special_s.rs b/fighters/robot/src/status/special_s.rs index e53f383395..53f5924e88 100644 --- a/fighters/robot/src/status/special_s.rs +++ b/fighters/robot/src/status/special_s.rs @@ -148,17 +148,17 @@ unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn null_status(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn stub_status(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); - agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); - agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, null_status); - agent.status(Main, *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, null_status); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Exit, *FIGHTER_STATUS_KIND_SPECIAL_S, stub_status); + agent.status(Main, *FIGHTER_KINETIC_TYPE_ROBOT_SPECIAL_S_ATTACK, stub_status); } \ No newline at end of file diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index 22bd38783a..b9a8973a03 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -298,15 +298,15 @@ unsafe extern "C" fn game_specialairlwdash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_specialnhomingstart", game_specialnhomingstart); agent.acmd("game_specialnhoming", game_specialnhoming); agent.acmd("sound_specialnhoming", sound_specialnhoming); agent.acmd("game_specialnhit", game_specialnhit); - agent.acmd("effect_specialnhit", null); - agent.acmd("game_specialnlanding", null); + agent.acmd("effect_specialnhit", stub); + agent.acmd("game_specialnlanding", stub); agent.game_acmd(0x195dc47911, hash_0x195dc47911); agent.acmd("game_specialsbooststart", game_specialsbooststart); diff --git a/fighters/szerosuit/src/acmd/aerials.rs b/fighters/szerosuit/src/acmd/aerials.rs index aadb312fc7..b2f94d02c1 100644 --- a/fighters/szerosuit/src/acmd/aerials.rs +++ b/fighters/szerosuit/src/acmd/aerials.rs @@ -311,7 +311,7 @@ unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -326,10 +326,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); - agent.acmd("game_landingairlw", null); + agent.acmd("game_landingairlw", stub); agent.acmd("effect_landingairlw", effect_landingairlw); agent.acmd("expression_landingairlw", expression_landingairlw); agent.acmd("game_aircatch", game_aircatch); - agent.acmd("game_aircatchlanding", null); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/szerosuit/src/acmd/throws.rs b/fighters/szerosuit/src/acmd/throws.rs index 4a8d95c674..f813e71f85 100644 --- a/fighters/szerosuit/src/acmd/throws.rs +++ b/fighters/szerosuit/src/acmd/throws.rs @@ -230,11 +230,11 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); - agent.acmd("effect_catch", null); + agent.acmd("effect_catch", stub); agent.acmd("sound_catch", sound_catch); agent.acmd("expression_catch", expression_catch); agent.acmd("game_catchdash", game_catchdash); diff --git a/fighters/younglink/src/acmd/throws.rs b/fighters/younglink/src/acmd/throws.rs index 39c13bfba0..a143df9d34 100644 --- a/fighters/younglink/src/acmd/throws.rs +++ b/fighters/younglink/src/acmd/throws.rs @@ -157,11 +157,11 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn null(agent: &mut L2CAgentBase) {} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { agent.acmd("game_aircatch", game_aircatch); - agent.acmd("game_aircatchlanding", null); + agent.acmd("game_aircatchlanding", stub); agent.acmd("game_throwf", game_throwf); From 659d7a56af9fcf5be9bb56ac421f390862aa825c Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 11:46:05 -0500 Subject: [PATCH 154/172] r cleanup + restructure dancing blade/mii fighters/power board yay --- fighters/chrom/src/acmd/specials.rs | 279 +-- .../src/acmd/{specials.rs => specials/mod.rs} | 538 +---- .../lucina/src/acmd/specials/special_s2.rs | 142 ++ .../lucina/src/acmd/specials/special_s3.rs | 215 ++ .../lucina/src/acmd/specials/special_s4.rs | 188 ++ fighters/marth/src/acmd/specials.rs | 557 ----- fighters/marth/src/acmd/specials/mod.rs | 177 ++ .../marth/src/acmd/specials/special_s2.rs | 112 + .../marth/src/acmd/specials/special_s3.rs | 171 ++ .../marth/src/acmd/specials/special_s4.rs | 118 ++ fighters/miifighter/src/acmd/specials.rs | 1174 ----------- fighters/miifighter/src/acmd/specials/mod.rs | 13 + .../src/acmd/specials/special_hi.rs | 445 ++++ .../src/acmd/specials/special_lw.rs | 472 +++++ .../miifighter/src/acmd/specials/special_n.rs | 142 ++ .../miifighter/src/acmd/specials/special_s.rs | 157 ++ fighters/miifighter/src/status/mod.rs | 14 +- fighters/miifighter/src/status/special_lw1.rs | 18 + fighters/miigunner/src/acmd/specials.rs | 481 ----- fighters/miigunner/src/acmd/specials/mod.rs | 13 + .../miigunner/src/acmd/specials/special_hi.rs | 162 ++ .../miigunner/src/acmd/specials/special_lw.rs | 121 ++ .../miigunner/src/acmd/specials/special_n.rs | 209 ++ .../miigunner/src/acmd/specials/special_s.rs | 38 + fighters/miiswordsman/src/acmd/specials.rs | 1860 ----------------- .../miiswordsman/src/acmd/specials/mod.rs | 13 + .../src/acmd/specials/special_hi.rs | 474 +++++ .../src/acmd/specials/special_lw.rs | 635 ++++++ .../src/acmd/specials/special_n.rs | 305 +++ .../src/acmd/specials/special_s.rs | 461 ++++ fighters/miiswordsman/src/chakram/mod.rs | 2 + fighters/miiswordsman/src/chakram/status.rs | 17 + .../miiswordsman/src/status/final_hold.rs | 12 + fighters/miiswordsman/src/status/mod.rs | 1306 +----------- .../miiswordsman/src/status/special_hi.rs | 35 + .../miiswordsman/src/status/special_hi2.rs | 54 + .../miiswordsman/src/status/special_hi3.rs | 172 ++ .../miiswordsman/src/status/special_lw.rs | 153 ++ .../miiswordsman/src/status/special_lw1.rs | 81 + .../miiswordsman/src/status/special_lw3.rs | 149 ++ .../miiswordsman/src/status/special_s1.rs | 298 +++ .../miiswordsman/src/status/special_s2.rs | 363 ++++ fighters/palutena/src/acmd/specials.rs | 906 -------- fighters/palutena/src/acmd/specials/mod.rs | 205 ++ .../palutena/src/acmd/specials/special_n_b.rs | 155 ++ .../palutena/src/acmd/specials/special_n_g.rs | 116 + .../palutena/src/acmd/specials/special_n_o.rs | 74 + .../palutena/src/acmd/specials/special_n_p.rs | 155 ++ .../palutena/src/acmd/specials/special_n_r.rs | 127 ++ .../palutena/src/acmd/specials/special_n_y.rs | 104 + fighters/reflet/src/acmd/aerials.rs | 9 +- fighters/reflet/src/acmd/ground.rs | 16 +- fighters/reflet/src/acmd/other.rs | 3 - fighters/reflet/src/acmd/smashes.rs | 4 +- fighters/reflet/src/acmd/specials.rs | 4 +- fighters/reflet/src/acmd/throws.rs | 4 +- fighters/reflet/src/acmd/tilts.rs | 4 +- fighters/reflet/src/elwind/acmd.rs | 5 +- fighters/reflet/src/opff.rs | 2 +- fighters/reflet/src/status/attack_air.rs | 1 - fighters/reflet/src/status/float.rs | 3 +- fighters/reflet/src/status/mod.rs | 4 +- fighters/reflet/src/status/special_n.rs | 3 +- fighters/ridley/src/acmd/aerials.rs | 9 +- fighters/ridley/src/acmd/ground.rs | 5 +- fighters/ridley/src/acmd/other.rs | 8 +- fighters/ridley/src/acmd/smashes.rs | 5 +- fighters/ridley/src/acmd/specials.rs | 9 +- fighters/ridley/src/acmd/throws.rs | 4 +- fighters/ridley/src/acmd/tilts.rs | 14 +- fighters/ridley/src/opff.rs | 2 +- fighters/ridley/src/status/special_lw.rs | 1 - fighters/ridley/src/status/special_n.rs | 1 - fighters/ridley/src/status/special_s.rs | 1 - fighters/robot/src/status/special_s.rs | 1 - fighters/rockman/src/status/mod.rs | 16 +- fighters/rockman/src/status/rebirth.rs | 17 + fighters/roy/src/acmd/aerials.rs | 11 +- fighters/roy/src/acmd/ground.rs | 4 +- fighters/roy/src/acmd/other.rs | 137 +- fighters/roy/src/acmd/smashes.rs | 7 +- fighters/roy/src/acmd/specials.rs | 1342 ------------ fighters/roy/src/acmd/specials/mod.rs | 488 +++++ fighters/roy/src/acmd/specials/special_s1.rs | 89 + fighters/roy/src/acmd/specials/special_s2.rs | 177 ++ fighters/roy/src/acmd/specials/special_s3.rs | 275 +++ fighters/roy/src/acmd/specials/special_s4.rs | 328 +++ fighters/ryu/src/acmd/aerials.rs | 7 +- fighters/ryu/src/acmd/finals.rs | 1 + fighters/ryu/src/acmd/ground.rs | 6 +- fighters/ryu/src/acmd/other.rs | 3 - fighters/ryu/src/acmd/smashes.rs | 35 +- fighters/ryu/src/acmd/specials/mod.rs | 1 + .../ryu/src/acmd/specials/special_command.rs | 1 - fighters/ryu/src/acmd/specials/special_hi.rs | 2 - fighters/ryu/src/acmd/specials/special_lw.rs | 1 - fighters/ryu/src/acmd/specials/special_n.rs | 180 -- fighters/ryu/src/acmd/specials/special_s.rs | 17 +- fighters/ryu/src/acmd/throws.rs | 6 +- fighters/ryu/src/acmd/tilts.rs | 3 +- fighters/ryu/src/hadoken/acmd.rs | 1 + fighters/ryu/src/shinkuhadoken/acmd.rs | 4 +- fighters/ryu/src/status/attack.rs | 196 ++ fighters/ryu/src/status/dash.rs | 41 + fighters/ryu/src/status/guard.rs | 85 + fighters/ryu/src/status/landing.rs | 11 + fighters/ryu/src/status/mod.rs | 411 +--- fighters/ryu/src/status/wait.rs | 60 + 108 files changed, 9026 insertions(+), 9247 deletions(-) rename fighters/lucina/src/acmd/{specials.rs => specials/mod.rs} (57%) create mode 100644 fighters/lucina/src/acmd/specials/special_s2.rs create mode 100644 fighters/lucina/src/acmd/specials/special_s3.rs create mode 100644 fighters/lucina/src/acmd/specials/special_s4.rs delete mode 100644 fighters/marth/src/acmd/specials.rs create mode 100644 fighters/marth/src/acmd/specials/mod.rs create mode 100644 fighters/marth/src/acmd/specials/special_s2.rs create mode 100644 fighters/marth/src/acmd/specials/special_s3.rs create mode 100644 fighters/marth/src/acmd/specials/special_s4.rs delete mode 100644 fighters/miifighter/src/acmd/specials.rs create mode 100644 fighters/miifighter/src/acmd/specials/mod.rs create mode 100644 fighters/miifighter/src/acmd/specials/special_hi.rs create mode 100644 fighters/miifighter/src/acmd/specials/special_lw.rs create mode 100644 fighters/miifighter/src/acmd/specials/special_n.rs create mode 100644 fighters/miifighter/src/acmd/specials/special_s.rs create mode 100644 fighters/miifighter/src/status/special_lw1.rs delete mode 100644 fighters/miigunner/src/acmd/specials.rs create mode 100644 fighters/miigunner/src/acmd/specials/mod.rs create mode 100644 fighters/miigunner/src/acmd/specials/special_hi.rs create mode 100644 fighters/miigunner/src/acmd/specials/special_lw.rs create mode 100644 fighters/miigunner/src/acmd/specials/special_n.rs create mode 100644 fighters/miigunner/src/acmd/specials/special_s.rs delete mode 100644 fighters/miiswordsman/src/acmd/specials.rs create mode 100644 fighters/miiswordsman/src/acmd/specials/mod.rs create mode 100644 fighters/miiswordsman/src/acmd/specials/special_hi.rs create mode 100644 fighters/miiswordsman/src/acmd/specials/special_lw.rs create mode 100644 fighters/miiswordsman/src/acmd/specials/special_n.rs create mode 100644 fighters/miiswordsman/src/acmd/specials/special_s.rs create mode 100644 fighters/miiswordsman/src/chakram/status.rs create mode 100644 fighters/miiswordsman/src/status/final_hold.rs create mode 100644 fighters/miiswordsman/src/status/special_hi.rs create mode 100644 fighters/miiswordsman/src/status/special_hi2.rs create mode 100644 fighters/miiswordsman/src/status/special_hi3.rs create mode 100644 fighters/miiswordsman/src/status/special_lw.rs create mode 100644 fighters/miiswordsman/src/status/special_lw1.rs create mode 100644 fighters/miiswordsman/src/status/special_lw3.rs create mode 100644 fighters/miiswordsman/src/status/special_s1.rs create mode 100644 fighters/miiswordsman/src/status/special_s2.rs delete mode 100644 fighters/palutena/src/acmd/specials.rs create mode 100644 fighters/palutena/src/acmd/specials/mod.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_b.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_g.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_o.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_p.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_r.rs create mode 100644 fighters/palutena/src/acmd/specials/special_n_y.rs create mode 100644 fighters/rockman/src/status/rebirth.rs delete mode 100644 fighters/roy/src/acmd/specials.rs create mode 100644 fighters/roy/src/acmd/specials/mod.rs create mode 100644 fighters/roy/src/acmd/specials/special_s1.rs create mode 100644 fighters/roy/src/acmd/specials/special_s2.rs create mode 100644 fighters/roy/src/acmd/specials/special_s3.rs create mode 100644 fighters/roy/src/acmd/specials/special_s4.rs create mode 100644 fighters/ryu/src/status/attack.rs create mode 100644 fighters/ryu/src/status/dash.rs create mode 100644 fighters/ryu/src/status/guard.rs create mode 100644 fighters/ryu/src/status/landing.rs create mode 100644 fighters/ryu/src/status/wait.rs diff --git a/fighters/chrom/src/acmd/specials.rs b/fighters/chrom/src/acmd/specials.rs index 4a3147c0e5..129b3fa6cb 100644 --- a/fighters/chrom/src/acmd/specials.rs +++ b/fighters/chrom/src/acmd/specials.rs @@ -253,33 +253,6 @@ unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -304,30 +277,6 @@ unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -355,33 +304,6 @@ unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -409,33 +331,6 @@ unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -460,30 +355,6 @@ unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -511,33 +382,6 @@ unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -565,33 +409,6 @@ unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -619,33 +436,6 @@ unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("chrom_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 3.0); @@ -697,57 +487,6 @@ unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairs4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 13.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 19.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_green"), false, true); - COL_NORMAL(agent); - } -} - unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -918,23 +657,23 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnend3", game_specialairnend3); agent.acmd("effect_specials1", effect_specials1); - agent.acmd("effect_specialairs1", effect_specialairs1); + agent.acmd("effect_specialairs1", effect_specials1); agent.acmd("effect_specials2hi", effect_specials2hi); - agent.acmd("effect_specialairs2hi", effect_specialairs2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); agent.acmd("effect_specials2lw", effect_specials2lw); - agent.acmd("effect_specialairs2lw", effect_specialairs2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); agent.acmd("effect_specials3hi", effect_specials3hi); - agent.acmd("effect_specialairs3hi", effect_specialairs3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); agent.acmd("effect_specials3s", effect_specials3s); - agent.acmd("effect_specialairs3s", effect_specialairs3s); + agent.acmd("effect_specialairs3s", effect_specials3s); agent.acmd("effect_specials3lw", effect_specials3lw); - agent.acmd("effect_specialairs3lw", effect_specialairs3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); agent.acmd("effect_specials4hi", effect_specials4hi); - agent.acmd("effect_specialairs4hi", effect_specialairs4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); agent.acmd("effect_specials4s", effect_specials4s); - agent.acmd("effect_specialairs4s", effect_specialairs4s); + agent.acmd("effect_specialairs4s", effect_specials4s); agent.acmd("effect_specials4lw", effect_specials4lw); - agent.acmd("effect_specialairs4lw", effect_specialairs4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); agent.acmd("game_specialhi2", game_specialhi2); agent.acmd("game_specialairhi2", game_specialairhi2); diff --git a/fighters/lucina/src/acmd/specials.rs b/fighters/lucina/src/acmd/specials/mod.rs similarity index 57% rename from fighters/lucina/src/acmd/specials.rs rename to fighters/lucina/src/acmd/specials/mod.rs index 544102ea18..90b23fcfca 100644 --- a/fighters/lucina/src/acmd/specials.rs +++ b/fighters/lucina/src/acmd/specials/mod.rs @@ -1,5 +1,9 @@ use super::*; +mod special_s2; +mod special_s3; +mod special_s4; + unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -248,492 +252,6 @@ unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); - } -} - -unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 32.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); - } -} - -unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); - } -} - -unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 7.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); - } - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); - } -} - -unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); - } -} - -unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); - frame(lua_state, 7.0); - for _ in 0..4 { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 13.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 19.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); - COL_NORMAL(agent); - } -} - unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -873,51 +391,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairs1", game_specials1); agent.acmd("effect_specials1", effect_specials1); agent.acmd("effect_specialairs1", effect_specials1); - - agent.acmd("game_specials2hi", game_specials2hi); - agent.acmd("game_specialairs2hi", game_specials2hi); - agent.acmd("effect_specials2hi", effect_specials2hi); - agent.acmd("effect_specialairs2hi", effect_specials2hi); - agent.acmd("sound_specials2hi", sound_specials2hi); - agent.acmd("sound_specialairs2hi", sound_specials2hi); - agent.acmd("game_specials2lw", game_specials2lw); - agent.acmd("game_specialairs2lw", game_specials2lw); - agent.acmd("effect_specials2lw", effect_specials2lw); - agent.acmd("effect_specialairs2lw", effect_specials2lw); - agent.acmd("sound_specials2lw", sound_specials2lw); - agent.acmd("sound_specialairs2lw", sound_specials2lw); - - agent.acmd("game_specials3hi", game_specials3hi); - agent.acmd("game_specialairs3hi", game_specials3hi); - agent.acmd("effect_specials3hi", effect_specials3hi); - agent.acmd("effect_specialairs3hi", effect_specials3hi); - agent.acmd("sound_specials3hi", sound_specials3hi); - agent.acmd("sound_specialairs3hi", sound_specials3hi); - agent.acmd("game_specials3s", game_specials3s); - agent.acmd("game_specialairs3s", game_specials3s); - agent.acmd("effect_specials3s", effect_specials3s); - agent.acmd("effect_specialairs3s", effect_specials3s); - agent.acmd("sound_specials3s", sound_specials3s); - agent.acmd("sound_specialairs3s", sound_specials3s); - agent.acmd("game_specials3lw", game_specials3lw); - agent.acmd("game_specialairs3lw", game_specials3lw); - agent.acmd("effect_specials3lw", effect_specials3lw); - agent.acmd("effect_specialairs3lw", effect_specials3lw); - agent.acmd("sound_specials3lw", sound_specials3lw); - agent.acmd("sound_specialairs3lw", sound_specials3lw); - - agent.acmd("game_specials4hi", game_specials4hi); - agent.acmd("game_specialairs4hi", game_specials4hi); - agent.acmd("effect_specials4hi", effect_specials4hi); - agent.acmd("effect_specialairs4hi", effect_specials4hi); - agent.acmd("game_specials4s", game_specials4s); - agent.acmd("game_specialairs4s", game_specials4s); - agent.acmd("effect_specials4s", effect_specials4s); - agent.acmd("effect_specialairs4s", effect_specials4s); - agent.acmd("game_specials4lw", game_specials4lw); - agent.acmd("game_specialairs4lw", game_specials4lw); - agent.acmd("effect_specials4lw", effect_specials4lw); - agent.acmd("effect_specialairs4lw", effect_specials4lw); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); diff --git a/fighters/lucina/src/acmd/specials/special_s2.rs b/fighters/lucina/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..d0b18793a8 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s2.rs @@ -0,0 +1,142 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 90, 30, 0, 30, 4.5, 0.0, 6.0, 12.5, Some(0.0), Some(16.0), Some(12.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 30, 0, 30, 3.0, 0.0, 6.0, 16.0, Some(0.0), Some(18.0), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 30, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 32.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02h")); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 6.5, 0.0, 9.0, 13.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.5, 0.0, 9.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 30, 4.0, 0.0, 9.0, 16.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 20.0/(38.0-9.0)); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 32.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_2lw"), Hash40::new("top"), 0, 0.6, 0.2, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s02l")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/special_s3.rs b/fighters/lucina/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..5d42860909 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s3.rs @@ -0,0 +1,215 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 6.0, 9.0, Some(0.0), Some(15.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(16.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 125, 70, 0, 80, 4.5, 0.0, 9.0, 3.5, Some(0.0), Some(11.0), Some(3.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 27.0/(43.0-8.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack03")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03h")); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.5, 0.0, 9.0, 9.0, Some(0.0), Some(11.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 6.0, 0.0, 9.0, 14.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 54, 86, 0, 57, 4.0, 0.0, 9.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 25.0/(43.0-7.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3s"), Hash40::new("top"), 0, -2.5, 2.5, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack05")); + } + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03s")); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 4.8, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 39, 39, 0, 67, 3.0, 0.0, 7.0, 10.0, Some(0.0), Some(7.0), Some(19.3), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 23.0/(43.0-8.0)); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_3lw"), Hash40::new("top"), 0, -0.5, -1, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_lucina_special_s03l")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_lucina_attack02")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); +} \ No newline at end of file diff --git a/fighters/lucina/src/acmd/specials/special_s4.rs b/fighters/lucina/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..4fe11cf535 --- /dev/null +++ b/fighters/lucina/src/acmd/specials/special_s4.rs @@ -0,0 +1,188 @@ +use super::*; + +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.5, 0.0, 6.0, 7.5, Some(0.0), Some(21.0), Some(7.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 6.0, 15.0, Some(0.0), Some(21.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 4.0, 0.0, 21.0, 11.0, Some(0.0), Some(24.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0 + add_damage, 79, 80, 0, 60, 3.0, 0.0, 23.0, 14.0, Some(0.0), Some(27.0), Some(4.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 24.0/(44.0-11.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 8.0, 0.0, 9.0, 11.7, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0 + add_damage, 361, 73, 0, 60, 5.0, 0.0, 9.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 35.0/(55.0-10.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("lucina_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let add_damage = 0.5*(DamageModule::damage(boma, 0) - VarModule::get_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE)); + frame(lua_state, 7.0); + for _ in 0..4 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 5.0, 0.0, 6.0, 11.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.0, 0.0, 6.0, 16.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 80, 20, 0, 2, 4.5, 0.0, 6.0, 6.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 5.0, 0.0, 7.0, 11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 3.0, 0.0, 8.0, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0 + add_damage, 30, 47, 0, 64, 4.5, 0.0, 6.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 22.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 42.0/(74.0-22.0)); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("lucina_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("lucina_sword_green"), false, true); + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); +} \ No newline at end of file diff --git a/fighters/marth/src/acmd/specials.rs b/fighters/marth/src/acmd/specials.rs deleted file mode 100644 index 804eb86a76..0000000000 --- a/fighters/marth/src/acmd/specials.rs +++ /dev/null @@ -1,557 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(agent, 2.0, 9.0, 4.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 12.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 31.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 9.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 30.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 6.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 25.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 5.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.24, 1, 0.7); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 1, 0, 0.05, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - FLASH(agent, 0, 0.93, 0.03, 0.7); - } - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 13.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 2); - } - frame(lua_state, 19.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); - LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - frame(lua_state, 7.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 12.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } -} - -unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - AttackModule::set_force_reaction(boma, 3, true, false); - if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); - } - } - frame(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_specials1", game_specials1); - agent.acmd("game_specialairs1", game_specialairs1); - agent.acmd("effect_specials1", effect_specials1); - agent.acmd("effect_specialairs1", effect_specials1); - agent.acmd("expression_specials1", expression_specials1); - - agent.acmd("game_specials2hi", game_specials2hi); - agent.acmd("game_specialairs2hi", game_specials2hi); - agent.acmd("effect_specials2hi", effect_specials2hi); - agent.acmd("effect_specialairs2hi", effect_specials2hi); - agent.acmd("game_specials2lw", game_specials2lw); - agent.acmd("game_specialairs2lw", game_specials2lw); - agent.acmd("effect_specials2lw", effect_specials2lw); - agent.acmd("effect_specialairs2lw", effect_specials2lw); - - agent.acmd("game_specials3hi", game_specials3hi); - agent.acmd("game_specialairs3hi", game_specials3hi); - agent.acmd("effect_specials3hi", effect_specials3hi); - agent.acmd("effect_specialairs3hi", effect_specials3hi); - agent.acmd("game_specials3s", game_specials3s); - agent.acmd("game_specialairs3s", game_specials3s); - agent.acmd("effect_specials3s", effect_specials3s); - agent.acmd("effect_specialairs3s", effect_specials3s); - agent.acmd("game_specials3lw", game_specials3lw); - agent.acmd("game_specialairs3lw", game_specials3lw); - agent.acmd("effect_specials3lw", effect_specials3lw); - agent.acmd("effect_specialairs3lw", effect_specials3lw); - - agent.acmd("effect_specials4hi", effect_specials4hi); - agent.acmd("effect_specialairs4hi", effect_specials4hi); - agent.acmd("effect_specials4s", effect_specials4s); - agent.acmd("effect_specialairs4s", effect_specials4s); - agent.acmd("effect_specials4lw", effect_specials4lw); - agent.acmd("effect_specialairs4lw", effect_specials4lw); - - agent.acmd("game_specialhi", game_specialhi); - agent.acmd("game_specialairhi", game_specialhi); - - agent.acmd("game_speciallwhit", game_speciallwhit); - agent.acmd("game_specialairlwhit", game_speciallwhit); -} diff --git a/fighters/marth/src/acmd/specials/mod.rs b/fighters/marth/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..d410a02dff --- /dev/null +++ b/fighters/marth/src/acmd/specials/mod.rs @@ -0,0 +1,177 @@ +use super::*; + +mod special_s2; +mod special_s3; +mod special_s4; + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 9.0, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 25, 6.5, 0.0, 9.5, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 60, 0, 25, 7.5, 0.0, 9.5, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 20, 60, 0, 25, 4.5, 0.0, 9.5, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 78, 75, 0, 35, 6.5, 0.0, 9.0, 11.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 88, 75, 0, 35, 7.5, 0.0, 9.0, 16.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 20, 75, 0, 35, 4.5, 0.0, 9.0, 3.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 31.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 9.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 11.0, 361, 89, 0, 70, 4.0, 0.0, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 10.0, 74, 74, 0, 70, 4.0, 0.0, 0.0, 2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 10.0, 74, 74, 0, 70, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 7.0, 361, 90, 0, 20, 4.0, 0.0, 0.0, 5.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 7.0, 74, 90, 0, 20, 4.0, 0.0, 0.0, 1.5, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("colonells"), 7.0, 74, 90, 0, 20, 5.0, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 20.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 1.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("claviclel"), 8.0, 361, 35, 0, 90, 5.5, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 8.0, 361, 35, 0, 90, 5.5, 1.5, 0.0, 6.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + AttackModule::set_force_reaction(boma, 3, true, false); + if WorkModule::is_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { + AttackModule::set_optional_hit_sound(boma, 0, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 1, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 2, Hash40::new("se_marth_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 3, Hash40::new("se_marth_criticalhit")); + } + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("expression_specials1", expression_specials1); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialhi); + + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/marth/src/acmd/specials/special_s2.rs b/fighters/marth/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..c4529bff4c --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s2.rs @@ -0,0 +1,112 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 80, 70, 0, 30, 4.5, 0.0, 7.0, 11.0, Some(0.0), Some(14.5), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 85, 50, 0, 30, 4.5, 0.0, 6.0, 17.0, Some(0.0), Some(18.0), Some(17.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 70, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 30, 0, 30, 6.5, 0.0, 9.0, 11.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 90, 30, 0, 30, 6.5, 0.0, 9.0, 18.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 30, 4.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_2lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); +} diff --git a/fighters/marth/src/acmd/specials/special_s3.rs b/fighters/marth/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..4fb327855d --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s3.rs @@ -0,0 +1,171 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 60, 0, 60, 4.5, 0.0, 7.0, 7.5, Some(0.0), Some(13.5), Some(7.5), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 5.0, 85, 40, 0, 60, 4.5, 0.0, 6.0, 13.0, Some(0.0), Some(16.0), Some(13.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 60, 60, 0, 60, 4.5, 0.0, 9.0, 3.0, Some(0.0), Some(11.0), Some(3.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 50, 30, 0, 52, 6.5, 0.0, 9.0, 11.0, Some(0.0), Some(11.0), Some(11.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 55, 30, 0, 45, 6.5, 0.0, 7.5, 18.0, Some(0.0), Some(11.5), Some(18.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 40, 30, 0, 59, 5.5, 0.0, 9.0, 7.0, Some(0.0), Some(9.0), Some(7.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 6.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 270, 75, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 6.0, 270, 90, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("top"), 5.0, 270, 60, 0, 40, 4.8, 0.0, 5.6, 12.5, Some(0.0), Some(7.0), Some(8.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 6.0, 270, 65, 0, 40, 5.4, 0.0, 4.0, 19.4, Some(0.0), Some(7.0), Some(10.0), 1.0, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 25.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 5.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_3lw"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); +} diff --git a/fighters/marth/src/acmd/specials/special_s4.rs b/fighters/marth/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..022075ec5e --- /dev/null +++ b/fighters/marth/src/acmd/specials/special_s4.rs @@ -0,0 +1,118 @@ +use super::*; + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.24, 1, 0.7); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_blue"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4hi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_blue"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 1, 0, 0.05, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_red"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("marth_mc_4s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_red"), false, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + FLASH(agent, 0, 0.93, 0.03, 0.7); + } + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("marth_sword_green"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 13.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1.20000005, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.699999988, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 2); + } + frame(lua_state, 19.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("haver"), 0, -3.5, 0, -90, 0, 0, 0.800000012, 0, 0, 0, 0, 0, 0, true); + LAST_PARTICLE_SET_COLOR(agent, 0.400000006, 1, 0.300000012); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("marth_sword_green"), false, true); + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); +} diff --git a/fighters/miifighter/src/acmd/specials.rs b/fighters/miifighter/src/acmd/specials.rs deleted file mode 100644 index c0d0ca2325..0000000000 --- a/fighters/miifighter/src/acmd/specials.rs +++ /dev/null @@ -1,1174 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_specialn2start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 17.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 20.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - FT_MOTION_RATE(agent, 1.1); - frame(lua_state, 24.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_PULL_FINISH_ATTACK); - ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialn2finish(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); - } - frame(lua_state, 2.0); - FT_MOTION_RATE(agent, 0.8); - frame(lua_state, 12.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_NORMAL); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 0.8); - frame(lua_state, 49.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 68.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_specialairn2finish(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); - } - frame(lua_state, 2.0); - FT_MOTION_RATE(agent, 0.8); - frame(lua_state, 12.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_NORMAL); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 0.8); - frame(lua_state, 49.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 68.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_specials1end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); - } - frame(lua_state, 27.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 29.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialairs1end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - SET_SPEED_EX(agent, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); - } - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 12.0); - if is_excute(agent) { - SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 14.0); - if is_excute(agent) { - KineticModule::add_speed(boma, &Vector3f{x: 0.3, y: 0.5, z: 0.0}); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 17.0); - if is_excute(agent) { - KineticModule::add_speed(boma, &Vector3f{x: -0.3, y: 0.7, z: 0.0}); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(agent) { - KineticModule::add_speed(boma, &Vector3f{x: 0.85, y: 3.0, z: 0.0}); - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 30.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING); - } - frame(lua_state, 48.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 55.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_CONTROL_X); - } -} - -unsafe extern "C" fn game_specialairs2start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::on_flag(agent.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); - } -} - -unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); - } - -} - -unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); - if is_excute(agent) { - if agent.is_prev_situation(*SITUATION_KIND_GROUND) { - PostureModule::add_pos(boma, &Vector3f::new(0.0, 0.2, 0.0)); - } - } - frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(agent, 7.0, 8.5, 2.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); - ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 8.5); - FT_MOTION_RATE_RANGE(agent, 8.5, 11.0, 3.0); - if is_excute(agent) { - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && agent.is_stick_backward() { - PostureModule::reverse_lr(agent.module_accessor); - PostureModule::update_rot_y_lr(agent.module_accessor); - } - HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); - ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 17.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); - let fall_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); - let fall_acl_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); - sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); - sv_kinetic_energy!(set_accel_y_mul, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); - } -} - -unsafe extern "C" fn effect_specialhi12(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); - LAST_EFFECT_SET_RATE(agent, 1.25); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_tenchi_arc"), -1); - } -} - -unsafe extern "C" fn sound_specialhi12(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_h01")); - PLAY_SE(agent, Hash40::new("se_miifighter_special_h01")); - } -} - -unsafe extern "C" fn expression_specialhi12(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - } - frame(lua_state, 9.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 33.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); - } - frame(lua_state, 36.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); - } - frame(lua_state, 51.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); - } -} - -unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 33.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); - } - frame(lua_state, 36.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 49.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); - } - frame(lua_state, 51.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); - } -} - -unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_speciallw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 4.0); - if is_excute(agent) { - let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_windwave"), Hash40::new("top"), &Vector3f::new(0.0, 0.0, 10.0), &Vector3f::zero(), 0.4, false, 0, 0, 0, 0, 0, false, false); - EffectModule::set_rate(boma, eff_handle as u32, 0.4); - VarModule::set_int64(agent.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); - EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(agent, 0.4); - } - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_hold"), true, true); - } - frame(lua_state, 13.0); - let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_flash"), true, true); - LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); - LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_SCALE_W(agent, 0.6, 1.1, 0.6); - EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sound_speciallw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_attack03")); - } - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_miifighter_smash_s03")); - PLAY_SE(agent, Hash40::new("se_miifighter_special_l03")); - PLAY_SE(agent, Hash40::new("se_miifighter_special_s03")); - PLAY_SE_REMAIN(agent, Hash40::new("se_miifighter_special_c2_s02")); - } -} - -unsafe extern "C" fn expression_speciallw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, false, 0); - }; - frame(lua_state, 13.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - QUAKE(agent, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - AREA_WIND_2ND_arg10(agent, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); - } - wait(lua_state, 18.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - wait(lua_state, 18.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } - wait(lua_state, 3.0); - if is_excute(agent) { - ItemModule::set_have_item_visibility(boma, true, 0); - } - frame(lua_state, 52.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); - } -} - -unsafe extern "C" fn effect_specialairlw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn sound_specialairlw1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_miifighter_special_l02")); - } - frame(lua_state, 19.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_l01")); - PLAY_SE(agent, Hash40::new("se_miifighter_final06")); - PLAY_SE(agent, Hash40::new("se_miifighter_final06")); - } -} - -unsafe extern "C" fn game_speciallw1loop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); - app::sv_kinetic_energy::clear_speed(agent.lua_state_agent); - KineticModule::clear_speed_all(boma); - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); - SET_SPEED_EX(agent, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); - } -} - -unsafe extern "C" fn effect_speciallw1loop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - for _ in 0..24 { - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); - } - wait(lua_state, 2.0); - } -} - -unsafe extern "C" fn game_speciallw1landing(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - SET_SPEED_EX(agent, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); - AttackModule::clear(boma, 0, false); - AttackModule::clear(boma, 2, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - } - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - SA_SET(agent, *SITUATION_KIND_AIR); - WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); - ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 15.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 17.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); - } -} - -unsafe extern "C" fn effect_specialairhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); - EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); - } -} - -unsafe extern "C" fn game_speciallw2start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); - frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); - } - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); - } frame(lua_state, 13.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); - } - frame(lua_state, 19.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 27.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - } - frame(lua_state, 43.0); - if is_excute(agent) { - search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn game_specialairlw2start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); - frame(lua_state, 1.5); - FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); - frame(lua_state, 2.0); - FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); - } - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); - } frame(lua_state, 13.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); - } - frame(lua_state, 19.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 27.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); - SEARCH(agent, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - } - frame(lua_state, 43.0); - if is_excute(agent) { - search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn game_specialairlw2kick(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 7.0); - if is_excute(agent) { - /* - let dive_speed_x_modifier_stick_mul = 0.5; - let dive_speed_y_modifier_stick_mul = 0.5; - let mut dive_speed_x_modifier_raw = dive_speed_x_modifier_stick_mul * ControlModule::get_stick_x(boma) * PostureModule::lr(boma); - let mut dive_speed_y_modifier_raw = dive_speed_y_modifier_stick_mul * ControlModule::get_stick_y(boma); - let mut dive_speed_x_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_x_modifier_stick_mul, dive_speed_x_modifier_stick_mul * 0.5); - let mut dive_speed_y_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_y_modifier_stick_mul, dive_speed_y_modifier_stick_mul * 0.5); - SET_SPEED_EX(fighter, -3.0 + dive_speed_x_modifier, -2.5 + dive_speed_y_modifier, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - */ - SET_SPEED_EX(agent, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - } - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 22.0); - FT_MOTION_RATE(agent, 1.5); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialairlw2autoattack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_speciallw3catch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 8.0); - if is_excute(agent) { - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - //SEARCH(fighter, 0, 0, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *COLLISION_KIND_MASK_ALL, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); - GrabModule::set_rebound(boma, true); - CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); - } - frame(lua_state, 6.0); - FT_MOTION_RATE(agent, 1.2); - if is_excute(agent) { - grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(boma, false); - //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); - } -} - -unsafe extern "C" fn game_speciallw3throw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(agent); - //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 66, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 1.0); - if is_excute(agent) { - FT_CATCH_STOP(agent, 5, 1); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - FT_CATCH_STOP(agent, 5, 1); - //CHECK_FINISH_CAMERA(fighter, 14, 0); - //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); - } - frame(lua_state, 14.0); - FT_MOTION_RATE(agent, 0.5); - if is_excute(agent) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - let opponent_boma = agent.get_grabbed_opponent_boma(); - if opponent_boma.is_fighter() { - VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); - } - ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(agent, *HIT_STATUS_NORMAL); - } -} - -unsafe extern "C" fn game_specialairlw3throw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_COUNTER_THROW_FLAG_THROW_AFTER_LANDING); - WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); - REVERSE_LR(agent); - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - } - frame(lua_state, 1.0); - if is_excute(agent) { - FT_CATCH_STOP(agent, 5, 1); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - frame(lua_state, 11.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - FT_CATCH_STOP(agent, 5, 1); - //CHECK_FINISH_CAMERA(fighter, 14, 0); - //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); - } - frame(lua_state, 13.0); - if is_excute(agent) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); - WHOLE_HIT(agent, *HIT_STATUS_NORMAL); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialairlw3throw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - COL_PRI(agent, 101); - FLASH(agent, 1, 1, 1, 0); - EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(agent, 0.8); - } - frame(lua_state, 3.0); - if is_excute(agent) { - COL_NORMAL(agent); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); - LAST_EFFECT_SET_RATE(agent, 0.8); - } - frame(lua_state, 12.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0); - } - frame(lua_state, 15.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -pub fn install(agent: &mut Agent) {; - agent.acmd("game_specialn2start", game_specialn2start); - agent.acmd("game_specialairn2start", game_specialn2start); - agent.acmd("game_specialn2finish", game_specialn2finish); - agent.acmd("game_specialairn2finish", game_specialairn2finish); - - agent.acmd("game_specials1end", game_specials1end); - agent.acmd("game_specialairs1end", game_specialairs1end); - agent.acmd("game_specialairs2start", game_specialairs2start); - - agent.acmd("game_specialhi1", game_specialhi1); - agent.acmd("effect_specialhi1", effect_specialhi1); - agent.acmd("effect_specialairhi1", effect_specialhi1); - agent.acmd("game_specialhi12", game_specialhi12); - agent.acmd("game_specialairhi12", game_specialhi12); - agent.acmd("effect_specialhi12", effect_specialhi12); - agent.acmd("effect_specialairhi12", effect_specialhi12); - agent.acmd("sound_specialhi12", sound_specialhi12); - agent.acmd("sound_specialairhi12", sound_specialhi12); - agent.acmd("expression_specialhi12", expression_specialhi12); - agent.acmd("expression_specialairhi12", expression_specialhi12); - agent.acmd("game_specialhi2", game_specialhi2); - agent.acmd("game_specialairhi2", game_specialairhi2); - - agent.acmd("game_speciallw1", game_speciallw1); - agent.acmd("effect_speciallw1", effect_speciallw1); - agent.acmd("sound_speciallw1", sound_speciallw1); - agent.acmd("expression_speciallw1", expression_speciallw1); - agent.acmd("effect_specialairlw1", effect_specialairlw1); - agent.acmd("sound_specialairlw1", sound_specialairlw1); - agent.acmd("game_speciallw1loop", game_speciallw1loop); - agent.acmd("effect_speciallw1loop", effect_speciallw1loop); - agent.acmd("game_speciallw1landing", game_speciallw1landing); - - agent.acmd("game_specialhi3", game_specialhi3); - agent.acmd("game_specialairhi3", game_specialhi3); - agent.acmd("effect_specialhi3", effect_specialhi3); - agent.acmd("effect_specialairhi3", effect_specialairhi3); - - agent.acmd("game_speciallw2start", game_speciallw2start); - agent.acmd("game_specialairlw2start", game_specialairlw2start); - agent.acmd("game_specialairlw2kick", game_specialairlw2kick); - agent.acmd("game_specialairlw2autoattack", game_specialairlw2autoattack); - - agent.acmd("game_speciallw3catch", game_speciallw3catch); - agent.acmd("game_specialairlw3catch", game_speciallw3catch); - agent.acmd("game_speciallw3throw", game_speciallw3throw); - agent.acmd("game_specialairlw3throw", game_specialairlw3throw); - agent.acmd("effect_specialairlw3throw", effect_specialairlw3throw); -} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/mod.rs b/fighters/miifighter/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..7c584b7a28 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) {; + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_hi.rs b/fighters/miifighter/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..a7b1caa895 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_hi.rs @@ -0,0 +1,445 @@ +use super::*; + +// ================================================================================================ +// ======================================== SOARING AXE KICK ====================================== +// ================================================================================================ + +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_flash"), Hash40::new("top"), 4, 4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_start"), Hash40::new("toel"), 0, 0, 0, 90, 0, 0, 2, true); + } +} + +unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 3.0); + if is_excute(agent) { + if agent.is_prev_situation(*SITUATION_KIND_GROUND) { + PostureModule::add_pos(boma, &Vector3f::new(0.0, 0.2, 0.0)); + } + } + frame(lua_state, 7.0); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.5, 2.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("legr"), 14.0, 52, 65, 0, 70, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 4.5, 2.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 14.0, 52, 65, 0, 70, 5.0, 5.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 8.5); + FT_MOTION_RATE_RANGE(agent, 8.5, 11.0, 3.0); + if is_excute(agent) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && agent.is_stick_backward() { + PostureModule::reverse_lr(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); + } + HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); + ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.0, 45, 80, 0, 40, 3.5, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let fall_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); + let fall_acl_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); + sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); + sv_kinetic_energy!(set_accel_y_mul, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, fall_acl_y_mul); + } +} + +unsafe extern "C" fn effect_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_tenchi_arc"), Hash40::new("top"), 0, 13, -1, 0, 15, 90, 1.0, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_tenchi_arc"), -1); + } +} + +unsafe extern "C" fn sound_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_h01")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_h01")); + } +} + +unsafe extern "C" fn expression_specialhi12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } + frame(lua_state, 9.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +// ================================================================================================ +// ======================================= HELICOPTER KICK ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 90, 0, 6.5, 0.0, 9.0, 6.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 75, 75, 90, 0, 4.0, 0.0, 14.0, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 55, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); + } +} + +unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_AIR_START); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 70, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 100, 80, 0, 4.5, 0.0, 13.5, 6.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 366, 100, 160, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 367, 100, 70, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 80, 100, 60, 0, 6.0, 0.0, 15.0, 6.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 367, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 68, 100, 130, 0, 4.5, 0.0, 6.5, 3.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_FINISH_ANGLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, 50, 116, 0, 65, 6.5, 0.0, 9.0, 10.0, Some(0.0), Some(0.0), Some(2.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ATTACK_ANGLE); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_END_FLAG_NORMAL_ACCEL_Y); + } + frame(lua_state, 51.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_SYOTEN_KICK_FLAG_SET_ROLL_BACK_ANGLE); + } +} + +// ================================================================================================ +// ======================================= THRUST UPPERCUT ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + } + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + SA_SET(agent, *SITUATION_KIND_AIR); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 80, 100, 170, 0, 3.5, 0.0, 5.5, 3.5, Some(0.0), Some(12.5), Some(3.5), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 105, 100, 160, 0, 5.0, 0.0, 8.0, 5.0, None, None, None, 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 13.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 70, 100, 90, 0, 4.0, 0.0, 21.0, 5.0, Some(0.0), Some(21.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.8, 367, 100, 80, 0, 5.0, 0.0, 14.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.8, 367, 100, 50, 0, 5.0, 0.0, 19.0, 5.0, Some(0.0), Some(20.0), Some(5.0), 0.75, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 89, 76, 0, 74, 7.0, 0.0, 19.0, 2.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + } +} + +unsafe extern "C" fn effect_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 3, 9, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("miifighter_pistonpunch_arc"), Hash40::new("top"), 0, -5, -1.5, 10, 0, 0, 0.75, true, *EF_FLIP_XY); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 18, 3, 10, 0, 0, 0.7, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 18, 3, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("miifighter_pistonpunch_arc"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_pistonpunch_line"), Hash40::new("miifighter_pistonpunch_line"), Hash40::new("top"), 0, -7, 2, -90, 0, 0, 0.8, true, *EF_FLIP_XY); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_pistonpunch_impact"), Hash40::new("top"), 0, 15, 1, 0, 0, 0, 1, true); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("miifighter_pistonpunch"), Hash40::new("top"), 0, 15, 1, 10, 0, 0, 1, true); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialhi1", stub); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + agent.acmd("game_specialhi12", game_specialhi12); + agent.acmd("game_specialairhi12", game_specialhi12); + agent.acmd("effect_specialhi12", effect_specialhi12); + agent.acmd("effect_specialairhi12", effect_specialhi12); + agent.acmd("sound_specialhi12", sound_specialhi12); + agent.acmd("sound_specialairhi12", sound_specialhi12); + agent.acmd("expression_specialhi12", expression_specialhi12); + agent.acmd("expression_specialairhi12", expression_specialhi12); + + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("game_specialairhi2", game_specialairhi2); + + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialhi3); + agent.acmd("effect_specialhi3", effect_specialhi3); + agent.acmd("effect_specialairhi3", effect_specialairhi3); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_lw.rs b/fighters/miifighter/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..7c6f1942b9 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_lw.rs @@ -0,0 +1,472 @@ +use super::*; + +// ================================================================================================ +// ======================================= EARTHQUAKE FIST ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 8.0 + charge_distance, Some(0.0), Some(4.5), Some(16.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 90, 28, 0, 75, 5.0, 0.0, 4.5, 12.0 + charge_distance, Some(0.0), Some(13.0), Some(12.0 + charge_distance), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 45, 60, 0, 60, 3.0, 0.0, 3.0, 7.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 4.0); + if is_excute(agent) { + let eff_handle = EffectModule::req_follow(boma, Hash40::new("sys_windwave"), Hash40::new("top"), &Vector3f::new(0.0, 0.0, 10.0), &Vector3f::zero(), 0.4, false, 0, 0, 0, 0, 0, false, false); + EffectModule::set_rate(boma, eff_handle as u32, 0.4); + VarModule::set_int64(agent.battle_object, vars::miifighter::instance::QUAKE_EFFECT_HANDLER, eff_handle as u64); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("miifighter_sidekick_hold"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.4); + } + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_ground_shockwave"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_hold"), true, true); + } + frame(lua_state, 13.0); + let charge_distance = VarModule::get_float(agent.battle_object, vars::miifighter::status::SPECIAL_LW1_CHARGE_DISTANCE); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miifighter_sidekick_flash"), true, true); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 8.0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("miifighter_headbut_v_smoke"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_SCALE_W(agent, 0.6, 1.1, 0.6); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 12.0 + charge_distance, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_damage_fire"), Hash40::new("top"), 12.0 + charge_distance, 3.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_attack03")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_smash_s03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_l03")); + PLAY_SE(agent, Hash40::new("se_miifighter_special_s03")); + PLAY_SE_REMAIN(agent, Hash40::new("se_miifighter_special_c2_s02")); + } +} + +unsafe extern "C" fn expression_speciallw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, false, 0); + }; + frame(lua_state, 13.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + AREA_WIND_2ND_arg10(agent, 0, 2, 80, 300, 0.8, 4, 8, 44, 16, 50); + } + wait(lua_state, 18.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + wait(lua_state, 18.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } + wait(lua_state, 3.0); + if is_excute(agent) { + ItemModule::set_have_item_visibility(boma, true, 0); + } + frame(lua_state, 52.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + } +} + +unsafe extern "C" fn effect_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 12.0, 5.0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_specialairlw1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miifighter_special_l02")); + } + frame(lua_state, 19.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miifighter_rnd_special_c1_l01")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); + PLAY_SE(agent, Hash40::new("se_miifighter_final06")); + } +} + +unsafe extern "C" fn game_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); + app::sv_kinetic_energy::clear_speed(agent.lua_state_agent); + KineticModule::clear_speed_all(boma); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); + SET_SPEED_EX(agent, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 361, 57, 0, 80, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_KICK); + } +} + +unsafe extern "C" fn effect_speciallw1loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..24 { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 6, 0, 220, 0, 0, 1, true); + } + wait(lua_state, 2.0); + } +} + +unsafe extern "C" fn game_speciallw1landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + SET_SPEED_EX(agent, 1.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + ATTACK(agent, 2, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 6.5, 0.0, 6.5, -0.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 60, 48, 0, 120, 4.0, 0.0, 4.0, 5.0, Some(0.0), Some(4.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, -3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); + AttackModule::clear(boma, 0, false); + AttackModule::clear(boma, 2, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ======================================== FEINT JUMP ============================================ +// ================================================================================================ + +unsafe extern "C" fn game_speciallw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); + frame(lua_state, 1.5); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); + } frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); + } + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); + SEARCH(agent, 0, 0, Hash40::new("hip"), 3.5, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_specialairlw2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 1.5, 3.0); + frame(lua_state, 1.5); + FT_MOTION_RATE_RANGE(agent, 1.5, 2.0, 1.0); + frame(lua_state, 2.0); + FT_MOTION_RATE_RANGE(agent, 2.0, 43.0, 36.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE_LANDING); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_START_WAIT_INPUT); + } frame(lua_state, 13.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_KICK_ENABLE); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_REVERSE); + } + frame(lua_state, 19.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_REVERSAL_KICK_FLAG_WALL_JUMP_ENABLE); + SEARCH(agent, 0, 0, Hash40::new("hip"), 4.0, 1.0, 0.0, 0.0, Some(-3.0), Some(0.0), Some(0.0), *COLLISION_KIND_MASK_HIT, *HIT_STATUS_MASK_ALL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + } + frame(lua_state, 43.0); + if is_excute(agent) { + search!(agent, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_specialairlw2kick(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 0, 0.8, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 7.0); + if is_excute(agent) { + /* + let dive_speed_x_modifier_stick_mul = 0.5; + let dive_speed_y_modifier_stick_mul = 0.5; + let mut dive_speed_x_modifier_raw = dive_speed_x_modifier_stick_mul * ControlModule::get_stick_x(boma) * PostureModule::lr(boma); + let mut dive_speed_y_modifier_raw = dive_speed_y_modifier_stick_mul * ControlModule::get_stick_y(boma); + let mut dive_speed_x_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_x_modifier_stick_mul, dive_speed_x_modifier_stick_mul * 0.5); + let mut dive_speed_y_modifier = dive_speed_x_modifier_raw.clamp(-dive_speed_y_modifier_stick_mul, dive_speed_y_modifier_stick_mul * 0.5); + SET_SPEED_EX(fighter, -3.0 + dive_speed_x_modifier, -2.5 + dive_speed_y_modifier, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + */ + SET_SPEED_EX(agent, -2.5, -1.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + } + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.0, 35, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 60, 75, 0, 65, 5.8, 4.2, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 5, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 22.0); + FT_MOTION_RATE(agent, 1.5); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw2autoattack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 4.0, 0.0, 0.0, -2.0, Some(0.0), Some(0.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 7.0, 80, 40, 0, 95, 3.5, 0.0, 5.0, -2.0, Some(0.0), Some(5.0), Some(3.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ============================================ WILD THROW ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw3catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 4.0, 8.0); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + //SEARCH(fighter, 0, 0, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *COLLISION_KIND_MASK_ALL, *HIT_STATUS_MASK_NORMAL, 0, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIEB, *COLLISION_PART_MASK_ALL, false); + GrabModule::set_rebound(boma, true); + CATCH(agent, 2, Hash40::new("top"), 5.0, 0.0, 7.0, 9.0, Some(0.0), Some(7.0), Some(10.5), *FIGHTER_STATUS_KIND_MIIFIGHTER_SUPLEX_THROWN, *COLLISION_SITUATION_MASK_GA); + } + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 1.2); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); + GrabModule::set_rebound(boma, false); + //search!(fighter, *MA_MSC_CMD_SEARCH_SEARCH_SCH_CLR_ALL); + } +} + +unsafe extern "C" fn game_speciallw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); + //ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 45, 66, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 10.0, 275, 100, 25, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 9.0, 361, 85, 0, 80, 4.0, 0.0, 3.0, -5.0, Some(0.0), Some(3.0), Some(-11.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_CATCH_STOP(agent, 5, 1); + //CHECK_FINISH_CAMERA(fighter, 14, 0); + //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); + } + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + let opponent_boma = agent.get_grabbed_opponent_boma(); + if opponent_boma.is_fighter() { + VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); + } + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } +} + +unsafe extern "C" fn game_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_COUNTER_THROW_FLAG_THROW_AFTER_LANDING); + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + REVERSE_LR(agent); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 1.0, 270, 100, 1, 0, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + } + frame(lua_state, 1.0); + if is_excute(agent) { + FT_CATCH_STOP(agent, 5, 1); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("armr"), 9.0, 361, 85, 0, 80, 5.0, 6.0, 0.0, 0.0, Some(6.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + FT_CATCH_STOP(agent, 5, 1); + //CHECK_FINISH_CAMERA(fighter, 14, 0); + //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); + } + frame(lua_state, 13.0); + if is_excute(agent) { + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 13.0, 280, 65, 0, 10, 12.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_nomal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_KICK); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialairlw3throw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + COL_PRI(agent, 101); + FLASH(agent, 1, 1, 1, 0); + EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_catch"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 3.0); + if is_excute(agent) { + COL_NORMAL(agent); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW_FLIP(agent, Hash40::new("miifighter_counter_arc"), Hash40::new("miifighter_counter_arc"), Hash40::new("top"), -1, 8, 1, 0, 112, 90, 0.8, true, *EF_FLIP_YZ); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 12.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_speciallw1", game_speciallw1); + agent.acmd("effect_speciallw1", effect_speciallw1); + agent.acmd("sound_speciallw1", sound_speciallw1); + agent.acmd("expression_speciallw1", expression_speciallw1); + agent.acmd("effect_specialairlw1", effect_specialairlw1); + agent.acmd("sound_specialairlw1", sound_specialairlw1); + agent.acmd("game_speciallw1loop", game_speciallw1loop); + agent.acmd("effect_speciallw1loop", effect_speciallw1loop); + agent.acmd("game_speciallw1landing", game_speciallw1landing); + + agent.acmd("game_speciallw2start", game_speciallw2start); + agent.acmd("game_specialairlw2start", game_specialairlw2start); + agent.acmd("game_specialairlw2kick", game_specialairlw2kick); + agent.acmd("game_specialairlw2autoattack", game_specialairlw2autoattack); + + agent.acmd("game_speciallw3catch", game_speciallw3catch); + agent.acmd("game_specialairlw3catch", game_speciallw3catch); + agent.acmd("game_speciallw3throw", game_speciallw3throw); + agent.acmd("game_specialairlw3throw", game_specialairlw3throw); + agent.acmd("effect_specialairlw3throw", effect_specialairlw3throw); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_n.rs b/fighters/miifighter/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..3808b6ebf4 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_n.rs @@ -0,0 +1,142 @@ +use super::*; + +// ================================================================================================ +// ==================================== FLASHING MACH PUNCH ======================================= +// ================================================================================================ + +unsafe extern "C" fn game_specialn2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 11.0, 5.0); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 190, 100, 35, 0, 3.0, 0.0, 7.5, 16.5, Some(0.0), Some(8.5), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 10.2, 9.5, Some(0.0), Some(10.2), Some(16.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(14.5), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 4.0, 0.0, 5.0, 15.5, Some(0.0), Some(7.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(15.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 17.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.0, 15.5, Some(0.0), Some(9.0), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 90, 100, 20, 0, 2.0, 0.0, 3.5, 15.5, Some(0.0), Some(9.5), Some(15.5), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 80, 100, 50, 0, 2.0, 0.0, 4.5, 9.5, Some(0.0), Some(4.5), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 0.4, 366, 100, 30, 0, 2.0, 0.0, 11.2, 9.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 60, 100, 110, 0, 3.0, 0.0, 11.2, 10.5, Some(0.0), Some(11.2), Some(13.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + FT_MOTION_RATE(agent, 1.1); + frame(lua_state, 24.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_PULL_FINISH_ATTACK); + ATTACK(agent, 0, 0, Hash40::new("top"), 0.4, 366, 100, 20, 0, 2.5, 0.0, 3.5, 17.0, Some(0.0), Some(9.5), Some(17.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 0.4, 366, 100, 40, 0, 6.0, 0.0, 6.5, 11.8, Some(0.0), Some(8.3), Some(11.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 60, 100, 40, 0, 4.0, 0.0, 4.5, 8.8, Some(0.0), Some(10.3), Some(8.8), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + } + frame(lua_state, 2.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 109, 0, 65, 5.5, 0.0, 7.5, 12.5, Some(0.0), Some(17.0), Some(12.5), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 68.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairn2finish(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_INVINCIBLE); + } + frame(lua_state, 2.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.5, 77, 100, 0, 65, 5.5, 0.0, 7.5, 6.0, Some(0.0), Some(17.0), Some(6.0), 1.4, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WHOLE_HIT(agent, *HIT_STATUS_NORMAL); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 49.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_MACH_PUNCH_FLAG_SET_FALL_SPEED); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 68.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specialn2start", game_specialn2start); + agent.acmd("game_specialairn2start", game_specialn2start); + agent.acmd("game_specialn2finish", game_specialn2finish); + agent.acmd("game_specialairn2finish", game_specialairn2finish); +} \ No newline at end of file diff --git a/fighters/miifighter/src/acmd/specials/special_s.rs b/fighters/miifighter/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..2b710e3f67 --- /dev/null +++ b/fighters/miifighter/src/acmd/specials/special_s.rs @@ -0,0 +1,157 @@ +use super::*; + +// ================================================================================================ +// ========================================= ONSLAUGHT ============================================ +// ================================================================================================ + +unsafe extern "C" fn game_specials1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 70, 100, 11, 0, 7.0, 0.0, 8.5, 8.5, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 7.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 270, 80, 44, 40, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_DISABLE_OPPONENT_PASSIVE); + } + frame(lua_state, 27.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("toer"), 4.0, 80, 175, 0, 80, 7.0, 0.0, 0.0, 0.0, Some(-6.0), Some(-2.0), Some(1.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 29.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairs1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + SET_SPEED_EX(agent, 1, 1, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_NONE); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING_MUL_SPEED_X); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 367, 100, 30, 30, 7.0, 0.0, 8.0, 6.3, Some(0.0), Some(5.5), Some(6.3), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 16, 0, 6.5, 0.0, 8.0, 6.0, Some(0.0), Some(5.5), Some(6.0), 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 12.0); + if is_excute(agent) { + SET_SPEED_EX(agent, 0.3, 0.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: 0.3, y: 0.5, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 50, 0, 6.5, 0.0, 9.0, 9.0, None, None, None, 0.7, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 17.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: -0.3, y: 0.7, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 60, 70, 40, 30, 6.5, 0.0, 8.0, 8.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f{x: 0.85, y: 3.0, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 80, 160, 0, 60, 7.0, 0.0, 16.0, 9.5, Some(0.0), Some(10.0), Some(8.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 30.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_LANDING); + } + frame(lua_state, 48.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 55.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIFIGHTER_STATUS_WORK_ID_FLAG_100KICK_ENABLE_CONTROL_X); + } +} + +// ================================================================================================ +// ===================================== BURNING DROP KICK ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialairs2start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); + } +} + +pub fn install(agent: &mut Agent) {; + agent.acmd("game_specials1end", game_specials1end); + agent.acmd("game_specialairs1end", game_specialairs1end); + + agent.acmd("game_specialairs2start", game_specialairs2start); +} \ No newline at end of file diff --git a/fighters/miifighter/src/status/mod.rs b/fighters/miifighter/src/status/mod.rs index 1ed37a180b..0db386271c 100644 --- a/fighters/miifighter/src/status/mod.rs +++ b/fighters/miifighter/src/status/mod.rs @@ -2,18 +2,8 @@ use super::*; use globals::*; // status script import -//Forces Grounded Earthquake punch on the ground - -unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let ret = smashline::original_status(Main, fighter, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND)(fighter); - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); - } - ret -} +mod special_lw1; pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main); + special_lw1::install(agent); } \ No newline at end of file diff --git a/fighters/miifighter/src/status/special_lw1.rs b/fighters/miifighter/src/status/special_lw1.rs new file mode 100644 index 0000000000..c3d0584800 --- /dev/null +++ b/fighters/miifighter/src/status/special_lw1.rs @@ -0,0 +1,18 @@ +use super::*; + +// FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND + +// Forces Grounded Earthquake punch on the ground +unsafe extern "C" fn special_lw1_ground_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let ret = smashline::original_status(Main, fighter, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND)(fighter); + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); + } + ret +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIIFIGHTER_STATUS_KIND_SPECIAL_LW1_GROUND, special_lw1_ground_main); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials.rs b/fighters/miigunner/src/acmd/specials.rs deleted file mode 100644 index 482fdfc90f..0000000000 --- a/fighters/miigunner/src/acmd/specials.rs +++ /dev/null @@ -1,481 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_specialn1start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); - } -} - -unsafe extern "C" fn game_specialnifiremax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 10.0); - } - if is_excute(agent) { - VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { - VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - WorkModule::off_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); - } - } - frame(lua_state, 3.0); - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(agent, 3.0, 5.0, 5.0); - } - else { - FT_MOTION_RATE(agent, 1.0); - } - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ArticleModule::remove_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); - ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - else { - ArticleModule::shoot_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); - } - } - frame(lua_state, 5.0); - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(agent, 8.0, 40.0, 37.0); - } - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialn1firemax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(agent, 2.0); - LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); - LAST_EFFECT_SET_RATE(agent, 2.0); - LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); - } - } - frame(lua_state, 2.6); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); - EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); - } - frame(lua_state, 2.8); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); - LAST_EFFECT_SET_RATE(agent, 0.85); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); - LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); - LAST_EFFECT_SET_RATE(agent, 0.8); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); - LAST_EFFECT_SET_RATE(agent, 0.5); - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); - } - } - else { - EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - } - } -} - -unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - PLAY_SE(agent, Hash40::new("se_miigunner_final01")); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - STOP_SE(agent, Hash40::new("se_miigunner_final01")); - PLAY_SE(agent, Hash40::new("se_miigunner_final04")); - } - } -} - -unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 2.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_RAPID_SHOT_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - VarModule::set_float(agent.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); - } - frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(agent, 16.0, 30.0, 6.0); - frame(lua_state, 25.0); -} - -unsafe extern "C" fn effect_specialn3start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); - LAST_EFFECT_SET_RATE(agent, 0.15); - } -} - -unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 30.0); - if is_excute(agent) { - ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GRENADELAUNCHER, false, 0); - } -} - -unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 17.0); - frame(lua_state, 21.0); - FT_MOTION_RATE_RANGE(agent, 21.0, 64.0, 36.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_FLAMEPILLAR, false, 0); - } -} - -unsafe extern "C" fn game_specials32(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 23.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_MIIMISSILE_FLAG_WEAPON); - } -} - -unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 11.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_BOTTOM_SHOOT_FLAG_JUMP); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_BOTTOMSHOOT, false, 0); - } - frame(lua_state, 14.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } -} - -unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - let handle = EffectModule::req_follow(boma, Hash40::new("miigunner_bottom_shot"), Hash40::new("armr"), &Vector3f::new(6.5, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); - VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); - } - frame(lua_state, 9.0); - if is_excute(agent) { - let handle = VarModule::get_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); - EffectModule::set_rate(boma, handle as u32, 1.0); - if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { - EffectModule::set_rgb(boma, handle as u32, 0.15, 0.55, 10.0); - } - } - frame(lua_state, 12.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn effect_landingfallspecial(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - EFFECT_OFF_KIND(agent, Hash40::new("miigunner_bottom_shot"), false, false); - } -} - -unsafe extern "C" fn game_specialhi2squat(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 7.0); - FT_MOTION_RATE(agent, 0.25); - frame(lua_state, 11.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialhi2squat(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); - LAST_EFFECT_SET_RATE(agent, 0.8); - } - frame(lua_state, 11.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - EFFECT(agent, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - else { - EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); - } - } -} - -unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 8.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn game_specialhi3start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 1.5); -} - -unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.85); -} - -unsafe extern "C" fn game_speciallw1start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 3.0, 6.5, 4.0); - } - } - frame(lua_state, 3.0); - if is_excute(agent) { - let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); - } -} - -unsafe extern "C" fn game_speciallw3start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); -} - -unsafe extern "C" fn game_speciallw3hold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.8); - if is_excute(agent) { - let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } -} - -unsafe extern "C" fn effect_speciallw3hold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EffectModule::kill_kind(boma, Hash40::new("miigunner_absorber"), false, false); - let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; - EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - } - COL_NORMAL(agent); - if is_excute(agent) { - FLASH(agent, 0.5, 0.7, 1, 0.6); - } - wait(lua_state, 2.0); - if is_excute(agent) { - FLASH_FRM(agent, 3, 0, 0.2, 0.5, 0); - } - wait(lua_state, 3.0); -} - -unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 9.0); - if is_excute(agent) { - let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); - } - frame(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_speciallw3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sound_speciallw3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_miigunner_attackhard_s01")); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn1start", game_specialn1start); - agent.acmd("game_specialairn1start", game_specialn1start); - - agent.acmd("game_specialn1firemax", game_specialnifiremax); - agent.acmd("game_specialairn1firemax", game_specialnifiremax); - agent.acmd("effect_specialn1firemax", effect_specialn1firemax); - agent.acmd("effect_specialairn1firemax", effect_specialn1firemax); - agent.acmd("sound_specialn1firemax", sound_specialn1firemax); - agent.acmd("sound_specialairn1firemax", sound_specialn1firemax); - - agent.acmd("game_specialn2loop", game_specialn2loop); - agent.acmd("game_specialairn2loop", game_specialn2loop); - - agent.acmd("game_specialn3start", game_specialn3start); - agent.acmd("game_specialairn3start", game_specialn3start); - agent.acmd("effect_specialn3start", effect_specialn3start); - - agent.acmd("game_specialn3end", game_specialn3end); - agent.acmd("game_specialairn3end", game_specialn3end); - - agent.acmd("game_specials1", game_specials1); - agent.acmd("game_specialairs1", game_specials1); - - agent.acmd("game_specials32", game_specials32); - agent.acmd("game_specialairs32", game_specials32); - - agent.acmd("game_specialhi1", game_specialhi1); - agent.acmd("game_specialairhi1", game_specialhi1); - agent.acmd("effect_specialhi1", effect_specialhi1); - agent.acmd("effect_specialairhi1", effect_specialhi1); - - agent.acmd("game_specialhi2squat", game_specialhi2squat); - agent.acmd("game_specialairhi2squat", game_specialhi2squat); - agent.acmd("effect_specialhi2squat", effect_specialhi2squat); - agent.acmd("effect_specialairhi2squat", effect_specialhi2squat); - - agent.acmd("game_specialhi2", game_specialhi2); - - agent.acmd("game_specialhi3start", game_specialhi3start); - agent.acmd("game_specialairhi3start", game_specialhi3start); - - agent.acmd("game_specialhi3", game_specialhi3); - - agent.acmd("effect_landingfallspecial", effect_landingfallspecial); - - agent.acmd("game_speciallw1start", game_speciallw1start); - agent.acmd("game_specialairlw1start", game_speciallw1start); - - agent.acmd("game_speciallw3start", game_speciallw3start); - agent.acmd("game_specialairlw3start", game_speciallw3start); - - agent.acmd("game_speciallw3hold", game_speciallw3hold); - agent.acmd("game_specialairlw3hold", game_speciallw3hold); - agent.acmd("effect_speciallw3hold", effect_speciallw3hold); - agent.acmd("effect_specialairlw3hold", effect_speciallw3hold); - - agent.acmd("game_speciallw3end", game_speciallw3end); - agent.acmd("game_specialairlw3end", game_speciallw3end); - agent.acmd("effect_speciallw3end", effect_speciallw3end); - agent.acmd("effect_specialairlw3end", effect_speciallw3end); - agent.acmd("sound_speciallw3end", sound_speciallw3end); - agent.acmd("sound_specialairlw3end", sound_speciallw3end); -} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/mod.rs b/fighters/miigunner/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..8157d478f9 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) { + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_hi.rs b/fighters/miigunner/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..aea6d3cb86 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_hi.rs @@ -0,0 +1,162 @@ +use super::*; + +// ================================================================================================ +// ======================================== LUNAR LAUNCH ========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_BOTTOM_SHOOT_FLAG_JUMP); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_BOTTOMSHOOT, false, 0); + } + frame(lua_state, 14.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } +} + +unsafe extern "C" fn effect_specialhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + let handle = EffectModule::req_follow(boma, Hash40::new("miigunner_bottom_shot"), Hash40::new("armr"), &Vector3f::new(6.5, 0.0, 0.0), &Vector3f::zero(), 1.0, false, 0, 0, 0, 0, 0, false, false); + VarModule::set_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER, handle); + } + frame(lua_state, 9.0); + if is_excute(agent) { + let handle = VarModule::get_int64(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_EFF_HANDLER); + EffectModule::set_rate(boma, handle as u32, 1.0); + if VarModule::get_float(agent.battle_object, vars::miigunner::status::CURRENT_CHARGE) <= 10.0 && !VarModule::is_flag(agent.battle_object, vars::miigunner::instance::LUNAR_LAUNCH_AIR_USED) { + EffectModule::set_rgb(boma, handle as u32, 0.15, 0.55, 10.0); + } + } + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +// ================================================================================================ +// ====================================== FLASH POINT DIVE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi2squat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 7.0); + FT_MOTION_RATE(agent, 0.25); + frame(lua_state, 11.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 110, 85, 40, 90, 7.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialhi2squat(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_after"), Hash40::new("armr"), 5.5, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_RATE(agent, 0.8); + } + frame(lua_state, 11.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb1"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("miigunner_gimmck_bomb2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + else { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.55, 0, 0, 0, 0, 0, 0, false); + } + } +} + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 5.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 80, 100, 0, 83, 4.0, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 4.0, 0.0, 17.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 75, 90, 0, 83, 3.5, 0.0, 12.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 8.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +// ================================================================================================ +// ======================================= JETPACK JOYRIDE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialhi3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.5); +} + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.85); +} + +unsafe extern "C" fn effect_landingfallspecial(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_bottom_shot"), false, false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1", game_specialhi1); + agent.acmd("game_specialairhi1", game_specialhi1); + agent.acmd("effect_specialhi1", effect_specialhi1); + agent.acmd("effect_specialairhi1", effect_specialhi1); + + agent.acmd("game_specialhi2squat", game_specialhi2squat); + agent.acmd("game_specialairhi2squat", game_specialhi2squat); + agent.acmd("effect_specialhi2squat", effect_specialhi2squat); + agent.acmd("effect_specialairhi2squat", effect_specialhi2squat); + + agent.acmd("game_specialhi2", game_specialhi2); + + agent.acmd("game_specialhi3start", game_specialhi3start); + agent.acmd("game_specialairhi3start", game_specialhi3start); + + agent.acmd("game_specialhi3", game_specialhi3); + + agent.acmd("effect_landingfallspecial", effect_landingfallspecial); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_lw.rs b/fighters/miigunner/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..3f445e1e48 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_lw.rs @@ -0,0 +1,121 @@ +use super::*; + +// ================================================================================================ +// ======================================== ECHO REFLECTOR ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.5, 3.0, 6.5, 4.0); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 0.0 } else { 2.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 69, 100, 0, 70, 8.0, 0.0, 6.5 + offset, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_ENERGY); + } +} + +// ================================================================================================ +// ====================================== ABSORBING VORTEX ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_speciallw3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 5.0); +} + +unsafe extern "C" fn game_speciallw3hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.8); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 367, 100, 25, 0, 12.5, 0.0, offset_y, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 366, 100, 25, 0, 22.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 10, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } +} + +unsafe extern "C" fn effect_speciallw3hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EffectModule::kill_kind(boma, Hash40::new("miigunner_absorber"), false, false); + let offset = if agent.is_situation(*SITUATION_KIND_GROUND) { 3.0 } else { 2.0 }; + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorber"), Hash40::new("hip"), offset, 0, 0, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_absorberlight"), Hash40::new("armr"), 0, 0, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + } + COL_NORMAL(agent); + if is_excute(agent) { + FLASH(agent, 0.5, 0.7, 1, 0.6); + } + wait(lua_state, 2.0); + if is_excute(agent) { + FLASH_FRM(agent, 3, 0, 0.2, 0.5, 0); + } + wait(lua_state, 3.0); +} + +unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 9.0); + if is_excute(agent) { + let offset_y = if agent.is_situation(*SITUATION_KIND_GROUND) { 6.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 70, 0, 30, 14.0, 0.0, offset_y, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + frame(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_dead_flash"), Hash40::new("armr"), 1, 5.5, 0, 0, 0, 0, 0.075, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_hit_elec_s"), Hash40::new("top"), 0, 10, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_speciallw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miigunner_attackhard_s01")); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1start", game_speciallw1start); + agent.acmd("game_specialairlw1start", game_speciallw1start); + + agent.acmd("game_speciallw3start", game_speciallw3start); + agent.acmd("game_specialairlw3start", game_speciallw3start); + + agent.acmd("game_speciallw3hold", game_speciallw3hold); + agent.acmd("game_specialairlw3hold", game_speciallw3hold); + agent.acmd("effect_speciallw3hold", effect_speciallw3hold); + agent.acmd("effect_specialairlw3hold", effect_speciallw3hold); + + agent.acmd("game_speciallw3end", game_speciallw3end); + agent.acmd("game_specialairlw3end", game_speciallw3end); + agent.acmd("effect_speciallw3end", effect_speciallw3end); + agent.acmd("effect_specialairlw3end", effect_speciallw3end); + agent.acmd("sound_speciallw3end", sound_speciallw3end); + agent.acmd("sound_specialairlw3end", sound_speciallw3end); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_n.rs b/fighters/miigunner/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..deb84aa679 --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_n.rs @@ -0,0 +1,209 @@ +use super::*; + +// ================================================================================================ +// ================================ CHARGE BLAST / NEON CANNON ==================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, false, 0); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); + } +} + +unsafe extern "C" fn game_specialnifiremax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + FT_MOTION_RATE_RANGE(agent, 1.0, 3.0, 10.0); + } + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + WorkModule::off_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_BULLET_DISP); + } + } + frame(lua_state, 3.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 3.0, 5.0, 5.0); + } + else { + FT_MOTION_RATE(agent, 1.0); + } + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ArticleModule::remove_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); + ATTACK(agent, 0, 0, Hash40::new("top"), 25.0, 361, 74, 0, 61, 7.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + ATTACK(agent, 1, 0, Hash40::new("top"), 22.0, 361, 74, 0, 61, 5.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(21.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_ENERGY); + } + else { + ArticleModule::shoot_exist(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GUNNERCHARGE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_GUNNER_CHARGE_FLAG_SHOOT); + } + } + frame(lua_state, 5.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 8.0, 40.0, 37.0); + } + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 0, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 10.0); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_sb_tama"), Hash40::new("armr"), 6.0, 0, 0, 90, 0, 0, 3.5, true); + LAST_EFFECT_SET_RATE(agent, 2.0); + LAST_EFFECT_SET_COLOR(agent, 0.15, 100.0, 3.0); + } + } + frame(lua_state, 2.6); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miigunner_sb_tama"), false, false); + EFFECT_DETACH_KIND(agent, Hash40::new("miigunner_sb_tama"), -1); + } + frame(lua_state, 2.8); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_air_bullet"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 0.55); + LAST_EFFECT_SET_RATE(agent, 0.85); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, false); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_laser"), Hash40::new("top"), 0, 6.3, 10.5, 0, 0, 0, 1, false); + LAST_EFFECT_SET_SCALE_W(agent, 1.0, 0.7, 1.0); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_FOLLOW(agent, Hash40::new("miigunner_atk_shot_s"), Hash40::new("armr"), 6.3, 0, 0, 0, 0, -90, 1, false); + LAST_EFFECT_SET_COLOR(agent, 0.15, 5.0, 5.0); + LAST_EFFECT_SET_RATE(agent, 0.5); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 2.5, 0, 0, 0, 0, 0, 0, false); + } + } + else { + EFFECT(agent, Hash40::new("miigunner_cshot_shot"), Hash40::new("top"), 6, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + } + } +} + +unsafe extern "C" fn sound_specialn1firemax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miigunner_rnd_special_c1_n01")); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + PLAY_SE(agent, Hash40::new("se_miigunner_final01")); + } + } + frame(lua_state, 3.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + STOP_SE(agent, Hash40::new("se_miigunner_final01")); + PLAY_SE(agent, Hash40::new("se_miigunner_final04")); + } + } +} + +// ================================================================================================ +// ======================================== LASER BLAZE =========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn2loop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 2.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_RAPID_SHOT_STATUS_WORK_ID_FLAG_LOOP_ACCEPT); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 6.0, 45, 100, 0, 30, 4.0, 2.0, 0.0, 0.0, Some(4.0), Some(0.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_RAPIDSHOT_BULLET, false, 0); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================ +// ========================================= BOMBS AWAY =========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + VarModule::set_float(agent.battle_object, vars::miigunner::instance::GRENADE_CHARGE, 0.0); + } + frame(lua_state, 16.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 30.0, 6.0); + frame(lua_state, 25.0); +} + +unsafe extern "C" fn effect_specialn3start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miigunner_flame_shot"), Hash40::new("armr"), 5.5, 0, 0, 0, 90, 0, 0.49, true); + LAST_EFFECT_SET_RATE(agent, 0.15); + } +} + +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 23.0, 30.0); + if is_excute(agent) { + ArticleModule::generate_article_enable(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_GRENADELAUNCHER, false, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1start", game_specialn1start); + agent.acmd("game_specialairn1start", game_specialn1start); + + agent.acmd("game_specialn1firemax", game_specialnifiremax); + agent.acmd("game_specialairn1firemax", game_specialnifiremax); + agent.acmd("effect_specialn1firemax", effect_specialn1firemax); + agent.acmd("effect_specialairn1firemax", effect_specialn1firemax); + agent.acmd("sound_specialn1firemax", sound_specialn1firemax); + agent.acmd("sound_specialairn1firemax", sound_specialn1firemax); + + agent.acmd("game_specialn2loop", game_specialn2loop); + agent.acmd("game_specialairn2loop", game_specialn2loop); + + agent.acmd("game_specialn3start", game_specialn3start); + agent.acmd("game_specialairn3start", game_specialn3start); + agent.acmd("effect_specialn3start", effect_specialn3start); + + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialn3end); +} \ No newline at end of file diff --git a/fighters/miigunner/src/acmd/specials/special_s.rs b/fighters/miigunner/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..e031251fbe --- /dev/null +++ b/fighters/miigunner/src/acmd/specials/special_s.rs @@ -0,0 +1,38 @@ +use super::*; + +// ================================================================================================ +// ======================================== FLAME PILLAR ========================================== +// ================================================================================================ + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 17.0); + frame(lua_state, 21.0); + FT_MOTION_RATE_RANGE(agent, 21.0, 64.0, 36.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIIGUNNER_GENERATE_ARTICLE_FLAMEPILLAR, false, 0); + } +} + +// ================================================================================================ +// ======================================== PULSE MISSILE ========================================= +// ================================================================================================ + +unsafe extern "C" fn game_specials32(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 23.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIIGUNNER_STATUS_MIIMISSILE_FLAG_WEAPON); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specials1); + + agent.acmd("game_specials32", game_specials32); + agent.acmd("game_specialairs32", game_specials32); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials.rs b/fighters/miiswordsman/src/acmd/specials.rs deleted file mode 100644 index 1bd7241ff5..0000000000 --- a/fighters/miiswordsman/src/acmd/specials.rs +++ /dev/null @@ -1,1860 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 14.0); - if is_excute(agent) { - VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_TORNADOSHOT, false, 0); - } - frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(agent, 20.0, 48.0, 17.0); - frame(lua_state, 48.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 9.0); - if is_excute(agent) { - VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - if agent.is_situation(*SITUATION_KIND_GROUND) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); - } - else { - let x_vel = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); - app::sv_kinetic_energy::set_stable_speed(agent.lua_state_agent); - } - } - frame(lua_state, 14.0); - FT_MOTION_RATE(agent, 1.0); - if boma.is_button_on(Buttons::Special) { - FT_MOTION_RATE_RANGE(agent, 14.0, 17.0, 13.0); - } - else { - FT_MOTION_RATE(agent, 1.0); - } - if is_excute(agent) { - if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - } - } - frame(lua_state, 17.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_AIR) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); - } - } - // light - if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - MotionModule::set_rate(boma, 1.0); - ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // heavy - else { - ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - frame(lua_state, 20.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, false, 0); - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - } - frame(lua_state, 21.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 33.0); - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - FT_MOTION_RATE_RANGE(agent, 33.0, 36.0, 10.0); - } - frame(lua_state, 36.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 14.2); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 17.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); - LAST_EFFECT_SET_RATE(agent, 1.4); - } - frame(lua_state, 29.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 4.0); - } -} - -unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 16.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); - PLAY_SE(agent, Hash40::new("se_miiswordsman_special_l03")); - } -} - -unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 0, 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 15.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } else { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - } - frame(lua_state, 17.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); - } - frame(lua_state, 35.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 20); - } -} - -// ================================================================================================ -// ======================================== BLURRING BLADE ======================================== -// ================================================================================================ - -unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let turn = agent.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); - frame(lua_state, 6.0); - if is_excute(agent) { - if turn { - REVERSE_LR(agent); - } - } - for _ in 0..4 { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); - AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 33.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - let sfx = if agent.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; - let offset = if turn { -10.0 } else { 9.5 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); - } - frame(lua_state, 36.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); - frame(lua_state, 80.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_specialairn3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let turn = agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); - if is_excute(agent) { - let flip = if turn { -1.0 } else { 1.0 }; - SET_SPEED_EX(agent, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 6.0); - if is_excute(agent) { - if turn { - REVERSE_LR(agent); - } - } - for _ in 0..2 { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 2.0); - } - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 2.0); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 25.0); - if is_excute(agent) { - KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.0, 0.0)); - } - frame(lua_state, 33.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - let sfx = if agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; - let offset = if turn { -9.5 } else { 9.5 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); - } - frame(lua_state, 36.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 40.0); - FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); - frame(lua_state, 80.0); - FT_MOTION_RATE(agent, 1.0); -} - -// ================================================================================================== -// ======================================== AIRBORNE ASSAULT ======================================== -// ================================================================================================== - -unsafe extern "C" fn game_specials1start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.4); - } - -} - -unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.4); - } - -} - -unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - - } - -} - -unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - - } - -} -/* -#[acmd_script( agent = "miiswordsman", script = "game_specials1hit" , category = ACMD_GAME , low_priority)] -unsafe fn miiswordsman_special_s1_hit_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - } - frame(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} -*/ - -// ============================================================================================= -// ======================================== GALE STAB ========================================== -// ============================================================================================= - -unsafe extern "C" fn game_specials2dash(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 10.0); - if is_excute(agent) { - MotionModule::set_rate(agent.module_accessor, 0.5); - } -} - -unsafe extern "C" fn game_specials2attack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - // Vanilla Effects - //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); - - //EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); - //EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_blastwind_stab"), -1); - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(agent, 0.7); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(agent, 0.7); - - - // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - } - frame(lua_state, 2.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(agent, 2.5); - } - frame(lua_state, 3.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(agent, 1.4); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 5); - } - frame(lua_state, 34.0); - if is_excute(agent) { - //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); - } - frame(lua_state, 35.0); - if is_excute(agent) { - //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 37.0); - if is_excute(agent) { - //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); - } -} - -unsafe extern "C" fn game_specialairs2dash(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - frame(lua_state, 10.0); - if is_excute(agent) { - MotionModule::set_rate(agent.module_accessor, 0.5); - } -} - -unsafe extern "C" fn game_specialairs2attack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 7.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - // Vanilla Effects - //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); - - - EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); - EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(agent, 0.7); - EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); - LAST_EFFECT_SET_RATE(agent, 0.7); - - - // Sword Trail - //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - - } - frame(lua_state, 2.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); - LAST_EFFECT_SET_RATE(agent, 2.5); - } - frame(lua_state, 3.0); - if is_excute(agent) { - //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); - //LAST_EFFECT_SET_RATE(agent, 1.4); - } - frame(lua_state, 4.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 5); - } - frame(lua_state, 34.0); - if is_excute(agent) { - //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); - } - frame(lua_state, 35.0); - if is_excute(agent) { - //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 37.0); - if is_excute(agent) { - //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); - } -} - -// ============================================================================================= -// ======================================== CHAKRAM ============================================ -// ============================================================================================= - -unsafe extern "C" fn game_specials3_1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn game_specials3_1hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn game_specials3_1lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn game_specialairs3_1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn game_specialairs3_1hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -unsafe extern "C" fn game_specialairs3_1lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let end_frame = MotionModule::end_frame(boma); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.27); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); - } - frame(lua_state, 10.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - else { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); - } - } - frame(lua_state, 18.0); - if is_excute(agent) { - if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ - FT_MOTION_RATE(agent, 1.25); - } - else{ - FT_MOTION_RATE(agent, 1.1); - } - ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } -} - -// ============================================================================================= -// ======================================== STONE SCABBARD ======================================== -// ============================================================================================= - -unsafe extern "C" fn game_specialhi1start(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.7); - } -} - -unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - let addSpeed = Vector3f { x: 0.0, y: 0.5, z: 0.0 }; - KineticModule::add_speed(boma, &addSpeed); - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); - AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); - } - frame(lua_state, 7.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); - } - frame(lua_state, 11.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 29.0); - if is_excute(agent) { - // Tip - ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // Middle - ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - // Hilt - ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 35.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_ROKET_UNDER_DISABLE_CONTROL_X); - } - frame(lua_state, 60.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 5.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.8); - } -} - -unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 4.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 5.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.8); - } -} - -// ==================================================================================================== -// ======================================== SKYWARD SLASH DASH ======================================== -// ==================================================================================================== - -unsafe extern "C" fn game_specialhi2hold(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(agent, 0.6); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(agent, 2.5); - } - else{ - FT_MOTION_RATE(agent, 0.8); - } - } - frame(lua_state, 24.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); -} - -unsafe extern "C" fn game_specialhi2holdair(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(agent, 0.6); - } - frame(lua_state, 17.0); - if is_excute(agent) { - if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ - //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); - FT_MOTION_RATE(agent, 2.5); - } - else{ - FT_MOTION_RATE(agent, 0.8); - } - } - frame(lua_state, 24.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - ATTACK(agent, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - ATTACK(agent, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); -} - -unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - for _ in 0..5 { - frame(lua_state, 2.0); - if is_excute(agent) { - // Charged - //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(agent, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // Uncharged - else{ - ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - } - if is_excute(agent) { - - let h_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - let v_speed = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - //let angle_calc = v_speed / h_speed as f32; - //println!("Angle: {}", angle_calc); - - let mut launch_angle = if v_speed > 0.0 {(v_speed / h_speed.abs()).atan().to_degrees() as u64} else {361 as u64}; - - //println!("H speed: {}", h_speed); - //println!("V speed: {}", v_speed); - - //println!("Launch Angle (pre-calc): {}", launch_angle); - - if h_speed == 0.0 { - launch_angle = 90 as u64; - } - - //println!("Launch Angle: {}", launch_angle); - - // Charged - //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - // Uncharged - else{ - ATTACK(agent, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 1.3, 1.23, 0.65); - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); - } - else if agent.is_situation(*SITUATION_KIND_AIR) { - EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); - } - } - frame(lua_state, 2.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); - LAST_EFFECT_SET_ALPHA(agent, 0.7); - } - frame(lua_state, 4.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); - } - frame(lua_state, 13.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(agent, 0.8); - EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_sdash_hit"), -1); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 2); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_sdash"), false, true); - } -} - -unsafe extern "C" fn game_specialhi2landing(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(agent, 0.8); - } - } -} - -unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { - if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ - FT_MOTION_RATE(agent, 0.8); - } - if VarModule::is_flag(agent.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { - FT_MOTION_RATE(agent, 0.5); - } - } -} - -// ============================================================================================= -// ======================================== HERO'S SPIN ======================================== -// ============================================================================================= - -unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 6.0); - if is_excute(agent) { - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 21.0); - if is_excute(agent) { - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 37.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn game_specialairhi3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let start_speed = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); - frame(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 11.0); - if is_excute(agent) { - JostleModule::set_status(boma, false); - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 26.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 31.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 38.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 39.0, 47.0, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 48.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - JostleModule::set_status(boma, true); - } - -} - -// =============================================================================================== -// ======================================== KINESIS BLADE ======================================== -// =============================================================================================== - -unsafe extern "C" fn game_speciallw1hit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - } - frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 47.0); - FT_MOTION_RATE(agent, 1.0); -} - -// Kinesis Blade - Charge Storage -// #[acmd_script( agent = "miiswordsman", script = "game_speciallw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_lw1_hit_game(agent: &mut L2CAgentBase) { -// let lua_state = agent.lua_state_agent; -// let boma = agent.boma(); -// if is_excute(agent) { -// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); -// // Attack transition -// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); -// if current_level > 0{ -// if current_level == 1 { -// // println!("Changing to level 1"); -// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); -// } -// else{ -// // println!("Changing to level 2"); -// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); -// } -// } -// } -// else{ -// // Increment the level -// if current_level < 2 { -// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level -// // println!("Kinesis increment"); -// } -// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); -// } -// } -// frame(lua_state, 23.0); -// if is_excute(agent) { -// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(agent, 0.65); -// } -// } - -// #[acmd_script( agent = "miiswordsman", script = "game_specialairlw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_air_lw1_hit_game(agent: &mut L2CAgentBase) { -// let lua_state = agent.lua_state_agent; -// let boma = agent.boma(); -// if is_excute(agent) { -// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); -// // Attack transition -// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { -// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); -// if current_level > 0{ -// if current_level == 1 { -// // println!("Changing to level 1"); -// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); -// } -// else{ -// // println!("Changing to level 2"); -// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); -// } -// } -// } -// else{ -// // Increment the level -// if current_level < 2 { -// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level -// // println!("Kinesis increment"); -// } -// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); -// } -// } -// frame(lua_state, 23.0); -// if is_excute(agent) { -// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); -// //FT_MOTION_RATE(agent, 0.65); -// } -// } - -// Kinesis Blade - 1 Charge - -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - wait(lua_state, 7.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(agent) { - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - } - wait(lua_state, 7.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); - } - wait(lua_state, 5.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 30.0); - if is_excute(agent) { - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } -} - -// Kinesis Blade - 2 Charges - -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 60.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 63.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 68.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 73.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 76.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 60.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - frame(lua_state, 63.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 68.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 73.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); - } - frame(lua_state, 76.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -// ================================================================================================================ -// ======================================== DEFLECTING DRAFT / SHOCK SPELL ======================================== -// ================================================================================================================ - -unsafe extern "C" fn game_speciallw2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - } - frame(lua_state, 6.0); - FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 16.0); - if is_excute(agent) { - if boma.is_button_on(Buttons::Special) { - VarModule::on_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); - } - } - frame(lua_state, 12.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); - let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; - ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); - } - frame(lua_state, 16.0); - FT_MOTION_RATE_RANGE(agent, 16.0, 23.0, 10.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - AttackModule::clear_all(boma); - } - frame(lua_state, 23.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); - } - -} - -unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.2); - } - EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); - LAST_EFFECT_SET_ALPHA(agent, 0.65); - } - frame(lua_state, 6.0); - if is_excute(agent) { - let mut offset = 0; - EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); - if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { - offset = 13; - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); - } - if agent.is_situation(*SITUATION_KIND_GROUND) { - EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(agent, 1.1); - } - } - frame(lua_state, 9.0); - if is_excute(agent) { - if agent.is_situation(*SITUATION_KIND_AIR) { - let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); - LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); - LAST_EFFECT_SET_RATE(agent, 1.1); - } - } - frame(lua_state, 10.5); - if is_excute(agent) { - let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - if agent.is_situation(*SITUATION_KIND_GROUND) { - LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); - } - EFFECT_FOLLOW(agent, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); - LAST_EFFECT_SET_RATE(agent, 1.2); - } - frame(lua_state, 12.0); - if is_excute(agent) { - let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; - EFFECT_FOLLOW(agent, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_smokescreen"), false, false); - EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); - LAST_EFFECT_SET_COLOR(agent, 1.0, 0.84, 0.17); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_paralysis"), true, true); - EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder_flash"), true, true); - EFFECT_DETACH_KIND(agent, Hash40::new("sys_hit_elec"), -1); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_reflect_sword"), false, true); - } - frame(lua_state, 26.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, true); - EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_reflect1"), -1); - } - -} - -unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_miiswordsman_special_c2_l01")); - PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); - } - frame(lua_state, 10.5); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_electric_hit_m")); - } - frame(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); - } - -} - -// ================================================================================================================ -// ======================================== HURRICANE HEAVE ======================================================= -// ================================================================================================================ - -unsafe extern "C" fn game_speciallw3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); - } - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - - } - frame(lua_state, 6.0); - if is_excute(agent) { - //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 4.0, y: 5.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 0.0, y: 17.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - //REVERSE_LR(agent); - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -6.0, y: 15.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - //REVERSE_LR(agent); - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -12.0, y: 0.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); - } - /* - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - //let hit1 = Vector2f {x: 12.0, y: 0.0}; - //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - */ - frame(lua_state, 21.0); - if is_excute(agent) { - ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); - } - frame(lua_state, 24.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialairlw3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 16.0); - sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 18.0); - sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); - wait(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 8.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn game_specialairlw3end(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.790); - //WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); - } -} - -unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - frame(lua_state, 6.0); - if is_excute(agent) { - //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 4.0, y: 5.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - frame(lua_state, 16.0); - if is_excute(agent) { - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: 0.0, y: 17.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - //REVERSE_LR(agent); - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -6.0, y: 15.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - //REVERSE_LR(agent); - //AttackModule::clear_all(boma); - ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - let hit1 = Vector2f {x: -12.0, y: 0.0}; - AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); - } - /* - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - //let hit1 = Vector2f {x: 12.0, y: 0.0}; - //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); - } - */ - frame(lua_state, 21.0); - if is_excute(agent) { - REVERSE_LR(agent); - ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - } - frame(lua_state, 24.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn1", game_specialn1); - agent.acmd("game_specialairn1", game_specialn1); - - agent.acmd("game_specialn2", game_specialn2); - agent.acmd("game_specialairn2", game_specialn2); - agent.acmd("effect_specialn2", effect_specialn2); - agent.acmd("effect_specialairn2", effect_specialn2); - agent.acmd("sound_specialn2", sound_specialn2); - agent.acmd("sound_specialairn2", sound_specialn2); - agent.acmd("expression_specialn2", expression_specialn2); - agent.acmd("expression_specialairn2", expression_specialn2); - - agent.acmd("game_specialn3end", game_specialn3end); - agent.acmd("game_specialn3endturn", game_specialn3end); - agent.acmd("game_specialn3endmax", game_specialn3end); - agent.acmd("game_specialn3endmaxturn", game_specialn3end); - agent.acmd("game_specialairn3end", game_specialairn3end); - agent.acmd("game_specialairn3endturn", game_specialairn3end); - agent.acmd("game_specialairn3endmax", game_specialairn3end); - agent.acmd("game_specialairn3endmaxturn", game_specialairn3end); - - agent.acmd("game_specials1start", game_specials1start); - agent.acmd("game_specialairs1start", game_specialairs1start); - agent.acmd("game_specials1", game_specials1); - agent.acmd("game_specialairs1", game_specialairs1); - - agent.acmd("game_specials2dash", game_specials2dash); - agent.acmd("game_specials2attack", game_specials2attack); - agent.acmd("effect_specials2attack", effect_specials2attack); - agent.acmd("game_specialairs2dash", game_specialairs2dash); - agent.acmd("game_specialairs2attack", game_specialairs2attack); - agent.acmd("effect_specialairs2attack", effect_specialairs2attack); - - agent.acmd("game_specials3_1", game_specials3_1); - agent.acmd("game_specials3_1hi", game_specials3_1hi); - agent.acmd("game_specials3_1lw", game_specials3_1lw); - agent.acmd("game_specialairs3_1", game_specialairs3_1); - agent.acmd("game_specialairs3_1hi", game_specialairs3_1hi); - agent.acmd("game_specialairs3_1lw", game_specialairs3_1lw); - - agent.acmd("game_specialhi1start", game_specialhi1start); - agent.acmd("game_specialairhi1", game_specialairhi1); - agent.acmd("game_specialhi1end", game_specialhi1end); - agent.acmd("game_specialairhi1end", game_specialairhi1end); - - agent.acmd("game_specialhi2hold", game_specialhi2hold); - agent.acmd("game_specialhi2holdair", game_specialhi2holdair); - agent.acmd("game_specialhi2", game_specialhi2); - agent.acmd("effect_specialhi2", effect_specialhi2); - agent.acmd("game_specialhi2landing", game_specialhi2landing); - agent.acmd("game_specialhi2fall", game_specialhi2fall); - - agent.acmd("game_specialhi3", game_specialhi3); - agent.acmd("game_specialairhi3", game_specialairhi3); - - agent.acmd("game_speciallw1hit", game_speciallw1hit); - agent.acmd("game_specialairlw1hit", game_specialairlw1hit); - //agent.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game); - //agent.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game); - //agent.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game); - //agent.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game); - - agent.acmd("game_speciallw2", game_speciallw2); - agent.acmd("game_specialairlw2", game_speciallw2); - agent.acmd("effect_speciallw2", effect_speciallw2); - agent.acmd("effect_specialairlw2", effect_speciallw2); - agent.acmd("sound_speciallw2", sound_speciallw2); - agent.acmd("sound_specialairlw2", sound_speciallw2); - - agent.acmd("game_speciallw3", game_speciallw3); - //agent.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game); - agent.acmd("game_specialairlw3", game_specialairlw3); - agent.acmd("game_specialairlw3end", game_specialairlw3end); - //agent.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game); -} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/mod.rs b/fighters/miiswordsman/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..7c584b7a28 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/mod.rs @@ -0,0 +1,13 @@ +use super::*; + +mod special_n; +mod special_s; +mod special_hi; +mod special_lw; + +pub fn install(agent: &mut Agent) {; + special_n::install(agent); + special_s::install(agent); + special_hi::install(agent); + special_lw::install(agent); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_hi.rs b/fighters/miiswordsman/src/acmd/specials/special_hi.rs new file mode 100644 index 0000000000..761edda43c --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_hi.rs @@ -0,0 +1,474 @@ +use super::*; + +// ============================================================================================= +// ======================================== STONE SCABBARD ===================================== +// ============================================================================================= + +unsafe extern "C" fn game_specialhi1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.7); + } +} + +unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + let addSpeed = Vector3f { x: 0.0, y: 0.5, z: 0.0 }; + KineticModule::add_speed(boma, &addSpeed); + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 46, 95, 0, 60, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 4.0, 0.0, 7.0, 6.0, Some(0.0), Some(4.0), Some(6.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 10.0, Some(0.0), Some(4.0), Some(10.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 4.0, 92, 100, 60, 0, 3.5, 0.0, 7.0, 14.0, Some(0.0), Some(4.0), Some(14.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 7.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 7.0, false); + AttackModule::set_add_reaction_frame(boma, 2, 7.0, false); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP); + } + frame(lua_state, 11.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 29.0); + if is_excute(agent) { + // Tip + ATTACK(agent, 0, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 14.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // Middle + ATTACK(agent, 2, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 7.25, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + // Hilt + ATTACK(agent, 4, 0, Hash40::new("haver"), 3.0, 268, 180, 30, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("haver"), 3.0, 361, 100, 20, 0, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 35.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_ROKET_UNDER_DISABLE_CONTROL_X); + } + frame(lua_state, 60.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); + } +} + +unsafe extern "C" fn game_specialairhi1end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 55, 116, 0, 103, 8.0, 0.0, 6.0, -4.0, Some(0.0), Some(6.0), Some(4.5), 1.55, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 4.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 5.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.8); + } +} + +// ==================================================================================================== +// ======================================== SKYWARD SLASH DASH ======================================== +// ==================================================================================================== + +unsafe extern "C" fn game_specialhi2hold(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); + } + else{ + FT_MOTION_RATE(agent, 0.8); + } + } + frame(lua_state, 24.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); +} + +unsafe extern "C" fn game_specialhi2holdair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 0.6); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW){ + //VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + FT_MOTION_RATE(agent, 2.5); + } + else{ + FT_MOTION_RATE(agent, 0.8); + } + } + frame(lua_state, 24.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + ATTACK(agent, 0, 0, Hash40::new("rot"), 2.2, 91, 100, 140, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + ATTACK(agent, 1, 0, Hash40::new("rot"), 2.2, 100, 100, 80, 0, 7.0, 0.0, 0.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); +} + +unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + for _ in 0..5 { + frame(lua_state, 2.0); + if is_excute(agent) { + // Charged + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 3.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 3.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 3.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 3.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // Uncharged + else{ + ATTACK(agent, 0, 0, Hash40::new("rot"), 1.0, 367, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 1.0, 55, 40, 0, 40, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("rot"), 1.0, 367, 100, 100, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("rot"), 1.0, 363, 100, 120, 0, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + } + if is_excute(agent) { + + let h_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let v_speed = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + //let angle_calc = v_speed / h_speed as f32; + //println!("Angle: {}", angle_calc); + + let mut launch_angle = if v_speed > 0.0 {(v_speed / h_speed.abs()).atan().to_degrees() as u64} else {361 as u64}; + + //println!("H speed: {}", h_speed); + //println!("V speed: {}", v_speed); + + //println!("Launch Angle (pre-calc): {}", launch_angle); + + if h_speed == 0.0 { + launch_angle = 90 as u64; + } + + //println!("Launch Angle: {}", launch_angle); + + // Charged + //if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + ATTACK(agent, 0, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 6.0, launch_angle, 110, 0, 70, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // Uncharged + else{ + ATTACK(agent, 0, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 6.0, 0.0, 0.0, 12.0, Some(0.0), Some(0.0), Some(15.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("rot"), 4.0, 79, 40, 0, 90, 3.0, 0.0, 6.0, 6.0, Some(0.0), Some(-6.0), Some(6.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialhi2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 1.3, 1.23, 0.65); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash"), Hash40::new("rot"), -2, -4, 0, 0, 0, 0, 0.9, true); + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); + } + else if agent.is_situation(*SITUATION_KIND_AIR) { + EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0 ,0, 0, false); + } + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash"), Hash40::new("rot"), 0, 0, 9, 0, 0, 0, 0.3, true); + LAST_EFFECT_SET_ALPHA(agent, 0.7); + } + frame(lua_state, 4.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash2"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash3"), Hash40::new("rot"), 0, -5, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash4"), Hash40::new("rot"), 0, -7.5, 0, 0, 0, 0, 0.9, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash5"), Hash40::new("rot"), -1, -10, 3.5, 0, 0, 0, 0.9, true); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_sdash_slash6"), Hash40::new("rot"), 0, 0, -1.5, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 0.8); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_sdash_hit"), -1); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_sdash"), false, true); + } +} + +unsafe extern "C" fn game_specialhi2landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); + } + } +} + +unsafe extern "C" fn game_specialhi2fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + //if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK){ + FT_MOTION_RATE(agent, 0.8); + } + if VarModule::is_flag(agent.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) { + FT_MOTION_RATE(agent, 0.5); + } + } +} + +// ============================================================================================= +// ======================================== HERO SPIN ========================================== +// ============================================================================================= + +unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 14.0, 40, 64, 0, 90, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 40, 64, 0, 90, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 10.0, 40, 64, 0, 90, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.0, 361, 64, 0, 80, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 64, 0, 80, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 8.0, 361, 64, 0, 80, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 9.0, 361, 64, 0, 75, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 75, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 21.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.5, 1.0, 11.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 361, 64, 0, 70, 4.0, 1.0, 6.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 5.0, 361, 64, 0, 70, 4.0, 1.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 37.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let start_speed = agent.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + frame(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 11.0); + if is_excute(agent) { + JostleModule::set_status(boma, false); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 80, 0, 6.0, 0.0, 10.0, -14.0, Some(0.0), Some(10.0), Some(-9.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 90, 0, 6.5, 0.0, 8.0, 9.0, Some(0.0), Some(7.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 5.0, -15.0, Some(0.0), Some(6.0), Some(-11.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 367, 100, 75, 0, 6.0, 0.0, 8.0, 9.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 26.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 90, 0, 6.5, 0.0, 8.0, -13.0, Some(0.0), Some(8.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 31.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 80, 100, 60, 0, 6.3, 0.0, 9.0, 9.0, Some(0.0), Some(9.0), Some(15.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 38.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 60, 100, 100, 0, 6.0, 0.0, 9.0, -14.0, Some(0.0), Some(9.0), Some(-10.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 39.0, 47.0, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 14.0, 4.0, Some(0.0), Some(18.0), Some(11.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 48.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 208, 0, 30, 7.5, 0.0, 15.0, 3.0, Some(0.0), Some(19.0), Some(7.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + JostleModule::set_status(boma, true); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialhi1start", game_specialhi1start); + agent.acmd("game_specialairhi1", game_specialairhi1); + agent.acmd("game_specialhi1end", game_specialhi1end); + agent.acmd("game_specialairhi1end", game_specialairhi1end); + + agent.acmd("game_specialhi2hold", game_specialhi2hold); + agent.acmd("game_specialhi2holdair", game_specialhi2holdair); + agent.acmd("game_specialhi2", game_specialhi2); + agent.acmd("effect_specialhi2", effect_specialhi2); + agent.acmd("game_specialhi2landing", game_specialhi2landing); + agent.acmd("game_specialhi2fall", game_specialhi2fall); + + agent.acmd("game_specialhi3", game_specialhi3); + agent.acmd("game_specialairhi3", game_specialairhi3); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_lw.rs b/fighters/miiswordsman/src/acmd/specials/special_lw.rs new file mode 100644 index 0000000000..0f2bdd473c --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_lw.rs @@ -0,0 +1,635 @@ +use super::*; + +// =============================================================================================== +// ======================================== BLADE COUNTER ======================================== +// =============================================================================================== + +unsafe extern "C" fn game_speciallw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 80, 60, 0, 85, 8.8, 0.0, 8.0, 15.0, Some(0.0), Some(8.0), Some(3.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 21.0, 15.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 73, 60, 0, 85, 10.5, 0.0, 7.0, 14.0, Some(0.0), Some(7.0), Some(4.0), 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 47.0, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 47.0); + FT_MOTION_RATE(agent, 1.0); +} + +// Kinesis Blade - Charge Storage +// #[acmd_script( agent = "miiswordsman", script = "game_speciallw1hit" , category = ACMD_GAME , low_priority)] +// unsafe fn miiswordsman_special_lw1_hit_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// // Attack transition +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if current_level > 0{ +// if current_level == 1 { +// // println!("Changing to level 1"); +// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); +// } +// else{ +// // println!("Changing to level 2"); +// MotionModule::change_motion(boma, Hash40::new("special_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); +// } +// } +// } +// else{ +// // Increment the level +// if current_level < 2 { +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// // println!("Kinesis increment"); +// } +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// } +// } +// frame(lua_state, 23.0); +// if is_excute(agent) { +// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); +// //FT_MOTION_RATE(agent, 0.65); +// } +// } + +// #[acmd_script( agent = "miiswordsman", script = "game_specialairlw1hit" , category = ACMD_GAME , low_priority)] +// unsafe fn miiswordsman_special_air_lw1_hit_game(agent: &mut L2CAgentBase) { +// let lua_state = agent.lua_state_agent; +// let boma = agent.boma(); +// if is_excute(agent) { +// let current_level = VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL); +// // Attack transition +// if VarModule::is_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER) { +// VarModule::off_flag(agent.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); +// if current_level > 0{ +// if current_level == 1 { +// // println!("Changing to level 1"); +// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv1"), 0.0, 1.0, false, 0.0, false, false); +// } +// else{ +// // println!("Changing to level 2"); +// MotionModule::change_motion(boma, Hash40::new("special_air_lw1_hit_lv2"), 0.0, 1.0, false, 0.0, false, false); +// } +// } +// } +// else{ +// // Increment the level +// if current_level < 2 { +// VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, current_level + 1); // Add a charge level +// // println!("Kinesis increment"); +// } +// // println!("Kinesis Level: {}", VarModule::get_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL)); +// } +// } +// frame(lua_state, 23.0); +// if is_excute(agent) { +// WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); +// //FT_MOTION_RATE(agent, 0.65); +// } +// } + +// Kinesis Blade - 1 Charge + +unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } +} + +unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::miiswordsman::instance::SPECIAL_LW1_CHARGE_LEVEL, 0); // Reset charge level + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_ON); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 11.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 0.0, 0, 0, 0, 0, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 1, Hash40::new("haver"), 2.0, 365, 0, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + } + wait(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 50, 6.0, 0.0, 6.0, 10.0, Some(0.0), Some(6.0), Some(-30.0), 1.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_SWORD); + } + wait(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 30.0); + if is_excute(agent) { + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } +} + +// Kinesis Blade - 2 Charges + +unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 73.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 76.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.1, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 60.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 365, 0, 0, 40, 12.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + } + frame(lua_state, 63.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 11.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 5.0, 361, 100, 0, 50, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 73.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_GRAVITY_OFF); + } + frame(lua_state, 76.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +// ================================================================================================================ +// ================================================ SHOCK SPELL =================================================== +// ================================================================================================================ + +unsafe extern "C" fn game_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 6.0, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); + } + frame(lua_state, 6.0); + FT_MOTION_RATE_RANGE(agent, 6.0, 12.0, 16.0); + if is_excute(agent) { + if boma.is_button_on(Buttons::Special) { + VarModule::on_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD); + } + } + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 15.0 } else { 0.0 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 60, 55, 0, 40, 5.0, 0.0, 9.0, 15.0 + hold, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 15, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 60, 55, 0, 40, 2.0, 0.0, 2.0, 15.0 + hold, Some(0.0), Some(25.0), Some(15.0 + hold), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_OBJECT); + } + frame(lua_state, 16.0); + FT_MOTION_RATE_RANGE(agent, 16.0, 23.0, 10.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + AttackModule::clear_all(boma); + } + frame(lua_state, 23.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); + } + +} + +unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_whirlwind_r"), Hash40::new("top"), -1.5, 0, 2, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_reflect_sword"), Hash40::new("haver"), 0, 0, 0, 0, 0.0, 0, 1, true); + LAST_EFFECT_SET_ALPHA(agent, 0.65); + } + frame(lua_state, 6.0); + if is_excute(agent) { + let mut offset = 0; + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.4, true); + if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { + offset = 13; + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 15.0, 8.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + if agent.is_situation(*SITUATION_KIND_GROUND) { + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + offset, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); + } + } + frame(lua_state, 9.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_smokescreen"), Hash40::new("top"), 0, 25, 13 + hold, 0, 0.0, 0, 0.4, true); + LAST_EFFECT_SET_SCALE_W(agent, 0.4, 0.25, 0.4); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.1); + LAST_EFFECT_SET_RATE(agent, 1.1); + } + } + frame(lua_state, 10.5); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + if agent.is_situation(*SITUATION_KIND_GROUND) { + LANDING_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0.5, 0, 0, 0, 0, 0, 1.4, 0, 0, 0, 0, 0, 0, false); + } + EFFECT_FOLLOW(agent, Hash40::new("sys_thunder_flash"), Hash40::new("top"), 0, 15, 13 + hold, 0, 0, 180, 0.15, true); + LAST_EFFECT_SET_RATE(agent, 1.2); + } + frame(lua_state, 12.0); + if is_excute(agent) { + let hold = if VarModule::is_flag(agent.object(), vars::miiswordsman::status::SHOCK_SPELL_HOLD) { 13 } else { 0 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_damage_paralysis"), Hash40::new("arml"), 4, 0, 0, 0, 0, 0, 0.35, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_smokescreen"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_elec"), Hash40::new("top"), 0, 8, 13 + hold, 0, 0, 0, 0.4, true); + LAST_EFFECT_SET_COLOR(agent, 1.0, 0.84, 0.17); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_paralysis"), true, true); + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder_flash"), true, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_hit_elec"), -1); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_reflect_sword"), false, true); + } + frame(lua_state, 26.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, true); + EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_reflect1"), -1); + } + +} + +unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_c2_l01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + } + frame(lua_state, 10.5); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_m")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); + } + +} + +// ================================================================================================================ +// =========================================== POWER THRUST ======================================================= +// ================================================================================================================ + +unsafe extern "C" fn game_speciallw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 3.8, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("haver"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 9.0, /*Z*/ 0.0, /*X2*/ None, /*Y2*/ None, /*Z2*/ None, /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 12.0, /*Angle*/ 35, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 77, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 15.0, /*Angle*/ 35, /*KBG*/ 66, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 42, /*KBG*/ 65, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 42, /*KBG*/ 70, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.5, /*Angle*/ 50, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 58, /*Size*/ 4.0, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 8.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(8.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 50, /*KBG*/ 80, /*FKB*/ 0, /*BKB*/ 65, /*Size*/ 2.7, /*X*/ 0.0, /*Y*/ 6.0, /*Z*/ 13.0, /*X2*/ Some(0.0), /*Y2*/ Some(6.0), /*Z2*/ Some(19.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_GA, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } + frame(lua_state, 6.0); + if is_excute(agent) { + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 4.0, y: 5.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 0.0, y: 17.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -6.0, y: 15.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -12.0, y: 0.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); + } + /* + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //let hit1 = Vector2f {x: 12.0, y: 0.0}; + //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + */ + frame(lua_state, 21.0); + if is_excute(agent) { + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.4, 1.0); + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_WALL_CHECK); + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 10.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 275, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 44, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 13.0, /*Angle*/ 361, /*KBG*/ 90, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 18.0); + sv_kinetic_energy!(set_speed_mul_2nd, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0, 1.0); + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 11.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 1, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 5.5, /*Angle*/ 361, /*KBG*/ 75, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.5, /*X*/ 0.0, /*Y*/ -2.0, /*Z*/ 0.0, /*X2*/ Some(0.0), /*Y2*/ Some(-2.0), /*Z2*/ Some(0.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_M, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 2, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 1.0, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_A, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + ATTACK(agent, /*ID*/ 3, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 8.0, /*Angle*/ 361, /*KBG*/ 85, /*FKB*/ 0, /*BKB*/ 40, /*Size*/ 3.2, /*X*/ 0.0, /*Y*/ -7.0, /*Z*/ 3.0, /*X2*/ Some(0.0), /*Y2*/ Some(-11.0), /*Z2*/ Some(5.0), /*Hitlag*/ 0.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_sting"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 8.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairlw3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.790); + //WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, /*ID*/ 0, /*Part*/ 0, /*Bone*/ Hash40::new("top"), /*Damage*/ 7.0, /*Angle*/ 45, /*KBG*/ 120, /*FKB*/ 0, /*BKB*/ 60, /*Size*/ 4.8, /*X*/ 0.0, /*Y*/ 3.0, /*Z*/ -10.0, /*X2*/ Some(0.0), /*Y2*/ Some(3.0), /*Z2*/ Some(7.0), /*Hitlag*/ 1.5, /*SDI*/ 1.0, /*Clang_Rebound*/ *ATTACK_SETOFF_KIND_ON, /*FacingRestrict*/ *ATTACK_LR_CHECK_POS, /*SetWeight*/ false, /*ShieldDamage*/ 0, /*Trip*/ 0.0, /*Rehit*/ 0, /*Reflectable*/ false, /*Absorbable*/ false, /*Flinchless*/ false, /*DisableHitlag*/ false, /*Direct_Hitbox*/ true, /*Ground_or_Air*/ *COLLISION_SITUATION_MASK_G, /*Hitbits*/ *COLLISION_CATEGORY_MASK_ALL, /*CollisionPart*/ *COLLISION_PART_MASK_ALL, /*FriendlyFire*/ false, /*Effect*/ Hash40::new("collision_attr_normal"), /*SFXLevel*/ *ATTACK_SOUND_LEVEL_L, /*SFXType*/ *COLLISION_SOUND_ATTR_KICK, /*Type*/ *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + //WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_SP_BRAKE); + } +} + +unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + frame(lua_state, 6.0); + if is_excute(agent) { + //ATTACK(agent, 0, 1, Hash40::new("haver"), 1.0, 100, 10, 0, 10, 4.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 0.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 4.0, y: 5.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + frame(lua_state, 16.0); + if is_excute(agent) { + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 6.0, 15.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: 0.0, y: 17.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 4, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 17.0, 0.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -6.0, y: 15.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 3, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + //REVERSE_LR(agent); + //AttackModule::clear_all(boma); + ATTACK(agent, 0, 1, Hash40::new("top"), 0.1, 368, 30, 0, 0, 7.5, 0.0, 15.0, -6.0, None, None, None, 0.1, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + let hit1 = Vector2f {x: -12.0, y: 0.0}; + AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 2, false); + } + /* + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("haver"), 0.1, 365, 30, 0, 0, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(13.0), Some(0.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + //let hit1 = Vector2f {x: 12.0, y: 0.0}; + //AttackModule::set_vec_target_pos(boma, 0, Hash40::new("top"), &hit1, 10, false); + } + */ + frame(lua_state, 21.0); + if is_excute(agent) { + REVERSE_LR(agent); + ATTACK(agent, 0, 2, Hash40::new("haver"), 5.0, 80, 100, 0, 60, 6.8, 0.0, 0.0, 0.0, Some(0.0), Some(11.5), Some(0.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + frame(lua_state, 24.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_speciallw1hit", game_speciallw1hit); + agent.acmd("game_specialairlw1hit", game_specialairlw1hit); + //agent.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game); + //agent.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game); + //agent.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game); + //agent.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game); + + agent.acmd("game_speciallw2", game_speciallw2); + agent.acmd("game_specialairlw2", game_speciallw2); + agent.acmd("effect_speciallw2", effect_speciallw2); + agent.acmd("effect_specialairlw2", effect_speciallw2); + agent.acmd("sound_speciallw2", sound_speciallw2); + agent.acmd("sound_specialairlw2", sound_speciallw2); + + agent.acmd("game_speciallw3", game_speciallw3); + //agent.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game); + agent.acmd("game_specialairlw3", game_specialairlw3); + agent.acmd("game_specialairlw3end", game_specialairlw3end); + //agent.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_n.rs b/fighters/miiswordsman/src/acmd/specials/special_n.rs new file mode 100644 index 0000000000..6d851503a9 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_n.rs @@ -0,0 +1,305 @@ +use super::*; + +// ================================================================================================ +// ====================================== SUMMONED CYLCONE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 14.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_TORNADOSHOT, false, 0); + } + frame(lua_state, 20.0); + FT_MOTION_RATE_RANGE(agent, 20.0, 48.0, 17.0); + frame(lua_state, 48.0); + FT_MOTION_RATE(agent, 1.0); +} + +// ================================================================================================ +// ======================================== WARRIOR WAVE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 14.0, 9.0); + if is_excute(agent) { + VarModule::off_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + if agent.is_situation(*SITUATION_KIND_GROUND) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); + } + else { + let x_vel = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); + app::sv_kinetic_energy::set_stable_speed(agent.lua_state_agent); + } + } + frame(lua_state, 14.0); + FT_MOTION_RATE(agent, 1.0); + if boma.is_button_on(Buttons::Special) { + FT_MOTION_RATE_RANGE(agent, 14.0, 17.0, 13.0); + } + else { + FT_MOTION_RATE(agent, 1.0); + } + if is_excute(agent) { + if boma.is_button_on(Buttons::Special) { + VarModule::on_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK); + } + } + frame(lua_state, 17.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + if agent.is_situation(*SITUATION_KIND_AIR) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + agent.clear_lua_stack(); + lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); + app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + } + } + // light + if !VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + MotionModule::set_rate(boma, 1.0); + ATTACK(agent, 0, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 11.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + // heavy + else { + ATTACK(agent, 0, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 13.0, 361, 100, 0, 39, 3.5, 0.0, 6.75, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 14.0, 361, 100, 0, 39, 3.5, 0.0, 11.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + } + frame(lua_state, 20.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ArticleModule::generate_article(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, false, 0); + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_LIGHTSHURIKEN, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 33.0); + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + FT_MOTION_RATE_RANGE(agent, 33.0, 36.0, 10.0); + } + frame(lua_state, 36.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_miiswordsman_sword03"), Hash40::new("tex_miiswordsman_sword04"), 8, Hash40::new("haver"), 0.0, 0.2, 0.0, Hash40::new("haver"), -0.0, 10.5, 0.0, true, Hash40::new("null"), Hash40::new("haver"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_Y, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 14.2); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0, 7.5, 0.0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_action_smoke_h"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 10, 2, -10.6, -140, 90.0, 1.3, true); + LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 29.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4.0); + } +} + +unsafe extern "C" fn sound_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_miiswordsman_rnd_special_c2_l01")); + PLAY_SE(agent, Hash40::new("se_miiswordsman_special_l03")); + } +} + +unsafe extern "C" fn expression_specialn2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 0, 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 15.0); + if is_excute(agent) { + if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitll"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } else { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + } + frame(lua_state, 17.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } + frame(lua_state, 35.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x26769bd1de), 0, 30, 20); + } +} + +// ================================================================================================ +// ======================================== BLURRING BLADE ======================================== +// ================================================================================================ + +unsafe extern "C" fn game_specialn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_n3_end_turn"), Hash40::new("special_n3_end_max_turn")]); + frame(lua_state, 6.0); + if is_excute(agent) { + if turn { + REVERSE_LR(agent); + } + } + for _ in 0..4 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 180, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 92, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 91, 100, 21, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); + AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 33.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_n3_end_max"), Hash40::new("special_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + let offset = if turn { -10.0 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 40.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); + frame(lua_state, 80.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_specialairn3end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let turn = agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_turn"), Hash40::new("special_air_n3_end_max_turn")]); + if is_excute(agent) { + let flip = if turn { -1.0 } else { 1.0 }; + SET_SPEED_EX(agent, 0.5 * flip, 1.2, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 6.0); + if is_excute(agent) { + if turn { + REVERSE_LR(agent); + } + } + for _ in 0..2 { + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 90, 100, 1, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 285, 100, 10, 0, 3.5, 0.0, -2.0, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 2.0); + } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 1.0, 120, 100, 20, 0, 4.0, 0.0, 8.2, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 1.0, 45, 100, 25, 0, 4.0, 0.0, -1.2, 0.0, Some(0.0), Some(12.0), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 2.0); + AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); + AttackModule::set_add_reaction_frame(boma, 1, 10.0, false); + } + frame(lua_state, 24.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 33.0, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 25.0); + if is_excute(agent) { + KineticModule::add_speed(boma, &Vector3f::new(0.0, 2.0, 0.0)); + } + frame(lua_state, 33.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let sfx = if agent.is_motion_one_of(&[Hash40::new("special_air_n3_end_max"), Hash40::new("special_air_n3_end_max_turn")]) { *COLLISION_SOUND_ATTR_FIRE } else { *COLLISION_SOUND_ATTR_KICK }; + let offset = if turn { -9.5 } else { 9.5 }; + ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 70, 65, 0, 80, 10.0, 0.0, 10.0, offset, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, sfx, *ATTACK_REGION_SWORD); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 40.0); + FT_MOTION_RATE_RANGE(agent, 40.0, 80.0, 26.0); + frame(lua_state, 80.0); + FT_MOTION_RATE(agent, 1.0); +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn1", game_specialn1); + agent.acmd("game_specialairn1", game_specialn1); + + agent.acmd("game_specialn2", game_specialn2); + agent.acmd("game_specialairn2", game_specialn2); + agent.acmd("effect_specialn2", effect_specialn2); + agent.acmd("effect_specialairn2", effect_specialn2); + agent.acmd("sound_specialn2", sound_specialn2); + agent.acmd("sound_specialairn2", sound_specialn2); + agent.acmd("expression_specialn2", expression_specialn2); + agent.acmd("expression_specialairn2", expression_specialn2); + + agent.acmd("game_specialn3end", game_specialn3end); + agent.acmd("game_specialn3endturn", game_specialn3end); + agent.acmd("game_specialn3endmax", game_specialn3end); + agent.acmd("game_specialn3endmaxturn", game_specialn3end); + agent.acmd("game_specialairn3end", game_specialairn3end); + agent.acmd("game_specialairn3endturn", game_specialairn3end); + agent.acmd("game_specialairn3endmax", game_specialairn3end); + agent.acmd("game_specialairn3endmaxturn", game_specialairn3end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/acmd/specials/special_s.rs b/fighters/miiswordsman/src/acmd/specials/special_s.rs new file mode 100644 index 0000000000..a5d5d6f641 --- /dev/null +++ b/fighters/miiswordsman/src/acmd/specials/special_s.rs @@ -0,0 +1,461 @@ +use super::*; + +// ================================================================================================== +// ======================================== AIRBORNE ASSAULT ======================================== +// ================================================================================================== + +unsafe extern "C" fn game_specials1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); + } + +} + +unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.4); + } + +} + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } + +} + +unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + + } + +} +/* +#[acmd_script( agent = "miiswordsman", script = "game_specials1hit" , category = ACMD_GAME , low_priority)] +unsafe fn miiswordsman_special_s1_hit_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 2.0, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 6.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("haver"), 12.5, 44, 75, 0, 56, 4.5, 0.0, 11.5, 0.0, None, None, None, 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_SWORD); + } + frame(lua_state, 5.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + +} +*/ + +// ============================================================================================= +// ===================================== KINETIC SLASH ========================================= +// ============================================================================================= + +unsafe extern "C" fn game_specials2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + + frame(lua_state, 10.0); + if is_excute(agent) { + MotionModule::set_rate(agent.module_accessor, 0.5); + } +} + +unsafe extern "C" fn game_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + // Vanilla Effects + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); + + //EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_blastwind_stab"), Hash40::new("top"), -0.0, 5, 12, 0, 0, 0, 1.1, true); + //EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_blastwind_stab"), -1); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + + + // Sword Trail + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + } + frame(lua_state, 34.0); + if is_excute(agent) { + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); + } + frame(lua_state, 35.0); + if is_excute(agent) { + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 37.0); + if is_excute(agent) { + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + } +} + +unsafe extern "C" fn game_specialairs2dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); + if is_excute(agent) { + MotionModule::set_rate(agent.module_accessor, 0.5); + } +} + +unsafe extern "C" fn game_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 5.0, 0.0, 5.5, 16.0, Some(0.0), Some(5.5), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 55, 88, 0, 55, 3.5, 0.0, 5.5, 15.0, Some(0.0), Some(5.5), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_ATTACK_END); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 7.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } +} + +unsafe extern "C" fn effect_specialairs2attack(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + // Vanilla Effects + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 1, 0.72, 1.1); + + + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 11.4, 0, 0, 0, 0, 2, true); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_smash_flash_s"), -1); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, 7, 0, 0, 0, 1, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -0.0, 5, -3, 0, 0, 0, 0.8, 0, 0, 10, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.511, 0.264, 1.3); + LAST_EFFECT_SET_RATE(agent, 0.7); + + + // Sword Trail + //AFTER_IMAGE4_ON_WORK_arg29(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_TEX_SWORD_ADD, 5, Hash40::new("haver"), 0, 0.2, 0, Hash40::new("haver"), -0.0, 10.8, 0, true, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), -1, 7, 7.5, 0.0, -180.0, 25.3, 1.1, true); + LAST_EFFECT_SET_RATE(agent, 2.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + //EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0.0, 10, 6, -10.6, -159.5, 55.3, 1.1, true); + //LAST_EFFECT_SET_RATE(agent, 1.4); + } + frame(lua_state, 4.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 9.25, 0, 0, 0, 180, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 6.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 5); + } + frame(lua_state, 34.0); + if is_excute(agent) { + //EFFECT_FOLLOW_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1, true); + //LAST_EFFECT_SET_COLOR(agent, 2.5, 2.5, 2.5); + } + frame(lua_state, 35.0); + if is_excute(agent) { + //EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 6, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 37.0); + if is_excute(agent) { + //EFFECT_OFF_KIND_WORK(agent, *FIGHTER_MIISWORDSMAN_INSTANCE_WORK_ID_INT_EFT_ID_SWORD_FLARE, false, false); + } +} + +// ============================================================================================= +// ======================================== CHAKRAM ============================================ +// ============================================================================================= + +unsafe extern "C" fn game_specials3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specials3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specials3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +unsafe extern "C" fn game_specialairs3_1lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let end_frame = MotionModule::end_frame(boma); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.27); + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_REQUEST_GENERATE); + } + frame(lua_state, 10.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_CHECK_MOTION_HI_LW); + } + frame(lua_state, 17.0); + if is_excute(agent) { + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW) { + WorkModule::on_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + else { + WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK); + } + } + frame(lua_state, 18.0); + if is_excute(agent) { + if WorkModule::is_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_CHAKRAM_FLAG_FLICK){ + FT_MOTION_RATE(agent, 1.25); + } + else{ + FT_MOTION_RATE(agent, 1.1); + } + ArticleModule::shoot_exist(boma, *FIGHTER_MIISWORDSMAN_GENERATE_ARTICLE_CHAKRAM, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1start", game_specials1start); + agent.acmd("game_specialairs1start", game_specialairs1start); + agent.acmd("game_specials1", game_specials1); + agent.acmd("game_specialairs1", game_specialairs1); + + agent.acmd("game_specials2dash", game_specials2dash); + agent.acmd("game_specials2attack", game_specials2attack); + agent.acmd("effect_specials2attack", effect_specials2attack); + agent.acmd("game_specialairs2dash", game_specialairs2dash); + agent.acmd("game_specialairs2attack", game_specialairs2attack); + agent.acmd("effect_specialairs2attack", effect_specialairs2attack); + + agent.acmd("game_specials3_1", game_specials3_1); + agent.acmd("game_specials3_1hi", game_specials3_1hi); + agent.acmd("game_specials3_1lw", game_specials3_1lw); + agent.acmd("game_specialairs3_1", game_specialairs3_1); + agent.acmd("game_specialairs3_1hi", game_specialairs3_1hi); + agent.acmd("game_specialairs3_1lw", game_specialairs3_1lw); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/mod.rs b/fighters/miiswordsman/src/chakram/mod.rs index 6869cd648b..60f1dd4418 100644 --- a/fighters/miiswordsman/src/chakram/mod.rs +++ b/fighters/miiswordsman/src/chakram/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod status; pub fn install() { let agent = &mut Agent::new("miiswordsman_chakram"); acmd::install(agent); + status::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/status.rs b/fighters/miiswordsman/src/chakram/status.rs new file mode 100644 index 0000000000..74a46bcff1 --- /dev/null +++ b/fighters/miiswordsman/src/chakram/status.rs @@ -0,0 +1,17 @@ +use super::*; +use globals::*; +// status script import + +// WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP + +unsafe extern "C" fn pre_chakram_hop(weapon: &mut L2CWeaponCommon) -> L2CValue { + let lua_state = weapon.lua_state_agent; + let boma = sv_system::battle_object_module_accessor(lua_state); + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); + smashline::original_status(Pre, weapon, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP)(weapon) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/final_hold.rs b/fighters/miiswordsman/src/status/final_hold.rs new file mode 100644 index 0000000000..832be7c760 --- /dev/null +++ b/fighters/miiswordsman/src/status/final_hold.rs @@ -0,0 +1,12 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD + +unsafe extern "C" fn pre_final_hold(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::WAVE_SPECIAL_N); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/mod.rs b/fighters/miiswordsman/src/status/mod.rs index cac8cad7eb..dd096f977d 100644 --- a/fighters/miiswordsman/src/status/mod.rs +++ b/fighters/miiswordsman/src/status/mod.rs @@ -2,901 +2,20 @@ use super::*; use globals::*; // status script import -// yeah these need to get separated into their own individual files later loool -// delete these comments when thats done -// - love, mokl - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD +mod special_s1; +mod special_s2; -unsafe extern "C" fn pre_final_hold(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::WAVE_SPECIAL_N); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD)(fighter) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK - -unsafe extern "C" fn pre_special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - let force_air = Vector2f {x: 0.0, y: 10.0}; - - PostureModule::add_pos_2d(fighter.module_accessor, &force_air); - - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK)(fighter) - -} - -/* -#[status_script(agent = "miiswordsman", status = FIGHTER_STATUS_KIND_SPECIAL_S, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -unsafe fn miiswordsman_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { - PostureModule::set_stick_lr(fighter.module_accessor, 0.0); - PostureModule::update_rot_y_lr(fighter.module_accessor); - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_start"), 0.0, 1.0, false, 0.0, false, false); - } - else{ - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_start"), 0.0, 1.0, false, 0.0, false, false); - } - //l2c_agent.clear_lua_stack(); - //l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683 as u64)) - lua_args!(fighter, 0x20cbc92683, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - l2c_agent.clear_lua_stack(); - lua_args!(fighter, 0x3a40337e2c, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); - app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); - fighter.pop_lua_stack(1); - - fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1_main as *const () as _)) - -} -*/ - -unsafe extern "C" fn miiswordsman_specials1_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if MotionModule::is_end(fighter.module_accessor) == true { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK.into(), false.into()); - return L2CValue::I32(1); - } - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - } - else if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - - } - - L2CValue::I32(0) -} - -unsafe extern "C" fn special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - let id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; - VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); // Removes on side special attack - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); - } - // Commented out but this was the original script - // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - // fighter.set_situation(SITUATION_KIND_AIR.into()); - // } - // else { - // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - // fighter.set_situation(SITUATION_KIND_GROUND.into()); - // } - // But HERE's what we (probably) want - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.set_situation(SITUATION_KIND_AIR.into()); - // Now for whatever reason they have these change motions in the same conditions as the previous set, so I'm keeping it separate anyway. - // You can *probably* get away with not impling the ground version but eh safety first - //if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - //} - //else { - // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - //} - - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1"), 0.0, 1.0, false, 0.0, false, false); - } - - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - //let x_vel = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("jump_neutral_x")); - let x_vel_flip = ControlModule::get_stick_x(fighter.module_accessor) * 1.65 + (0.1 * PostureModule::lr(fighter.module_accessor)); - let y_vel_flip = 3.5; - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, x_vel_flip, y_vel_flip); - app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); - - /* - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_s1") { - println!("ground side special"); - } - */ - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, -0.1); - app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - - // But HERE's what we (probably) want - fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1attack_mainloop as *const () as _)) -} - -unsafe extern "C" fn miiswordsman_specials1attack_mainloop(fighter: &mut L2CFighterCommon) -> L2CValue { - // custom [ - // drift at apex of flip - if MotionModule::frame(fighter.module_accessor) > 7.0 && MotionModule::frame(fighter.module_accessor) < 32.0 { - let stick_x = fighter.global_table[STICK_X].get_f32(); - if stick_x != 0.0 { - let drift_speed = 0.15 * stick_x.signum(); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, drift_speed, 0.0); - app::sv_kinetic_energy::add_speed(fighter.lua_state_agent); - // this is here so adding speed doesn't surpass x speed cap we set earlier (by setting a slightly lower speed cap) - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, (1.75 - drift_speed.abs()), -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - } - else { - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); - app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); - } - } - if MotionModule::frame(fighter.module_accessor) >= 15.0 { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL); - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) - || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) - || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3 - | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 - | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4) { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); - return 1.into() - } - } - // ] - - // This is just (as straight of) an impl that I can get of the main loop, what the hell were the smash devs - // Can only use side special once per aerial time - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if MotionModule::is_end(fighter.module_accessor) == false { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); - return L2CValue::I32(1); - } - return L2CValue::I32(0); - } - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); - } - L2CValue::I32(0) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END - -pub unsafe extern "C" fn pre_special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, - *FS_SUCCEEDS_KEEP_SOUND - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_S | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, - 0 - ); - 0.into() -} - -unsafe extern "C" fn special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_end"), 0.0, 1.0, false, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_end"), 0.0, 1.0, false, 0.0, false, false); - } - fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_s1_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if !MotionModule::is_end(fighter.module_accessor) { - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_HENSOKU_SLASH_WORK_FLAG_END_LANDING) { - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s1_end"), -1.0, 1.0, 0.0, false, false); - let s1_control_limit_mul_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("s1_control_limit_mul_x")); - KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, 0.0, 0.0, 0.0, 0.0); - smash::app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, s1_control_limit_mul_x); - smash::app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); - return 1.into(); - } - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s1_end"), -1.0, 1.0, 0.0, false, false); - - } - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 1.into(); - } - } - } - return 0.into() - } - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } - else { - if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { - if fighter.sub_air_check_fall_common().get_bool() { - return 1.into() - } - } - } - } - return 1.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH - -unsafe extern "C" fn special_s2_dash(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); - WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - special_s2_dash_mot_change(fighter); - // if !StopModule::is_stop(fighter.module_accessor) { - // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - // } - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_s2_dash_dec_int as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main as *const () as _)) -} - -unsafe extern "C" fn special_s2_dash_mot_change(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES.into()); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_dash"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_dash"), -1.0, 1.0, 0.0, false, false); - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_NONE.into()); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_dash"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_dash"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn special_s2_dash_dec_int(fighter: &mut L2CFighterCommon, unk: L2CValue) -> L2CValue { - if unk.get_bool() { - WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - } - return 0.into() -} - -unsafe extern "C" fn special_s2_dash_unk(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut val = 0; - if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let is_status_cliff = GroundModule::is_status_cliff(fighter.module_accessor); - if is_status_cliff { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); - val = 1; - } - } - } - return val.into() -} - -unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut sub_check = fighter.sub_transition_group_check_air_cliff().get_bool(); - if sub_check { - return 0.into(); - } - sub_check = fighter.sub_ground_check_stop_wall().get_bool(); - if sub_check { - return 0.into(); - } - // custom [ - // Jump and Attack cancels - let pad_flag = ControlModule::get_pad_flag(fighter.module_accessor); - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND && MotionModule::frame(fighter.module_accessor) > 7.0 { - if fighter.check_jump_cancel(true, false) { - return 1.into() - } - } - if compare_mask(pad_flag, *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) || compare_mask(pad_flag, *FIGHTER_PAD_FLAG_ATTACK_TRIGGER) { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK.into(),true.into()); - return 1.into() - } - // Wall Jump - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP) { - let touch_right = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); - let touch_left = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_LEFT_SIDE as u32); - if touch_left || touch_right { - if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_TURN_DASH | *FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP); - fighter.change_status(FIGHTER_STATUS_KIND_WALL_JUMP.into(),true.into()); - return 1.into() - } - } - } - } - // ] - let slash_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - if slash_frame <= 0 { - fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); - } - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_dash_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_dash_mot_change(fighter); - } - } - } - else { - special_s2_dash_mot_change(fighter); - } - special_s2_dash_unk(fighter); - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK - -unsafe extern "C" fn special_s2_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); - WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); - special_s2_attack_mot_change(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main as *const () as _)) -} - -unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_attack"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_attack"), -1.0, 1.0, 0.0, false, false); - } - } - else { - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_attack"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_attack"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 0.into(); - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - special_s2_attack_main_helper(fighter); - } - else { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() { - return 0.into(); - } - } - } - return 0.into() -} - -unsafe extern "C" fn special_s2_attack_main_helper(fighter: &mut L2CFighterCommon) { - if !MotionModule::is_end(fighter.module_accessor) { - if !StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_attack_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_attack_mot_change(fighter); - } - } - } - special_s2_dash_unk(fighter); - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_AIR { - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - special_s2_attack_mot_change(fighter); - } - } - else { - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - special_s2_attack_mot_change(fighter); - } - } - } - special_s2_dash_unk(fighter); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), true.into()); - } - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); - } - } -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END - -unsafe extern "C" fn pre_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END)(fighter) -} - -unsafe extern "C" fn special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - special_s2_end_helper(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_s2_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 0.into() - } - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if !MotionModule::is_end(fighter.module_accessor) { - if StatusModule::is_changing(fighter.module_accessor) { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - // OG [ special_s2_end_helper(fighter); ] - // custom [ - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(true) - ); - // ] - sub_special_s2_end(fighter); - return 0.into() - } - } - else { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - special_s2_end_helper(fighter); - sub_special_s2_end(fighter); - return 0.into() - } - } - } - else { - // custom [ - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_AIR { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); - } - } - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(true) - ); - sub_special_s2_end(fighter); - return 0.into() - } - } - // ] - special_s2_end_helper(fighter); - } - sub_special_s2_end(fighter); - } - else { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(true) - ); - } - } - } - else { - if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { - if fighter.sub_air_check_fall_common().get_bool() { - return 0.into() - } - } - } - return 0.into() -} +mod special_hi; +mod special_hi2; +mod special_hi3; -unsafe extern "C" fn special_s2_end_helper(fighter: &mut L2CFighterCommon) { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_end"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_end"), -1.0, 1.0, 0.0, false, false); - } - } - else { - // OG [ GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); ] - // custom [ - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL) { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - } - else { - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - } - // ] - fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_NONE)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_end"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_end"), -1.0, 1.0, 0.0, false, false); - } - } -} - -unsafe extern "C" fn sub_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[STATUS_KIND_INTERRUPT] == FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if GroundModule::is_status_cliff(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END), - L2CValue::Bool(true) - ); - return 1.into() - } - } - } - return 0.into() -} - -// WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP - -unsafe extern "C" fn pre_chakram_hop(weapon: &mut L2CWeaponCommon) -> L2CValue { - let lua_state = weapon.lua_state_agent; - let boma = sv_system::battle_object_module_accessor(lua_state); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::off_flag(owner_module_accessor.object(), vars::miiswordsman::instance::CHAKRAM_STICK_ATTACK); - smashline::original_status(Pre, weapon, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP)(weapon) -} - -// FIGHTER_STATUS_KIND_SPECIAL_HI - -unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, - *FIGHTER_STATUS_ATTR_START_TURN as u32, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH - -unsafe extern "C" fn pre_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH)(fighter) -} - -// not running for some reason - -unsafe extern "C" fn exec_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - //println!("SSD Hit"); - } - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END -// not running for some reason - -unsafe extern "C" fn exec_special_hi2_rush_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) && !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - //println!("SSD Success"); - if MotionModule::frame(fighter.module_accessor) >= 30.0 { - //println!("SSD Fall Act"); - VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - return 0.into() -} +mod special_lw; +mod special_lw1; +mod special_lw3; -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD +mod final_hold; -pub unsafe extern "C" fn exec_special_hi3_hold(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let mut motion_value = 0.28; - - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - if stick_x != 0.0 { - KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); - } - } - return 0.into() -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END - -pub unsafe extern "C" fn pre_special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_GROUND as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - mask_flag, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - 0.into() -} - -unsafe extern "C" fn special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_Main as *const () as _)) -} - -unsafe extern "C" fn special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let frame = MotionModule::frame(fighter.module_accessor); - let mut motion_value = 0.7; - - if !fighter.sub_transition_group_check_air_cliff().get_bool() { - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if miisword_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi3"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi3"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - return 0.into() - } - } - if miisword_situation_helper(fighter).get_bool() { - if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { - KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { - MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi3"), -1.0, 1.0, 0.0, false, false); - } - else { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi3"), 0.0, 1.0, false, 0.0, false, false); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); - } - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.shift(L2CValue::Ptr(sub_special_hi3_end_Main as *const () as _)); - return 0.into() - } - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(false) - ); - return 1.into() - } - } - } - } - else { - return 1.into() - } - return 0.into() -} - -unsafe extern "C" fn sub_special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(fighter.module_accessor); - - GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { - if !MotionModule::is_end(fighter.module_accessor) { - if fighter.sub_transition_group_check_air_cliff().get_bool() { - return 1.into() - } - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - else { - if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), - L2CValue::Bool(false) - ); - return 1.into() - } - if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - fighter.change_status( - L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), - L2CValue::Bool(true) - ); - return 1.into() - } - } - return 0.into() -} - -unsafe extern "C" fn miisword_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn miisword_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { return 1.into() } @@ -911,402 +30,17 @@ unsafe extern "C" fn miisword_situation_helper(fighter: &mut L2CFighterCommon) - return 0.into() } -//FIGHTER_STATUS_KIND_SPECIAL_LW - -unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { - let lua_state = fighter.lua_state_agent; - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - main_setup(fighter); - let mut l2c_agent = L2CAgent::new(lua_state); - l2c_agent.clear_lua_stack(); - l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(1)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); - sv_battle_object::notify_event_msc_cmd(lua_state); - l2c_agent.pop_lua_stack(1); - l2c_agent.clear_lua_stack(); - l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x3a40337e2c)); - l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); - sv_battle_object::notify_event_msc_cmd(lua_state); - l2c_agent.pop_lua_stack(1); - fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) -} - -unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1") { - if ControlModule::check_button_on_trriger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { - //println!("Kinesis activation"); - VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw3") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw3") { - if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { - //println!("Swordfighter gon' give it to ya"); - fighter.change_status( - L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END), - L2CValue::Bool(false) - ); - return 1.into() - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND - || fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { - main_setup(fighter); - } - } - } - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLY_POWERUP_MOTION_RATE) == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) { - MotionModule::set_rate(fighter.module_accessor,1.0); - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); - } - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) == false { - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_motion_rate")); - MotionModule::set_rate(fighter.module_accessor,rate); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); - } - } - if MotionModule::is_end(fighter.module_accessor) { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - } - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - } - counter_setup(fighter); - num = 0; - } - } - if num == -1 { num = 1; } - } - L2CValue::I32(num) -} - -unsafe extern "C" fn main_setup(fighter: &mut L2CFighterCommon) { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw1"),0.0,1.0,false,0.0,false,false); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_air_lw1"),-1.0,1.0,0.0); - } - } - else { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw1"),0.0,1.0,false,0.0,false,false); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_lw1"),-1.0,1.0,0.0); - } - } -} - -unsafe extern "C" fn counter_setup(fighter: &mut L2CFighterCommon) { - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { - let attack_power = WorkModule::get_float(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_FLOAT_ATTACK_POWER); - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT { - return; - } - if attack_power > 0.0 { - let part = (AttackModule::part_size(fighter.module_accessor) as i32) - 1; - if -1 < part { - let mut box_num = -1; - while box_num <= part { - if AttackModule::is_attack(fighter.module_accessor,box_num + 1, false) { - AttackModule::set_power(fighter.module_accessor,box_num + 1, attack_power, false); - } - box_num += 1; - } - } - } - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK) == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { - return; - } - ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NONE),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); - WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); - } - else { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { - return; - } - ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NORMAL),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); - WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); - } - } -} - -//FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT - -unsafe extern "C" fn miiswordsman_speciallw1hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { - if StatusModule::situation_kind(fighter.module_accessor) == WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV) { - return L2CValue::I32(0) - } - let speed = KineticModule::get_sum_speed3f(fighter.module_accessor,*KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_AIR { - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_GROUND,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - else { - if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1_hit") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1_hit") { - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); - app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); - app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); - app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); - app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_MOTION); - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - else{ - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); - //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - //let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); - //app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); - //app::sv_kinetic_energy::enable(fighter.lua_state_agent); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); - //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - //let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); - //fighter.clear_lua_stack(); - //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); - //app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); - let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); - //fighter.clear_lua_stack(); - //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); - //app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); - //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - //app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - fighter.clear_lua_stack(); - lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_MOTION); - app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION); - WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); - } - } - } - return L2CValue::I32(0) -} - -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END - -unsafe extern "C" fn special_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) != *SITUATION_KIND_GROUND { - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_GROUND { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end_air"),0.0,1.0,false,0.0,false,false); - if StopModule::is_stop(fighter.module_accessor) == false { - some1(fighter,false.into()); - } - fighter.global_table[0x15].assign(&L2CValue::Ptr(some2 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(some3 as *const () as _)); - } - } - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - some4(fighter); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_air_to_ground_rate")); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,rate,false,0.0,false,false); - fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)); - } - } - if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end_air"),0.0,1.0,false,0.0,false,false); - WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); - fighter.sub_shift_status_main(L2CValue::Ptr(some6 as *const () as _)); - } - } - L2CValue::I32(0) - } - else { - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_ground_to_ground_rate")); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end"),0.0,rate,false,0.0,false,false); - fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)) - } -} - -unsafe extern "C" fn some1(fighter: &mut L2CFighterCommon, unk: L2CValue) { - if unk.get_bool() == false { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_FALL_ONOFF) == false { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_AIR); - } - else { - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_FALL); - } - } -} - -unsafe extern "C" fn some2(fighter: &mut L2CFighterCommon, unk2: L2CValue) { - some1(fighter,unk2); -} - -unsafe extern "C" fn some3(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if CancelModule::is_enable_cancel(fighter.module_accessor) == false { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - num = 0; - } - else { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - num = 0; - } - } - if num == -1 { num = 1; } - } - L2CValue::I32(num) -} - -unsafe extern "C" fn some4(fighter: &mut L2CFighterCommon) { - fighter.set_situation(SITUATION_KIND_GROUND.into()); - GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); -} - -unsafe extern "C" fn some5(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - num = 0; - } - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - num = 0; - } - } - if num == -1 { num = 1; } - L2CValue::I32(num) -} - -unsafe extern "C" fn some6(fighter: &mut L2CFighterCommon) -> L2CValue { - let mut num = -1; - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { - if fighter.sub_air_check_fall_common().get_bool() == false { - if WorkModule::is_enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL) == false { - if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { - if MotionModule::is_end(fighter.module_accessor) == false { - num = 0; - } - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - } - } - else { - if MotionModule::is_end(fighter.module_accessor) { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); - num = 0; - } - if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { - if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_LANDING_FALL_SPECIAL) { - let landing_frame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_landing_frame")); - WorkModule::set_float(fighter.module_accessor,landing_frame as f32,*FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(),false.into()); - } - some4(fighter); - KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); - MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,1.0,false,0.0,false,false); - WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); - WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); - } - } - } - if num == -1 { num = 1; } - } - } - L2CValue::I32(num) -} +pub fn install(agent: &mut Agent) { + special_s1::install(agent); + special_s2::install(agent); -// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND + special_hi::install(agent); + special_hi2::install(agent); + special_hi3::install(agent); -pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_frame"), 0); - WorkModule::set_float(fighter.module_accessor, landing_frame, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); - 0.into() -} + special_lw::install(agent); + special_lw1::install(agent); + special_lw3::install(agent); -pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end); - agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); - agent.status(Pre, *WEAPON_MIISWORDSMAN_CHAKRAM_STATUS_KIND_HOP, pre_chakram_hop); + final_hold::install(agent); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi.rs b/fighters/miiswordsman/src/status/special_hi.rs new file mode 100644 index 0000000000..7e60938ce0 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi.rs @@ -0,0 +1,35 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI + +unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64, + *FIGHTER_STATUS_ATTR_START_TURN as u32, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi2.rs b/fighters/miiswordsman/src/status/special_hi2.rs new file mode 100644 index 0000000000..46deecb937 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi2.rs @@ -0,0 +1,54 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH + +unsafe extern "C" fn pre_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH)(fighter) +} + +// not running for some reason + +unsafe extern "C" fn exec_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { + if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + //println!("SSD Hit"); + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END +// not running for some reason + +unsafe extern "C" fn exec_special_hi2_rush_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) && !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + //println!("SSD Success"); + if MotionModule::frame(fighter.module_accessor) >= 30.0 { + //println!("SSD Fall Act"); + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); + VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND + +pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let landing_frame = WorkModule::get_param_float(fighter.module_accessor, hash40("landing_frame"), 0); + WorkModule::set_float(fighter.module_accessor, landing_frame, *FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end); + + agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi3.rs b/fighters/miiswordsman/src/status/special_hi3.rs new file mode 100644 index 0000000000..6e9bbd8c6a --- /dev/null +++ b/fighters/miiswordsman/src/status/special_hi3.rs @@ -0,0 +1,172 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD + +pub unsafe extern "C" fn exec_special_hi3_hold(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let mut motion_value = 0.28; + + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if stick_x != 0.0 { + KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &Vector3f { x: (motion_value * stick_x.signum()), y: 0.0, z: 0.0}); + } + } + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END + +pub unsafe extern "C" fn pre_special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_MIISWORDSMAN_SPECIAL_HI3_END_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + mask_flag, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + 0.into() +} + +unsafe extern "C" fn special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_Main as *const () as _)) +} + +unsafe extern "C" fn special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let frame = MotionModule::frame(fighter.module_accessor); + let mut motion_value = 0.7; + + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if miisword_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_hi3"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_hi3"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + return 0.into() + } + } + if miisword_situation_helper(fighter).get_bool() { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST) { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_hi3"), -1.0, 1.0, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi3"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_RSLASH_END_FLAG_FIRST); + } + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); + fighter.shift(L2CValue::Ptr(sub_special_hi3_end_Main as *const () as _)); + return 0.into() + } + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(false) + ); + return 1.into() + } + } + } + } + else { + return 1.into() + } + return 0.into() +} + +unsafe extern "C" fn sub_special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + + GroundModule::set_cliff_check(fighter.module_accessor, app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES)); + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL) { + if !MotionModule::is_end(fighter.module_accessor) { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 1.into() + } + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + else { + if WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT) && MotionModule::is_end(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(false) + ); + return 1.into() + } + if miisword_situation_helper(fighter).get_bool() && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL), + L2CValue::Bool(true) + ); + return 1.into() + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw.rs b/fighters/miiswordsman/src/status/special_lw.rs new file mode 100644 index 0000000000..f1286c81ee --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw.rs @@ -0,0 +1,153 @@ +use super::*; + +//FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { + let lua_state = fighter.lua_state_agent; + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + main_setup(fighter); + let mut l2c_agent = L2CAgent::new(lua_state); + l2c_agent.clear_lua_stack(); + l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(1)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); + sv_battle_object::notify_event_msc_cmd(lua_state); + l2c_agent.pop_lua_stack(1); + l2c_agent.clear_lua_stack(); + l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x3a40337e2c)); + l2c_agent.push_lua_stack(&mut L2CValue::I32(*FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_10 - 1)); + sv_battle_object::notify_event_msc_cmd(lua_state); + l2c_agent.pop_lua_stack(1); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1") { + if ControlModule::check_button_on_trriger(fighter.module_accessor, *CONTROL_PAD_BUTTON_ATTACK) { + //println!("Kinesis activation"); + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::SPECIAL_LW1_ATTACK_TRIGGER); + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw3") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw3") { + if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { + //println!("Swordfighter gon' give it to ya"); + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END), + L2CValue::Bool(false) + ); + return 1.into() + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND + || fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if fighter.global_table[0x17].get_i32() != *SITUATION_KIND_GROUND { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { + main_setup(fighter); + } + } + } + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLY_POWERUP_MOTION_RATE) == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) { + MotionModule::set_rate(fighter.module_accessor,1.0); + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); + } + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE) == false { + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_motion_rate")); + MotionModule::set_rate(fighter.module_accessor,rate); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_APPLIED_POWERUP_MOTION_RATE); + } + } + if MotionModule::is_end(fighter.module_accessor) { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + } + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + } + counter_setup(fighter); + num = 0; + } + } + if num == -1 { num = 1; } + } + L2CValue::I32(num) +} + +unsafe extern "C" fn main_setup(fighter: &mut L2CFighterCommon) { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw1"),0.0,1.0,false,0.0,false,false); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_air_lw1"),-1.0,1.0,0.0); + } + } + else { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT) == false { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw1"),0.0,1.0,false,0.0,false,false); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor,Hash40::new("special_lw1"),-1.0,1.0,0.0); + } + } +} + +unsafe extern "C" fn counter_setup(fighter: &mut L2CFighterCommon) { + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { + let attack_power = WorkModule::get_float(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_FLOAT_ATTACK_POWER); + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT { + return; + } + if attack_power > 0.0 { + let part = (AttackModule::part_size(fighter.module_accessor) as i32) - 1; + if -1 < part { + let mut box_num = -1; + while box_num <= part { + if AttackModule::is_attack(fighter.module_accessor,box_num + 1, false) { + AttackModule::set_power(fighter.module_accessor,box_num + 1, attack_power, false); + } + box_num += 1; + } + } + } + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK) == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { + return; + } + ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NONE),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); + WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); + } + else { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD) == false { + return; + } + ShieldModule::set_status(fighter.module_accessor,0,app::ShieldStatus(*SHIELD_STATUS_NORMAL),*FIGHTER_MIISWORDSMAN_SHIELD_GROUP_KIND_COUNTER_GUARD); + WorkModule::on_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_SHIELD_CHK); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw1.rs b/fighters/miiswordsman/src/status/special_lw1.rs new file mode 100644 index 0000000000..29d7d5cb75 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw1.rs @@ -0,0 +1,81 @@ +use super::*; + +//FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT + +unsafe extern "C" fn miiswordsman_speciallw1hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { + if StatusModule::situation_kind(fighter.module_accessor) == WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV) { + return L2CValue::I32(0) + } + let speed = KineticModule::get_sum_speed3f(fighter.module_accessor,*KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + if StatusModule::situation_kind(fighter.module_accessor) != *SITUATION_KIND_AIR { + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_GROUND,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + else { + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_lw1_hit") || MotionModule::motion_kind(fighter.module_accessor) == hash40("special_air_lw1_hit") { + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); + app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_STOP); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); + app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); + app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_MOTION); + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + else{ + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, ENERGY_STOP_RESET_TYPE_AIR,speed.x,0.0,0.0,0.0,0.0); + //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + //let brake_x = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_start_air_acl_x")); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP,brake_x,0.0); + //app::sv_kinetic_energy::set_brake(fighter.lua_state_agent); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); + //app::sv_kinetic_energy::enable(fighter.lua_state_agent); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY,0.0,speed.y,0.0,0.0,0.0); + //app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + //let accel_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_acl_y")); + //fighter.clear_lua_stack(); + //lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY,accel_y); + //app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + let stable_y = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw1_attack_max_y")); + //fighter.clear_lua_stack(); + //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY,stable_y); + //app::sv_kinetic_energy::set_stable_speed(fighter.lua_state_agent); + //lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + //app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::unable_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + fighter.clear_lua_stack(); + lua_args!(fighter,FIGHTER_KINETIC_ENERGY_ID_MOTION); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION); + WorkModule::set_int(fighter.module_accessor,*SITUATION_KIND_AIR,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV); + } + } + } + return L2CValue::I32(0) +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw3.rs b/fighters/miiswordsman/src/status/special_lw3.rs new file mode 100644 index 0000000000..392638acb9 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_lw3.rs @@ -0,0 +1,149 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END + +unsafe extern "C" fn special_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) != *SITUATION_KIND_GROUND { + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_GROUND { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end_air"),0.0,1.0,false,0.0,false,false); + if StopModule::is_stop(fighter.module_accessor) == false { + some1(fighter,false.into()); + } + fighter.global_table[0x15].assign(&L2CValue::Ptr(some2 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(some3 as *const () as _)); + } + } + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + some4(fighter); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_air_to_ground_rate")); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,rate,false,0.0,false,false); + fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)); + } + } + if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_AIR { + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end_air"),0.0,1.0,false,0.0,false,false); + WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); + fighter.sub_shift_status_main(L2CValue::Ptr(some6 as *const () as _)); + } + } + L2CValue::I32(0) + } + else { + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + let rate = WorkModule::get_param_float(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_end_ground_to_ground_rate")); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_lw3_end"),0.0,rate,false,0.0,false,false); + fighter.sub_shift_status_main(L2CValue::Ptr(some5 as *const () as _)) + } +} + +unsafe extern "C" fn some1(fighter: &mut L2CFighterCommon, unk: L2CValue) { + if unk.get_bool() == false { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_FALL_ONOFF) == false { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_MOTION_AIR); + } + else { + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_FALL); + } + } +} + +unsafe extern "C" fn some2(fighter: &mut L2CFighterCommon, unk2: L2CValue) { + some1(fighter,unk2); +} + +unsafe extern "C" fn some3(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if CancelModule::is_enable_cancel(fighter.module_accessor) == false { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + num = 0; + } + else { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + num = 0; + } + } + if num == -1 { num = 1; } + } + L2CValue::I32(num) +} + +unsafe extern "C" fn some4(fighter: &mut L2CFighterCommon) { + fighter.set_situation(SITUATION_KIND_GROUND.into()); + GroundModule::correct(fighter.module_accessor,GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); +} + +unsafe extern "C" fn some5(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + num = 0; + } + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + num = 0; + } + } + if num == -1 { num = 1; } + L2CValue::I32(num) +} + +unsafe extern "C" fn some6(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut num = -1; + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() == false { + if WorkModule::is_enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL) == false { + if fighter.global_table[0x16].get_i32() != *SITUATION_KIND_AIR { + if MotionModule::is_end(fighter.module_accessor) == false { + num = 0; + } + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(),false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + } + } + else { + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(),false.into()); + num = 0; + } + if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_GROUND { + if WorkModule::is_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_FLAG_JET_STUB_LANDING_FALL_SPECIAL) { + let landing_frame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_special_lw"),hash40("lw3_landing_frame")); + WorkModule::set_float(fighter.module_accessor,landing_frame as f32,*FIGHTER_INSTANCE_WORK_ID_FLOAT_LANDING_FRAME); + fighter.change_status(FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL.into(),false.into()); + } + some4(fighter); + KineticModule::change_kinetic(fighter.module_accessor,*FIGHTER_KINETIC_TYPE_GROUND_STOP); + MotionModule::change_motion(fighter.module_accessor,Hash40::new("special_air_lw3_end"),0.0,1.0,false,0.0,false,false); + WorkModule::enable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_INHERIT_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_FALL); + WorkModule::unable_transition_term(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_JET_STUB_AA_TRANSITION_TERM_ID_LANDING_WAIT); + } + } + } + if num == -1 { num = 1; } + } + } + L2CValue::I32(num) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s1.rs b/fighters/miiswordsman/src/status/special_s1.rs new file mode 100644 index 0000000000..5396e632e2 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_s1.rs @@ -0,0 +1,298 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK + +unsafe extern "C" fn pre_special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + let force_air = Vector2f {x: 0.0, y: 10.0}; + + PostureModule::add_pos_2d(fighter.module_accessor, &force_air); + + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK)(fighter) + +} + +/* +#[status_script(agent = "miiswordsman", status = FIGHTER_STATUS_KIND_SPECIAL_S, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +unsafe fn miiswordsman_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue { + PostureModule::set_stick_lr(fighter.module_accessor, 0.0); + PostureModule::update_rot_y_lr(fighter.module_accessor); + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_start"), 0.0, 1.0, false, 0.0, false, false); + } + else{ + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_start"), 0.0, 1.0, false, 0.0, false, false); + } + //l2c_agent.clear_lua_stack(); + //l2c_agent.push_lua_stack(&mut L2CValue::new_int(0x20cbc92683 as u64)) + lua_args!(fighter, 0x20cbc92683, FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(1); + l2c_agent.clear_lua_stack(); + lua_args!(fighter, 0x3a40337e2c, FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 - 1); + app::sv_battle_object::notify_event_msc_cmd(fighter.lua_state_agent); + fighter.pop_lua_stack(1); + + fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1_main as *const () as _)) + +} +*/ + +unsafe extern "C" fn miiswordsman_specials1_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if MotionModule::is_end(fighter.module_accessor) == true { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK.into(), false.into()); + return L2CValue::I32(1); + } + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + } + else if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + + } + + L2CValue::I32(0) +} + +unsafe extern "C" fn special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + let id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; + VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); // Removes on side special attack + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL); + } + // Commented out but this was the original script + // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + // fighter.set_situation(SITUATION_KIND_AIR.into()); + // } + // else { + // GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + // fighter.set_situation(SITUATION_KIND_GROUND.into()); + // } + // But HERE's what we (probably) want + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.set_situation(SITUATION_KIND_AIR.into()); + // Now for whatever reason they have these change motions in the same conditions as the previous set, so I'm keeping it separate anyway. + // You can *probably* get away with not impling the ground version but eh safety first + //if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + //} + //else { + // MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + //} + + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1"), 0.0, 1.0, false, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1"), 0.0, 1.0, false, 0.0, false, false); + } + + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + //let x_vel = WorkModule::get_param_float(fighter.module_accessor, hash40("common"), hash40("jump_neutral_x")); + let x_vel_flip = ControlModule::get_stick_x(fighter.module_accessor) * 1.65 + (0.1 * PostureModule::lr(fighter.module_accessor)); + let y_vel_flip = 3.5; + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, x_vel_flip, y_vel_flip); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + + /* + if MotionModule::motion_kind(fighter.module_accessor) == hash40("special_s1") { + println!("ground side special"); + } + */ + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, -0.1); + app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); + + // But HERE's what we (probably) want + fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1attack_mainloop as *const () as _)) +} + +unsafe extern "C" fn miiswordsman_specials1attack_mainloop(fighter: &mut L2CFighterCommon) -> L2CValue { + // custom [ + // drift at apex of flip + if MotionModule::frame(fighter.module_accessor) > 7.0 && MotionModule::frame(fighter.module_accessor) < 32.0 { + let stick_x = fighter.global_table[STICK_X].get_f32(); + if stick_x != 0.0 { + let drift_speed = 0.15 * stick_x.signum(); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, drift_speed, 0.0); + app::sv_kinetic_energy::add_speed(fighter.lua_state_agent); + // this is here so adding speed doesn't surpass x speed cap we set earlier (by setting a slightly lower speed cap) + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, (1.75 - drift_speed.abs()), -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + } + else { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 1.75, -1.5); + app::sv_kinetic_energy::set_limit_speed(fighter.lua_state_agent); + } + } + if MotionModule::frame(fighter.module_accessor) >= 15.0 { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SIDE_SPECIAL_CANCEL); + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) + || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3) && fighter.is_stick_forward()) + || (compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4) && fighter.is_stick_forward()) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3 + | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3 + | *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4) { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK_AIR.into(), true.into()); + return 1.into() + } + } + // ] + + // This is just (as straight of) an impl that I can get of the main loop, what the hell were the smash devs + // Can only use side special once per aerial time + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if MotionModule::is_end(fighter.module_accessor) == false { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); + return L2CValue::I32(1); + } + return L2CValue::I32(0); + } + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END.into(), false.into()); + } + L2CValue::I32(0) +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END + +pub unsafe extern "C" fn pre_special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_GROUND as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_ALL_FLOAT, + *FS_SUCCEEDS_KEEP_SOUND + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_S | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_S as u32, + 0 + ); + 0.into() +} + +unsafe extern "C" fn special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_end"), 0.0, 1.0, false, 0.0, false, false); + } + else { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_end"), 0.0, 1.0, false, 0.0, false, false); + } + fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_Main as *const () as _)) +} + +unsafe extern "C" fn special_s1_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + if !fighter.sub_transition_group_check_air_cliff().get_bool() { + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if !MotionModule::is_end(fighter.module_accessor) { + if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_HENSOKU_SLASH_WORK_FLAG_END_LANDING) { + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s1_end"), -1.0, 1.0, 0.0, false, false); + let s1_control_limit_mul_x = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("s1_control_limit_mul_x")); + KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, 0.0, 0.0, 0.0, 0.0, 0.0); + smash::app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, s1_control_limit_mul_x); + smash::app::sv_kinetic_energy::mul_x_speed_max(fighter.lua_state_agent); + return 1.into(); + } + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s1_end"), -1.0, 1.0, 0.0, false, false); + + } + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), false); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 1.into(); + } + } + } + return 0.into() + } + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } + else { + if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { + if fighter.sub_air_check_fall_common().get_bool() { + return 1.into() + } + } + } + } + return 1.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end); +} \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s2.rs b/fighters/miiswordsman/src/status/special_s2.rs new file mode 100644 index 0000000000..ed6ae76ac3 --- /dev/null +++ b/fighters/miiswordsman/src/status/special_s2.rs @@ -0,0 +1,363 @@ +use super::*; + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH + +unsafe extern "C" fn special_s2_dash(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); + WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + special_s2_dash_mot_change(fighter); + // if !StopModule::is_stop(fighter.module_accessor) { + // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + // } + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_s2_dash_dec_int as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main as *const () as _)) +} + +unsafe extern "C" fn special_s2_dash_mot_change(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES.into()); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_dash"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_dash"), -1.0, 1.0, 0.0, false, false); + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + fighter.sub_fighter_cliff_check(GROUND_CLIFF_CHECK_KIND_NONE.into()); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_dash"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_dash"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn special_s2_dash_dec_int(fighter: &mut L2CFighterCommon, unk: L2CValue) -> L2CValue { + if unk.get_bool() { + WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + } + return 0.into() +} + +unsafe extern "C" fn special_s2_dash_unk(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut val = 0; + if fighter.global_table[STATUS_KIND_INTERRUPT].get_i32() == *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let is_status_cliff = GroundModule::is_status_cliff(fighter.module_accessor); + if is_status_cliff { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); + val = 1; + } + } + } + return val.into() +} + +unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { + let mut sub_check = fighter.sub_transition_group_check_air_cliff().get_bool(); + if sub_check { + return 0.into(); + } + sub_check = fighter.sub_ground_check_stop_wall().get_bool(); + if sub_check { + return 0.into(); + } + // custom [ + // Jump and Attack cancels + let pad_flag = ControlModule::get_pad_flag(fighter.module_accessor); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND && MotionModule::frame(fighter.module_accessor) > 7.0 { + if fighter.check_jump_cancel(true, false) { + return 1.into() + } + } + if compare_mask(pad_flag, *FIGHTER_PAD_FLAG_SPECIAL_TRIGGER) || compare_mask(pad_flag, *FIGHTER_PAD_FLAG_ATTACK_TRIGGER) { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK.into(),true.into()); + return 1.into() + } + // Wall Jump + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP) { + let touch_right = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); + let touch_left = GroundModule::is_wall_touch_line(fighter.module_accessor, *GROUND_TOUCH_FLAG_LEFT_SIDE as u32); + if touch_left || touch_right { + if compare_mask(ControlModule::get_command_flag_cat(fighter.module_accessor, 0), *FIGHTER_PAD_CMD_CAT1_FLAG_TURN_DASH | *FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_WALL_JUMP); + fighter.change_status(FIGHTER_STATUS_KIND_WALL_JUMP.into(),true.into()); + return 1.into() + } + } + } + } + // ] + let slash_frame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + if slash_frame <= 0 { + fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END.into(), true.into()); + } + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_dash_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_dash_mot_change(fighter); + } + } + } + else { + special_s2_dash_mot_change(fighter); + } + special_s2_dash_unk(fighter); + return 0.into() +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK + +unsafe extern "C" fn special_s2_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); + WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); + special_s2_attack_mot_change(fighter); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main as *const () as _)) +} + +unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_attack"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_attack"), -1.0, 1.0, 0.0, false, false); + } + } + else { + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_attack"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_attack"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 0.into(); + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + special_s2_attack_main_helper(fighter); + } + else { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() == false { + if fighter.sub_air_check_fall_common().get_bool() { + return 0.into(); + } + } + } + return 0.into() +} + +unsafe extern "C" fn special_s2_attack_main_helper(fighter: &mut L2CFighterCommon) { + if !MotionModule::is_end(fighter.module_accessor) { + if !StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_attack_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_attack_mot_change(fighter); + } + } + } + special_s2_dash_unk(fighter); + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_AIR { + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + special_s2_attack_mot_change(fighter); + } + } + else { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + special_s2_attack_mot_change(fighter); + } + } + } + special_s2_dash_unk(fighter); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_FALL_SPECIAL.into(), true.into()); + } + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), true.into()); + } + } +} + +// FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END + +unsafe extern "C" fn pre_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END)(fighter) +} + +unsafe extern "C" fn special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + special_s2_end_helper(fighter); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_Main as *const () as _)) +} + +unsafe extern "C" fn special_s2_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { + return 0.into() + } + if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { + if !MotionModule::is_end(fighter.module_accessor) { + if StatusModule::is_changing(fighter.module_accessor) { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + // OG [ special_s2_end_helper(fighter); ] + // custom [ + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(true) + ); + // ] + sub_special_s2_end(fighter); + return 0.into() + } + } + else { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + special_s2_end_helper(fighter); + sub_special_s2_end(fighter); + return 0.into() + } + } + } + else { + // custom [ + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_AIR { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + VarModule::on_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); + } + } + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL), + L2CValue::Bool(true) + ); + sub_special_s2_end(fighter); + return 0.into() + } + } + // ] + special_s2_end_helper(fighter); + } + sub_special_s2_end(fighter); + } + else { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_FALL_SPECIAL), + L2CValue::Bool(true) + ); + } + else { + fighter.change_status( + L2CValue::I32(*FIGHTER_STATUS_KIND_WAIT), + L2CValue::Bool(true) + ); + } + } + } + else { + if !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() { + if fighter.sub_air_check_fall_common().get_bool() { + return 0.into() + } + } + } + return 0.into() +} + +unsafe extern "C" fn special_s2_end_helper(fighter: &mut L2CFighterCommon) { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s2_end"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_air_s2_end"), -1.0, 1.0, 0.0, false, false); + } + } + else { + // OG [ GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); ] + // custom [ + if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL) { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + } + else { + GroundModule::correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + } + // ] + fighter.sub_fighter_cliff_check(L2CValue::I32(*GROUND_CLIFF_CHECK_KIND_NONE)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT) { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s2_end"), 0.0, 1.0, false, 0.0, false, false); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame(fighter.module_accessor, Hash40::new("special_s2_end"), -1.0, 1.0, 0.0, false, false); + } + } +} + +unsafe extern "C" fn sub_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[STATUS_KIND_INTERRUPT] == FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH { + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + if GroundModule::is_status_cliff(fighter.module_accessor) { + fighter.change_status( + L2CValue::I32(*FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END), + L2CValue::Bool(true) + ); + return 1.into() + } + } + } + return 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash); + + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack); + + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials.rs b/fighters/palutena/src/acmd/specials.rs deleted file mode 100644 index 838e0d77b7..0000000000 --- a/fighters/palutena/src/acmd/specials.rs +++ /dev/null @@ -1,906 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 40, 0, 70, 8.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 22.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 5.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn game_specialnr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {4.0} else {0.0}; - let sound_lvl = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; - let size = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2.0} else {0.0}; - let kbg = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {10} else {0}; - FT_DESIRED_RATE(agent, 18.0, 12.0); - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + power, 361, 95 - kbg, 0, 40, 5.6 + (size / 2.0), 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (power / 2.0), 361, 97 - kbg, 0, 40, 8.6 + size, 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 22.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialnr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 1, 21, 2.5, 0, -50, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); - } - frame(lua_state, 18.0); - if power { - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_bomb_d"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - } - else { - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - } - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } - -} - -unsafe extern "C" fn sound_specialnr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_bomb_l")} else {Hash40::new("se_common_bomb_s")}; - frame(lua_state, 14.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_s")); - if power { - PLAY_SE(agent, Hash40::new("se_palutena_smash_s01")); - } - PLAY_SE(agent, sound_lvl); - } -} - -unsafe extern "C" fn expression_specialnr(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); - AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 40); - } - frame(lua_state, 11.0); - app::sv_animcmd::execute(lua_state, 11.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - AREA_WIND_2ND_arg10(agent, 0, 2, 30, 300, 0.8, 25, 12, 50, 24, 80); - } - frame(lua_state, 18.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - } - frame(lua_state, 21.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 36.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 65.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn game_specialnb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let power = if powered {5.0} else {0.0}; - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 4.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); - } - FT_DESIRED_RATE(agent, 14.0, 8.0); - frame(lua_state, 18.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0 + power, 88, 91, 0, 53, 4.5, 0.0, 15.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 + power, 88, 91, 0, 58, 2.8, 0.0, 30.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - if powered { - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 91, 0, 62, 2.8, 0.0, 45.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); - } - } - frame(lua_state, 28.0); - if is_excute(agent) { - HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); - HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_DESIRED_RATE(agent, 17.0, 7.0); - } - } - frame(lua_state, 43.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn effect_specialnb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let length = if powered { 2.7 } else { 1.8 }; - let length2 = if powered { 0.69 } else { 0.5 }; - let y_pos = if powered {25} else {16}; - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.05, 0.90); - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.75, true); - EFFECT_FOLLOW(agent, Hash40::new("palutena_pressure"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, length2, true); - LAST_EFFECT_SET_ALPHA(agent, 0.3); - LAST_EFFECT_SET_RATE(agent, (16.0/10.0)); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 4, 21.5, 2, 0, -60, 0, 1, true, 0.7); - LAST_EFFECT_SET_RATE(agent, 1.1); - LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); - EFFECT_FOLLOW(agent, Hash40::new("sys_ice"), Hash40::new("top"), 0, y_pos, 10, 0, 250, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); - EffectModule::set_scale_last(boma, &Vector3f::new(0.5, length, 0.5)); - } - wait(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_ice"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_pressure"), false, false); - } - if is_excute(agent) { - let size = if powered { 0.6 } else { 0.5 }; - EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.6, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 24, 10, 0, 0, 0, size, true); - if powered { - EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 40, 10, 0, 0, 0, 0.3, true); - } - } - frame(lua_state, 50.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_specialnb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_frieze_l")} else {Hash40::new("se_common_frieze_m")}; - frame(lua_state, 17.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_palutena_attack07")); - if power { - PLAY_SE(agent, Hash40::new("se_palutena_smash_h01")); - } - PLAY_SE(agent, sound_lvl); - } -} - -unsafe extern "C" fn expression_specialnb(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 13.0); - app::sv_animcmd::execute(lua_state, 13.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 16.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_arg10(agent, 0, 2, 90, 300, 1, 9, 35, 18, 70, 80); - } - frame(lua_state, 18.0); - if is_excute(agent) { - if powered { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } else { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - - } - frame(lua_state, 48.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } -} - -unsafe extern "C" fn game_specialny(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let hitlag = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.5} else {0.75}; - let paralyze = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.6} else {0.3}; - let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2} else {4}; - frame(lua_state, 1.0); - if is_excute(agent) { - if !MeterModule::drain(boma.object(), 2) { - MeterModule::drain(boma.object(), 1); - } - else { - MeterModule::drain(boma.object(), 2); - } - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 20.0); - if is_excute(agent) { - if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { - WorkModule::set_float(boma, PostureModule::pos_x(boma) - 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); - } - else { - WorkModule::set_float(boma, PostureModule::pos_x(boma) + 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); - } - WorkModule::set_float(boma, PostureModule::pos_y(boma) + 5.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_Y); - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_AUTOAIMBULLET, false, -1); - } -} - -unsafe extern "C" fn effect_specialny(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); - } - frame(lua_state, 35.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_specialny(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); - let sound_lvl = if power {Hash40::new("se_common_electric_hit_l")} else {Hash40::new("se_common_electric_hit_m")}; - frame(lua_state, 11.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); - } - wait(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, sound_lvl); - } - wait(lua_state, 29.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - } -} - -unsafe extern "C" fn expression_specialny(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(boma, false, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); - } - wait(lua_state, 12.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); - } -} - -unsafe extern "C" fn game_specialnp(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, false, -1); - ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4_charge"), false, -1.0); - } - frame(lua_state, 1.0); - FT_DESIRED_RATE(agent, 14.0, 16.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4"), false, -1.0); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 258, 90, 105, 0, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 258, 60, 0, 30, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); - AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { - FT_DESIRED_RATE(agent, 45.0, 25.0); - } - } - frame(lua_state, 60.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 67.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } -} - -unsafe extern "C" fn effect_specialnp(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 15.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_smash_lw_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 16.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 3, 13.5, 0, 0, -90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 19.0); - if is_excute(agent) { - if !agent.is_situation(*SITUATION_KIND_AIR){ - EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, false); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, 8, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, -8, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); - } - frame(lua_state, 30.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_specialnp(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 16.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_03")); - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_l")); - PLAY_SE(agent, Hash40::new("se_palutena_smash_l01")); - PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); - } -} - -unsafe extern "C" fn expression_specialnp(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); - } - frame(lua_state, 14.0); - app::sv_animcmd::execute(lua_state, 14.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); - } - frame(lua_state, 15.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); - } - frame(lua_state, 18.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - if agent.is_situation(*SITUATION_KIND_GROUND) { - QUAKE(agent, *CAMERA_QUAKE_KIND_L); - } - else { - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - } - AREA_WIND_2ND_arg10(agent, 0, 0.75, 110, 300, 0.8, 0, 15, 24, 30, 40); - } - frame(lua_state, 21.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AREA_WIND_2ND_arg10(agent, 0, 0.75, 70, 300, 0.8, 0, 12, 24, 24, 40); - } - frame(lua_state, 47.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 55.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - PostureModule::set_lr(boma, PostureModule::lr(agent.module_accessor)); - PostureModule::update_rot_y_lr(boma); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_REFLECTIONBOARD, false, 0); - } -} - -unsafe extern "C" fn effect_specialno(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(boma); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - EFFECT(agent, Hash40::new("palutena_throw_twinkle"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("palutena_mirror_break"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.225, 0, 0, 0, 0, 0, 0, true); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -1, 21, 1, 0, 90, 0, 1, true, 0.7); - LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); - } - frame(lua_state, 35.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - } -} - -unsafe extern "C" fn sound_specialno(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l02")); - } -} - -unsafe extern "C" fn expression_specialno(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } -} - -unsafe extern "C" fn game_specialng(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - MeterModule::drain(boma.object(), 2); - VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - } - FT_DESIRED_RATE(agent, 20.0, 10.0); - frame(lua_state, 20.0); - FT_DESIRED_RATE(agent, 25.0, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 40, 70, 0, 6.0, 0.0, 19.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 25.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - let angle_mod = ((sv_math::rand(hash40("fighter"), 51) as i32) - 25) as u64; - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90 + angle_mod, 116, 0, 75, 8.0, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specialng(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 1.0, 0.05); - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 0.95, true); - LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.05); - } - wait(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1.2, true); - LAST_EFFECT_SET_COLOR(agent, 0.25, 0.70, 0.25); - LAST_EFFECT_SET_ALPHA(agent, 0.3); - } - wait(lua_state, 26.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); - EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); - } - wait(lua_state, 3.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); - } -} - -unsafe extern "C" fn sound_specialng(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); - PLAY_SE(agent, Hash40::new("se_common_slip_01")); - } - frame(lua_state, 20.0); - if is_excute(agent) { - sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); - PLAY_SE(agent, Hash40::new("se_palutena_throw")); - PLAY_SE(agent, Hash40::new("se_common_throw_02")); - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_attack")); - PLAY_SE(agent, Hash40::new("se_item_club_wind")); - } - wait(lua_state, 25.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_item_club_wind")); - } -} - -unsafe extern "C" fn expression_specialng(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 18.0); - if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 20.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashss"), 10); - } - frame(lua_state, 25.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); - } -} - -unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let current_damage = DamageModule::damage(boma, 0); - frame(lua_state, 4.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); - } - frame(lua_state, 19.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, DamageModule::damage(boma, 0) - current_damage); - } - frame(lua_state, 23.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_flash"), Hash40::new("shield"), -1, 0, -3, 0, 0, 0, 0.7, true); - EFFECT(agent, Hash40::new("palutena_counter_success"), Hash40::new("top"), 0, 14.8, -1, 0, 90, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 19.0); - if is_excute(agent) { - EFFECT_FLW_POS(agent, Hash40::new("palutena_backlight"), Hash40::new("waist"), 10, -3, -1, 0, 90, 0, 1, true); - EffectModule::set_disable_render_offset_last(boma); - LAST_EFFECT_SET_RATE(agent, 2.75); - } - frame(lua_state, 21.0); - if is_excute(agent) { - FLASH(agent, 1, 1, 1, 0); - EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_attack"), Hash40::new("stick"), 0, 8.5, 0, 0, 0, 0, 0.9, true); - EffectModule::set_disable_render_offset_last(boma); - } - frame(lua_state, 22.0); - if is_excute(agent) { - } - frame(lua_state, 23.0); - if is_excute(agent) { - EFFECT_DETACH_KIND(agent, Hash40::new("palutena_backlight"), -1); - } - frame(lua_state, 36.0); - if is_excute(agent) { - COL_NORMAL(agent); - } -} - -unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); - } - frame(lua_state, 19.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); - } - wait(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); - } - wait(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); - } -} - -unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 18.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 22.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 23.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - } -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_specialn", game_specialn); - agent.acmd("game_specialairn", game_specialn); - agent.acmd("effect_specialn", effect_specialn); - agent.acmd("effect_specialairn", effect_specialn); - agent.acmd("sound_specialn", sound_specialn); - agent.acmd("sound_specialairn", sound_specialn); - agent.acmd("expression_specialn", expression_specialn); - agent.acmd("expression_specialairn", expression_specialn); - - agent.acmd("game_specialnr", game_specialnr); - agent.acmd("game_specialairnr", game_specialnr); - agent.acmd("effect_specialnr", effect_specialnr); - agent.acmd("effect_specialairnr", effect_specialnr); - agent.acmd("sound_specialnr", sound_specialnr); - agent.acmd("sound_specialairnr", sound_specialnr); - agent.acmd("expression_specialnr", expression_specialnr); - agent.acmd("expression_specialairnr", expression_specialnr); - - agent.acmd("game_specialnb", game_specialnb); - agent.acmd("game_specialairnb", game_specialnb); - agent.acmd("effect_specialnb", effect_specialnb); - agent.acmd("effect_specialairnb", effect_specialnb); - agent.acmd("sound_specialnb", sound_specialnb); - agent.acmd("sound_specialairnb", sound_specialnb); - agent.acmd("expression_specialnb", expression_specialnb); - agent.acmd("expression_specialairnb", expression_specialnb); - - agent.acmd("game_specialny", game_specialny); - agent.acmd("game_specialairny", game_specialny); - agent.acmd("effect_specialny", effect_specialny); - agent.acmd("effect_specialairny", effect_specialny); - agent.acmd("sound_specialny", sound_specialny); - agent.acmd("sound_specialairny", sound_specialny); - agent.acmd("expression_specialny", expression_specialny); - agent.acmd("expression_specialairny", expression_specialny); - - agent.acmd("game_specialnp", game_specialnp); - agent.acmd("game_specialairnp", game_specialnp); - agent.acmd("effect_specialnp", effect_specialnp); - agent.acmd("effect_specialairnp", effect_specialnp); - agent.acmd("sound_specialnp", sound_specialnp); - agent.acmd("sound_specialairnp", sound_specialnp); - agent.acmd("expression_specialnp", expression_specialnp); - agent.acmd("expression_specialairnp", expression_specialnp); - - agent.acmd("game_specialno", game_specialno); - agent.acmd("game_specialairno", game_specialno); - agent.acmd("effect_specialno", effect_specialno); - agent.acmd("effect_specialairno", effect_specialno); - agent.acmd("sound_specialno", sound_specialno); - agent.acmd("sound_specialairno", sound_specialno); - agent.acmd("expression_specialno", expression_specialno); - agent.acmd("expression_specialairno", expression_specialno); - - agent.acmd("game_specialng", game_specialng); - agent.acmd("game_specialairng", game_specialng); - agent.acmd("effect_specialng", effect_specialng); - agent.acmd("effect_specialairng", effect_specialng); - agent.acmd("sound_specialng", sound_specialng); - agent.acmd("sound_specialairng", sound_specialng); - agent.acmd("expression_specialng", expression_specialng); - agent.acmd("expression_specialairng", expression_specialng); - - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_speciallw); - agent.acmd("effect_speciallw", effect_speciallw); - agent.acmd("effect_specialairlw", effect_speciallw); - agent.acmd("sound_speciallw", sound_speciallw); - agent.acmd("sound_specialairlw", sound_speciallw); - agent.acmd("expression_speciallw", expression_speciallw); - agent.acmd("expression_specialairlw", expression_speciallw); -} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/mod.rs b/fighters/palutena/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..82c7b69584 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/mod.rs @@ -0,0 +1,205 @@ +use super::*; + +mod special_n_r; +mod special_n_o; +mod special_n_y; +mod special_n_g; +mod special_n_b; +mod special_n_p; + +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 72, 40, 0, 70, 8.0, 0.0, 12.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MAGIC, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + EFFECT(agent, Hash40::new("palutena_wand_finish"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.1, 0.15); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 22.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_specialn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 5.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let current_damage = DamageModule::damage(boma, 0); + frame(lua_state, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 20.0); + } + frame(lua_state, 19.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + VarModule::set_float(boma.object(), vars::palutena::status::ADD_DAMAGE, DamageModule::damage(boma, 0) - current_damage); + } + frame(lua_state, 23.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 50, 0, 70, 7.0, 0.0, 10.5, 13.0, Some(0.0), Some(10.5), Some(14.5), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 12.0 + (VarModule::get_float(boma.object(), vars::palutena::status::ADD_DAMAGE) * 0.75), 361, 30, 0, 65, 9.0, 0.0, 10.5, 9.0, Some(0.0), Some(10.5), Some(20.0), 1.25, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_MAGIC); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_flash"), Hash40::new("shield"), -1, 0, -3, 0, 0, 0, 0.7, true); + EFFECT(agent, Hash40::new("palutena_counter_success"), Hash40::new("top"), 0, 14.8, -1, 0, 90, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_counter_flash"), Hash40::new("top"), 0, 14.8, -1, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FLW_POS(agent, Hash40::new("palutena_backlight"), Hash40::new("waist"), 10, -3, -1, 0, 90, 0, 1, true); + EffectModule::set_disable_render_offset_last(boma); + LAST_EFFECT_SET_RATE(agent, 2.75); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FLASH(agent, 1, 1, 1, 0); + EFFECT_FLW_POS(agent, Hash40::new("palutena_counter_attack"), Hash40::new("stick"), 0, 8.5, 0, 0, 0, 0, 0.9, true); + EffectModule::set_disable_render_offset_last(boma); + } + frame(lua_state, 22.0); + if is_excute(agent) { + } + frame(lua_state, 23.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("palutena_backlight"), -1); + } + frame(lua_state, 36.0); + if is_excute(agent) { + COL_NORMAL(agent); + } +} + +unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l01")); + } + frame(lua_state, 19.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l02")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_palutena_special_l03")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l01")); + } +} + +unsafe extern "C" fn expression_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 18.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + ControlModule::set_rumble(boma, Hash40::new("rbkind_counter"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 23.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialn", game_specialn); + agent.acmd("game_specialairn", game_specialn); + agent.acmd("effect_specialn", effect_specialn); + agent.acmd("effect_specialairn", effect_specialn); + agent.acmd("sound_specialn", sound_specialn); + agent.acmd("sound_specialairn", sound_specialn); + agent.acmd("expression_specialn", expression_specialn); + agent.acmd("expression_specialairn", expression_specialn); + special_n_r::install(agent); + special_n_o::install(agent); + special_n_y::install(agent); + special_n_g::install(agent); + special_n_b::install(agent); + special_n_p::install(agent); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("effect_speciallw", effect_speciallw); + agent.acmd("effect_specialairlw", effect_speciallw); + agent.acmd("sound_speciallw", sound_speciallw); + agent.acmd("sound_specialairlw", sound_speciallw); + agent.acmd("expression_speciallw", expression_speciallw); + agent.acmd("expression_specialairlw", expression_speciallw); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_b.rs b/fighters/palutena/src/acmd/specials/special_n_b.rs new file mode 100644 index 0000000000..4eec17a7d9 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_b.rs @@ -0,0 +1,155 @@ +use super::*; + +unsafe extern "C" fn game_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let power = if powered {5.0} else {0.0}; + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 4.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_XLU); + } + FT_DESIRED_RATE(agent, 14.0, 8.0); + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 9.0 + power, 88, 91, 0, 53, 4.5, 0.0, 15.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 7.0 + power, 88, 91, 0, 58, 2.8, 0.0, 30.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + if powered { + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 88, 91, 0, 62, 2.8, 0.0, 45.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_MAGIC); + } + } + frame(lua_state, 28.0); + if is_excute(agent) { + HIT_NODE(agent, Hash40::new("bust"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("shoulderl"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_NORMAL); + HIT_NODE(agent, Hash40::new("arml"), *HIT_STATUS_NORMAL); + AttackModule::clear_all(boma); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { + FT_DESIRED_RATE(agent, 17.0, 7.0); + } + } + frame(lua_state, 43.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn effect_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let length = if powered { 2.7 } else { 1.8 }; + let length2 = if powered { 0.69 } else { 0.5 }; + let y_pos = if powered {25} else {16}; + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.05, 0.90); + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.75, true); + EFFECT_FOLLOW(agent, Hash40::new("palutena_pressure"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, length2, true); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + LAST_EFFECT_SET_RATE(agent, (16.0/10.0)); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 4, 21.5, 2, 0, -60, 0, 1, true, 0.7); + LAST_EFFECT_SET_RATE(agent, 1.1); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); + EFFECT_FOLLOW(agent, Hash40::new("sys_ice"), Hash40::new("top"), 0, y_pos, 10, 0, 250, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.35, 0.35, 0.90); + EffectModule::set_scale_last(boma, &Vector3f::new(0.5, length, 0.5)); + } + wait(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("sys_ice"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_pressure"), false, false); + } + if is_excute(agent) { + let size = if powered { 0.6 } else { 0.5 }; + EFFECT_FOLLOW(agent, Hash40::new("sys_hit_ice"), Hash40::new("top"), 0, 3, 10, 0, 0, 0, 0.6, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 24, 10, 0, 0, 0, size, true); + if powered { + EFFECT_FOLLOW(agent, Hash40::new("sys_freezer"), Hash40::new("top"), 0, 40, 10, 0, 0, 0, 0.3, true); + } + } + frame(lua_state, 50.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_frieze_l")} else {Hash40::new("se_common_frieze_m")}; + frame(lua_state, 17.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_palutena_attack07")); + if power { + PLAY_SE(agent, Hash40::new("se_palutena_smash_h01")); + } + PLAY_SE(agent, sound_lvl); + } +} + +unsafe extern "C" fn expression_specialnb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let powered = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 13.0); + app::sv_animcmd::execute(lua_state, 13.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 16.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_arg10(agent, 0, 2, 90, 300, 1, 9, 35, 18, 70, 80); + } + frame(lua_state, 18.0); + if is_excute(agent) { + if powered { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beamm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } else { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + + } + frame(lua_state, 48.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnb", game_specialnb); + agent.acmd("game_specialairnb", game_specialnb); + agent.acmd("effect_specialnb", effect_specialnb); + agent.acmd("effect_specialairnb", effect_specialnb); + agent.acmd("sound_specialnb", sound_specialnb); + agent.acmd("sound_specialairnb", sound_specialnb); + agent.acmd("expression_specialnb", expression_specialnb); + agent.acmd("expression_specialairnb", expression_specialnb); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_g.rs b/fighters/palutena/src/acmd/specials/special_n_g.rs new file mode 100644 index 0000000000..87b954c558 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_g.rs @@ -0,0 +1,116 @@ +use super::*; + +unsafe extern "C" fn game_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + FT_DESIRED_RATE(agent, 20.0, 10.0); + frame(lua_state, 20.0); + FT_DESIRED_RATE(agent, 25.0, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 366, 40, 70, 0, 6.0, 0.0, 19.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 0.7, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 5, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 25.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + let angle_mod = ((sv_math::rand(hash40("fighter"), 51) as i32) - 25) as u64; + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 90 + angle_mod, 116, 0, 75, 8.0, 0.0, 21.0, 9.7, Some(0.0), Some(4.0), Some(9.7), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_ITEM, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.01); + } + frame(lua_state, 19.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 1.0, 0.05); + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.05, 0.50, 0.05); + } + wait(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_club_tornado"), Hash40::new("top"), 0, 0, 10, 0, 0, 0, 1.2, true); + LAST_EFFECT_SET_COLOR(agent, 0.25, 0.70, 0.25); + LAST_EFFECT_SET_ALPHA(agent, 0.3); + } + wait(lua_state, 26.0); + if is_excute(agent) { + EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); + EFFECT_DETACH_KIND(agent, Hash40::new("sys_club_tornado"), -1); + } + wait(lua_state, 3.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("sys_club_tornado"), false, false); + } +} + +unsafe extern "C" fn sound_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + PLAY_SE(agent, Hash40::new("se_common_slip_01")); + } + frame(lua_state, 20.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + PLAY_SE(agent, Hash40::new("se_palutena_throw")); + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_attack")); + PLAY_SE(agent, Hash40::new("se_item_club_wind")); + } + wait(lua_state, 25.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_item_club_wind")); + } +} + +unsafe extern "C" fn expression_specialng(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 18.0); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 20.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashss"), 10); + } + frame(lua_state, 25.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 10); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialng", game_specialng); + agent.acmd("game_specialairng", game_specialng); + agent.acmd("effect_specialng", effect_specialng); + agent.acmd("effect_specialairng", effect_specialng); + agent.acmd("sound_specialng", sound_specialng); + agent.acmd("sound_specialairng", sound_specialng); + agent.acmd("expression_specialng", expression_specialng); + agent.acmd("expression_specialairng", expression_specialng); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_o.rs b/fighters/palutena/src/acmd/specials/special_n_o.rs new file mode 100644 index 0000000000..0e96b431c6 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_o.rs @@ -0,0 +1,74 @@ +use super::*; + +unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + PostureModule::set_lr(boma, PostureModule::lr(agent.module_accessor)); + PostureModule::update_rot_y_lr(boma); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_REFLECTIONBOARD, false, 0); + } +} + +unsafe extern "C" fn effect_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + EffectModule::enable_sync_init_pos_last(boma); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + EFFECT(agent, Hash40::new("palutena_throw_twinkle"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.95, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 8.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_mirror_break"), Hash40::new("top"), 0.0, 16.0, -8.0, 0, 0, 0, 0.225, 0, 0, 0, 0, 0, 0, true); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -1, 21, 1, 0, 90, 0, 1, true, 0.7); + LAST_EFFECT_SET_COLOR(agent, 0.8, 0.2, 0.01); + } + frame(lua_state, 35.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_special_l02")); + } +} + +unsafe extern "C" fn expression_specialno(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialno", game_specialno); + agent.acmd("game_specialairno", game_specialno); + agent.acmd("effect_specialno", effect_specialno); + agent.acmd("effect_specialairno", effect_specialno); + agent.acmd("sound_specialno", sound_specialno); + agent.acmd("sound_specialairno", sound_specialno); + agent.acmd("expression_specialno", expression_specialno); + agent.acmd("expression_specialairno", expression_specialno); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_p.rs b/fighters/palutena/src/acmd/specials/special_n_p.rs new file mode 100644 index 0000000000..18419b623a --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_p.rs @@ -0,0 +1,155 @@ +use super::*; + +unsafe extern "C" fn game_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, false, -1); + ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4_charge"), false, -1.0); + } + frame(lua_state, 1.0); + FT_DESIRED_RATE(agent, 14.0, 16.0); + if is_excute(agent) { + MeterModule::drain(boma.object(), 2); + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, Hash40::new("attack_lw4"), false, -1.0); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 18.0, 258, 90, 105, 0, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 258, 60, 0, 30, 6.0, 0.0, 4.0, 14.0, Some(0.0), Some(4.0), Some(-14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_MAGIC); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); + AttackModule::set_add_reaction_frame(boma, 0, 20.0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) || AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { + FT_DESIRED_RATE(agent, 45.0, 25.0); + } + } + frame(lua_state, 60.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_GODWING, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 67.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } +} + +unsafe extern "C" fn effect_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 15.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_smash_lw_trace"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 3, 13.5, 0, 0, -90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 19.0); + if is_excute(agent) { + if !agent.is_situation(*SITUATION_KIND_AIR){ + EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, false); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, 8, 0, 180, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("palutena_feather"), Hash40::new("top"), 0, 3, -8, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_COLOR(agent, 0.75, 0.01, 0.35); + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_03")); + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_l")); + PLAY_SE(agent, Hash40::new("se_palutena_smash_l01")); + PLAY_SE(agent, Hash40::new("se_common_down_soil_l")); + } +} + +unsafe extern "C" fn expression_specialnp(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + } + frame(lua_state, 14.0); + app::sv_animcmd::execute(lua_state, 14.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + } + frame(lua_state, 15.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 3); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); + if agent.is_situation(*SITUATION_KIND_GROUND) { + QUAKE(agent, *CAMERA_QUAKE_KIND_L); + } + else { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } + AREA_WIND_2ND_arg10(agent, 0, 0.75, 110, 300, 0.8, 0, 15, 24, 30, 40); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AREA_WIND_2ND_arg10(agent, 0, 0.75, 70, 300, 0.8, 0, 12, 24, 24, 40); + } + frame(lua_state, 47.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 55.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnp", game_specialnp); + agent.acmd("game_specialairnp", game_specialnp); + agent.acmd("effect_specialnp", effect_specialnp); + agent.acmd("effect_specialairnp", effect_specialnp); + agent.acmd("sound_specialnp", sound_specialnp); + agent.acmd("sound_specialairnp", sound_specialnp); + agent.acmd("expression_specialnp", expression_specialnp); + agent.acmd("expression_specialairnp", expression_specialnp); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_r.rs b/fighters/palutena/src/acmd/specials/special_n_r.rs new file mode 100644 index 0000000000..8ef7e89e05 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_r.rs @@ -0,0 +1,127 @@ +use super::*; + +unsafe extern "C" fn game_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {4.0} else {0.0}; + let sound_lvl = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {*ATTACK_SOUND_LEVEL_L} else {*ATTACK_SOUND_LEVEL_M}; + let size = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2.0} else {0.0}; + let kbg = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {10} else {0}; + FT_DESIRED_RATE(agent, 18.0, 12.0); + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 18.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0 + power, 361, 95 - kbg, 0, 40, 5.6 + (size / 2.0), 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 10.0 + (power / 2.0), 361, 97 - kbg, 0, 40, 8.6 + size, 1.0, 11.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), sound_lvl, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + } + frame(lua_state, 16.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), 1, 21, 2.5, 0, -50, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 2.0, 0.03, 0.01); + } + frame(lua_state, 18.0); + if power { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_d"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + } + else { + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0.0, 12.0, 10.0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, true); + } + } + frame(lua_state, 30.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } + +} + +unsafe extern "C" fn sound_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_bomb_l")} else {Hash40::new("se_common_bomb_s")}; + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_palutena_rnd_smash_s")); + if power { + PLAY_SE(agent, Hash40::new("se_palutena_smash_s01")); + } + PLAY_SE(agent, sound_lvl); + } +} + +unsafe extern "C" fn expression_specialnr(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_NONE, 4); + AREA_WIND_2ND_arg10(agent, 0, 1, 80, 300, 0.8, 0, 12, 24, 24, 40); + } + frame(lua_state, 11.0); + app::sv_animcmd::execute(lua_state, 11.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + AREA_WIND_2ND_arg10(agent, 0, 2, 30, 300, 0.8, 25, 12, 50, 24, 80); + } + frame(lua_state, 18.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + } + frame(lua_state, 21.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 36.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 65.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialairnr", game_specialnr); + agent.acmd("effect_specialnr", effect_specialnr); + agent.acmd("effect_specialairnr", effect_specialnr); + agent.acmd("sound_specialnr", sound_specialnr); + agent.acmd("sound_specialairnr", sound_specialnr); + agent.acmd("expression_specialnr", expression_specialnr); + agent.acmd("expression_specialairnr", expression_specialnr); +} \ No newline at end of file diff --git a/fighters/palutena/src/acmd/specials/special_n_y.rs b/fighters/palutena/src/acmd/specials/special_n_y.rs new file mode 100644 index 0000000000..7d1e559757 --- /dev/null +++ b/fighters/palutena/src/acmd/specials/special_n_y.rs @@ -0,0 +1,104 @@ +use super::*; + +unsafe extern "C" fn game_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let hitlag = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.5} else {0.75}; + let paralyze = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {0.6} else {0.3}; + let power = if VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED) {2} else {4}; + frame(lua_state, 1.0); + if is_excute(agent) { + if !MeterModule::drain(boma.object(), 2) { + MeterModule::drain(boma.object(), 1); + } + else { + MeterModule::drain(boma.object(), 2); + } + VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); + } + frame(lua_state, 20.0); + if is_excute(agent) { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { + WorkModule::set_float(boma, PostureModule::pos_x(boma) - 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); + } + else { + WorkModule::set_float(boma, PostureModule::pos_x(boma) + 100.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_X); + } + WorkModule::set_float(boma, PostureModule::pos_y(boma) + 5.0, *FIGHTER_PALUTENA_STATUS_SPECIAL_N_WORK_FLOAT_TARGET_POS_Y); + ArticleModule::generate_article(boma, *FIGHTER_PALUTENA_GENERATE_ARTICLE_AUTOAIMBULLET, false, -1); + } +} + +unsafe extern "C" fn effect_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("palutena_backlight"), Hash40::new("top"), -0.2, 22, -1, 10, 90, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light_trace"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + EFFECT_FOLLOW(agent, Hash40::new("palutena_wand_light2"), Hash40::new("stick"), 0, 8.65, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_COLOR(agent, 0.85, 0.40, 0.001); + } + frame(lua_state, 35.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); + } +} + +unsafe extern "C" fn sound_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let power = VarModule::is_flag(agent.object(), vars::palutena::instance::POWERED); + let sound_lvl = if power {Hash40::new("se_common_electric_hit_l")} else {Hash40::new("se_common_electric_hit_m")}; + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_palutena_special_n01")); + } + wait(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); + } + wait(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, sound_lvl); + } + wait(lua_state, 29.0); + if is_excute(agent) { + sound!(agent, *MA_MSC_CMD_SOUND_STOP_SE_STATUS); + } +} + +unsafe extern "C" fn expression_specialny(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + ItemModule::set_have_item_visibility(boma, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beams"), 0); + } + wait(lua_state, 12.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_beamm"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialny", game_specialny); + agent.acmd("game_specialairny", game_specialny); + agent.acmd("effect_specialny", effect_specialny); + agent.acmd("effect_specialairny", effect_specialny); + agent.acmd("sound_specialny", sound_specialny); + agent.acmd("sound_specialairny", sound_specialny); + agent.acmd("expression_specialny", expression_specialny); + agent.acmd("expression_specialairny", expression_specialny); +} \ No newline at end of file diff --git a/fighters/reflet/src/acmd/aerials.rs b/fighters/reflet/src/acmd/aerials.rs index b72155c9b5..18b5f0ca77 100644 --- a/fighters/reflet/src/acmd/aerials.rs +++ b/fighters/reflet/src/acmd/aerials.rs @@ -68,7 +68,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -166,7 +165,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -269,7 +267,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -298,7 +295,6 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -499,19 +495,22 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/reflet/src/acmd/ground.rs b/fighters/reflet/src/acmd/ground.rs index 98d9569a0f..75b6fcacd5 100644 --- a/fighters/reflet/src/acmd/ground.rs +++ b/fighters/reflet/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -121,13 +120,13 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { for _ in 0..99 { - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - wait_loop_clear(agent); - } + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + wait_loop_clear(agent); + } } } @@ -176,5 +175,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack13", game_attack13); agent.acmd("game_attack100", game_attack100); agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index 141978fad5..62f099192e 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -61,14 +61,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -82,7 +80,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/reflet/src/acmd/smashes.rs b/fighters/reflet/src/acmd/smashes.rs index 5e40cf17e9..c2bf431dac 100644 --- a/fighters/reflet/src/acmd/smashes.rs +++ b/fighters/reflet/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -49,7 +48,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } } } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -125,10 +123,10 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } } } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/reflet/src/acmd/specials.rs b/fighters/reflet/src/acmd/specials.rs index 5930cd5bd6..aedbcba5cc 100644 --- a/fighters/reflet/src/acmd/specials.rs +++ b/fighters/reflet/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialntronstart(agent: &mut L2CAgentBase) { @@ -61,7 +60,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -94,7 +92,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); } - } pub fn install(agent: &mut Agent) { @@ -102,6 +99,7 @@ pub fn install(agent: &mut Agent) { agent.acmd( "game_specialairntronstart",game_specialairntronstart); agent.acmd("game_specialntronend", game_specialntronend); agent.acmd("game_specialairntronend",game_specialairntronend); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/reflet/src/acmd/throws.rs b/fighters/reflet/src/acmd/throws.rs index 0759b61c76..656210151a 100644 --- a/fighters/reflet/src/acmd/throws.rs +++ b/fighters/reflet/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -139,7 +138,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/reflet/src/acmd/tilts.rs b/fighters/reflet/src/acmd/tilts.rs index 8fc01fd78a..7404cc1113 100644 --- a/fighters/reflet/src/acmd/tilts.rs +++ b/fighters/reflet/src/acmd/tilts.rs @@ -70,7 +70,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -122,7 +121,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 22.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { @@ -149,8 +147,10 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/reflet/src/elwind/acmd.rs b/fighters/reflet/src/elwind/acmd.rs index 32a1e2a58a..77acde61e7 100644 --- a/fighters/reflet/src/elwind/acmd.rs +++ b/fighters/reflet/src/elwind/acmd.rs @@ -18,15 +18,16 @@ unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 1, false); } frame(lua_state, 5.0); if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } pub fn install(agent: &mut Agent) { agent.acmd("game_shoot0", game_shoot0); + agent.acmd("game_landing", game_landing); } diff --git a/fighters/reflet/src/opff.rs b/fighters/reflet/src/opff.rs index ef73ec3a8b..56f5d1bf59 100644 --- a/fighters/reflet/src/opff.rs +++ b/fighters/reflet/src/opff.rs @@ -2,7 +2,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn nspecial_cancels(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32) { //PM-like neutral-b canceling @@ -136,6 +135,7 @@ pub unsafe fn reflet_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, reflet_frame_wrapper); } diff --git a/fighters/reflet/src/status/attack_air.rs b/fighters/reflet/src/status/attack_air.rs index b2b0b6d2e9..b47db733af 100644 --- a/fighters/reflet/src/status/attack_air.rs +++ b/fighters/reflet/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "attack_air_float_pre"] diff --git a/fighters/reflet/src/status/float.rs b/fighters/reflet/src/status/float.rs index dbe7967e71..4b7089d887 100644 --- a/fighters/reflet/src/status/float.rs +++ b/fighters/reflet/src/status/float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "float_pre_common"] @@ -12,6 +11,8 @@ extern "Rust" { fn float_end_common(fighter: &mut L2CFighterCommon) -> L2CValue; } +// statuses::reflet::FLOAT + unsafe extern "C" fn float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { float_pre_common(fighter) } diff --git a/fighters/reflet/src/status/mod.rs b/fighters/reflet/src/status/mod.rs index 5eaeffe5f6..d2c7602f34 100644 --- a/fighters/reflet/src/status/mod.rs +++ b/fighters/reflet/src/status/mod.rs @@ -36,11 +36,11 @@ unsafe extern "C" fn reflet_on_start(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { + agent.on_start(reflet_on_start); + attack_air::install(agent); special_n::install(agent); float::install(agent); - - agent.on_start(reflet_on_start); } diff --git a/fighters/reflet/src/status/special_n.rs b/fighters/reflet/src/status/special_n.rs index ea437ed256..638f4bf272 100644 --- a/fighters/reflet/src/status/special_n.rs +++ b/fighters/reflet/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N pub unsafe extern "C" fn init_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::set_int(fighter.battle_object, vars::reflet::instance::THUNDER_CHARGE, fighter.get_int(*FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_N_CURRENT_POINT)); diff --git a/fighters/ridley/src/acmd/aerials.rs b/fighters/ridley/src/acmd/aerials.rs index a99d6ff6a0..213f3e2f73 100644 --- a/fighters/ridley/src/acmd/aerials.rs +++ b/fighters/ridley/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -32,7 +31,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -102,7 +100,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -135,7 +132,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -182,7 +178,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -277,10 +272,14 @@ unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairlw", sound_attackairlw); diff --git a/fighters/ridley/src/acmd/ground.rs b/fighters/ridley/src/acmd/ground.rs index 60aed72e91..fb4be33901 100644 --- a/fighters/ridley/src/acmd/ground.rs +++ b/fighters/ridley/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -15,7 +14,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { @@ -49,7 +47,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } - } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { @@ -89,7 +86,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { @@ -98,5 +94,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack12", game_attack12); agent.acmd("effect_attack12", effect_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ridley/src/acmd/other.rs b/fighters/ridley/src/acmd/other.rs index 5d3a92fdf3..42c5bbb596 100644 --- a/fighters/ridley/src/acmd/other.rs +++ b/fighters/ridley/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -62,7 +61,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -88,14 +86,12 @@ unsafe extern "C" fn game_dashturn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -109,7 +105,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -126,10 +121,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("expression_landingheavy", expression_landingheavy); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_dashturn); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/ridley/src/acmd/smashes.rs b/fighters/ridley/src/acmd/smashes.rs index 6fb2636a5e..a50142b87b 100644 --- a/fighters/ridley/src/acmd/smashes.rs +++ b/fighters/ridley/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { @@ -24,7 +23,6 @@ unsafe extern "C" fn game_attacks4s(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.0, 5.0); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -48,7 +46,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("toer"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attacklw4(agent : &mut L2CAgentBase) { @@ -87,6 +84,8 @@ unsafe extern "C" fn expression_attacklw4(agent : &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4s); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/ridley/src/acmd/specials.rs b/fighters/ridley/src/acmd/specials.rs index b6af0fd651..bd454aee31 100644 --- a/fighters/ridley/src/acmd/specials.rs +++ b/fighters/ridley/src/acmd/specials.rs @@ -5,7 +5,6 @@ unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE_RANGE(agent, 1.0, 15.0, 6.0); - } unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { @@ -189,7 +188,7 @@ unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_apecialairhichargef(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhichargef(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -468,7 +467,6 @@ unsafe extern "C" fn game_speciallwpogolanding(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 1.0, 17.0, 12.0); frame(lua_state, 17.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn effect_speciallwpogolanding(agent: &mut L2CAgentBase) { @@ -524,12 +522,15 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairnexplode", effect_specialairnexplode); agent.acmd("sound_specialairnexplode", sound_specialnexplode); agent.acmd("expression_specialairnexplode", expression_specialnexplode); + agent.acmd("game_specialsstart", game_specialsstart); agent.acmd("game_specialairsstart", game_specialsstart); - agent.acmd("game_specialairhichargef", game_apecialairhichargef); + + agent.acmd("game_specialairhichargef", game_specialairhichargef); agent.acmd("game_specialairhichargeb", game_specialairhichargeb); agent.acmd("game_specialairhichargehi", game_specialairhichargehi); agent.acmd("game_specialairhichargelw", game_specialairhichargelw); + agent.acmd("game_speciallwstab", game_speciallwstab); agent.acmd("game_specialairlwstab", game_speciallwstab); agent.acmd("effect_speciallwstab", effect_speciallwstab); diff --git a/fighters/ridley/src/acmd/throws.rs b/fighters/ridley/src/acmd/throws.rs index c170067306..c27983c501 100644 --- a/fighters/ridley/src/acmd/throws.rs +++ b/fighters/ridley/src/acmd/throws.rs @@ -19,7 +19,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -129,7 +128,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/ridley/src/acmd/tilts.rs b/fighters/ridley/src/acmd/tilts.rs index e7966a78fb..225405199c 100644 --- a/fighters/ridley/src/acmd/tilts.rs +++ b/fighters/ridley/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -18,10 +18,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -39,7 +38,6 @@ unsafe extern "C" fn game_attacks3s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -60,7 +58,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -91,7 +88,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { HIT_NODE(agent, Hash40::new("wingr2"), *HIT_STATUS_NORMAL); AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -109,7 +105,6 @@ unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -125,7 +120,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -143,11 +137,13 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("game_attacks3", game_attacks3s); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/ridley/src/opff.rs b/fighters/ridley/src/opff.rs index e89e876dc1..aab4c8058b 100644 --- a/fighters/ridley/src/opff.rs +++ b/fighters/ridley/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn space_pirate_rush_flight(boma: &mut BattleObjectModuleAccessor, status_kind: i32, situation_kind: i32, stick_x: f32) { if status_kind == *FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FALL { let motion_value1 = 0.9; @@ -162,6 +161,7 @@ pub unsafe fn ridley_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, ridley_frame_wrapper); } diff --git a/fighters/ridley/src/status/special_lw.rs b/fighters/ridley/src/status/special_lw.rs index 29ceb35667..590008fca3 100644 --- a/fighters/ridley/src/status/special_lw.rs +++ b/fighters/ridley/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND diff --git a/fighters/ridley/src/status/special_n.rs b/fighters/ridley/src/status/special_n.rs index 265a770bb8..031d12752e 100644 --- a/fighters/ridley/src/status/special_n.rs +++ b/fighters/ridley/src/status/special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); diff --git a/fighters/ridley/src/status/special_s.rs b/fighters/ridley/src/status/special_s.rs index 78b1ac24fb..d2db3d3e7a 100644 --- a/fighters/ridley/src/status/special_s.rs +++ b/fighters/ridley/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; unsafe extern "C" fn special_s_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue { let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(fighter.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(fighter.module_accessor)) + WorkModule::get_param_int(fighter.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; diff --git a/fighters/robot/src/status/special_s.rs b/fighters/robot/src/status/special_s.rs index 53f5924e88..ea7fca38ea 100644 --- a/fighters/robot/src/status/special_s.rs +++ b/fighters/robot/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S diff --git a/fighters/rockman/src/status/mod.rs b/fighters/rockman/src/status/mod.rs index 4981a3e83a..18eeba540a 100644 --- a/fighters/rockman/src/status/mod.rs +++ b/fighters/rockman/src/status/mod.rs @@ -3,6 +3,7 @@ use globals::*; // status script import pub mod helper; +mod rebirth; mod walk; mod attack; mod attack_s3; @@ -48,21 +49,10 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { fighter.global_table[USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(special_lw_uniq as *const () as _)); } -unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("appeal_lw_l"), - hash40("appeal_lw_r") - ].contains(&mot) { - VisibilityModule::set_whole(fighter.module_accessor, true); - } - fighter.status_end_Rebirth(); - 0.into() -} - pub fn install(agent: &mut Agent) { agent.on_start(on_start); - agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); + + rebirth::install(agent); walk::install(agent); diff --git a/fighters/rockman/src/status/rebirth.rs b/fighters/rockman/src/status/rebirth.rs new file mode 100644 index 0000000000..a7ff0220e7 --- /dev/null +++ b/fighters/rockman/src/status/rebirth.rs @@ -0,0 +1,17 @@ +use super::*; + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("appeal_lw_l"), + hash40("appeal_lw_r") + ].contains(&mot) { + VisibilityModule::set_whole(fighter.module_accessor, true); + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(smashline::End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); +} diff --git a/fighters/roy/src/acmd/aerials.rs b/fighters/roy/src/acmd/aerials.rs index 81c97f502d..d9d2aa7dbe 100644 --- a/fighters/roy/src/acmd/aerials.rs +++ b/fighters/roy/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -48,7 +47,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -137,7 +135,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -184,7 +181,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); PostureModule::reverse_lr(boma); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -251,7 +247,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -285,7 +280,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { //if is_excute(fighter) { // StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); //} - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -324,7 +318,6 @@ unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_roy_attackair_l01")); } - } unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { @@ -349,12 +342,16 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairlw", sound_attackairlw); diff --git a/fighters/roy/src/acmd/ground.rs b/fighters/roy/src/acmd/ground.rs index 9f79ad05ae..c5259c59c8 100644 --- a/fighters/roy/src/acmd/ground.rs +++ b/fighters/roy/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -15,7 +14,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -32,10 +30,10 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/roy/src/acmd/other.rs b/fighters/roy/src/acmd/other.rs index de124b1993..2c97ce9804 100644 --- a/fighters/roy/src/acmd/other.rs +++ b/fighters/roy/src/acmd/other.rs @@ -1,57 +1,6 @@ - use super::*; -unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } -} - -unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -91,31 +40,6 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } - } - frame(lua_state, 1.1); - if is_excute(agent) { - let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { - app::sv_math::rand(hash40("fighter"), 3) - } else { - 0 - }; - if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02"));} - } -} - unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -123,7 +47,6 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -134,7 +57,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -164,7 +86,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { @@ -177,7 +98,6 @@ unsafe extern "C" fn game_appeallwr(agent: &mut L2CAgentBase) { VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } - } unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { @@ -185,19 +105,16 @@ unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 14.0); if is_excute(agent) { - - if(ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI)){ + if ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_APPEAL_HI) { VarModule::on_flag(agent.battle_object, vars::roy::instance::TRAIL_EFFECT); } } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -211,7 +128,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -222,34 +138,7 @@ unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_jumpback(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_jump01")); - } -} - -unsafe extern "C" fn sound_jumpfront(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_jump01")); - } -} - -unsafe extern "C" fn sound_jumpbackmini(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_jump01")); - } -} - -unsafe extern "C" fn sound_jumpfrontmini(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_jump(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -259,20 +148,24 @@ unsafe extern "C" fn sound_jumpfrontmini(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damageflyhi); - agent.acmd("sound_damageflylw", sound_damageflylw); - agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); - agent.acmd("sound_damageflytop", sound_damageflytop); + agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_appeallwr", game_appeallwr); agent.acmd("game_appeallwl", game_appeallwl); agent.acmd("game_escapeair", game_escapeair); - agent.acmd("sound_jumpback", sound_jumpback); - agent.acmd("sound_jumpfront", sound_jumpfront); - agent.acmd("sound_jumpbackmini", sound_jumpbackmini); - agent.acmd("sound_jumpfrontmini", sound_jumpfrontmini); + + agent.acmd("sound_jumpback", sound_jump); + agent.acmd("sound_jumpfront", sound_jump); + agent.acmd("sound_jumpbackmini", sound_jump); + agent.acmd("sound_jumpfrontmini", sound_jump); } diff --git a/fighters/roy/src/acmd/smashes.rs b/fighters/roy/src/acmd/smashes.rs index 92b88acd56..e5db0dc65d 100644 --- a/fighters/roy/src/acmd/smashes.rs +++ b/fighters/roy/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -29,7 +28,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { @@ -60,7 +58,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AFTER_IMAGE_OFF(agent, 6); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -130,7 +127,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -160,7 +156,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -253,7 +248,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/roy/src/acmd/specials.rs b/fighters/roy/src/acmd/specials.rs deleted file mode 100644 index 25afe1b6ae..0000000000 --- a/fighters/roy/src/acmd/specials.rs +++ /dev/null @@ -1,1342 +0,0 @@ - -use super::*; - -unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.625); - } - frame(lua_state, 9.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 2.5); - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - - EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(agent, 1.25); - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 2); - } - frame(lua_state, 18.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(agent) { - COL_NORMAL(agent); - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn sound_specialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_roy_special_n01")); - PLAY_SE(agent, Hash40::new("se_roy_special_n02")); - PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); - PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); - } -} - -unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); - } - frame(lua_state, 9.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 34.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 0.625); - } - frame(lua_state, 9.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 2.5); - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 11.0); - if is_excute(agent) { - FT_MOTION_RATE(agent, 1.0); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - - EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(agent, 1.25); - EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); - LAST_EFFECT_SET_RATE(agent, 1.25); - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); - //LAST_EFFECT_SET_RATE(fighter, 1.5); - LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AFTER_IMAGE_OFF(agent, 2); - } - frame(lua_state, 18.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); - } - frame(lua_state, 38.0); - if is_excute(agent) { - COL_NORMAL(agent); - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); - EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); - } - -} - -unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 10.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_roy_special_n01")); - PLAY_SE(agent, Hash40::new("se_roy_special_n02")); - PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); - PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); - } -} - -unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); - } - frame(lua_state, 9.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); - RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } - frame(lua_state, 34.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); - } -} - -unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - } - frame(lua_state, 9.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - } - frame(lua_state, 10.0); - if is_excute(agent) { - AttackModule::clear(boma, 1, false); - AttackModule::clear(boma, 2, false); - ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - } - frame(lua_state, 14.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -//SIDE B STARTS HERE ----------------------------------------------------------------------------------------------------------------------------------------------- - -unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 7.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 8.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 9.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 27.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn effect_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 6.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 12.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specialairs1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack10")); - } - frame(lua_state, 6.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s01")); - } -} - -unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 5.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 33.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 12.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack01")); - } - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s02h")); - } -} - -unsafe extern "C" fn expression_specials2hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 12.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - AttackModule::clear_all(boma); - } - frame(lua_state, 34.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - -} - -unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack02")); - } - frame(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s02l")); - } -} - -unsafe extern "C" fn expression_specials2lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 14.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); - } -} - -unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 17.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 18.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 42.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 13.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 21.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack07")); - } - frame(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s03h")); - } -} - -unsafe extern "C" fn expression_specials3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 12.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 13.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); - } - frame(lua_state, 14.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 15.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 37.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 11.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 18.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack04")); - } - frame(lua_state, 10.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s03s")); - } -} - -unsafe extern "C" fn expression_specials3s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 10.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 11.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 16.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 22.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } - frame(lua_state, 23.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); - } - frame(lua_state, 36.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); - } -} - -unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 16.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 28.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack03")); - } - frame(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s03l")); - } -} - -unsafe extern "C" fn expression_specials3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 15.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); - } -} - -unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 20.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 12.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 15.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 22.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack05")); - } - frame(lua_state, 9.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_special_s04h")); - - } -} - -unsafe extern "C" fn expression_specials4hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 3.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state,15.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); - } - frame(lua_state, 33.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); - } -} - -unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 26.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 17.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 20.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 27.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack06")); - } - frame(lua_state, 16.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_smash_s01")); - - } -} - -unsafe extern "C" fn expression_specials4s(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 20.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); - } -} - -unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 37.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 39.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 7.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 13.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(agent, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); - LAST_EFFECT_SET_RATE(agent, 1.3); - } - frame(lua_state, 37.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); - AFTER_IMAGE_OFF(agent, 2); - EFFECT(agent, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); - LAST_EFFECT_SET_RATE(agent, 1.5); - } -} - -unsafe extern "C" fn sound_specials4lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_h")); - } - frame(lua_state, 13.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_smash_h01")); - } - frame(lua_state, 37.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_smash_h02")); - } -} - -unsafe extern "C" fn game_specials4back(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - PostureModule::reverse_lr(boma); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - } - frame(lua_state, 19.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - - } - frame(lua_state, 22.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_specials4back(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 15.0); - if is_excute(agent) { - AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); - EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); - } - frame(lua_state, 18.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 32.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); - AFTER_IMAGE_OFF(agent, 2); - } -} - -unsafe extern "C" fn sound_specials4back(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_roy_attack08")); - } - frame(lua_state, 16.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_roy_swing_ll")); - - } -} - -unsafe extern "C" fn expression_specials4back(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 2.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 18.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); - } -} - -//SIDE B ENDS HERE ---------------------------------------------------------------------------------------------------------------------------------------------------- - -unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - GroundModule::select_cliff_hangdata(boma, 1); - } - frame(lua_state, 4.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); - } - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 0.65); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - wait(lua_state, 1.0); - if is_excute(agent) { - damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); - ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 30.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 33.0); - if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } -} - -unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - GroundModule::select_cliff_hangdata(boma, 1); - } - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 6.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); - } - frame(lua_state, 9.0); - FT_MOTION_RATE(agent, 0.65); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - wait(lua_state, 1.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); - } - wait(lua_state, 1.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_no_damage_fly_smoke_all(boma, true, false); - } - frame(lua_state, 20.0); - if is_excute(agent) { - ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::clear(boma, 1, false); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); - } - frame(lua_state, 30.0); - FT_MOTION_RATE(agent, 15.0/(40.0-30.0)); - frame(lua_state, 33.0); - if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); - } - frame(lua_state, 40.0); - FT_MOTION_RATE(agent, 1.0); -} - -unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 8.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); - WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); - } - frame(lua_state, 21.0); - if is_excute(agent) { - FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); - WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); - } - -} - -unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); - frame(lua_state, 5.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); - AttackModule::set_force_reaction(boma, 0, true, false); - AttackModule::set_force_reaction(boma, 1, true, false); - AttackModule::set_force_reaction(boma, 2, true, false); - if WorkModule::is_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { - AttackModule::set_optional_hit_sound(boma, 0, smash::phx::Hash40::new("se_roy_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 1, smash::phx::Hash40::new("se_roy_criticalhit")); - AttackModule::set_optional_hit_sound(boma, 2, smash::phx::Hash40::new("se_roy_criticalhit")); - } - } - frame(lua_state, 7.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_specialnend", game_specialnend); - agent.acmd("effect_specialnend", effect_specialnend); - agent.acmd("sound_specialnend", sound_specialnend); - agent.acmd("expression_specialnend", expression_specialnend); - agent.acmd("game_specialnend2", game_specialnend2); - agent.acmd("game_specialnend3", game_specialnend3); - agent.acmd("game_specialairnend", game_specialairnend); - agent.acmd("effect_specialairnend", effect_specialairnend); - agent.acmd("sound_specialairnend", sound_specialairnend); - agent.acmd("expression_specialairnend",expression_specialairnend,); - agent.acmd("game_specialairnend2", game_specialairnend2); - agent.acmd("game_specialairnend3", game_specialairnend3); - agent.acmd("game_specials1", game_specialairs1); - agent.acmd("effect_specials1", effect_specialairs1); - agent.acmd("sound_specials1", sound_specialairs1); - agent.acmd("expression_specials1", expression_specials1); - agent.acmd("game_specialairs1", game_specialairs1); - agent.acmd("effect_specialairs1", effect_specialairs1); - agent.acmd("sound_specialairs1", sound_specialairs1); - agent.acmd("expression_specialairs1", expression_specials1); - agent.acmd("game_specials2hi", game_specials2hi); - agent.acmd("effect_specials2hi", effect_specials2hi); - agent.acmd("sound_specials2hi", sound_specials2hi); - agent.acmd("expression_specials2hi", expression_specials2hi); - agent.acmd("game_specialairs2hi", game_specials2hi); - agent.acmd("effect_specialairs2hi", effect_specials2hi); - agent.acmd("sound_specialairs2hi", sound_specials2hi); - agent.acmd("expression_specialairs2hi", expression_specials2hi); - agent.acmd("game_specials2lw", game_specials2lw); - agent.acmd("effect_specials2lw", effect_specials2lw); - agent.acmd("sound_specials2lw", sound_specials2lw); - agent.acmd("expression_specials2lw", expression_specials2lw); - agent.acmd("game_specialairs2lw", game_specials2lw); - agent.acmd("effect_specialairs2lw", effect_specials2lw); - agent.acmd("sound_specialairs2lw", sound_specials2lw); - agent.acmd("expression_specialairs2lw", expression_specials2lw); - agent.acmd("game_specials3hi", game_specials3hi); - agent.acmd("effect_specials3hi", effect_specials3hi); - agent.acmd("sound_specials3hi", sound_specials3hi); - agent.acmd("expression_specials3hi", expression_specials3hi); - agent.acmd("game_specialairs3hi", game_specials3hi); - agent.acmd("effect_specialairs3hi", effect_specials3hi); - agent.acmd("sound_specialairs3hi", sound_specials3hi); - agent.acmd("expression_specialairs3hi", expression_specials3hi); - agent.acmd("game_specials3s", game_specials3s); - agent.acmd("effect_specials3s", effect_specials3s); - agent.acmd("sound_specials3s", sound_specials3s); - agent.acmd("expression_specials3s", expression_specials3s); - agent.acmd("game_specialairs3s", game_specials3s); - agent.acmd("effect_specialairs3s", effect_specials3s); - agent.acmd("sound_specialairs3s", sound_specials3s); - agent.acmd("expression_specialairs3s", expression_specials3s); - agent.acmd("game_specials3lw", game_specials3lw); - agent.acmd("effect_specials3lw", effect_specials3lw); - agent.acmd("sound_specials3lw", sound_specials3lw); - agent.acmd("expression_specials3lw", expression_specials3lw); - agent.acmd("game_specialairs3lw", game_specials3lw); - agent.acmd("effect_specialairs3lw", effect_specials3lw); - agent.acmd("sound_specialairs3lw", sound_specials3lw); - agent.acmd("expression_specialairs3lw", expression_specials3lw); - agent.acmd("game_specials4hi", game_specials4hi); - agent.acmd("effect_specials4hi", effect_specials4hi); - agent.acmd("sound_specials4hi", sound_specials4hi); - agent.acmd("expression_specials4hi", expression_specials4hi); - agent.acmd("game_specialairs4hi", game_specials4hi); - agent.acmd("effect_specialairs4hi", effect_specials4hi); - agent.acmd("sound_specialairs4hi", sound_specials4hi); - agent.acmd("expression_specialairs4hi", expression_specials4hi); - agent.acmd("game_specials4s", game_specials4s); - agent.acmd("effect_specials4s", effect_specials4s); - agent.acmd("sound_specials4s", sound_specials4s); - agent.acmd("expression_specials4s", expression_specials4s); - agent.acmd("game_specialairs4s", game_specials4s); - agent.acmd("effect_specialairs4s", effect_specials4s); - agent.acmd("sound_specialairs4s", sound_specials4s); - agent.acmd("expression_specialairs4s", expression_specials4s); - agent.acmd("game_specials4lw", game_specials4lw); - agent.acmd("effect_specials4lw", effect_specials4lw); - agent.acmd("sound_specials4lw", sound_specials4lw); - agent.acmd("game_specialairs4lw", game_specials4lw); - agent.acmd("effect_specialairs4lw", effect_specials4lw); - agent.acmd("sound_specialairs4lw", sound_specials4lw); - agent.acmd("game_specials4back", game_specials4back); - agent.acmd("effect_specials4back", effect_specials4back); - agent.acmd("sound_specials4back", sound_specials4back); - agent.acmd("expression_specials4back", expression_specials4back); - agent.acmd("game_specialairs4back", game_specials4back); - agent.acmd("effect_specialairs4back", effect_specials4back); - agent.acmd("sound_specialairs4back", sound_specials4back); - agent.acmd("expression_specialairs4back", expression_specials4back); - agent.acmd("game_specialhi", game_specialhi); - agent.acmd("game_specialairhi", game_specialairhi); - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_speciallw); - agent.acmd("game_speciallwhit", game_speciallwhit); - agent.acmd("game_specialairlwhit", game_speciallwhit); -} diff --git a/fighters/roy/src/acmd/specials/mod.rs b/fighters/roy/src/acmd/specials/mod.rs new file mode 100644 index 0000000000..bea5dd7cb7 --- /dev/null +++ b/fighters/roy/src/acmd/specials/mod.rs @@ -0,0 +1,488 @@ +use super::*; + +mod special_s1; +mod special_s2; +mod special_s3; +mod special_s4; + +unsafe extern "C" fn game_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); + } + frame(lua_state, 9.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +unsafe extern "C" fn expression_specialnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + } + frame(lua_state, 9.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +unsafe extern "C" fn game_specialnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 0.625); + } + frame(lua_state, 9.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.5, 0.0, 0.0, 2.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 4.0, 0.0, 0.0, 9.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 11.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_erupution_hold"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + + EFFECT_FOLLOW(agent, Hash40::new("roy_attack_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + EFFECT_FOLLOW(agent, Hash40::new("roy_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.8, true); + LAST_EFFECT_SET_RATE(agent, 1.25); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword1"), Hash40::new("tex_roy_sword2"), 7, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.3, 0.2); + } + frame(lua_state, 10.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_main"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + //EFFECT(fighter, Hash40::new("roy_eruption_bomb_start"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 1.05, 0, 0, 0, 0, 0, 0, true); + //LAST_EFFECT_SET_RATE(fighter, 1.5); + LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_fire"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_attack_fire"), false, false); + } + frame(lua_state, 38.0); + if is_excute(agent) { + COL_NORMAL(agent); + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); + } +} + +unsafe extern "C" fn sound_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 10.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_roy_special_n01")); + PLAY_SE(agent, Hash40::new("se_roy_special_n02")); + PLAY_SE(agent, Hash40::new("vc_roy_special_n02")); + PLAY_SE(agent, Hash40::new("se_roy_attackl_s01")); + } +} + +unsafe extern "C" fn expression_specialairnend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + //AREA_WIND_2ND_arg10(fighter, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40); + } + frame(lua_state, 9.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5); + RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + //QUAKE(fighter, *CAMERA_QUAKE_KIND_M); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AreaModule::erase_wind(boma, 0); + } + frame(lua_state, 34.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8); + } +} + +unsafe extern "C" fn game_specialairnend2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialairnend3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::set_consider_ground_friction(boma, false, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + } + frame(lua_state, 9.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 5.0, 361, 110, 0, 40, 4.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 1.1, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 361, 110, 0, 40, 3.5, 0.0, 0.0, 7.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + } + frame(lua_state, 10.0); + if is_excute(agent) { + AttackModule::clear(boma, 1, false); + AttackModule::clear(boma, 2, false); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 110, 0, 40, 8.7, 0.0, 8.5, 15.7, Some(0.0), Some(9.0), Some(15.9), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + } + frame(lua_state, 14.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, 1); + } + frame(lua_state, 4.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_DAMAGE_POWER, 10); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 84, 100, 120, 0, 5.1, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + damage!(agent, *MA_MSC_DAMAGE_DAMAGE_NO_REACTION, *DAMAGE_NO_REACTION_MODE_NORMAL, 0); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 6.0, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 367, 100, 85, 0, 5.3, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.5, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 33.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } +} + +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::select_cliff_hangdata(boma, 1); + } + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 6.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_SPECIAL_HI_SET_LR); + } + frame(lua_state, 9.0); + FT_MOTION_RATE(agent, 0.65); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 84, 100, 120, 0, 4.6, 0.0, 11.0, 10.0, Some(0.0), Some(7.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + wait(lua_state, 1.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_HI_FLAG_TRANS_MOVE); + } + wait(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.6, 0.0, 17.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 367, 100, 85, 0, 5.0, 0.0, 12.0, 10.0, None, None, None, 0.75, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 4.0, 60, 130, 0, 40, 6.3, 0.0, 17.0, 10.0, Some(0.0), Some(12.0), Some(10.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::clear(boma, 1, false); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ON_DROP_BOTH_SIDES); + } + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 15.0/(40.0-30.0)); + frame(lua_state, 33.0); + if is_excute(agent) { + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + } + frame(lua_state, 40.0); + FT_MOTION_RATE(agent, 1.0); +} + +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); + WorkModule::on_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); + } + frame(lua_state, 21.0); + if is_excute(agent) { + FT_MOTION_RATE_RANGE(agent, 21.0, 68.0, 39.0); + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SHIELD); + WorkModule::off_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_APPLY_POWERUP_MOTION_RATE); + } +} + +unsafe extern "C" fn game_speciallwhit(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 4.0); + frame(lua_state, 5.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 3.0, 0.0, 19.0, 16.5, Some(0.0), Some(21.0), Some(10.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 4.0, 0.0, 15.0, 18.5, Some(0.0), Some(16.0), Some(8.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 8.0, 35, 100, 0, 40, 7.5, 0.0, 8.0, 18.0, Some(0.0), Some(8.0), Some(3.0), 1.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_force_reaction(boma, 1, true, false); + AttackModule::set_force_reaction(boma, 2, true, false); + if WorkModule::is_flag(boma, *FIGHTER_ROY_STATUS_SPECIAL_LW_FLAG_SPECIAL_EFFECT) { + AttackModule::set_optional_hit_sound(boma, 0, smash::phx::Hash40::new("se_roy_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 1, smash::phx::Hash40::new("se_roy_criticalhit")); + AttackModule::set_optional_hit_sound(boma, 2, smash::phx::Hash40::new("se_roy_criticalhit")); + } + } + frame(lua_state, 7.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialnend", game_specialnend); + agent.acmd("effect_specialnend", effect_specialnend); + agent.acmd("sound_specialnend", sound_specialnend); + agent.acmd("expression_specialnend", expression_specialnend); + agent.acmd("game_specialnend2", game_specialnend2); + agent.acmd("game_specialnend3", game_specialnend3); + agent.acmd("game_specialairnend", game_specialairnend); + agent.acmd("effect_specialairnend", effect_specialairnend); + agent.acmd("sound_specialairnend", sound_specialairnend); + agent.acmd("expression_specialairnend",expression_specialairnend,); + agent.acmd("game_specialairnend2", game_specialairnend2); + agent.acmd("game_specialairnend3", game_specialairnend3); + + special_s1::install(agent); + special_s2::install(agent); + special_s3::install(agent); + special_s4::install(agent); + + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_speciallw); + agent.acmd("game_speciallwhit", game_speciallwhit); + agent.acmd("game_specialairlwhit", game_speciallwhit); +} diff --git a/fighters/roy/src/acmd/specials/special_s1.rs b/fighters/roy/src/acmd/specials/special_s1.rs new file mode 100644 index 0000000000..cca1d6242a --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s1.rs @@ -0,0 +1,89 @@ +use super::*; + +unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 5.0, 60, 25, 0, 50, 2.34, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 5.0, 80, 25, 0, 40, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 5.0, 96, 25, 0, 40, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 85, 25, 0, 40, 3.91, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 7.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 8.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 9.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 27.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 6.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 12.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack10")); + } + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s01")); + } +} + +unsafe extern "C" fn expression_specials1(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 5.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials1", game_specials1); + agent.acmd("effect_specials1", effect_specials1); + agent.acmd("sound_specials1", sound_specials1); + agent.acmd("expression_specials1", expression_specials1); + agent.acmd("game_specialairs1", game_specials1); + agent.acmd("effect_specialairs1", effect_specials1); + agent.acmd("sound_specialairs1", sound_specials1); + agent.acmd("expression_specialairs1", expression_specials1); +} diff --git a/fighters/roy/src/acmd/specials/special_s2.rs b/fighters/roy/src/acmd/specials/special_s2.rs new file mode 100644 index 0000000000..11a4cbefc8 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s2.rs @@ -0,0 +1,177 @@ +use super::*; + +unsafe extern "C" fn game_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 96, 30, 0, 50, 3.52, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 96, 30, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 96, 30, 0, 50, 5.47, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 96, 30, 0, 50, 5.08, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 33.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 12.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 20.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack01")); + } + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02h")); + } +} + +unsafe extern "C" fn expression_specials2hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 12.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +unsafe extern "C" fn game_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 40, 35, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 50, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 80, 50, 0, 20, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 105, 50, 0, 20, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + AttackModule::clear_all(boma); + } + frame(lua_state, 34.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack02")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s02l")); + } +} + +unsafe extern "C" fn expression_specials2lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 14.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials2hi", game_specials2hi); + agent.acmd("effect_specials2hi", effect_specials2hi); + agent.acmd("sound_specials2hi", sound_specials2hi); + agent.acmd("expression_specials2hi", expression_specials2hi); + agent.acmd("game_specialairs2hi", game_specials2hi); + agent.acmd("effect_specialairs2hi", effect_specials2hi); + agent.acmd("sound_specialairs2hi", sound_specials2hi); + agent.acmd("expression_specialairs2hi", expression_specials2hi); + + agent.acmd("game_specials2lw", game_specials2lw); + agent.acmd("effect_specials2lw", effect_specials2lw); + agent.acmd("sound_specials2lw", sound_specials2lw); + agent.acmd("expression_specials2lw", expression_specials2lw); + agent.acmd("game_specialairs2lw", game_specials2lw); + agent.acmd("effect_specialairs2lw", effect_specials2lw); + agent.acmd("sound_specialairs2lw", sound_specials2lw); + agent.acmd("expression_specialairs2lw", expression_specials2lw); +} diff --git a/fighters/roy/src/acmd/specials/special_s3.rs b/fighters/roy/src/acmd/specials/special_s3.rs new file mode 100644 index 0000000000..437633c222 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s3.rs @@ -0,0 +1,275 @@ +use super::*; + +unsafe extern "C" fn game_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 290, 65, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 290, 65, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 280, 44, 0, 36, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 6.0, 60, 65, 0, 60, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 6.0, 60, 65, 0, 60, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 60, 65, 0, 60, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 17.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 18.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 42.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 8.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 21.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack07")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03h")); + } +} + +unsafe extern "C" fn expression_specials3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 12.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 13.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +unsafe extern "C" fn game_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 9.0, 361, 120, 0, 50, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 9.0, 361, 120, 0, 50, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ROY_HIT, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 7.0, 361, 120, 0, 50, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_SWORD); + } + frame(lua_state, 14.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 15.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 37.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 11.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 18.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack04")); + } + frame(lua_state, 10.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03s")); + } +} + +unsafe extern "C" fn expression_specials3s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 10.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 11.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +unsafe extern "C" fn game_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 16.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 75, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 90, 100, 30, 0, 3.91, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 0, 4.69, 0.0, 0.0, 2.2, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 100, 30, 30, 5.86, 0.0, 0.0, 9.0, None, None, None, 0.75, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 22.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 4.0, 64, 111, 0, 70, 4.69, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 5.86, 0.0, 0.0, 2.2, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 4.0, 64, 111, 0, 70, 7.03, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } + frame(lua_state, 23.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_MOTION_CHANGE_ENABLE); + } + frame(lua_state, 36.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_MARTH_STATUS_SPECIAL_S_FLAG_INPUT_CHECK); + } +} + +unsafe extern "C" fn effect_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 16.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 28.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack03")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s03l")); + } +} + +unsafe extern "C" fn expression_specials3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 15.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials3hi", game_specials3hi); + agent.acmd("effect_specials3hi", effect_specials3hi); + agent.acmd("sound_specials3hi", sound_specials3hi); + agent.acmd("expression_specials3hi", expression_specials3hi); + agent.acmd("game_specialairs3hi", game_specials3hi); + agent.acmd("effect_specialairs3hi", effect_specials3hi); + agent.acmd("sound_specialairs3hi", sound_specials3hi); + agent.acmd("expression_specialairs3hi", expression_specials3hi); + + agent.acmd("game_specials3s", game_specials3s); + agent.acmd("effect_specials3s", effect_specials3s); + agent.acmd("sound_specials3s", sound_specials3s); + agent.acmd("expression_specials3s", expression_specials3s); + agent.acmd("game_specialairs3s", game_specials3s); + agent.acmd("effect_specialairs3s", effect_specials3s); + agent.acmd("sound_specialairs3s", sound_specials3s); + agent.acmd("expression_specialairs3s", expression_specials3s); + + agent.acmd("game_specials3lw", game_specials3lw); + agent.acmd("effect_specials3lw", effect_specials3lw); + agent.acmd("sound_specials3lw", sound_specials3lw); + agent.acmd("expression_specials3lw", expression_specials3lw); + agent.acmd("game_specialairs3lw", game_specials3lw); + agent.acmd("effect_specialairs3lw", effect_specials3lw); + agent.acmd("sound_specialairs3lw", sound_specials3lw); + agent.acmd("expression_specialairs3lw", expression_specials3lw); +} diff --git a/fighters/roy/src/acmd/specials/special_s4.rs b/fighters/roy/src/acmd/specials/special_s4.rs new file mode 100644 index 0000000000..5a7b7b2699 --- /dev/null +++ b/fighters/roy/src/acmd/specials/special_s4.rs @@ -0,0 +1,328 @@ +use super::*; + +unsafe extern "C" fn game_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 11.0, 75, 143, 0, 35, 2.34, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 11.0, 75, 143, 0, 35, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 11.0, 75, 143, 0, 35, 4.25, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 9.0, 75, 143, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 20.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 12.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_blue"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_blue"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 15.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 22.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_blue"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack05")); + } + frame(lua_state, 9.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_special_s04h")); + } +} + +unsafe extern "C" fn expression_specials4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state,15.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 3); + } + frame(lua_state, 33.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 4); + } +} + +unsafe extern "C" fn game_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 8.0, 8.0); + } + frame(lua_state, 20.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("waist"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 12.0, 361, 145, 0, 35, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 12.0, 361, 145, 0, 35, 3.5, 0.0, 0.0, 2.2, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 361, 145, 0, 35, 3.91, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 26.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 17.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 20.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 27.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack06")); + } + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_s01")); + + } +} + +unsafe extern "C" fn expression_specials4s(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_X_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 20.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + } +} + +unsafe extern "C" fn game_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 70, 40, 0, 2, 3.13, 0.0, 0.0, 0.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 3.91, 0.0, 0.0, 2.2, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 365, 40, 0, 2, 4.69, 0.0, 0.0, 9.0, None, None, None, 0.50, 0.75, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 37.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("claviclel"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("armr"), 3.0, 50, 172, 0, 50, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 4.69, 0.0, 0.0, 2.2, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 3.0, 50, 172, 0, 50, 5.86, 0.0, 0.0, 9.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 39.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 7.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_green"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_green"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("roy_smash_fire"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 0.9, true); + LAST_EFFECT_SET_RATE(agent, 1.3); + } + frame(lua_state, 37.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_green"), false, true); + AFTER_IMAGE_OFF(agent, 2); + EFFECT(agent, Hash40::new("roy_smash_bomb"), Hash40::new("sword1"), 0, 0, 7, 90, 0, 0, 0.48, 0, 0, 0, 0, 0, 0, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } +} + +unsafe extern "C" fn sound_specials4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_roy_rnd_attack_smash_h")); + } + frame(lua_state, 13.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h01")); + } + frame(lua_state, 37.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_smash_h02")); + } +} + +unsafe extern "C" fn game_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + PostureModule::reverse_lr(boma); + } + frame(lua_state, 18.0); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("claviclel"), 11.0, 40, 119, 0, 30, 3.13, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.0, 40, 119, 0, 30, 3.91, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword1"), 11.0, 40, 119, 0, 30, 4.5, 0.0, 0.0, 2.2, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + } + frame(lua_state, 19.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 40, 119, 0, 30, 2.75, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-6.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword1"), 9.0, 40, 119, 0, 30, 4.25, 0.0, 0.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 2, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_SWORD); + + } + frame(lua_state, 22.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn effect_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 15.0); + if is_excute(agent) { + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_roy_sword_red"), Hash40::new("tex_roy_sword2"), 20, Hash40::new("sword1"), 0.0, 0.0, -0.8, Hash40::new("sword1"), -0.0, -0.0, 14.5, true, Hash40::new("roy_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.5, 0.2); + EFFECT_FOLLOW(agent, Hash40::new("roy_sword_red"), Hash40::new("sword1"), 0, 0, 0, 0, 0, 0, 1, true); + } + frame(lua_state, 18.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 32.0); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("roy_sword_red"), false, true); + AFTER_IMAGE_OFF(agent, 2); + } +} + +unsafe extern "C" fn sound_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_roy_attack08")); + } + frame(lua_state, 16.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_roy_swing_ll")); + } +} + +unsafe extern "C" fn expression_specials4back(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword1"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_X), AttackDirectionAxis(*ATTACK_DIRECTION_Y_MINUS)); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 2.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 18.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_specials4hi", game_specials4hi); + agent.acmd("effect_specials4hi", effect_specials4hi); + agent.acmd("sound_specials4hi", sound_specials4hi); + agent.acmd("expression_specials4hi", expression_specials4hi); + agent.acmd("game_specialairs4hi", game_specials4hi); + agent.acmd("effect_specialairs4hi", effect_specials4hi); + agent.acmd("sound_specialairs4hi", sound_specials4hi); + agent.acmd("expression_specialairs4hi", expression_specials4hi); + + agent.acmd("game_specials4s", game_specials4s); + agent.acmd("effect_specials4s", effect_specials4s); + agent.acmd("sound_specials4s", sound_specials4s); + agent.acmd("expression_specials4s", expression_specials4s); + agent.acmd("game_specialairs4s", game_specials4s); + agent.acmd("effect_specialairs4s", effect_specials4s); + agent.acmd("sound_specialairs4s", sound_specials4s); + agent.acmd("expression_specialairs4s", expression_specials4s); + + agent.acmd("game_specials4lw", game_specials4lw); + agent.acmd("effect_specials4lw", effect_specials4lw); + agent.acmd("sound_specials4lw", sound_specials4lw); + agent.acmd("game_specialairs4lw", game_specials4lw); + agent.acmd("effect_specialairs4lw", effect_specials4lw); + agent.acmd("sound_specialairs4lw", sound_specials4lw); + + agent.acmd("game_specials4back", game_specials4back); + agent.acmd("effect_specials4back", effect_specials4back); + agent.acmd("sound_specials4back", sound_specials4back); + agent.acmd("expression_specials4back", expression_specials4back); + agent.acmd("game_specialairs4back", game_specials4back); + agent.acmd("effect_specialairs4back", effect_specials4back); + agent.acmd("sound_specialairs4back", sound_specials4back); + agent.acmd("expression_specialairs4back", expression_specials4back); +} diff --git a/fighters/ryu/src/acmd/aerials.rs b/fighters/ryu/src/acmd/aerials.rs index 672077e19e..352b899267 100644 --- a/fighters/ryu/src/acmd/aerials.rs +++ b/fighters/ryu/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -70,7 +69,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { agent.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL); agent.off_flag(*FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -144,7 +142,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.off_flag(*FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -256,10 +253,14 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/ryu/src/acmd/finals.rs b/fighters/ryu/src/acmd/finals.rs index 8e1a256fbb..2bae99ec38 100644 --- a/fighters/ryu/src/acmd/finals.rs +++ b/fighters/ryu/src/acmd/finals.rs @@ -137,6 +137,7 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_final", game_final); agent.acmd("game_finalair", game_final); + agent.acmd("game_finalhit", game_finalhit); agent.acmd("game_finalairhit", game_finalhit); } diff --git a/fighters/ryu/src/acmd/ground.rs b/fighters/ryu/src/acmd/ground.rs index ece3607b58..93bee28eba 100644 --- a/fighters/ryu/src/acmd/ground.rs +++ b/fighters/ryu/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11w(agent: &mut L2CAgentBase) { @@ -331,19 +330,24 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11w", game_attack11w); agent.acmd("effect_attack11w", effect_attack11w); agent.acmd("sound_attack11w", sound_attack11w); + agent.acmd("game_attack12", game_attack12); agent.acmd("effect_attack12", effect_attack12); agent.acmd("sound_attack12", sound_attack12); + agent.acmd("game_attack13", game_attack13); agent.acmd("effect_attack13", effect_attack13); agent.acmd("sound_attack13", sound_attack13); + agent.acmd("game_attack11s", game_attack11s); agent.acmd("game_attack11nears", game_attack11s); agent.acmd("effect_attack11s", effect_attack11nears); agent.acmd("effect_attack11nears", effect_attack11nears); + agent.acmd("game_attack12s", game_attack12s); agent.acmd("effect_attack12s", effect_attack12s); agent.acmd("sound_attack12s", sound_attack12s); agent.acmd("expression_attack12s", expression_attack12s); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/ryu/src/acmd/other.rs b/fighters/ryu/src/acmd/other.rs index 1aa621190a..7d9d9e778c 100644 --- a/fighters/ryu/src/acmd/other.rs +++ b/fighters/ryu/src/acmd/other.rs @@ -61,14 +61,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -82,7 +80,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { agent.on_flag(*FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); diff --git a/fighters/ryu/src/acmd/smashes.rs b/fighters/ryu/src/acmd/smashes.rs index ad3b8aea3f..e02bea8f03 100644 --- a/fighters/ryu/src/acmd/smashes.rs +++ b/fighters/ryu/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -71,21 +70,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); - } - for _ in 0..34 { - wait(lua_state, 5.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); - } - } -} - unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -126,6 +110,21 @@ unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 5.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 10, 0, 4, 0, 0, 0, false); + } + for _ in 0..34 { + wait(lua_state, 5.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 0, 0, 0, true); + } + } +} + unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -208,9 +207,11 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); - agent.acmd("effect_attacks4charge", effect_attacks4charge); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("expression_attacks4", expression_attacks4); + agent.acmd("effect_attacks4charge", effect_attacks4charge); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/ryu/src/acmd/specials/mod.rs b/fighters/ryu/src/acmd/specials/mod.rs index a91a2bc69d..3a190875e2 100644 --- a/fighters/ryu/src/acmd/specials/mod.rs +++ b/fighters/ryu/src/acmd/specials/mod.rs @@ -1,4 +1,5 @@ use super::*; + mod special_command; mod special_hi; mod special_lw; diff --git a/fighters/ryu/src/acmd/specials/special_command.rs b/fighters/ryu/src/acmd/specials/special_command.rs index 41e7770557..bceb5fe000 100644 --- a/fighters/ryu/src/acmd/specials/special_command.rs +++ b/fighters/ryu/src/acmd/specials/special_command.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { diff --git a/fighters/ryu/src/acmd/specials/special_hi.rs b/fighters/ryu/src/acmd/specials/special_hi.rs index 16f2b537ba..5083d9614f 100644 --- a/fighters/ryu/src/acmd/specials/special_hi.rs +++ b/fighters/ryu/src/acmd/specials/special_hi.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -306,7 +305,6 @@ unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_specialairhi", game_specialairhi); agent.acmd("game_specialairhicommand", game_specialairhi); diff --git a/fighters/ryu/src/acmd/specials/special_lw.rs b/fighters/ryu/src/acmd/specials/special_lw.rs index a08a6f77be..7c735d7383 100644 --- a/fighters/ryu/src/acmd/specials/special_lw.rs +++ b/fighters/ryu/src/acmd/specials/special_lw.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { diff --git a/fighters/ryu/src/acmd/specials/special_n.rs b/fighters/ryu/src/acmd/specials/special_n.rs index e46564b806..27aaa65351 100644 --- a/fighters/ryu/src/acmd/specials/special_n.rs +++ b/fighters/ryu/src/acmd/specials/special_n.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { @@ -137,185 +136,6 @@ unsafe extern "C" fn effect_specialn(agent: &mut L2CAgentBase) { } } -// RYU_HADOUKEN - -unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let attr = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - Hash40::new("collision_attr_elec") - } else { - Hash40::new("collision_attr_normal") - }; - if is_excute(agent) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - agent.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - agent.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - if VarModule::get_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM) <= 0 { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())); - VarModule::set_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM, 2); - } else { - VarModule::dec_int(owner_module_accessor.object(), vars::shotos::instance::SPECIAL_N_EX_NUM); - } - } - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 67, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 66, 2.8, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); - } - wait(lua_state, 6.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 13.0, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 13.0, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(-2.5), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 9.5, 0, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 9.5, 60, 10, 0, 57, 2.5, 0.0, 1.3, -1.25, Some(0.0), Some(-1.3), Some(-1.25), 1.4, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, attr, *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_ENERGY); - } - ATK_SET_SHIELD_SETOFF_MUL_arg4(agent, 0, 1, 2, 1.13); - } -} - -unsafe extern "C" fn effect_movemws(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if agent.is_flag(*WEAPON_RYU_HADOKEN_INSTANCE_WORK_ID_FLAG_COMMAND) { - EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_bullet2"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - else{ - EFFECT_FOLLOW(agent, Hash40::new("ryu_hadoken_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, false); - } - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { - // LAST_EFFECT_SET_COLOR(fighter, 2.0, 2.0, 1.0); - EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.0, false); - EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -0.5, 0, 0, 0, 1.25, false); - EFFECT_FOLLOW(agent, Hash40::new("sys_thunder"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 1.5, false); - } - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } - } -} - -unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((agent.get_int(*WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag( - agent.battle_object, - vars::shotos::instance::IS_USE_EX_SPECIAL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) - ); - VarModule::set_flag( - agent.battle_object, - vars::shotos::instance::IS_MAGIC_SERIES_CANCEL, - VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) - ); - if VarModule::is_flag(owner_module_accessor.object(), vars::shotos::instance::IS_USE_EX_SPECIAL) { - MeterModule::drain_direct(owner_module_accessor.object(), 2.0 * MeterModule::meter_per_level(owner_module_accessor.object())) - } - - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - - ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 3.5, 0.0, 0.5, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - - AttackModule::set_add_reaction_frame(boma, 0, 10.0, false); - } - wait(lua_state, 9.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.15, 0.0, -0.9, 0.95, Some(0.0), Some(-0.9), Some(-5.15), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 1, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.3, 0.0, 0.25, 0.3, Some(0.0), Some(0.25), Some(-4.5), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 2, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 1.4, 0.0, -2.4, -1.1, Some(0.0), Some(-2.4), Some(-2.9), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - ATTACK(agent, 3, 0, Hash40::new("top"), 1.1, 366, 10, 0, 40, 2.8, 0.0, 0.0, -2.0, Some(0.0), Some(-1.0), Some(-2.0), 0.25, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - AttackModule::set_add_reaction_frame(boma, 1, 4.0, false); - } -} - -unsafe extern "C" fn effect_movespwms(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.35, false); - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_aura"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 3.0, false); - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_impact"), Hash40::new("top"), 0, 0, -1.0, 0, 0, 0, 0.5, false); - EFFECT_FOLLOW(agent, Hash40::new("ryu_savingattack_hit2"), Hash40::new("top"), 0, 0, -1.0, 180, 0, 0, 1.0, false); - } else { - EFFECT_FOLLOW(agent, Hash40::new("ryu_syakunetsu_bullet"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.65, false); - } - } -} - -unsafe extern "C" fn game_movespwms_last(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 3.0); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - ATTACK(agent, 0, 0, Hash40::new("top"), 14.1, 75, 79, 0, 65, 6.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_ENERGY); - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.3, 55, 60, 0, 58, 5.0, 0.0, 0.0, -1.0, None, None, None, 1.5, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); - } - } -} - -unsafe extern "C" fn effect_movespwms_last(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - EFFECT_FOLLOW(agent, Hash40::new("sys_flame"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.4, true); - EFFECT_FOLLOW(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 1.0, 0, 0, 0, 0, 0, 0.3, true); - } - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_specialn", game_specialn); agent.acmd("game_specialairn", game_specialn); diff --git a/fighters/ryu/src/acmd/specials/special_s.rs b/fighters/ryu/src/acmd/specials/special_s.rs index 0aeb4f51e1..167b44a33c 100644 --- a/fighters/ryu/src/acmd/specials/special_s.rs +++ b/fighters/ryu/src/acmd/specials/special_s.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialsstart(agent: &mut L2CAgentBase) { @@ -121,7 +120,7 @@ unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_special_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -180,7 +179,7 @@ unsafe extern "C" fn ryu_special_s_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_special_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -208,7 +207,7 @@ unsafe extern "C" fn ryu_special_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_special_air_s_end_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -230,7 +229,7 @@ unsafe extern "C" fn ryu_special_air_s_end_effect(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn ryu_special_air_s_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -289,8 +288,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairs", game_specials); agent.acmd("game_specialsend", game_specialsend); agent.acmd("game_specialairsend", game_specialsend); - agent.acmd("effect_specials", ryu_special_s_effect); - agent.acmd("effect_specialsend", ryu_special_s_end_effect); - agent.acmd("effect_specialairsend", ryu_special_air_s_end_effect); - agent.acmd("effect_specialairs", ryu_special_air_s_effect); + agent.acmd("effect_specials", effect_specials); + agent.acmd("effect_specialsend", effect_specialsend); + agent.acmd("effect_specialairsend", effect_specialairsend); + agent.acmd("effect_specialairs", effect_specialairs); } diff --git a/fighters/ryu/src/acmd/throws.rs b/fighters/ryu/src/acmd/throws.rs index b93fe85d84..94e0f15a65 100644 --- a/fighters/ryu/src/acmd/throws.rs +++ b/fighters/ryu/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -24,7 +23,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -185,8 +183,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/ryu/src/acmd/tilts.rs b/fighters/ryu/src/acmd/tilts.rs index 3b010ab8f4..b8d54661ec 100644 --- a/fighters/ryu/src/acmd/tilts.rs +++ b/fighters/ryu/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3w(agent: &mut L2CAgentBase) { @@ -355,11 +354,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_attacks3w", sound_attacks3w); agent.acmd("expression_attacks3w", expression_attacks3w); agent.acmd("game_attacks3s", game_attacks3s); + agent.acmd("game_attackhi3w", game_attackhi3w); agent.acmd("game_attackhi3s", game_attackhi3s); agent.acmd("effect_attackhi3s", effect_attackhi3s); agent.acmd("sound_attackhi3s", sound_attackhi3s); agent.acmd("expression_attackhi3s", expression_attackhi3s); + agent.acmd("game_attacklw3w", game_attacklw3w); agent.acmd("game_attacklw3s", game_attacklw3s); } diff --git a/fighters/ryu/src/hadoken/acmd.rs b/fighters/ryu/src/hadoken/acmd.rs index b196c224b2..6aa1c3d307 100644 --- a/fighters/ryu/src/hadoken/acmd.rs +++ b/fighters/ryu/src/hadoken/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/ryu/src/shinkuhadoken/acmd.rs b/fighters/ryu/src/shinkuhadoken/acmd.rs index 6718fc7edc..9ba045f368 100644 --- a/fighters/ryu/src/shinkuhadoken/acmd.rs +++ b/fighters/ryu/src/shinkuhadoken/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); if is_excute(agent) { @@ -16,6 +17,7 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { AttackModule::clear_all(agent.module_accessor); } } + pub fn install(agent: &mut Agent) { -agent.acmd("game_move", game_move); + agent.acmd("game_move", game_move); } \ No newline at end of file diff --git a/fighters/ryu/src/status/attack.rs b/fighters/ryu/src/status/attack.rs new file mode 100644 index 0000000000..f79993231f --- /dev/null +++ b/fighters/ryu/src/status/attack.rs @@ -0,0 +1,196 @@ +use super::*; + +// FIGHTER_STATUS_KIND_ATTACK + +unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, + ) { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_near_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } else { + WorkModule::set_int64( + fighter.module_accessor, + hash40("attack_11_s") as i64, + *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, + ); + WorkModule::set_int( + fighter.module_accessor, + *FIGHTER_LOG_ATTACK_KIND_ATTACK11, + *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, + ); + } + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk(fighter); + } + fighter.global_table[SUB_STATUS3] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); + if !StopModule::is_stop(fighter.module_accessor) { + ryu_attack_main_uniq_chk4(fighter, false.into()); + } + fighter.global_table[SUB_STATUS] + .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_main_loop as *const () as _)) +} + +unsafe extern "C" fn ryu_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, + ) { + if AttackModule::is_infliction_status( + fighter.module_accessor, + *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, + ) { + if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { + return 1.into(); + } + } + } + } + if ComboModule::count(fighter.module_accessor) == 1 { + if !CancelModule::is_enable_cancel(fighter.module_accessor) { + let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); + let attack_start_cancel_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_start_cancel_frame"), + ); + if current_frame < attack_start_cancel_frame { + if ryu_kara_cancel(fighter).get_bool() { + return 1.into(); + } + } + } + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter + .sub_wait_ground_check_common(false.into()) + .get_bool() + { + return 1.into(); + } + } + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("attack_11_w"), + hash40("attack_11_s"), + hash40("attack_11_near_s"), + ] + .contains(&mot) + { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, + ) { + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, + ) { + if ControlModule::check_button_off( + fighter.module_accessor, + *CONTROL_PAD_BUTTON_ATTACK, + ) { + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let attack_hi3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_hi3_stick_y"), + ); + let cont; + if !(stick_y < attack_hi3_stick_y) { + cont = false; + } else { + let attack_lw3_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_lw3_stick_y"), + ); + if !(attack_lw3_stick_y < stick_y) { + cont = false; + } else { + let stick_x = fighter.global_table[STICK_X].get_f32(); + let attack_s3_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("attack_s3_stick_x"), + ); + cont = stick_x < attack_s3_stick_x; + } + } + if cont { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + } + if WorkModule::is_flag( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, + ) { + let button_on_frame = WorkModule::get_int( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, + ); + let attack_11_s_button_on_frame = WorkModule::get_param_float( + fighter.module_accessor, + hash40("param_private"), + hash40("attack_11_s_button_on_frame"), + ); + if attack_11_s_button_on_frame <= button_on_frame as f32 { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + return 1.into(); + } + } + } + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + return 0.into(); + } + // if 0 < fighter.get_int(*FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { + // if !StopModule::is_stop(fighter.module_accessor) { + // if fighter.sub_check_button_jump().get_bool() { + + // } + // } + // } + if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { + if !MotionModule::is_end(fighter.module_accessor) { + common::shoto_status::ryu_idkwhatthisis2(fighter); + } else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } else { + fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/dash.rs b/fighters/ryu/src/status/dash.rs new file mode 100644 index 0000000000..e4961d29fe --- /dev/null +++ b/fighters/ryu/src/status/dash.rs @@ -0,0 +1,41 @@ +use super::*; + +// FIGHTER_STATUS_KIND_TURN_DASH + +pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 { + if PostureModule::lr(fighter.module_accessor) == lr { + if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { + StatusModule::set_status_kind_interrupt( + fighter.module_accessor, + *FIGHTER_RYU_STATUS_KIND_DASH_BACK, + ); + return L2CValue::I32(1); + } + } + } + VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); + StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); + return 1.into(); +} + +// FIGHTER_RYU_STATUS_KIND_DASH_BACK + +pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_dashback_main(fighter) +} + +pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { + common::shoto_status::fgc_end_dashback(fighter); + smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/guard.rs b/fighters/ryu/src/status/guard.rs new file mode 100644 index 0000000000..f9d16e593e --- /dev/null +++ b/fighters/ryu/src/status/guard.rs @@ -0,0 +1,85 @@ +use super::*; + +pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { + let rate = fighter.status_GuardOff_Common().get_f32(); + if VarModule::is_flag( + fighter.object(), + vars::common::instance::IS_PARRY_FOR_GUARD_OFF, + ) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_damage"), + 2.0, + 0.0, + false, + 0.0, + false, + false, + ); + // app::FighterUtil::flash_eye_info(fighter.module_accessor); + // if !WorkModule::is_flag( + // fighter.module_accessor, + // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, + // ) { + // ModelModule::enable_gold_eye(fighter.module_accessor); + // WorkModule::on_flag( + // fighter.module_accessor, + // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, + // ); + // } + let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); + let lr = PostureModule::lr(fighter.module_accessor); + EffectModule::req_follow( + fighter.module_accessor, + Hash40::new("sys_genesis_end"), + Hash40::new("throw"), + &Vector3f::zero(), + &Vector3f::zero(), + shield_radius * 0.06, + true, + *EFFECT_SUB_ATTRIBUTE_NONE as u32, + 0, + 0, + *EFFECT_FLIP_NONE, + 0, + false, + false, + ); + EffectModule::set_rate_last(fighter.module_accessor, 1.2); + // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); + EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); + // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); + let sfx_handle = SoundModule::play_se( + fighter.module_accessor, + smash::phx::Hash40::new("se_item_backshield_guard01"), + true, + false, + false, + false, + app::enSEType(0), + ); + SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); + SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); + } else { + let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new("guard_off"), + guard_off_motion_start_frame, + rate, + false, + 0.0, + false, + false, + ); + } + fighter.main_shift(guard_main) +} + +unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_GuardOff_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/landing.rs b/fighters/ryu/src/status/landing.rs new file mode 100644 index 0000000000..89fa073464 --- /dev/null +++ b/fighters/ryu/src/status/landing.rs @@ -0,0 +1,11 @@ +use super::*; + +// FIGHTER_STATUS_KIND_LANDING + +pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fgc_landing_main(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); +} \ No newline at end of file diff --git a/fighters/ryu/src/status/mod.rs b/fighters/ryu/src/status/mod.rs index b124477418..e00cb71c93 100644 --- a/fighters/ryu/src/status/mod.rs +++ b/fighters/ryu/src/status/mod.rs @@ -2,6 +2,12 @@ use super::*; use globals::*; // status script import +mod attack; +mod dash; +mod wait; +mod guard; +mod landing; + mod finals; mod special_cmd4; mod special_lw; @@ -30,34 +36,6 @@ extern "C" { fn status_end_EscapeAir(fighter: &mut L2CFighterCommon) -> L2CValue; } -pub fn install(agent: &mut Agent) { - agent.on_start(ryu_init); - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); - agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); - agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); - // .status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main) - agent.status(Main, *FIGHTER_STATUS_KIND_LANDING, landing_main); - finals::install(agent); - special_cmd4::install(agent); - special_lw::install(agent); - special_s::install(agent); -} - -extern "C" fn ryu_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_RYU { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ryu_check_special_command as *const () as _)); - VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); - } - } -} - // Prevents sideB from being used again if it has already been used once in the current airtime unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S) { @@ -68,7 +46,6 @@ unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommo } unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { - // resets IS_USE_EX_SPECIAL if !fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_HI, @@ -307,367 +284,25 @@ pub unsafe extern "C" fn ryu_check_special_command(fighter: &mut L2CFighterCommo false.into() } -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { - let rate = fighter.status_GuardOff_Common().get_f32(); - if VarModule::is_flag( - fighter.object(), - vars::common::instance::IS_PARRY_FOR_GUARD_OFF, - ) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_damage"), - 2.0, - 0.0, - false, - 0.0, - false, - false, - ); - // app::FighterUtil::flash_eye_info(fighter.module_accessor); - // if !WorkModule::is_flag( - // fighter.module_accessor, - // *FIGHTER_INSTANCE_WORK_ID_FLAG_FINAL, - // ) { - // ModelModule::enable_gold_eye(fighter.module_accessor); - // WorkModule::on_flag( - // fighter.module_accessor, - // *FIGHTER_STATUS_GUARD_DAMAGE_WORK_FLAG_GOLD_EYE, - // ); - // } - let shield_radius = WorkModule::get_param_float(fighter.module_accessor, hash40("shield_radius"), 0); - let lr = PostureModule::lr(fighter.module_accessor); - EffectModule::req_follow( - fighter.module_accessor, - Hash40::new("sys_genesis_end"), - Hash40::new("throw"), - &Vector3f::zero(), - &Vector3f::zero(), - shield_radius * 0.06, - true, - *EFFECT_SUB_ATTRIBUTE_NONE as u32, - 0, - 0, - *EFFECT_FLIP_NONE, - 0, - false, - false, - ); - EffectModule::set_rate_last(fighter.module_accessor, 1.2); - // EffectModule::set_alpha_last(fighter.module_accessor, 0.4); - EffectModule::req_common(fighter.module_accessor, Hash40::new("just_shield"), 0.0); - // let shield_se = app::FighterUtil::get_just_shield_se(fighter.global_table[0x2].get_i32()); - let sfx_handle = SoundModule::play_se( - fighter.module_accessor, - smash::phx::Hash40::new("se_item_backshield_guard01"), - true, - false, - false, - false, - app::enSEType(0), - ); - SoundModule::set_se_vol(fighter.module_accessor, sfx_handle as i32, 0.9, 0); - SoundModule::stop_se(fighter.module_accessor, Hash40::new("se_common_guardon"), 0); - } else { - let guard_off_motion_start_frame = ParamModule::get_float(fighter.battle_object, ParamType::Common, "guard_off_motion_start_frame"); - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new("guard_off"), - guard_off_motion_start_frame, - rate, - false, - 0.0, - false, - false, - ); - } - fighter.main_shift(guard_main) -} - -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_GuardOff_Main() +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(ryu_check_special_command as *const () as _)); + VarModule::set_int(fighter.battle_object, vars::shotos::instance::SPECIAL_N_EX_NUM, 0); } -// FIGHTER_STATUS_KIND_TURN_DASH // - -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 { - if PostureModule::lr(fighter.module_accessor) == lr { - if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_STATUS_KIND_TURN { - StatusModule::set_status_kind_interrupt( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_KIND_DASH_BACK, - ); - return L2CValue::I32(1); - } - } - } - VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_SMASH_TURN); - StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN); - return 1.into(); -} - -// FIGHTER_RYU_STATUS_KIND_DASH_BACK // - -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_dashback_main(fighter) -} - -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { - common::shoto_status::fgc_end_dashback(fighter); - smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) -} - -// FIGHTER_STATUS_KIND_ATTACK // - -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_NEAR_OPPONENT, - ) { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_near_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK_NEAR, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } else { - WorkModule::set_int64( - fighter.module_accessor, - hash40("attack_11_s") as i64, - *FIGHTER_STATUS_ATTACK_WORK_INT_ATTACK11_MOTION, - ); - WorkModule::set_int( - fighter.module_accessor, - *FIGHTER_LOG_ATTACK_KIND_ATTACK11, - *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND, - ); - } - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk(fighter); - } - fighter.global_table[SUB_STATUS3] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk as *const () as _)); - if !StopModule::is_stop(fighter.module_accessor) { - ryu_attack_main_uniq_chk4(fighter, false.into()); - } - fighter.global_table[SUB_STATUS] - .assign(&L2CValue::Ptr(ryu_attack_main_uniq_chk4 as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_main_loop as *const () as _)) -} - -unsafe extern "C" fn ryu_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_final_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_HIT_CANCEL, - ) { - if AttackModule::is_infliction_status( - fighter.module_accessor, - *COLLISION_KIND_MASK_SHIELD | *COLLISION_KIND_MASK_HIT, - ) { - if ryu_hit_cancel(fighter, SITUATION_KIND_GROUND.into()).get_bool() { - return 1.into(); - } - } - } - } - if ComboModule::count(fighter.module_accessor) == 1 { - if !CancelModule::is_enable_cancel(fighter.module_accessor) { - let current_frame = fighter.global_table[CURRENT_FRAME].get_f32(); - let attack_start_cancel_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_start_cancel_frame"), - ); - if current_frame < attack_start_cancel_frame { - if ryu_kara_cancel(fighter).get_bool() { - return 1.into(); - } - } - } - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter - .sub_wait_ground_check_common(false.into()) - .get_bool() - { - return 1.into(); - } - } - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("attack_11_w"), - hash40("attack_11_s"), - hash40("attack_11_near_s"), - ] - .contains(&mot) - { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_WEAK_CANCEL, - ) { - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_BUTTON_TRIGGER, - ) { - if ControlModule::check_button_off( - fighter.module_accessor, - *CONTROL_PAD_BUTTON_ATTACK, - ) { - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let attack_hi3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_hi3_stick_y"), - ); - let cont; - if !(stick_y < attack_hi3_stick_y) { - cont = false; - } else { - let attack_lw3_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_lw3_stick_y"), - ); - if !(attack_lw3_stick_y < stick_y) { - cont = false; - } else { - let stick_x = fighter.global_table[STICK_X].get_f32(); - let attack_s3_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("attack_s3_stick_x"), - ); - cont = stick_x < attack_s3_stick_x; - } - } - if cont { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - } - if WorkModule::is_flag( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_FLAG_SAME_ATTACK_CANCEL, - ) { - let button_on_frame = WorkModule::get_int( - fighter.module_accessor, - *FIGHTER_RYU_STATUS_ATTACK_INT_BUTTON_ON_FRAME, - ); - let attack_11_s_button_on_frame = WorkModule::get_param_float( - fighter.module_accessor, - hash40("param_private"), - hash40("attack_11_s_button_on_frame"), - ); - if attack_11_s_button_on_frame <= button_on_frame as f32 { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - return 1.into(); - } - } - } - if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - return 0.into(); - } - // if 0 < fighter.get_int(*FIGHTER_STATUS_WORK_ID_INT_RESERVE_ATTACK_MINI_JUMP_ATTACK_FRAME) { - // if !StopModule::is_stop(fighter.module_accessor) { - // if fighter.sub_check_button_jump().get_bool() { - - // } - // } - // } - if !fighter.is_flag(*FIGHTER_STATUS_ATTACK_FLAG_RESTART) { - if !MotionModule::is_end(fighter.module_accessor) { - common::shoto_status::ryu_idkwhatthisis2(fighter); - } else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } else { - fighter.change_status(FIGHTER_STATUS_KIND_ATTACK.into(), false.into()); - } - 0.into() -} - -// FIGHTER_STATUS_KIND_WAIT // - -pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_pre_Wait() -} - -// vanilla script - -pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_wait_common(); - fighter.sub_wait_motion_mtrans(); - fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) -} - -pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.status_Wait_Main().get_bool() { - return 0.into(); - } - let lr = WorkModule::get_float( - fighter.module_accessor, - *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, - ); - if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { - let stick_x_corrected = fighter.global_table[STICK_X].get_f32() - * (PostureModule::lr(fighter.module_accessor) * -1.0); - let stick_y = fighter.global_table[STICK_Y].get_f32(); - let walk_stick_x = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("walk_stick_x"), - ); - let squat_stick_y = WorkModule::get_param_float( - fighter.module_accessor, - hash40("common"), - hash40("squat_stick_y"), - ); - - if WorkModule::is_enable_transition_term( - fighter.module_accessor, - *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, - ) { - if walk_stick_x <= stick_x_corrected { - if squat_stick_y < stick_y { - fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); - return 0.into(); - } - } - } - fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); - return 0.into(); - } - 0.into() -} +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); -// FIGHTER_STATUS_KIND_LANDING // + attack::install(agent); + dash::install(agent); + wait::install(agent); + guard::install(agent); + landing::install(agent); -pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fgc_landing_main(fighter) + finals::install(agent); + special_cmd4::install(agent); + special_lw::install(agent); + special_s::install(agent); } \ No newline at end of file diff --git a/fighters/ryu/src/status/wait.rs b/fighters/ryu/src/status/wait.rs new file mode 100644 index 0000000000..8a041c2997 --- /dev/null +++ b/fighters/ryu/src/status/wait.rs @@ -0,0 +1,60 @@ +use super::*; + +// FIGHTER_STATUS_KIND_WAIT + +pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_pre_Wait() +} + +// vanilla script + +pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_wait_common(); + fighter.sub_wait_motion_mtrans(); + fighter.sub_shift_status_main(L2CValue::Ptr(fgc_wait_main_loop as *const () as _)) +} + +pub unsafe extern "C" fn fgc_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.status_Wait_Main().get_bool() { + return 0.into(); + } + let lr = WorkModule::get_float( + fighter.module_accessor, + *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, + ); + if lr != 0.0 && PostureModule::lr(fighter.module_accessor) != lr { + let stick_x_corrected = fighter.global_table[STICK_X].get_f32() + * (PostureModule::lr(fighter.module_accessor) * -1.0); + let stick_y = fighter.global_table[STICK_Y].get_f32(); + let walk_stick_x = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("walk_stick_x"), + ); + let squat_stick_y = WorkModule::get_param_float( + fighter.module_accessor, + hash40("common"), + hash40("squat_stick_y"), + ); + + if WorkModule::is_enable_transition_term( + fighter.module_accessor, + *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_WALK, + ) { + if walk_stick_x <= stick_x_corrected { + if squat_stick_y < stick_y { + fighter.change_status(FIGHTER_RYU_STATUS_KIND_WALK_BACK.into(), true.into()); + return 0.into(); + } + } + } + fighter.change_status(FIGHTER_RYU_STATUS_KIND_TURN_AUTO.into(), false.into()); + return 0.into(); + } + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_WAIT, wait_pre); + //agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); +} \ No newline at end of file From c99dadee03bc9800eebe283bb66dd128de60cd56 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 13:06:42 -0500 Subject: [PATCH 155/172] s-z cleanup woo --- fighters/link/src/status/mod.rs | 15 + fighters/link/src/status/special_hi.rs | 15 - fighters/link/src/status/special_n.rs | 15 - fighters/robot/src/status/special_hi.rs | 1 - fighters/samus/src/acmd/aerials.rs | 22 +- fighters/samus/src/acmd/ground.rs | 117 +++--- fighters/samus/src/acmd/other.rs | 6 +- fighters/samus/src/acmd/smashes.rs | 33 +- fighters/samus/src/acmd/specials.rs | 3 - fighters/samus/src/acmd/throws.rs | 14 +- fighters/samus/src/acmd/tilts.rs | 30 +- fighters/samus/src/cshot/acmd.rs | 5 +- fighters/samus/src/opff.rs | 3 +- fighters/samus/src/supermissile/acmd.rs | 5 +- fighters/samusd/src/acmd/aerials.rs | 15 +- fighters/samusd/src/acmd/ground.rs | 4 +- fighters/samusd/src/acmd/other.rs | 6 +- fighters/samusd/src/acmd/smashes.rs | 34 +- fighters/samusd/src/acmd/specials.rs | 4 +- fighters/samusd/src/acmd/throws.rs | 16 +- fighters/samusd/src/acmd/tilts.rs | 55 ++- fighters/samusd/src/bomb/acmd.rs | 4 + fighters/samusd/src/cshot/acmd.rs | 4 +- fighters/samusd/src/missile/acmd.rs | 2 + fighters/samusd/src/status/attack_air.rs | 1 - fighters/samusd/src/status/float.rs | 1 - fighters/samusd/src/status/mod.rs | 7 +- fighters/samusd/src/supermissile/acmd.rs | 5 + fighters/shulk/src/acmd/aerials.rs | 10 +- fighters/shulk/src/acmd/ground.rs | 3 +- fighters/shulk/src/acmd/other.rs | 3 - fighters/shulk/src/acmd/smashes.rs | 13 +- fighters/shulk/src/acmd/specials.rs | 5 +- fighters/shulk/src/acmd/throws.rs | 5 +- fighters/shulk/src/acmd/tilts.rs | 6 +- fighters/shulk/src/status/mod.rs | 32 +- fighters/shulk/src/status/special_n.rs | 3 +- fighters/shulk/src/status/special_s.rs | 3 +- fighters/simon/src/acmd/aerials.rs | 78 ++-- fighters/simon/src/acmd/ground.rs | 4 +- fighters/simon/src/acmd/other.rs | 3 +- fighters/simon/src/acmd/smashes.rs | 36 +- fighters/simon/src/acmd/throws.rs | 5 +- fighters/simon/src/acmd/tilts.rs | 3 - fighters/simon/src/axe/acmd.rs | 1 - fighters/simon/src/status/attacklw3.rs | 1 - fighters/simon/src/status/attacks3.rs | 1 - .../simon/src/whip/{aerials.rs => acmd.rs} | 79 +++- fighters/simon/src/whip/mod.rs | 8 +- fighters/simon/src/whip/smashes.rs | 51 --- fighters/simon/src/whip/tilts.rs | 26 -- fighters/snake/src/acmd/aerials.rs | 9 +- fighters/snake/src/acmd/ground.rs | 2 +- fighters/snake/src/acmd/other.rs | 1 + fighters/snake/src/acmd/specials.rs | 4 - fighters/snake/src/acmd/throws.rs | 1 - fighters/snake/src/acmd/tilts.rs | 6 +- fighters/snake/src/c4/acmd.rs | 11 +- fighters/snake/src/c4/mod.rs | 2 + fighters/snake/src/c4/opff.rs | 21 ++ fighters/snake/src/cypher/acmd.rs | 6 +- fighters/snake/src/nikita/acmd.rs | 12 +- fighters/snake/src/nikitamissile/acmd.rs | 18 +- fighters/snake/src/opff.rs | 17 - fighters/snake/src/status/appeal.rs | 3 +- fighters/snake/src/status/attack_s4.rs | 4 +- fighters/snake/src/status/catch.rs | 2 - fighters/snake/src/status/mod.rs | 36 +- fighters/snake/src/status/rebirth.rs | 40 ++ fighters/snake/src/status/special_s.rs | 6 +- fighters/tantan/src/acmd/aerials.rs | 265 +++++++------ fighters/tantan/src/acmd/ground.rs | 3 +- fighters/tantan/src/acmd/other.rs | 11 +- fighters/tantan/src/acmd/smashes.rs | 195 ++++++---- fighters/tantan/src/acmd/specials.rs | 37 +- fighters/tantan/src/acmd/throws.rs | 3 +- fighters/tantan/src/acmd/tilts.rs | 225 ++++++----- fighters/tantan/src/opff.rs | 35 -- fighters/tantan/src/punch1/mod.rs | 2 + fighters/tantan/src/punch1/opff.rs | 41 ++ fighters/tantan/src/status/attack.rs | 22 ++ fighters/tantan/src/status/attack_air.rs | 29 ++ .../tantan/src/status/attack_jump_aerial.rs | 15 + fighters/tantan/src/status/attack_landing.rs | 15 + fighters/tantan/src/status/attack_s3.rs | 29 ++ fighters/tantan/src/status/attack_s4.rs | 58 +++ fighters/tantan/src/status/catch.rs | 33 ++ fighters/tantan/src/status/jump.rs | 48 +++ fighters/tantan/src/status/mod.rs | 356 ++---------------- fighters/tantan/src/status/special_hi.rs | 74 ++++ fighters/tantan/src/status/special_n.rs | 44 +++ fighters/toonlink/src/acmd/aerials.rs | 62 ++- fighters/toonlink/src/acmd/other.rs | 62 --- fighters/wario/src/acmd/aerials.rs | 8 +- fighters/wario/src/acmd/ground.rs | 5 +- fighters/wario/src/acmd/other.rs | 1 - fighters/wario/src/acmd/smashes.rs | 5 +- fighters/wario/src/acmd/specials.rs | 3 +- fighters/wario/src/acmd/throws.rs | 168 +++++---- fighters/wario/src/acmd/tilts.rs | 14 +- fighters/wario/src/opff.rs | 2 +- fighters/wario/src/status/attack_air.rs | 27 ++ fighters/wario/src/status/catch_attack.rs | 37 ++ fighters/wario/src/status/mod.rs | 160 +------- fighters/wario/src/status/throw_kirby.rs | 94 +++++ fighters/yoshi/src/status/attack_air.rs | 3 +- fighters/yoshi/src/status/guard_damage.rs | 3 +- fighters/yoshi/src/status/guard_off.rs | 3 +- fighters/yoshi/src/status/guard_on.rs | 1 - fighters/yoshi/src/status/jump_aerial.rs | 1 - fighters/younglink/src/acmd/aerials.rs | 57 +++ fighters/younglink/src/acmd/throws.rs | 57 --- 112 files changed, 1658 insertions(+), 1677 deletions(-) rename fighters/simon/src/whip/{aerials.rs => acmd.rs} (56%) delete mode 100644 fighters/simon/src/whip/smashes.rs delete mode 100644 fighters/simon/src/whip/tilts.rs create mode 100644 fighters/snake/src/c4/opff.rs create mode 100644 fighters/snake/src/status/rebirth.rs create mode 100644 fighters/tantan/src/punch1/opff.rs create mode 100644 fighters/tantan/src/status/attack.rs create mode 100644 fighters/tantan/src/status/attack_air.rs create mode 100644 fighters/tantan/src/status/attack_jump_aerial.rs create mode 100644 fighters/tantan/src/status/attack_landing.rs create mode 100644 fighters/tantan/src/status/attack_s3.rs create mode 100644 fighters/tantan/src/status/attack_s4.rs create mode 100644 fighters/tantan/src/status/catch.rs create mode 100644 fighters/tantan/src/status/jump.rs create mode 100644 fighters/tantan/src/status/special_hi.rs create mode 100644 fighters/tantan/src/status/special_n.rs create mode 100644 fighters/wario/src/status/attack_air.rs create mode 100644 fighters/wario/src/status/catch_attack.rs create mode 100644 fighters/wario/src/status/throw_kirby.rs diff --git a/fighters/link/src/status/mod.rs b/fighters/link/src/status/mod.rs index 8876be00dd..7b4efcde17 100644 --- a/fighters/link/src/status/mod.rs +++ b/fighters/link/src/status/mod.rs @@ -5,6 +5,21 @@ use globals::*; mod special_n; mod special_hi; +pub unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::is_changing(fighter.module_accessor) { + return 1.into() + } + else { + if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { + return 1.into() + } + if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + return 1.into() + } + } + return 0.into() +} + pub fn install(agent: &mut Agent) { special_n::install(agent); special_hi::install(agent); diff --git a/fighters/link/src/status/special_hi.rs b/fighters/link/src/status/special_hi.rs index 3cd616c434..c16ce12db2 100644 --- a/fighters/link/src/status/special_hi.rs +++ b/fighters/link/src/status/special_hi.rs @@ -180,21 +180,6 @@ unsafe extern "C" fn sub_specialhi_Main(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - // FIGHTER_LINK_STATUS_KIND_SPECIAL_HI_HOLD pub unsafe extern "C" fn special_hi_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/link/src/status/special_n.rs b/fighters/link/src/status/special_n.rs index 844bc6bf68..835cb63d1b 100644 --- a/fighters/link/src/status/special_n.rs +++ b/fighters/link/src/status/special_n.rs @@ -600,21 +600,6 @@ unsafe extern "C" fn sub_special_n_Main_uniq(fighter: &mut L2CFighterCommon) { } } -unsafe extern "C" fn link_situation_helper(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::is_changing(fighter.module_accessor) { - return 1.into() - } - else { - if fighter.global_table[PREV_SITUATION_KIND] == SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { - return 1.into() - } - if fighter.global_table[PREV_SITUATION_KIND] != SITUATION_KIND_GROUND && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - return 1.into() - } - } - return 0.into() -} - unsafe extern "C" fn special_n_helper(fighter: &mut L2CFighterCommon) { ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); ArticleModule::set_visibility_whole(fighter.module_accessor, *FIGHTER_LINK_GENERATE_ARTICLE_BOWARROW, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); diff --git a/fighters/robot/src/status/special_hi.rs b/fighters/robot/src/status/special_hi.rs index b1bc3973fb..eb09002ad0 100644 --- a/fighters/robot/src/status/special_hi.rs +++ b/fighters/robot/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI diff --git a/fighters/samus/src/acmd/aerials.rs b/fighters/samus/src/acmd/aerials.rs index b866ebb7ab..78c9a7b192 100644 --- a/fighters/samus/src/acmd/aerials.rs +++ b/fighters/samus/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -43,7 +42,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -58,7 +56,6 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footr"), 0, 0, 0, 0, 0, 0, 1.4, true, 1.0); } - } unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { @@ -69,7 +66,6 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("se_samus_swing_l")); PLAY_SE(agent, Hash40::new("se_samus_swing_m")); } - } unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { @@ -130,7 +126,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -181,7 +176,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -242,7 +236,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -278,7 +271,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -286,13 +278,13 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); - LAST_EFFECT_SET_RATE(agent, 1.2); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("armr"), 4.289, -0.272, -0.135, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 360, true); + LAST_EFFECT_SET_RATE(agent, 1.2); } frame(lua_state, 18.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("samus_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); - LAST_EFFECT_SET_RATE(agent, 1.1); + EFFECT_FOLLOW(agent, Hash40::new("samus_atk_air_lw"), Hash40::new("top"), 0, 12.5, 0, 0, -200, 90, 0.85, true); + LAST_EFFECT_SET_RATE(agent, 1.1); } } @@ -302,7 +294,6 @@ unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 18.0/20.0); } - } pub fn install(agent: &mut Agent) { @@ -310,12 +301,17 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samus/src/acmd/ground.rs b/fighters/samus/src/acmd/ground.rs index 721faf7ca9..ec6d882edd 100644 --- a/fighters/samus/src/acmd/ground.rs +++ b/fighters/samus/src/acmd/ground.rs @@ -1,6 +1,59 @@ - use super::*; +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + } + wait(lua_state, 2.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + wait(lua_state, 1.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + } + frame(lua_state, 13.0); + if is_excute(agent) { + //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + } +} + +unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + } + frame(lua_state, 2.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9.5, 2, 0, 0, 0, 0.95, true); + } + frame(lua_state, 3.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); + } +} + +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } +} + unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -76,7 +129,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { @@ -99,68 +151,13 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_samus_step_right_m")); } - -} - -unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 3.5, 70, 40, 0, 35, 3.5, 0.0, 9.5, 8.0, Some(0.0), Some(9.5), Some(16.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("top"), 3.5, 361, 10, 0, 25, 2.5, 0.0, 3.5, 8.0, Some(0.0), Some(3.5), Some(15.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - } - wait(lua_state, 2.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - wait(lua_state, 1.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); - } - frame(lua_state, 13.0); - if is_excute(agent) { - //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); - } - -} - -unsafe extern "C" fn effect_attack11(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - } - frame(lua_state, 2.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_line"), Hash40::new("top"), 0, 9.5, 2, 0, 0, 0, 0.95, true); - } - frame(lua_state, 3.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), -1, 9.5, 18, 0, 0, 0, 1.15, 0, 0, 0, 0, 0, 360, true); - } -} - -unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackdash", game_attackdash); - agent.acmd("sound_attackdash", sound_attackdash); agent.acmd("game_attack11", game_attack11); agent.acmd("effect_attack11", effect_attack11); agent.acmd("expression_attack12", expression_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/samus/src/acmd/other.rs b/fighters/samus/src/acmd/other.rs index b0fbe71a0e..9e55ea886c 100644 --- a/fighters/samus/src/acmd/other.rs +++ b/fighters/samus/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -30,13 +29,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -50,7 +48,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -64,6 +61,7 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samus/src/acmd/smashes.rs b/fighters/samus/src/acmd/smashes.rs index 926cca7325..a48b7c7c25 100644 --- a/fighters/samus/src/acmd/smashes.rs +++ b/fighters/samus/src/acmd/smashes.rs @@ -1,14 +1,17 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 10.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("armr"), 15.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { @@ -20,21 +23,16 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 10.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.5, 361, 102, 0, 30, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.5, 361, 106, 0, 40, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } wait(lua_state, 2.0); if is_excute(agent) { @@ -46,7 +44,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -68,7 +65,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -169,15 +165,16 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); agent.acmd("sound_attackhi4", sound_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/samus/src/acmd/specials.rs b/fighters/samus/src/acmd/specials.rs index a3784db4e0..a1b4919d6b 100644 --- a/fighters/samus/src/acmd/specials.rs +++ b/fighters/samus/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { @@ -53,7 +52,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -97,7 +95,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/samus/src/acmd/throws.rs b/fighters/samus/src/acmd/throws.rs index d802e5dde7..5bdd9ea1f2 100644 --- a/fighters/samus/src/acmd/throws.rs +++ b/fighters/samus/src/acmd/throws.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn samus_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -32,7 +31,7 @@ unsafe extern "C" fn samus_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -63,7 +62,7 @@ unsafe extern "C" fn samus_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samus_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -115,8 +114,9 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - //.acmd("game_catch", samus_catch_game) - //.acmd("game_catchdash", samus_catch_dash_game) - //.acmd("game_catchturn", samus_catch_turn_game) + //agent.acmd("game_catch", game_catch); + //agent.acmd("game_catchdash", game_catchdash); + //agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); } diff --git a/fighters/samus/src/acmd/tilts.rs b/fighters/samus/src/acmd/tilts.rs index 7662d6a816..bcd39da36f 100644 --- a/fighters/samus/src/acmd/tilts.rs +++ b/fighters/samus/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -13,7 +12,7 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { frame(lua_state, 7.0); if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); @@ -24,7 +23,6 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); if is_excute(agent) { @@ -34,10 +32,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -45,12 +42,12 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -3, 13.5, 14.5, 32, 6, -192, 0.9, 0, 0, 0, 0, 0, 0, true); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 14, 2, 5, 165, 0.95, true); LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -62,7 +59,7 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { frame(lua_state, 7.0); if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); HIT_NODE(agent, Hash40::new("footr"), *HIT_STATUS_XLU); } frame(lua_state, 8.0); @@ -73,6 +70,7 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 10.0, 361, 100, 0, 10, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 11.0, 361, 120, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("kneel"), 10.0, 361, 100, 0, 10, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); if is_excute(agent) { @@ -82,10 +80,9 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -93,7 +90,7 @@ unsafe extern "C" fn effect_attacks3s(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 14, 2, 5, 165, 0.95, true); + EFFECT(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -3, 13.5, 14.5, 32, 6, -192, 0.9, 0, 0, 0, 0, 0, 0, true); LAST_EFFECT_SET_RATE(agent, 1.5); } } @@ -131,7 +128,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -169,7 +165,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -201,17 +196,18 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("effect_attacks3hi", effect_attacks3hi); - agent.acmd("game_attacks3", game_attacks3); - agent.acmd("effect_attacks3", effect_attacks3s); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samus/src/cshot/acmd.rs b/fighters/samus/src/cshot/acmd.rs index 7ab8fb86e4..826eea6635 100644 --- a/fighters/samus/src/cshot/acmd.rs +++ b/fighters/samus/src/cshot/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,8 +8,8 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 25.0, 40, 64, 0, 45, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); } - } + unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -27,8 +28,8 @@ unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { PLAY_SE_REMAIN(agent, Hash40::new("se_samus_special_n05")); } } - } + pub fn install(agent: &mut Agent) { agent.acmd("game_shoot", game_shoot); agent.acmd("sound_shoot", sound_shoot); diff --git a/fighters/samus/src/opff.rs b/fighters/samus/src/opff.rs index 47cf2fd6d1..1786683063 100644 --- a/fighters/samus/src/opff.rs +++ b/fighters/samus/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - pub unsafe fn missile_land_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, status_kind: i32, situation_kind: i32) { if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_SAMUS_STATUS_KIND_SPECIAL_S1G, @@ -138,7 +137,7 @@ pub unsafe fn samus_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, samus_frame_wrapper); - } diff --git a/fighters/samus/src/supermissile/acmd.rs b/fighters/samus/src/supermissile/acmd.rs index f86036bd6a..7acd29f91b 100644 --- a/fighters/samus/src/supermissile/acmd.rs +++ b/fighters/samus/src/supermissile/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -6,16 +7,16 @@ unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); AttackModule::enable_safe_pos(boma); } - } + unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 361, 100, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); } - } + pub fn install(agent: &mut Agent) { agent.acmd("game_ready", game_ready); agent.acmd("game_straight", game_straight); diff --git a/fighters/samusd/src/acmd/aerials.rs b/fighters/samusd/src/acmd/aerials.rs index d2d5644c57..afdf643852 100644 --- a/fighters/samusd/src/acmd/aerials.rs +++ b/fighters/samusd/src/acmd/aerials.rs @@ -35,7 +35,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { @@ -133,7 +132,6 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("samusd_win3_aura"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("sys_damage_elec"), false, true); } - } unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { @@ -161,7 +159,6 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_spirits_floor_elec_spark1")); } - } unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { @@ -231,7 +228,6 @@ unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_samusd_swing_m")); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { @@ -241,7 +237,6 @@ unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(lua_state, 11.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); @@ -277,7 +272,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -319,7 +313,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -394,7 +387,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { @@ -411,7 +403,6 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_COLOR(agent, 0.5, 0.5, 3.0); LAST_EFFECT_SET_RATE(agent, 1.1); } - } unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { @@ -446,7 +437,6 @@ unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 16.0/27.0); } - } pub fn install(agent: &mut Agent) { @@ -454,18 +444,23 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); agent.acmd("expression_attackairn", expression_attackairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); agent.acmd("sound_attackairf", sound_attackairf); agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); agent.acmd("sound_attackairhi", sound_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("game_aircatch", game_aircatch); agent.acmd("game_aircatchlanding", game_aircatchlanding); } diff --git a/fighters/samusd/src/acmd/ground.rs b/fighters/samusd/src/acmd/ground.rs index 1cb408f950..defd2c9756 100644 --- a/fighters/samusd/src/acmd/ground.rs +++ b/fighters/samusd/src/acmd/ground.rs @@ -20,7 +20,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -40,7 +39,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { @@ -92,7 +90,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -111,6 +108,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack12", game_attack12); agent.acmd("effect_attack12", effect_attack12); agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/samusd/src/acmd/other.rs b/fighters/samusd/src/acmd/other.rs index fb6c1871e4..f04cd96301 100644 --- a/fighters/samusd/src/acmd/other.rs +++ b/fighters/samusd/src/acmd/other.rs @@ -11,7 +11,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -35,13 +34,12 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } + unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -55,7 +53,6 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -70,6 +67,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/samusd/src/acmd/smashes.rs b/fighters/samusd/src/acmd/smashes.rs index ad6a5f35e6..29f2bebe87 100644 --- a/fighters/samusd/src/acmd/smashes.rs +++ b/fighters/samusd/src/acmd/smashes.rs @@ -1,13 +1,17 @@ use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } frame(lua_state, 10.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); if is_excute(agent) { @@ -19,21 +23,16 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 4.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } frame(lua_state, 10.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 1, 0, Hash40::new("armr"), 14.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - ATTACK(agent, 2, 0, Hash40::new("armr"), 16.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); + ATTACK(agent, 0, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 1, 0, Hash40::new("armr"), 13.0, 361, 94, 0, 31, 3.3, -4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 99, 0, 41, 5.0, 8.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } frame(lua_state, 12.0); if is_excute(agent) { @@ -45,7 +44,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -67,7 +65,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -169,7 +166,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_WAIT, false); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -200,7 +196,6 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.65, true); EFFECT_FOLLOW(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 17, 0, 0, 0, 0.75, true); } - } unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { @@ -214,7 +209,6 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_samusd_special_n04")); } - } unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { @@ -251,11 +245,13 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); agent.acmd("effect_attackhi4", effect_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/samusd/src/acmd/specials.rs b/fighters/samusd/src/acmd/specials.rs index fb1814cdac..828c4fa2ec 100644 --- a/fighters/samusd/src/acmd/specials.rs +++ b/fighters/samusd/src/acmd/specials.rs @@ -86,7 +86,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { @@ -130,7 +129,6 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { @@ -182,12 +180,12 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_normal") as i64); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialairhi); + agent.acmd("game_speciallw", game_speciallw); agent.acmd("game_specialairlw", game_specialairlw); } diff --git a/fighters/samusd/src/acmd/throws.rs b/fighters/samusd/src/acmd/throws.rs index 0ed2f6130f..b6695d200d 100644 --- a/fighters/samusd/src/acmd/throws.rs +++ b/fighters/samusd/src/acmd/throws.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn samusd_catch_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -31,7 +31,7 @@ unsafe extern "C" fn samusd_catch_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -62,7 +62,7 @@ unsafe extern "C" fn samusd_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn samusd_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -108,7 +108,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -160,10 +159,13 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - //.acmd("game_catch", samusd_catch_game) - //.acmd("game_catchdash", samusd_catch_dash_game) - //.acmd("game_catchturn", samusd_catch_turn_game) + //agent.acmd("game_catch", game_catch); + //agent.acmd("game_catchdash", game_catchdash); + //agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/samusd/src/acmd/tilts.rs b/fighters/samusd/src/acmd/tilts.rs index bea2181ed2..2c239a4cc2 100644 --- a/fighters/samusd/src/acmd/tilts.rs +++ b/fighters/samusd/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -21,7 +21,6 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); if is_excute(agent) { @@ -31,10 +30,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -42,24 +40,13 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 1, true); - let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { - 0 => Vector3f::new(0.1, 0.7, 3.0),//nor - 1 => Vector3f::new(0.55, 0.88, 0.0004),//g - 2 => Vector3f::new(1.25, 0.55, 1.5),//pur - 3 => Vector3f::new(0.84, 0.7, 0.03),//r - 4 => Vector3f::new(0.1, 1.0, 2.0),//y - 5 => Vector3f::new(0.9, 0.03, 0.03),//w - 6 => Vector3f::new(1.15, 0.65, 0.03),//blac - 7 => Vector3f::new(0.78, 0.5, 2.5),//pi - _ => Vector3f::new(0.1, 0.7, 3.0) - }; //matches glow color - LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); - LAST_EFFECT_SET_RATE(agent, 1.0); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); + LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); + LAST_EFFECT_SET_RATE(agent, 1.5); } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -80,6 +67,7 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 0.6, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("kneer"), 13.0, 361, 102, 0, 20, 3.5, 6.0, -0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 3, 0, Hash40::new("kneel"), 12.0, 361, 102, 0, 20, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } wait(lua_state, 4.0); if is_excute(agent) { @@ -89,10 +77,9 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -100,9 +87,20 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -1.5, 11.5, 9, 2, 5, 165, 0.95, true); - LAST_EFFECT_SET_COLOR(agent, 0.1, 0.7, 3.0); - LAST_EFFECT_SET_RATE(agent, 1.5); + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc"), Hash40::new("top"), -2, 13.5, 5, 30, 0, 195, 1, true); + let color_vec = match WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR) { + 0 => Vector3f::new(0.1, 0.7, 3.0),//nor + 1 => Vector3f::new(0.55, 0.88, 0.0004),//g + 2 => Vector3f::new(1.25, 0.55, 1.5),//pur + 3 => Vector3f::new(0.84, 0.7, 0.03),//r + 4 => Vector3f::new(0.1, 1.0, 2.0),//y + 5 => Vector3f::new(0.9, 0.03, 0.03),//w + 6 => Vector3f::new(1.15, 0.65, 0.03),//blac + 7 => Vector3f::new(0.78, 0.5, 2.5),//pi + _ => Vector3f::new(0.1, 0.7, 3.0) + }; //matches glow color + LAST_EFFECT_SET_COLOR(agent, color_vec.x, color_vec.y, color_vec.z); + LAST_EFFECT_SET_RATE(agent, 1.0); } } @@ -137,7 +135,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { @@ -226,7 +223,6 @@ unsafe extern "C" fn sound_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_samusd_swing_l")); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -286,19 +282,20 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); agent.acmd("effect_attacks3lw", effect_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); agent.acmd("sound_attackhi3", sound_attackhi3); agent.acmd("effect_attackhi3", effect_attackhi3); agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/samusd/src/bomb/acmd.rs b/fighters/samusd/src/bomb/acmd.rs index 4fc611e3e8..d2672519c3 100644 --- a/fighters/samusd/src/bomb/acmd.rs +++ b/fighters/samusd/src/bomb/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,6 +8,7 @@ unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 45, 0, 22, 2.0, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 6, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); } } + unsafe extern "C" fn game_burstattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -31,6 +33,7 @@ unsafe extern "C" fn game_burstattack(agent: &mut L2CAgentBase) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } + unsafe extern "C" fn effect_burstattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -43,6 +46,7 @@ unsafe extern "C" fn effect_burstattack(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_fall", game_fall); + agent.acmd("game_burstattack", game_burstattack); agent.acmd("effect_burstattack", effect_burstattack); } diff --git a/fighters/samusd/src/cshot/acmd.rs b/fighters/samusd/src/cshot/acmd.rs index 93364d96e0..634f921d1c 100644 --- a/fighters/samusd/src/cshot/acmd.rs +++ b/fighters/samusd/src/cshot/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,8 +8,8 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 40, 72, 0, 50, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -7, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); attack!(agent, *MA_MSC_CMD_ATTACK_SET_LERP, 0, 1); } - } + unsafe extern "C" fn sound_shoot (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -27,7 +28,6 @@ unsafe extern "C" fn sound_shoot (agent: &mut L2CAgentBase) { PLAY_SE_REMAIN(agent, Hash40::new("se_samusd_special_n05")); } } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/samusd/src/missile/acmd.rs b/fighters/samusd/src/missile/acmd.rs index dc7166f87f..aaac54bc8c 100644 --- a/fighters/samusd/src/missile/acmd.rs +++ b/fighters/samusd/src/missile/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_homing(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -12,6 +13,7 @@ unsafe extern "C" fn game_homing(agent: &mut L2CAgentBase) { AttackModule::enable_safe_pos(boma); } } + unsafe extern "C" fn effect_homing(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/samusd/src/status/attack_air.rs b/fighters/samusd/src/status/attack_air.rs index ff1702ae6b..43019e134c 100644 --- a/fighters/samusd/src/status/attack_air.rs +++ b/fighters/samusd/src/status/attack_air.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "attack_air_float_pre"] diff --git a/fighters/samusd/src/status/float.rs b/fighters/samusd/src/status/float.rs index c874318176..9fd637bd0c 100644 --- a/fighters/samusd/src/status/float.rs +++ b/fighters/samusd/src/status/float.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; extern "Rust" { #[link_name = "float_pre_common"] diff --git a/fighters/samusd/src/status/mod.rs b/fighters/samusd/src/status/mod.rs index db02b2a0fa..06139dde21 100644 --- a/fighters/samusd/src/status/mod.rs +++ b/fighters/samusd/src/status/mod.rs @@ -29,9 +29,8 @@ unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - attack_air::install(agent); + agent.on_start(on_start); + attack_air::install(agent); float::install(agent); - - agent.on_start(on_start); -} \ No newline at end of file +} diff --git a/fighters/samusd/src/supermissile/acmd.rs b/fighters/samusd/src/supermissile/acmd.rs index 934ff68e21..6037ea868a 100644 --- a/fighters/samusd/src/supermissile/acmd.rs +++ b/fighters/samusd/src/supermissile/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,6 +8,7 @@ unsafe extern "C" fn game_ready(agent: &mut L2CAgentBase) { AttackModule::enable_safe_pos(boma); } } + unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -14,6 +16,7 @@ unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 65, 65, 0, 50, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 5, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_OBJECT); } } + // #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] // unsafe fn samusd_super_missile_burst_game(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; @@ -28,7 +31,9 @@ unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { // notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); // } // } + pub fn install(agent: &mut Agent) { agent.acmd("game_ready", game_ready); + agent.acmd("game_straight", game_straight); } diff --git a/fighters/shulk/src/acmd/aerials.rs b/fighters/shulk/src/acmd/aerials.rs index 5b811cb878..8d32e73a8c 100644 --- a/fighters/shulk/src/acmd/aerials.rs +++ b/fighters/shulk/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -26,7 +25,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -57,7 +55,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -102,7 +99,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -177,7 +173,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -232,14 +227,17 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/shulk/src/acmd/ground.rs b/fighters/shulk/src/acmd/ground.rs index d76970fae9..c04330edb9 100644 --- a/fighters/shulk/src/acmd/ground.rs +++ b/fighters/shulk/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -89,12 +88,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/shulk/src/acmd/other.rs b/fighters/shulk/src/acmd/other.rs index ddce60e38f..a1ff38ef22 100644 --- a/fighters/shulk/src/acmd/other.rs +++ b/fighters/shulk/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -52,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -89,7 +87,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/shulk/src/acmd/smashes.rs b/fighters/shulk/src/acmd/smashes.rs index f61f360813..69957daf90 100644 --- a/fighters/shulk/src/acmd/smashes.rs +++ b/fighters/shulk/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -42,10 +41,9 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -86,7 +84,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -130,7 +127,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -169,7 +165,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -286,10 +281,12 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/shulk/src/acmd/specials.rs b/fighters/shulk/src/acmd/specials.rs index f1948d03c8..f4daba25e3 100644 --- a/fighters/shulk/src/acmd/specials.rs +++ b/fighters/shulk/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn effect_specialnstart(agent: &mut L2CAgentBase) { @@ -325,10 +324,10 @@ unsafe extern "C" fn game_speciallwf(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("effect_specialnstart", effect_specialnstart); agent.acmd("effect_specialairnstart", effect_specialnstart); + agent.acmd("game_specials", game_specials); agent.acmd("game_specialairs", game_specials); agent.acmd("effect_specials", effect_specials); @@ -337,8 +336,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairs", sound_specials); agent.acmd("expression_specials", expression_specials); agent.acmd("expression_specialairs", expression_specials); + agent.acmd("game_specialhi", game_specialhi); agent.acmd("game_specialairhi", game_specialhi); + agent.acmd("game_speciallwattack", game_speciallwattack); agent.acmd("game_specialairlwattack", game_speciallwattack); agent.acmd("game_speciallwf", game_speciallwf); diff --git a/fighters/shulk/src/acmd/throws.rs b/fighters/shulk/src/acmd/throws.rs index 81ed97339f..e6e6747978 100644 --- a/fighters/shulk/src/acmd/throws.rs +++ b/fighters/shulk/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -170,8 +169,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/shulk/src/acmd/tilts.rs b/fighters/shulk/src/acmd/tilts.rs index 9a641a9e74..df5642bf00 100644 --- a/fighters/shulk/src/acmd/tilts.rs +++ b/fighters/shulk/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -20,7 +19,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -47,7 +45,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -69,11 +66,12 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/shulk/src/status/mod.rs b/fighters/shulk/src/status/mod.rs index 50ae277fd4..f3d832c7c9 100644 --- a/fighters/shulk/src/status/mod.rs +++ b/fighters/shulk/src/status/mod.rs @@ -5,25 +5,6 @@ use globals::*; mod special_n; mod special_s; -pub fn install(agent: &mut Agent) { - smashline::Agent::new("shulk"); - agent.on_start(shulk_init); - agent.install(); - special_n::install(agent); - special_s::install(agent); -} - -extern "C" fn shulk_init(fighter: &mut L2CFighterCommon) { - unsafe { - if smash::app::utility::get_kind(&mut *fighter.module_accessor) != *FIGHTER_KIND_SHULK { - return; - } - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); - } -} - unsafe extern "C" fn should_use_special_s_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::shulk::instance::DISABLE_SPECIAL_S) { false.into() @@ -44,3 +25,16 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L 0.into() } + +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); +} + +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + special_n::install(agent); + special_s::install(agent); +} diff --git a/fighters/shulk/src/status/special_n.rs b/fighters/shulk/src/status/special_n.rs index 54a9c5e6d3..9892936f6d 100644 --- a/fighters/shulk/src/status/special_n.rs +++ b/fighters/shulk/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let beat = VarModule::is_flag(fighter.battle_object, vars::shulk::status::MONADO_BEAT); diff --git a/fighters/shulk/src/status/special_s.rs b/fighters/shulk/src/status/special_s.rs index 7d5580530d..1f682f3deb 100644 --- a/fighters/shulk/src/status/special_s.rs +++ b/fighters/shulk/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S unsafe extern "C" fn shulk_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/simon/src/acmd/aerials.rs b/fighters/simon/src/acmd/aerials.rs index bdb340503a..4153418e4c 100644 --- a/fighters/simon/src/acmd/aerials.rs +++ b/fighters/simon/src/acmd/aerials.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn simon_attack_air_n_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 6.0); @@ -37,7 +36,7 @@ unsafe extern "C" fn simon_attack_air_n_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairf(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -55,9 +54,9 @@ unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { frame(lua_state, 16.0); FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 23.0, 39.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 10.0, 7.0, Some(0.0), Some(23.0), Some(39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 10.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 8.0, 41.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 8.0, 7.0, Some(0.0), Some(8.0), Some(41.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 8.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); if is_excute(fighter) { @@ -73,10 +72,9 @@ unsafe extern "C" fn simon_attack_air_f_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairfhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -94,9 +92,9 @@ unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { frame(lua_state, 16.0); FT_DESIRED_RATE(fighter, 18.0-16.0, 3.0); if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 8.0, 41.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 8.0, 7.0, Some(0.0), Some(8.0), Some(41.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 8.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 12.0, 45, 65, 0, 65, 2.4, 0.0, 23.0, 39.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 55, 65, 0, 65, 2.4, 0.0, 10.0, 7.0, Some(0.0), Some(23.0), Some(39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 5.0, 50, 55, 0, 70, 5.5, 0.0, 10.0, 5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 17.0); if is_excute(fighter) { @@ -112,10 +110,9 @@ unsafe extern "C" fn simon_attack_air_f_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairflw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -151,10 +148,9 @@ unsafe extern "C" fn simon_attack_air_f_lw_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairb(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -173,9 +169,9 @@ unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_CLIFF_RAY_CHECK); WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LASSO_FLAG_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 70, 0, 65, 2.4, 0.0, 23.0, -39.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 75, 0, 65, 2.4, 0.0, 10.0, -7.0, Some(0.0), Some(23.0), Some(-39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 45, 75, 0, 65, 5.5, 0.0, 10.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 70, 0, 65, 2.4, 0.0, 8.0, -40.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 75, 0, 65, 2.4, 0.0, 8.0, -7.0, Some(0.0), Some(8.0), Some(-40.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 75, 0, 65, 5.5, 0.0, 8.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); if is_excute(fighter) { @@ -185,10 +181,9 @@ unsafe extern "C" fn simon_attack_air_b_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairbhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -207,9 +202,9 @@ unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_CLIFF_RAY_CHECK); WorkModule::off_flag(boma, *FIGHTER_SIMON_INSTANCE_WORK_ID_FLAG_ATTACK_AIR_LASSO_FLAG_CHECK); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 361, 70, 0, 65, 2.4, 0.0, 8.0, -40.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 361, 75, 0, 65, 2.4, 0.0, 8.0, -7.0, Some(0.0), Some(8.0), Some(-40.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 361, 75, 0, 65, 5.5, 0.0, 8.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); + ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 70, 0, 65, 2.4, 0.0, 23.0, -39.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 75, 0, 65, 2.4, 0.0, 10.0, -7.0, Some(0.0), Some(23.0), Some(-39.0), 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(fighter, 1, 0, Hash40::new("top"), 7.0, 45, 75, 0, 65, 5.5, 0.0, 10.0, -5.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); } frame(lua_state, 19.0); if is_excute(fighter) { @@ -219,10 +214,9 @@ unsafe extern "C" fn simon_attack_air_b_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairblw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -253,10 +247,9 @@ unsafe extern "C" fn simon_attack_air_b_lw_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -286,10 +279,9 @@ unsafe extern "C" fn simon_attack_air_hi_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } -unsafe extern "C" fn simon_attack_air_lw_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); if is_excute(fighter) { @@ -338,7 +330,7 @@ unsafe extern "C" fn simon_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn simon_attack_air_lw2_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackairlw2(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); FT_MOTION_RATE(fighter, 0.75); @@ -355,16 +347,18 @@ unsafe extern "C" fn simon_attack_air_lw2_game(fighter: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("simon") - .acmd("game_attackairn", simon_attack_air_n_game) - .acmd("game_attackairfhi", simon_attack_air_f_hi_game) - .acmd("game_attackairf", simon_attack_air_f_game) - .acmd("game_attackairflw", simon_attack_air_f_lw_game) - .acmd("game_attackairbhi", simon_attack_air_b_hi_game) - .acmd("game_attackairb", simon_attack_air_b_game) - .acmd("game_attackairblw", simon_attack_air_b_lw_game) - .acmd("game_attackairhi", simon_attack_air_hi_game) - .acmd("game_attackairlw", simon_attack_air_lw_game) - .acmd("game_attackairlw2", simon_attack_air_lw2_game) - .install(); + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairfhi", game_attackairfhi); + agent.acmd("game_attackairflw", game_attackairflw); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairbhi", game_attackairbhi); + agent.acmd("game_attackairblw", game_attackairblw); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_attackairlw2", game_attackairlw2); } diff --git a/fighters/simon/src/acmd/ground.rs b/fighters/simon/src/acmd/ground.rs index 8bc83c0fec..5bc7294e2a 100644 --- a/fighters/simon/src/acmd/ground.rs +++ b/fighters/simon/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -50,8 +49,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { frame(lua_state, 11.0); if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); - - } } @@ -145,6 +142,7 @@ unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); agent.acmd("sound_attackdash", sound_attackdash); diff --git a/fighters/simon/src/acmd/other.rs b/fighters/simon/src/acmd/other.rs index 8271d719ca..e1ade187ca 100644 --- a/fighters/simon/src/acmd/other.rs +++ b/fighters/simon/src/acmd/other.rs @@ -62,7 +62,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -100,8 +99,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } \ No newline at end of file diff --git a/fighters/simon/src/acmd/smashes.rs b/fighters/simon/src/acmd/smashes.rs index 1a1f00d42a..4dfbc21120 100644 --- a/fighters/simon/src/acmd/smashes.rs +++ b/fighters/simon/src/acmd/smashes.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -10,20 +9,19 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 24.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 6.0); @@ -32,19 +30,20 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 24.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 7.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 7.5, 28.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 7.5, 36.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 7.5, 43.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); - ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 7.5, 50.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 361, 77, 0, 60, 6.5, 0.0, 9.5, 17.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 5.0, 0.0, 11.0, 28.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 2, 0, Hash40::new("top"), 17.0, 361, 79, 0, 60, 4.0, 0.0, 12.5, 36.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 3, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.5, 0.0, 13.5, 43.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); + ATTACK(agent, 4, 0, Hash40::new("top"), 20.0, 40, 83, 0, 60, 3.0, 0.0, 14.5, 49.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_whip"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_SIMON_WHIP, *ATTACK_REGION_WHIP); } frame(lua_state, 27.0); if is_excute(agent) { AttackModule::clear_all(boma); } - } + + unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -64,7 +63,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -99,7 +97,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -135,13 +132,14 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } \ No newline at end of file diff --git a/fighters/simon/src/acmd/throws.rs b/fighters/simon/src/acmd/throws.rs index 9bfbb5e3f1..0fbd80f647 100644 --- a/fighters/simon/src/acmd/throws.rs +++ b/fighters/simon/src/acmd/throws.rs @@ -24,7 +24,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -166,8 +165,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwf", game_throwf); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } \ No newline at end of file diff --git a/fighters/simon/src/acmd/tilts.rs b/fighters/simon/src/acmd/tilts.rs index b61894156f..ae42e54085 100644 --- a/fighters/simon/src/acmd/tilts.rs +++ b/fighters/simon/src/acmd/tilts.rs @@ -105,7 +105,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -149,7 +148,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_SIMON_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { @@ -177,7 +175,6 @@ unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/simon/src/axe/acmd.rs b/fighters/simon/src/axe/acmd.rs index 42f4dc9e03..505fa00136 100644 --- a/fighters/simon/src/axe/acmd.rs +++ b/fighters/simon/src/axe/acmd.rs @@ -6,7 +6,6 @@ unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("axe"), 8.0, 100, 60, 0, 80, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 8, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/simon/src/status/attacklw3.rs b/fighters/simon/src/status/attacklw3.rs index 7f9347a89d..ad01cc77e9 100644 --- a/fighters/simon/src/status/attacklw3.rs +++ b/fighters/simon/src/status/attacklw3.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_SIMON_STATUS_KIND_ATTACK_LW32_LANDING diff --git a/fighters/simon/src/status/attacks3.rs b/fighters/simon/src/status/attacks3.rs index 13b97d88ca..f2c29da302 100644 --- a/fighters/simon/src/status/attacks3.rs +++ b/fighters/simon/src/status/attacks3.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_S3 diff --git a/fighters/simon/src/whip/aerials.rs b/fighters/simon/src/whip/acmd.rs similarity index 56% rename from fighters/simon/src/whip/aerials.rs rename to fighters/simon/src/whip/acmd.rs index aff641e7e1..fe7b929133 100644 --- a/fighters/simon/src/whip/aerials.rs +++ b/fighters/simon/src/whip/acmd.rs @@ -1,5 +1,74 @@ use super::*; +// tilts + +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 11.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 23.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } +} + +// smashes + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + FT_MOTION_RATE(agent, 0.2); + frame(lua_state, 2.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); + } + frame(lua_state, 5.0); + FT_MOTION_RATE(agent, 1); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 0.5); + frame(lua_state, 19.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 21.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); + } + frame(lua_state, 52.0); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 0.8); + frame(lua_state, 13.0); + FT_MOTION_RATE(agent, 1.0); +} + +// aerials + unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -13,7 +82,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 29.0); FT_DESIRED_RATE(agent, 43.0-29.0, 19.0); - } unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { @@ -41,7 +109,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { FT_DESIRED_RATE(agent, 18.0-16.0, 3.0); frame(lua_state, 18.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -58,7 +125,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -75,10 +141,15 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); } - } pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + + agent.acmd("game_attackhi4", game_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("game_attackairn", game_attackairn); agent.acmd("game_landingairn", game_landingairn); diff --git a/fighters/simon/src/whip/mod.rs b/fighters/simon/src/whip/mod.rs index 30b4704e23..6843b9d849 100644 --- a/fighters/simon/src/whip/mod.rs +++ b/fighters/simon/src/whip/mod.rs @@ -1,13 +1,9 @@ use super::*; -mod aerials; -mod smashes; -mod tilts; +mod acmd; pub fn install() { let agent = &mut Agent::new("simon_whip"); - aerials::install(agent); - smashes::install(agent); - tilts::install(agent); + acmd::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/simon/src/whip/smashes.rs b/fighters/simon/src/whip/smashes.rs deleted file mode 100644 index 57ec3c5bf1..0000000000 --- a/fighters/simon/src/whip/smashes.rs +++ /dev/null @@ -1,51 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(agent, 0.2); - frame(lua_state, 2.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - frame(lua_state, 5.0); - FT_MOTION_RATE(agent, 1); - frame(lua_state, 13.0); - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 19.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 21.0); - FT_MOTION_RATE(agent, 1); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 52.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - -} - -unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 0.8); - frame(lua_state, 13.0); - FT_MOTION_RATE(agent, 1.0); - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); -} \ No newline at end of file diff --git a/fighters/simon/src/whip/tilts.rs b/fighters/simon/src/whip/tilts.rs deleted file mode 100644 index d6b3edfe15..0000000000 --- a/fighters/simon/src/whip/tilts.rs +++ /dev/null @@ -1,26 +0,0 @@ -use super::*; - -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_NONE); - } - FT_MOTION_RATE(agent, 0.5); - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 11.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_COLLIDE); - } - frame(lua_state, 23.0); - if is_excute(agent) { - PhysicsModule::set_2nd_status(boma, *PH2NDARY_CRAW_MOVE); - } - -} - -pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", game_attacks3); -} \ No newline at end of file diff --git a/fighters/snake/src/acmd/aerials.rs b/fighters/snake/src/acmd/aerials.rs index 71a89f55c9..5907eb70e9 100644 --- a/fighters/snake/src/acmd/aerials.rs +++ b/fighters/snake/src/acmd/aerials.rs @@ -67,7 +67,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -103,7 +102,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -142,7 +140,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -172,7 +169,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -241,13 +237,16 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); } \ No newline at end of file diff --git a/fighters/snake/src/acmd/ground.rs b/fighters/snake/src/acmd/ground.rs index b788fcb8cd..3979c31479 100644 --- a/fighters/snake/src/acmd/ground.rs +++ b/fighters/snake/src/acmd/ground.rs @@ -86,12 +86,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } \ No newline at end of file diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index ee62dfb1ff..8c6f74d76b 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -211,6 +211,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyn", sound_damagefly); agent.acmd("sound_damageflytop", sound_damagefly); agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); diff --git a/fighters/snake/src/acmd/specials.rs b/fighters/snake/src/acmd/specials.rs index 9aafc77f46..94917258a7 100644 --- a/fighters/snake/src/acmd/specials.rs +++ b/fighters/snake/src/acmd/specials.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.333); } - } unsafe extern "C" fn game_specialsstart(agent : &mut L2CAgentBase) { @@ -218,7 +217,6 @@ unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_speciallwblast(agent: &mut L2CAgentBase) { @@ -239,7 +237,6 @@ unsafe extern "C" fn game_speciallwblast(agent: &mut L2CAgentBase) { } frame(lua_state, 40.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_speciallwsquatblast(agent: &mut L2CAgentBase) { @@ -267,7 +264,6 @@ unsafe extern "C" fn game_speciallwsquatblast(agent: &mut L2CAgentBase) { } frame(lua_state, 40.0); FT_MOTION_RATE(agent, 1.0); - } unsafe extern "C" fn game_specialairhihang(agent: &mut L2CAgentBase) { diff --git a/fighters/snake/src/acmd/throws.rs b/fighters/snake/src/acmd/throws.rs index 54b2c86f79..2ad9a9ac3d 100644 --- a/fighters/snake/src/acmd/throws.rs +++ b/fighters/snake/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/snake/src/acmd/tilts.rs b/fighters/snake/src/acmd/tilts.rs index 7ead5b46c1..c102b8011a 100644 --- a/fighters/snake/src/acmd/tilts.rs +++ b/fighters/snake/src/acmd/tilts.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { @@ -48,7 +47,6 @@ unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -79,7 +77,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -113,12 +110,13 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.000); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); } \ No newline at end of file diff --git a/fighters/snake/src/c4/acmd.rs b/fighters/snake/src/c4/acmd.rs index 4c50195778..c1772245e2 100644 --- a/fighters/snake/src/c4/acmd.rs +++ b/fighters/snake/src/c4/acmd.rs @@ -14,10 +14,6 @@ unsafe extern "C" fn game_establishtarget(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_sticktarget(agent: &mut L2CAgentBase) { - -} - unsafe extern "C" fn effect_sticktarget(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -205,11 +201,16 @@ unsafe extern "C" fn game_explosion(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_establishtarget", game_establishtarget); - agent.acmd("game_sticktarget", game_sticktarget); + + agent.acmd("game_sticktarget", stub); agent.acmd("effect_sticktarget", effect_sticktarget); agent.acmd("sound_sticktarget", sound_sticktarget); + agent.acmd("effect_stickother", effect_stickother); + agent.acmd("game_explosion", game_explosion); } \ No newline at end of file diff --git a/fighters/snake/src/c4/mod.rs b/fighters/snake/src/c4/mod.rs index 4ca8d53264..54c4f7f17a 100644 --- a/fighters/snake/src/c4/mod.rs +++ b/fighters/snake/src/c4/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("snake_c4"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/snake/src/c4/opff.rs b/fighters/snake/src/c4/opff.rs new file mode 100644 index 0000000000..51a887a8f7 --- /dev/null +++ b/fighters/snake/src/c4/opff.rs @@ -0,0 +1,21 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +unsafe extern "C" fn c4_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { + if weapon.is_status(*WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET) { + let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let snake = utils::util::get_battle_object_from_id(owner_id); + let snake_boma = &mut *(*snake).module_accessor; + let snake_status_kind = StatusModule::status_kind(snake_boma); + // Despawn sticky when snake dies + if snake_status_kind == *FIGHTER_STATUS_KIND_DEAD { + ArticleModule::remove_exist(snake_boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, c4_callback); +} \ No newline at end of file diff --git a/fighters/snake/src/cypher/acmd.rs b/fighters/snake/src/cypher/acmd.rs index 6a76177d9b..a192b37f1c 100644 --- a/fighters/snake/src/cypher/acmd.rs +++ b/fighters/snake/src/cypher/acmd.rs @@ -1,9 +1,7 @@ use super::*; -unsafe extern "C" fn game_detach(agent: &mut L2CAgentBase) { - -} +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("game_detach", game_detach); + agent.acmd("game_detach", stub); } \ No newline at end of file diff --git a/fighters/snake/src/nikita/acmd.rs b/fighters/snake/src/nikita/acmd.rs index dd01f765b6..966bfbd640 100644 --- a/fighters/snake/src/nikita/acmd.rs +++ b/fighters/snake/src/nikita/acmd.rs @@ -1,14 +1,8 @@ use super::*; -unsafe extern "C" fn sound_start(agent : &mut L2CAgentBase) { - -} - -unsafe extern "C" fn sound_shoot(agent : &mut L2CAgentBase) { - -} +unsafe extern "C" fn stub(agent : &mut L2CAgentBase) {} pub fn install(agent: &mut Agent) { - agent.acmd("sound_start", sound_start); - agent.acmd("sound_shoot", sound_shoot); + agent.acmd("sound_start", stub); + agent.acmd("sound_shoot", stub); } \ No newline at end of file diff --git a/fighters/snake/src/nikitamissile/acmd.rs b/fighters/snake/src/nikitamissile/acmd.rs index 469a90c6ee..e86b37ec7b 100644 --- a/fighters/snake/src/nikitamissile/acmd.rs +++ b/fighters/snake/src/nikitamissile/acmd.rs @@ -32,10 +32,6 @@ unsafe extern "C" fn effect_fly(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_fly(agent : &mut L2CAgentBase) { - -} - unsafe extern "C" fn effect_stopfall(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -69,10 +65,6 @@ unsafe extern "C" fn sound_explosion(agent : &mut L2CAgentBase) { } } -unsafe extern "C" fn game_hiexplosion(agent : &mut L2CAgentBase) { - -} - unsafe extern "C" fn effect_fallexplosion(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -81,26 +73,28 @@ unsafe extern "C" fn effect_fallexplosion(agent : &mut L2CAgentBase) { } } +unsafe extern "C" fn stub(agent : &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_flyattackcommon", game_fly); agent.acmd("game_fly", game_fly); agent.acmd("effect_fly", effect_fly); - agent.acmd("sound_fly", sound_fly); + agent.acmd("sound_fly", stub); agent.acmd("game_stopfall", game_fly); agent.acmd("effect_stopfall", effect_stopfall); - agent.acmd("sound_stopfall", sound_fly); + agent.acmd("sound_stopfall", stub); agent.acmd("game_explosion", game_explosion); agent.acmd("effect_explosion", effect_explosion); agent.acmd("sound_explosion", sound_explosion); - agent.acmd("game_hiexplosion", game_hiexplosion); + agent.acmd("game_hiexplosion", stub); agent.acmd("effect_hiexplosion", effect_explosion); agent.acmd("sound_hiexplosion", sound_explosion); - agent.acmd("game_fallexplosion", game_hiexplosion); + agent.acmd("game_fallexplosion", stub); agent.acmd("effect_fallexplosion", effect_fallexplosion); agent.acmd("sound_fallexplosion", sound_explosion); } \ No newline at end of file diff --git a/fighters/snake/src/opff.rs b/fighters/snake/src/opff.rs index 5b9d6f2e95..a8df810a2a 100644 --- a/fighters/snake/src/opff.rs +++ b/fighters/snake/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - /*unsafe fn grab_walk(boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat2: i32) { if status_kind == *FIGHTER_STATUS_KIND_CATCH_WAIT { let motion_value = 0.65; @@ -126,22 +125,6 @@ pub unsafe fn snake_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -unsafe extern "C" fn c4_callback(weapon: &mut smash::lua2cpp::L2CFighterBase) { - if weapon.kind() != WEAPON_KIND_SNAKE_C4 { - return - } - if weapon.is_status(*WEAPON_SNAKE_C4_STATUS_KIND_STICK_TARGET) { - let owner_id = WorkModule::get_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let snake = utils::util::get_battle_object_from_id(owner_id); - let snake_boma = &mut *(*snake).module_accessor; - let snake_status_kind = StatusModule::status_kind(snake_boma); - // Despawn sticky when snake dies - if snake_status_kind == *FIGHTER_STATUS_KIND_DEAD { - ArticleModule::remove_exist(snake_boma, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } -} pub fn install(agent: &mut Agent) { agent.on_line(Main, snake_frame_wrapper); - agent.on_line(Main, c4_callback); } \ No newline at end of file diff --git a/fighters/snake/src/status/appeal.rs b/fighters/snake/src/status/appeal.rs index afbde0b565..b80be6e329 100644 --- a/fighters/snake/src/status/appeal.rs +++ b/fighters/snake/src/status/appeal.rs @@ -1,7 +1,5 @@ use super::*; -use globals::*; - //implimented function for checking if an article is "constrained" to snake extern "C" { #[link_name = "\u{1}_ZN3app24FighterSpecializer_Snake21is_constraint_articleERNS_7FighterEiNS_22ArticleOperationTargetE"] @@ -205,6 +203,7 @@ unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCom ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_C4_SWITCH, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); return 0.into() } + pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_main); agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_end); diff --git a/fighters/snake/src/status/attack_s4.rs b/fighters/snake/src/status/attack_s4.rs index f7bd2bcac6..10707f8320 100644 --- a/fighters/snake/src/status/attack_s4.rs +++ b/fighters/snake/src/status/attack_s4.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; - + +// FIGHTER_STATUS_KIND_ATTACK_S4 ////changed rpg7 side-smash to multi-hit knife diff --git a/fighters/snake/src/status/catch.rs b/fighters/snake/src/status/catch.rs index 87384d0e98..12b167118a 100644 --- a/fighters/snake/src/status/catch.rs +++ b/fighters/snake/src/status/catch.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; - ////fixed unwanted buffered throws and walking diff --git a/fighters/snake/src/status/mod.rs b/fighters/snake/src/status/mod.rs index 7699533302..31319381ad 100644 --- a/fighters/snake/src/status/mod.rs +++ b/fighters/snake/src/status/mod.rs @@ -6,44 +6,12 @@ mod appeal; mod attack_s4; mod catch; mod special_s; - -unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("appeal_hi_l"), - hash40("appeal_hi_r"), - hash40("appeal_s_l"), - hash40("appeal_s_r"), - hash40("appeal_lw_l"), - hash40("appeal_lw_r") - ].contains(&mot) { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { - ArticleModule::remove(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - else { - let fighta = fighter.global_table[0x2].get_ptr() as *mut Fighter; - if FighterSpecializer_Snake::is_constraint_article( - fighta, - *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL) - ) & 1 != 0 { - ArticleModule::shoot( - fighter.module_accessor, - *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), - false - ); - } - } - fighter.status_end_Rebirth(); - 0.into() -} +mod rebirth; pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end); appeal::install(agent); attack_s4::install(agent); catch::install(agent); special_s::install(agent); + rebirth::install(agent); } \ No newline at end of file diff --git a/fighters/snake/src/status/rebirth.rs b/fighters/snake/src/status/rebirth.rs new file mode 100644 index 0000000000..1e46c6c82b --- /dev/null +++ b/fighters/snake/src/status/rebirth.rs @@ -0,0 +1,40 @@ +use super::*; + +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let mot = MotionModule::motion_kind(fighter.module_accessor); + if [ + hash40("appeal_hi_l"), + hash40("appeal_hi_r"), + hash40("appeal_s_l"), + hash40("appeal_s_r"), + hash40("appeal_lw_l"), + hash40("appeal_lw_r") + ].contains(&mot) { + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { + ArticleModule::remove(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + } + else { + let fighta = fighter.global_table[0x2].get_ptr() as *mut Fighter; + if FighterSpecializer_Snake::is_constraint_article( + fighta, + *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, + ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL) + ) & 1 != 0 { + ArticleModule::shoot( + fighter.module_accessor, + *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, + ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), + false + ); + } + } + fighter.status_end_Rebirth(); + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end); +} \ No newline at end of file diff --git a/fighters/snake/src/status/special_s.rs b/fighters/snake/src/status/special_s.rs index a93184b993..463f703938 100644 --- a/fighters/snake/src/status/special_s.rs +++ b/fighters/snake/src/status/special_s.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; - -////side-special tranq gun +// FIGHTER_STATUS_KIND_SPECIAL_S + +// side-special tranq gun unsafe extern "C" fn snake_side_special_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { PostureModule::set_stick_lr(fighter.module_accessor, 0.0); diff --git a/fighters/tantan/src/acmd/aerials.rs b/fighters/tantan/src/acmd/aerials.rs index 3987c73370..25ab588f33 100644 --- a/fighters/tantan/src/acmd/aerials.rs +++ b/fighters/tantan/src/acmd/aerials.rs @@ -1,132 +1,5 @@ - use super::*; -unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 6.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 24.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); - } -} - -unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.571); - frame(lua_state, 4.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - frame(lua_state, 14.0); - if is_excute(agent) { - /* Ground-only */ - ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - /* Air-only */ - ATTACK(agent, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - - ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 17.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::clear(boma, 2, false); - } - frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(agent, 18.0, 41.0, 14.0); - frame(lua_state, 36.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - } - -} - -unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); - LAST_EFFECT_SET_RATE(agent, 0.9); - EffectModule::enable_sync_init_pos_last(boma); - } - frame(lua_state, 14.0); - if is_excute(agent) { - EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); - } -} - -unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_tantan_attackair_l01")); - } - frame(lua_state, 14.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_tantan_smash_h01")); - PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); - } -} - -unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - -} - -unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); - ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 26.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); - } -} - unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { frame(agent.lua_state_agent, 1.0); FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); @@ -408,14 +281,127 @@ unsafe extern "C" fn expression_landingairb(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 6.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.5, 70, 114, 0, 48, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 7.5, 70, 114, 0, 48, 4.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 24.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); + } +} + +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.571); + frame(lua_state, 4.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } + frame(lua_state, 14.0); + if is_excute(agent) { + /* Ground-only */ + ATTACK(agent, 0, 0, Hash40::new("kneel"), 13.0, 285, 90, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + /* Air-only */ + ATTACK(agent, 2, 0, Hash40::new("kneel"), 13.0, 285, 53, 0, 30, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 17.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneel"), 11.0, 80, 79, 0, 70, 4.75, 4.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 80, 79, 0, 70, 4.5, 0.0, 6.5, -2.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::clear(boma, 2, false); + } + frame(lua_state, 18.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 41.0, 14.0); + frame(lua_state, 36.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + } +} + +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 14.5, -1.75, 78, 0, 0, 1.0, true, 0.8); + LAST_EFFECT_SET_RATE(agent, 0.9); + EffectModule::enable_sync_init_pos_last(boma); + } + frame(lua_state, 14.0); + if is_excute(agent) { + EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 1.0, 0, 0, 0, 0, 0, 1.0, true, 0.95); + } +} + +unsafe extern "C" fn sound_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackair_l01")); + } + frame(lua_state, 14.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_smash_h01")); + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); + } +} + +unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 26.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("expression_attackairhi", expression_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("effect_attackairlw", effect_attackairlw); - agent.acmd("sound_attackairlw", sound_attackairlw); - agent.acmd("game_landingairlw", game_landingairlw); - agent.acmd("expression_landingairlw", expression_landingairlw); agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); agent.acmd("sound_attackairn", sound_attackairn); @@ -423,6 +409,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_landingairn", effect_landingairn); agent.acmd("sound_landingairn", sound_landingairn); agent.acmd("expression_landingairn", expression_landingairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("effect_attackairf", effect_attackairf); agent.acmd("sound_attackairf", sound_attackairf); @@ -430,6 +417,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_landingairf", effect_landingairf); agent.acmd("sound_landingairf", sound_landingairf); agent.acmd("expression_landingairf", expression_landingairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("sound_attackairb", sound_attackairb); @@ -437,4 +425,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_landingairb", effect_landingairb); agent.acmd("sound_landingairb", sound_landingairb); agent.acmd("expression_landingairb", expression_landingairb); + + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); + agent.acmd("sound_attackairlw", sound_attackairlw); + agent.acmd("game_landingairlw", stub); + agent.acmd("expression_landingairlw", expression_landingairlw); } diff --git a/fighters/tantan/src/acmd/ground.rs b/fighters/tantan/src/acmd/ground.rs index 2b526e9f31..13f6fa4060 100644 --- a/fighters/tantan/src/acmd/ground.rs +++ b/fighters/tantan/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -117,12 +116,12 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area_xy(boma, 4.0, 2.9, 7.2, 7.2); } - } pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/tantan/src/acmd/other.rs b/fighters/tantan/src/acmd/other.rs index 281d0594d7..aa7bf2e3f0 100644 --- a/fighters/tantan/src/acmd/other.rs +++ b/fighters/tantan/src/acmd/other.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -77,7 +76,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { @@ -109,8 +107,6 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attacklegsjumpaerialb(agent: &mut L2CAgentBase) { -} //Ram Ram attacks// unsafe extern "C" fn game_attackshortendr1(agent: &mut L2CAgentBase) { @@ -125,6 +121,9 @@ unsafe extern "C" fn game_attackshortendr1(agent: &mut L2CAgentBase) { VarModule::on_flag(agent.battle_object, vars::tantan::status::ARMS_ATTACK_CANCEL); } } + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); agent.acmd("sound_damageflylw", sound_damagefly); @@ -139,8 +138,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); - agent.acmd("effect_attacklegsjumpaerialf", effect_attacklegsjumpaerialb); - agent.acmd("effect_attacklegsjumpaerialb", effect_attacklegsjumpaerialb); + agent.acmd("effect_attacklegsjumpaerialf", stub); + agent.acmd("effect_attacklegsjumpaerialb", stub); agent.acmd("game_attackshortendr1", game_attackshortendr1); agent.acmd("game_attackshortendrb1", game_attackshortendr1); diff --git a/fighters/tantan/src/acmd/smashes.rs b/fighters/tantan/src/acmd/smashes.rs index 19312266c0..27b24ab6f9 100644 --- a/fighters/tantan/src/acmd/smashes.rs +++ b/fighters/tantan/src/acmd/smashes.rs @@ -1,83 +1,5 @@ - use super::*; -unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); - frame(lua_state, 6.0); - FT_MOTION_RATE(agent, 1.0); - if is_excute(agent) { - shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - } - frame(lua_state, 7.0); - if is_excute(agent) { - //shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); - } - frame(lua_state, 10.0); - if is_excute(agent) { - shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); - ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 13.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - } - frame(lua_state, 16.0); - if is_excute(agent) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); - AttackModule::clear_all(boma); - } - -} - -unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); - } - frame(lua_state, 3.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 6.0); - if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); - HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); - HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); - ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); - } - wait(lua_state, 3.0); - if is_excute(agent) { - HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); - AttackModule::clear_all(boma); - } - -} - unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -236,7 +158,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { EffectModule::set_rate(boma, effect_r as u32, 1.1); } } - } unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { @@ -337,14 +258,124 @@ unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { } } +//Right arm charging punch// + +unsafe extern "C" fn sound_attacks4charger(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); + + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_smash_start")); + } + if armType==1 { + frame(lua_state, 6.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack02_charge")); + } + } + else if armType==2 { + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_STATUS(agent, Hash40::new("se_tantan_attack03_charge")); + } + } + else{ + frame(lua_state, 8.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); + } + } +} + +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 4.0/(6.0-4.0)); + frame(lua_state, 6.0); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + } + frame(lua_state, 7.0); + if is_excute(agent) { + //shield!(fighter, *MA_MSC_CMD_SHIELD_ON, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 75, 95, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 16.0, 75, 95, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 16.0, 75, 95, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + } + frame(lua_state, 10.0); + if is_excute(agent) { + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_A, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_NORMAL); + ATTACK(agent, 0, 0, Hash40::new("legl"), 12.0, 82, 100, 0, 48, 4.0, 0.0, 2.0, 0.0, None, None, None, 0.9, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 14.0, 82, 100, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 14.0, 82, 100, 0, 48, 5.0, 0.0, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 13.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("legl"), 10.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneel"), 12.0, 82, 103, 0, 48, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 12.0, 82, 103, 0, 48, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + } + frame(lua_state, 16.0); + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_TANTAN_REFLECTOR_KIND_ATTACK_HI4_B, *FIGHTER_TANTAN_REFLECTOR_GROUP_ATTACK_HI4); + AttackModule::clear_all(boma); + } +} + +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); + } + frame(lua_state, 3.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 4.5); + HIT_NODE(agent, Hash40::new("kneel"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("kneer"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legl"), *HIT_STATUS_XLU); + HIT_NODE(agent, Hash40::new("legr"), *HIT_STATUS_XLU); + ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, 7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 80, 0, 50, 4.5, 0.0, 2.5, -7.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, 12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 30, 77, 0, 50, 5.0, 0.0, 2.5, -12.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); + } + wait(lua_state, 3.0); + if is_excute(agent) { + HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); + AttackModule::clear_all(boma); + } +} + pub fn install(agent: &mut Agent) { - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("game_attacks4", game_attacks4); agent.acmd("effect_attacks4", effect_attacks4); agent.acmd("sound_attacks4", sound_attacks4); agent.acmd("expression_attacks4", expression_attacks4); agent.acmd("effect_attacks4charge", effect_attacks4charge); agent.acmd("sound_attacks4charge", sound_attacks4charge); - agent.acmd("expression_attacks4charge",expression_attacks4charge,); + agent.acmd("expression_attacks4charge",expression_attacks4charge); + + agent.acmd("sound_attacks4charger", sound_attacks4charger); + agent.acmd("sound_attacks4chargerb", sound_attacks4charger); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/tantan/src/acmd/specials.rs b/fighters/tantan/src/acmd/specials.rs index eb0d41a7a2..404192e65c 100644 --- a/fighters/tantan/src/acmd/specials.rs +++ b/fighters/tantan/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialairn(agent: &mut L2CAgentBase) { @@ -264,37 +263,6 @@ unsafe extern "C" fn game_specialairhistart(agent: &mut L2CAgentBase) { } } -//Right arm charging punch// - -unsafe extern "C" fn sound_attacks4charger(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); - - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_smash_start")); - } - if armType==1 { - frame(lua_state, 6.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_tantan_attack02_charge")); - } - } - else if armType==2 { - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_STATUS(agent, Hash40::new("se_tantan_attack03_charge")); - } - } - else{ - frame(lua_state, 8.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_tantan_attack01_beam_ready")); - } - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_specialairn", game_specialairn); agent.acmd("effect_specialairn", effect_specialairn); @@ -303,11 +271,10 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnend", game_specialairnend); agent.acmd("effect_specialairnend", effect_specialairnend); agent.acmd("sound_specialairnend", sound_specialairnend); - agent.acmd("expression_specialairnend",expression_specialairnend,); + agent.acmd("expression_specialairnend",expression_specialairnend); + agent.acmd("effect_specialairhi", effect_specialairhi); agent.acmd("effect_specialairhi2", effect_specialairhi); agent.acmd("game_specialairhistart", game_specialairhistart); agent.acmd("game_specialairhistart2", game_specialairhistart); - agent.acmd("sound_attacks4charger", sound_attacks4charger); - agent.acmd("sound_attacks4chargerb", sound_attacks4charger); } diff --git a/fighters/tantan/src/acmd/throws.rs b/fighters/tantan/src/acmd/throws.rs index d89d82e9e6..c3ef32265e 100644 --- a/fighters/tantan/src/acmd/throws.rs +++ b/fighters/tantan/src/acmd/throws.rs @@ -28,7 +28,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { } } - unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -40,7 +39,6 @@ unsafe extern "C" fn sound_catch(agent: &mut L2CAgentBase) { if is_excute(agent) { STOP_SE(agent, Hash40::new("se_common_swing_06")); } - } unsafe extern "C" fn expression_catch(agent: &mut L2CAgentBase) { @@ -82,5 +80,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("sound_catch", sound_catch); agent.acmd("expression_catch", expression_catch); + agent.acmd("game_throwhi", game_throwhi); } diff --git a/fighters/tantan/src/acmd/tilts.rs b/fighters/tantan/src/acmd/tilts.rs index cd7fac4e0c..b319591b4d 100644 --- a/fighters/tantan/src/acmd/tilts.rs +++ b/fighters/tantan/src/acmd/tilts.rs @@ -1,10 +1,105 @@ - use super::*; -unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + frame(lua_state, 6.0); + let motion = MotionModule::motion_kind(boma); + let isHigh = motion == Hash40::new("attack_s3_hi").hash; + let isLow = motion == Hash40::new("attack_s3_lw").hash; + let damageBonus = if (!isHigh && !isLow) {0.0} else {0.5}; + + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + + if (isHigh) + {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false);} + else if (isLow) + {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false);} + } + wait(lua_state, 3.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + + frame(lua_state, 6.0); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); + LAST_EFFECT_SET_RATE(agent, 1.5); + } + frame(lua_state, 6.0); + if is_excute(agent) { + FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + } +} + +unsafe extern "C" fn sound_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_tantan_attackhard_h01")); + } + frame(lua_state, 5.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); + } +} + +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); + } + frame(lua_state, 4.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 6.0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); + } + frame(lua_state, 33.0); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); + } +} + +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let kbg = 95; let bkb = 85; frame(lua_state, 5.0); @@ -44,7 +139,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -54,7 +148,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let mut sfx_level = *ATTACK_SOUND_LEVEL_M; let mut sizeFactor = 1.0; let mut powerFactor = 1.0; - frame(lua_state, 12.0); if is_excute(agent) { HIT_NODE(agent, Hash40::new("handl"), *HIT_STATUS_OFF); @@ -106,7 +199,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 13.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); @@ -160,7 +252,6 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let mut powerFactor = 1.0; - if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } @@ -179,124 +270,24 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - frame(lua_state, 6.0); - let motion = MotionModule::motion_kind(boma); - let isHigh = motion == Hash40::new("attack_s3_hi").hash; - let isLow = motion == Hash40::new("attack_s3_lw").hash; - let damageBonus = if (!isHigh && !isLow) {0.0} else {0.5}; - - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 3.8, 7.5, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("kneer"), 9.5+(damageBonus*2.0), 361, 75, 0, 37, 4.2, 1.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("kneer"), 8.5+damageBonus, 361, 75, 0, 37, 3.8, -5.0, 0.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - - if (isHigh) - {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_HIGH), false);} - else if (isLow) - {AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false);} - } - wait(lua_state, 3.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 11.5, 2.2, -21.5, 2.5, 13.5, 1, true); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 6.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 8.5, 2.2, -8.5, 17, 9.5, 1, true); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 6.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 6.0); - if is_excute(agent) { - EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 2, 6, 2.2, 5, -1, 11.8, 0.95, true); - LAST_EFFECT_SET_RATE(agent, 1.5); - } - frame(lua_state, 6.0); - if is_excute(agent) { - FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - } -} - -unsafe extern "C" fn sound_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - - frame(lua_state, 3.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_tantan_attackhard_h01")); - } - frame(lua_state, 5.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack01")); - } -} - -unsafe extern "C" fn expression_attacks3hi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - } - frame(lua_state, 4.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 6.0); - if is_excute(agent) { - RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); - } - frame(lua_state, 33.0); - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 3); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); agent.acmd("sound_attacklw3", sound_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("game_attacks3", game_attacks3hi); - agent.acmd("game_attacks3lw", game_attacks3hi); + + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3); + agent.acmd("game_attacks3lw", game_attacks3); agent.acmd("effect_attacks3hi", effect_attacks3hi); agent.acmd("effect_attacks3", effect_attacks3); agent.acmd("effect_attacks3lw", effect_attacks3lw); - agent.acmd("sound_attacks3hi", sound_attacks3hi); - agent.acmd("sound_attacks3", sound_attacks3hi); - agent.acmd("sound_attacks3lw", sound_attacks3hi); - agent.acmd("expression_attacks3hi", expression_attacks3hi); - agent.acmd("expression_attacks3", expression_attacks3hi); - agent.acmd("expression_attacks3lw", expression_attacks3hi); + agent.acmd("sound_attacks3", sound_attacks3); + agent.acmd("sound_attacks3hi", sound_attacks3); + agent.acmd("sound_attacks3lw", sound_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("expression_attacks3hi", expression_attacks3); + agent.acmd("expression_attacks3lw", expression_attacks3); } diff --git a/fighters/tantan/src/opff.rs b/fighters/tantan/src/opff.rs index 7374832021..d63ab7f187 100644 --- a/fighters/tantan/src/opff.rs +++ b/fighters/tantan/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - //TODO: Figure out how to cancel arm recoil with a tilt/aerial, and if it's worth implementing unsafe fn recoil_cancel(boma: &mut BattleObjectModuleAccessor,status: i32,situation_kind: i32){ @@ -111,40 +110,6 @@ pub unsafe fn tantan_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } -/// prevents rocket from despawning in the blastzone -unsafe extern "C" fn dragon_frame(weapon: &mut L2CFighterBase) { - let boma = weapon.module_accessor; - - let mut is_dragonized = WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); - if !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_LEFT) - && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_KIRBY) - { - let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; - if sv_battle_object::is_active(minmin_id) { - let minmin = utils::util::get_battle_object_from_id(minmin_id); - let minmin_boma = &mut *(*minmin).module_accessor; - let bigScale = WorkModule::get_param_float(minmin_boma,hash40("param_private"),hash40("arm_l_big_scale")); - - //Only update if previously was not dragonized - if !is_dragonized { - is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; - WorkModule::set_flag(boma, is_dragonized,*WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); - - if is_dragonized { - let handle = EffectModule::req_follow(boma, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("gimmickc"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, bigScale, true, 0, 0, 0, 0, 0, false, false); - } - } - if is_dragonized { - PostureModule::set_scale(boma, bigScale, false); - } - } - } - if is_dragonized { - AttackModule::set_power_mul(boma, 1.15); - } -} pub fn install(agent: &mut Agent) { agent.on_line(Main, tantan_frame_wrapper); - agent.on_line(Main, dragon_frame); - agent.install(); } diff --git a/fighters/tantan/src/punch1/mod.rs b/fighters/tantan/src/punch1/mod.rs index 622845add8..c27599cd53 100644 --- a/fighters/tantan/src/punch1/mod.rs +++ b/fighters/tantan/src/punch1/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod opff; pub fn install() { let agent = &mut Agent::new("tantan_punch1"); acmd::install(agent); + opff::install(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/tantan/src/punch1/opff.rs b/fighters/tantan/src/punch1/opff.rs new file mode 100644 index 0000000000..cfe50e87b8 --- /dev/null +++ b/fighters/tantan/src/punch1/opff.rs @@ -0,0 +1,41 @@ +// opff import +utils::import_noreturn!(common::opff::fighter_common_opff); +use super::*; +use globals::*; + +/// prevents rocket from despawning in the blastzone +unsafe extern "C" fn dragon_frame(weapon: &mut L2CFighterBase) { + let boma = weapon.module_accessor; + + let mut is_dragonized = WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); + if !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_LEFT) + && !WorkModule::is_flag(boma, *WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_KIRBY) + { + let minmin_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_ACTIVATE_FOUNDER_ID) as u32; + if sv_battle_object::is_active(minmin_id) { + let minmin = utils::util::get_battle_object_from_id(minmin_id); + let minmin_boma = &mut *(*minmin).module_accessor; + let bigScale = WorkModule::get_param_float(minmin_boma,hash40("param_private"),hash40("arm_l_big_scale")); + + //Only update if previously was not dragonized + if !is_dragonized { + is_dragonized = WorkModule::get_int(minmin_boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME) > 0; + WorkModule::set_flag(boma, is_dragonized,*WEAPON_TANTAN_PUNCH1_INSTANCE_WORK_ID_FLAG_IS_DRAGONIZE); + + if is_dragonized { + let handle = EffectModule::req_follow(boma, Hash40::new("tantan_dragon_attack_fire"), Hash40::new("gimmickc"), &Vector3f{x: 0.0, y: 0.0, z: 0.0}, &Vector3f{x: 0.0, y: 0.0, z: 0.0}, bigScale, true, 0, 0, 0, 0, 0, false, false); + } + } + if is_dragonized { + PostureModule::set_scale(boma, bigScale, false); + } + } + } + if is_dragonized { + AttackModule::set_power_mul(boma, 1.15); + } +} + +pub fn install(agent: &mut Agent) { + agent.on_line(Main, dragon_frame); +} diff --git a/fighters/tantan/src/status/attack.rs b/fighters/tantan/src/status/attack.rs new file mode 100644 index 0000000000..9e759dc417 --- /dev/null +++ b/fighters/tantan/src/status/attack.rs @@ -0,0 +1,22 @@ +use super::*; + +// Normal Jab // + +unsafe extern "C" fn tantan_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_Attack(); +} + +unsafe extern "C" fn tantan_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_AttackCommon(); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.check_attack_mtrans(); + } + fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(L2CFighterCommon_bind_address_call_check_attack_mtrans as *const () as _)); + fighter.sub_status_AttackComboCommon(); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main); +} diff --git a/fighters/tantan/src/status/attack_air.rs b/fighters/tantan/src/status/attack_air.rs new file mode 100644 index 0000000000..29335a9559 --- /dev/null +++ b/fighters/tantan/src/status/attack_air.rs @@ -0,0 +1,29 @@ +use super::*; + +// Aerial Attacks + +unsafe extern "C" fn tantan_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackAir(); +} + +unsafe extern "C" fn tantan_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_end_AttackAir(); +} + +unsafe extern "C" fn tantan_landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::prev_status_kind(fighter.module_accessor, 0) == *FIGHTER_STATUS_KIND_SPECIAL_N + { + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_LandingAttackAir_Main as *const () as _)) + } + else{ + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR)(fighter); + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end); + + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, tantan_landing_air_main); +} diff --git a/fighters/tantan/src/status/attack_jump_aerial.rs b/fighters/tantan/src/status/attack_jump_aerial.rs new file mode 100644 index 0000000000..100d8c78a1 --- /dev/null +++ b/fighters/tantan/src/status/attack_jump_aerial.rs @@ -0,0 +1,15 @@ +use super::*; + +// FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL + +unsafe extern "C" fn tantan_attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); + EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); + EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); + + return smashline::original_status(Main, fighter, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, tantan_attack_jump_aerial_main); +} diff --git a/fighters/tantan/src/status/attack_landing.rs b/fighters/tantan/src/status/attack_landing.rs new file mode 100644 index 0000000000..dfe36deec6 --- /dev/null +++ b/fighters/tantan/src/status/attack_landing.rs @@ -0,0 +1,15 @@ +use super::*; + +// ARMS land, prevents ARMDashing + +unsafe extern "C" fn tantan_attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.motion_frame() < 2.0 { + sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); + } + + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, tantan_attack_landing_exec); +} diff --git a/fighters/tantan/src/status/attack_s3.rs b/fighters/tantan/src/status/attack_s3.rs new file mode 100644 index 0000000000..99d47eaae0 --- /dev/null +++ b/fighters/tantan/src/status/attack_s3.rs @@ -0,0 +1,29 @@ +use super::*; + +//Ftilt// + +unsafe extern "C" fn tantan_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackS3(); +} + +unsafe extern "C" fn tantan_attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_AttackS3_Main(); +} + +unsafe extern "C" fn tantan_attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if CancelModule::is_enable_cancel(fighter.module_accessor){ + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); + } + else{ + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); + WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); + } + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec); +} diff --git a/fighters/tantan/src/status/attack_s4.rs b/fighters/tantan/src/status/attack_s4.rs new file mode 100644 index 0000000000..a1949e2314 --- /dev/null +++ b/fighters/tantan/src/status/attack_s4.rs @@ -0,0 +1,58 @@ +use super::*; + +//Fsmash// + +unsafe extern "C" fn tantan_attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_AttackS4Start(); +} + +unsafe extern "C" fn tantan_attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_AttackS4Start(); +} + +unsafe extern "C" fn tantan_attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + PLAY_SE(fighter, Hash40::new("se_common_smash_start")); + return fighter.status_pre_AttackS4Hold(); +} + +unsafe extern "C" fn tantan_attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold as *const () as _)) +} + +pub unsafe extern "C" fn tantan_attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if 0 < bigFrame && bigFrame < 2 { + WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + return 0.into() +} + +pub unsafe extern "C" fn tantan_attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if 0 < bigFrame && bigFrame < 2 { + WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + return 0.into() +} + +unsafe extern "C" fn tantan_attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + if fighter.motion_frame() > 16.0 && WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0 { + if bigFrame > 0 { + let maxBigFrame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_private"),hash40("arm_l_big_frame")); + let newBigFrame = (bigFrame-(maxBigFrame/2)).max(1); + WorkModule::set_int(fighter.module_accessor, newBigFrame, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); + } + } + return fighter.status_end_AttackS4(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_pre,); + agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_main,); + agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_pre,); + agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_main,); + agent.status(Exec,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_exec,); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end); +} diff --git a/fighters/tantan/src/status/catch.rs b/fighters/tantan/src/status/catch.rs new file mode 100644 index 0000000000..319c3a990d --- /dev/null +++ b/fighters/tantan/src/status/catch.rs @@ -0,0 +1,33 @@ +use super::*; + +//Grab// + +unsafe extern "C" fn tantan_catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_pre_Catch(); +} + +unsafe extern "C" fn tantan_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_Catch(); +} + +unsafe extern "C" fn tantan_catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_STATUS_KIND_CATCH { + fighter.status_CatchPull_common(hash40("catch_wait").into()); + ControlModule::reset_trigger(fighter.module_accessor); + MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull2"), 9.0, 1.0, false, 0.0, false, false); + return fighter.main_shift(catch_pull_main_loop) + } + else { + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_CATCH_PULL)(fighter); + } +} + +unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.status_CatchPull_Main() +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main); + agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,tantan_catch_pull_main); +} diff --git a/fighters/tantan/src/status/jump.rs b/fighters/tantan/src/status/jump.rs new file mode 100644 index 0000000000..2faf36daab --- /dev/null +++ b/fighters/tantan/src/status/jump.rs @@ -0,0 +1,48 @@ +use super::*; + +// FIGHTER_STATUS_KIND_JUMP // + +pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { + let arg = !(fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP); + + if fighter.status_pre_Jump_Common_param(L2CValue::Bool(arg)).get_bool() { + return 1.into() + } + else { + + if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(-1), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_NONE), + L2CValue::I32(*FS_SUCCEEDS_KEEP_EFFECT | *FS_SUCCEEDS_KEEP_SOUND | *FS_SUCCEEDS_KEEP_TRANSITION) + ); + } + else { + fighter.status_pre_Jump_sub_param( + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), + L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), + L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), + L2CValue::I32(0) + ); + } + return 0.into() + } +} + +//Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash + +pub unsafe extern "C" fn pre_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_button_on(Buttons::Catch) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_CATCH, false); + return 1.into(); + } + return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_JUMP_SQUAT)(fighter); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat); +} diff --git a/fighters/tantan/src/status/mod.rs b/fighters/tantan/src/status/mod.rs index 3e793eca2b..00c131ff29 100644 --- a/fighters/tantan/src/status/mod.rs +++ b/fighters/tantan/src/status/mod.rs @@ -1,7 +1,20 @@ use super::*; use globals::*; // status script import - + +mod jump; +mod catch; + +mod attack; +mod attack_air; +mod attack_jump_aerial; +mod attack_landing; +mod attack_s3; +mod attack_s4; + +mod special_n; +mod special_hi; + /// Re-enables the ability to use aerial specials when connecting to ground or cliff unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L2CValue { //remove double dragon effect @@ -16,335 +29,24 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L true.into() } -extern "C" fn tantan_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_TANTAN { - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } -} - -// FIGHTER_STATUS_KIND_JUMP // - -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { - let arg = !(fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP); - - if fighter.status_pre_Jump_Common_param(L2CValue::Bool(arg)).get_bool() { - return 1.into() - } - else { - - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(-1), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_NONE), - L2CValue::I32(*FS_SUCCEEDS_KEEP_EFFECT | *FS_SUCCEEDS_KEEP_SOUND | *FS_SUCCEEDS_KEEP_TRANSITION) - ); - } - else { - fighter.status_pre_Jump_sub_param( - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLAG), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_INT), - L2CValue::I32(*FIGHTER_STATUS_WORK_KEEP_FLAG_JUMP_FLOAT), - L2CValue::I32(*FIGHTER_KINETIC_TYPE_JUMP), - L2CValue::I32(0) - ); - } - return 0.into() - } -} - -//Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash - -pub unsafe extern "C" fn pre_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_button_on(Buttons::Catch) { - fighter.change_status_req(*FIGHTER_STATUS_KIND_CATCH, false); - return 1.into(); - } - return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_JUMP_SQUAT)(fighter); -} - -unsafe extern "C" fn tantan_attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); - EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); - EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); - - return smashline::original_status(Main, fighter, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL)(fighter); -} - -//ARMS land, prevents ARMDashing - -unsafe extern "C" fn tantan_attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.motion_frame() < 2.0 { - sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); - } - - return 0.into(); -} - -// Normal Jab // - -unsafe extern "C" fn tantan_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_Attack(); -} - -unsafe extern "C" fn tantan_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_AttackCommon(); - if !StopModule::is_stop(fighter.module_accessor) { - fighter.check_attack_mtrans(); - } - fighter.global_table[SUB_STATUS3].assign(&L2CValue::Ptr(L2CFighterCommon_bind_address_call_check_attack_mtrans as *const () as _)); - fighter.sub_status_AttackComboCommon(); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_Attack_Main as *const () as _)) -} - -//Ftilt// - -unsafe extern "C" fn tantan_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackS3(); -} - -unsafe extern "C" fn tantan_attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_AttackS3_Main(); -} - -unsafe extern "C" fn tantan_attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if CancelModule::is_enable_cancel(fighter.module_accessor){ - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); - WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - } - else{ - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); - WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); - } - return 0.into(); -} - -//Fsmash// - -unsafe extern "C" fn tantan_attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackS4Start(); -} - -unsafe extern "C" fn tantan_attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_AttackS4Start(); -} - -unsafe extern "C" fn tantan_attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - PLAY_SE(fighter, Hash40::new("se_common_smash_start")); - return fighter.status_pre_AttackS4Hold(); -} - -unsafe extern "C" fn tantan_attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold as *const () as _)) -} - -pub unsafe extern "C" fn tantan_attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if 0 < bigFrame && bigFrame < 2 { - WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - return 0.into() -} - -pub unsafe extern "C" fn tantan_attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if 0 < bigFrame && bigFrame < 2 { - WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - return 0.into() -} - -unsafe extern "C" fn tantan_attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - if fighter.motion_frame() > 16.0 && WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0 { - if bigFrame > 0 { - let maxBigFrame = WorkModule::get_param_int(fighter.module_accessor,hash40("param_private"),hash40("arm_l_big_frame")); - let newBigFrame = (bigFrame-(maxBigFrame/2)).max(1); - WorkModule::set_int(fighter.module_accessor, newBigFrame, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); - } - } - return fighter.status_end_AttackS4(); -} - -// Aerial Attacks - -unsafe extern "C" fn tantan_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_AttackAir(); -} - -unsafe extern "C" fn tantan_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_end_AttackAir(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } -//Grab// - -unsafe extern "C" fn tantan_catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_pre_Catch(); -} - -unsafe extern "C" fn tantan_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_Catch(); -} - -unsafe extern "C" fn tantan_catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_STATUS_KIND_CATCH { - fighter.status_CatchPull_common(hash40("catch_wait").into()); - ControlModule::reset_trigger(fighter.module_accessor); - MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull2"), 9.0, 1.0, false, 0.0, false, false); - return fighter.main_shift(catch_pull_main_loop) - } - else { - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_CATCH_PULL)(fighter); - } -} - -unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.status_CatchPull_Main() -} -// Neutral Special (Air) - -unsafe extern "C" fn tantan_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR - { - return fighter.status_pre_AttackAir(); - } - else{ - return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); - } -} - -unsafe extern "C" fn tantan_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR - { - let fighter_log_attack_kind = *FIGHTER_LOG_ATTACK_KIND_ATTACK_AIR_F; - smash_script::notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b94de0d96), FIGHTER_LOG_ACTION_CATEGORY_KEEP, fighter_log_attack_kind); - let motion_kind = Hash40::new("attack_air_f").hash; - WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackAir_Main as *const () as _)) - } - else { - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); - } -} - -unsafe extern "C" fn tantan_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_situation(*SITUATION_KIND_AIR) { - return 0.into(); - } - - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_ATTACK_SHORT_R); - return 0.into(); -} - -unsafe extern "C" fn tantan_landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { - if StatusModule::prev_status_kind(fighter.module_accessor, 0) == *FIGHTER_STATUS_KIND_SPECIAL_N - { - MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_LandingAttackAir_Main as *const () as _)) - } - else{ - return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR)(fighter); - } -} - -unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - if (fighter.motion_frame() <= 30.0) - && !fighter.is_button_on(Buttons::Special) - { - fighter.change_status_req(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, false); - return 0.into(); - } - return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter); -} +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); -unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND){ - StatusModule::init_settings( - fighter.module_accessor, - app::SituationKind(*SITUATION_KIND_NONE), - *FIGHTER_KINETIC_TYPE_UNIQ, - *GROUND_CORRECT_KIND_KEEP as u32, - app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), - true, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, - *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, - 0 - ); - FighterStatusModuleImpl::set_fighter_status_data( - fighter.module_accessor, - false, - *FIGHTER_TREADED_KIND_NO_REAC, - false, - false, - false, - *FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI as u64, - 0, - *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, - 0 - ); - return 0.into(); - } - else - { - return smashline::original_status(Pre, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)(fighter); - } -} + jump::install(agent); + catch::install(agent); -unsafe extern "C" fn tantan_special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let stick = Vector2f::new( - fighter.stick_x(), - fighter.stick_y() - ); - let angle = ((stick.x)*-10.0*PostureModule::lr(fighter.module_accessor))-5.0; - WorkModule::set_float(fighter.module_accessor, angle, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - if (fighter.motion_frame()>=10.0) - { - fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); - } - return 0.into(); -} + attack::install(agent); + attack_air::install(agent); + attack_jump_aerial::install(agent); + attack_landing::install(agent); + attack_s3::install(agent); + attack_s4::install(agent); -unsafe extern "C" fn tantan_special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let angle = WorkModule::get_float(fighter.module_accessor,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); - fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); - return 0.into(); -} -pub fn install(agent: &mut Agent) { - agent.on_start(tantan_init); - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat); - agent.status(Main,*FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL,tantan_attack_jump_aerial_main,); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT,tantan_attack_landing_exec,); - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main); - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec); - agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_pre,); - agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_main,); - agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_pre,); - agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_main,); - agent.status(Exec,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_exec,); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main); - agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,tantan_catch_pull_main,); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec); - agent.status(Main,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,tantan_landing_air_main,); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND,tantan_special_hi_exec,); - agent.status(Pre,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_pre,); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_exec,); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH,tantan_special_hi_air_reach_exec); + special_n::install(agent); + special_hi::install(agent); } diff --git a/fighters/tantan/src/status/special_hi.rs b/fighters/tantan/src/status/special_hi.rs new file mode 100644 index 0000000000..c9d18274fe --- /dev/null +++ b/fighters/tantan/src/status/special_hi.rs @@ -0,0 +1,74 @@ +use super::*; + +// up special + +unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if (fighter.motion_frame() <= 30.0) + && !fighter.is_button_on(Buttons::Special) + { + fighter.change_status_req(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, false); + return 0.into(); + } + return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter); +} + +unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND){ + StatusModule::init_settings( + fighter.module_accessor, + app::SituationKind(*SITUATION_KIND_NONE), + *FIGHTER_KINETIC_TYPE_UNIQ, + *GROUND_CORRECT_KIND_KEEP as u32, + app::GroundCliffCheckKind(*GROUND_CLIFF_CHECK_KIND_NONE), + true, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLAG, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_INT, + *FIGHTER_STATUS_WORK_KEEP_FLAG_NONE_FLOAT, + 0 + ); + FighterStatusModuleImpl::set_fighter_status_data( + fighter.module_accessor, + false, + *FIGHTER_TREADED_KIND_NO_REAC, + false, + false, + false, + *FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI as u64, + 0, + *FIGHTER_POWER_UP_ATTACK_BIT_SPECIAL_HI as u32, + 0 + ); + return 0.into(); + } + else + { + return smashline::original_status(Pre, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR)(fighter); + } +} + +unsafe extern "C" fn tantan_special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let stick = Vector2f::new( + fighter.stick_x(), + fighter.stick_y() + ); + let angle = ((stick.x)*-10.0*PostureModule::lr(fighter.module_accessor))-5.0; + WorkModule::set_float(fighter.module_accessor, angle, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); + if (fighter.motion_frame()>=10.0) + { + fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); + } + return 0.into(); +} + +unsafe extern "C" fn tantan_special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let angle = WorkModule::get_float(fighter.module_accessor,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); + fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND,tantan_special_hi_exec,); + agent.status(Pre,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_pre,); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_exec); + agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH,tantan_special_hi_air_reach_exec); +} diff --git a/fighters/tantan/src/status/special_n.rs b/fighters/tantan/src/status/special_n.rs new file mode 100644 index 0000000000..792d198989 --- /dev/null +++ b/fighters/tantan/src/status/special_n.rs @@ -0,0 +1,44 @@ +use super::*; + +// Neutral Special (Air) + +unsafe extern "C" fn tantan_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR + { + return fighter.status_pre_AttackAir(); + } + else{ + return smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); + } +} + +unsafe extern "C" fn tantan_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { + if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR + { + let fighter_log_attack_kind = *FIGHTER_LOG_ATTACK_KIND_ATTACK_AIR_F; + smash_script::notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2b94de0d96), FIGHTER_LOG_ACTION_CATEGORY_KEEP, fighter_log_attack_kind); + let motion_kind = Hash40::new("attack_air_f").hash; + WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); + + MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n"), 0.0, 1.0, false, 0.0, false, false); + fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackAir_Main as *const () as _)) + } + else { + return smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter); + } +} + +unsafe extern "C" fn tantan_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.is_situation(*SITUATION_KIND_AIR) { + return 0.into(); + } + + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_ATTACK_SHORT_R); + return 0.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec); +} diff --git a/fighters/toonlink/src/acmd/aerials.rs b/fighters/toonlink/src/acmd/aerials.rs index 4028d0cbe6..7412580490 100644 --- a/fighters/toonlink/src/acmd/aerials.rs +++ b/fighters/toonlink/src/acmd/aerials.rs @@ -270,11 +270,67 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_aircatchlanding(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + wait(lua_state, 5.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + frame(lua_state, 7.0); + if is_excute(agent) { + ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, 0); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + ArticleModule::change_status(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("shoot"), false, 0.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 21.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + ArticleModule::change_status_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); + ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("back"), false, 0.0); + WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); + } + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 53.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 68.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } } +unsafe extern "C" fn effect_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 9.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -290,5 +346,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_aircatchlanding", game_aircatchlanding); + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("effect_aircatch", effect_aircatch); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/toonlink/src/acmd/other.rs b/fighters/toonlink/src/acmd/other.rs index ea7a766ae6..dc7d6199e8 100644 --- a/fighters/toonlink/src/acmd/other.rs +++ b/fighters/toonlink/src/acmd/other.rs @@ -105,65 +105,6 @@ unsafe extern "C" fn effect_jumpaerialback(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - wait(lua_state, 5.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - frame(lua_state, 7.0); - if is_excute(agent) { - ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, false, 0); - ArticleModule::generate_article(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, 0); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("throw"), 6.0, 110, 40, 0, 85, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - ArticleModule::change_status(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("shoot"), false, 0.0); - } - frame(lua_state, 12.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 21.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - ArticleModule::change_status_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); - ArticleModule::change_motion(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, smash::phx::Hash40::new("back"), false, 0.0); - WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); - } - frame(lua_state, 46.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 53.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 68.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_TOONLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn effect_aircatch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 9.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("haver"), 0, 0, 5.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); - } -} - unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -204,9 +145,6 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_jumpaerialfront", effect_jumpaerialfront); agent.acmd("effect_jumpaerialback", effect_jumpaerialback); - agent.acmd("game_aircatch", game_aircatch); - agent.acmd("effect_aircatch", effect_aircatch); - agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/wario/src/acmd/aerials.rs b/fighters/wario/src/acmd/aerials.rs index e930aa7bf9..41fd9dde68 100644 --- a/fighters/wario/src/acmd/aerials.rs +++ b/fighters/wario/src/acmd/aerials.rs @@ -39,7 +39,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { @@ -87,7 +86,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { @@ -146,7 +144,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -224,7 +221,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { @@ -477,15 +473,19 @@ unsafe extern "C" fn sound_attackairlw2(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("expression_landingairn", expression_landingairn); + agent.acmd("game_attackairf", game_attackairf); agent.acmd("expression_landingairf", expression_landingairf); + agent.acmd("game_attackairb", game_attackairb); agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("sound_attackairb", sound_attackairb); agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("expression_landingairhi", expression_landingairhi); + agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("effect_attackairlw", effect_attackairlw); agent.acmd("sound_attackairlw", sound_attackairlw); diff --git a/fighters/wario/src/acmd/ground.rs b/fighters/wario/src/acmd/ground.rs index 0b0f03cd28..5e5978d0ab 100644 --- a/fighters/wario/src/acmd/ground.rs +++ b/fighters/wario/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -31,7 +30,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -46,7 +44,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { @@ -93,7 +90,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -120,6 +116,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attack11", game_attack11); agent.acmd("game_attack12", game_attack12); agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attackdash", game_attackdash); agent.acmd("effect_attackdash", effect_attackdash); } diff --git a/fighters/wario/src/acmd/other.rs b/fighters/wario/src/acmd/other.rs index aa1db28677..9bfd8f83f7 100644 --- a/fighters/wario/src/acmd/other.rs +++ b/fighters/wario/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { diff --git a/fighters/wario/src/acmd/smashes.rs b/fighters/wario/src/acmd/smashes.rs index ada4ec38fe..6532f5a960 100644 --- a/fighters/wario/src/acmd/smashes.rs +++ b/fighters/wario/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -30,7 +29,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -70,7 +68,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -165,7 +162,9 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("effect_attacklw4", effect_attacklw4); agent.acmd("sound_attacklw4", sound_attacklw4); diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index 4e9f8fa751..0d430d39f0 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnbite(agent: &mut L2CAgentBase) { @@ -225,8 +224,10 @@ unsafe extern "C" fn game_speciallwflyr(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_specialnbite", game_specialnbite); agent.acmd("game_specialairnbite", game_specialairnbite); + agent.acmd("game_specialhijump", game_specialhijump); agent.acmd("expression_specialhijump", expression_specialhijump); + agent.acmd("game_speciallwlr", game_speciallwlr); agent.acmd("game_specialairlwlr", game_speciallwlr); agent.acmd("game_speciallwflyr", game_speciallwflyr); diff --git a/fighters/wario/src/acmd/throws.rs b/fighters/wario/src/acmd/throws.rs index 47759d0485..dae75d0900 100644 --- a/fighters/wario/src/acmd/throws.rs +++ b/fighters/wario/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -43,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -98,30 +95,84 @@ unsafe extern "C" fn effect_catchattack(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); + if is_excute(agent) { - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(lua_state, 22.0); + frame(lua_state, 12.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); - AttackModule::set_catch_only_all(boma, true, false); - CHECK_FINISH_CAMERA(agent, -2, 0); - //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); + CHECK_FINISH_CAMERA(agent, 14, 3); + lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 7.5, y: 1.0, z: 0.0}); } - frame(lua_state, 30.0); - FT_MOTION_RATE(agent, 21.0/(55.0-30.0)); + wait(lua_state, 1.0); + FT_MOTION_RATE(agent, 32.0/(55.0-13.0)); if is_excute(agent) { - ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(boma); + let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); + let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); + let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 55.0); FT_MOTION_RATE(agent, 1.0); } +unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 13.0); + if is_excute(agent) { + LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); + } + //frame(lua_state, 13.0); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); + } +} + +unsafe extern "C" fn sound_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + frame(lua_state, 2.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_01")); + } + frame(lua_state, 11.0); + if is_excute(agent) { + PLAY_SEQUENCE(agent, Hash40::new("seq_wario_rnd_attack")); + } + frame(lua_state, 12.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_common_throw_02")); + } +} + +unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + lua_args!(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); + smash::app::sv_animcmd::FT_ATTACK_ABS_CAMERA_QUAKE(lua_state); + agent.clear_lua_stack(); + } + frame(lua_state, 14.0); + if is_excute(agent) { + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + } + frame(lua_state, 16.0); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_M); + } +} + + pub const THROWHI_FRAME_FALL: f32 = 48.0; pub const THROWHI_FRAME_LAND: f32 = 55.0; @@ -336,96 +387,47 @@ unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { - ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 8.0, 30, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 4.0, 89, 135, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(lua_state, 12.0); + frame(lua_state, 22.0); if is_excute(agent) { - CHECK_FINISH_CAMERA(agent, 14, 3); - lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 7.5, y: 1.0, z: 0.0}); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 30, 6.0, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HIP); + AttackModule::set_catch_only_all(boma, true, false); + CHECK_FINISH_CAMERA(agent, -2, 0); + //FighterCutInManager::set_throw_finish_zoom_rate(boma, 1.5); } - wait(lua_state, 1.0); - FT_MOTION_RATE(agent, 32.0/(55.0-13.0)); + frame(lua_state, 30.0); + FT_MOTION_RATE(agent, 21.0/(55.0-30.0)); if is_excute(agent) { - let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); - let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); - let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + AttackModule::clear_all(boma); } frame(lua_state, 55.0); FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn effect_throwf(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - frame(lua_state, 13.0); - if is_excute(agent) { - LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, -2, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); - } - //frame(lua_state, 13.0); - if is_excute(agent) { - EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); - } -} - -unsafe extern "C" fn sound_throwf(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - frame(lua_state, 2.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_throw_01")); - } - frame(lua_state, 11.0); - if is_excute(agent) { - PLAY_SEQUENCE(agent, Hash40::new("seq_wario_rnd_attack")); - } - frame(lua_state, 12.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_common_throw_02")); - } -} - -unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - - if is_excute(agent) { - slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - lua_args!(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, *CAMERA_QUAKE_KIND_NONE); - smash::app::sv_animcmd::FT_ATTACK_ABS_CAMERA_QUAKE(lua_state); - agent.clear_lua_stack(); - } - frame(lua_state, 14.0); - if is_excute(agent) { - ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - } - frame(lua_state, 16.0); - if is_excute(agent) { - QUAKE(agent, *CAMERA_QUAKE_KIND_M); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_catch", game_catch); agent.acmd("game_catchdash", game_catchdash); agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_catchattack", game_catchattack); agent.acmd("effect_catchattack", effect_catchattack); - agent.acmd("game_throwlw", game_throwlw); - agent.acmd("game_throwhi", game_throwhi); - agent.acmd("effect_throwhi", effect_throwhi); - agent.acmd("sound_throwhi", sound_throwhi); - agent.acmd("expression_throwhi", expression_throwhi); + agent.acmd("game_throwf", game_throwf); agent.acmd("effect_throwf", effect_throwf); agent.acmd("sound_throwf", sound_throwf); agent.acmd("expression_throwf", expression_throwf); + + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("effect_throwhi", effect_throwhi); + agent.acmd("sound_throwhi", sound_throwhi); + agent.acmd("expression_throwhi", expression_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/wario/src/acmd/tilts.rs b/fighters/wario/src/acmd/tilts.rs index 51c3a989d0..5ec2704fd9 100644 --- a/fighters/wario/src/acmd/tilts.rs +++ b/fighters/wario/src/acmd/tilts.rs @@ -1,7 +1,6 @@ - use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -25,10 +24,9 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -52,7 +50,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -79,7 +76,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -108,7 +104,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -126,7 +121,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { @@ -145,10 +139,12 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); agent.acmd("game_attacks3lw", game_attacks3lw); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/wario/src/opff.rs b/fighters/wario/src/opff.rs index afd3d548e5..4b1d2806cc 100644 --- a/fighters/wario/src/opff.rs +++ b/fighters/wario/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - unsafe fn bite_early_throw_turnaround(boma: &mut BattleObjectModuleAccessor, status_kind: i32, stick_x: f32, facing: f32, frame: f32) { if StatusModule::is_changing(boma) { return; @@ -112,6 +111,7 @@ pub unsafe fn wario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, wario_frame_wrapper); } diff --git a/fighters/wario/src/status/attack_air.rs b/fighters/wario/src/status/attack_air.rs new file mode 100644 index 0000000000..a47a169f5e --- /dev/null +++ b/fighters/wario/src/status/attack_air.rs @@ -0,0 +1,27 @@ +use super::*; + +unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let dairAnim = Hash40::new("attack_air_lw"); + let dairRiseAnim = Hash40::new("attack_air_lw2"); + + if MotionModule::motion_kind(fighter.module_accessor) != dairAnim.hash{ + return false.into(); + } + if (AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD)){ + MotionModule::change_motion(fighter.module_accessor, dairRiseAnim, 18.0, 1.0, false, 0.0, false, false); + EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); + AttackModule::clear_all(fighter.module_accessor); + } + + return false.into(); +} + +unsafe extern "C" fn wario_landing_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return false.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec); + agent.status(End,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,wario_landing_attack_end); +} diff --git a/fighters/wario/src/status/catch_attack.rs b/fighters/wario/src/status/catch_attack.rs new file mode 100644 index 0000000000..9e72a39d45 --- /dev/null +++ b/fighters/wario/src/status/catch_attack.rs @@ -0,0 +1,37 @@ +use super::*; + +//Force opponent rotation + +unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + + let boma = fighter.boma(); + + let mut vec =Vector3f{x: 0.0, y: 0.0, z: 0.0}; + let offset = ModelModule::joint_global_rotation(fighter.module_accessor,Hash40::new("throw"),&mut vec,false); + let rot = Vector3f{x: vec.x, y: 0.0, z: 0.0}; + PostureModule::set_rot( + boma.get_grabbed_opponent_boma(), + &rot, + 0 + ); + return false.into(); +} + +//Reset opponent rotation + +unsafe extern "C" fn catch_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { + let boma = fighter.boma(); + + PostureModule::set_rot( + boma.get_grabbed_opponent_boma(), + &Vector3f::zero(), + 0 + ); + + smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_ATTACK)(fighter) +} + +pub fn install(agent: &mut Agent) { + agent.status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end); +} diff --git a/fighters/wario/src/status/mod.rs b/fighters/wario/src/status/mod.rs index 3b6cfb8238..27ee068664 100644 --- a/fighters/wario/src/status/mod.rs +++ b/fighters/wario/src/status/mod.rs @@ -2,164 +2,26 @@ use super::*; use globals::*; // status script import +mod attack_air; +mod catch_attack; +mod throw_kirby; + mod special_s; mod special_hi; pub const THROW_HI_STATUS_KIND: i32 = 0x47; -extern "C" fn wario_init(fighter: &mut L2CFighterCommon) { - unsafe { - if fighter.kind() == *FIGHTER_KIND_WARIO { - fighter.global_table[THROW_HI_STATUS_KIND].assign(&FIGHTER_STATUS_KIND_THROW_KIRBY.into()); - } - } -} - -//Force opponent rotation - -unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - - let boma = fighter.boma(); - - let mut vec =Vector3f{x: 0.0, y: 0.0, z: 0.0}; - let offset = ModelModule::joint_global_rotation(fighter.module_accessor,Hash40::new("throw"),&mut vec,false); - let rot = Vector3f{x: vec.x, y: 0.0, z: 0.0}; - PostureModule::set_rot( - boma.get_grabbed_opponent_boma(), - &rot, - 0 - ); - return false.into(); -} -//Reset opponent rotation - -unsafe extern "C" fn catch_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let boma = fighter.boma(); - - PostureModule::set_rot( - boma.get_grabbed_opponent_boma(), - &Vector3f::zero(), - 0 - ); - - smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_ATTACK)(fighter) -} - -unsafe extern "C" fn wario_throwk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - let boma = fighter.boma(); - - return fighter.status_pre_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_init(fighter: &mut L2CFighterCommon) -> L2CValue { - fighter.sub_status_uniq_process_ThrowKirby_initStatus(); - - let hitStop = 8; - WorkModule::set_int(fighter.module_accessor, hitStop, *FIGHTER_STATUS_THROW_WORK_INT_STOP_FRAME); - - return false.into(); +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + fighter.global_table[THROW_HI_STATUS_KIND].assign(&FIGHTER_STATUS_KIND_THROW_KIRBY.into()); } -unsafe extern "C" fn wario_throwk_main(fighter: &mut L2CFighterCommon) -> L2CValue { - return fighter.status_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_exit(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return fighter.sub_status_uniq_process_ThrowKirby_exitStatus(); -} - -unsafe extern "C" fn wario_throwk_end(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return fighter.status_end_ThrowKirby(); -} - -unsafe extern "C" fn wario_throwk_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let FRAME_FALL = 48.0; - let FRAME_FALLLOOP = FRAME_FALL+2.0; - let FRAME_LAND = 55.0; - - let currentFrame = MotionModule::frame(fighter.module_accessor); - if currentFrame >= FRAME_LAND { - let grounded = GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); - let status = if grounded {FIGHTER_STATUS_KIND_WAIT} else {FIGHTER_STATUS_KIND_FALL}; - let lastFrame = if grounded {MotionModule::end_frame(fighter.module_accessor)-3.0} else {MotionModule::end_frame(fighter.module_accessor)-9.0}; - - if currentFrame >= lastFrame { - if !grounded{ - let speed = Vector3f { x: 0.0, y: -0.1, z: 0.0 }; - KineticModule::add_speed(fighter.module_accessor, &speed); - } - fighter.change_status(status.into(), false.into()); - } - return false.into(); - } - - //If we go past a certain frame, then freeze animation and accel downwards - if (currentFrame >= FRAME_FALLLOOP && currentFrame < FRAME_LAND) - { - MotionModule::set_rate(fighter.module_accessor, 0.0); - let speed = Vector3f { x: 0.0, y: -0.425, z: 0.0 }; - KineticModule::add_speed(fighter.module_accessor, &speed); - } - //Groundcast to see if we touched the ground (only after falling), then cut to the landing frame - if currentFrame >= FRAME_FALL - { - if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) - { - MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, FRAME_LAND, true,true,false); - MotionModule::set_rate(fighter.module_accessor, 1.0); - KineticModule::resume_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - //Spawn effects// - let boma = fighter.boma(); - let opponent = boma.get_grabbed_opponent_boma(); - let opponentScale = PostureModule::scale(opponent); - //Bury effect - //EFFECT_FOLLOW(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, (opponentScale+0.4), true); - - LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown_collision"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); - } - } - - return false.into(); -} +pub fn install(agent: &mut Agent) { + agent.on_start(on_start); -unsafe extern "C" fn wario_landing_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { - EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); - return false.into(); -} + attack_air::install(agent); + catch_attack::install(agent); + throw_kirby::install(agent); -unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { - let dairAnim = Hash40::new("attack_air_lw"); - let dairRiseAnim = Hash40::new("attack_air_lw2"); - - if MotionModule::motion_kind(fighter.module_accessor) != dairAnim.hash{ - return false.into(); - } - if (AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD)){ - MotionModule::change_motion(fighter.module_accessor, dairRiseAnim, 18.0, 1.0, false, 0.0, false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("sys_machstamp"),false,true); - AttackModule::clear_all(fighter.module_accessor); - } - - return false.into(); -} -pub fn install(agent: &mut Agent) { special_s::install(agent); special_hi::install(agent); - - agent.on_start(wario_init); - agent.status(Exec, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_exec); - agent.status(End, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre); - agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init); - agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main); - agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit); - agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end); - agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec); - agent.status(End,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,wario_landing_attack_end,); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec); } diff --git a/fighters/wario/src/status/throw_kirby.rs b/fighters/wario/src/status/throw_kirby.rs new file mode 100644 index 0000000000..91b4727194 --- /dev/null +++ b/fighters/wario/src/status/throw_kirby.rs @@ -0,0 +1,94 @@ +use super::*; + +// FIGHTER_STATUS_KIND_THROW_KIRBY + +unsafe extern "C" fn wario_throwk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let boma = fighter.boma(); + + return fighter.status_pre_ThrowKirby(); +} + +unsafe extern "C" fn wario_throwk_init(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_status_uniq_process_ThrowKirby_initStatus(); + + let hitStop = 8; + WorkModule::set_int(fighter.module_accessor, hitStop, *FIGHTER_STATUS_THROW_WORK_INT_STOP_FRAME); + + return false.into(); +} + +unsafe extern "C" fn wario_throwk_main(fighter: &mut L2CFighterCommon) -> L2CValue { + return fighter.status_ThrowKirby(); +} + +unsafe extern "C" fn wario_throwk_exit(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return fighter.sub_status_uniq_process_ThrowKirby_exitStatus(); +} + +unsafe extern "C" fn wario_throwk_end(fighter: &mut L2CFighterCommon) -> L2CValue { + EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); + return fighter.status_end_ThrowKirby(); +} + +unsafe extern "C" fn wario_throwk_exec(fighter: &mut L2CFighterCommon) -> L2CValue { + let FRAME_FALL = 48.0; + let FRAME_FALLLOOP = FRAME_FALL+2.0; + let FRAME_LAND = 55.0; + + let currentFrame = MotionModule::frame(fighter.module_accessor); + if currentFrame >= FRAME_LAND { + let grounded = GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); + let status = if grounded {FIGHTER_STATUS_KIND_WAIT} else {FIGHTER_STATUS_KIND_FALL}; + let lastFrame = if grounded {MotionModule::end_frame(fighter.module_accessor)-3.0} else {MotionModule::end_frame(fighter.module_accessor)-9.0}; + + if currentFrame >= lastFrame { + if !grounded{ + let speed = Vector3f { x: 0.0, y: -0.1, z: 0.0 }; + KineticModule::add_speed(fighter.module_accessor, &speed); + } + fighter.change_status(status.into(), false.into()); + } + return false.into(); + } + + //If we go past a certain frame, then freeze animation and accel downwards + if (currentFrame >= FRAME_FALLLOOP && currentFrame < FRAME_LAND) + { + MotionModule::set_rate(fighter.module_accessor, 0.0); + let speed = Vector3f { x: 0.0, y: -0.425, z: 0.0 }; + KineticModule::add_speed(fighter.module_accessor, &speed); + } + //Groundcast to see if we touched the ground (only after falling), then cut to the landing frame + if currentFrame >= FRAME_FALL + { + if GroundModule::is_touch(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32) + { + MotionModule::set_frame_sync_anim_cmd(fighter.module_accessor, FRAME_LAND, true,true,false); + MotionModule::set_rate(fighter.module_accessor, 1.0); + KineticModule::resume_energy(fighter.module_accessor,*FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + //Spawn effects// + let boma = fighter.boma(); + let opponent = boma.get_grabbed_opponent_boma(); + let opponentScale = PostureModule::scale(opponent); + //Bury effect + //EFFECT_FOLLOW(fighter, Hash40::new("sys_merikomi"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, (opponentScale+0.4), true); + + LANDING_EFFECT(fighter, Hash40::new("sys_v_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); + EFFECT(fighter, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + EFFECT(fighter, Hash40::new("sys_crown_collision"), Hash40::new("top"), 0, 0, -3, 0, 0, 0, 1.1, 0, 0, 0, 0, 0, 0, false); + } + } + + return false.into(); +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init); + agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main); + agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit); + agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec); +} diff --git a/fighters/yoshi/src/status/attack_air.rs b/fighters/yoshi/src/status/attack_air.rs index 613197811d..56ed97e169 100644 --- a/fighters/yoshi/src/status/attack_air.rs +++ b/fighters/yoshi/src/status/attack_air.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(); diff --git a/fighters/yoshi/src/status/guard_damage.rs b/fighters/yoshi/src/status/guard_damage.rs index 0a66d5d9ba..2b629a6433 100644 --- a/fighters/yoshi/src/status/guard_damage.rs +++ b/fighters/yoshi/src/status/guard_damage.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_GUARD_DAMAGE // +// FIGHTER_STATUS_KIND_GUARD_DAMAGE pub unsafe extern "C" fn guard_damage_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_ftStatusUniqProcessGuardDamage_initStatus_Inner(); diff --git a/fighters/yoshi/src/status/guard_off.rs b/fighters/yoshi/src/status/guard_off.rs index a9b37ff502..7b8474b9cf 100644 --- a/fighters/yoshi/src/status/guard_off.rs +++ b/fighters/yoshi/src/status/guard_off.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_GUARD_OFF // +// FIGHTER_STATUS_KIND_GUARD_OFF pub unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { let rate = fighter.status_GuardOff_Common().get_f32(); diff --git a/fighters/yoshi/src/status/guard_on.rs b/fighters/yoshi/src/status/guard_on.rs index 592789832b..2c08edd457 100644 --- a/fighters/yoshi/src/status/guard_on.rs +++ b/fighters/yoshi/src/status/guard_on.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_GUARD_ON diff --git a/fighters/yoshi/src/status/jump_aerial.rs b/fighters/yoshi/src/status/jump_aerial.rs index a146d00ef5..690d82ca31 100644 --- a/fighters/yoshi/src/status/jump_aerial.rs +++ b/fighters/yoshi/src/status/jump_aerial.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_JUMP_AERIAL diff --git a/fighters/younglink/src/acmd/aerials.rs b/fighters/younglink/src/acmd/aerials.rs index 2287210a87..cc77e5f7e4 100644 --- a/fighters/younglink/src/acmd/aerials.rs +++ b/fighters/younglink/src/acmd/aerials.rs @@ -214,6 +214,60 @@ unsafe extern "C" fn game_attackairlw2bound(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.5); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + } + frame(lua_state, 4.0); + FT_MOTION_RATE(agent, 1.0); + frame(lua_state, 5.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); + AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); + ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); + } + frame(lua_state, 12.0); + if is_excute(agent) { + WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 19.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } + frame(lua_state, 41.0); + if is_excute(agent) { + ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); + ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); + WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); + } + frame(lua_state, 46.0); + if is_excute(agent) { + WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); + } + frame(lua_state, 53.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + } + frame(lua_state, 72.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); @@ -227,4 +281,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackairlw", game_attackairlw); agent.acmd("game_attackairlw2attack", game_attackairlw2attack); agent.acmd("game_attackairlw2bound", game_attackairlw2bound); + + agent.acmd("game_aircatch", game_aircatch); + agent.acmd("game_aircatchlanding", stub); } diff --git a/fighters/younglink/src/acmd/throws.rs b/fighters/younglink/src/acmd/throws.rs index a143df9d34..7f7c5df47f 100644 --- a/fighters/younglink/src/acmd/throws.rs +++ b/fighters/younglink/src/acmd/throws.rs @@ -1,57 +1,5 @@ use super::*; -unsafe extern "C" fn game_aircatch(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.5); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - } - frame(lua_state, 4.0); - FT_MOTION_RATE(agent, 1.0); - frame(lua_state, 5.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_CHECK); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, false, -1); - ArticleModule::generate_article(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, false, -1); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("throw"), 4.0, 75, 30, 0, 60, 2.7, 0.0, 0.0, -0.5, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_add_reaction_frame(boma, 0, 4.0, false); - ArticleModule::change_status(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_SHOOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("shoot"), false, -1.0); - } - frame(lua_state, 12.0); - if is_excute(agent) { - WorkModule::on_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 19.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 41.0); - if is_excute(agent) { - ArticleModule::change_status_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, *WEAPON_TOONLINK_HOOKSHOT_STATUS_KIND_REWIND); - ArticleModule::change_motion(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, Hash40::new("back"), false, -1.0); - WorkModule::on_flag(boma, *FIGHTER_LINK_INSTANCE_WORK_ID_FLAG_OFF_MAP_COLL_OFFSET); - } - frame(lua_state, 46.0); - if is_excute(agent) { - WorkModule::off_flag(boma, *FIGHTER_STATUS_AIR_LASSO_FLAG_LANDING); - } - frame(lua_state, 53.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } - frame(lua_state, 72.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_YOUNGLINK_GENERATE_ARTICLE_HOOKSHOT_HAND, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -157,12 +105,7 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} - pub fn install(agent: &mut Agent) { - agent.acmd("game_aircatch", game_aircatch); - agent.acmd("game_aircatchlanding", stub); - agent.acmd("game_throwf", game_throwf); agent.acmd("game_throwb", game_throwb); From 1340335a8620e3d417773a9d4bd206ecc90c251f Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 14:53:40 -0500 Subject: [PATCH 156/172] status polish --- fighters/bayonetta/src/status/attack.rs | 4 +- fighters/bayonetta/src/status/attackair.rs | 2 +- fighters/bayonetta/src/status/specialairs.rs | 17 +- fighters/bayonetta/src/status/specialn.rs | 2 + fighters/bayonetta/src/status/specials.rs | 52 ++--- fighters/captain/src/status/special_lw.rs | 2 + fighters/chrom/src/status/special_s.rs | 14 +- fighters/dedede/src/status/special_hi.rs | 4 +- fighters/dedede/src/status/special_lw.rs | 4 +- fighters/demon/src/status/attack.rs | 9 +- fighters/demon/src/status/attack_air.rs | 7 +- fighters/demon/src/status/attack_combo.rs | 11 +- fighters/demon/src/status/dash.rs | 8 +- fighters/demon/src/status/dash_back.rs | 8 +- fighters/demon/src/status/turn_dash.rs | 4 +- fighters/demon/src/status/wait.rs | 3 +- fighters/diddy/src/status/jump_squat.rs | 4 +- fighters/dolly/src/status/dash_back.rs | 10 +- fighters/dolly/src/status/guard_off.rs | 8 +- fighters/dolly/src/status/landing.rs | 2 +- fighters/dolly/src/status/special_hi.rs | 8 +- fighters/dolly/src/status/special_s.rs | 16 +- fighters/dolly/src/status/super_special.rs | 4 +- fighters/dolly/src/status/super_special2.rs | 4 +- fighters/dolly/src/status/turn_dash.rs | 4 +- .../donkey/src/status/item_throw_heavy.rs | 4 +- fighters/donkey/src/status/shoulder.rs | 2 + fighters/donkey/src/status/special_lw.rs | 2 + fighters/donkey/src/status/super_lift.rs | 2 + fighters/edge/src/status/special_hi.rs | 82 ++++---- fighters/elight/src/status/special_hi.rs | 2 + .../elight/src/status/special_hi_attack.rs | 4 + .../elight/src/status/special_hi_finish.rs | 2 + .../elight/src/status/special_hi_finish2.rs | 2 + fighters/elight/src/status/special_hi_jump.rs | 2 + fighters/falco/src/status/special_hi.rs | 7 +- fighters/falco/src/status/special_lw.rs | 6 +- fighters/falco/src/status/special_s.rs | 3 +- fighters/fox/src/status/mod.rs | 2 + fighters/fox/src/status/special_hi.rs | 1 - fighters/fox/src/status/special_lw.rs | 1 - fighters/fox/src/status/special_s.rs | 3 +- fighters/gamewatch/src/status/special_hi.rs | 3 +- .../gamewatch/src/status/special_hi_open.rs | 3 +- fighters/ganon/src/status/attack_lw3.rs | 2 + .../ganon/src/status/special_air_s_catch.rs | 4 +- fighters/ganon/src/status/special_lw.rs | 7 +- fighters/ganon/src/status/special_n.rs | 2 + fighters/ganon/src/status/special_n_float.rs | 2 + fighters/ganon/src/status/special_s.rs | 2 + fighters/gaogaen/src/status/special_n.rs | 8 +- fighters/iceclimber/src/status/mod.rs | 6 +- fighters/ike/src/status/rebirth.rs | 6 +- fighters/jack/src/status/dispatch.rs | 14 +- fighters/jack/src/status/mod.rs | 14 +- fighters/jack/src/status/special_lw.rs | 4 +- fighters/jack/src/status/summon.rs | 14 +- fighters/ken/src/status/attack.rs | 4 +- fighters/ken/src/status/dash.rs | 13 +- fighters/ken/src/status/finals.rs | 10 +- fighters/ken/src/status/guard.rs | 8 +- fighters/ken/src/status/special_cmd4.rs | 14 +- fighters/ken/src/status/special_hi.rs | 8 +- fighters/ken/src/status/special_lw.rs | 1 + fighters/ken/src/status/special_n.rs | 8 +- fighters/ken/src/status/special_s.rs | 12 +- .../src/status/bayonetta_special_n_cancel.rs | 3 +- .../src/status/diddy_special_n_cancel.rs | 3 +- fighters/kirby/src/status/edge_special_n.rs | 3 +- fighters/kirby/src/status/ganon_special_n.rs | 2 + .../kirby/src/status/ganon_special_n_float.rs | 2 + .../kirby/src/status/gaogaen_special_n.rs | 1 - fighters/kirby/src/status/koopa_special_n.rs | 2 + .../kirby/src/status/littlemac_special_n.rs | 3 +- fighters/kirby/src/status/lucas_special_n.rs | 36 ++-- fighters/kirby/src/status/luigi_special_n.rs | 3 +- fighters/kirby/src/status/mario_special_n.rs | 3 +- fighters/kirby/src/status/mariod_special_n.rs | 3 +- fighters/kirby/src/status/ridley_special_n.rs | 4 +- fighters/kirby/src/status/sonic_special_n.rs | 6 +- fighters/kirby/src/status/special_hi_h.rs | 3 +- fighters/koopa/src/status/attack_s4_hold.rs | 1 - fighters/koopa/src/status/special_hi.rs | 1 - fighters/koopa/src/status/special_n.rs | 3 +- fighters/koopa/src/status/special_s.rs | 2 +- .../koopajr/src/status/special_hi_escape.rs | 4 +- fighters/krool/src/status/special_hi.rs | 2 + fighters/krool/src/status/special_lw.rs | 2 + fighters/littlemac/src/status/special_lw.rs | 2 + .../littlemac/src/status/special_lw_cancel.rs | 2 + fighters/littlemac/src/status/special_n.rs | 2 + fighters/lucario/src/status/attack_air.rs | 2 + fighters/lucario/src/status/attack_hi4.rs | 2 + fighters/lucario/src/status/special_lw.rs | 18 +- fighters/lucario/src/status/special_n.rs | 46 ++--- fighters/lucario/src/status/special_s.rs | 2 +- fighters/lucas/src/status/attack_air.rs | 4 +- fighters/lucas/src/status/attack_lw4.rs | 4 +- fighters/lucas/src/status/special_hi.rs | 24 ++- fighters/lucas/src/status/special_n.rs | 38 ++-- fighters/lucina/src/status/special_s.rs | 4 +- fighters/luigi/src/status/special_n.rs | 2 + fighters/luigi/src/status/special_s.rs | 2 + fighters/mario/src/status/rebirth.rs | 4 +- fighters/mariod/src/status/rebirth.rs | 2 + fighters/marth/src/status/special_s.rs | 2 + fighters/metaknight/src/status/attack_100.rs | 8 +- fighters/mewtwo/src/status/attack_air.rs | 2 + fighters/mewtwo/src/status/fall.rs | 6 +- fighters/mewtwo/src/status/float.rs | 2 + fighters/mewtwo/src/status/jump_aerial.rs | 6 +- fighters/mewtwo/src/status/special_n.rs | 2 + .../miiswordsman/src/status/final_hold.rs | 4 +- .../miiswordsman/src/status/special_hi.rs | 4 +- .../miiswordsman/src/status/special_hi2.rs | 12 +- .../miiswordsman/src/status/special_hi3.rs | 16 +- .../miiswordsman/src/status/special_lw.rs | 4 +- .../miiswordsman/src/status/special_lw1.rs | 4 +- .../miiswordsman/src/status/special_lw3.rs | 4 +- .../miiswordsman/src/status/special_s1.rs | 26 +-- .../miiswordsman/src/status/special_s2.rs | 28 +-- fighters/murabito/src/status/attack_air.rs | 4 +- fighters/murabito/src/status/jump.rs | 8 +- fighters/murabito/src/status/special_s.rs | 6 +- fighters/ness/src/status/attack_air.rs | 6 +- fighters/ness/src/status/special_hi.rs | 12 +- fighters/packun/src/status/attack_s4.rs | 7 +- fighters/packun/src/status/special_hi.rs | 3 +- fighters/packun/src/status/special_s.rs | 3 +- fighters/pacman/src/status/special_s.rs | 1 - fighters/peach/src/status/attack_air.rs | 23 +-- fighters/peach/src/status/jump_aerial.rs | 14 +- fighters/peach/src/status/special_hi.rs | 5 +- fighters/peach/src/status/special_lw.rs | 19 +- fighters/peach/src/status/special_s.rs | 3 +- fighters/peach/src/status/uniq_float.rs | 6 +- fighters/peach/src/status/uniq_float_start.rs | 7 +- fighters/pickel/src/status/attack_air_lw.rs | 1 - fighters/pickel/src/status/entry.rs | 1 - fighters/pickel/src/status/guard.rs | 1 - fighters/pickel/src/status/jump.rs | 1 - fighters/pickel/src/status/rebirth.rs | 1 - fighters/pickel/src/status/recreate_table.rs | 1 - fighters/pickel/src/status/special_s.rs | 1 - fighters/pikmin/src/status/attack_air.rs | 2 + fighters/pikmin/src/status/escape_air.rs | 2 + fighters/pikmin/src/status/rebirth.rs | 2 + fighters/pit/src/status/special_s.rs | 2 + fighters/plizardon/src/status/special_lw.rs | 2 + fighters/plizardon/src/status/special_s.rs | 4 +- fighters/reflet/src/status/attack_air.rs | 14 +- fighters/reflet/src/status/special_n.rs | 4 +- fighters/ridley/src/status/special_lw.rs | 2 + fighters/ridley/src/status/special_n.rs | 4 + fighters/ridley/src/status/special_s.rs | 2 + fighters/rockman/src/status/attack.rs | 2 + fighters/rockman/src/status/attack_air.rs | 2 + fighters/rockman/src/status/attack_s3.rs | 2 + fighters/rockman/src/status/attack_s4.rs | 2 + fighters/rockman/src/status/ladder_attack.rs | 14 +- fighters/rockman/src/status/rebirth.rs | 2 + fighters/rockman/src/status/special_lw.rs | 8 +- fighters/rockman/src/status/special_n.rs | 2 + fighters/rockman/src/status/special_s.rs | 2 + fighters/rockman/src/status/walk.rs | 1 - fighters/rosetta/src/status/special_hi.rs | 1 - fighters/roy/src/status/mod.rs | 173 +---------------- fighters/roy/src/status/special_s.rs | 181 ++++++++++++++++++ fighters/ryu/src/status/dash.rs | 12 +- fighters/ryu/src/status/finals.rs | 14 +- fighters/ryu/src/status/guard.rs | 8 +- fighters/ryu/src/status/special_cmd4.rs | 16 +- fighters/ryu/src/status/special_lw.rs | 14 +- fighters/ryu/src/status/special_s.rs | 20 +- fighters/samusd/src/status/attack_air.rs | 2 + fighters/samusd/src/status/float.rs | 2 + fighters/shulk/src/status/special_n.rs | 4 +- fighters/shulk/src/status/special_s.rs | 12 +- fighters/snake/src/status/appeal.rs | 46 +++-- fighters/snake/src/status/attack_s4.rs | 8 +- fighters/snake/src/status/catch.rs | 42 ++-- fighters/snake/src/status/rebirth.rs | 4 +- fighters/snake/src/status/special_s.rs | 9 +- fighters/sonic/src/status/dash.rs | 2 - fighters/sonic/src/status/special_hi.rs | 2 - fighters/sonic/src/status/special_lw_hold.rs | 2 - fighters/sonic/src/status/special_n.rs | 2 - fighters/sonic/src/status/special_n_hit.rs | 2 - fighters/sonic/src/status/special_s.rs | 2 - fighters/sonic/src/status/special_s_dash.rs | 2 - fighters/sonic/src/status/wait.rs | 2 - fighters/szerosuit/src/status/rebirth.rs | 4 +- fighters/tantan/src/status/attack.rs | 10 +- fighters/tantan/src/status/attack_air.rs | 16 +- .../tantan/src/status/attack_jump_aerial.rs | 4 +- fighters/tantan/src/status/attack_landing.rs | 5 +- fighters/tantan/src/status/attack_s3.rs | 14 +- fighters/tantan/src/status/attack_s4.rs | 36 ++-- fighters/tantan/src/status/catch.rs | 16 +- fighters/tantan/src/status/jump.rs | 13 +- fighters/tantan/src/status/special_hi.rs | 22 ++- fighters/tantan/src/status/special_n.rs | 14 +- fighters/toonlink/src/status/special_hi.rs | 2 +- fighters/trail/src/status/attack_air.rs | 2 +- fighters/trail/src/status/attack_lw4.rs | 2 + fighters/trail/src/status/jump_aerial.rs | 2 + fighters/trail/src/status/special_n.rs | 4 + fighters/trail/src/status/special_s.rs | 2 + fighters/wario/src/status/attack_air.rs | 12 +- fighters/wario/src/status/catch_attack.rs | 6 +- fighters/wario/src/status/special_hi.rs | 3 +- fighters/wario/src/status/special_s.rs | 3 +- fighters/wario/src/status/throw_kirby.rs | 24 +-- fighters/wiifit/src/status/special_s.rs | 1 - fighters/wolf/src/status/special_hi.rs | 1 - fighters/wolf/src/status/special_lw.rs | 1 - fighters/wolf/src/status/special_s.rs | 1 - 217 files changed, 1039 insertions(+), 865 deletions(-) create mode 100644 fighters/roy/src/status/special_s.rs diff --git a/fighters/bayonetta/src/status/attack.rs b/fighters/bayonetta/src/status/attack.rs index f58d32141a..a0ac4943e6 100644 --- a/fighters/bayonetta/src/status/attack.rs +++ b/fighters/bayonetta/src/status/attack.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); if !StopModule::is_stop(fighter.module_accessor) { fighter.check_attack_mtrans(); @@ -13,5 +13,5 @@ unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); } \ No newline at end of file diff --git a/fighters/bayonetta/src/status/attackair.rs b/fighters/bayonetta/src/status/attackair.rs index a229b5c538..ebf61443a2 100644 --- a/fighters/bayonetta/src/status/attackair.rs +++ b/fighters/bayonetta/src/status/attackair.rs @@ -67,5 +67,5 @@ unsafe extern "C" fn fair_motion(fighter: &mut L2CFighterCommon) -> L2CValue { pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); - agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F,attack_air_f_main,); + agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_ATTACK_AIR_F,attack_air_f_main); } diff --git a/fighters/bayonetta/src/status/specialairs.rs b/fighters/bayonetta/src/status/specialairs.rs index 4d823c04ab..5bd252b648 100644 --- a/fighters/bayonetta/src/status/specialairs.rs +++ b/fighters/bayonetta/src/status/specialairs.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D -unsafe extern "C" fn bayonetta_specialairs_d_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_d_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_BAYONETTA_SPECIAL_AIR_S); if fighter.is_prev_status(*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U) { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_d"), 6.0, 1.0, false, 0.0, false, false); @@ -12,10 +12,10 @@ unsafe extern "C" fn bayonetta_specialairs_d_main(fighter: &mut L2CFighterCommon fighter.change_status(FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D_HIT.into(), false.into()); } } - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_air_s_d_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_air_s_d_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_air_s_d_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_d_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if (CancelModule::is_enable_cancel(fighter.module_accessor) && fighter.sub_air_check_fall_common().get_bool()) || fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); @@ -39,15 +39,15 @@ unsafe extern "C" fn bayonetta_special_air_s_d_main_loop(fighter: &mut L2CFighte // FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U -unsafe extern "C" fn bayonetta_specialairs_u_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_u_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_u"), 0.0, 1.0, false, 0.0, false, false); fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_U_FLAG_SITUATION_KEEP); fighter.set_situation_keep(L2CValue::I32(*SITUATION_KIND_AIR), 1.into()); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_air_s_u_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_air_s_u_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_air_s_u_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_air_s_u_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let frame = fighter.global_table[CURRENT_FRAME].get_i32(); if fighter.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_AIR_S_U_FLAG_SITUATION_KEEP) { if fighter.get_param_int("param_special_s", "ab_u_disable_landing_frame") <= frame { @@ -238,6 +238,7 @@ unsafe fn joint_rotator(fighter: &mut L2CFighterCommon, frame: f32, joint: Hash4 } pub fn install(agent: &mut Agent) { - agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D,bayonetta_specialairs_d_main,); - agent.status(Main,*FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U,bayonetta_specialairs_u_main,); + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_D, special_air_s_d_main); + + agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_AIR_S_U, special_air_s_u_main); } diff --git a/fighters/bayonetta/src/status/specialn.rs b/fighters/bayonetta/src/status/specialn.rs index 71b8de5f41..8560032456 100644 --- a/fighters/bayonetta/src/status/specialn.rs +++ b/fighters/bayonetta/src/status/specialn.rs @@ -223,8 +223,10 @@ unsafe extern "C" fn cancel_check(fighter: &mut L2CFighterCommon) -> L2CValue { pub fn install(agent: &mut Agent) { agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Init, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_init); agent.status(Main, *FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_pre); agent.status(Main, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_main); agent.status(End, statuses::bayonetta::SPECIAL_N_CANCEL, special_n_cancel_end); diff --git a/fighters/bayonetta/src/status/specials.rs b/fighters/bayonetta/src/status/specials.rs index 3366793877..1fab50899a 100644 --- a/fighters/bayonetta/src/status/specials.rs +++ b/fighters/bayonetta/src/status/specials.rs @@ -2,25 +2,25 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_S -unsafe extern "C" fn bayonetta_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); StatusModule::set_situation_kind(fighter.module_accessor, SituationKind(*SITUATION_KIND_GROUND), false); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_HIT_BEFORE_GUARD); smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) } -unsafe extern "C" fn bayonetta_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } let frame = fighter.global_table[CURRENT_FRAME].get_i32() + 1; //0 index or whatev if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { //gr checks - bayonetta_special_s_slow_hit(fighter); + special_s_slow_hit(fighter); if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) && !fighter.is_in_hitlag() { if fighter.is_cat_flag(Cat1::SpecialAny | Cat1::AttackN) && frame >= 20 && frame <= 35 { GroundModule::set_correct(fighter.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); @@ -51,7 +51,7 @@ unsafe extern "C" fn bayonetta_special_s_main_loop(fighter: &mut L2CFighterCommo // FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_EDGE -unsafe extern "C" fn bayonetta_special_s_edge_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_AIR), @@ -79,17 +79,17 @@ unsafe extern "C" fn bayonetta_special_s_edge_pre(fighter: &mut L2CFighterCommon 0.into() } -unsafe extern "C" fn bayonetta_special_s_edge_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_main(fighter: &mut L2CFighterCommon) -> L2CValue { let frame = fighter.global_table[PREV_STATUS_FRAME].get_f32() - 18.0; MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_edge"), frame.clamp(0.0, 16.0), 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_edge_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_edge_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_edge_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_end(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn bayonetta_special_s_edge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_edge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -99,7 +99,7 @@ unsafe extern "C" fn bayonetta_special_s_edge_main_loop(fighter: &mut L2CFighter // FIGHTER_BAYONETTA_STATUS_KIND_SPECIAL_S_KICK -unsafe extern "C" fn bayonetta_special_s_kick_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -127,30 +127,30 @@ unsafe extern "C" fn bayonetta_special_s_kick_pre(fighter: &mut L2CFighterCommon 0.into() } -unsafe extern "C" fn bayonetta_special_s_kick_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s_hold_end"), 0.0, 1.0, false, 0.0, false, false); let frame = fighter.global_table[PREV_STATUS_FRAME].get_i32() - 20; let speed = 1.12 - (0.016 * frame as f32); //instant kick = 1.12, last second kick ~ 0.88 sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, speed); - fighter.sub_shift_status_main(L2CValue::Ptr(bayonetta_special_s_kick_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_kick_main_loop as *const () as _)) } -unsafe extern "C" fn bayonetta_special_s_kick_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_FORBID); fighter.off_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); 0.into() } -unsafe extern "C" fn bayonetta_special_s_kick_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_kick_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } if MotionModule::is_end(fighter.module_accessor) {fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); } - bayonetta_special_s_slow_hit(fighter); + special_s_slow_hit(fighter); 0.into() } -unsafe extern "C" fn bayonetta_special_s_slow_hit(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_slow_hit(fighter: &mut L2CFighterCommon) -> L2CValue { let mul_x = fighter.get_param_float("param_special_s", "hs_shooting_speed_mul_x"); let shield_x = fighter.get_param_float("param_special_s", "guard_speed_mul_x"); if VarModule::is_flag(fighter.battle_object, vars::bayonetta::instance::IS_HIT) { @@ -164,12 +164,14 @@ unsafe extern "C" fn bayonetta_special_s_slow_hit(fighter: &mut L2CFighterCommon } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, bayonetta_special_s_end); - agent.status(Pre, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_pre); - agent.status(Main, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_main); - agent.status(End, statuses::bayonetta::SPECIAL_S_KICK, bayonetta_special_s_kick_end); - agent.status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_pre); - agent.status(Main, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_main); - agent.status(End, statuses::bayonetta::SPECIAL_S_EDGE, bayonetta_special_s_edge_end); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_end); + + agent.status(Pre, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_KICK, special_s_kick_end); + + agent.status(Pre, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_pre); + agent.status(Main, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_main); + agent.status(End, statuses::bayonetta::SPECIAL_S_EDGE, special_s_edge_end); } \ No newline at end of file diff --git a/fighters/captain/src/status/special_lw.rs b/fighters/captain/src/status/special_lw.rs index 43fa7dc866..87455c6794 100644 --- a/fighters/captain/src/status/special_lw.rs +++ b/fighters/captain/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_CAPTAIN_STATUS_KIND_SPECIAL_LW_END + unsafe extern "C" fn special_lw_end_init(fighter: &mut L2CFighterCommon) -> L2CValue { let start_situation = WorkModule::get_int(fighter.module_accessor, *FIGHTER_CAPTAIN_STATUS_WORK_ID_INT_FALCON_KICK_START_SITUATION); if start_situation == *SITUATION_KIND_AIR diff --git a/fighters/chrom/src/status/special_s.rs b/fighters/chrom/src/status/special_s.rs index 1bd7109e0b..ab407c95f5 100644 --- a/fighters/chrom/src/status/special_s.rs +++ b/fighters/chrom/src/status/special_s.rs @@ -1,11 +1,6 @@ use super::*; -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); @@ -82,6 +77,13 @@ pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CVa 0.into() } +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } +} + pub fn install(agent: &mut Agent) { agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file diff --git a/fighters/dedede/src/status/special_hi.rs b/fighters/dedede/src/status/special_hi.rs index a466e41851..b4d32406ff 100644 --- a/fighters/dedede/src/status/special_hi.rs +++ b/fighters/dedede/src/status/special_hi.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE -unsafe extern "C" fn specialhifailure_main(fighter: &mut L2CFighterCommon) -> L2CValue{ +unsafe extern "C" fn special_hi_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue{ MotionModule::change_motion(fighter.module_accessor, Hash40::new("landing_fall_special"), 0.0, 1.0, false, 0.0, false, false); StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_STATUS_KIND_FALL_SPECIAL, true); @@ -10,5 +10,5 @@ unsafe extern "C" fn specialhifailure_main(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent){ - agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, specialhifailure_main); + agent.status(Main, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_HI_FAILURE, special_hi_failure_main); } \ No newline at end of file diff --git a/fighters/dedede/src/status/special_lw.rs b/fighters/dedede/src/status/special_lw.rs index a3c6e4a1e1..852d13789e 100644 --- a/fighters/dedede/src/status/special_lw.rs +++ b/fighters/dedede/src/status/special_lw.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT -unsafe extern "C" fn speciallwjumpsquat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ +unsafe extern "C" fn special_lw_jump_squat_exec(fighter: &mut L2CFighterCommon) -> L2CValue{ if ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL){ StatusModule::change_status_force(fighter.module_accessor, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_ATTACK, true); } @@ -10,5 +10,5 @@ unsafe extern "C" fn speciallwjumpsquat_exec(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, speciallwjumpsquat_exec); + agent.status(Exec, *FIGHTER_DEDEDE_STATUS_KIND_SPECIAL_LW_JUMP_SQUAT, special_lw_jump_squat_exec); } \ No newline at end of file diff --git a/fighters/demon/src/status/attack.rs b/fighters/demon/src/status/attack.rs index 3e8581865b..cb4cdf1065 100644 --- a/fighters/demon/src/status/attack.rs +++ b/fighters/demon/src/status/attack.rs @@ -1,9 +1,10 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK + // Here to force Kazuya to only use neutral attack to continue the combo. -unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); if !StopModule::is_stop(fighter.module_accessor) { fighter.check_attack_mtrans(); @@ -12,14 +13,14 @@ unsafe extern "C" fn demon_attack_main(fighter: &mut L2CFighterCommon) -> L2CVal fighter.sub_status_AttackComboCommon(); WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_STATUS_ATTACK_WORK_INT_100_HIT_NEAR_COUNT_CLIFF_STOP); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attack_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_main_loop as *const () as _)) } extern "Rust" { fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; } -unsafe extern "C" fn demon_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let change_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_DEMON_STATUS_ATTACK_COMBO_WORK_INT_NEXT_STATUS); if change_to == *FIGHTER_STATUS_KIND_NONE { if MotionModule::motion_kind(fighter.module_accessor) == hash40("attack_12") { @@ -51,5 +52,5 @@ unsafe extern "C" fn demon_attack_main_loop(fighter: &mut L2CFighterCommon) -> L } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, demon_attack_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); } \ No newline at end of file diff --git a/fighters/demon/src/status/attack_air.rs b/fighters/demon/src/status/attack_air.rs index c000a1fd39..bb32bfd772 100644 --- a/fighters/demon/src/status/attack_air.rs +++ b/fighters/demon/src/status/attack_air.rs @@ -1,13 +1,14 @@ use super::*; -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR + // For fixing momentum transfer -pub unsafe extern "C" fn attackair_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_ATTACK_AIR)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attackair_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); } \ No newline at end of file diff --git a/fighters/demon/src/status/attack_combo.rs b/fighters/demon/src/status/attack_combo.rs index 1f66ad97fa..bd491f1165 100644 --- a/fighters/demon/src/status/attack_combo.rs +++ b/fighters/demon/src/status/attack_combo.rs @@ -4,13 +4,14 @@ extern "Rust" { fn only_jabs(fighter: &mut L2CFighterCommon) -> bool; } -// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO // +// FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO + // Here to force Kazuya to only use neutral attack to continue the combo. -unsafe extern "C" fn demon_attackcombo_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_combo_main(fighter: &mut L2CFighterCommon) -> L2CValue { demon_attackcombo_main_mot_helper(fighter, 2.into()); MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, false); - fighter.sub_shift_status_main(L2CValue::Ptr(demon_attackcombo_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_combo_main_loop as *const () as _)) } unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterCommon, count: L2CValue) { @@ -41,7 +42,7 @@ unsafe extern "C" fn demon_attackcombo_main_mot_helper(fighter: &mut L2CFighterC ); } -unsafe extern "C" fn demon_attackcombo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_combo_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return 0.into(); @@ -161,5 +162,5 @@ unsafe extern "C" fn demon_attackcombo_main_loop_helper_second(fighter: &mut L2C } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, demon_attackcombo_main); + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_ATTACK_COMBO, attack_combo_main); } \ No newline at end of file diff --git a/fighters/demon/src/status/dash.rs b/fighters/demon/src/status/dash.rs index 36f0996c2e..d7d9fd73e2 100644 --- a/fighters/demon/src/status/dash.rs +++ b/fighters/demon/src/status/dash.rs @@ -2,12 +2,12 @@ use super::*; // FIGHTER_STATUS_KIND_DASH -pub unsafe extern "C" fn status_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_Dash_Sub(); - fighter.sub_shift_status_main(L2CValue::Ptr(status_dash_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(dash_main_loop as *const () as _)) } -unsafe extern "C" fn status_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn dash_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !fighter.status_Dash_Main_common(L2CValue::I32(0)).get_bool() { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_DEMON_STATUS_KIND_ATTACK_STEP { @@ -28,5 +28,5 @@ unsafe extern "C" fn status_dash_main(fighter: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_DASH, status_dash); + agent.status(Main, *FIGHTER_STATUS_KIND_DASH, dash_main); } \ No newline at end of file diff --git a/fighters/demon/src/status/dash_back.rs b/fighters/demon/src/status/dash_back.rs index f83c3b27d0..23b046853d 100644 --- a/fighters/demon/src/status/dash_back.rs +++ b/fighters/demon/src/status/dash_back.rs @@ -12,16 +12,16 @@ extern "Rust" { // FIGHTER_DEMON_STATUS_KIND_DASH_BACK // -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_dashback_main(fighter) } -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { common::shoto_status::fgc_end_dashback(fighter); smashline::original_status(End, fighter, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Main, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_DEMON_STATUS_KIND_DASH_BACK, dash_back_end); } \ No newline at end of file diff --git a/fighters/demon/src/status/turn_dash.rs b/fighters/demon/src/status/turn_dash.rs index 4eba60cf24..7bc1f4846f 100644 --- a/fighters/demon/src/status/turn_dash.rs +++ b/fighters/demon/src/status/turn_dash.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_TURN_DASH -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { app::FighterSpecializer_Demon::update_opponent_lr_1on1(fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH); let lr = WorkModule::get_float(fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1); if lr != 0.0 { @@ -19,5 +19,5 @@ pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); } \ No newline at end of file diff --git a/fighters/demon/src/status/wait.rs b/fighters/demon/src/status/wait.rs index 0351a2660a..1fcf67da91 100644 --- a/fighters/demon/src/status/wait.rs +++ b/fighters/demon/src/status/wait.rs @@ -1,7 +1,6 @@ use super::*; -use globals::*; -// FIGHTER_STATUS_KIND_WAIT // +// FIGHTER_STATUS_KIND_WAIT pub unsafe extern "C" fn wait_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Wait() diff --git a/fighters/diddy/src/status/jump_squat.rs b/fighters/diddy/src/status/jump_squat.rs index 8c287119b3..4a4a845965 100644 --- a/fighters/diddy/src/status/jump_squat.rs +++ b/fighters/diddy/src/status/jump_squat.rs @@ -2,11 +2,11 @@ use super::*; // FIGHTER_STATUS_KIND_JUMP_SQUAT -unsafe extern "C" fn end_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_squat_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_end_JumpSquat(); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, end_jump_squat); + agent.status(End, *FIGHTER_STATUS_KIND_JUMP_SQUAT, jump_squat_end); } \ No newline at end of file diff --git a/fighters/dolly/src/status/dash_back.rs b/fighters/dolly/src/status/dash_back.rs index a8d70ac7e9..9907e14241 100644 --- a/fighters/dolly/src/status/dash_back.rs +++ b/fighters/dolly/src/status/dash_back.rs @@ -8,18 +8,18 @@ extern "Rust" { fn fgc_dashback_main(fighter: &mut L2CFighterCommon) -> L2CValue; } -// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK // +// FIGHTER_DOLLY_STATUS_KIND_DASH_BACK -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_dashback_main(fighter) } -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { common::shoto_status::fgc_end_dashback(fighter); smashline::original_status(End, fighter, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Main, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_DOLLY_STATUS_KIND_DASH_BACK, dash_back_end); } \ No newline at end of file diff --git a/fighters/dolly/src/status/guard_off.rs b/fighters/dolly/src/status/guard_off.rs index ec81b557cf..847e1a99ff 100644 --- a/fighters/dolly/src/status/guard_off.rs +++ b/fighters/dolly/src/status/guard_off.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { let rate = fighter.status_GuardOff_Common().get_f32(); WorkModule::enable_transition_term( fighter.module_accessor, @@ -77,13 +77,13 @@ pub unsafe extern "C" fn guard_off(fighter: &mut L2CFighterCommon) -> L2CValue { false, ); } - fighter.main_shift(guard_off_main) + fighter.main_shift(guard_off_main_loop) } -unsafe extern "C" fn guard_off_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn guard_off_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_GuardOff_Main() } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_off_main); } \ No newline at end of file diff --git a/fighters/dolly/src/status/landing.rs b/fighters/dolly/src/status/landing.rs index 091019c42d..07c9175fcf 100644 --- a/fighters/dolly/src/status/landing.rs +++ b/fighters/dolly/src/status/landing.rs @@ -4,7 +4,7 @@ extern "Rust" { fn fgc_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue; } -// FIGHTER_STATUS_KIND_LANDING // +// FIGHTER_STATUS_KIND_LANDING pub unsafe extern "C" fn landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_landing_main(fighter) diff --git a/fighters/dolly/src/status/special_hi.rs b/fighters/dolly/src/status/special_hi.rs index 79295eb1c0..392b296c2b 100644 --- a/fighters/dolly/src/status/special_hi.rs +++ b/fighters/dolly/src/status/special_hi.rs @@ -2,19 +2,19 @@ use super::*; // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP -pub unsafe extern "C" fn init_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_jump_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.select_cliff_hangdata_from_name("special_hi"); 0.into() } // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL -pub unsafe extern "C" fn init_special_hi_fall(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_fall_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.select_cliff_hangdata_from_name("special_hi"); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, init_special_hi_jump); - agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, init_special_hi_fall); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_HI_FALL, special_hi_fall_init); } \ No newline at end of file diff --git a/fighters/dolly/src/status/special_s.rs b/fighters/dolly/src/status/special_s.rs index d98ce7fdd5..76b328d491 100644 --- a/fighters/dolly/src/status/special_s.rs +++ b/fighters/dolly/src/status/special_s.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); } @@ -11,7 +11,7 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); } @@ -20,7 +20,7 @@ pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B -pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_b_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); } @@ -29,7 +29,7 @@ pub unsafe extern "C" fn init_special_b(fighter: &mut L2CFighterCommon) -> L2CVa // FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND -pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_b_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::dolly::instance::DISABLE_SPECIAL_S); } @@ -37,8 +37,8 @@ pub unsafe extern "C" fn init_special_b_command(fighter: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); - agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, init_special_s_command); - agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, init_special_b); - agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, init_special_b_command); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B, special_b_init); + agent.status(Init, *FIGHTER_DOLLY_STATUS_KIND_SPECIAL_B_COMMAND, special_b_command_init); } \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special.rs b/fighters/dolly/src/status/super_special.rs index 187dfc15ca..9f9f1312c2 100644 --- a/fighters/dolly/src/status/super_special.rs +++ b/fighters/dolly/src/status/super_special.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL -pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn super_special_pre(fighter: &mut L2CFighterCommon) -> L2CValue { // Only use meter if you didn't cancel directly from a different super if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { MeterModule::drain(fighter.battle_object, 4); @@ -11,5 +11,5 @@ pub unsafe extern "C" fn pre_superspecial(fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, pre_superspecial); + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL, super_special_pre); } \ No newline at end of file diff --git a/fighters/dolly/src/status/super_special2.rs b/fighters/dolly/src/status/super_special2.rs index f1b8f322db..3fcf03a680 100644 --- a/fighters/dolly/src/status/super_special2.rs +++ b/fighters/dolly/src/status/super_special2.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2 -pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn super_special2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { // Only use meter if you didn't cancel directly from a different supper if !VarModule::is_flag(fighter.battle_object, vars::dolly::instance::SUPER_CANCEL) { MeterModule::drain(fighter.battle_object, 4); @@ -11,5 +11,5 @@ pub unsafe extern "C" fn pre_superspecial2(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, pre_superspecial2); + agent.status(Pre, *FIGHTER_DOLLY_STATUS_KIND_SUPER_SPECIAL2, super_special2_pre); } \ No newline at end of file diff --git a/fighters/dolly/src/status/turn_dash.rs b/fighters/dolly/src/status/turn_dash.rs index 3ef5fbb5cb..36d283f009 100644 --- a/fighters/dolly/src/status/turn_dash.rs +++ b/fighters/dolly/src/status/turn_dash.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_TURN_DASH -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { app::FighterSpecializer_Dolly::update_opponent_lr_1on1( fighter.module_accessor, *FIGHTER_STATUS_KIND_TURN_DASH, @@ -28,5 +28,5 @@ pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValu } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); } \ No newline at end of file diff --git a/fighters/donkey/src/status/item_throw_heavy.rs b/fighters/donkey/src/status/item_throw_heavy.rs index 49eb78d3b3..7fcf1116ff 100644 --- a/fighters/donkey/src/status/item_throw_heavy.rs +++ b/fighters/donkey/src/status/item_throw_heavy.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY -unsafe extern "C" fn heavy_throw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn item_throw_heavy_end(fighter: &mut L2CFighterCommon) -> L2CValue { if MotionModule::motion_kind(fighter.module_accessor) == hash40("item_heavy_throw_b") { PostureModule::reverse_lr(fighter.module_accessor); } @@ -11,5 +11,5 @@ unsafe extern "C" fn heavy_throw_end(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, heavy_throw_end); + agent.status(End, *FIGHTER_STATUS_KIND_ITEM_THROW_HEAVY, item_throw_heavy_end); } diff --git a/fighters/donkey/src/status/shoulder.rs b/fighters/donkey/src/status/shoulder.rs index 4b92bf4209..a355fb35e2 100644 --- a/fighters/donkey/src/status/shoulder.rs +++ b/fighters/donkey/src/status/shoulder.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_DONKEY_STATUS_KIND_SHOULDER_LANDING + /// cargo carry unsafe extern "C" fn shoulder_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/donkey/src/status/special_lw.rs b/fighters/donkey/src/status/special_lw.rs index 41e978d3e8..cffb94763a 100644 --- a/fighters/donkey/src/status/special_lw.rs +++ b/fighters/donkey/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { // if you are grounded, pick up heavy item/spawn barrel diff --git a/fighters/donkey/src/status/super_lift.rs b/fighters/donkey/src/status/super_lift.rs index a00a619b13..2b3e03ddd1 100644 --- a/fighters/donkey/src/status/super_lift.rs +++ b/fighters/donkey/src/status/super_lift.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_DONKEY_STATUS_KIND_SUPER_LIFT_LANDING + /// heavy item carry unsafe extern "C" fn super_lift_landing_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/edge/src/status/special_hi.rs b/fighters/edge/src/status/special_hi.rs index 5b0bc1084e..1b1b52e57d 100644 --- a/fighters/edge/src/status/special_hi.rs +++ b/fighters/edge/src/status/special_hi.rs @@ -1,16 +1,16 @@ use super::*; -unsafe extern "C" fn edge_special_hi_param_int_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { - let param = edge_special_hi_param_helper_inner(hash, charged_rush).get_u64(); +unsafe extern "C" fn special_hi_param_int_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { + let param = special_hi_param_helper_inner(hash, charged_rush).get_u64(); WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), param).into() } -unsafe extern "C" fn edge_special_hi_param_float_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { - let param = edge_special_hi_param_helper_inner(hash, charged_rush).get_u64(); +unsafe extern "C" fn special_hi_param_float_helper(fighter: &mut L2CFighterCommon, hash: L2CValue, charged_rush: L2CValue) -> L2CValue { + let param = special_hi_param_helper_inner(hash, charged_rush).get_u64(); WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), param).into() } -unsafe extern "C" fn edge_special_hi_param_helper_inner(hash: L2CValue, charged_rush: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_param_helper_inner(hash: L2CValue, charged_rush: L2CValue) -> L2CValue { let hash = hash.get_u64(); if !charged_rush.get_bool() { return hash.into(); @@ -74,7 +74,7 @@ unsafe extern "C" fn edge_special_hi_param_helper_inner(hash: L2CValue, charged_ // FIGHTER_STATUS_KIND_SPECIAL_HI -unsafe extern "C" fn edge_special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -106,12 +106,12 @@ unsafe extern "C" fn edge_special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn edge_special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); WorkModule::on_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_DIRECTION_EFFECT_VISIBLE); WorkModule::set_int(fighter.module_accessor, *EFFECT_HANDLE_NULL, *FIGHTER_EDGE_STATUS_SPECIAL_HI_INT_DIRECTION_EFFECT_HANDLE); fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, true.into()); + special_hi_set_kinetics(fighter, true.into()); let mot = if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { Hash40::new("special_air_hi_start") } @@ -128,10 +128,10 @@ unsafe extern "C" fn edge_special_hi_main(fighter: &mut L2CFighterCommon) -> L2C false, false ); - fighter.sub_shift_status_main(L2CValue::Ptr(edge_special_hi_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_main_loop as *const () as _)) } -unsafe extern "C" fn edge_special_hi_set_kinetics(fighter: &mut L2CFighterCommon, param_1: L2CValue) { +unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, param_1: L2CValue) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { if param_1.get_bool() && fighter.global_table[PREV_SITUATION_KIND].get_i32() == *SITUATION_KIND_AIR { return; @@ -153,13 +153,13 @@ unsafe extern "C" fn edge_special_hi_set_kinetics(fighter: &mut L2CFighterCommon } } -unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) { fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, false.into()); + special_hi_set_kinetics(fighter, false.into()); fighter.sub_change_motion_by_situation(Hash40::new("special_hi_start").into(), Hash40::new("special_air_hi_start").into(), true.into()); } - edge_special_hi_set_accel(fighter); + special_hi_set_accel(fighter); let stick_x = fighter.global_table[STICK_X].get_f32(); let stick_y = fighter.global_table[STICK_Y].get_f32(); let mut stick = fighter.Vector2__create(stick_x.into(), stick_y.into()); @@ -168,9 +168,9 @@ unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) - stick["y"].assign(&L2CValue::F32(1.0)); } let normalize = fighter.Vector2__normalize(stick); - edge_special_hi_set_dir_handle(fighter, normalize["x"].clone(), normalize["y"].clone()); + special_hi_set_dir_handle(fighter, normalize["x"].clone(), normalize["y"].clone()); let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); - let param = edge_special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); + let param = special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); if param as f32 <= fighter.global_table[CURRENT_FRAME].get_f32() { WorkModule::set_float(fighter.module_accessor, normalize["x"].get_f32(), *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_X); WorkModule::set_float(fighter.module_accessor, normalize["y"].get_f32(), *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_Y); @@ -178,28 +178,28 @@ unsafe extern "C" fn edge_special_hi_main_loop(fighter: &mut L2CFighterCommon) - PostureModule::set_stick_lr(fighter.module_accessor, 0.0); PostureModule::update_rot_y_lr(fighter.module_accessor); } - let direction = edge_special_hi_ground_touch_down(fighter, normalize["x"].clone(), normalize["y"].clone()); + let direction = special_hi_ground_touch_down(fighter, normalize["x"].clone(), normalize["y"].clone()); let lr = PostureModule::lr(fighter.module_accessor); let angle = sv_math::vec2_angle(lr, 0.0, direction["x"].get_f32(), direction["y"].get_f32()); let degrees = angle.to_degrees(); let sign = fighter.sign((angle * -1.0).into()).get_f32(); WorkModule::set_float(fighter.module_accessor, degrees * sign, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_ROT_DEGREE); - fighter.shift(L2CValue::Ptr(edge_special_hi_main_loop_shift as *const () as _)); + fighter.shift(L2CValue::Ptr(special_hi_main_loop_shift as *const () as _)); } 0.into() } -unsafe extern "C" fn edge_special_hi_main_loop_shift(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_main_loop_shift(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_exec_special_start_common_kinetic_setting(hash40("param_special_hi").into()); - edge_special_hi_set_kinetics(fighter, false.into()); + special_hi_set_kinetics(fighter, false.into()); fighter.sub_change_motion_by_situation(Hash40::new("special_hi_start").into(), Hash40::new("special_air_hi_start").into(), true.into()); - edge_special_hi_set_accel(fighter); + special_hi_set_accel(fighter); let stick_x = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_X); let stick_y = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_DIR_Y); - edge_special_hi_set_dir_handle(fighter, stick_x.into(), stick_y.into()); + special_hi_set_dir_handle(fighter, stick_x.into(), stick_y.into()); let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); - let rot_decide_frame = edge_special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); - let rot_end_frame = edge_special_hi_param_int_helper(fighter, hash40("rot_end_frame").into(), charged_rush.into()).get_i32(); + let rot_decide_frame = special_hi_param_int_helper(fighter, hash40("rot_decide_frame").into(), charged_rush.into()).get_i32(); + let rot_end_frame = special_hi_param_int_helper(fighter, hash40("rot_end_frame").into(), charged_rush.into()).get_i32(); let frame = fighter.global_table[CURRENT_FRAME].get_f32(); let diff = rot_end_frame - rot_decide_frame; let ratio: f32 = (frame - rot_decide_frame as f32) / diff as f32; @@ -241,7 +241,7 @@ unsafe extern "C" fn edge_special_hi_main_loop_shift(fighter: &mut L2CFighterCom 0.into() } -unsafe extern "C" fn edge_special_hi_set_accel(fighter: &mut L2CFighterCommon) { +unsafe extern "C" fn special_hi_set_accel(fighter: &mut L2CFighterCommon) { let start_stop_y_frame_air = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_hi"), hash40("start_stop_y_frame_air")); if start_stop_y_frame_air as f32 <= fighter.global_table[CURRENT_FRAME].get_f32() + 1.0 { let start_gravity = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_hi"), hash40("start_gravity")); @@ -254,7 +254,7 @@ unsafe extern "C" fn edge_special_hi_set_accel(fighter: &mut L2CFighterCommon) { } } -unsafe extern "C" fn edge_special_hi_set_dir_handle(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) { +unsafe extern "C" fn special_hi_set_dir_handle(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) { let vec2 = fighter.Vector2__create(stick_x, stick_y); let normalize = fighter.Vector2__normalize(vec2.clone()); let angle = sv_math::vec2_angle(0.0, 1.0, normalize["x"].get_f32(), normalize["y"].get_f32()); @@ -313,7 +313,7 @@ unsafe extern "C" fn edge_special_hi_set_dir_handle(fighter: &mut L2CFighterComm EffectModule::set_visible_kind(fighter.module_accessor, Hash40::new("edge_octaslash_direction"), visible); } -unsafe extern "C" fn edge_special_hi_ground_touch_down(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) -> L2CValue { +unsafe extern "C" fn special_hi_ground_touch_down(fighter: &mut L2CFighterCommon, stick_x: L2CValue, stick_y: L2CValue) -> L2CValue { let vec2 = fighter.Vector2__create(stick_x.clone(), stick_y.clone()); if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { let normal_x = GroundModule::get_touch_normal_x(fighter.module_accessor, *GROUND_TOUCH_FLAG_DOWN as u32); @@ -336,7 +336,7 @@ unsafe extern "C" fn edge_special_hi_ground_touch_down(fighter: &mut L2CFighterC // FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH -pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH)(fighter); // Grounded Blade Rush shorten mechanic @@ -361,7 +361,7 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // // FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_END // #[status_script(agent = "edge", status = FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_END, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// unsafe fn edge_special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// unsafe fn special_hi_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { // let rush_degree = WorkModule::get_float(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_RUSH_DEGREE); // WorkModule::set_float(fighter.module_accessor, rush_degree, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLOAT_DECIDE_ROT_DEGREE); // let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); @@ -369,8 +369,8 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_STOP); // let speed = sv_kinetic_energy::get_speed(fighter.lua_state_agent); // let vec2 = fighter.Vector2__create(speed.x.into(), speed.y.into()); -// let rush_end_speed_mul = edge_special_hi_param_float_helper(fighter, hash40("rush_end_speed_mul").into(), charged_rush.into()).get_f32(); -// let rush_end_brake_x = edge_special_hi_param_float_helper(fighter, hash40("rush_end_brake_x").into(), charged_rush.into()).get_f32(); +// let rush_end_speed_mul = special_hi_param_float_helper(fighter, hash40("rush_end_speed_mul").into(), charged_rush.into()).get_f32(); +// let rush_end_brake_x = special_hi_param_float_helper(fighter, hash40("rush_end_brake_x").into(), charged_rush.into()).get_f32(); // let speed_x = vec2["x"].get_f32() * rush_end_speed_mul; // sv_kinetic_energy!( // set_speed, @@ -389,7 +389,7 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // fighter.clear_lua_stack(); // lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); // let speed_y = sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); -// let rush_end_gravity_accel = edge_special_hi_param_float_helper(fighter, hash40("rush_end_gravity_accel").into(), charged_rush.into()).get_f32(); +// let rush_end_gravity_accel = special_hi_param_float_helper(fighter, hash40("rush_end_gravity_accel").into(), charged_rush.into()).get_f32(); // let speed_y = speed_y * rush_end_speed_mul; // sv_kinetic_energy!( // set_speed, @@ -419,18 +419,18 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // false, // false // ); -// fighter.sub_shift_status_main(L2CValue::Ptr(edge_special_hi_end_main_loop as *const () as _)) +// fighter.sub_shift_status_main(L2CValue::Ptr(special_hi_end_main_loop as *const () as _)) // } -// unsafe extern "C" fn edge_special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// unsafe extern "C" fn special_hi_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // if fighter.sub_transition_group_check_air_cliff().get_bool() { // return 1.into(); // } // if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { // if !MotionModule::is_end(fighter.module_accessor) { // let charged_rush = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_CHARGED_RUSH); -// let rotate_back_begin_frame = edge_special_hi_param_int_helper(fighter, hash40("rotate_back_begin_frame").into(), charged_rush.into()).get_i32(); -// let rotate_back_end_frame = edge_special_hi_param_int_helper(fighter, hash40("rotate_back_end_frame").into(), charged_rush.into()).get_i32(); +// let rotate_back_begin_frame = special_hi_param_int_helper(fighter, hash40("rotate_back_begin_frame").into(), charged_rush.into()).get_i32(); +// let rotate_back_end_frame = special_hi_param_int_helper(fighter, hash40("rotate_back_end_frame").into(), charged_rush.into()).get_i32(); // let frame = fighter.global_table[CURRENT_FRAME].get_f32(); // if rotate_back_begin_frame as f32 <= frame { // let mut diff = rotate_back_end_frame - rotate_back_begin_frame; @@ -445,8 +445,8 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // } // if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL) { // WorkModule::off_flag(fighter.module_accessor, *FIGHTER_EDGE_STATUS_SPECIAL_HI_FLAG_ENABLE_CONTROL); -// let control_accel_x_mul = edge_special_hi_param_float_helper(fighter, hash40("control_accel_x_mul").into(), charged_rush.into()).get_f32(); -// let control_speed_x_max_mul = edge_special_hi_param_float_helper(fighter, hash40("control_speed_x_max_mul").into(), charged_rush.into()).get_f32(); +// let control_accel_x_mul = special_hi_param_float_helper(fighter, hash40("control_accel_x_mul").into(), charged_rush.into()).get_f32(); +// let control_speed_x_max_mul = special_hi_param_float_helper(fighter, hash40("control_speed_x_max_mul").into(), charged_rush.into()).get_f32(); // sv_kinetic_energy!( // reset_energy, // fighter, @@ -490,8 +490,8 @@ pub unsafe extern "C" fn edge_special_hi_rush_main(fighter: &mut L2CFighterCommo // } pub fn install(agent: &mut Agent) { - //.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_pre) - //.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, edge_special_hi_main) - agent.status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_rush_main); - //.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI_RUSH, edge_special_hi_end) + //.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre) + //.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main) + agent.status(Main, *FIGHTER_EDGE_STATUS_KIND_SPECIAL_HI_RUSH, special_hi_rush_main); + //.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI_RUSH, special_hi_end) } \ No newline at end of file diff --git a/fighters/elight/src/status/special_hi.rs b/fighters/elight/src/status/special_hi.rs index 26254b7e8e..fa3443d8c6 100644 --- a/fighters/elight/src/status/special_hi.rs +++ b/fighters/elight/src/status/special_hi.rs @@ -24,6 +24,8 @@ pub unsafe fn special_hi_common_check_spreadbullet(fighter: &mut L2CFighterCommo } } +// FIGHTER_STATUS_KIND_SPECIAL_HI + unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/elight/src/status/special_hi_attack.rs b/fighters/elight/src/status/special_hi_attack.rs index e3d0d43a1d..9d03928077 100644 --- a/fighters/elight/src/status/special_hi_attack.rs +++ b/fighters/elight/src/status/special_hi_attack.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK1 + unsafe extern "C" fn special_hi_attack1_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -30,6 +32,8 @@ unsafe extern "C" fn special_hi_attack1_pre(fighter: &mut L2CFighterCommon) -> L 0.into() } +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_ATTACK2 + unsafe extern "C" fn special_hi_attack2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/elight/src/status/special_hi_finish.rs b/fighters/elight/src/status/special_hi_finish.rs index 317e172b0b..172fb6f3a0 100644 --- a/fighters/elight/src/status/special_hi_finish.rs +++ b/fighters/elight/src/status/special_hi_finish.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_FINISH + unsafe extern "C" fn special_hi_finish_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/elight/src/status/special_hi_finish2.rs b/fighters/elight/src/status/special_hi_finish2.rs index d2c61aab4c..09cfaa6712 100644 --- a/fighters/elight/src/status/special_hi_finish2.rs +++ b/fighters/elight/src/status/special_hi_finish2.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::elight::SPECIAL_HI_FINISH2 + unsafe extern "C" fn special_hi_finish2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/elight/src/status/special_hi_jump.rs b/fighters/elight/src/status/special_hi_jump.rs index 7f7f24186b..a38fffdc7e 100644 --- a/fighters/elight/src/status/special_hi_jump.rs +++ b/fighters/elight/src/status/special_hi_jump.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_ELIGHT_STATUS_KIND_SPECIAL_HI_JUMP + unsafe extern "C" fn special_hi_jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/falco/src/status/special_hi.rs b/fighters/falco/src/status/special_hi.rs index 9fbc449034..4245c49ef2 100644 --- a/fighters/falco/src/status/special_hi.rs +++ b/fighters/falco/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI @@ -50,7 +49,7 @@ pub unsafe extern "C" fn special_hi_bound_end(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); - agent.status( Main,*FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_main,); - agent.status(End,*FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND,special_hi_bound_end,); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_main); + agent.status( Main, *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); + agent.status(End, *FIGHTER_FALCO_STATUS_KIND_SPECIAL_HI_BOUND, special_hi_bound_end); } diff --git a/fighters/falco/src/status/special_lw.rs b/fighters/falco/src/status/special_lw.rs index abc38ce565..908ddbef4c 100644 --- a/fighters/falco/src/status/special_lw.rs +++ b/fighters/falco/src/status/special_lw.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_LW unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -31,8 +32,6 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } -// FIGHTER_STATUS_KIND_SPECIAL_LW - unsafe extern "C" fn special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { // Returning here allows for running shine @@ -455,6 +454,7 @@ pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_exec); agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); + agent.status(Pre, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_pre); agent.status(Init, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_init); agent.status(Main, statuses::falco::SPECIAL_LW_LOOP, special_lw_loop_main); diff --git a/fighters/falco/src/status/special_s.rs b/fighters/falco/src/status/special_s.rs index a0b632f0b3..08e4a4dfec 100644 --- a/fighters/falco/src/status/special_s.rs +++ b/fighters/falco/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_FALCO_ILLUSION_STATUS_WORK_ID_FLAG_CONTINUE); diff --git a/fighters/fox/src/status/mod.rs b/fighters/fox/src/status/mod.rs index 978a1fc9c1..301a8a285b 100644 --- a/fighters/fox/src/status/mod.rs +++ b/fighters/fox/src/status/mod.rs @@ -1,4 +1,6 @@ use super::*; +use globals::*; +// status script import mod special_s; mod special_hi; diff --git a/fighters/fox/src/status/special_hi.rs b/fighters/fox/src/status/special_hi.rs index aba9162ab9..912a168480 100644 --- a/fighters/fox/src/status/special_hi.rs +++ b/fighters/fox/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI diff --git a/fighters/fox/src/status/special_lw.rs b/fighters/fox/src/status/special_lw.rs index 5ba9799a6b..09c5dbbed5 100644 --- a/fighters/fox/src/status/special_lw.rs +++ b/fighters/fox/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_LW diff --git a/fighters/fox/src/status/special_s.rs b/fighters/fox/src/status/special_s.rs index a183a7ec77..db9db2b9be 100644 --- a/fighters/fox/src/status/special_s.rs +++ b/fighters/fox/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_FOX_ILLUSION_STATUS_WORK_ID_FLAG_CONTINUE); diff --git a/fighters/gamewatch/src/status/special_hi.rs b/fighters/gamewatch/src/status/special_hi.rs index fd587959a2..a56d18402e 100644 --- a/fighters/gamewatch/src/status/special_hi.rs +++ b/fighters/gamewatch/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::gamewatch::instance::UP_SPECIAL_FREEFALL) { diff --git a/fighters/gamewatch/src/status/special_hi_open.rs b/fighters/gamewatch/src/status/special_hi_open.rs index 337dff28f0..d6b7a5d9dc 100644 --- a/fighters/gamewatch/src/status/special_hi_open.rs +++ b/fighters/gamewatch/src/status/special_hi_open.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::gamewatch::SPECIAL_HI_OPEN unsafe extern "C" fn special_hi_open_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/ganon/src/status/attack_lw3.rs b/fighters/ganon/src/status/attack_lw3.rs index 9aea330e90..1fac483fab 100644 --- a/fighters/ganon/src/status/attack_lw3.rs +++ b/fighters/ganon/src/status/attack_lw3.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_LW3 + unsafe extern "C" fn attack_lw3_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackLw3_common(); fighter.main_shift(attack_lw3_main_loop) diff --git a/fighters/ganon/src/status/special_air_s_catch.rs b/fighters/ganon/src/status/special_air_s_catch.rs index 1189be4a19..1663b0abc9 100644 --- a/fighters/ganon/src/status/special_air_s_catch.rs +++ b/fighters/ganon/src/status/special_air_s_catch.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH + unsafe extern "C" fn special_air_s_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::set_rate(fighter.module_accessor, 0.0); fighter.main_shift(special_air_s_catch_main_loop) @@ -51,5 +53,5 @@ unsafe extern "C" fn special_air_s_catch_main_loop(fighter: &mut L2CFighterCommo } pub fn install(agent: &mut Agent) { - agent.status( Main,*FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH,special_air_s_catch_main); + agent.status(Main, *FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH, special_air_s_catch_main); } diff --git a/fighters/ganon/src/status/special_lw.rs b/fighters/ganon/src/status/special_lw.rs index 697749294d..205a148c4d 100644 --- a/fighters/ganon/src/status/special_lw.rs +++ b/fighters/ganon/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, @@ -30,6 +32,8 @@ unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue 0.into() } +// FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END + unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); @@ -53,5 +57,6 @@ unsafe extern "C" fn special_lw_end_main(fighter: &mut L2CFighterCommon) -> L2CV pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); - agent.status(Main,*FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END,special_lw_end_main); + + agent.status(Main, *FIGHTER_GANON_STATUS_KIND_SPECIAL_LW_END, special_lw_end_main); } diff --git a/fighters/ganon/src/status/special_n.rs b/fighters/ganon/src/status/special_n.rs index f40235a237..3d9133b0b2 100644 --- a/fighters/ganon/src/status/special_n.rs +++ b/fighters/ganon/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( diff --git a/fighters/ganon/src/status/special_n_float.rs b/fighters/ganon/src/status/special_n_float.rs index 553fe8d762..9a48adc885 100644 --- a/fighters/ganon/src/status/special_n_float.rs +++ b/fighters/ganon/src/status/special_n_float.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::ganon::SPECIAL_N_FLOAT + unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/ganon/src/status/special_s.rs b/fighters/ganon/src/status/special_s.rs index 514b284ace..e66e23bdde 100644 --- a/fighters/ganon/src/status/special_s.rs +++ b/fighters/ganon/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_S + unsafe extern "C" fn special_s_exit(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_GANON_STATUS_KIND_SPECIAL_AIR_S_CATCH { return 0.into(); diff --git a/fighters/gaogaen/src/status/special_n.rs b/fighters/gaogaen/src/status/special_n.rs index 88182ed0b0..7768ef09ae 100644 --- a/fighters/gaogaen/src/status/special_n.rs +++ b/fighters/gaogaen/src/status/special_n.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_N -pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); let mask_flag = if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_N | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_ACTION_TRIGGER_ON) as u64 @@ -38,7 +38,7 @@ pub unsafe extern "C" fn gaogaen_special_n_pre(fighter: &mut L2CFighterCommon) - } -pub unsafe extern "C" fn exec_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR && StatusModule::prev_situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); @@ -92,6 +92,6 @@ pub unsafe extern "C" fn exec_special_n(fighter: &mut L2CFighterCommon) -> L2CVa // return 0.into() pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, gaogaen_special_n_pre); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, exec_special_n); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); } diff --git a/fighters/iceclimber/src/status/mod.rs b/fighters/iceclimber/src/status/mod.rs index 48d325969f..0ed88c854d 100644 --- a/fighters/iceclimber/src/status/mod.rs +++ b/fighters/iceclimber/src/status/mod.rs @@ -84,11 +84,7 @@ unsafe extern "C" fn catchwait_nana_main_loop(fighter: &mut L2CFighterCommon) -> pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_DASH, dash); - agent.status( - Exit, - *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, - special_hi_jump_exit, - ); + agent.status(Exit, *FIGHTER_POPO_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_exit); } pub fn install_nana(agent: &mut Agent) { diff --git a/fighters/ike/src/status/rebirth.rs b/fighters/ike/src/status/rebirth.rs index 53f7821302..c7e460dd8d 100644 --- a/fighters/ike/src/status/rebirth.rs +++ b/fighters/ike/src/status/rebirth.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_REBIRTH + +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { VisibilityModule::set_int64(fighter.module_accessor, hash40("sword") as i64, hash40("sword_normal") as i64); if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_IKE_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -10,5 +12,5 @@ unsafe extern "C" fn ike_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, ike_rebirth_end); + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/jack/src/status/dispatch.rs b/fighters/jack/src/status/dispatch.rs index 7de9abac4d..b3dfe25812 100644 --- a/fighters/jack/src/status/dispatch.rs +++ b/fighters/jack/src/status/dispatch.rs @@ -1,6 +1,8 @@ use super::*; -pub unsafe extern "C" fn jack_dispatch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_JACK_STATUS_KIND_DISPATCH + +pub unsafe extern "C" fn dispatch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -28,7 +30,7 @@ pub unsafe extern "C" fn jack_dispatch_pre(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub unsafe extern "C" fn jack_dispatch_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dispatch_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion( fighter.module_accessor, Hash40::new("dispatch"), @@ -48,10 +50,10 @@ pub unsafe extern "C" fn jack_dispatch_main(fighter: &mut L2CFighterCommon) -> L GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); } VisibilityModule::set_material_anim_priority(fighter.module_accessor, Hash40::new("mask"), true); - fighter.sub_shift_status_main(L2CValue::Ptr(jack_dispatch_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(dispatch_main_loop as *const () as _)) } -unsafe extern "C" fn jack_dispatch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn dispatch_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -84,6 +86,6 @@ unsafe extern "C" fn jack_dispatch_main_loop(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_pre); - agent.status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, jack_dispatch_main); + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_DISPATCH, dispatch_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_DISPATCH, dispatch_main); } diff --git a/fighters/jack/src/status/mod.rs b/fighters/jack/src/status/mod.rs index 6ff33ff4a4..5d6bf9f0f0 100644 --- a/fighters/jack/src/status/mod.rs +++ b/fighters/jack/src/status/mod.rs @@ -26,20 +26,20 @@ unsafe fn get_original_customizer(fighter: &mut L2CFighterCommon) -> Option L2CValue { +unsafe extern "C" fn move_customizer(fighter: &mut L2CFighterCommon) -> L2CValue { let customize_to = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_WAZA_CUSTOMIZE_TO); if customize_to == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_1 { fighter.sv_set_status_func( FIGHTER_STATUS_KIND_SPECIAL_LW.into(), LUA_SCRIPT_STATUS_FUNC_STATUS_PRE.into(), - std::mem::transmute(special_lw::jack_special_lw_pre as *const ()) + std::mem::transmute(special_lw::special_lw_pre as *const ()) ); 0.into() } else if customize_to == *FIGHTER_WAZA_CUSTOMIZE_TO_SPECIAL_LW_2 { fighter.sv_set_status_func( FIGHTER_STATUS_KIND_SPECIAL_LW.into(), LUA_SCRIPT_STATUS_FUNC_STATUS_PRE.into(), - std::mem::transmute(special_lw::jack_special_lw2_pre as *const ()) + std::mem::transmute(special_lw::special_lw2_pre as *const ()) ); 0.into() } else if let Some(original) = get_original_customizer(fighter) { @@ -49,7 +49,7 @@ unsafe extern "C" fn jack_move_customizer(fighter: &mut L2CFighterCommon) -> L2C } } -unsafe extern "C" fn jack_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2CValue { let rebel_gauge = WorkModule::get_float(fighter.module_accessor, 0x4D); if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE_EXIST) && rebel_gauge < 10.0 { // FIGHTER_JACK_INSTANCE_WORK_ID_FLOAT_REBEL_GAUGE @@ -63,9 +63,9 @@ unsafe extern "C" fn jack_special_lw_uniq(fighter: &mut L2CFighterCommon) -> L2C } unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { - set_move_customizer(fighter, jack_move_customizer); - jack_move_customizer(fighter); - fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(jack_special_lw_uniq as *const () as _)); + set_move_customizer(fighter, move_customizer); + move_customizer(fighter); + fighter.global_table[globals::USE_SPECIAL_LW_CALLBACK].assign(&L2CValue::Ptr(special_lw_uniq as *const () as _)); } pub fn install(agent: &mut Agent) { diff --git a/fighters/jack/src/status/special_lw.rs b/fighters/jack/src/status/special_lw.rs index aa76f63ad1..e72365684a 100644 --- a/fighters/jack/src/status/special_lw.rs +++ b/fighters/jack/src/status/special_lw.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe extern "C" fn jack_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mut rebel_gauge = WorkModule::get_float(fighter.module_accessor, 0x4D); rebel_gauge -= 10.0; if rebel_gauge < 1.0 { @@ -13,7 +13,7 @@ pub unsafe extern "C" fn jack_special_lw_pre(fighter: &mut L2CFighterCommon) -> 1.into() } -pub unsafe extern "C" fn jack_special_lw2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_lw2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, 0x200000E4); // FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE_END FighterSpecializer_Jack::check_doyle_summon_dispatch(fighter.module_accessor, true, false); StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_JACK_STATUS_KIND_DISPATCH); diff --git a/fighters/jack/src/status/summon.rs b/fighters/jack/src/status/summon.rs index bb5b82252a..e10bd3142c 100644 --- a/fighters/jack/src/status/summon.rs +++ b/fighters/jack/src/status/summon.rs @@ -1,6 +1,8 @@ use super::*; -pub unsafe extern "C" fn jack_summon_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_JACK_STATUS_KIND_SUMMON + +pub unsafe extern "C" fn summon_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, SituationKind(*SITUATION_KIND_NONE), @@ -28,7 +30,7 @@ pub unsafe extern "C" fn jack_summon_pre(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -pub unsafe extern "C" fn jack_summon_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn summon_main(fighter: &mut L2CFighterCommon) -> L2CValue { // if FighterSpecializer_Jack::is_cut_in_effect(fighter.module_accessor) { // WorkModule::on_flag(fighter.module_accessor, *FIGHTER_JACK_STATUS_SUMMON_FLAG_CUT_IN_EFFECT); // } @@ -56,10 +58,10 @@ pub unsafe extern "C" fn jack_summon_main(fighter: &mut L2CFighterCommon) -> L2C // } VisibilityModule::set_int64(fighter.module_accessor, hash40("mask") as i64, hash40("on") as i64); VisibilityModule::set_material_anim_priority(fighter.module_accessor, Hash40::new("mask"), true); - fighter.sub_shift_status_main(L2CValue::Ptr(jack_summon_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(summon_main_loop as *const () as _)) } -unsafe extern "C" fn jack_summon_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn summon_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -92,6 +94,6 @@ unsafe extern "C" fn jack_summon_main_loop(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_pre); - agent.status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, jack_summon_main); + agent.status(Pre, *FIGHTER_JACK_STATUS_KIND_SUMMON, summon_pre); + agent.status(Main, *FIGHTER_JACK_STATUS_KIND_SUMMON, summon_main); } diff --git a/fighters/ken/src/status/attack.rs b/fighters/ken/src/status/attack.rs index b9084e09e9..02fafa993d 100644 --- a/fighters/ken/src/status/attack.rs +++ b/fighters/ken/src/status/attack.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK -unsafe extern "C" fn main_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); if WorkModule::is_flag( fighter.module_accessor, @@ -192,5 +192,5 @@ unsafe extern "C" fn ken_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, main_attack); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); } diff --git a/fighters/ken/src/status/dash.rs b/fighters/ken/src/status/dash.rs index 4f22e05fad..ce7dfe8fde 100644 --- a/fighters/ken/src/status/dash.rs +++ b/fighters/ken/src/status/dash.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_TURN_DASH -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let lr = WorkModule::get_float( fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, @@ -25,17 +25,18 @@ pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValu // FIGHTER_RYU_STATUS_KIND_DASH_BACK -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_dashback_main(fighter) } -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { common::shoto_status::fgc_end_dashback(fighter); smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); - agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); + + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_end); } diff --git a/fighters/ken/src/status/finals.rs b/fighters/ken/src/status/finals.rs index ca6ad65544..e7cba91312 100644 --- a/fighters/ken/src/status/finals.rs +++ b/fighters/ken/src/status/finals.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_FINAL -pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -33,15 +33,15 @@ pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -// FIGHTER_RYU_STATUS_KIND_FINAL2 // +// FIGHTER_RYU_STATUS_KIND_FINAL2 -pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Pre, fighter, *FIGHTER_RYU_STATUS_KIND_FINAL2)(fighter); let meter_amount = MeterModule::meter(fighter.battle_object); MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final); - agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2); + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); } diff --git a/fighters/ken/src/status/guard.rs b/fighters/ken/src/status/guard.rs index 1a679e2ab1..28eadde129 100644 --- a/fighters/ken/src/status/guard.rs +++ b/fighters/ken/src/status/guard.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { let rate = fighter.status_GuardOff_Common().get_f32(); if VarModule::is_flag( fighter.object(), @@ -73,13 +73,13 @@ pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { false, ); } - fighter.main_shift(guard_main) + fighter.main_shift(guard_main_loop) } -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn guard_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_GuardOff_Main() } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_main); } diff --git a/fighters/ken/src/status/special_cmd4.rs b/fighters/ken/src/status/special_cmd4.rs index f9bcadf982..84751a3444 100644 --- a/fighters/ken/src/status/special_cmd4.rs +++ b/fighters/ken/src/status/special_cmd4.rs @@ -1,6 +1,8 @@ use super::*; -pub unsafe extern "C" fn ken_attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// statuses::ken::ATTACK_COMMAND_4 + +pub unsafe extern "C" fn attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -28,7 +30,7 @@ pub unsafe extern "C" fn ken_attack_command_4_pre(fighter: &mut L2CFighterCommon 0.into() } -pub unsafe extern "C" fn ken_attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_command4"), 0.0, 1.0, false, 0.0, false, false); fighter.set_int(*FIGHTER_LOG_ATTACK_KIND_ATTACK_COMMAND2, *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND); // fighter.clear_lua_stack(); @@ -36,10 +38,10 @@ pub unsafe extern "C" fn ken_attack_command_4_main(fighter: &mut L2CFighterCommo // let mut lr = PostureModule::lr(fighter.module_accessor); // fighter.push_lua_stack(&mut L2CValue::F32(lr)); // app::sv_kinetic_energy::set_chara_dir(fighter.lua_state_agent); - fighter.sub_shift_status_main(L2CValue::Ptr(ken_attack_command_4_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_command_4_main_loop as *const () as _)) } -pub unsafe extern "C" fn ken_attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 1.into(); @@ -70,6 +72,6 @@ pub unsafe extern "C" fn ken_attack_command_4_main_loop(fighter: &mut L2CFighter } pub fn install(agent: &mut Agent) { - agent.status(Pre, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_pre); - agent.status(Main, statuses::ken::ATTACK_COMMAND_4, ken_attack_command_4_main); + agent.status(Pre, statuses::ken::ATTACK_COMMAND_4, attack_command_4_pre); + agent.status(Main, statuses::ken::ATTACK_COMMAND_4, attack_command_4_main); } diff --git a/fighters/ken/src/status/special_hi.rs b/fighters/ken/src/status/special_hi.rs index 2a356b3150..190317faba 100644 --- a/fighters/ken/src/status/special_hi.rs +++ b/fighters/ken/src/status/special_hi.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP -pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_jump_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP || fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_FALL || fighter.global_table[STATUS_KIND] == FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_LANDING { @@ -23,7 +23,7 @@ pub unsafe extern "C" fn end_special_hi_jump(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, end_special_hi_jump); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, end_special_hi_jump); - agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, end_special_hi_jump); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_end); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_jump_end); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_SPECIAL_HI_COMMAND, special_hi_jump_end); } diff --git a/fighters/ken/src/status/special_lw.rs b/fighters/ken/src/status/special_lw.rs index 82f282c7ad..abab11b63f 100644 --- a/fighters/ken/src/status/special_lw.rs +++ b/fighters/ken/src/status/special_lw.rs @@ -131,6 +131,7 @@ unsafe extern "C" fn special_lw_install_set_kinetic(fighter: &mut L2CFighterComm pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_LW_STEP_F, special_lw_step_f_init); + agent.status(Pre, statuses::ken::INSTALL, special_lw_install_pre); agent.status(Main, statuses::ken::INSTALL, special_lw_install_main); agent.status(End, statuses::ken::INSTALL, special_lw_install_end); diff --git a/fighters/ken/src/status/special_n.rs b/fighters/ken/src/status/special_n.rs index 961a8d7693..3275158d54 100644 --- a/fighters/ken/src/status/special_n.rs +++ b/fighters/ken/src/status/special_n.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_N -pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND); return 1.into(); @@ -12,7 +12,7 @@ pub unsafe extern "C" fn pre_special_n(fighter: &mut L2CFighterCommon) -> L2CVal // FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND -pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_command_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_MAGIC_SERIES_CANCEL) { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N2_COMMAND); return 1.into(); @@ -21,6 +21,6 @@ pub unsafe extern "C" fn pre_special_n_command(fighter: &mut L2CFighterCommon) - } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, pre_special_n); - agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, pre_special_n_command); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_SPECIAL_N_COMMAND, special_n_command_pre); } \ No newline at end of file diff --git a/fighters/ken/src/status/special_s.rs b/fighters/ken/src/status/special_s.rs index 25e9b9914d..84db0e6406 100644 --- a/fighters/ken/src/status/special_s.rs +++ b/fighters/ken/src/status/special_s.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } @@ -11,7 +11,7 @@ pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) // FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } @@ -20,7 +20,7 @@ pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CVa // FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP -pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_loop_init(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); } @@ -28,7 +28,7 @@ pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND,init_special_s_command,); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); - agent.status(Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP,init_special_s_loop,); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_init); } diff --git a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs index a6ed57520f..8e0136299a 100644 --- a/fighters/kirby/src/status/bayonetta_special_n_cancel.rs +++ b/fighters/kirby/src/status/bayonetta_special_n_cancel.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_BAYONETTA_SPECIAL_N unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { diff --git a/fighters/kirby/src/status/diddy_special_n_cancel.rs b/fighters/kirby/src/status/diddy_special_n_cancel.rs index a4e95dc149..af37de4ade 100644 --- a/fighters/kirby/src/status/diddy_special_n_cancel.rs +++ b/fighters/kirby/src/status/diddy_special_n_cancel.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::is_changing(fighter.module_accessor) { diff --git a/fighters/kirby/src/status/edge_special_n.rs b/fighters/kirby/src/status/edge_special_n.rs index 7cc6f0bac0..2305d49b52 100644 --- a/fighters/kirby/src/status/edge_special_n.rs +++ b/fighters/kirby/src/status/edge_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("edge_special_n_start").into(), Hash40::new("edge_special_air_n_start").into(), false.into()); diff --git a/fighters/kirby/src/status/ganon_special_n.rs b/fighters/kirby/src/status/ganon_special_n.rs index 5847337b5d..700b3fef1e 100644 --- a/fighters/kirby/src/status/ganon_special_n.rs +++ b/fighters/kirby/src/status/ganon_special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( diff --git a/fighters/kirby/src/status/ganon_special_n_float.rs b/fighters/kirby/src/status/ganon_special_n_float.rs index 9bc2b63ce4..273da7bbc7 100644 --- a/fighters/kirby/src/status/ganon_special_n_float.rs +++ b/fighters/kirby/src/status/ganon_special_n_float.rs @@ -1,5 +1,7 @@ use super::*; +// GANON_SPECIAL_N_FLOAT + unsafe extern "C" fn special_n_float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/kirby/src/status/gaogaen_special_n.rs b/fighters/kirby/src/status/gaogaen_special_n.rs index a9d4982277..985eb11781 100644 --- a/fighters/kirby/src/status/gaogaen_special_n.rs +++ b/fighters/kirby/src/status/gaogaen_special_n.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N diff --git a/fighters/kirby/src/status/koopa_special_n.rs b/fighters/kirby/src/status/koopa_special_n.rs index 4adb4e6aec..e1d7346459 100644 --- a/fighters/kirby/src/status/koopa_special_n.rs +++ b/fighters/kirby/src/status/koopa_special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N + unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; if !can_fireball { diff --git a/fighters/kirby/src/status/littlemac_special_n.rs b/fighters/kirby/src/status/littlemac_special_n.rs index 69c29e92cd..1931c68f2b 100644 --- a/fighters/kirby/src/status/littlemac_special_n.rs +++ b/fighters/kirby/src/status/littlemac_special_n.rs @@ -1,9 +1,10 @@ use super::*; -use globals::*; #[skyline::from_offset(0xb96770)] fn copy_ability_reset(fighter: *mut Fighter, some_miifighter_bool: bool); +// FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings(fighter.module_accessor, diff --git a/fighters/kirby/src/status/lucas_special_n.rs b/fighters/kirby/src/status/lucas_special_n.rs index 2051e2bfd8..103c02fac4 100644 --- a/fighters/kirby/src/status/lucas_special_n.rs +++ b/fighters/kirby/src/status/lucas_special_n.rs @@ -1,8 +1,8 @@ use super::*; -// SPECIAL N // +// FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N -unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { fighter.change_status(FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_FIRE.into(), false.into()); return 0.into(); @@ -15,7 +15,7 @@ unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV // SPECIAL N HOLD // -unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N STATUS MAIN CODE // // @@ -26,20 +26,20 @@ unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); // if !StopModule::is_stop(fighter.module_accessor) { - // lucas_special_n_hold_main_sub_status(fighter, false.into()); + // special_n_hold_main_sub_status(fighter, false.into()); // } - // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - // fighter.main_shift(lucas_special_n_hold_main_loop) + // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + // fighter.main_shift(special_n_hold_main_loop) if !StopModule::is_stop(fighter.module_accessor) { - lucas_special_n_hold_main_sub_status(fighter, false.into()); + special_n_hold_main_sub_status(fighter, false.into()); } MotionModule::change_motion(fighter.module_accessor, Hash40::new("lucas_special_n_hold"), 0.0, 1.0, false, 0.0, false, false); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - fighter.main_shift(lucas_special_n_hold_main_loop) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + fighter.main_shift(special_n_hold_main_loop) } -unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { +unsafe fn special_n_check_explosion(fighter: &mut L2CFighterCommon) { // // OLD PK FREEZE EXPLOSION CODE // // @@ -71,12 +71,12 @@ unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { // } } -unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { // // OLD SPECIAL N SUBSTATUS CODE // // // if arg.get_bool() { - // lucas_special_n_check_explosion(fighter); + // special_n_check_explosion(fighter); // } // if !fighter.is_situation(*SITUATION_KIND_GROUND) { // if !arg.get_bool() { @@ -103,7 +103,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFight 0.into() } -unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // // @@ -117,7 +117,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // // else block - // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + // special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); // } @@ -146,14 +146,14 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // else block - lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("lucas_special_n_hold"), Hash40::new("lucas_special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } 1.into() } -unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( +unsafe extern "C" fn special_n_hold_transition_g2a_kind( fighter: &mut L2CFighterCommon, mtrans_kind_work_id: i32, flag_work_id: i32, @@ -186,6 +186,6 @@ unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, lucas_special_n_pre,); - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, lucas_special_n_hold_main,); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, special_n_pre,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, special_n_hold_main,); } diff --git a/fighters/kirby/src/status/luigi_special_n.rs b/fighters/kirby/src/status/luigi_special_n.rs index 30f6a1bf9a..17cce0755d 100644 --- a/fighters/kirby/src/status/luigi_special_n.rs +++ b/fighters/kirby/src/status/luigi_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/kirby/src/status/mario_special_n.rs b/fighters/kirby/src/status/mario_special_n.rs index 21dcb57efa..dc8b76eb06 100644 --- a/fighters/kirby/src/status/mario_special_n.rs +++ b/fighters/kirby/src/status/mario_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/kirby/src/status/mariod_special_n.rs b/fighters/kirby/src/status/mariod_special_n.rs index 30ae8016fc..1ef25a00f1 100644 --- a/fighters/kirby/src/status/mariod_special_n.rs +++ b/fighters/kirby/src/status/mariod_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { diff --git a/fighters/kirby/src/status/ridley_special_n.rs b/fighters/kirby/src/status/ridley_special_n.rs index 66478acafe..96681ad433 100644 --- a/fighters/kirby/src/status/ridley_special_n.rs +++ b/fighters/kirby/src/status/ridley_special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); @@ -71,6 +72,7 @@ unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, return 0.into() } +// FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT /// Hold neutral special to explode unsafe extern "C" fn special_n_shoot_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/kirby/src/status/sonic_special_n.rs b/fighters/kirby/src/status/sonic_special_n.rs index 18967dcbec..967dc50cf8 100644 --- a/fighters/kirby/src/status/sonic_special_n.rs +++ b/fighters/kirby/src/status/sonic_special_n.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; -use smashline::*; + +// FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N pub unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { @@ -94,6 +94,8 @@ unsafe extern "C" fn special_n_main_loop2(fighter: &mut L2CFighterCommon) -> L2C 0.into() } +// FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START + pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let blast_attack = VarModule::is_flag(fighter.battle_object, vars::sonic::status::SPECIAL_N_BLAST_ATTACK); let ret = diff --git a/fighters/kirby/src/status/special_hi_h.rs b/fighters/kirby/src/status/special_hi_h.rs index 16b7bdf083..a1d77d847a 100644 --- a/fighters/kirby/src/status/special_hi_h.rs +++ b/fighters/kirby/src/status/special_hi_h.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// statuses::kirby::SPECIAL_HI_H unsafe extern "C" fn special_hi_h_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/koopa/src/status/attack_s4_hold.rs b/fighters/koopa/src/status/attack_s4_hold.rs index 53d93752fd..5d0fd55890 100644 --- a/fighters/koopa/src/status/attack_s4_hold.rs +++ b/fighters/koopa/src/status/attack_s4_hold.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_S4_HOLD diff --git a/fighters/koopa/src/status/special_hi.rs b/fighters/koopa/src/status/special_hi.rs index 8d5310840d..4518ed5935 100644 --- a/fighters/koopa/src/status/special_hi.rs +++ b/fighters/koopa/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A diff --git a/fighters/koopa/src/status/special_n.rs b/fighters/koopa/src/status/special_n.rs index cdb068f060..85c8f4da3c 100644 --- a/fighters/koopa/src/status/special_n.rs +++ b/fighters/koopa/src/status/special_n.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { let can_fireball = VarModule::get_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME) <= 0; diff --git a/fighters/koopa/src/status/special_s.rs b/fighters/koopa/src/status/special_s.rs index 1b5b5ddd46..4548c5a710 100644 --- a/fighters/koopa/src/status/special_s.rs +++ b/fighters/koopa/src/status/special_s.rs @@ -1,6 +1,6 @@ use super::*; -use globals::*; +// FIGHTER_KOOPA_STATUS_KIND_SPECIAL_S pub const SPECIAL_S_KIND_F: i32 = 1; pub const SPECIAL_S_KIND_B: i32 = 2; diff --git a/fighters/koopajr/src/status/special_hi_escape.rs b/fighters/koopajr/src/status/special_hi_escape.rs index 9e38ed072e..104d76b9bd 100644 --- a/fighters/koopajr/src/status/special_hi_escape.rs +++ b/fighters/koopajr/src/status/special_hi_escape.rs @@ -2,11 +2,11 @@ use super::*; // FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE -pub unsafe extern "C" fn pre_special_hi_escape(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_escape_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_STATUS_KIND_ESCAPE_AIR); return 1.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, pre_special_hi_escape); + agent.status(Pre, *FIGHTER_KOOPAJR_STATUS_KIND_SPECIAL_HI_ESCAPE, special_hi_escape_pre); } \ No newline at end of file diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index e3a61a8cab..b8ba5d1a42 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -1,6 +1,8 @@ use super::*; use std::convert::TryInto; +// FIGHTER_KROOL_STATUS_KIND_SPECIAL_HI_START + unsafe extern "C" fn special_hi_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, false, -1); ArticleModule::change_status(fighter.module_accessor, *FIGHTER_KROOL_GENERATE_ARTICLE_BACKPACK, *WEAPON_KROOL_BACKPACK_STATUS_KIND_START, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); diff --git a/fighters/krool/src/status/special_lw.rs b/fighters/krool/src/status/special_lw.rs index 150f3d423f..78910dd0f8 100644 --- a/fighters/krool/src/status/special_lw.rs +++ b/fighters/krool/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main_old(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.change_status(statuses::krool::SPECIAL_LW_GUT.into(), true.into()); diff --git a/fighters/littlemac/src/status/special_lw.rs b/fighters/littlemac/src/status/special_lw.rs index 0026a53259..3948cfed13 100644 --- a/fighters/littlemac/src/status/special_lw.rs +++ b/fighters/littlemac/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_old_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::set_status_kind_interrupt(fighter.module_accessor, *FIGHTER_LITTLEMAC_STATUS_KIND_SPECIAL_N_START); return 1.into() diff --git a/fighters/littlemac/src/status/special_lw_cancel.rs b/fighters/littlemac/src/status/special_lw_cancel.rs index ba69614dbd..adbae515d2 100644 --- a/fighters/littlemac/src/status/special_lw_cancel.rs +++ b/fighters/littlemac/src/status/special_lw_cancel.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::littlemac::SPECIAL_LW_CANCEL + unsafe extern "C" fn special_lw_cancel_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/littlemac/src/status/special_n.rs b/fighters/littlemac/src/status/special_n.rs index 86ec813fd8..60004880f7 100644 --- a/fighters/littlemac/src/status/special_n.rs +++ b/fighters/littlemac/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { sv_kinetic_energy!(reset_energy, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, ENERGY_MOTION_RESET_TYPE_GROUND_TRANS, 0.0, 0.0, 0.0, 0.0, 0.0); diff --git a/fighters/lucario/src/status/attack_air.rs b/fighters/lucario/src/status/attack_air.rs index 352e6ba9ef..17dcfa4c60 100644 --- a/fighters/lucario/src/status/attack_air.rs +++ b/fighters/lucario/src/status/attack_air.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_AIR + pub unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { // if under USpecial penalty and next status would have been landing, use special landing instead let next_status = fighter.global_table[STATUS_KIND].get_i32(); diff --git a/fighters/lucario/src/status/attack_hi4.rs b/fighters/lucario/src/status/attack_hi4.rs index a75043930a..58104e0f16 100644 --- a/fighters/lucario/src/status/attack_hi4.rs +++ b/fighters/lucario/src/status/attack_hi4.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_HI4 + pub unsafe extern "C" fn attack_hi4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/lucario/src/status/special_lw.rs b/fighters/lucario/src/status/special_lw.rs index 42ecca05c9..5acdd280b3 100644 --- a/fighters/lucario/src/status/special_lw.rs +++ b/fighters/lucario/src/status/special_lw.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn lucario_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -29,7 +31,7 @@ unsafe extern "C" fn lucario_special_lw_pre(fighter: &mut L2CFighterCommon) -> L return 0.into(); } -unsafe extern "C" fn lucario_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_lw") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_lw") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); @@ -37,14 +39,14 @@ unsafe extern "C" fn lucario_special_lw_main(fighter: &mut L2CFighterCommon) -> if !fighter.is_situation(*SITUATION_KIND_GROUND) { VarModule::on_flag(fighter.object(), vars::lucario::instance::DISABLE_SPECIAL_LW); } - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_lw_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_init(fighter: &mut L2CFighterCommon) -> L2CValue { 0.into() } -unsafe extern "C" fn lucario_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { special_lw_set_kinetic(fighter); @@ -134,7 +136,7 @@ unsafe extern "C" fn special_lw_set_kinetic(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_main); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, lucario_special_lw_init); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_init); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index ff07229bb2..af8f0dfeff 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -2,13 +2,13 @@ use super::*; // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT -pub unsafe extern "C" fn lucario_special_n_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP); smashline::original_status(Pre, fighter, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT)(fighter) } -unsafe extern "C" fn lucario_special_n_shoot_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_shoot_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } @@ -113,7 +113,7 @@ unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_LUCARIO_AURABALL_TRANSITION_TERM_ID_START_HOLD); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_LUCARIO_AURABALL_TRANSITION_TERM_ID_START_SHOOT); } - lucario_special_n_joint_translate(fighter); + special_n_joint_translate(fighter); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); fighter.sub_shift_status_main(L2CValue::Ptr(special_n_main_loop as *const () as _)) } @@ -157,11 +157,11 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } unsafe extern "C" fn special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); + special_n_save_charge_status(fighter); 0.into() } -pub unsafe extern "C" fn lucario_special_n_joint_translate(fighter: &mut L2CFighterCommon) { +pub unsafe extern "C" fn special_n_joint_translate(fighter: &mut L2CFighterCommon) { let havel = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; let haver = &mut Vector3f{x: 0.0, y: 0.0, z: 0.0}; ModelModule::joint_global_position( @@ -189,7 +189,7 @@ pub unsafe extern "C" fn lucario_special_n_joint_translate(fighter: &mut L2CFigh // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD -unsafe extern "C" fn lucario_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_hold") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); @@ -213,10 +213,10 @@ unsafe extern "C" fn lucario_special_n_hold_main(fighter: &mut L2CFighterCommon) MotionModule::set_rate(fighter.module_accessor, rate); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_n_hold_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_hold_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) && StatusModule::is_situation_changed(fighter.module_accessor) { special_n_set_kinetic(fighter); @@ -245,23 +245,23 @@ unsafe extern "C" fn lucario_special_n_hold_main_loop(fighter: &mut L2CFighterCo 0.into() } -unsafe extern "C" fn lucario_special_n_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } // FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX -unsafe extern "C" fn lucario_special_n_max_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_FLAG_MOT_INHERIT); WorkModule::set_int64(fighter.module_accessor, hash40("special_n_max") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_GROUND_MOT); WorkModule::set_int64(fighter.module_accessor, hash40("special_air_n_max") as i64, *FIGHTER_LUCARIO_INSTANCE_WORK_ID_INT_AIR_MOT); special_n_set_kinetic(fighter); ControlModule::set_add_jump_mini_button_life(fighter.module_accessor, 8); - fighter.sub_shift_status_main(L2CValue::Ptr(lucario_special_n_max_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_n_max_main_loop as *const () as _)) } -unsafe extern "C" fn lucario_special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_max_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !StatusModule::is_changing(fighter.module_accessor) && StatusModule::is_situation_changed(fighter.module_accessor) { special_n_set_kinetic(fighter); @@ -285,8 +285,8 @@ unsafe extern "C" fn lucario_special_n_max_main_loop(fighter: &mut L2CFighterCom 0.into() } -unsafe extern "C" fn lucario_special_n_max_end(fighter: &mut L2CFighterCommon) -> L2CValue { - lucario_special_n_save_charge_status(fighter); +unsafe extern "C" fn special_n_max_end(fighter: &mut L2CFighterCommon) -> L2CValue { + special_n_save_charge_status(fighter); 0.into() } @@ -411,7 +411,7 @@ unsafe extern "C" fn special_n_set_kinetic(fighter: &mut L2CFighterCommon) { } } -pub unsafe extern "C" fn lucario_special_n_save_charge_status(fighter: &mut L2CFighterCommon) { +pub unsafe extern "C" fn special_n_save_charge_status(fighter: &mut L2CFighterCommon) { let curr_status = StatusModule::status_kind(fighter.module_accessor); let next_status = fighter.global_table[STATUS_KIND].get_i32(); let is_kirby = fighter.global_table[FIGHTER_KIND].get_i32() == *FIGHTER_KIND_KIRBY; @@ -457,12 +457,12 @@ pub unsafe extern "C" fn lucario_special_n_save_charge_status(fighter: &mut L2CF pub fn install(agent: &mut Agent) { agent.status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, auraball_shoot_pre); - agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_pre); - agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, lucario_special_n_shoot_end); + agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_pre); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_end); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_end); - agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_main); - agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, lucario_special_n_hold_end); - agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_main); - agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, lucario_special_n_max_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_end); + agent.status(Main, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, special_n_max_main); + agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_MAX, special_n_max_end); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_s.rs b/fighters/lucario/src/status/special_s.rs index e73485f5cb..010f51a614 100644 --- a/fighters/lucario/src/status/special_s.rs +++ b/fighters/lucario/src/status/special_s.rs @@ -1,6 +1,6 @@ use super::*; -// FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW // +// FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_S_THROW unsafe extern "C" fn special_s_throw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( diff --git a/fighters/lucas/src/status/attack_air.rs b/fighters/lucas/src/status/attack_air.rs index 7759657264..cefe98acf2 100644 --- a/fighters/lucas/src/status/attack_air.rs +++ b/fighters/lucas/src/status/attack_air.rs @@ -2,10 +2,10 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_AIR -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::attack_air_main_status(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/lucas/src/status/attack_lw4.rs b/fighters/lucas/src/status/attack_lw4.rs index 80518a07c4..e1725b8db9 100644 --- a/fighters/lucas/src/status/attack_lw4.rs +++ b/fighters/lucas/src/status/attack_lw4.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_LW4 -pub unsafe extern "C" fn attack_lw4(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackLw4_common(); fighter.main_shift(status_attacklw4_main_param) } @@ -31,5 +31,5 @@ unsafe extern "C" fn status_attacklw4_main_param(fighter: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); } \ No newline at end of file diff --git a/fighters/lucas/src/status/special_hi.rs b/fighters/lucas/src/status/special_hi.rs index 0768d007ec..11b6564c0a 100644 --- a/fighters/lucas/src/status/special_hi.rs +++ b/fighters/lucas/src/status/special_hi.rs @@ -1,6 +1,6 @@ use super::*; -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD // +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { if LinkModule::is_link(fighter.module_accessor, *FIGHTER_LUCAS_LINK_NO_PK_THUNDER) { @@ -16,9 +16,9 @@ unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK // +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END -pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK | *FIGHTER_LOG_MASK_FLAG_SHOOT) as u64; StatusModule::init_settings( fighter.module_accessor, @@ -47,7 +47,9 @@ pub unsafe extern "C" fn pre_specialhi_end(fighter: &mut L2CFighterCommon) -> L2 0.into() } -pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_HI + +pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; StatusModule::init_settings( fighter.module_accessor, @@ -76,7 +78,9 @@ pub unsafe extern "C" fn pre_specialhi(fighter: &mut L2CFighterCommon) -> L2CVal 0.into() } -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK + +pub unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_HI_FLAG_WALL_BRAKE); MotionModule::change_motion( fighter.module_accessor, @@ -93,7 +97,7 @@ pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2 } fighter.global_table[SUB_STATUS] .assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) + fighter.main_shift(special_hi_attack_main_loop) } unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -119,7 +123,7 @@ unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -187,7 +191,7 @@ unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L pub fn install(agent: &mut Agent) { agent.status(End, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); - agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, pre_specialhi_end); - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_specialhi); - agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack); + agent.status(Pre, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_END, special_hi_end_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack_main); } \ No newline at end of file diff --git a/fighters/lucas/src/status/special_n.rs b/fighters/lucas/src/status/special_n.rs index b35dd616c5..1f6876a835 100644 --- a/fighters/lucas/src/status/special_n.rs +++ b/fighters/lucas/src/status/special_n.rs @@ -1,8 +1,8 @@ use super::*; -// SPECIAL N +// SFIGHTER_STATUS_KIND_SPECIAL_N -unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ if VarModule::is_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { fighter.change_status(FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_FIRE.into(), false.into()); return 0.into(); @@ -12,9 +12,9 @@ unsafe extern "C" fn lucas_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV } } -// SPECIAL N HOLD +// FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD -unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N STATUS MAIN CODE // // @@ -25,20 +25,20 @@ unsafe extern "C" fn lucas_special_n_hold_main(fighter: &mut L2CFighterCommon) - // fighter.off_flag(*FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE); // if !StopModule::is_stop(fighter.module_accessor) { - // lucas_special_n_hold_main_sub_status(fighter, false.into()); + // special_n_hold_main_sub_status(fighter, false.into()); // } - // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - // fighter.main_shift(lucas_special_n_hold_main_loop) + // fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + // fighter.main_shift(special_n_hold_main_loop) if !StopModule::is_stop(fighter.module_accessor) { - lucas_special_n_hold_main_sub_status(fighter, false.into()); + special_n_hold_main_sub_status(fighter, false.into()); } MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n_hold"), 0.0, 1.0, false, 0.0, false, false); - fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( lucas_special_n_hold_main_sub_status as *const () as _)); - fighter.main_shift(lucas_special_n_hold_main_loop) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr( special_n_hold_main_sub_status as *const () as _)); + fighter.main_shift(special_n_hold_main_loop) } -unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { +unsafe fn special_n_check_explosion(fighter: &mut L2CFighterCommon) { // // OLD PK FREEZE EXPLOSION CODE // // @@ -70,12 +70,12 @@ unsafe fn lucas_special_n_check_explosion(fighter: &mut L2CFighterCommon) { // } } -unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_sub_status(fighter: &mut L2CFighterCommon, arg: L2CValue) -> L2CValue { // // OLD SPECIAL N SUBSTATUS CODE // // // if arg.get_bool() { - // lucas_special_n_check_explosion(fighter); + // special_n_check_explosion(fighter); // } // if !fighter.is_situation(*SITUATION_KIND_GROUND) { // if !arg.get_bool() { @@ -102,7 +102,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_sub_status(fighter: &mut L2CFight 0.into() } -unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_hold_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // // OLD SPECIAL N MAIN LOOP STATUS SCRIPT CODE // // @@ -116,7 +116,7 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm // let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); // if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // // else block - // lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + // special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, // *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), // Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); // } @@ -145,14 +145,14 @@ unsafe extern "C" fn lucas_special_n_hold_main_loop(fighter: &mut L2CFighterComm let wait_mtrans_kind = fighter.get_int(*FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND); if StatusModule::is_changing(fighter.module_accessor) || fighter.is_situation(wait_mtrans_kind) { // else block - lucas_special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, + special_n_hold_transition_g2a_kind(fighter, *FIGHTER_LUCAS_STATUS_SPECIAL_N_WORK_INT_WAIT_MTRANS_KIND, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_MOT_CHANGE, *FIGHTER_KINETIC_TYPE_GROUND_STOP, *FIGHTER_KINETIC_TYPE_LUCAS_AIR_STOP_SPECIAL_N, Hash40::new("special_n_hold"), Hash40::new("special_air_n_hold"), *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP_ATTACK); } 1.into() } -unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( +unsafe extern "C" fn special_n_hold_transition_g2a_kind( fighter: &mut L2CFighterCommon, mtrans_kind_work_id: i32, flag_work_id: i32, @@ -185,6 +185,6 @@ unsafe extern "C" fn lucas_special_n_hold_transition_g2a_kind( } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, lucas_special_n_pre); - agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, lucas_special_n_hold_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_LUCAS_STATUS_KIND_SPECIAL_N_HOLD, special_n_hold_main); } \ No newline at end of file diff --git a/fighters/lucina/src/status/special_s.rs b/fighters/lucina/src/status/special_s.rs index 9a4f0d91c3..a453a500b1 100644 --- a/fighters/lucina/src/status/special_s.rs +++ b/fighters/lucina/src/status/special_s.rs @@ -5,7 +5,9 @@ pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGrav *(energy as *mut i32).add(0x50 / 4) = frames; *(energy as *mut bool).add(0x5C) = false; } - } +} + +// FIGHTER_STATUS_KIND_SPECIAL_S pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); diff --git a/fighters/luigi/src/status/special_n.rs b/fighters/luigi/src/status/special_n.rs index e03f5b6344..1fae290ad1 100644 --- a/fighters/luigi/src/status/special_n.rs +++ b/fighters/luigi/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { GroundModule::correct(fighter.module_accessor, smash::app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); diff --git a/fighters/luigi/src/status/special_s.rs b/fighters/luigi/src/status/special_s.rs index eaa7ab6b3a..7c2e9d72ca 100644 --- a/fighters/luigi/src/status/special_s.rs +++ b/fighters/luigi/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE + unsafe extern "C" fn special_s_charge_init(fighter: &mut L2CFighterCommon) -> L2CValue { if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_LUIGI_INSTANCE_WORK_ID_FLAG_SPECIAL_S_CHARGE_MELEE_NO_RANDOM) { let should_do_effect = if VarModule::is_flag(fighter.battle_object, vars::luigi::instance::IS_MISFIRE_STORED) { diff --git a/fighters/mario/src/status/rebirth.rs b/fighters/mario/src/status/rebirth.rs index 3f9cac1aa9..04567a2fbf 100644 --- a/fighters/mario/src/status/rebirth.rs +++ b/fighters/mario/src/status/rebirth.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_REBIRTH -unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -12,5 +12,5 @@ unsafe extern "C" fn mario_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVal } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, mario_rebirth_end); + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/mariod/src/status/rebirth.rs b/fighters/mariod/src/status/rebirth.rs index 31804d04a2..c93bf3e5ed 100644 --- a/fighters/mariod/src/status/rebirth.rs +++ b/fighters/mariod/src/status/rebirth.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_REBIRTH + unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); diff --git a/fighters/marth/src/status/special_s.rs b/fighters/marth/src/status/special_s.rs index 4c21abf866..0a85168a51 100644 --- a/fighters/marth/src/status/special_s.rs +++ b/fighters/marth/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_S + pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { unsafe { *(energy as *mut i32).add(0x50 / 4) = frames; diff --git a/fighters/metaknight/src/status/attack_100.rs b/fighters/metaknight/src/status/attack_100.rs index d32a1abc01..206b2bccd9 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -2,12 +2,12 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_100 -unsafe extern "C" fn metaknight_attack100_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack100_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_Attack100_common(); - fighter.sub_shift_status_main(L2CValue::Ptr(metaknight_attack100_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack100_main_loop as *const () as _)) } -unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack100_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 0.into(); @@ -88,5 +88,5 @@ unsafe extern "C" fn metaknight_attack100_main_loop(fighter: &mut L2CFighterComm } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, metaknight_attack100_main); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_100, attack100_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/attack_air.rs b/fighters/mewtwo/src/status/attack_air.rs index ac74254b5f..bc544b603e 100644 --- a/fighters/mewtwo/src/status/attack_air.rs +++ b/fighters/mewtwo/src/status/attack_air.rs @@ -8,6 +8,8 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::mewtwo::FLOAT.into()) } diff --git a/fighters/mewtwo/src/status/fall.rs b/fighters/mewtwo/src/status/fall.rs index 81f86afd6a..26f26d2754 100644 --- a/fighters/mewtwo/src/status/fall.rs +++ b/fighters/mewtwo/src/status/fall.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn mewtwo_fall_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_FALL + +unsafe extern "C" fn fall_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND].get_i32() == statuses::mewtwo::FLOAT && fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_SPECIAL_S && fighter.global_table[CURRENT_FRAME].get_i32() <= 10 { @@ -10,5 +12,5 @@ unsafe extern "C" fn mewtwo_fall_end(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_FALL, mewtwo_fall_end); + agent.status(End, *FIGHTER_STATUS_KIND_FALL, fall_end); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/float.rs b/fighters/mewtwo/src/status/float.rs index bdabc3bf4a..921cc30c94 100644 --- a/fighters/mewtwo/src/status/float.rs +++ b/fighters/mewtwo/src/status/float.rs @@ -1,5 +1,7 @@ use super::*; +// statuses::mewtwo::FLOAT + extern "Rust" { #[link_name = "float_pre_common"] fn float_pre_common(fighter: &mut L2CFighterCommon) -> L2CValue; diff --git a/fighters/mewtwo/src/status/jump_aerial.rs b/fighters/mewtwo/src/status/jump_aerial.rs index e7ae736947..6d348325ea 100644 --- a/fighters/mewtwo/src/status/jump_aerial.rs +++ b/fighters/mewtwo/src/status/jump_aerial.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn mewtwo_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_JUMP_AERIAL + +unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::common::instance::IS_FLOAT); MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); fighter.status_JumpAerial(); @@ -8,5 +10,5 @@ unsafe extern "C" fn mewtwo_jump_aerial_main(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, mewtwo_jump_aerial_main); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } \ No newline at end of file diff --git a/fighters/mewtwo/src/status/special_n.rs b/fighters/mewtwo/src/status/special_n.rs index 6c98e6fb91..d126899d5d 100644 --- a/fighters/mewtwo/src/status/special_n.rs +++ b/fighters/mewtwo/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_MEWTWO_STATUS_KIND_SPECIAL_N_CANCEL + unsafe extern "C" fn special_n_cancel_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); diff --git a/fighters/miiswordsman/src/status/final_hold.rs b/fighters/miiswordsman/src/status/final_hold.rs index 832be7c760..a86880d888 100644 --- a/fighters/miiswordsman/src/status/final_hold.rs +++ b/fighters/miiswordsman/src/status/final_hold.rs @@ -2,11 +2,11 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD -unsafe extern "C" fn pre_final_hold(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn final_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::WAVE_SPECIAL_N); smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, pre_final_hold); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_FINAL_HOLD, final_hold_pre); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi.rs b/fighters/miiswordsman/src/status/special_hi.rs index 7e60938ce0..fcccb59d90 100644 --- a/fighters/miiswordsman/src/status/special_hi.rs +++ b/fighters/miiswordsman/src/status/special_hi.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_HI -unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -31,5 +31,5 @@ unsafe extern "C" fn pre_special_hi(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, pre_special_hi); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_HI, special_hi_pre); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi2.rs b/fighters/miiswordsman/src/status/special_hi2.rs index 46deecb937..e5130fccb8 100644 --- a/fighters/miiswordsman/src/status/special_hi2.rs +++ b/fighters/miiswordsman/src/status/special_hi2.rs @@ -2,14 +2,14 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH -unsafe extern "C" fn pre_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi2_rush_pre(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH)(fighter) } // not running for some reason -unsafe extern "C" fn exec_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi2_rush_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if AttackModule::is_infliction_status(fighter.module_accessor, *COLLISION_KIND_MASK_HIT) { VarModule::on_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT); //println!("SSD Hit"); @@ -20,7 +20,7 @@ unsafe extern "C" fn exec_special_hi2_rush(fighter: &mut L2CFighterCommon) -> L2 // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END // not running for some reason -unsafe extern "C" fn exec_special_hi2_rush_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi2_rush_end_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::miiswordsman::instance::SKYWARD_SLASH_DASH_HIT) && !VarModule::is_flag(fighter.battle_object, vars::common::instance::IS_HEAVY_ATTACK) && fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { //println!("SSD Success"); if MotionModule::frame(fighter.module_accessor) >= 30.0 { @@ -46,9 +46,9 @@ pub unsafe extern "C" fn special_hi2_bound_end(fighter: &mut L2CFighterCommon) - } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, pre_special_hi2_rush); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, exec_special_hi2_rush); - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, exec_special_hi2_rush_end); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, special_hi2_rush_pre); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH, special_hi2_rush_exec); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_RUSH_END, special_hi2_rush_end_exec); agent.status(End, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI2_BOUND, special_hi2_bound_end); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_hi3.rs b/fighters/miiswordsman/src/status/special_hi3.rs index 6e9bbd8c6a..addccc5ef7 100644 --- a/fighters/miiswordsman/src/status/special_hi3.rs +++ b/fighters/miiswordsman/src/status/special_hi3.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD -pub unsafe extern "C" fn exec_special_hi3_hold(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi3_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_x = fighter.global_table[STICK_X].get_f32(); let mut motion_value = 0.28; @@ -16,7 +16,7 @@ pub unsafe extern "C" fn exec_special_hi3_hold(fighter: &mut L2CFighterCommon) - // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END -pub unsafe extern "C" fn pre_special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi3_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let mask_flag = (*FIGHTER_LOG_MASK_FLAG_ATTACK_KIND_SPECIAL_HI | *FIGHTER_LOG_MASK_FLAG_ACTION_CATEGORY_ATTACK) as u64; StatusModule::init_settings( fighter.module_accessor, @@ -45,13 +45,13 @@ pub unsafe extern "C" fn pre_special_hi3_end(fighter: &mut L2CFighterCommon) -> 0.into() } -unsafe extern "C" fn special_hi3_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi3_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_FALL_SPECIAL); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_WAIT); - fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_Main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_hi3_end_main_loop as *const () as _)) } -unsafe extern "C" fn special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi3_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let stick_x = fighter.global_table[STICK_X].get_f32(); let frame = MotionModule::frame(fighter.module_accessor); let mut motion_value = 0.7; @@ -165,8 +165,8 @@ unsafe extern "C" fn sub_special_hi3_end_Main(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, exec_special_hi3_hold); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_HOLD, special_hi3_hold_exec); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, pre_special_hi3_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_HI3_END, special_hi3_end_main); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw.rs b/fighters/miiswordsman/src/status/special_lw.rs index f1286c81ee..bf2da38094 100644 --- a/fighters/miiswordsman/src/status/special_lw.rs +++ b/fighters/miiswordsman/src/status/special_lw.rs @@ -2,7 +2,7 @@ use super::*; //FIGHTER_STATUS_KIND_SPECIAL_LW -unsafe extern "C" fn special_lw(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { let lua_state = fighter.lua_state_agent; WorkModule::off_flag(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_FLAG_CONTINUE_MOT); main_setup(fighter); @@ -149,5 +149,5 @@ unsafe extern "C" fn counter_setup(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw1.rs b/fighters/miiswordsman/src/status/special_lw1.rs index 29d7d5cb75..647cd794e8 100644 --- a/fighters/miiswordsman/src/status/special_lw1.rs +++ b/fighters/miiswordsman/src/status/special_lw1.rs @@ -2,7 +2,7 @@ use super::*; //FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT -unsafe extern "C" fn miiswordsman_speciallw1hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw1_hit_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::status_kind(fighter.module_accessor) != *FIGHTER_STATUS_KIND_SPECIAL_LW { if StatusModule::situation_kind(fighter.module_accessor) == WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_COUNTER_WORK_INT_SITUATION_PREV) { return L2CValue::I32(0) @@ -77,5 +77,5 @@ unsafe extern "C" fn miiswordsman_speciallw1hit_main(fighter: &mut L2CFighterCom } pub fn install(agent: &mut Agent) { - agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, miiswordsman_speciallw1hit_main); + agent.status(Exec, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW1_HIT, special_lw1_hit_main); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_lw3.rs b/fighters/miiswordsman/src/status/special_lw3.rs index 392638acb9..21b7fd1ef7 100644 --- a/fighters/miiswordsman/src/status/special_lw3.rs +++ b/fighters/miiswordsman/src/status/special_lw3.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END -unsafe extern "C" fn special_lw3_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw3_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) != *SITUATION_KIND_GROUND { if WorkModule::get_int(fighter.module_accessor,*FIGHTER_MIISWORDSMAN_STATUS_WORK_ID_INT_JET_STUB_START_SITUATION) == *SITUATION_KIND_GROUND { if fighter.global_table[0x16].get_i32() == *SITUATION_KIND_AIR { @@ -145,5 +145,5 @@ unsafe extern "C" fn some6(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_LW3_END, special_lw3_end_main); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s1.rs b/fighters/miiswordsman/src/status/special_s1.rs index 5396e632e2..70b1c23f45 100644 --- a/fighters/miiswordsman/src/status/special_s1.rs +++ b/fighters/miiswordsman/src/status/special_s1.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK -unsafe extern "C" fn pre_special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let force_air = Vector2f {x: 0.0, y: 10.0}; PostureModule::add_pos_2d(fighter.module_accessor, &force_air); @@ -37,7 +37,7 @@ unsafe fn miiswordsman_specials_main(fighter: &mut L2CFighterCommon) -> L2CValue } */ -unsafe extern "C" fn miiswordsman_specials1_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_main(fighter: &mut L2CFighterCommon) -> L2CValue { if MotionModule::is_end(fighter.module_accessor) == true { fighter.change_status(FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK.into(), false.into()); return L2CValue::I32(1); @@ -53,7 +53,7 @@ unsafe extern "C" fn miiswordsman_specials1_main(fighter: &mut L2CFighterCommon) L2CValue::I32(0) } -unsafe extern "C" fn special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { let id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::on_flag(fighter.object(), vars::common::instance::SIDE_SPECIAL_CANCEL_NO_HIT); // Removes on side special attack if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { @@ -110,10 +110,10 @@ unsafe extern "C" fn special_s1_attack(fighter: &mut L2CFighterCommon) -> L2CVal app::sv_kinetic_energy::set_accel(fighter.lua_state_agent); // But HERE's what we (probably) want - fighter.sub_shift_status_main(L2CValue::Ptr(miiswordsman_specials1attack_mainloop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_attack_main_loop as *const () as _)) } -unsafe extern "C" fn miiswordsman_specials1attack_mainloop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // custom [ // drift at apex of flip if MotionModule::frame(fighter.module_accessor) > 7.0 && MotionModule::frame(fighter.module_accessor) < 32.0 { @@ -180,7 +180,7 @@ unsafe extern "C" fn miiswordsman_specials1attack_mainloop(fighter: &mut L2CFigh // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END -pub unsafe extern "C" fn pre_special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s1_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -208,17 +208,17 @@ pub unsafe extern "C" fn pre_special_s1_end(fighter: &mut L2CFighterCommon) -> L 0.into() } -unsafe extern "C" fn special_s1_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s1_end"), 0.0, 1.0, false, 0.0, false, false); } else { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s1_end"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_Main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s1_end_main_loop as *const () as _)) } -unsafe extern "C" fn special_s1_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s1_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if !fighter.sub_transition_group_check_air_cliff().get_bool() { if !CancelModule::is_enable_cancel(fighter.module_accessor) || (CancelModule::is_enable_cancel(fighter.module_accessor) && !fighter.sub_wait_ground_check_common(L2CValue::Bool(false)).get_bool() && !fighter.sub_air_check_fall_common().get_bool()) { if !MotionModule::is_end(fighter.module_accessor) { @@ -290,9 +290,9 @@ unsafe extern "C" fn special_s1_end_Main(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, pre_special_s1_attack); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_ATTACK, special_s1_attack_main); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, pre_special_s1_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S1_END, special_s1_end_main); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/status/special_s2.rs b/fighters/miiswordsman/src/status/special_s2.rs index ed6ae76ac3..bce50366fb 100644 --- a/fighters/miiswordsman/src/status/special_s2.rs +++ b/fighters/miiswordsman/src/status/special_s2.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH -unsafe extern "C" fn special_s2_dash(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); @@ -11,7 +11,7 @@ unsafe extern "C" fn special_s2_dash(fighter: &mut L2CFighterCommon) -> L2CValue // WorkModule::dec_int(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); // } fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(special_s2_dash_dec_int as *const () as _)); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_dash_main_loop as *const () as _)) } unsafe extern "C" fn special_s2_dash_mot_change(fighter: &mut L2CFighterCommon) { @@ -60,7 +60,7 @@ unsafe extern "C" fn special_s2_dash_unk(fighter: &mut L2CFighterCommon) -> L2CV return val.into() } -unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_dash_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let mut sub_check = fighter.sub_transition_group_check_air_cliff().get_bool(); if sub_check { return 0.into(); @@ -121,12 +121,12 @@ unsafe extern "C" fn special_s2_dash_main(fighter: &mut L2CFighterCommon) -> L2C // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK -unsafe extern "C" fn special_s2_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); let s2_dash_frame = WorkModule::get_param_int(fighter.module_accessor, hash40("param_special_s"), hash40("s2_dash_frame")); WorkModule::set_int(fighter.module_accessor, s2_dash_frame, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_WORK_INT_DASH_COUNT); special_s2_attack_mot_change(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_attack_main_loop as *const () as _)) } unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon) { @@ -152,7 +152,7 @@ unsafe extern "C" fn special_s2_attack_mot_change(fighter: &mut L2CFighterCommon } } -unsafe extern "C" fn special_s2_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 0.into(); } @@ -214,18 +214,18 @@ unsafe extern "C" fn special_s2_attack_main_helper(fighter: &mut L2CFighterCommo // FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END -unsafe extern "C" fn pre_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(fighter.battle_object, vars::miiswordsman::status::GALE_STAB_EDGE_CANCEL); smashline::original_status(Pre, fighter, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END)(fighter) } -unsafe extern "C" fn special_s2_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::off_flag(fighter.module_accessor, *FIGHTER_MIISWORDSMAN_STATUS_SHIPPU_SLASH_FLAG_CONTINUE_MOT); special_s2_end_helper(fighter); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_Main as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s2_end_main_loop as *const () as _)) } -unsafe extern "C" fn special_s2_end_Main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s2_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 0.into() } @@ -354,10 +354,10 @@ unsafe extern "C" fn sub_special_s2_end(fighter: &mut L2CFighterCommon) -> L2CVa } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_DASH, special_s2_dash_main); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_ATTACK, special_s2_attack_main); - agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, pre_special_s2_end); - agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end); + agent.status(Pre, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end_pre); + agent.status(Main, *FIGHTER_MIISWORDSMAN_STATUS_KIND_SPECIAL_S2_END, special_s2_end_main); } \ No newline at end of file diff --git a/fighters/murabito/src/status/attack_air.rs b/fighters/murabito/src/status/attack_air.rs index 47bc969f33..852c088515 100644 --- a/fighters/murabito/src/status/attack_air.rs +++ b/fighters/murabito/src/status/attack_air.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_AIR -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); let motion = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); if [hash40("attack_air_hi")].contains(&motion) { @@ -36,5 +36,5 @@ pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/murabito/src/status/jump.rs b/fighters/murabito/src/status/jump.rs index 2d82b30146..0409d81633 100644 --- a/fighters/murabito/src/status/jump.rs +++ b/fighters/murabito/src/status/jump.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_JUMP -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { if !fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { @@ -29,7 +29,7 @@ pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { return L2CValue::I32(0); } -pub unsafe extern "C" fn jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_MURABITO_STATUS_KIND_SPECIAL_S_RIDE_LOOP { fighter.sub_jump_item_rocketbelt(); fighter.status_Jump_sub(L2CValue::Hash40s("invalid"), L2CValue::F32(0.0)); @@ -45,6 +45,6 @@ pub unsafe extern "C" fn jump(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); - agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP, jump_main); } \ No newline at end of file diff --git a/fighters/murabito/src/status/special_s.rs b/fighters/murabito/src/status/special_s.rs index bfd8a41ce1..f8dbe4dd03 100644 --- a/fighters/murabito/src/status/special_s.rs +++ b/fighters/murabito/src/status/special_s.rs @@ -1,12 +1,12 @@ use super::*; -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::murabito::instance::DISABLE_SPECIAL_S); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } \ No newline at end of file diff --git a/fighters/ness/src/status/attack_air.rs b/fighters/ness/src/status/attack_air.rs index 31f24d518e..cefe98acf2 100644 --- a/fighters/ness/src/status/attack_air.rs +++ b/fighters/ness/src/status/attack_air.rs @@ -1,11 +1,11 @@ use super::*; -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR -pub unsafe extern "C" fn attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::attack_air_main_status(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } \ No newline at end of file diff --git a/fighters/ness/src/status/special_hi.rs b/fighters/ness/src/status/special_hi.rs index 816c31f750..79ba2b2a3c 100644 --- a/fighters/ness/src/status/special_hi.rs +++ b/fighters/ness/src/status/special_hi.rs @@ -1,6 +1,6 @@ use super::*; -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD // +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CValue { if LinkModule::is_link(fighter.module_accessor, *FIGHTER_NESS_LINK_NO_PK_THUNDER) { @@ -16,15 +16,15 @@ unsafe extern "C" fn special_hi_hold_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK // +// FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK -pub unsafe extern "C" fn special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_hi"), 0.0, 1.0, false, 0.0, false, false); if !StopModule::is_stop(fighter.module_accessor) { sub_special_hi_attack(fighter); } fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(sub_special_hi_attack as *const () as _)); - fighter.main_shift(special_hi_attack_main) + fighter.main_shift(special_hi_attack_main_loop) } unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -46,7 +46,7 @@ unsafe extern "C" fn sub_special_hi_attack(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } @@ -79,5 +79,5 @@ unsafe extern "C" fn special_hi_attack_main(fighter: &mut L2CFighterCommon) -> L pub fn install(agent: &mut Agent) { agent.status(End, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_HOLD, special_hi_hold_end); - agent.status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack); + agent.status(Main, *FIGHTER_NESS_STATUS_KIND_SPECIAL_HI_ATTACK, special_hi_attack_main); } \ No newline at end of file diff --git a/fighters/packun/src/status/attack_s4.rs b/fighters/packun/src/status/attack_s4.rs index 8801aeaa13..e97dec78e0 100644 --- a/fighters/packun/src/status/attack_s4.rs +++ b/fighters/packun/src/status/attack_s4.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_S4_START unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackS4Start(); @@ -12,6 +13,8 @@ unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2C fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Start_Main as *const () as _)) } +// FIGHTER_STATUS_KIND_ATTACK_S4 + unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { sub_attack_s4(fighter, true); fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4_Main as *const () as _)) @@ -23,6 +26,8 @@ unsafe extern "C" fn sub_attack_s4(fighter: &mut L2CFighterCommon, param_1: bool WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); } +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !StopModule::is_stop(fighter.module_accessor) { fighter.sub_smash_hold_uniq(false.into()); diff --git a/fighters/packun/src/status/special_hi.rs b/fighters/packun/src/status/special_hi.rs index a268ce2016..90d0989522 100644 --- a/fighters/packun/src/status/special_hi.rs +++ b/fighters/packun/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_SPECIAL_HI pub unsafe extern "C" fn special_hi_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND].get_i32() != *SITUATION_KIND_GROUND { diff --git a/fighters/packun/src/status/special_s.rs b/fighters/packun/src/status/special_s.rs index 0e79cba7c7..fbc014a7f2 100644 --- a/fighters/packun/src/status/special_s.rs +++ b/fighters/packun/src/status/special_s.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_PACKUN_STATUS_KIND_SPECIAL_S_SHOOT unsafe extern "C" fn special_s_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !(fighter.is_situation(*SITUATION_KIND_GROUND)) { diff --git a/fighters/pacman/src/status/special_s.rs b/fighters/pacman/src/status/special_s.rs index 99cecb6e15..55540d03e8 100644 --- a/fighters/pacman/src/status/special_s.rs +++ b/fighters/pacman/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PACMAN_STATUS_KIND_SPECIAL_S_DASH diff --git a/fighters/peach/src/status/attack_air.rs b/fighters/peach/src/status/attack_air.rs index 2fb490bcea..2f9efdd711 100644 --- a/fighters/peach/src/status/attack_air.rs +++ b/fighters/peach/src/status/attack_air.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_STATUS_KIND_ATTACK_AIR ::utils::import!( common::djc::{ @@ -18,7 +19,7 @@ use globals::*; // TAGS: DJC, Double Jump Cancel, Peach // Reimplemented to be similar to other djc characters because peach doesn't make the same function calls as in vanilla -unsafe extern "C" fn peach_attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START { let _ = common::djc::sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(fighter); @@ -28,19 +29,19 @@ unsafe extern "C" fn peach_attack_air_init(fighter: &mut L2CFighterCommon) -> L2 // TAGS: DJC, Double Jump Cancel, Peach -unsafe extern "C" fn peach_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { common::djc::sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec(fighter) } // TAGS: DJC, Double Jump Cancel, Peach // Reimplements the setup main script for peach's aerials to transition into double jump cancel code (if applicable) -unsafe extern "C" fn peach_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT && fighter.global_table[PREV_STATUS_KIND] != FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START { fighter.sub_attack_air_common(false.into()); MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); - return fighter.main_shift(peach_attack_air_no_float_main_loop); + return fighter.main_shift(attack_air_no_float_main_loop); } let motion_kind = MotionModule::motion_kind(fighter.module_accessor); @@ -67,10 +68,10 @@ unsafe extern "C" fn peach_attack_air_main(fighter: &mut L2CFighterCommon) -> L2 let _ = fighter.status_AttackAir_Main_common(); WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); - fighter.main_shift(peach_attack_air_main_loop) + fighter.main_shift(attack_air_main_loop) } -unsafe extern "C" fn peach_attack_air_no_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_no_float_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { // Moved above is_enable_cancel for readability concerns let can_shoot_item = WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ITEM_SHOOT_AIR); let can_attack_air = WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR); @@ -100,7 +101,7 @@ unsafe extern "C" fn peach_attack_air_no_float_main_loop(fighter: &mut L2CFighte // Default reimplementation of the main loop for an aerial // No special functionality -unsafe extern "C" fn peach_attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let motion_kind = MotionModule::motion_kind(fighter.module_accessor); let _ = fighter.status_AttackAir_Main_common(); @@ -108,7 +109,7 @@ unsafe extern "C" fn peach_attack_air_main_loop(fighter: &mut L2CFighterCommon) 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_init); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_exec); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, peach_attack_air_main); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/peach/src/status/jump_aerial.rs b/fighters/peach/src/status/jump_aerial.rs index b0064f4432..6abce36383 100644 --- a/fighters/peach/src/status/jump_aerial.rs +++ b/fighters/peach/src/status/jump_aerial.rs @@ -1,9 +1,11 @@ use super::*; +// FIGHTER_STATUS_KIND_JUMP_AERIAL + // TAGS: DJC, Double Jump Cancel, Peach // Reimplements peach's double jump to use FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION instead of FIGHTER_KINETIC_TYPE_JUMP_AERIAL -unsafe extern "C" fn peach_jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if !fighter.status_pre_JumpAerial_sub().get_bool() { StatusModule::init_settings( fighter.module_accessor, @@ -38,14 +40,14 @@ unsafe extern "C" fn peach_jump_aerial_pre(fighter: &mut L2CFighterCommon) -> L2 // TAGS: DJC, Double Jump Cancel, Peach // Reimplemented to use the double jump animation as movement -unsafe extern "C" fn peach_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::set_trans_move_speed_no_scale(fighter.module_accessor, true); fighter.sub_jump_aerial_item_rocketbelt(); fighter.status_JumpAerialSub(false.into(), false.into()); - fighter.main_shift(peach_jump_aerial_main_loop) + fighter.main_shift(jump_aerial_main_loop) } -unsafe extern "C" fn peach_jump_aerial_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn jump_aerial_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if KineticModule::get_sum_speed_y(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL); WorkModule::unable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_AERIAL_BUTTON); @@ -56,6 +58,6 @@ unsafe extern "C" fn peach_jump_aerial_main_loop(fighter: &mut L2CFighterCommon) fighter.status_JumpAerial_Main() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, peach_jump_aerial_pre); - agent.status(Main,*FIGHTER_STATUS_KIND_JUMP_AERIAL,peach_jump_aerial_main,); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); } diff --git a/fighters/peach/src/status/special_hi.rs b/fighters/peach/src/status/special_hi.rs index 1f48986cb5..d57d82045a 100644 --- a/fighters/peach/src/status/special_hi.rs +++ b/fighters/peach/src/status/special_hi.rs @@ -1,5 +1,6 @@ use super::*; -use globals::*; + +// FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END unsafe extern "C" fn special_hi_air_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { if !StopModule::is_stop(fighter.module_accessor) { @@ -18,5 +19,5 @@ unsafe extern "C" fn special_hi_substatus(fighter: &mut L2CFighterCommon, param_ } pub fn install(agent: &mut Agent) { - agent.status(Main,*FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_air_end_main); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_HI_AIR_END, special_hi_air_end_main); } diff --git a/fighters/peach/src/status/special_lw.rs b/fighters/peach/src/status/special_lw.rs index 7a0917be7c..b7651b5b6b 100644 --- a/fighters/peach/src/status/special_lw.rs +++ b/fighters/peach/src/status/special_lw.rs @@ -1,7 +1,8 @@ use super::*; -use globals::*; -unsafe extern "C" fn peach_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_SPECIAL_LW + +unsafe extern "C" fn special_lw_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -29,15 +30,15 @@ unsafe extern "C" fn peach_special_lw_pre(fighter: &mut L2CFighterCommon) -> L2C 0.into() } -unsafe extern "C" fn peach_special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.on_flag(*FIGHTER_INSTANCE_WORK_ID_FLAG_ENABLE_ITEM_NO_COUNT); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_lw"), 0.0, 1.0, false, 0.0, false, false); notify_event_msc_cmd!(fighter, Hash40::new_raw(0x20cbc92683), 1, *FIGHTER_LOG_DATA_INT_ATTACK_NUM_KIND, *FIGHTER_LOG_ATTACK_KIND_ADDITIONS_ATTACK_04 as i32 - 1 ); - fighter.sub_shift_status_main(L2CValue::Ptr(peach_special_lw_main_loop as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)); 0.into() } -unsafe extern "C" fn peach_special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) && (fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool()) { return 1.into(); } @@ -60,7 +61,7 @@ unsafe extern "C" fn peach_special_lw_main_loop(fighter: &mut L2CFighterCommon) 0.into() } -unsafe extern "C" fn peach_special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ItemModule::is_have_item(fighter.module_accessor, 0) { if fighter.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) == *ITEM_KIND_NONE { notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2508b59a2b), FIGHTER_ITEM_HOLD_KIND_HAVE); @@ -72,7 +73,7 @@ unsafe extern "C" fn peach_special_lw_end(fighter: &mut L2CFighterCommon) -> L2C 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_main); - agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, peach_special_lw_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); + agent.status(End, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_end); } diff --git a/fighters/peach/src/status/special_s.rs b/fighters/peach/src/status/special_s.rs index 4faf6473b0..ebcd0edd28 100644 --- a/fighters/peach/src/status/special_s.rs +++ b/fighters/peach/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP @@ -9,5 +8,5 @@ unsafe extern "C" fn special_s_jump_main(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Main,*FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP,special_s_jump_main,); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_SPECIAL_S_JUMP, special_s_jump_main); } diff --git a/fighters/peach/src/status/uniq_float.rs b/fighters/peach/src/status/uniq_float.rs index dd65f2b368..22f6edaa05 100644 --- a/fighters/peach/src/status/uniq_float.rs +++ b/fighters/peach/src/status/uniq_float.rs @@ -33,10 +33,12 @@ unsafe fn peach_float_main_common(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(peach_float_main_loop_common as *const () as _)) } -unsafe extern "C" fn uniq_float(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT + +unsafe extern "C" fn uniq_float_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_main_common(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT, uniq_float_main); } \ No newline at end of file diff --git a/fighters/peach/src/status/uniq_float_start.rs b/fighters/peach/src/status/uniq_float_start.rs index 2d234f634e..1b816060a8 100644 --- a/fighters/peach/src/status/uniq_float_start.rs +++ b/fighters/peach/src/status/uniq_float_start.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; #[no_mangle] unsafe fn peach_float_start_main_common(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -227,10 +226,12 @@ pub unsafe fn peach_float_main_loop_common(fighter: &mut L2CFighterCommon) -> L2 0.into() } -unsafe extern "C" fn uniq_float_start(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START + +unsafe extern "C" fn uniq_float_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { peach_float_start_main_common(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start); + agent.status(Main, *FIGHTER_PEACH_STATUS_KIND_UNIQ_FLOAT_START, uniq_float_start_main); } \ No newline at end of file diff --git a/fighters/pickel/src/status/attack_air_lw.rs b/fighters/pickel/src/status/attack_air_lw.rs index e1df34b175..e1bcdfb16a 100644 --- a/fighters/pickel/src/status/attack_air_lw.rs +++ b/fighters/pickel/src/status/attack_air_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ATTACK_AIR_LW_START diff --git a/fighters/pickel/src/status/entry.rs b/fighters/pickel/src/status/entry.rs index f73fc92bde..50651f4e72 100644 --- a/fighters/pickel/src/status/entry.rs +++ b/fighters/pickel/src/status/entry.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_ENTRY diff --git a/fighters/pickel/src/status/guard.rs b/fighters/pickel/src/status/guard.rs index 0747fcff2a..13fa1c6a08 100644 --- a/fighters/pickel/src/status/guard.rs +++ b/fighters/pickel/src/status/guard.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_GUARD diff --git a/fighters/pickel/src/status/jump.rs b/fighters/pickel/src/status/jump.rs index 9c77ca6992..29f6956868 100644 --- a/fighters/pickel/src/status/jump.rs +++ b/fighters/pickel/src/status/jump.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_JUMP diff --git a/fighters/pickel/src/status/rebirth.rs b/fighters/pickel/src/status/rebirth.rs index 124a88ea19..2ec108722a 100644 --- a/fighters/pickel/src/status/rebirth.rs +++ b/fighters/pickel/src/status/rebirth.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_REBIRTH diff --git a/fighters/pickel/src/status/recreate_table.rs b/fighters/pickel/src/status/recreate_table.rs index 87873126d0..b816de521e 100644 --- a/fighters/pickel/src/status/recreate_table.rs +++ b/fighters/pickel/src/status/recreate_table.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_PICKEL_STATUS_KIND_RECREATE_TABLE diff --git a/fighters/pickel/src/status/special_s.rs b/fighters/pickel/src/status/special_s.rs index 07ba169ccb..734b0ff7dd 100644 --- a/fighters/pickel/src/status/special_s.rs +++ b/fighters/pickel/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 16facb534e..597073d51a 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_AIR + pub unsafe extern "C" fn attack_air_main(agent: &mut L2CFighterCommon) -> L2CValue { agent.sub_attack_air(); agent.main_shift(attack_air_main_loop) diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index 19defee9c0..cac3eff327 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ESCAPE_AIR + pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValue { VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); agent.status_end_EscapeAir() diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index 9b39de71ef..8b3c599c82 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_REBIRTH + pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); smashline::original_status(End, agent, *FIGHTER_STATUS_KIND_REBIRTH)(agent) diff --git a/fighters/pit/src/status/special_s.rs b/fighters/pit/src/status/special_s.rs index 4402fa1a75..152a8727da 100644 --- a/fighters/pit/src/status/special_s.rs +++ b/fighters/pit/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END + pub unsafe extern "C" fn special_s_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Main, fighter, *FIGHTER_PIT_STATUS_KIND_SPECIAL_S_END)(fighter); if fighter.is_situation(*SITUATION_KIND_AIR) { diff --git a/fighters/plizardon/src/status/special_lw.rs b/fighters/plizardon/src/status/special_lw.rs index 6af9c12dca..7c31fc461d 100644 --- a/fighters/plizardon/src/status/special_lw.rs +++ b/fighters/plizardon/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { let parent_id = LinkModule::get_parent_id(fighter.module_accessor, *FIGHTER_POKEMON_LINK_NO_PTRAINER, true) as u32; let object = utils::util::get_battle_object_from_id(parent_id); diff --git a/fighters/plizardon/src/status/special_s.rs b/fighters/plizardon/src/status/special_s.rs index 3f3f9f4c07..b73b13bdab 100644 --- a/fighters/plizardon/src/status/special_s.rs +++ b/fighters/plizardon/src/status/special_s.rs @@ -2,11 +2,11 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::on_flag(fighter.battle_object, vars::plizardon::instance::DISABLE_SPECIAL_S); 0.into() } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); } diff --git a/fighters/reflet/src/status/attack_air.rs b/fighters/reflet/src/status/attack_air.rs index b47db733af..f8e31d7e73 100644 --- a/fighters/reflet/src/status/attack_air.rs +++ b/fighters/reflet/src/status/attack_air.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_AIR + extern "Rust" { #[link_name = "attack_air_float_pre"] fn attack_air_float_pre(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; @@ -7,11 +9,11 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } -unsafe extern "C" fn reflet_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::reflet::FLOAT.into()) } -pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_air_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND].get_i32() != statuses::reflet::FLOAT { VisibilityModule::set_int64(fighter.module_accessor, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); WorkModule::off_flag(fighter.module_accessor, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON); @@ -20,12 +22,12 @@ pub unsafe extern "C" fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -unsafe extern "C" fn reflet_attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_main(fighter, statuses::reflet::FLOAT.into()) } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre); - agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/reflet/src/status/special_n.rs b/fighters/reflet/src/status/special_n.rs index 638f4bf272..ed0d93d846 100644 --- a/fighters/reflet/src/status/special_n.rs +++ b/fighters/reflet/src/status/special_n.rs @@ -2,11 +2,11 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_N -pub unsafe extern "C" fn init_special_n(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_n_init(fighter: &mut L2CFighterCommon) -> L2CValue { VarModule::set_int(fighter.battle_object, vars::reflet::instance::THUNDER_CHARGE, fighter.get_int(*FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_N_CURRENT_POINT)); smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_init); } diff --git a/fighters/ridley/src/status/special_lw.rs b/fighters/ridley/src/status/special_lw.rs index 590008fca3..4a333dd754 100644 --- a/fighters/ridley/src/status/special_lw.rs +++ b/fighters/ridley/src/status/special_lw.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND || VarModule::is_flag(fighter.battle_object, vars::ridley::instance::SPECIAL_LW_IS_GRAB) { diff --git a/fighters/ridley/src/status/special_n.rs b/fighters/ridley/src/status/special_n.rs index 031d12752e..8a4d679db4 100644 --- a/fighters/ridley/src/status/special_n.rs +++ b/fighters/ridley/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_CHARGE + unsafe extern "C" fn special_n_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::set_int(fighter.module_accessor, 0, *FIGHTER_RIDLEY_STATUS_SPECIAL_N_WORK_INT_FIRE_NUM); WorkModule::set_int64(fighter.module_accessor, hash40("special_n_hold") as i64, *FIGHTER_STATUS_WORK_ID_UTILITY_WORK_INT_MOT_KIND); @@ -83,6 +85,8 @@ unsafe extern "C" fn special_n_charge_substatus(fighter: &mut L2CFighterCommon, return 0.into() } +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_N_SHOOT + unsafe extern "C" fn special_n_shoot_main(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE) { VarModule::off_flag(fighter.object(), vars::ridley::instance::SPECIAL_N_EXPLODE); diff --git a/fighters/ridley/src/status/special_s.rs b/fighters/ridley/src/status/special_s.rs index d2db3d3e7a..c943ae1918 100644 --- a/fighters/ridley/src/status/special_s.rs +++ b/fighters/ridley/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_RIDLEY_STATUS_KIND_SPECIAL_S_FAILURE + unsafe extern "C" fn special_s_failure_main(fighter: &mut L2CFighterCommon) -> L2CValue { let cancel_frame = (FighterMotionModuleImpl::get_cancel_frame(fighter.module_accessor, Hash40::new("special_s_start"), false) - MotionModule::frame(fighter.module_accessor)) + WorkModule::get_param_int(fighter.module_accessor, hash40("landing_heavy_frame"), 0) as f32 + 5.0; if cancel_frame < 1.0 { diff --git a/fighters/rockman/src/status/attack.rs b/fighters/rockman/src/status/attack.rs index 886f3f6737..3838680a2f 100644 --- a/fighters/rockman/src/status/attack.rs +++ b/fighters/rockman/src/status/attack.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK + unsafe extern "C" fn attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_Attack() } diff --git a/fighters/rockman/src/status/attack_air.rs b/fighters/rockman/src/status/attack_air.rs index 85f44784dd..dc612ec239 100644 --- a/fighters/rockman/src/status/attack_air.rs +++ b/fighters/rockman/src/status/attack_air.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_attack_air(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); diff --git a/fighters/rockman/src/status/attack_s3.rs b/fighters/rockman/src/status/attack_s3.rs index 729d1e17a9..f435f50908 100644 --- a/fighters/rockman/src/status/attack_s3.rs +++ b/fighters/rockman/src/status/attack_s3.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_S3 + unsafe extern "C" fn attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_pre_AttackS3() } diff --git a/fighters/rockman/src/status/attack_s4.rs b/fighters/rockman/src/status/attack_s4.rs index 5b649a37a8..138f38f5f9 100644 --- a/fighters/rockman/src/status/attack_s4.rs +++ b/fighters/rockman/src/status/attack_s4.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_S4 + unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_AttackS4() } diff --git a/fighters/rockman/src/status/ladder_attack.rs b/fighters/rockman/src/status/ladder_attack.rs index f3532b1b64..46a25a0de4 100644 --- a/fighters/rockman/src/status/ladder_attack.rs +++ b/fighters/rockman/src/status/ladder_attack.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_LADDER_ATTACK + unsafe extern "C" fn ladder_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_LadderAttack_common(); let mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); @@ -16,14 +18,6 @@ unsafe extern "C" fn ladder_attack_end(fighter: &mut L2CFighterCommon) -> L2CVal } pub fn install(agent: &mut Agent) { - agent.status( - Main, - *FIGHTER_STATUS_KIND_LADDER_ATTACK, - ladder_attack_main, - ); - agent.status( - End, - *FIGHTER_STATUS_KIND_LADDER_ATTACK, - ladder_attack_end, - ); + agent.status(Main, *FIGHTER_STATUS_KIND_LADDER_ATTACK, ladder_attack_main); + agent.status(End, *FIGHTER_STATUS_KIND_LADDER_ATTACK, ladder_attack_end); } diff --git a/fighters/rockman/src/status/rebirth.rs b/fighters/rockman/src/status/rebirth.rs index a7ff0220e7..dad1f89645 100644 --- a/fighters/rockman/src/status/rebirth.rs +++ b/fighters/rockman/src/status/rebirth.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_REBIRTH + unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = MotionModule::motion_kind(fighter.module_accessor); if [ diff --git a/fighters/rockman/src/status/special_lw.rs b/fighters/rockman/src/status/special_lw.rs index 431cbd0e1a..d00ffb175f 100644 --- a/fighters/rockman/src/status/special_lw.rs +++ b/fighters/rockman/src/status/special_lw.rs @@ -1,6 +1,8 @@ use super::*; use super::helper::*; +// FIGHTER_STATUS_KIND_SPECIAL_LW + unsafe extern "C" fn special_lw_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(special_lw_main_loop as *const () as _)) } @@ -46,9 +48,5 @@ unsafe extern "C" fn special_lw_main_loop(fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status( - Main, - *FIGHTER_STATUS_KIND_SPECIAL_LW, - special_lw_main, - ); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); } diff --git a/fighters/rockman/src/status/special_n.rs b/fighters/rockman/src/status/special_n.rs index 02bc371ee6..80fa9394b3 100644 --- a/fighters/rockman/src/status/special_n.rs +++ b/fighters/rockman/src/status/special_n.rs @@ -4,6 +4,8 @@ use super::helper::*; pub const CHARGE_SHOT_DELAY_CHARGE_FRAME : i32 = 50; pub const CHARGE_SHOT_MAX_FRAME : i32 = 160; +// FIGHTER_STATUS_KIND_SPECIAL_N + unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if !VarModule::is_flag(fighter.battle_object, vars::rockman::instance::CHARGE_SHOT_PLAYED_FX) { if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { diff --git a/fighters/rockman/src/status/special_s.rs b/fighters/rockman/src/status/special_s.rs index 2d8fa0dc4d..4d9d7f8125 100644 --- a/fighters/rockman/src/status/special_s.rs +++ b/fighters/rockman/src/status/special_s.rs @@ -1,6 +1,8 @@ use super::*; use super::helper::*; +// FIGHTER_STATUS_KIND_SPECIAL_S + unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, diff --git a/fighters/rockman/src/status/walk.rs b/fighters/rockman/src/status/walk.rs index 3190182b90..ea1de0e7dc 100644 --- a/fighters/rockman/src/status/walk.rs +++ b/fighters/rockman/src/status/walk.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_WALK diff --git a/fighters/rosetta/src/status/special_hi.rs b/fighters/rosetta/src/status/special_hi.rs index f155cf219a..8d6df5d348 100644 --- a/fighters/rosetta/src/status/special_hi.rs +++ b/fighters/rosetta/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_ROSETTA_STATUS_KIND_SPECIAL_HI_END diff --git a/fighters/roy/src/status/mod.rs b/fighters/roy/src/status/mod.rs index 0fef5e1c2d..c0cec6331e 100644 --- a/fighters/roy/src/status/mod.rs +++ b/fighters/roy/src/status/mod.rs @@ -2,177 +2,8 @@ use super::*; use globals::*; // status script import -pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { - unsafe { - *(energy as *mut i32).add(0x50 / 4) = frames; - *(energy as *mut bool).add(0x5C) = false; - } - } - -pub unsafe extern "C" fn init_specials(fighter: &mut L2CFighterCommon) -> L2CValue { - let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); - let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); - let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); - let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); - let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; - let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; - let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; - - let mut aerial_y_speed = 0.0; - let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; - - // [v] Disable motion energy - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - - let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); - - // Check for the side B status you're currently in - let current_status_kind = StatusModule::status_kind(fighter.module_accessor); - let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); - - // alStack192 = gravity energy - // alStack176 = stop energy - // alStack208 = motion energy - if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); - aerial_y_speed = air_spd_y; - } - else{ - aerial_y_speed = 0.0; - } - let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; - let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - } - } - if [*FIGHTER_ROY_STATUS_KIND_SPECIAL_S3, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { - if current_situation_kind == *SITUATION_KIND_GROUND { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(motion_energy); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - } - else if current_situation_kind == *SITUATION_KIND_AIR { - let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; - let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; - lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); - lua_bind::KineticEnergy::enable(stop_energy); - lua_bind::KineticEnergy::enable(gravity_energy); - } - } - KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - - 0.into() -} - -pub unsafe extern "C" fn special_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - let mot = if VarModule::is_flag(fighter.battle_object, vars::roy::status::SIDE_B_REVERSE) { - (hash40("special_s4_back") as i64, hash40("special_air_s4_back") as i64) - } - else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_LW) { - (hash40("special_s4_lw") as i64, hash40("special_air_s4_lw") as i64) - } - else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_HI) { - (hash40("special_s4_hi") as i64, hash40("special_air_s4_hi") as i64) - } - else { - (hash40("special_s4_s") as i64, hash40("special_air_s4_s") as i64) - }; - WorkModule::set_int64(fighter.module_accessor, mot.0, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); - WorkModule::set_int64(fighter.module_accessor, mot.1, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); - VarModule::off_flag(fighter.battle_object, vars::roy::status::SIDE_B_REVERSE); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_HI); - WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_LW); - fighter.sub_shift_status_main(L2CValue::Ptr(special_s4_main_loop as *const () as _)) -} - -unsafe extern "C" fn special_s4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { - if !StatusModule::is_changing(fighter.module_accessor) { - if StatusModule::is_situation_changed(fighter.module_accessor) { - special_s_mot_helper(fighter); - } - } - else { - special_s_mot_helper(fighter); - } - if CancelModule::is_enable_cancel(fighter.module_accessor) { - if fighter.sub_wait_ground_check_common(false.into()).get_bool() - || fighter.sub_air_check_fall_common().get_bool() { - return 0.into(); - } - } - if MotionModule::is_end(fighter.module_accessor) { - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - if sit != *SITUATION_KIND_GROUND { - fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); - } - else { - fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); - } - } - 0.into() -} - -unsafe extern "C" fn special_s_mot_helper(fighter: &mut L2CFighterCommon) { - let sit = fighter.global_table[SITUATION_KIND].get_i32(); - let correct; - let mot; - if sit != *SITUATION_KIND_GROUND { - correct = *GROUND_CORRECT_KIND_AIR; - mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); - } - else { - correct = *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP; - mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); - } - GroundModule::correct(fighter.module_accessor, GroundCorrectKind(correct)); - if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT) { - MotionModule::change_motion( - fighter.module_accessor, - Hash40::new_raw(mot), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); - } - else { - MotionModule::change_motion_inherit_frame( - fighter.module_accessor, - Hash40::new_raw(mot), - -1.0, - 1.0, - 0.0, - false, - false - ); - } -} +mod special_s; pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_specials); - agent.status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main); + special_s::install(agent); } diff --git a/fighters/roy/src/status/special_s.rs b/fighters/roy/src/status/special_s.rs new file mode 100644 index 0000000000..1c7f6141f2 --- /dev/null +++ b/fighters/roy/src/status/special_s.rs @@ -0,0 +1,181 @@ +use super::*; + +// FIGHTER_STATUS_KIND_SPECIAL_S + +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { + let fighter_kind = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_KIND); + let customize_special_hi_no = WorkModule::get_int(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_CUSTOMIZE_SPECIAL_HI_NO); + let start_spd_x_mul = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("start_spd_x_mul")); + let air_spd_y = WorkModule::get_param_float(fighter.module_accessor, hash40("param_special_s"), hash40("air_spd_y")); + let mut stop_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP) as *mut app::KineticEnergy; + let mut gravity_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY) as *mut app::KineticEnergy; + let mut motion_energy = KineticModule::get_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as *mut app::KineticEnergy; + + let mut aerial_y_speed = 0.0; + let mut aerial_x_speed = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) * start_spd_x_mul; + + // [v] Disable motion energy + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + + let sum_speed_main = KineticModule::get_sum_speed(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + + // Check for the side B status you're currently in + let current_status_kind = StatusModule::status_kind(fighter.module_accessor); + let current_situation_kind = StatusModule::situation_kind(fighter.module_accessor); + + // alStack192 = gravity energy + // alStack176 = stop energy + // alStack208 = motion energy + if [*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + if !VarModule::is_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED) { + VarModule::on_flag(fighter.battle_object, vars::common::instance::SPECIAL_STALL_USED); + aerial_y_speed = air_spd_y; + } + else{ + aerial_y_speed = 0.0; + } + let reset_speed_2f = Vector2f { x: aerial_x_speed, y: 0.0 }; + let reset_speed_gravity_2f = Vector2f { x: 0.0, y: aerial_y_speed }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_gravity_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + } + } + if [*FIGHTER_ROY_STATUS_KIND_SPECIAL_S3, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4].contains(¤t_status_kind) { + if current_situation_kind == *SITUATION_KIND_GROUND { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(motion_energy, *ENERGY_MOTION_RESET_TYPE_GROUND_TRANS_IGNORE_NORMAL, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(motion_energy); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + } + else if current_situation_kind == *SITUATION_KIND_AIR { + let reset_speed_2f = Vector2f { x: 0.0, y: 0.0 }; + let reset_speed_3f = Vector3f { x: 0.0, y: 0.0, z: 0.0 }; + lua_bind::KineticEnergy::reset_energy(stop_energy, *ENERGY_STOP_RESET_TYPE_AIR, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::reset_energy(gravity_energy, *ENERGY_GRAVITY_RESET_TYPE_GRAVITY, &reset_speed_2f, &reset_speed_3f, fighter.module_accessor); + lua_bind::KineticEnergy::enable(stop_energy); + lua_bind::KineticEnergy::enable(gravity_energy); + } + } + KineticModule::unable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + + 0.into() +} + +// FIGHTER_ROY_STATUS_KIND_SPECIAL_S4 + +pub unsafe extern "C" fn special_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + let mot = if VarModule::is_flag(fighter.battle_object, vars::roy::status::SIDE_B_REVERSE) { + (hash40("special_s4_back") as i64, hash40("special_air_s4_back") as i64) + } + else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_LW) { + (hash40("special_s4_lw") as i64, hash40("special_air_s4_lw") as i64) + } + else if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_HI) { + (hash40("special_s4_hi") as i64, hash40("special_air_s4_hi") as i64) + } + else { + (hash40("special_s4_s") as i64, hash40("special_air_s4_s") as i64) + }; + WorkModule::set_int64(fighter.module_accessor, mot.0, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); + WorkModule::set_int64(fighter.module_accessor, mot.1, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); + VarModule::off_flag(fighter.battle_object, vars::roy::status::SIDE_B_REVERSE); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_HI); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_INPUT_LW); + fighter.sub_shift_status_main(L2CValue::Ptr(special_s4_main_loop as *const () as _)) +} + +unsafe extern "C" fn special_s4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !StatusModule::is_changing(fighter.module_accessor) { + if StatusModule::is_situation_changed(fighter.module_accessor) { + special_s_mot_helper(fighter); + } + } + else { + special_s_mot_helper(fighter); + } + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { + return 0.into(); + } + } + if MotionModule::is_end(fighter.module_accessor) { + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + if sit != *SITUATION_KIND_GROUND { + fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); + } + else { + fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); + } + } + 0.into() +} + +unsafe extern "C" fn special_s_mot_helper(fighter: &mut L2CFighterCommon) { + let sit = fighter.global_table[SITUATION_KIND].get_i32(); + let correct; + let mot; + if sit != *SITUATION_KIND_GROUND { + correct = *GROUND_CORRECT_KIND_AIR; + mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND_AIR); + } + else { + correct = *GROUND_CORRECT_KIND_GROUND_CLIFF_STOP; + mot = WorkModule::get_int64(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_WORK_INT_MOTION_KIND); + } + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(correct)); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT) { + MotionModule::change_motion( + fighter.module_accessor, + Hash40::new_raw(mot), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_ROY_STATUS_SPECIAL_S_FLAG_CONTINUE_MOT); + } + else { + MotionModule::change_motion_inherit_frame( + fighter.module_accessor, + Hash40::new_raw(mot), + -1.0, + 1.0, + 0.0, + false, + false + ); + } +} + +pub fn set_gravity_delay_resume_frame(energy: *mut app::FighterKineticEnergyGravity, frames: i32) { + unsafe { + *(energy as *mut i32).add(0x50 / 4) = frames; + *(energy as *mut bool).add(0x5C) = false; + } +} + +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + + agent.status(Main, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S4, special_s4_main); +} diff --git a/fighters/ryu/src/status/dash.rs b/fighters/ryu/src/status/dash.rs index e4961d29fe..ba9a8a570d 100644 --- a/fighters/ryu/src/status/dash.rs +++ b/fighters/ryu/src/status/dash.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_TURN_DASH -pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn turn_dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let lr = WorkModule::get_float( fighter.module_accessor, *FIGHTER_SPECIAL_COMMAND_USER_INSTANCE_WORK_ID_FLOAT_OPPONENT_LR_1ON1, @@ -25,17 +25,17 @@ pub unsafe extern "C" fn pre_turndash(fighter: &mut L2CFighterCommon) -> L2CValu // FIGHTER_RYU_STATUS_KIND_DASH_BACK -pub unsafe extern "C" fn main_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_main(fighter: &mut L2CFighterCommon) -> L2CValue { fgc_dashback_main(fighter) } -pub unsafe extern "C" fn end_dashback(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn dash_back_end(fighter: &mut L2CFighterCommon) -> L2CValue { common::shoto_status::fgc_end_dashback(fighter); smashline::original_status(End, fighter, *FIGHTER_RYU_STATUS_KIND_DASH_BACK)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, pre_turndash); - agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, main_dashback); - agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, end_dashback); + agent.status(Pre, *FIGHTER_STATUS_KIND_TURN_DASH, turn_dash_pre); + agent.status(Main, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_main); + agent.status(End, *FIGHTER_RYU_STATUS_KIND_DASH_BACK, dash_back_end); } \ No newline at end of file diff --git a/fighters/ryu/src/status/finals.rs b/fighters/ryu/src/status/finals.rs index 9ba673d229..e7cba91312 100644 --- a/fighters/ryu/src/status/finals.rs +++ b/fighters/ryu/src/status/finals.rs @@ -1,10 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_STATUS_KIND_FINAL // +// FIGHTER_STATUS_KIND_FINAL -pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_FinalCommon(); StatusModule::init_settings( fighter.module_accessor, @@ -35,15 +33,15 @@ pub unsafe extern "C" fn pre_final(fighter: &mut L2CFighterCommon) -> L2CValue { return 0.into(); } -// FIGHTER_RYU_STATUS_KIND_FINAL2 // +// FIGHTER_RYU_STATUS_KIND_FINAL2 -pub unsafe extern "C" fn pre_final2(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let ret = smashline::original_status(Pre, fighter, *FIGHTER_RYU_STATUS_KIND_FINAL2)(fighter); let meter_amount = MeterModule::meter(fighter.battle_object); MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, pre_final); - agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, pre_final2); + agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); + agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); } diff --git a/fighters/ryu/src/status/guard.rs b/fighters/ryu/src/status/guard.rs index f9d16e593e..1450917679 100644 --- a/fighters/ryu/src/status/guard.rs +++ b/fighters/ryu/src/status/guard.rs @@ -1,6 +1,6 @@ use super::*; -pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { let rate = fighter.status_GuardOff_Common().get_f32(); if VarModule::is_flag( fighter.object(), @@ -73,13 +73,13 @@ pub unsafe extern "C" fn guard(fighter: &mut L2CFighterCommon) -> L2CValue { false, ); } - fighter.main_shift(guard_main) + fighter.main_shift(guard_main_loop) } -unsafe extern "C" fn guard_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn guard_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.status_GuardOff_Main() } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard); + agent.status(Main, *FIGHTER_STATUS_KIND_GUARD_OFF, guard_main); } \ No newline at end of file diff --git a/fighters/ryu/src/status/special_cmd4.rs b/fighters/ryu/src/status/special_cmd4.rs index 4543ea2bf7..ecf6c40bc3 100644 --- a/fighters/ryu/src/status/special_cmd4.rs +++ b/fighters/ryu/src/status/special_cmd4.rs @@ -1,8 +1,8 @@ use super::*; -use globals::*; -use smashline::*; -pub unsafe extern "C" fn ryu_attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// statuses::ryu::ATTACK_COMMAND_4 + +pub unsafe extern "C" fn attack_command_4_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_GROUND), @@ -30,7 +30,7 @@ pub unsafe extern "C" fn ryu_attack_command_4_pre(fighter: &mut L2CFighterCommon 0.into() } -pub unsafe extern "C" fn ryu_attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("attack_command4"), 0.0, 1.0, false, 0.0, false, false); WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_KIND_ATTACK_COMMAND2, *FIGHTER_RYU_STATUS_ATTACK_INT_LOG_KIND); // fighter.clear_lua_stack(); @@ -40,10 +40,10 @@ pub unsafe extern "C" fn ryu_attack_command_4_main(fighter: &mut L2CFighterCommo // app::sv_kinetic_energy::set_chara_dir(fighter.lua_state_agent); fighter.off_flag(*FIGHTER_RYU_STATUS_ATTACK_FLAG_RELEASE_BUTTON); fighter.set_int(*FIGHTER_RYU_STRENGTH_S, *FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); - fighter.sub_shift_status_main(L2CValue::Ptr(ryu_attack_command_4_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(attack_command_4_main_loop as *const () as _)) } -pub unsafe extern "C" fn ryu_attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_command_4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() { return 1.into(); @@ -80,6 +80,6 @@ pub unsafe extern "C" fn ryu_attack_command_4_main_loop(fighter: &mut L2CFighter } pub fn install(agent: &mut Agent) { - agent.status(Pre, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_pre); - agent.status(Main, statuses::ryu::ATTACK_COMMAND_4, ryu_attack_command_4_main); + agent.status(Pre, statuses::ryu::ATTACK_COMMAND_4, attack_command_4_pre); + agent.status(Main, statuses::ryu::ATTACK_COMMAND_4, attack_command_4_main); } diff --git a/fighters/ryu/src/status/special_lw.rs b/fighters/ryu/src/status/special_lw.rs index b94e3166a4..20627c9913 100644 --- a/fighters/ryu/src/status/special_lw.rs +++ b/fighters/ryu/src/status/special_lw.rs @@ -1,12 +1,6 @@ use super::*; -use globals::*; -use smashline::*; -pub fn install(agent: &mut Agent) { - agent.status(Pre, statuses::ryu::INSTALL, special_lw_install_pre); - agent.status(Main, statuses::ryu::INSTALL, special_lw_install_main); - agent.status(End, statuses::ryu::INSTALL, special_lw_install_end); -} +// statuses::ryu::INSTALL unsafe extern "C" fn special_lw_install_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( @@ -116,4 +110,10 @@ unsafe extern "C" fn special_lw_install_set_kinetic(fighter: &mut L2CFighterComm ); KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_GROUND_STOP); } +} + +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::ryu::INSTALL, special_lw_install_pre); + agent.status(Main, statuses::ryu::INSTALL, special_lw_install_main); + agent.status(End, statuses::ryu::INSTALL, special_lw_install_end); } \ No newline at end of file diff --git a/fighters/ryu/src/status/special_s.rs b/fighters/ryu/src/status/special_s.rs index 8cf6369901..d1d0209918 100644 --- a/fighters/ryu/src/status/special_s.rs +++ b/fighters/ryu/src/status/special_s.rs @@ -1,28 +1,26 @@ use super::*; -use globals::*; -use smashline::*; -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND -pub unsafe extern "C" fn init_special_s_command(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_command_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND)(fighter) } -// FIGHTER_STATUS_KIND_SPECIAL_S // +// FIGHTER_STATUS_KIND_SPECIAL_S -pub unsafe extern "C" fn init_special_s(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_init(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { VarModule::on_flag(fighter.battle_object, vars::shotos::instance::DISABLE_SPECIAL_S); } smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_S)(fighter) } -// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP // +// FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP -pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_s_loop_init(fighter: &mut L2CFighterCommon) -> L2CValue { if VarModule::is_flag(fighter.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::drain_direct(fighter.battle_object, 2.0 * MeterModule::meter_per_level(fighter.battle_object)); } @@ -30,7 +28,7 @@ pub unsafe extern "C" fn init_special_s_loop(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status( Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND,init_special_s_command,); - agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, init_special_s); - agent.status( Init,*FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP,init_special_s_loop,); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_COMMAND, special_s_command_init); + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_init); + agent.status(Init, *FIGHTER_RYU_STATUS_KIND_SPECIAL_S_LOOP, special_s_loop_init); } diff --git a/fighters/samusd/src/status/attack_air.rs b/fighters/samusd/src/status/attack_air.rs index 43019e134c..af87f63993 100644 --- a/fighters/samusd/src/status/attack_air.rs +++ b/fighters/samusd/src/status/attack_air.rs @@ -7,6 +7,8 @@ extern "Rust" { fn attack_air_float_main(fighter: &mut L2CFighterCommon, float_status: L2CValue) -> L2CValue; } +// FIGHTER_STATUS_KIND_ATTACK_AIR + unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { attack_air_float_pre(fighter, statuses::samusd::FLOAT.into()) } diff --git a/fighters/samusd/src/status/float.rs b/fighters/samusd/src/status/float.rs index 9fd637bd0c..6d72139de0 100644 --- a/fighters/samusd/src/status/float.rs +++ b/fighters/samusd/src/status/float.rs @@ -9,6 +9,8 @@ extern "Rust" { fn float_end_common(fighter: &mut L2CFighterCommon) -> L2CValue; } +// statuses::samusd::FLOAT + unsafe extern "C" fn float_pre(fighter: &mut L2CFighterCommon) -> L2CValue { float_pre_common(fighter) } diff --git a/fighters/shulk/src/status/special_n.rs b/fighters/shulk/src/status/special_n.rs index 9892936f6d..c948d30e0a 100644 --- a/fighters/shulk/src/status/special_n.rs +++ b/fighters/shulk/src/status/special_n.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_N -unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let beat = VarModule::is_flag(fighter.battle_object, vars::shulk::status::MONADO_BEAT); StatusModule::init_settings( @@ -35,5 +35,5 @@ unsafe extern "C" fn shulk_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, shulk_special_n_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); } \ No newline at end of file diff --git a/fighters/shulk/src/status/special_s.rs b/fighters/shulk/src/status/special_s.rs index 1f682f3deb..860775673e 100644 --- a/fighters/shulk/src/status/special_s.rs +++ b/fighters/shulk/src/status/special_s.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_SPECIAL_S -unsafe extern "C" fn shulk_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), @@ -30,7 +30,7 @@ unsafe extern "C" fn shulk_special_s_pre(fighter: &mut L2CFighterCommon) -> L2CV return 0.into(); } -unsafe extern "C" fn shulk_special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_GROUND) { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_s"), 0.0, 1.0, false, 0.0, false, false); } @@ -39,10 +39,10 @@ unsafe extern "C" fn shulk_special_s_main(fighter: &mut L2CFighterCommon) -> L2C } VarModule::on_flag(fighter.object(), vars::shulk::instance::DISABLE_SPECIAL_S); VarModule::set_int(fighter.object(), vars::shulk::instance::SPECIAL_S_STEP, 0); - fighter.sub_shift_status_main(L2CValue::Ptr(shulk_special_s_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) } -unsafe extern "C" fn shulk_special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor) { if fighter.sub_wait_ground_check_common(false.into()).get_bool() || fighter.sub_air_check_fall_common().get_bool() { @@ -147,6 +147,6 @@ unsafe extern "C" fn shulk_special_s_main_loop(fighter: &mut L2CFighterCommon) - } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_pre,); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, shulk_special_s_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre,); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/snake/src/status/appeal.rs b/fighters/snake/src/status/appeal.rs index b80be6e329..a437df08f6 100644 --- a/fighters/snake/src/status/appeal.rs +++ b/fighters/snake/src/status/appeal.rs @@ -10,9 +10,10 @@ extern "C" { ) -> bool; } -////added new up-taunt and side-taunt +// FIGHTER_STATUS_KIND_APPEAL +// added new up-taunt and side-taunt -unsafe extern "C" fn snake_taunt_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); if ControlModule::get_command_flag_cat(fighter.module_accessor, 1) == *FIGHTER_PAD_CMD_CAT2_FLAG_APPEAL_HI { MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_hi_r"), 0.0, 1.0, false, 0.0, false, false); @@ -24,10 +25,10 @@ unsafe extern "C" fn snake_taunt_status_main(fighter: &mut L2CFighterCommon) -> else { MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_lw_r"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(snake_taunt_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_taunt_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn appeal_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() @@ -53,7 +54,7 @@ pub unsafe fn snake_taunt_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue return false.into() } -unsafe extern "C" fn snake_taunt_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[0xb].get_i32() != *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); @@ -66,9 +67,10 @@ unsafe extern "C" fn snake_taunt_status_end(fighter: &mut L2CFighterCommon) -> L return 0.into() } -//added down-taunt box walk and c4 place/explode +// FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT +// added down-taunt box walk and c4 place/explode -unsafe extern "C" fn snake_down_taunt_wait_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_wait"), 0.0, 1.0, false, 0.0, false, false); fighter.off_flag(*FIGHTER_SNAKE_STATUS_APPEAL_FLAG_EXIT); @@ -77,10 +79,10 @@ unsafe extern "C" fn snake_down_taunt_wait_status_main(fighter: &mut L2CFighterC let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE); VarModule::set_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT, 0); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_down_taunt_wait_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_wait_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_down_taunt_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn appeal_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if VarModule::get_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT) > 0 { VarModule::dec_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT); @@ -149,7 +151,7 @@ pub unsafe fn snake_down_taunt_wait_main_loop(fighter: &mut L2CFighterCommon) -> return false.into() } -unsafe extern "C" fn snake_down_taunt_wait_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_wait_end(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[0xb].get_i32() != *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); @@ -162,7 +164,9 @@ unsafe extern "C" fn snake_down_taunt_wait_status_end(fighter: &mut L2CFighterCo return 0.into() } -unsafe extern "C" fn snake_down_taunt_end_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_SNAKE_STATUS_KIND_APPEAL_END + +unsafe extern "C" fn appeal_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if VarModule::is_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE) { VarModule::off_flag(fighter.object(), vars::snake::instance::DTAUNT_C4_EXLPODE); @@ -172,10 +176,10 @@ unsafe extern "C" fn snake_down_taunt_end_status_main(fighter: &mut L2CFighterCo MotionModule::change_motion(fighter.module_accessor, Hash40::new("appeal_end"), 0.0, 1.0, false, 0.0, false, false); } fighter.off_flag(*FIGHTER_SNAKE_STATUS_APPEAL_FLAG_EXIT); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_down_taunt_end_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(appeal_end_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_down_taunt_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn appeal_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); return true.into() @@ -192,7 +196,7 @@ pub unsafe fn snake_down_taunt_end_main_loop(fighter: &mut L2CFighterCommon) -> return false.into() } -unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn appeal_end_end(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.clear_lua_stack(); let object = sv_system::battle_object(fighter.lua_state_agent); let fighta : *mut Fighter = std::mem::transmute(object); @@ -205,10 +209,12 @@ unsafe extern "C" fn snake_down_taunt_end_status_end(fighter: &mut L2CFighterCom } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_main); - agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, snake_taunt_status_end); - agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, snake_down_taunt_wait_status_main); - agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, snake_down_taunt_wait_status_end); - agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, snake_down_taunt_end_status_main); - agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, snake_down_taunt_end_status_end); + agent.status(Main, *FIGHTER_STATUS_KIND_APPEAL, appeal_main); + agent.status(End, *FIGHTER_STATUS_KIND_APPEAL, appeal_end); + + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, appeal_wait_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_WAIT, appeal_wait_end); + + agent.status(Main, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, appeal_end_main); + agent.status(End, *FIGHTER_SNAKE_STATUS_KIND_APPEAL_END, appeal_end_end); } \ No newline at end of file diff --git a/fighters/snake/src/status/attack_s4.rs b/fighters/snake/src/status/attack_s4.rs index 10707f8320..3f5e2f36e1 100644 --- a/fighters/snake/src/status/attack_s4.rs +++ b/fighters/snake/src/status/attack_s4.rs @@ -4,12 +4,12 @@ use super::*; ////changed rpg7 side-smash to multi-hit knife -unsafe extern "C" fn snake_side_smash_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); smashline::original_status(Main, fighter, *FIGHTER_STATUS_KIND_ATTACK_S4)(fighter) } -unsafe extern "C" fn snake_side_smash_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_ENABLE); VarModule::off_flag(fighter.object(), vars::snake::instance::KNIFE_COMBO_IS_BUFFERED); @@ -18,6 +18,6 @@ unsafe extern "C" fn snake_side_smash_status_end(fighter: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, snake_side_smash_status_main); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, snake_side_smash_status_end); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_main); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_end); } \ No newline at end of file diff --git a/fighters/snake/src/status/catch.rs b/fighters/snake/src/status/catch.rs index 12b167118a..7304f28837 100644 --- a/fighters/snake/src/status/catch.rs +++ b/fighters/snake/src/status/catch.rs @@ -1,21 +1,25 @@ use super::*; -////fixed unwanted buffered throws and walking +// FIGHTER_STATUS_KIND_CATCH_PULL +// fixed unwanted buffered throws and walking -unsafe extern "C" fn snake_grab_pull_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_pull_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_pull_main_loop as *const () as _)) // 0.into() } -unsafe extern "C" fn snake_grab_dash_pull_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_CATCH_DASH_PULL + +unsafe extern "C" fn catch_dash_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { ControlModule::reset_trigger(fighter.module_accessor); MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_pull"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_pull_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_pull_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); @@ -63,12 +67,12 @@ pub unsafe fn snake_grab_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2CVa return false.into() } -unsafe extern "C" fn snake_grab_attack_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_attack"), 0.0, 1.0, false, 0.0, false, false); - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_attack_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_attack_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn catch_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); return true.into() @@ -126,7 +130,7 @@ pub unsafe fn snake_grab_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2C ////added grab walk -unsafe extern "C" fn snake_grab_wait_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; ControlModule::reset_trigger(fighter.module_accessor); if VarModule::is_flag(fighter.object(), vars::snake::instance::IS_GRAB_WALK) { @@ -144,10 +148,10 @@ unsafe extern "C" fn snake_grab_wait_status_main(fighter: &mut L2CFighterCommon) else { MotionModule::change_motion(fighter.module_accessor, Hash40::new("catch_wait"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(snake_grab_wait_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(catch_wait_main_loop as *const () as _)) // 0.into() } -pub unsafe fn snake_grab_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe fn catch_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); @@ -202,16 +206,18 @@ pub unsafe fn snake_grab_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CVa return false.into() } -unsafe extern "C" fn snake_grab_wait_status_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_wait_end(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; VarModule::off_flag(fighter.object(), vars::snake::instance::IS_GRAB_WALK); smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_CATCH_WAIT)(fighter) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, snake_grab_pull_status_main); - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, snake_grab_dash_pull_status_main); - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_ATTACK, snake_grab_attack_status_main); - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, snake_grab_wait_status_main); - agent.status(End, *FIGHTER_STATUS_KIND_CATCH_WAIT, snake_grab_wait_status_end); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_PULL, catch_pull_main); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_DASH_PULL, catch_dash_pull_main); + + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_ATTACK, catch_attack_main); + + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH_WAIT, catch_wait_main); + agent.status(End, *FIGHTER_STATUS_KIND_CATCH_WAIT, catch_wait_end); } \ No newline at end of file diff --git a/fighters/snake/src/status/rebirth.rs b/fighters/snake/src/status/rebirth.rs index 1e46c6c82b..89e22899aa 100644 --- a/fighters/snake/src/status/rebirth.rs +++ b/fighters/snake/src/status/rebirth.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_REBIRTH -unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { let mot = MotionModule::motion_kind(fighter.module_accessor); if [ hash40("appeal_hi_l"), @@ -36,5 +36,5 @@ unsafe extern "C" fn snake_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CVal } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, snake_rebirth_end); + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } \ No newline at end of file diff --git a/fighters/snake/src/status/special_s.rs b/fighters/snake/src/status/special_s.rs index 463f703938..ff6647d0b8 100644 --- a/fighters/snake/src/status/special_s.rs +++ b/fighters/snake/src/status/special_s.rs @@ -4,7 +4,7 @@ use super::*; // side-special tranq gun -unsafe extern "C" fn snake_side_special_status_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { PostureModule::set_stick_lr(fighter.module_accessor, 0.0); PostureModule::update_rot_y_lr(fighter.module_accessor); fighter.set_int64(hash40("special_s_start") as i64, *FIGHTER_SNAKE_STATUS_WORK_INT_MOT_KIND); @@ -17,10 +17,11 @@ unsafe extern "C" fn snake_side_special_status_main(fighter: &mut L2CFighterComm KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_s_start"), 0.0, 1.0, false, 0.0, false, false); } - fighter.sub_shift_status_main(L2CValue::Ptr(special_side_main_loop as *const () as _)) + fighter.sub_shift_status_main(L2CValue::Ptr(special_s_main_loop as *const () as _)) // 0.into() } -pub unsafe fn special_side_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + +pub unsafe fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if MotionModule::is_end(fighter.module_accessor) { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_GROUND { fighter.change_status(FIGHTER_STATUS_KIND_WAIT.into(), false.into()); @@ -66,5 +67,5 @@ pub unsafe fn change_motion_by_situation(fighter: &mut L2CFighterCommon, skip_ch } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, snake_side_special_status_main); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/sonic/src/status/dash.rs b/fighters/sonic/src/status/dash.rs index 28ace3041f..56db1f7418 100644 --- a/fighters/sonic/src/status/dash.rs +++ b/fighters/sonic/src/status/dash.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_STATUS_KIND_DASH diff --git a/fighters/sonic/src/status/special_hi.rs b/fighters/sonic/src/status/special_hi.rs index 9cbf651c61..946e69c8c6 100644 --- a/fighters/sonic/src/status/special_hi.rs +++ b/fighters/sonic/src/status/special_hi.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_STATUS_KIND_SPECIAL_HI diff --git a/fighters/sonic/src/status/special_lw_hold.rs b/fighters/sonic/src/status/special_lw_hold.rs index 333a2dcbbc..cf15e109ee 100644 --- a/fighters/sonic/src/status/special_lw_hold.rs +++ b/fighters/sonic/src/status/special_lw_hold.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_SONIC_STATUS_KIND_SPECIAL_LW_HOLD diff --git a/fighters/sonic/src/status/special_n.rs b/fighters/sonic/src/status/special_n.rs index 9e33c9d422..5f869df01c 100644 --- a/fighters/sonic/src/status/special_n.rs +++ b/fighters/sonic/src/status/special_n.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_STATUS_KIND_SPECIAL_N diff --git a/fighters/sonic/src/status/special_n_hit.rs b/fighters/sonic/src/status/special_n_hit.rs index 34831b8e1c..cf5348d8cb 100644 --- a/fighters/sonic/src/status/special_n_hit.rs +++ b/fighters/sonic/src/status/special_n_hit.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_SONIC_STATUS_KIND_SPECIAL_N_HIT diff --git a/fighters/sonic/src/status/special_s.rs b/fighters/sonic/src/status/special_s.rs index f09f683c74..11e80b4b83 100644 --- a/fighters/sonic/src/status/special_s.rs +++ b/fighters/sonic/src/status/special_s.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_STATUS_KIND_SPECIAL_S diff --git a/fighters/sonic/src/status/special_s_dash.rs b/fighters/sonic/src/status/special_s_dash.rs index 477f5e0b0a..1891d98fdd 100644 --- a/fighters/sonic/src/status/special_s_dash.rs +++ b/fighters/sonic/src/status/special_s_dash.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_SONIC_STATUS_KIND_SPECIAL_S_DASH diff --git a/fighters/sonic/src/status/wait.rs b/fighters/sonic/src/status/wait.rs index c1696fee9e..bf16fdb2e1 100644 --- a/fighters/sonic/src/status/wait.rs +++ b/fighters/sonic/src/status/wait.rs @@ -1,6 +1,4 @@ use super::*; -use globals::*; -use smashline::*; // FIGHTER_STATUS_KIND_WAIT diff --git a/fighters/szerosuit/src/status/rebirth.rs b/fighters/szerosuit/src/status/rebirth.rs index 6e91c0dd37..a0f7d27848 100644 --- a/fighters/szerosuit/src/status/rebirth.rs +++ b/fighters/szerosuit/src/status/rebirth.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_STATUS_KIND_REBIRTH -unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP) { ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -11,5 +11,5 @@ unsafe extern "C" fn szerosuit_rebirth_end(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, szerosuit_rebirth_end); + agent.status(End, *FIGHTER_STATUS_KIND_REBIRTH, rebirth_end); } diff --git a/fighters/tantan/src/status/attack.rs b/fighters/tantan/src/status/attack.rs index 9e759dc417..4643715c55 100644 --- a/fighters/tantan/src/status/attack.rs +++ b/fighters/tantan/src/status/attack.rs @@ -1,12 +1,12 @@ use super::*; -// Normal Jab // +// FIGHTER_STATUS_KIND_ATTACK -unsafe extern "C" fn tantan_attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_pre_Attack(); } -unsafe extern "C" fn tantan_attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_AttackCommon(); if !StopModule::is_stop(fighter.module_accessor) { fighter.check_attack_mtrans(); @@ -17,6 +17,6 @@ unsafe extern "C" fn tantan_attack_main(fighter: &mut L2CFighterCommon) -> L2CVa } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, tantan_attack_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK, attack_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK, attack_main); } diff --git a/fighters/tantan/src/status/attack_air.rs b/fighters/tantan/src/status/attack_air.rs index 29335a9559..a44faef911 100644 --- a/fighters/tantan/src/status/attack_air.rs +++ b/fighters/tantan/src/status/attack_air.rs @@ -1,16 +1,18 @@ use super::*; -// Aerial Attacks +// FIGHTER_STATUS_KIND_ATTACK_AIR -unsafe extern "C" fn tantan_attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_pre_AttackAir(); } -unsafe extern "C" fn tantan_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_end_AttackAir(); } -unsafe extern "C" fn tantan_landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR + +unsafe extern "C" fn landing_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::prev_status_kind(fighter.module_accessor, 0) == *FIGHTER_STATUS_KIND_SPECIAL_N { MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_air_n_end"), 0.0, 1.0, false, 0.0, false, false); @@ -22,8 +24,8 @@ unsafe extern "C" fn tantan_landing_air_main(fighter: &mut L2CFighterCommon) -> } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_pre); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, tantan_attack_air_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_pre); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_end); - agent.status(Main, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, tantan_landing_air_main); + agent.status(Main, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, landing_air_main); } diff --git a/fighters/tantan/src/status/attack_jump_aerial.rs b/fighters/tantan/src/status/attack_jump_aerial.rs index 100d8c78a1..16bb7ba786 100644 --- a/fighters/tantan/src/status/attack_jump_aerial.rs +++ b/fighters/tantan/src/status/attack_jump_aerial.rs @@ -2,7 +2,7 @@ use super::*; // FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL -unsafe extern "C" fn tantan_attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_s"), false, true); EFFECT_OFF_KIND(fighter, Hash40::new("tantan_jump_line_l"), false, true); EFFECT(fighter, Hash40::new("sys_jump_aerial"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); @@ -11,5 +11,5 @@ unsafe extern "C" fn tantan_attack_jump_aerial_main(fighter: &mut L2CFighterComm } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, tantan_attack_jump_aerial_main); + agent.status(Main, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP_AERIAL, attack_jump_aerial_main); } diff --git a/fighters/tantan/src/status/attack_landing.rs b/fighters/tantan/src/status/attack_landing.rs index dfe36deec6..f68fddc5f7 100644 --- a/fighters/tantan/src/status/attack_landing.rs +++ b/fighters/tantan/src/status/attack_landing.rs @@ -1,8 +1,9 @@ use super::*; +// FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT // ARMS land, prevents ARMDashing -unsafe extern "C" fn tantan_attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_landing_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.motion_frame() < 2.0 { sv_kinetic_energy!(set_speed_mul, fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); } @@ -11,5 +12,5 @@ unsafe extern "C" fn tantan_attack_landing_exec(fighter: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, tantan_attack_landing_exec); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_ATTACK_LANDING_LIGHT, attack_landing_exec); } diff --git a/fighters/tantan/src/status/attack_s3.rs b/fighters/tantan/src/status/attack_s3.rs index 99d47eaae0..ad0e37733f 100644 --- a/fighters/tantan/src/status/attack_s3.rs +++ b/fighters/tantan/src/status/attack_s3.rs @@ -1,16 +1,16 @@ use super::*; -//Ftilt// +// FIGHTER_STATUS_KIND_ATTACK_S3 -unsafe extern "C" fn tantan_attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s3_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_pre_AttackS3(); } -unsafe extern "C" fn tantan_attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s3_main(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_AttackS3_Main(); } -unsafe extern "C" fn tantan_attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if CancelModule::is_enable_cancel(fighter.module_accessor){ WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT); WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_JUMP_SQUAT_BUTTON); @@ -23,7 +23,7 @@ unsafe extern "C" fn tantan_attack_s3_exec(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_main); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, tantan_attack_s3_exec); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S3, attack_s3_exec); } diff --git a/fighters/tantan/src/status/attack_s4.rs b/fighters/tantan/src/status/attack_s4.rs index a1949e2314..80c8627c74 100644 --- a/fighters/tantan/src/status/attack_s4.rs +++ b/fighters/tantan/src/status/attack_s4.rs @@ -1,25 +1,27 @@ use super::*; -//Fsmash// +// FIGHTER_STATUS_KIND_ATTACK_S4_START -unsafe extern "C" fn tantan_attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_start_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_pre_AttackS4Start(); } -unsafe extern "C" fn tantan_attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_AttackS4Start(); } -unsafe extern "C" fn tantan_attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_S4_HOLD + +unsafe extern "C" fn attack_s4_hold_pre(fighter: &mut L2CFighterCommon) -> L2CValue { PLAY_SE(fighter, Hash40::new("se_common_smash_start")); return fighter.status_pre_AttackS4Hold(); } -unsafe extern "C" fn tantan_attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_hold_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_bind_address_call_status_AttackS4Hold as *const () as _)) } -pub unsafe extern "C" fn tantan_attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn attack_s4_hold_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); if 0 < bigFrame && bigFrame < 2 { WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); @@ -27,7 +29,9 @@ pub unsafe extern "C" fn tantan_attack_s4_hold_exec(fighter: &mut L2CFighterComm return 0.into() } -pub unsafe extern "C" fn tantan_attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_S4 + +pub unsafe extern "C" fn attack_s4_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); if 0 < bigFrame && bigFrame < 2 { WorkModule::set_int(fighter.module_accessor, 2,*FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); @@ -35,7 +39,7 @@ pub unsafe extern "C" fn tantan_attack_s4_exec(fighter: &mut L2CFighterCommon) - return 0.into() } -unsafe extern "C" fn tantan_attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn attack_s4_end(fighter: &mut L2CFighterCommon) -> L2CValue { let bigFrame = WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_ARM_L_BIG_FRAME); if fighter.motion_frame() > 16.0 && WorkModule::get_int(fighter.module_accessor, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R) == 0 { if bigFrame > 0 { @@ -48,11 +52,13 @@ unsafe extern "C" fn tantan_attack_s4_end(fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_pre,); - agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_START,tantan_attack_s4_start_main,); - agent.status(Pre,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_pre,); - agent.status(Main,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_main,); - agent.status(Exec,*FIGHTER_STATUS_KIND_ATTACK_S4_HOLD,tantan_attack_s4_hold_exec,); - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_exec); - agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, tantan_attack_s4_end); + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_START, attack_s4_start_main); + + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4_HOLD, attack_s4_hold_exec); + + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_exec); + agent.status(End, *FIGHTER_STATUS_KIND_ATTACK_S4, attack_s4_end); } diff --git a/fighters/tantan/src/status/catch.rs b/fighters/tantan/src/status/catch.rs index 319c3a990d..35b072b534 100644 --- a/fighters/tantan/src/status/catch.rs +++ b/fighters/tantan/src/status/catch.rs @@ -1,16 +1,18 @@ use super::*; -//Grab// +// FIGHTER_STATUS_KIND_CATCH -unsafe extern "C" fn tantan_catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_pre_Catch(); } -unsafe extern "C" fn tantan_catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn catch_main(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_Catch(); } -unsafe extern "C" fn tantan_catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_CATCH_PULL + +unsafe extern "C" fn catch_pull_main(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[PREV_STATUS_KIND] == FIGHTER_STATUS_KIND_CATCH { fighter.status_CatchPull_common(hash40("catch_wait").into()); ControlModule::reset_trigger(fighter.module_accessor); @@ -27,7 +29,7 @@ unsafe extern "C" fn catch_pull_main_loop(fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, tantan_catch_main); - agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,tantan_catch_pull_main); + agent.status(Pre, *FIGHTER_STATUS_KIND_CATCH, catch_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_CATCH, catch_main); + agent.status(Main,*FIGHTER_STATUS_KIND_CATCH_PULL,catch_pull_main); } diff --git a/fighters/tantan/src/status/jump.rs b/fighters/tantan/src/status/jump.rs index 2faf36daab..db86ad1774 100644 --- a/fighters/tantan/src/status/jump.rs +++ b/fighters/tantan/src/status/jump.rs @@ -1,8 +1,8 @@ use super::*; -// FIGHTER_STATUS_KIND_JUMP // +// FIGHTER_STATUS_KIND_JUMP -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let arg = !(fighter.global_table[PREV_STATUS_KIND] == FIGHTER_TANTAN_STATUS_KIND_ATTACK_JUMP); if fighter.status_pre_Jump_Common_param(L2CValue::Bool(arg)).get_bool() { @@ -32,9 +32,10 @@ pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { } } -//Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash +// FIGHTER_STATUS_KIND_JUMP_SQUAT +// Fixes bug related to pressing Jump and Catch at the same time results in an in-place wavedash -pub unsafe extern "C" fn pre_jump_squat(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_squat_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_button_on(Buttons::Catch) { fighter.change_status_req(*FIGHTER_STATUS_KIND_CATCH, false); return 1.into(); @@ -43,6 +44,6 @@ pub unsafe extern "C" fn pre_jump_squat(fighter: &mut L2CFighterCommon) -> L2CVa } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump); - agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, pre_jump_squat); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_SQUAT, jump_squat_pre); } diff --git a/fighters/tantan/src/status/special_hi.rs b/fighters/tantan/src/status/special_hi.rs index c9d18274fe..d096530c88 100644 --- a/fighters/tantan/src/status/special_hi.rs +++ b/fighters/tantan/src/status/special_hi.rs @@ -1,8 +1,8 @@ use super::*; -// up special +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND -unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if (fighter.motion_frame() <= 30.0) && !fighter.is_button_on(Buttons::Special) { @@ -12,7 +12,9 @@ unsafe extern "C" fn tantan_special_hi_exec(fighter: &mut L2CFighterCommon) -> L return smashline::original_status(Exec, fighter, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND)(fighter); } -unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR + +unsafe extern "C" fn special_hi_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_prev_status(*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND){ StatusModule::init_settings( fighter.module_accessor, @@ -46,7 +48,7 @@ unsafe extern "C" fn tantan_special_hi_air_pre(fighter: &mut L2CFighterCommon) - } } -unsafe extern "C" fn tantan_special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_hi_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let stick = Vector2f::new( fighter.stick_x(), fighter.stick_y() @@ -60,15 +62,17 @@ unsafe extern "C" fn tantan_special_hi_air_exec(fighter: &mut L2CFighterCommon) return 0.into(); } -unsafe extern "C" fn tantan_special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH + +unsafe extern "C" fn special_hi_air_reach_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let angle = WorkModule::get_float(fighter.module_accessor,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L); fighter.set_joint_rotate("claviclel", Vector3f::new(0.0, angle, 0.0)); return 0.into(); } pub fn install(agent: &mut Agent) { - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND,tantan_special_hi_exec,); - agent.status(Pre,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_pre,); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR,tantan_special_hi_air_exec); - agent.status(Exec,*FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH,tantan_special_hi_air_reach_exec); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_GROUND, special_hi_exec); + agent.status(Pre, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, special_hi_air_pre); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR, special_hi_air_exec); + agent.status(Exec, *FIGHTER_TANTAN_STATUS_KIND_SPECIAL_HI_AIR_REACH, special_hi_air_reach_exec); } diff --git a/fighters/tantan/src/status/special_n.rs b/fighters/tantan/src/status/special_n.rs index 792d198989..79146cf3c5 100644 --- a/fighters/tantan/src/status/special_n.rs +++ b/fighters/tantan/src/status/special_n.rs @@ -1,8 +1,8 @@ use super::*; -// Neutral Special (Air) +// FIGHTER_STATUS_KIND_SPECIAL_N -unsafe extern "C" fn tantan_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { return fighter.status_pre_AttackAir(); @@ -12,7 +12,7 @@ unsafe extern "C" fn tantan_special_n_pre(fighter: &mut L2CFighterCommon) -> L2C } } -unsafe extern "C" fn tantan_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { let fighter_log_attack_kind = *FIGHTER_LOG_ATTACK_KIND_ATTACK_AIR_F; @@ -28,7 +28,7 @@ unsafe extern "C" fn tantan_special_n_main(fighter: &mut L2CFighterCommon) -> L2 } } -unsafe extern "C" fn tantan_special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) { return 0.into(); } @@ -38,7 +38,7 @@ unsafe extern "C" fn tantan_special_n_exec(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_pre); - agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_main); - agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, tantan_special_n_exec); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); } diff --git a/fighters/toonlink/src/status/special_hi.rs b/fighters/toonlink/src/status/special_hi.rs index 912f4ae941..2f316fc362 100644 --- a/fighters/toonlink/src/status/special_hi.rs +++ b/fighters/toonlink/src/status/special_hi.rs @@ -1,6 +1,6 @@ use super::*; -// FIGHTER_STATUS_KIND_SPECIAL_HI // +// FIGHTER_STATUS_KIND_SPECIAL_HI pub unsafe extern "C" fn special_hi_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_AIR { diff --git a/fighters/trail/src/status/attack_air.rs b/fighters/trail/src/status/attack_air.rs index 38dcc530d4..016b6477db 100644 --- a/fighters/trail/src/status/attack_air.rs +++ b/fighters/trail/src/status/attack_air.rs @@ -1,7 +1,7 @@ use super::*; utils::import!(common::djc::attack_air_main_status); -// FIGHTER_STATUS_KIND_ATTACK_AIR // +// FIGHTER_STATUS_KIND_ATTACK_AIR unsafe extern "C" fn attack_air_pre(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE); diff --git a/fighters/trail/src/status/attack_lw4.rs b/fighters/trail/src/status/attack_lw4.rs index 5576f266d4..dd4a28a6bd 100644 --- a/fighters/trail/src/status/attack_lw4.rs +++ b/fighters/trail/src/status/attack_lw4.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_ATTACK_LW4 + // lets down smash travel past ledges during a DACUS pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); diff --git a/fighters/trail/src/status/jump_aerial.rs b/fighters/trail/src/status/jump_aerial.rs index ff50b3f7fd..270e680296 100644 --- a/fighters/trail/src/status/jump_aerial.rs +++ b/fighters/trail/src/status/jump_aerial.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_JUMP_AERIAL + // preserve momentum if double jumping out of sonic blade unsafe extern "C" fn jump_aerial_main(fighter: &mut L2CFighterCommon) -> L2CValue { let x_speed = VarModule::get_float(fighter.battle_object, vars::trail::instance::JUMP_CANCEL_MOMENTUM_HANDLER); diff --git a/fighters/trail/src/status/special_n.rs b/fighters/trail/src/status/special_n.rs index 4e2ae77cb7..a49fe53ef5 100644 --- a/fighters/trail/src/status/special_n.rs +++ b/fighters/trail/src/status/special_n.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_N + // swapping the cycle order of thundaga and blizzaga unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -27,6 +29,8 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { return 1.into(); } +// FIGHTER_TRAIL_STATUS_KIND_SPECIAL_N2 + unsafe extern "C" fn special_n2_pre(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_pre_SpecialNCommon(); StatusModule::init_settings( diff --git a/fighters/trail/src/status/special_s.rs b/fighters/trail/src/status/special_s.rs index a2d3e0d744..0b17605ee6 100644 --- a/fighters/trail/src/status/special_s.rs +++ b/fighters/trail/src/status/special_s.rs @@ -1,5 +1,7 @@ use super::*; +// FIGHTER_STATUS_KIND_SPECIAL_S + unsafe extern "C" fn special_s_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_change_motion_by_situation(Hash40::new("special_s_start").into(), Hash40::new("special_air_s_start").into(), false.into()); fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_s").into()); diff --git a/fighters/wario/src/status/attack_air.rs b/fighters/wario/src/status/attack_air.rs index a47a169f5e..3882320544 100644 --- a/fighters/wario/src/status/attack_air.rs +++ b/fighters/wario/src/status/attack_air.rs @@ -1,6 +1,8 @@ use super::*; -unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_ATTACK_AIR + +unsafe extern "C" fn attack_air_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let dairAnim = Hash40::new("attack_air_lw"); let dairRiseAnim = Hash40::new("attack_air_lw2"); @@ -16,12 +18,14 @@ unsafe extern "C" fn wario_attack_air_exec(fighter: &mut L2CFighterCommon) -> L2 return false.into(); } -unsafe extern "C" fn wario_landing_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { +// FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR + +unsafe extern "C" fn landing_attack_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); return false.into(); } pub fn install(agent: &mut Agent) { - agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, wario_attack_air_exec); - agent.status(End,*FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR,wario_landing_attack_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); + agent.status(End, *FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR, landing_attack_air_end); } diff --git a/fighters/wario/src/status/catch_attack.rs b/fighters/wario/src/status/catch_attack.rs index 9e72a39d45..89a68cfb84 100644 --- a/fighters/wario/src/status/catch_attack.rs +++ b/fighters/wario/src/status/catch_attack.rs @@ -1,6 +1,8 @@ use super::*; -//Force opponent rotation +// FIGHTER_STATUS_KIND_CATCH_ATTACK + +// Force opponent rotation unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -17,7 +19,7 @@ unsafe extern "C" fn catch_attack_exec(fighter: &mut L2CFighterCommon) -> L2CVal return false.into(); } -//Reset opponent rotation +// Reset opponent rotation unsafe extern "C" fn catch_attack_end(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); diff --git a/fighters/wario/src/status/special_hi.rs b/fighters/wario/src/status/special_hi.rs index 6081fbafff..9a14041d1a 100644 --- a/fighters/wario/src/status/special_hi.rs +++ b/fighters/wario/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP @@ -48,6 +47,6 @@ pub unsafe extern "C" fn fall_pre(fighter: &mut L2CFighterCommon) -> L2CValue { } pub fn install(agent: &mut Agent) { - agent.status( Main,*FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP,special_hi_jump_main,); + agent.status( Main, *FIGHTER_WARIO_STATUS_KIND_SPECIAL_HI_JUMP, special_hi_jump_main); agent.status(Pre, *FIGHTER_STATUS_KIND_FALL, fall_pre); } diff --git a/fighters/wario/src/status/special_s.rs b/fighters/wario/src/status/special_s.rs index bab7c16003..f3c5f21980 100644 --- a/fighters/wario/src/status/special_s.rs +++ b/fighters/wario/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START @@ -15,5 +14,5 @@ pub unsafe extern "C" fn special_s_escape_start_exit(weapon: &mut L2CWeaponCommo } pub fn install(agent: &mut Agent) { - agent.status(Exit,*WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START,special_s_escape_start_exit,); + agent.status(Exit, *WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START, special_s_escape_start_exit); } diff --git a/fighters/wario/src/status/throw_kirby.rs b/fighters/wario/src/status/throw_kirby.rs index 91b4727194..dbad4cf9c8 100644 --- a/fighters/wario/src/status/throw_kirby.rs +++ b/fighters/wario/src/status/throw_kirby.rs @@ -2,13 +2,13 @@ use super::*; // FIGHTER_STATUS_KIND_THROW_KIRBY -unsafe extern "C" fn wario_throwk_pre(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_pre(fighter: &mut L2CFighterCommon) -> L2CValue { let boma = fighter.boma(); return fighter.status_pre_ThrowKirby(); } -unsafe extern "C" fn wario_throwk_init(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_init(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_status_uniq_process_ThrowKirby_initStatus(); let hitStop = 8; @@ -17,21 +17,21 @@ unsafe extern "C" fn wario_throwk_init(fighter: &mut L2CFighterCommon) -> L2CVal return false.into(); } -unsafe extern "C" fn wario_throwk_main(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_main(fighter: &mut L2CFighterCommon) -> L2CValue { return fighter.status_ThrowKirby(); } -unsafe extern "C" fn wario_throwk_exit(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_exit(fighter: &mut L2CFighterCommon) -> L2CValue { EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); return fighter.sub_status_uniq_process_ThrowKirby_exitStatus(); } -unsafe extern "C" fn wario_throwk_end(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_end(fighter: &mut L2CFighterCommon) -> L2CValue { EFFECT_OFF_KIND(fighter, Hash40::new("sys_merikomi"),false,true); return fighter.status_end_ThrowKirby(); } -unsafe extern "C" fn wario_throwk_exec(fighter: &mut L2CFighterCommon) -> L2CValue { +unsafe extern "C" fn throw_kirby_exec(fighter: &mut L2CFighterCommon) -> L2CValue { let FRAME_FALL = 48.0; let FRAME_FALLLOOP = FRAME_FALL+2.0; let FRAME_LAND = 55.0; @@ -85,10 +85,10 @@ unsafe extern "C" fn wario_throwk_exec(fighter: &mut L2CFighterCommon) -> L2CVal } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_pre); - agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_init); - agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_main); - agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exit); - agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_end); - agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, wario_throwk_exec); + agent.status(Pre, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_init); + agent.status(Main, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_main); + agent.status(Exit, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_exit); + agent.status(End, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_end); + agent.status(Exec, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_exec); } diff --git a/fighters/wiifit/src/status/special_s.rs b/fighters/wiifit/src/status/special_s.rs index 54aeaccd59..a9df09b216 100644 --- a/fighters/wiifit/src/status/special_s.rs +++ b/fighters/wiifit/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_S diff --git a/fighters/wolf/src/status/special_hi.rs b/fighters/wolf/src/status/special_hi.rs index 4198432a86..5faf4cea9f 100644 --- a/fighters/wolf/src/status/special_hi.rs +++ b/fighters/wolf/src/status/special_hi.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_HI diff --git a/fighters/wolf/src/status/special_lw.rs b/fighters/wolf/src/status/special_lw.rs index b5ed7700e3..68ced523a6 100644 --- a/fighters/wolf/src/status/special_lw.rs +++ b/fighters/wolf/src/status/special_lw.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; // FIGHTER_STATUS_KIND_SPECIAL_LW diff --git a/fighters/wolf/src/status/special_s.rs b/fighters/wolf/src/status/special_s.rs index e32b304dfb..97037c80fc 100644 --- a/fighters/wolf/src/status/special_s.rs +++ b/fighters/wolf/src/status/special_s.rs @@ -1,5 +1,4 @@ use super::*; -use globals::*; use vars::wolf::status::*; use consts::statuses::wolf::*; From db5b67e382d501ca637025029001243ce4995edb Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 28 Mar 2024 19:28:11 -0400 Subject: [PATCH 157/172] ness is back --- src/fighters.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fighters.rs b/src/fighters.rs index 70eaad44ef..5c7c062dea 100644 --- a/src/fighters.rs +++ b/src/fighters.rs @@ -63,6 +63,7 @@ pub fn install() { miigunner = "miigunner", miiswordsman = "miiswordsman", murabito = "murabito", + ness = "ness", packun = "packun", pacman = "pacman", palutena = "palutena", From 1be37e2717e746b9bf69812afdb7a09e9541f4a8 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 28 Mar 2024 19:43:57 -0400 Subject: [PATCH 158/172] whee fixes --- fighters/koopa/src/breath/mod.rs | 2 + fighters/koopa/src/breath/status.rs | 103 ++++++++++++++++++ fighters/koopa/src/status/special_n.rs | 99 ----------------- fighters/wario/src/lib.rs | 4 + fighters/wario/src/status/mod.rs | 2 - fighters/wario/src/wariobike/mod.rs | 9 ++ .../special_s.rs => wariobike/status.rs} | 0 7 files changed, 118 insertions(+), 101 deletions(-) create mode 100644 fighters/koopa/src/breath/status.rs create mode 100644 fighters/wario/src/wariobike/mod.rs rename fighters/wario/src/{status/special_s.rs => wariobike/status.rs} (100%) diff --git a/fighters/koopa/src/breath/mod.rs b/fighters/koopa/src/breath/mod.rs index b45fe0a848..c2662ffb89 100644 --- a/fighters/koopa/src/breath/mod.rs +++ b/fighters/koopa/src/breath/mod.rs @@ -1,9 +1,11 @@ use super::*; mod acmd; +mod status; pub fn install() { let agent = &mut Agent::new("koopa_breath"); acmd::install(agent); + status::instal(agent); agent.install(); } \ No newline at end of file diff --git a/fighters/koopa/src/breath/status.rs b/fighters/koopa/src/breath/status.rs new file mode 100644 index 0000000000..947fc0292c --- /dev/null +++ b/fighters/koopa/src/breath/status.rs @@ -0,0 +1,103 @@ +use super::*; + +// FIREBREATH +unsafe extern "C" fn breath_move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { + let boma = weapon.boma(); + let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let is_fireball = WorkModule::get_float(owner_boma,*FIGHTER_KOOPA_STATUS_BREATH_WORK_FLOAT_GENE_ANGLE) > 360.0; + if (!is_fireball){ + return smashline::original_status(Main, weapon, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE)(weapon); + } + else{ + WorkModule::set_customize_no(weapon.module_accessor, 1, 0); + PostureModule::set_scale(weapon.module_accessor, 1.0, false); + + MotionModule::change_motion( + weapon.module_accessor, + Hash40::new("max"), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + let param_life = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("life")) as i32; + WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE); + + let param_hit_decrease = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("hit_frames")) as i32; + WorkModule::set_int(weapon.module_accessor, param_hit_decrease, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); + + KineticModule::enable_energy(weapon.module_accessor, *WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL); + let lr = PostureModule::lr(weapon.module_accessor); + let param_speed = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("max_speed")); + WorkModule::set_float(weapon.module_accessor, param_speed, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_FLOAT_SPEED_MUL); + + sv_kinetic_energy!( + set_speed, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + param_speed * lr, + 0.0 + ); + sv_kinetic_energy!( + set_stable_speed, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + -1.0, + -1.0 + ); + sv_kinetic_energy!( + set_accel, + weapon, + WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, + 0.0, + 0.0 + ); + + weapon.global_table[SUB_STATUS].assign(&L2CValue::Ptr(breath_move_max_substatus as *const () as _)); + weapon.fastshift(L2CValue::Ptr(breath_move_max_main_loop as *const () as _)); + } + 0.into() +} + +unsafe extern "C" fn breath_move_max_substatus(weapon: &mut L2CWeaponCommon, param_3: L2CValue) -> L2CValue { + if param_3.get_bool() { + WorkModule::dec_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + 0.into() +} + +unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { + if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) + { + let param_hit_decrease = WorkModule::get_int(weapon.module_accessor, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); + WorkModule::sub_int(weapon.module_accessor, param_hit_decrease,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); + } + let life = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); + if life <= 0 { + EFFECT_OFF_KIND(weapon,Hash40::new("koopa_breath_m_fire"),false,false); + EFFECT_OFF_KIND(weapon,Hash40::new("sys_damage_fire_fly"),false,false); + AttackModule::clear_all(weapon.module_accessor); + + MotionModule::change_motion( + weapon.module_accessor, + Hash40::new("end"), + 0.0, + 1.0, + false, + 0.0, + false, + false + ); + StatusModule::change_status_force(weapon.module_accessor, WEAPON_KOOPA_BREATH_STATUS_KIND_NONE.into(), false.into()); + return 0.into(); + } + + 0.into() +} + +pub fn install(agent: &mut Agent) { + agent.status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main); +} \ No newline at end of file diff --git a/fighters/koopa/src/status/special_n.rs b/fighters/koopa/src/status/special_n.rs index 85c8f4da3c..6817cbe432 100644 --- a/fighters/koopa/src/status/special_n.rs +++ b/fighters/koopa/src/status/special_n.rs @@ -90,107 +90,8 @@ unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CVa } } -// FIREBREATH -unsafe extern "C" fn breath_move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { - let boma = weapon.boma(); - let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let is_fireball = WorkModule::get_float(owner_boma,*FIGHTER_KOOPA_STATUS_BREATH_WORK_FLOAT_GENE_ANGLE) > 360.0; - if (!is_fireball){ - return smashline::original_status(Main, weapon, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE)(weapon); - } - else{ - WorkModule::set_customize_no(weapon.module_accessor, 1, 0); - PostureModule::set_scale(weapon.module_accessor, 1.0, false); - - MotionModule::change_motion( - weapon.module_accessor, - Hash40::new("max"), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - let param_life = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("life")) as i32; - WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - WorkModule::set_int(weapon.module_accessor, param_life, *WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE); - - let param_hit_decrease = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("hit_frames")) as i32; - WorkModule::set_int(weapon.module_accessor, param_hit_decrease, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); - - KineticModule::enable_energy(weapon.module_accessor, *WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL); - let lr = PostureModule::lr(weapon.module_accessor); - let param_speed = WorkModule::get_param_float(weapon.module_accessor, hash40("param_breath"), hash40("max_speed")); - WorkModule::set_float(weapon.module_accessor, param_speed, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_FLOAT_SPEED_MUL); - - sv_kinetic_energy!( - set_speed, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - param_speed * lr, - 0.0 - ); - sv_kinetic_energy!( - set_stable_speed, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - -1.0, - -1.0 - ); - sv_kinetic_energy!( - set_accel, - weapon, - WEAPON_KINETIC_ENERGY_RESERVE_ID_NORMAL, - 0.0, - 0.0 - ); - - weapon.global_table[SUB_STATUS].assign(&L2CValue::Ptr(breath_move_max_substatus as *const () as _)); - weapon.fastshift(L2CValue::Ptr(breath_move_max_main_loop as *const () as _)); - } - 0.into() -} - -unsafe extern "C" fn breath_move_max_substatus(weapon: &mut L2CWeaponCommon, param_3: L2CValue) -> L2CValue { - if param_3.get_bool() { - WorkModule::dec_int(weapon.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - 0.into() -} - -unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> L2CValue { - if AttackModule::is_infliction(weapon.module_accessor, *COLLISION_KIND_MASK_HIT) - { - let param_hit_decrease = WorkModule::get_int(weapon.module_accessor, *WEAPON_KOOPA_BREATH_INSTANCE_WORK_ID_INT_HIT_FRAME); - WorkModule::sub_int(weapon.module_accessor, param_hit_decrease,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); - } - let life = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_LIFE); - if life <= 0 { - EFFECT_OFF_KIND(weapon,Hash40::new("koopa_breath_m_fire"),false,false); - EFFECT_OFF_KIND(weapon,Hash40::new("sys_damage_fire_fly"),false,false); - AttackModule::clear_all(weapon.module_accessor); - - MotionModule::change_motion( - weapon.module_accessor, - Hash40::new("end"), - 0.0, - 1.0, - false, - 0.0, - false, - false - ); - StatusModule::change_status_force(weapon.module_accessor, WEAPON_KOOPA_BREATH_STATUS_KIND_NONE.into(), false.into()); - return 0.into(); - } - - 0.into() -} - pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); agent.status(Exec, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_exec); agent.status(ExecStop, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_execstop); - agent.status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main); } \ No newline at end of file diff --git a/fighters/wario/src/lib.rs b/fighters/wario/src/lib.rs index 6acb299c80..5674ab1a1b 100644 --- a/fighters/wario/src/lib.rs +++ b/fighters/wario/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod opff; pub mod status; +mod wariobike; + use smash::{ lib::{ L2CValue, @@ -45,4 +47,6 @@ pub fn install() { opff::install(agent); status::install(agent); agent.install(); + + wariobike::install(); } diff --git a/fighters/wario/src/status/mod.rs b/fighters/wario/src/status/mod.rs index 27ee068664..a24d9acc00 100644 --- a/fighters/wario/src/status/mod.rs +++ b/fighters/wario/src/status/mod.rs @@ -6,7 +6,6 @@ mod attack_air; mod catch_attack; mod throw_kirby; -mod special_s; mod special_hi; pub const THROW_HI_STATUS_KIND: i32 = 0x47; @@ -22,6 +21,5 @@ pub fn install(agent: &mut Agent) { catch_attack::install(agent); throw_kirby::install(agent); - special_s::install(agent); special_hi::install(agent); } diff --git a/fighters/wario/src/wariobike/mod.rs b/fighters/wario/src/wariobike/mod.rs new file mode 100644 index 0000000000..8f36818944 --- /dev/null +++ b/fighters/wario/src/wariobike/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod status; + +pub fn install() { + let agent = &mut Agent::new("wario_wariobike"); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/wario/src/status/special_s.rs b/fighters/wario/src/wariobike/status.rs similarity index 100% rename from fighters/wario/src/status/special_s.rs rename to fighters/wario/src/wariobike/status.rs From 66c20c265c5e197449044d2c7604e216e9940330 Mon Sep 17 00:00:00 2001 From: WuBoytH Date: Thu, 28 Mar 2024 19:54:25 -0400 Subject: [PATCH 159/172] Update mod.rs --- fighters/koopa/src/breath/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/koopa/src/breath/mod.rs b/fighters/koopa/src/breath/mod.rs index c2662ffb89..e36620a4b2 100644 --- a/fighters/koopa/src/breath/mod.rs +++ b/fighters/koopa/src/breath/mod.rs @@ -6,6 +6,6 @@ mod status; pub fn install() { let agent = &mut Agent::new("koopa_breath"); acmd::install(agent); - status::instal(agent); + status::install(agent); agent.install(); } \ No newline at end of file From c80b00c70002530790802ef18119467409447345 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 19:15:07 -0500 Subject: [PATCH 160/172] Update status.rs --- fighters/koopa/src/breath/status.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fighters/koopa/src/breath/status.rs b/fighters/koopa/src/breath/status.rs index 947fc0292c..fb50932cbd 100644 --- a/fighters/koopa/src/breath/status.rs +++ b/fighters/koopa/src/breath/status.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; // FIREBREATH unsafe extern "C" fn breath_move_main(weapon: &mut L2CWeaponCommon) -> L2CValue { @@ -100,4 +101,4 @@ unsafe extern "C" fn breath_move_max_main_loop(weapon: &mut L2CWeaponCommon) -> pub fn install(agent: &mut Agent) { agent.status(Main, *WEAPON_KOOPA_BREATH_STATUS_KIND_MOVE, breath_move_main); -} \ No newline at end of file +} From e8cdce1de9f12456abb218ba68ca10a97f955a73 Mon Sep 17 00:00:00 2001 From: mokl Date: Thu, 28 Mar 2024 19:52:35 -0500 Subject: [PATCH 161/172] man --- fighters/wario/src/wariobike/status.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/fighters/wario/src/wariobike/status.rs b/fighters/wario/src/wariobike/status.rs index f3c5f21980..498cf223cb 100644 --- a/fighters/wario/src/wariobike/status.rs +++ b/fighters/wario/src/wariobike/status.rs @@ -1,4 +1,5 @@ use super::*; +use globals::*; // WEAPON_WARIO_WARIOBIKE_STATUS_KIND_SPECIAL_S_ESCAPE_START From 1b6c09db184fd27d1b2966eb453c9260e390e9cd Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 07:08:30 -0500 Subject: [PATCH 162/172] fix ness yoyo --- fighters/ness/src/acmd/smashes.rs | 56 ++++++++++---------- fighters/ness/src/lib.rs | 4 +- fighters/ness/src/{yoyo => yoyohead}/acmd.rs | 4 +- fighters/ness/src/{yoyo => yoyohead}/mod.rs | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) rename fighters/ness/src/{yoyo => yoyohead}/acmd.rs (97%) rename fighters/ness/src/{yoyo => yoyohead}/mod.rs (65%) diff --git a/fighters/ness/src/acmd/smashes.rs b/fighters/ness/src/acmd/smashes.rs index 45d0674925..93fa2154c0 100644 --- a/fighters/ness/src/acmd/smashes.rs +++ b/fighters/ness/src/acmd/smashes.rs @@ -37,6 +37,32 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 1.0); + FT_MOTION_RATE(agent, 0.74); + frame(lua_state, 3.0); + if is_excute(agent) { + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } + frame(lua_state, 11.0); + if is_excute(agent) { + ArticleModule::shoot(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + } + frame(lua_state, 12.0); + FT_MOTION_RATE(agent, 1); + if is_excute(agent) { + WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + } + frame(lua_state, 56.0); + if is_excute(agent) { + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + } +} + unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -63,33 +89,7 @@ unsafe extern "C" fn expression_attackhi4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 1.0); - FT_MOTION_RATE(agent, 0.74); - frame(lua_state, 3.0); - if is_excute(agent) { - ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - frame(lua_state, 11.0); - if is_excute(agent) { - ArticleModule::shoot(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); - } - frame(lua_state, 12.0); - FT_MOTION_RATE(agent, 1); - if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); - } - frame(lua_state, 56.0); - if is_excute(agent) { - ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } -} - -unsafe extern "C" fn game_attacklw4 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -160,8 +160,8 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { pub fn install(agent: &mut Agent) { agent.acmd("game_attacks4", game_attacks4); - agent.acmd("expression_attackhi4", expression_attackhi4); agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("expression_attackhi4", expression_attackhi4); agent.acmd("game_attacklw4", game_attacklw4); agent.acmd("expression_attacklw4", expression_attacklw4); diff --git a/fighters/ness/src/lib.rs b/fighters/ness/src/lib.rs index 9fcb992f33..1f425ec95b 100644 --- a/fighters/ness/src/lib.rs +++ b/fighters/ness/src/lib.rs @@ -12,7 +12,7 @@ pub mod status; mod pkfire; mod pkflash; mod pkthunder; -mod yoyo; +mod yoyohead; use smash::{ lib::{ @@ -56,5 +56,5 @@ pub fn install() { pkfire::install(); pkflash::install(); pkthunder::install(); - yoyo::install(); + yoyohead::install(); } \ No newline at end of file diff --git a/fighters/ness/src/yoyo/acmd.rs b/fighters/ness/src/yoyohead/acmd.rs similarity index 97% rename from fighters/ness/src/yoyo/acmd.rs rename to fighters/ness/src/yoyohead/acmd.rs index f8ed9bc81d..69c2c04c37 100644 --- a/fighters/ness/src/yoyo/acmd.rs +++ b/fighters/ness/src/yoyohead/acmd.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -21,7 +21,7 @@ unsafe extern "C" fn game_attackhi4 (agent: &mut L2CAgentBase) { frame(lua_state, 37.0); } -unsafe extern "C" fn game_attacklw4 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 11.0); diff --git a/fighters/ness/src/yoyo/mod.rs b/fighters/ness/src/yoyohead/mod.rs similarity index 65% rename from fighters/ness/src/yoyo/mod.rs rename to fighters/ness/src/yoyohead/mod.rs index 34c5c2de5d..77a1ae2e20 100644 --- a/fighters/ness/src/yoyo/mod.rs +++ b/fighters/ness/src/yoyohead/mod.rs @@ -3,7 +3,7 @@ use super::*; mod acmd; pub fn install() { - let agent = &mut Agent::new("ness_yoyo"); + let agent = &mut Agent::new("ness_yoyohead"); acmd::install(agent); agent.install(); } \ No newline at end of file From 7822f5c9b8950e86943738cbb29ed907739fa0e1 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 08:08:01 -0500 Subject: [PATCH 163/172] article cleanup --- .../src/bullet/{acmd/specials.rs => acmd.rs} | 0 fighters/buddy/src/bullet/acmd/mod.rs | 7 -- .../src/pad/{acmd/specials.rs => acmd.rs} | 0 fighters/buddy/src/pad/acmd/mod.rs | 7 -- .../src/gordo/{acmd/specials.rs => acmd.rs} | 0 fighters/dedede/src/gordo/acmd/mod.rs | 7 -- .../src/star/{acmd/specials.rs => acmd.rs} | 0 fighters/dedede/src/star/acmd/mod.rs | 7 -- fighters/edge/src/acmd/other.rs | 25 ----- .../boomerang/{acmd/specials.rs => acmd.rs} | 0 fighters/link/src/boomerang/acmd/mod.rs | 7 -- fighters/lucario/src/auraball/mod.rs | 9 ++ fighters/lucario/src/auraball/status.rs | 92 ++++++++++++++++ fighters/lucario/src/lib.rs | 6 ++ fighters/lucario/src/status/special_n.rs | 87 --------------- fighters/miiswordsman/src/acmd/other.rs | 102 ------------------ fighters/wario/src/lib.rs | 2 + 17 files changed, 109 insertions(+), 249 deletions(-) rename fighters/buddy/src/bullet/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/buddy/src/bullet/acmd/mod.rs rename fighters/buddy/src/pad/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/buddy/src/pad/acmd/mod.rs rename fighters/dedede/src/gordo/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/dedede/src/gordo/acmd/mod.rs rename fighters/dedede/src/star/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/dedede/src/star/acmd/mod.rs rename fighters/link/src/boomerang/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/link/src/boomerang/acmd/mod.rs create mode 100644 fighters/lucario/src/auraball/mod.rs create mode 100644 fighters/lucario/src/auraball/status.rs diff --git a/fighters/buddy/src/bullet/acmd/specials.rs b/fighters/buddy/src/bullet/acmd.rs similarity index 100% rename from fighters/buddy/src/bullet/acmd/specials.rs rename to fighters/buddy/src/bullet/acmd.rs diff --git a/fighters/buddy/src/bullet/acmd/mod.rs b/fighters/buddy/src/bullet/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/buddy/src/bullet/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/buddy/src/pad/acmd/specials.rs b/fighters/buddy/src/pad/acmd.rs similarity index 100% rename from fighters/buddy/src/pad/acmd/specials.rs rename to fighters/buddy/src/pad/acmd.rs diff --git a/fighters/buddy/src/pad/acmd/mod.rs b/fighters/buddy/src/pad/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/buddy/src/pad/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/dedede/src/gordo/acmd/specials.rs b/fighters/dedede/src/gordo/acmd.rs similarity index 100% rename from fighters/dedede/src/gordo/acmd/specials.rs rename to fighters/dedede/src/gordo/acmd.rs diff --git a/fighters/dedede/src/gordo/acmd/mod.rs b/fighters/dedede/src/gordo/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/dedede/src/gordo/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/dedede/src/star/acmd/specials.rs b/fighters/dedede/src/star/acmd.rs similarity index 100% rename from fighters/dedede/src/star/acmd/specials.rs rename to fighters/dedede/src/star/acmd.rs diff --git a/fighters/dedede/src/star/acmd/mod.rs b/fighters/dedede/src/star/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/dedede/src/star/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index 4997cf69de..a005bed779 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -81,31 +81,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn edge_flash_game_attack(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; - let edge = utils::util::get_battle_object_from_id(owner_id); - if VarModule::is_flag(edge, vars::edge::status::FLASH_HOLD) { - let pos_x = PostureModule::pos_x(boma); - let pos_y = PostureModule::pos_y(boma); - let facing = PostureModule::lr(boma); - PostureModule::set_pos(boma, &Vector3f::new(pos_x + (35.0 * PostureModule::lr(boma)), pos_y, 0.0)); - } - ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 366, 65, 60, 40, 12.0, 0.0, 1.5, 0.0, None, None, None, 0.8, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, -1, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 15.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - ATTACK(agent, 0, 0, Hash40::new("top"), 6.5, 60, 70, 0, 80, 13.0, 0.0, 1.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -3, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_sting_flash"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 16.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); - } -} - unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/link/src/boomerang/acmd/specials.rs b/fighters/link/src/boomerang/acmd.rs similarity index 100% rename from fighters/link/src/boomerang/acmd/specials.rs rename to fighters/link/src/boomerang/acmd.rs diff --git a/fighters/link/src/boomerang/acmd/mod.rs b/fighters/link/src/boomerang/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/link/src/boomerang/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/lucario/src/auraball/mod.rs b/fighters/lucario/src/auraball/mod.rs new file mode 100644 index 0000000000..74472bf692 --- /dev/null +++ b/fighters/lucario/src/auraball/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod status; + +pub fn install() { + let agent = &mut Agent::new("lucario_auraball"); + status::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/lucario/src/auraball/status.rs b/fighters/lucario/src/auraball/status.rs new file mode 100644 index 0000000000..12caa5e386 --- /dev/null +++ b/fighters/lucario/src/auraball/status.rs @@ -0,0 +1,92 @@ +use super::*; +use globals::*; + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT + +pub unsafe extern "C" fn shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { + let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + VarModule::set_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP, VarModule::is_flag(owner_module_accessor.object(), vars::lucario::instance::IS_POWERED_UP)); + //println!("lucario_auraball is_powered_up: {}", VarModule::is_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP)); + smashline::original_status(Pre, fighter, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT)(fighter) +} + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_START + +// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +// pub unsafe fn auraball_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("start"), 0.0, 1.0, false, 0.0, false, false); +// auraball_set_scale(fighter); +// fighter.fastshift(L2CValue::Ptr(auraball_start_main_loop as *const () as _)) +// } + +// unsafe extern "C" fn auraball_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// return 0.into(); +// } + +// WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE + +// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] +// pub unsafe fn auraball_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// let motion_kind = if charge_frame >= max_charge_frame {Hash40::new("charge_max")} else {Hash40::new("charge")}; +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge"), 0.0, 1.0, false, 0.0, false, false); +// auraball_set_scale(fighter); +// fighter.fastshift(L2CValue::Ptr(auraball_charge_main_loop as *const () as _)) +// } + +// unsafe extern "C" fn auraball_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { +// let motion_kind = MotionModule::motion_kind(fighter.module_accessor); +// if motion_kind != hash40("charge") { +// return 0.into(); +// } +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// if charge_frame >= max_charge_frame { +// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge_max"), 0.0, 1.0, false, 0.0, false, false); +// } +// return 0.into(); +// } + +// unsafe extern "C" fn auraball_set_scale(fighter: &mut L2CFighterCommon) { +// let original_size = fighter.get_param_float("param_auraball", "original_size"); +// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); +// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); +// let charge_ratio = (charge_frame as f32) / (max_charge_frame as f32); +// println!("charge_ratio: {}", charge_ratio); + +// let mut hvar4 = ""; +// let mut min_scale = 0.0; +// let mut max_scale = 0.0; +// if StatusModule::status_kind(fighter.module_accessor) == *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT { +// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale_shoot"); +// hvar4 = "charge_max_scale_shoot"; +// } else { +// hvar4 = "charge_max_scale_mid"; +// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale"); +// if 1.0 <= charge_ratio { +// println!("if conditional"); +// max_scale = fighter.get_param_float("param_auraball", "charge_max_scale"); +// let fvar9 = fighter.get_param_float("param_auraball", "charge_max_scale_mid"); +// fighter.set_float(fvar9 / max_scale, *WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_EFFECT_JOINT_SCALE); +// hvar4 = "charge_max_scale"; +// } +// } +// max_scale = fighter.get_param_float("param_auraball", hvar4); + +// let work_scale = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_SCALE); +// let work_aurapower = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_AURAPOWER); +// let scale_mul = fighter.get_param_float("param_auraball", "scale_mul"); +// let scale_add = fighter.get_param_float("param_auraball", "scale_add"); + +// let scale = work_scale * (1.0 / original_size) * +// ((charge_ratio * max_scale + (1.0 - charge_ratio) * min_scale) * work_aurapower * scale_mul + scale_add); +// println!("scale: {}, work_scale: {}, original_size: {}, charge_ratio: {}, max_scale: {}, min_scale: {}, work_aurapower: {}, scale_mul: {}, scale_add: {}", +// scale, work_scale, original_size, charge_ratio, max_scale, min_scale, work_aurapower, scale_mul, scale_add); +// PostureModule::set_scale(fighter.module_accessor, scale, false); + +// } + +pub fn install(agent: &mut Agent) { + agent.status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, shoot_pre); +} \ No newline at end of file diff --git a/fighters/lucario/src/lib.rs b/fighters/lucario/src/lib.rs index f168a6a8be..5329f81e88 100644 --- a/fighters/lucario/src/lib.rs +++ b/fighters/lucario/src/lib.rs @@ -7,6 +7,10 @@ pub mod acmd; pub mod opff; pub mod status; +// articles + +mod auraball; + use smash::{ lib::{ L2CValue, @@ -45,4 +49,6 @@ pub fn install() { opff::install(agent); status::install(agent); agent.install(); + + auraball::install(); } \ No newline at end of file diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index af8f0dfeff..f930769638 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -12,92 +12,6 @@ unsafe extern "C" fn special_n_shoot_end(fighter: &mut L2CFighterCommon) -> L2CV 0.into() } -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT - -pub unsafe extern "C" fn auraball_shoot_pre(fighter: &mut L2CFighterCommon) -> L2CValue { - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(fighter.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - VarModule::set_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP, VarModule::is_flag(owner_module_accessor.object(), vars::lucario::instance::IS_POWERED_UP)); - println!("lucario_auraball is_powered_up: {}", VarModule::is_flag(fighter.battle_object, vars::lucario::instance::IS_POWERED_UP)); - smashline::original_status(Pre, fighter, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT)(fighter) -} - -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_START - -// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// pub unsafe fn auraball_start_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("start"), 0.0, 1.0, false, 0.0, false, false); -// auraball_set_scale(fighter); -// fighter.fastshift(L2CValue::Ptr(auraball_start_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn auraball_start_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// return 0.into(); -// } - -// WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE - -// #[status_script(agent = "lucario_auraball", status = WEAPON_LUCARIO_AURABALL_STATUS_KIND_CHARGE, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)] -// pub unsafe fn auraball_charge_main(fighter: &mut L2CFighterCommon) -> L2CValue { -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// let motion_kind = if charge_frame >= max_charge_frame {Hash40::new("charge_max")} else {Hash40::new("charge")}; -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge"), 0.0, 1.0, false, 0.0, false, false); -// auraball_set_scale(fighter); -// fighter.fastshift(L2CValue::Ptr(auraball_charge_main_loop as *const () as _)) -// } - -// unsafe extern "C" fn auraball_charge_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { -// let motion_kind = MotionModule::motion_kind(fighter.module_accessor); -// if motion_kind != hash40("charge") { -// return 0.into(); -// } -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// if charge_frame >= max_charge_frame { -// MotionModule::change_motion(fighter.module_accessor, Hash40::new("charge_max"), 0.0, 1.0, false, 0.0, false, false); -// } -// return 0.into(); -// } - -// unsafe extern "C" fn auraball_set_scale(fighter: &mut L2CFighterCommon) { -// let original_size = fighter.get_param_float("param_auraball", "original_size"); -// let max_charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_PARAM_MAX_CHARGE_FRAME); -// let charge_frame = fighter.get_int(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_INT_CHARGE_FRAME); -// let charge_ratio = (charge_frame as f32) / (max_charge_frame as f32); -// println!("charge_ratio: {}", charge_ratio); - -// let mut hvar4 = ""; -// let mut min_scale = 0.0; -// let mut max_scale = 0.0; -// if StatusModule::status_kind(fighter.module_accessor) == *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT { -// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale_shoot"); -// hvar4 = "charge_max_scale_shoot"; -// } else { -// hvar4 = "charge_max_scale_mid"; -// min_scale = fighter.get_param_float("param_auraball", "charge_min_scale"); -// if 1.0 <= charge_ratio { -// println!("if conditional"); -// max_scale = fighter.get_param_float("param_auraball", "charge_max_scale"); -// let fvar9 = fighter.get_param_float("param_auraball", "charge_max_scale_mid"); -// fighter.set_float(fvar9 / max_scale, *WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_EFFECT_JOINT_SCALE); -// hvar4 = "charge_max_scale"; -// } -// } -// max_scale = fighter.get_param_float("param_auraball", hvar4); - -// let work_scale = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_SCALE); -// let work_aurapower = fighter.get_float(*WEAPON_LUCARIO_AURABALL_INSTANCE_WORK_ID_FLOAT_AURAPOWER); -// let scale_mul = fighter.get_param_float("param_auraball", "scale_mul"); -// let scale_add = fighter.get_param_float("param_auraball", "scale_add"); - -// let scale = work_scale * (1.0 / original_size) * -// ((charge_ratio * max_scale + (1.0 - charge_ratio) * min_scale) * work_aurapower * scale_mul + scale_add); -// println!("scale: {}, work_scale: {}, original_size: {}, charge_ratio: {}, max_scale: {}, min_scale: {}, work_aurapower: {}, scale_mul: {}, scale_add: {}", -// scale, work_scale, original_size, charge_ratio, max_scale, min_scale, work_aurapower, scale_mul, scale_add); -// PostureModule::set_scale(fighter.module_accessor, scale, false); - -// } - // FIGHTER_STATUS_KIND_SPECIAL_N unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue { @@ -456,7 +370,6 @@ pub unsafe extern "C" fn special_n_save_charge_status(fighter: &mut L2CFighterCo } pub fn install(agent: &mut Agent) { - agent.status(Pre, *WEAPON_LUCARIO_AURABALL_STATUS_KIND_SHOOT, auraball_shoot_pre); agent.status(Pre, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_pre); agent.status(End, *FIGHTER_LUCARIO_STATUS_KIND_SPECIAL_N_SHOOT, special_n_shoot_end); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main); diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 4123017e55..277e5ab09c 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -80,110 +80,8 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - -} - -// #[acmd_script( agent = "miiswordsman_tornadoshot", script = "game_fly" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_tornadoshot_fly_game(agent: &mut L2CAgentBase) { -// let lua_state = agent.lua_state_agent; -// let boma = agent.boma(); -// if is_excute(agent) { -// AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 3, 3, 25, 30); -// ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 366, 100, 30, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(9.5), Some(3.2), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// ATTACK(agent, 1, 0, Hash40::new("top"), 1.0, 90, 100, 50, 0, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 9, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// } -// frame(lua_state, 37.0); -// if is_excute(agent) { -// AttackModule::clear_all(boma); -// ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 80, 40, 0, 100, 4.5, 0.0, 9.5, 3.2, Some(0.0), Some(3.0), Some(2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_ENERGY); -// } -// } - -unsafe extern "C" fn miiswordsman_wave_fly_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } - frame(lua_state, 18.0); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 7.0, 55, 60, 0, 38, 9.5, 0.0, 3.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, -4, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); - } } -unsafe extern "C" fn miiswordsman_wave_fly_effect(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let mut lead_wave : u32 = std::u32::MAX; - let mut wave_2 : u32 = std::u32::MAX; - let mut wave_3 : u32 = std::u32::MAX; - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("miiswordsman_hikari_syuriken"), false, true); - lead_wave = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: 0.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.9, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, lead_wave, 0.7); - - wave_2 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -4.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.7, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_2, 0.7); - EffectModule::set_alpha(boma, wave_2, 0.4); - //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - wait(lua_state, 4.0); - if is_excute(agent) { - EffectModule::set_rate(boma, lead_wave, 0.000001); - EffectModule::set_rate(boma, wave_2, 0.000001); - EffectModule::set_alpha(boma, wave_2, 0.4); - wave_3 = EffectModule::req_follow(boma, Hash40::new("miiswordsman_counter_arc"), Hash40::new("top"), &Vector3f{x: 0.0, y: 3.0, z: -8.0}, &Vector3f{x: 80.6, y: -69.5, z: 0.0}, 0.5, true, 0, 0, 0, 0, 0, false, false) as u32; - EffectModule::set_rate(boma, wave_3, 0.7); - EffectModule::set_alpha(boma, wave_3, 0.4); - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - wait(lua_state, 4.0); - if is_excute(agent) { - EffectModule::set_rate(boma, wave_3, 0.000001); - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - for _ in 0..i32::MAX { - wait(lua_state, 4.0); - if is_excute(agent) { - if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, - &Vector2f{ x: 0.0, y: -7.0}, true - ) == 1 { - FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(agent, 0.3); - FOOT_EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 4, -4, 0, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - } - } - } -} unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; diff --git a/fighters/wario/src/lib.rs b/fighters/wario/src/lib.rs index 5674ab1a1b..73c7ae37f5 100644 --- a/fighters/wario/src/lib.rs +++ b/fighters/wario/src/lib.rs @@ -7,6 +7,8 @@ pub mod acmd; pub mod opff; pub mod status; +// articles + mod wariobike; use smash::{ From 621b59d034fb1638df22659303269a7301cdfe51 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 08:34:09 -0500 Subject: [PATCH 164/172] more --- fighters/falco/src/acmd/specials.rs | 8 ++---- fighters/iceclimber/src/acmd/other.rs | 25 +++++++---------- fighters/iceclimber/src/acmd/tilts.rs | 6 ++--- fighters/jack/src/acmd/other.rs | 4 +-- fighters/koopajr/src/acmd/specials.rs | 27 ------------------- fighters/metaknight/src/acmd/ground.rs | 2 -- fighters/metaknight/src/acmd/tilts.rs | 24 ++++++++--------- fighters/mewtwo/src/acmd/tilts.rs | 6 +++-- .../src/acmd/specials/special_lw.rs | 6 ++--- .../src/acmd/specials/special_s.rs | 3 +-- fighters/rockman/src/acmd/other.rs | 5 ++-- fighters/roy/src/acmd/other.rs | 4 ++- fighters/samusd/src/acmd/specials.rs | 2 -- fighters/samusd/src/supermissile/acmd.rs | 3 +-- .../src/fusin/{acmd/specials.rs => acmd.rs} | 0 fighters/sheik/src/fusin/acmd/mod.rs | 7 ----- .../src/needle/{acmd/specials.rs => acmd.rs} | 0 fighters/sheik/src/needle/acmd/mod.rs | 7 ----- fighters/wario/src/acmd/specials.rs | 3 +-- fighters/zelda/src/acmd/other.rs | 17 ------------ 20 files changed, 43 insertions(+), 116 deletions(-) rename fighters/sheik/src/fusin/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/sheik/src/fusin/acmd/mod.rs rename fighters/sheik/src/needle/{acmd/specials.rs => acmd.rs} (100%) delete mode 100644 fighters/sheik/src/needle/acmd/mod.rs diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index 9549c17447..7c0c480442 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -290,8 +290,7 @@ unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { } } -// #[acmd_script( agent = "falco", script = "sound_specialairhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_air_hi_sound(agent: &mut L2CAgentBase) { +// unsafe fn sound_specialairhi(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); @@ -299,11 +298,9 @@ unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { // PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); // PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } - // } -// #[acmd_script( agent = "falco", script = "sound_specialhi" , category = ACMD_SOUND , low_priority)] -// unsafe fn falco_special_hi_sound(agent: &mut L2CAgentBase) { +// unsafe fn sound_specialhi(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = sv_system::battle_object_module_accessor(lua_state); // frame(lua_state, 1.0); @@ -311,7 +308,6 @@ unsafe extern "C" fn expression_speciallwend(agent: &mut L2CAgentBase) { // PLAY_SEQUENCE(agent, Hash40::new("seq_falco_rnd_firebird")); // PLAY_SE(agent, Hash40::new("se_falco_special_h02")); // } - // } unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs index ae5f5c20a2..f71e8a47f5 100644 --- a/fighters/iceclimber/src/acmd/other.rs +++ b/fighters/iceclimber/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -81,17 +80,16 @@ unsafe extern "C" fn sound_damageflyroll_nana(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 14.0); if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 4.0); @@ -109,7 +107,7 @@ unsafe extern "C" fn dash_sound(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -120,14 +118,12 @@ unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - frame(lua_state, 29.0); if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); @@ -138,10 +134,9 @@ unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(lua_state, 29.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); @@ -165,12 +160,12 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyroll_nana", sound_damageflyroll_nana); agent.acmd("sound_damageflytop_nana", sound_damagefly_nana); - agent.acmd("game_dash", dash_game); - agent.acmd("sound_dash", dash_sound); + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", turn_dash_game); + agent.acmd("game_turndash", game_turndash); - agent.acmd("game_escapeair", escape_air_game); + agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", escape_air_slide_game); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/iceclimber/src/acmd/tilts.rs b/fighters/iceclimber/src/acmd/tilts.rs index 4dd0100471..c090ece6ba 100644 --- a/fighters/iceclimber/src/acmd/tilts.rs +++ b/fighters/iceclimber/src/acmd/tilts.rs @@ -80,7 +80,7 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn popo_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -123,7 +123,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_attackhi3_nana", game_attackhi3); agent.acmd("effect_attackhi3_nana", effect_attackhi3); - agent.acmd("game_attacklw3", popo_attack_lw3_game); + agent.acmd("game_attacklw3", game_attacklw3); - agent.acmd("game_attacklw3_nana", popo_attack_lw3_game); + agent.acmd("game_attacklw3_nana", game_attacklw3); } diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 4af7defec1..1d08185c77 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -63,7 +63,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -134,7 +134,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_dash", game_dash); agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", turn_dash_game); + agent.acmd("game_turndash", game_turndash); agent.acmd("game_escapeair", game_escapeair); agent.acmd("game_escapeairslide", game_escapeairslide); diff --git a/fighters/koopajr/src/acmd/specials.rs b/fighters/koopajr/src/acmd/specials.rs index c8e3bd6152..1d574dea9f 100644 --- a/fighters/koopajr/src/acmd/specials.rs +++ b/fighters/koopajr/src/acmd/specials.rs @@ -1,32 +1,5 @@ use super::*; -/* #[acmd_script( agent = "koopajr_remainclown", script = "game_specialhiclownfall" , category = ACMD_GAME , low_priority)] -unsafe fn koopajr_remainclown_special_hi_clownfall_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - frame(lua_state, 5.0); - if is_excute(weapon) { - ATTACK(weapon,0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE) - } -} - -#[acmd_script( agent = "koopajr_remainclown", script = "game_specialairhiclownfall" , category = ACMD_GAME , low_priority)] -unsafe fn koopajr_remainclown_special_air_hi_clownfall_game(weapon: &mut L2CAgentBase) { - let lua_state = weapon.lua_state_agent; - let boma = weapon.boma(); - frame(lua_state, 5.0); - if is_excute(weapon) { - ATTACK(weapon,0, 0, Hash40::new("top"), 0.0, 361, 0, 0, 0, 6.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE) - } - for _ in 0..30 { - wait(lua_state, 1.0); - if is_excute(weapon) { - } - } -} */ - -// ATTACK(weapon,0, 0, Hash40::new("top"), 13.0, 55, 70, 0, 85, 14.0, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_BOMB, *ATTACK_REGION_BOMB) - unsafe extern "C" fn game_specialnshoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/metaknight/src/acmd/ground.rs b/fighters/metaknight/src/acmd/ground.rs index b0ef051c09..ee683ddde1 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -116,7 +116,6 @@ unsafe extern "C" fn effect_attack100(agent: &mut L2CAgentBase) { } } -// #[acmd_script( agent = "metaknight", script = "game_attack100end", category = ACMD_GAME, low_priority )] // unsafe fn game_attack100end(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); @@ -133,7 +132,6 @@ unsafe extern "C" fn effect_attack100(agent: &mut L2CAgentBase) { // FT_MOTION_RATE(agent, 0.87); // } -// #[acmd_script( agent = "metaknight", script = "effect_attack100end", category = ACMD_EFFECT, low_priority )] // unsafe fn effect_attack100end(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); diff --git a/fighters/metaknight/src/acmd/tilts.rs b/fighters/metaknight/src/acmd/tilts.rs index c64e7e036e..b485a9fa5b 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn metaknight_attack_s3_s_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -42,7 +42,7 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn metaknight_attack_s3_s2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -63,7 +63,7 @@ unsafe extern "C" fn metaknight_attack_s3_s2_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn metaknight_attack_s3_s3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3s3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); @@ -77,7 +77,7 @@ unsafe extern "C" fn metaknight_attack_s3_s3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn metaknight_attack_hi3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -102,7 +102,7 @@ unsafe extern "C" fn metaknight_attack_hi3_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn metaknight_attack_hi3_expression(agent: &mut L2CAgentBase) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -127,7 +127,7 @@ unsafe extern "C" fn metaknight_attack_hi3_expression(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn metaknight_attack_lw3_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 3.0); @@ -164,14 +164,14 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3", metaknight_attack_s3_s_game); + agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); - agent.acmd("game_attacks3s2", metaknight_attack_s3_s2_game); - agent.acmd("game_attacks3s3", metaknight_attack_s3_s3_game); + agent.acmd("game_attacks3s2", game_attacks3s2); + agent.acmd("game_attacks3s3", game_attacks3s3); - agent.acmd("game_attackhi3", metaknight_attack_hi3_game); - agent.acmd("expression_attackhi3", metaknight_attack_hi3_expression); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); - agent.acmd("game_attacklw3", metaknight_attack_lw3_game); + agent.acmd("game_attacklw3", game_attacklw3); agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index 3596297063..b5ceb679e6 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -250,7 +250,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_hi3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -301,7 +301,7 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn mewtwo_attack_lw3_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -355,7 +355,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("expression_attacks3lw", expression_attacks3lw); agent.acmd("game_attackhi3", game_attackhi3); + //agent.acmd("effect_attackhi3", effect_attackhi3); agent.acmd("game_attacklw3", game_attacklw3); + //agent.acmd("effect_attacklw3", effect_attacklw3); agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/miiswordsman/src/acmd/specials/special_lw.rs b/fighters/miiswordsman/src/acmd/specials/special_lw.rs index 0f2bdd473c..bda8c351cf 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_lw.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_lw.rs @@ -53,8 +53,7 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { } // Kinesis Blade - Charge Storage -// #[acmd_script( agent = "miiswordsman", script = "game_speciallw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_lw1_hit_game(agent: &mut L2CAgentBase) { +// unsafe fn game_speciallw1hit(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); // if is_excute(agent) { @@ -89,8 +88,7 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // } // } -// #[acmd_script( agent = "miiswordsman", script = "game_specialairlw1hit" , category = ACMD_GAME , low_priority)] -// unsafe fn miiswordsman_special_air_lw1_hit_game(agent: &mut L2CAgentBase) { +// unsafe fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); // if is_excute(agent) { diff --git a/fighters/miiswordsman/src/acmd/specials/special_s.rs b/fighters/miiswordsman/src/acmd/specials/special_s.rs index a5d5d6f641..b267a25e6a 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_s.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_s.rs @@ -46,8 +46,7 @@ unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { } /* -#[acmd_script( agent = "miiswordsman", script = "game_specials1hit" , category = ACMD_GAME , low_priority)] -unsafe fn miiswordsman_special_s1_hit_game(agent: &mut L2CAgentBase) { +unsafe fn game_specials1hit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 2.0); diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 171659128b..0bddbe5af5 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -44,8 +44,8 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } /* -#[acmd_script( agent = "rockman_crashbomb", script = "game_regular" , category = ACMD_GAME , low_priority)] -unsafe fn rockman_crashbomb_stick_game(agent: &mut L2CAgentBase) { +// rockman_crashbomb +unsafe fn game_regular(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let owner_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); @@ -59,7 +59,6 @@ unsafe fn rockman_crashbomb_stick_game(agent: &mut L2CAgentBase) { ArticleModule::change_status(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CRASHBOMB, *, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } - } */ diff --git a/fighters/roy/src/acmd/other.rs b/fighters/roy/src/acmd/other.rs index 2c97ce9804..bffc294d7b 100644 --- a/fighters/roy/src/acmd/other.rs +++ b/fighters/roy/src/acmd/other.rs @@ -125,7 +125,7 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 29.0); @@ -162,7 +162,9 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_appeallwr", game_appeallwr); agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); agent.acmd("sound_jumpback", sound_jump); agent.acmd("sound_jumpfront", sound_jump); diff --git a/fighters/samusd/src/acmd/specials.rs b/fighters/samusd/src/acmd/specials.rs index 828c4fa2ec..c23594c3aa 100644 --- a/fighters/samusd/src/acmd/specials.rs +++ b/fighters/samusd/src/acmd/specials.rs @@ -1,6 +1,5 @@ use super::*; -// #[acmd_script( agent = "samusd", script = "game_specials" , category = ACMD_GAME , low_priority)] // unsafe fn game_specials(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); @@ -15,7 +14,6 @@ use super::*; // } // } -// #[acmd_script( agent = "samusd", script = "game_specialairs" , category = ACMD_GAME , low_priority)] // unsafe fn game_specialairs(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); diff --git a/fighters/samusd/src/supermissile/acmd.rs b/fighters/samusd/src/supermissile/acmd.rs index 6037ea868a..418f002fb8 100644 --- a/fighters/samusd/src/supermissile/acmd.rs +++ b/fighters/samusd/src/supermissile/acmd.rs @@ -17,8 +17,7 @@ unsafe extern "C" fn game_straight(agent: &mut L2CAgentBase) { } } -// #[acmd_script( agent = "samusd_supermissile", script = "game_sburst", category = ACMD_GAME, low_priority)] -// unsafe fn samusd_super_missile_burst_game(agent: &mut L2CAgentBase) { +// unsafe fn game_sburst(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); // if is_excute(agent) { diff --git a/fighters/sheik/src/fusin/acmd/specials.rs b/fighters/sheik/src/fusin/acmd.rs similarity index 100% rename from fighters/sheik/src/fusin/acmd/specials.rs rename to fighters/sheik/src/fusin/acmd.rs diff --git a/fighters/sheik/src/fusin/acmd/mod.rs b/fighters/sheik/src/fusin/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/sheik/src/fusin/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/sheik/src/needle/acmd/specials.rs b/fighters/sheik/src/needle/acmd.rs similarity index 100% rename from fighters/sheik/src/needle/acmd/specials.rs rename to fighters/sheik/src/needle/acmd.rs diff --git a/fighters/sheik/src/needle/acmd/mod.rs b/fighters/sheik/src/needle/acmd/mod.rs deleted file mode 100644 index 3878f50b33..0000000000 --- a/fighters/sheik/src/needle/acmd/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use super::*; - -mod specials; - -pub fn install(agent: &mut Agent) { - specials::install(agent); -} \ No newline at end of file diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index 0d430d39f0..94f4d18045 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -160,8 +160,7 @@ unsafe extern "C" fn expression_specialhijump(agent: &mut L2CAgentBase) { } } -// #[acmd_script( agent = "wario", scripts = ["game_speciallwsr", "game_specialairlwsr"], category = ACMD_GAME, low_priority )] -// unsafe fn wario_special_lw_sr_game(agent: &mut L2CAgentBase) { +// unsafe fn game_speciallwsr(agent: &mut L2CAgentBase) { // let lua_state = agent.lua_state_agent; // let boma = agent.boma(); // frame(lua_state, 16.0); diff --git a/fighters/zelda/src/acmd/other.rs b/fighters/zelda/src/acmd/other.rs index 8c494e634d..34029c799d 100644 --- a/fighters/zelda/src/acmd/other.rs +++ b/fighters/zelda/src/acmd/other.rs @@ -67,23 +67,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn zelda_dein_move_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 62, 80, 0, 60, 4.8, 0.0, 0.0, 0.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - AREA_WIND_2ND_RAD_arg9(agent, 0, 2, 0.05, 200, 1, 0, 0, 12, 60); - } - frame(lua_state, 6.0); - if is_excute(agent) { - AttackModule::clear_all(boma); - } - frame(lua_state, 20.0); - if is_excute(agent) { - AreaModule::erase_wind(boma, 0); - } -} - unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); From b67a0fdfee4cdf797edabe46ca00f938e66122d7 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 10:15:21 -0500 Subject: [PATCH 165/172] things cleaned up leftover commas, whitespace, a couple on_start functions, a couple opff installations, and some scripts that werent renamed properly --- fighters/bayonetta/src/wickedweaveleg/acmd.rs | 23 ------- fighters/brave/src/opff.rs | 5 +- fighters/buddy/src/opff.rs | 4 -- .../common/src/function_hooks/energy/mod.rs | 1 - fighters/common/src/misc.rs | 1 - fighters/dedede/src/acmd/aerials.rs | 6 -- fighters/dedede/src/acmd/specials.rs | 2 - fighters/dedede/src/acmd/tilts.rs | 1 - fighters/dedede/src/gordo/acmd.rs | 1 - fighters/demon/src/acmd/specials.rs | 1 - fighters/dolly/src/acmd/smashes.rs | 5 -- fighters/dolly/src/burst/acmd.rs | 1 - fighters/dolly/src/opff.rs | 1 - fighters/dolly/src/status/mod.rs | 14 ++-- fighters/ganon/src/acmd/specials.rs | 1 - fighters/gaogaen/src/acmd/specials.rs | 6 +- fighters/gaogaen/src/status/attack_lw4.rs | 2 +- fighters/iceclimber/src/acmd/aerials.rs | 1 - fighters/ken/src/shinryuken/acmd.rs | 8 +-- fighters/kirby/src/acmd/copy/littlemac.rs | 3 - fighters/kirby/src/acmd/copy/lucas.rs | 2 - fighters/kirby/src/acmd/copy/luigi.rs | 3 - fighters/kirby/src/acmd/copy/mario.rs | 1 - fighters/kirby/src/acmd/copy/miigunner.rs | 2 - fighters/kirby/src/acmd/copy/roy.rs | 1 - fighters/kirby/src/acmd/smashes.rs | 5 -- fighters/kirby/src/acmd/specials.rs | 5 -- fighters/kirby/src/lib.rs | 2 +- fighters/kirby/src/opff.rs | 6 +- .../src/status/diddy_special_n_cancel.rs | 16 ++--- fighters/kirby/src/status/ganon_special_n.rs | 10 +-- .../kirby/src/status/ganon_special_n_float.rs | 6 +- .../kirby/src/status/gaogaen_special_n.rs | 4 +- fighters/kirby/src/status/koopa_special_n.rs | 6 +- fighters/kirby/src/status/lucas_special_n.rs | 4 +- fighters/kirby/src/status/luigi_special_n.rs | 2 +- fighters/kirby/src/status/mario_special_n.rs | 2 +- fighters/kirby/src/status/mariod_special_n.rs | 2 +- fighters/kirby/src/status/mod.rs | 64 +++++++++---------- fighters/kirby/src/status/ridley_special_n.rs | 4 +- fighters/kirby/src/status/sonic_special_n.rs | 4 +- fighters/koopa/src/acmd/aerials.rs | 4 -- fighters/krool/src/backpack/acmd.rs | 1 - fighters/krool/src/status/special_hi.rs | 2 - fighters/krool/src/status/special_lw.rs | 1 - fighters/lucario/src/acmd/specials.rs | 1 - fighters/lucario/src/status/special_n.rs | 1 - fighters/lucas/src/opff.rs | 1 - fighters/lucas/src/pkfire/acmd.rs | 17 +---- fighters/lucina/src/status/special_lw.rs | 1 - fighters/luigi/src/acmd/specials.rs | 2 +- fighters/luigi/src/status/special_s.rs | 8 +-- fighters/mariod/src/acmd/specials.rs | 1 - fighters/master/src/acmd/aerials.rs | 1 - fighters/metaknight/src/acmd/specials.rs | 1 - .../src/acmd/specials/special_lw.rs | 25 ++++---- fighters/miiswordsman/src/chakram/acmd.rs | 4 +- fighters/ness/src/acmd/specials.rs | 1 - fighters/ness/src/opff.rs | 1 - fighters/packun/src/acmd/smashes.rs | 1 - fighters/pacman/src/acmd/aerials.rs | 2 - fighters/pit/src/status/special_hi.rs | 4 +- fighters/robot/src/opff.rs | 1 - fighters/rockman/src/acmd/aerials.rs | 1 - fighters/rockman/src/acmd/tilts.rs | 1 - fighters/roy/src/acmd/specials/mod.rs | 2 +- fighters/sheik/src/acmd/throws.rs | 1 - fighters/shulk/src/status/special_s.rs | 2 +- fighters/tantan/src/punch1/acmd.rs | 29 +++++---- 69 files changed, 118 insertions(+), 237 deletions(-) diff --git a/fighters/bayonetta/src/wickedweaveleg/acmd.rs b/fighters/bayonetta/src/wickedweaveleg/acmd.rs index e7b8faf22c..c9028df686 100644 --- a/fighters/bayonetta/src/wickedweaveleg/acmd.rs +++ b/fighters/bayonetta/src/wickedweaveleg/acmd.rs @@ -38,29 +38,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); - - frame(lua_state, 4.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), true); - } - frame(lua_state, 8.0); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2ea0f68425), false); - } - frame(lua_state, 29.0); - if is_excute(agent) { - KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - } - frame(lua_state, escape_air_cancel_frame); - if is_excute(agent) { - notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - pub fn install(agent: &mut Agent) { agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/brave/src/opff.rs b/fighters/brave/src/opff.rs index c93c1c98d0..d1475fe5f0 100644 --- a/fighters/brave/src/opff.rs +++ b/fighters/brave/src/opff.rs @@ -106,7 +106,6 @@ unsafe fn woosh_cancel(fighter: &mut L2CFighterCommon) { fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL, true); } } - } unsafe fn kaclang_jc(fighter: &mut L2CFighterCommon) { @@ -175,7 +174,5 @@ pub unsafe extern "C" fn brave_frame_wrapper(fighter: &mut L2CFighterCommon) { } pub fn install(agent: &mut Agent) { - smashline::Agent::new("brave") - .on_line(Main, brave_frame_wrapper) - .install(); + agent.on_line(Main, brave_frame_wrapper); } \ No newline at end of file diff --git a/fighters/buddy/src/opff.rs b/fighters/buddy/src/opff.rs index 82537afbf4..1a7ecee6ab 100644 --- a/fighters/buddy/src/opff.rs +++ b/fighters/buddy/src/opff.rs @@ -138,7 +138,6 @@ unsafe fn beakbomb_checkForCancel(fighter: &mut L2CFighterCommon, boma: &mut Bat { fighter.change_status_req(*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_END, true); } - } unsafe fn beakbomb_control(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor){ @@ -192,7 +191,6 @@ unsafe fn beakbomb_update(fighter: &mut L2CFighterCommon, boma: &mut BattleObjec { VarModule::off_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); } - } //Check to see if Banjo hit a shield during beakbomb. @@ -256,7 +254,6 @@ unsafe fn beakbomb_checkForGround(fighter: &mut L2CFighterCommon, boma: &mut Bat { fighter.change_status_req(*FIGHTER_BUDDY_STATUS_KIND_SPECIAL_S_END, true); } - } unsafe fn breegull_bayonet(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor,status: i32){ @@ -442,7 +439,6 @@ unsafe fn training_reset(fighter: &mut L2CFighterCommon,boma: &mut BattleObjectM } } } - } // upB freefalls after one use per airtime diff --git a/fighters/common/src/function_hooks/energy/mod.rs b/fighters/common/src/function_hooks/energy/mod.rs index f27ece76f7..a8f7deec33 100644 --- a/fighters/common/src/function_hooks/energy/mod.rs +++ b/fighters/common/src/function_hooks/energy/mod.rs @@ -174,7 +174,6 @@ impl KineticEnergy { (self.vtable.mul_accel)(self, mul) } } - } pub fn install() { diff --git a/fighters/common/src/misc.rs b/fighters/common/src/misc.rs index 73f750e0d4..5ac512fbc2 100644 --- a/fighters/common/src/misc.rs +++ b/fighters/common/src/misc.rs @@ -171,7 +171,6 @@ pub extern "C" fn fighter_reset(fighter: &mut L2CFighterCommon) { MeterModule::reset(fighter.battle_object); } } - } pub extern "C" fn turbo_mode(fighter: &mut L2CFighterCommon) { diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index 6bdfba83e4..fdaf72442a 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -32,7 +32,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { @@ -76,7 +75,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -171,7 +169,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -182,7 +179,6 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 11.0, -16.0, 0, 0, 0, 0.65, true); LAST_EFFECT_SET_RATE(agent, 1.1); } - } unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { @@ -262,7 +258,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_landingairhi(agent: &mut L2CAgentBase) { @@ -316,7 +311,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_landingairlw(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/specials.rs b/fighters/dedede/src/acmd/specials.rs index d08fce08ef..0c21eb1b14 100644 --- a/fighters/dedede/src/acmd/specials.rs +++ b/fighters/dedede/src/acmd/specials.rs @@ -182,7 +182,6 @@ unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { if is_excute(agent){ EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } - } unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { @@ -545,7 +544,6 @@ unsafe extern "C" fn game_specialhilanding(agent: &mut L2CAgentBase) { ArticleModule::generate_article(boma, *FIGHTER_DEDEDE_GENERATE_ARTICLE_STAR, false, 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specialairhiturn(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/tilts.rs b/fighters/dedede/src/acmd/tilts.rs index f874435208..526f812d48 100644 --- a/fighters/dedede/src/acmd/tilts.rs +++ b/fighters/dedede/src/acmd/tilts.rs @@ -102,7 +102,6 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("dedede_air_n"), Hash40::new("top"), 0, 4.0, 18.0, 0, 0, 0, 0.6, true); LAST_EFFECT_SET_RATE(agent, 1.1); } - } unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/gordo/acmd.rs b/fighters/dedede/src/gordo/acmd.rs index f2a62943fa..80ef48f024 100644 --- a/fighters/dedede/src/gordo/acmd.rs +++ b/fighters/dedede/src/gordo/acmd.rs @@ -41,7 +41,6 @@ unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); } - } unsafe extern "C" fn effect_specialsthrow(agent: &mut L2CAgentBase) { diff --git a/fighters/demon/src/acmd/specials.rs b/fighters/demon/src/acmd/specials.rs index dfdecad20f..64e5d3560c 100644 --- a/fighters/demon/src/acmd/specials.rs +++ b/fighters/demon/src/acmd/specials.rs @@ -170,7 +170,6 @@ unsafe extern "C" fn game_attackstep2f(agent: &mut L2CAgentBase) { AttackModule::clear(boma, 6, false); HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); } - } // Electric Wind God Fist (When Hitting Shield) diff --git a/fighters/dolly/src/acmd/smashes.rs b/fighters/dolly/src/acmd/smashes.rs index 1e5aaf43f8..ccf153ea25 100644 --- a/fighters/dolly/src/acmd/smashes.rs +++ b/fighters/dolly/src/acmd/smashes.rs @@ -139,7 +139,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } } - } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { @@ -188,7 +187,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 3, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { @@ -297,7 +295,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -372,7 +369,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { @@ -403,7 +399,6 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_RATE(agent, 1.0); } } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dolly/src/burst/acmd.rs b/fighters/dolly/src/burst/acmd.rs index 9ef8a1b4fa..d132d0134c 100644 --- a/fighters/dolly/src/burst/acmd.rs +++ b/fighters/dolly/src/burst/acmd.rs @@ -45,7 +45,6 @@ unsafe extern "C" fn game_final3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dolly/src/opff.rs b/fighters/dolly/src/opff.rs index 8a668f7468..801203b0cf 100644 --- a/fighters/dolly/src/opff.rs +++ b/fighters/dolly/src/opff.rs @@ -836,7 +836,6 @@ unsafe fn magic_series(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo aerial_cancels(boma); return; } - } pub extern "C" fn dolly_meter(fighter: &mut smash::lua2cpp::L2CFighterCommon) { diff --git a/fighters/dolly/src/status/mod.rs b/fighters/dolly/src/status/mod.rs index d67eff7a3d..6d722eae79 100644 --- a/fighters/dolly/src/status/mod.rs +++ b/fighters/dolly/src/status/mod.rs @@ -157,18 +157,14 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L 0.into() } -extern "C" fn dolly_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - if fighter.kind() == *FIGHTER_KIND_DOLLY { - fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - } - } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_S_CALLBACK].assign(&L2CValue::Ptr(should_use_special_s_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); } pub fn install(agent: &mut Agent) { - agent.on_start(dolly_init); + agent.on_start(on_start); wait::install(agent); turn_dash::install(agent); diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index 5756ed93c1..e3145eb05e 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -263,7 +263,6 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); JostleModule::set_status(boma, true); } - } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { diff --git a/fighters/gaogaen/src/acmd/specials.rs b/fighters/gaogaen/src/acmd/specials.rs index f02c0f96a6..2710547650 100644 --- a/fighters/gaogaen/src/acmd/specials.rs +++ b/fighters/gaogaen/src/acmd/specials.rs @@ -1100,13 +1100,13 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialslariat", game_specialslariat); agent.acmd("game_specialairslariat", game_specialairslariat); agent.acmd("game_specialsshoulder", game_specialsshoulder); - agent.acmd("game_specialairsshoulder",game_specialairsshoulder,); + agent.acmd("game_specialairsshoulder", game_specialairsshoulder); agent.acmd("game_specialhistart", game_specialhistart); agent.acmd("game_specialairhistart", game_specialairhistart); - agent.acmd("effect_specialairhistart",effect_specialairhistart,); + agent.acmd("effect_specialairhistart",effect_specialairhistart); agent.acmd("game_specialairhiturn", game_specialairhiturn); - agent.acmd("effect_specialairhiturn",effect_specialairhiturn,); + agent.acmd("effect_specialairhiturn", effect_specialairhiturn); agent.acmd("game_specialairhifall", game_specialairhifall); agent.acmd("game_specialhibound", game_specialhibound); diff --git a/fighters/gaogaen/src/status/attack_lw4.rs b/fighters/gaogaen/src/status/attack_lw4.rs index c98fab6a9f..9f1179e85b 100644 --- a/fighters/gaogaen/src/status/attack_lw4.rs +++ b/fighters/gaogaen/src/status/attack_lw4.rs @@ -67,5 +67,5 @@ pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommo pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_main); - agent.status(MapCorrection,*FIGHTER_STATUS_KIND_ATTACK_LW4,attack_lw4_map_correction,); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_ATTACK_LW4, attack_lw4_map_correction); } diff --git a/fighters/iceclimber/src/acmd/aerials.rs b/fighters/iceclimber/src/acmd/aerials.rs index 6039831a82..e8f8da76d0 100644 --- a/fighters/iceclimber/src/acmd/aerials.rs +++ b/fighters/iceclimber/src/acmd/aerials.rs @@ -20,7 +20,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { diff --git a/fighters/ken/src/shinryuken/acmd.rs b/fighters/ken/src/shinryuken/acmd.rs index 55bee6ceee..08590c0e47 100644 --- a/fighters/ken/src/shinryuken/acmd.rs +++ b/fighters/ken/src/shinryuken/acmd.rs @@ -1,5 +1,5 @@ use super::*; -unsafe extern "C" fn ken_shinryuken_game_final(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -24,7 +24,7 @@ unsafe extern "C" fn ken_shinryuken_game_final(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_final(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 51.0); @@ -38,6 +38,6 @@ unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { } } pub fn install(agent: &mut Agent) { - agent.acmd("game_final", ken_shinryuken_game_final); - agent.acmd("effect_final", ken_shinryuken_effect_final); + agent.acmd("game_final", game_final); + agent.acmd("effect_final", effect_final); } \ No newline at end of file diff --git a/fighters/kirby/src/acmd/copy/littlemac.rs b/fighters/kirby/src/acmd/copy/littlemac.rs index d6c6526614..27c05b6fc8 100644 --- a/fighters/kirby/src/acmd/copy/littlemac.rs +++ b/fighters/kirby/src/acmd/copy/littlemac.rs @@ -84,7 +84,6 @@ unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("sys_starrod_bullet"), false, false); } - } unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { @@ -99,7 +98,6 @@ unsafe extern "C" fn sound_littlemacspecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_littlemac_swing_ll")); } - } unsafe extern "C" fn expression_littlemacspecialn(agent: &mut L2CAgentBase) { @@ -126,7 +124,6 @@ unsafe extern "C" fn expression_littlemacspecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { AreaModule::erase_wind(boma, 0); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/kirby/src/acmd/copy/lucas.rs b/fighters/kirby/src/acmd/copy/lucas.rs index 0e1a433bd9..d94ded44d1 100644 --- a/fighters/kirby/src/acmd/copy/lucas.rs +++ b/fighters/kirby/src/acmd/copy/lucas.rs @@ -11,7 +11,6 @@ unsafe extern "C" fn game_lucasspecialnstart(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_smash_l03")); PLAY_SE_REMAIN(agent, Hash40::new("vc_kirby_010")); } - } unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/copy/luigi.rs b/fighters/kirby/src/acmd/copy/luigi.rs index 4a415827cf..1cf5dc713e 100644 --- a/fighters/kirby/src/acmd/copy/luigi.rs +++ b/fighters/kirby/src/acmd/copy/luigi.rs @@ -7,7 +7,6 @@ unsafe extern "C" fn game_luigispecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_LUIGI_GENERATE_ARTICLE_FIREBALL, false, 0); } - } unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { @@ -31,7 +30,6 @@ unsafe extern "C" fn effect_luigispecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("luigi_fb_shoot"), false, false); } - } unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { @@ -41,7 +39,6 @@ unsafe extern "C" fn sound_luigispecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_luigi_special_n01")); } - } unsafe extern "C" fn game_luigispecialnthunder(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/copy/mario.rs b/fighters/kirby/src/acmd/copy/mario.rs index 957b2958d4..544034f7df 100644 --- a/fighters/kirby/src/acmd/copy/mario.rs +++ b/fighters/kirby/src/acmd/copy/mario.rs @@ -51,7 +51,6 @@ unsafe extern "C" fn effect_mariospecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("mario_fb_shoot"), false, false); } - } unsafe extern "C" fn sound_mariospecialn(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/copy/miigunner.rs b/fighters/kirby/src/acmd/copy/miigunner.rs index 1869cecaee..f6c0ea5e34 100644 --- a/fighters/kirby/src/acmd/copy/miigunner.rs +++ b/fighters/kirby/src/acmd/copy/miigunner.rs @@ -49,7 +49,6 @@ unsafe extern "C" fn effect_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) } } } - } unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { @@ -69,7 +68,6 @@ unsafe extern "C" fn sound_miigunnerspecialn1firemax(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("se_miigunner_final04")); } } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/kirby/src/acmd/copy/roy.rs b/fighters/kirby/src/acmd/copy/roy.rs index ae957e46c7..ec0bc3e74e 100644 --- a/fighters/kirby/src/acmd/copy/roy.rs +++ b/fighters/kirby/src/acmd/copy/roy.rs @@ -38,7 +38,6 @@ unsafe extern "C" fn effect_royspecialnend(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("roy_sword"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("roy_erupution_hold"), false, false); } - } unsafe extern "C" fn sound_royspecialnend(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index 31fecba8be..36cf63749a 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -56,7 +56,6 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -115,7 +114,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { @@ -162,7 +160,6 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } } - } unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { @@ -378,7 +375,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } } - } unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { @@ -435,7 +431,6 @@ unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_kirby_landing01")); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index 29a41e8725..45eb9a7ff8 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -162,7 +162,6 @@ unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, false, -1); } - } unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { @@ -195,7 +194,6 @@ unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_specialairss(agent: &mut L2CAgentBase) { @@ -228,7 +226,6 @@ unsafe extern "C" fn game_specialairss(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_KIRBY_GENERATE_ARTICLE_HAMMER, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { @@ -357,7 +354,6 @@ unsafe extern "C" fn effect_specialhih(agent: &mut L2CAgentBase) { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_turn_smoke"), Hash40::new("top"), 6, 0, 0, 0, 180, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn sound_specialhih(agent: &mut L2CAgentBase) { @@ -455,7 +451,6 @@ unsafe extern "C" fn effect_specialairhih(agent: &mut L2CAgentBase) { if is_excute(agent) { AFTER_IMAGE_OFF(agent, 0); } - } unsafe extern "C" fn sound_specialairhih(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/lib.rs b/fighters/kirby/src/lib.rs index 3991a674b6..fc97acb47a 100644 --- a/fighters/kirby/src/lib.rs +++ b/fighters/kirby/src/lib.rs @@ -45,7 +45,7 @@ pub const LUCAS_CHARGE_TIME : i32 = 120; pub fn install() { let agent = &mut Agent::new("kirby"); acmd::install(agent); - opff::install(); + opff::install(agent); status::install(agent); agent.install(); } diff --git a/fighters/kirby/src/opff.rs b/fighters/kirby/src/opff.rs index 00d12a7179..2a9b2e6f71 100644 --- a/fighters/kirby/src/opff.rs +++ b/fighters/kirby/src/opff.rs @@ -160,8 +160,6 @@ pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("kirby") - .on_line(Main, kirby_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, kirby_frame_wrapper); } diff --git a/fighters/kirby/src/status/diddy_special_n_cancel.rs b/fighters/kirby/src/status/diddy_special_n_cancel.rs index af37de4ade..44288ba51a 100644 --- a/fighters/kirby/src/status/diddy_special_n_cancel.rs +++ b/fighters/kirby/src/status/diddy_special_n_cancel.rs @@ -182,12 +182,12 @@ unsafe extern "C" fn special_n_jump_cancel_end(fighter: &mut L2CFighterCommon) - } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, special_n_main,); - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, special_n_charge_main,); - agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_pre,); - agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_main,); - agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_end,); - agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre,); - agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main,); - agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N, special_n_main); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_DIDDY_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_pre); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_main); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL, special_n_cancel_end); + agent.status(Pre, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_pre); + agent.status(Main, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_main); + agent.status(End, statuses::kirby::DIDDY_SPECIAL_N_CANCEL_JUMP, special_n_jump_cancel_end); } diff --git a/fighters/kirby/src/status/ganon_special_n.rs b/fighters/kirby/src/status/ganon_special_n.rs index 700b3fef1e..9275799f95 100644 --- a/fighters/kirby/src/status/ganon_special_n.rs +++ b/fighters/kirby/src/status/ganon_special_n.rs @@ -172,9 +172,9 @@ unsafe extern "C" fn special_n_exec(_fighter: &mut L2CFighterCommon) -> L2CValue } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_pre,); - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_main,); - agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_end,); - agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_init,); - agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_exec,); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_main); + agent.status(End, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_end); + agent.status(Init, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_init); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GANON_SPECIAL_N, special_n_exec); } diff --git a/fighters/kirby/src/status/ganon_special_n_float.rs b/fighters/kirby/src/status/ganon_special_n_float.rs index 273da7bbc7..2bd5460769 100644 --- a/fighters/kirby/src/status/ganon_special_n_float.rs +++ b/fighters/kirby/src/status/ganon_special_n_float.rs @@ -136,7 +136,7 @@ unsafe extern "C" fn special_n_float_end(_fighter: &mut L2CFighterCommon) -> L2C } pub fn install(agent: &mut Agent) { - agent.status(Pre, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_pre,); - agent.status(Main, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_main,); - agent.status(End, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_end,); + agent.status(Pre, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_pre); + agent.status(Main, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_main); + agent.status(End, statuses::kirby::GANON_SPECIAL_N_FLOAT, special_n_float_end); } diff --git a/fighters/kirby/src/status/gaogaen_special_n.rs b/fighters/kirby/src/status/gaogaen_special_n.rs index 985eb11781..3086c7b470 100644 --- a/fighters/kirby/src/status/gaogaen_special_n.rs +++ b/fighters/kirby/src/status/gaogaen_special_n.rs @@ -48,6 +48,6 @@ pub unsafe extern "C" fn special_n_exec(fighter: &mut L2CFighterCommon) -> L2CVa } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_pre,); - agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_exec,); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_pre); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_GAOGAEN_SPECIAL_N, special_n_exec); } diff --git a/fighters/kirby/src/status/koopa_special_n.rs b/fighters/kirby/src/status/koopa_special_n.rs index e1d7346459..104654c049 100644 --- a/fighters/kirby/src/status/koopa_special_n.rs +++ b/fighters/kirby/src/status/koopa_special_n.rs @@ -84,7 +84,7 @@ unsafe extern "C" fn special_n_execstop(fighter: &mut L2CFighterCommon) -> L2CVa } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_main,); - agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_exec,); - agent.status(ExecStop, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_execstop,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_main); + agent.status(Exec, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_exec); + agent.status(ExecStop, *FIGHTER_KIRBY_STATUS_KIND_KOOPA_SPECIAL_N, special_n_execstop); } diff --git a/fighters/kirby/src/status/lucas_special_n.rs b/fighters/kirby/src/status/lucas_special_n.rs index 103c02fac4..f59bab5a19 100644 --- a/fighters/kirby/src/status/lucas_special_n.rs +++ b/fighters/kirby/src/status/lucas_special_n.rs @@ -186,6 +186,6 @@ unsafe extern "C" fn special_n_hold_transition_g2a_kind( } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, special_n_pre,); - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, special_n_hold_main,); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N, special_n_pre); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N_HOLD, special_n_hold_main); } diff --git a/fighters/kirby/src/status/luigi_special_n.rs b/fighters/kirby/src/status/luigi_special_n.rs index 17cce0755d..3273ab44c2 100644 --- a/fighters/kirby/src/status/luigi_special_n.rs +++ b/fighters/kirby/src/status/luigi_special_n.rs @@ -58,5 +58,5 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, special_n_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LUIGI_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status/mario_special_n.rs b/fighters/kirby/src/status/mario_special_n.rs index dc8b76eb06..4c252e5903 100644 --- a/fighters/kirby/src/status/mario_special_n.rs +++ b/fighters/kirby/src/status/mario_special_n.rs @@ -58,5 +58,5 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, special_n_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIO_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status/mariod_special_n.rs b/fighters/kirby/src/status/mariod_special_n.rs index 1ef25a00f1..852654ff8f 100644 --- a/fighters/kirby/src/status/mariod_special_n.rs +++ b/fighters/kirby/src/status/mariod_special_n.rs @@ -58,5 +58,5 @@ unsafe extern "C" fn special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, special_n_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_MARIOD_SPECIAL_N, special_n_main); } diff --git a/fighters/kirby/src/status/mod.rs b/fighters/kirby/src/status/mod.rs index 8e7c927802..3c858fc6bf 100644 --- a/fighters/kirby/src/status/mod.rs +++ b/fighters/kirby/src/status/mod.rs @@ -18,29 +18,6 @@ mod sonic_special_n; mod edge_special_n; mod bayonetta_special_n_cancel; -extern "C" fn kirby_init(fighter: &mut L2CFighterCommon) { - unsafe { - // set the callbacks on fighter init - fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); - fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); - fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(ganon_should_use_special_n_callback as *const () as _)); - fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(shoto_check_special_command as *const () as _)); - - if is_training_mode() { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,0); - } - else { - VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); - } - - //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); - VarModule::set_int(fighter.object(), LUCAS_CHARGE_TIME, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); - VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); - } -} - unsafe extern "C" fn should_use_special_hi_callback(fighter: &mut L2CFighterCommon) -> L2CValue { if fighter.is_situation(*SITUATION_KIND_AIR) && VarModule::is_flag(fighter.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI) { false.into() @@ -83,7 +60,7 @@ unsafe extern "C" fn change_status_callback(fighter: &mut L2CFighterCommon) -> L // FIGHTER_STATUS_KIND_JUMP // -pub unsafe extern "C" fn pre_jump(fighter: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn jump_pre(fighter: &mut L2CFighterCommon) -> L2CValue { if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_FLAG_COPY) { if WorkModule::get_int(fighter.module_accessor, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == *FIGHTER_KIND_PICKEL { if fighter.status_pre_Jump_Common_param(L2CValue::Bool(true)).get_bool() { @@ -248,7 +225,34 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue { } } +unsafe extern "C" fn on_start(fighter: &mut L2CFighterCommon) { + // set the callbacks on fighter init + fighter.global_table[globals::USE_SPECIAL_HI_CALLBACK].assign(&L2CValue::Ptr(should_use_special_hi_callback as *const () as _)); + fighter.global_table[globals::STATUS_CHANGE_CALLBACK].assign(&L2CValue::Ptr(change_status_callback as *const () as _)); + fighter.global_table[globals::USE_SPECIAL_N_CALLBACK].assign(&L2CValue::Ptr(ganon_should_use_special_n_callback as *const () as _)); + fighter.global_table[globals::CHECK_SPECIAL_COMMAND].assign(&L2CValue::Ptr(shoto_check_special_command as *const () as _)); + + if is_training_mode() { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,0); + } + else { + VarModule::set_int(fighter.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); + } + + //let charge_time = ParamModule::get_int(fighter.object(), ParamType::Agent, "attack_up_charge_time"); + VarModule::set_int(fighter.object(), LUCAS_CHARGE_TIME, vars::lucas::instance::SPECIAL_N_OFFENSE_UP_CHARGE_LEVEL); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_INIT); + VarModule::off_flag(fighter.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_RELEASE_AFTER_WHIFF); +} + pub fn install(agent: &mut Agent) { + agent.on_start(on_start); + + agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP, jump_pre); + agent.status(MapCorrection, *FIGHTER_STATUS_KIND_THROW_KIRBY, throw_kirby_map_correction); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre); + special_hi_h::install(agent); gaogaen_special_n::install(agent); luigi_special_n::install(agent); @@ -263,16 +267,6 @@ pub fn install(agent: &mut Agent) { lucas_special_n::install(agent); sonic_special_n::install(agent); edge_special_n::install(agent); - bayonetta_special_n_cancel::install(agent); - smashline::Agent::new("kirby") - .on_start(kirby_init) - .status(Pre, *FIGHTER_STATUS_KIND_JUMP, pre_jump) - .status( - MapCorrection, - *FIGHTER_STATUS_KIND_THROW_KIRBY, - throw_kirby_map_correction, - ) - .status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_pre) - .install(); + bayonetta_special_n_cancel::install(agent); } diff --git a/fighters/kirby/src/status/ridley_special_n.rs b/fighters/kirby/src/status/ridley_special_n.rs index 96681ad433..8a8cd9b5d7 100644 --- a/fighters/kirby/src/status/ridley_special_n.rs +++ b/fighters/kirby/src/status/ridley_special_n.rs @@ -135,6 +135,6 @@ unsafe extern "C" fn special_n_situation_helper(fighter: &mut L2CFighterCommon) } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, special_n_charge_main,); - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, special_n_shoot_status_main,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_CHARGE, special_n_charge_main); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_RIDLEY_SPECIAL_N_SHOOT, special_n_shoot_status_main); } diff --git a/fighters/kirby/src/status/sonic_special_n.rs b/fighters/kirby/src/status/sonic_special_n.rs index 967dc50cf8..0dcd135d47 100644 --- a/fighters/kirby/src/status/sonic_special_n.rs +++ b/fighters/kirby/src/status/sonic_special_n.rs @@ -105,6 +105,6 @@ pub unsafe extern "C" fn special_n_homing_start_pre(fighter: &mut L2CFighterComm } pub fn install(agent: &mut Agent) { - agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, special_n_main,); - agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, special_n_homing_start_pre,); + agent.status(Main, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N, special_n_main); + agent.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_SONIC_SPECIAL_N_HOMING_START, special_n_homing_start_pre); } diff --git a/fighters/koopa/src/acmd/aerials.rs b/fighters/koopa/src/acmd/aerials.rs index 7301aa89d3..c4888bfc47 100644 --- a/fighters/koopa/src/acmd/aerials.rs +++ b/fighters/koopa/src/acmd/aerials.rs @@ -120,7 +120,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { @@ -158,7 +157,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { @@ -202,7 +200,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { @@ -258,7 +255,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { diff --git a/fighters/krool/src/backpack/acmd.rs b/fighters/krool/src/backpack/acmd.rs index ca43b0f288..e0f164ed88 100644 --- a/fighters/krool/src/backpack/acmd.rs +++ b/fighters/krool/src/backpack/acmd.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn effect_start(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("krool_buckpack"), Hash40::new("backpack"), -12, -1.5, -6, 0, 0, 0, 1, true); EffectModule::enable_sync_init_pos_last(boma); } - } unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index b8ba5d1a42..c2a4881a44 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -332,7 +332,6 @@ unsafe extern "C" fn special_hi_set_physics(fighter: &mut L2CFighterCommon) { sv_kinetic_energy!(set_stable_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, 0.0, 0.0); KineticModule::enable_energy(fighter.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_STOP); } - } //FUN_71000210d0 @@ -474,7 +473,6 @@ unsafe extern "C" fn special_hi_lean_physics(fighter: &mut L2CFighterCommon) { let speed_x = fighter.get_speed_x(*FIGHTER_KINETIC_ENERGY_ID_STOP); sv_kinetic_energy!(set_speed, fighter, FIGHTER_KINETIC_ENERGY_ID_STOP, speed_x + fall_lean_stick_mul_x, 0.0); } - } //FUN_710001e090 diff --git a/fighters/krool/src/status/special_lw.rs b/fighters/krool/src/status/special_lw.rs index 78910dd0f8..0890529970 100644 --- a/fighters/krool/src/status/special_lw.rs +++ b/fighters/krool/src/status/special_lw.rs @@ -109,7 +109,6 @@ unsafe extern "C" fn special_lw_change_motion(fighter: &mut L2CFighterCommon) { MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new("special_lw"), -1.0, 1.0, 0.0); } } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index b224779900..dfe325a793 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -353,7 +353,6 @@ unsafe extern "C" fn game_specialhiend(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { diff --git a/fighters/lucario/src/status/special_n.rs b/fighters/lucario/src/status/special_n.rs index f930769638..440e1d07d9 100644 --- a/fighters/lucario/src/status/special_n.rs +++ b/fighters/lucario/src/status/special_n.rs @@ -366,7 +366,6 @@ pub unsafe extern "C" fn special_n_save_charge_status(fighter: &mut L2CFighterCo } else { EffectModule::remove_common(fighter.module_accessor, Hash40::new("charge_max")); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/lucas/src/opff.rs b/fighters/lucas/src/opff.rs index 5cc4f84151..c73b5836d3 100644 --- a/fighters/lucas/src/opff.rs +++ b/fighters/lucas/src/opff.rs @@ -190,7 +190,6 @@ unsafe fn pk_thunder_wall_ride_shorten(fighter: &mut smash::lua2cpp::L2CFighterC VarModule::off_flag(boma.object(), vars::lucas::status::SPECIAL_HI_ATTACK_IS_FLIPPED_MOMENTUM_AFTER_WALLTOUCH); VarModule::off_flag(boma.object(), vars::lucas::status::SPECIAL_HI_ATTACK_IS_SET_WALL_LEAVE_MOMENTUM); } - } // Lucas PK Fire drift diff --git a/fighters/lucas/src/pkfire/acmd.rs b/fighters/lucas/src/pkfire/acmd.rs index 84ce8021e1..9826ffae6c 100644 --- a/fighters/lucas/src/pkfire/acmd.rs +++ b/fighters/lucas/src/pkfire/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -33,6 +34,7 @@ unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { // AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); //} } + unsafe extern "C" fn effect_pillar(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -47,6 +49,7 @@ unsafe extern "C" fn effect_pillar(agent: &mut L2CAgentBase) { } */ } + unsafe extern "C" fn sound_pillar(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -54,20 +57,6 @@ unsafe extern "C" fn sound_pillar(agent: &mut L2CAgentBase) { PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_s")); } } -unsafe extern "C" fn lucas_pkthunder_game_move_child(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - if is_excute(agent) { - ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - AttackModule::set_attack_composition_speed(boma, 1, true); - } - wait(lua_state, 1.0); - if is_excute(agent) { - if VarModule::is_flag(agent.object(), vars::lucas::status::THUNDER_LOOSE) { - ATTACK(agent, 1, 1, Hash40::new("top"), 0.75, 80, 40, 0, 4, 2.5, 0.0, 0.0, 0.0, None, None, None, 0.5, 2.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 6, false, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, true, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_PSI); - } - } -} pub fn install(agent: &mut Agent) { agent.acmd("game_shoot", game_shoot); diff --git a/fighters/lucina/src/status/special_lw.rs b/fighters/lucina/src/status/special_lw.rs index a6e4667da0..98af336c63 100644 --- a/fighters/lucina/src/status/special_lw.rs +++ b/fighters/lucina/src/status/special_lw.rs @@ -36,7 +36,6 @@ unsafe extern "C" fn special_lw_main_motion_helper(fighter: &mut L2CFighterCommo MotionModule::change_motion_inherit_frame_keep_rate(fighter.module_accessor, Hash40::new_raw(mot), -1.0, 1.0, 0.0); } } - } unsafe extern "C" fn special_lw_check_follow_up(fighter: &mut L2CFighterCommon) { diff --git a/fighters/luigi/src/acmd/specials.rs b/fighters/luigi/src/acmd/specials.rs index aa330367db..48aae2e7da 100644 --- a/fighters/luigi/src/acmd/specials.rs +++ b/fighters/luigi/src/acmd/specials.rs @@ -451,7 +451,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_specialairnthunder", effect_specialnthunder); agent.acmd("sound_specialnthunder", sound_specialnthunder); agent.acmd("sound_specialairnthunder", sound_specialnthunder); - agent.acmd("expression_specialnthunder",expression_specialnthunder,); + agent.acmd("expression_specialnthunder",expression_specialnthunder); agent.acmd("expression_specialairnthunder",expression_specialnthunder); agent.acmd("game_specialairsstart", game_specialairsstart); diff --git a/fighters/luigi/src/status/special_s.rs b/fighters/luigi/src/status/special_s.rs index 7c2e9d72ca..20bfa76b50 100644 --- a/fighters/luigi/src/status/special_s.rs +++ b/fighters/luigi/src/status/special_s.rs @@ -129,8 +129,8 @@ unsafe extern "C" fn special_s_charge_exit(fighter: &mut L2CFighterCommon) -> L2 } pub fn install(agent: &mut Agent) { - agent.status(Init, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_init,); - agent.status(Main, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_main,); - agent.status(End, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_end,); - agent.status(Exit, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_exit,); + agent.status(Init, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_init); + agent.status(Main, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_main); + agent.status(End, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_end); + agent.status(Exit, *FIGHTER_LUIGI_STATUS_KIND_SPECIAL_S_CHARGE, special_s_charge_exit); } diff --git a/fighters/mariod/src/acmd/specials.rs b/fighters/mariod/src/acmd/specials.rs index 2ac59119d0..c551f05ec7 100644 --- a/fighters/mariod/src/acmd/specials.rs +++ b/fighters/mariod/src/acmd/specials.rs @@ -606,7 +606,6 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_impact"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("mariod_smash_aura"), false, true); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/master/src/acmd/aerials.rs b/fighters/master/src/acmd/aerials.rs index ebbd91091e..8e196074c7 100644 --- a/fighters/master/src/acmd/aerials.rs +++ b/fighters/master/src/acmd/aerials.rs @@ -163,7 +163,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { ArticleModule::remove_exist(boma, *FIGHTER_MASTER_GENERATE_ARTICLE_SPEAR, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { diff --git a/fighters/metaknight/src/acmd/specials.rs b/fighters/metaknight/src/acmd/specials.rs index 83a941dc64..b255951d9d 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -212,7 +212,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { 0.0 ); } - } unsafe extern "C" fn game_specialhiloop(agent: &mut L2CAgentBase) { diff --git a/fighters/miiswordsman/src/acmd/specials/special_lw.rs b/fighters/miiswordsman/src/acmd/specials/special_lw.rs index bda8c351cf..3980368a72 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_lw.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_lw.rs @@ -125,7 +125,7 @@ unsafe extern "C" fn game_specialairlw1hit(agent: &mut L2CAgentBase) { // Kinesis Blade - 1 Charge -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw1hitlv1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -160,7 +160,7 @@ unsafe extern "C" fn miiswordsman_special_lw1_hit_lv1_game(agent: &mut L2CAgentB } } -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw1hitlv1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -197,7 +197,7 @@ unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv1_game(agent: &mut L2CAg // Kinesis Blade - 2 Charges -unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw1hitlv2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -232,7 +232,7 @@ unsafe extern "C" fn miiswordsman_special_lw1_hit_lv2_game(agent: &mut L2CAgentB } } -unsafe extern "C" fn miiswordsman_special_air_lw1_hit_lv2_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw1hitlv2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -396,7 +396,6 @@ unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_electric_hit_s")); } - } // ================================================================================================================ @@ -433,7 +432,7 @@ unsafe extern "C" fn game_speciallw3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miiswordsman_special_lw3_end_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw3end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -550,7 +549,7 @@ unsafe extern "C" fn game_specialairlw3end(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairlw3endair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -613,10 +612,10 @@ unsafe extern "C" fn miiswordsman_special_air_lw3_end_air_game(agent: &mut L2CAg pub fn install(agent: &mut Agent) { agent.acmd("game_speciallw1hit", game_speciallw1hit); agent.acmd("game_specialairlw1hit", game_specialairlw1hit); - //agent.acmd("game_speciallw1hitlv1", miiswordsman_special_lw1_hit_lv1_game); - //agent.acmd("game_specialairlw1hitlv1", miiswordsman_special_air_lw1_hit_lv1_game); - //agent.acmd("game_speciallw1hitlv2", miiswordsman_special_lw1_hit_lv2_game); - //agent.acmd("game_specialairlw1hitlv2", miiswordsman_special_air_lw1_hit_lv2_game); + //agent.acmd("game_speciallw1hitlv1", game_speciallw1hitlv1); + //agent.acmd("game_specialairlw1hitlv1", game_specialairlw1hitlv1); + //agent.acmd("game_speciallw1hitlv2", game_speciallw1hitlv2); + //agent.acmd("game_specialairlw1hitlv2", game_specialairlw1hitlv2); agent.acmd("game_speciallw2", game_speciallw2); agent.acmd("game_specialairlw2", game_speciallw2); @@ -626,8 +625,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_specialairlw2", sound_speciallw2); agent.acmd("game_speciallw3", game_speciallw3); - //agent.acmd("game_speciallw3end", miiswordsman_special_lw3_end_game); + //agent.acmd("game_speciallw3end", game_speciallw3end); agent.acmd("game_specialairlw3", game_specialairlw3); agent.acmd("game_specialairlw3end", game_specialairlw3end); - //agent.acmd("game_specialairlw3endair", miiswordsman_special_air_lw3_end_air_game); + //agent.acmd("game_specialairlw3endair", game_specialairlw3endair); } \ No newline at end of file diff --git a/fighters/miiswordsman/src/chakram/acmd.rs b/fighters/miiswordsman/src/chakram/acmd.rs index 59a45540cc..996fa70712 100644 --- a/fighters/miiswordsman/src/chakram/acmd.rs +++ b/fighters/miiswordsman/src/chakram/acmd.rs @@ -54,7 +54,7 @@ unsafe extern "C" fn game_flyflicksub(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn miiswordsman_chakram_hop_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_hop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let owner_module_accessor = &mut *sv_battle_object::module_accessor((WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); @@ -84,7 +84,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_fly", game_fly); agent.acmd("game_flynormalsub", game_flynormalsub); agent.acmd("game_flyflicksub", game_flyflicksub); - //.acmd("game_hop", miiswordsman_chakram_hop_game); + //agent.acmd("game_hop", game_hop); agent.acmd("game_stick", game_stick); agent.acmd("effect_stick", effect_stick); } diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index 75328d92e3..50be601c15 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -133,7 +133,6 @@ unsafe extern "C" fn game_specialairlwhold(agent: &mut L2CAgentBase) { } wait(lua_state, 14.0); } - } //Implemented to remove release windbox diff --git a/fighters/ness/src/opff.rs b/fighters/ness/src/opff.rs index 65179afc4d..3274766884 100644 --- a/fighters/ness/src/opff.rs +++ b/fighters/ness/src/opff.rs @@ -119,7 +119,6 @@ unsafe fn pk_thunder_wall_ride(boma: &mut BattleObjectModuleAccessor, id: usize, KineticModule::mul_speed(boma, &wall_ride, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } } - } // Allow grabbing the ledge from behind while in upSpecialEnd diff --git a/fighters/packun/src/acmd/smashes.rs b/fighters/packun/src/acmd/smashes.rs index ae0c883dd9..2344d4623a 100644 --- a/fighters/packun/src/acmd/smashes.rs +++ b/fighters/packun/src/acmd/smashes.rs @@ -54,7 +54,6 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - } unsafe extern "C" fn game_attacks42(agent: &mut L2CAgentBase) { diff --git a/fighters/pacman/src/acmd/aerials.rs b/fighters/pacman/src/acmd/aerials.rs index e16af0556a..78c9e2d76a 100644 --- a/fighters/pacman/src/acmd/aerials.rs +++ b/fighters/pacman/src/acmd/aerials.rs @@ -105,7 +105,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -141,7 +140,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { diff --git a/fighters/pit/src/status/special_hi.rs b/fighters/pit/src/status/special_hi.rs index b45f8a7588..5c419f7766 100644 --- a/fighters/pit/src/status/special_hi.rs +++ b/fighters/pit/src/status/special_hi.rs @@ -74,6 +74,6 @@ unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommo } pub fn install(agent: &mut Agent) { - agent.status(Pre,*FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_pre,); - agent.status(Main,*FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END,special_hi_rush_end_main,); + agent.status(Pre, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_pre); + agent.status(Main, *FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END, special_hi_rush_end_main); } diff --git a/fighters/robot/src/opff.rs b/fighters/robot/src/opff.rs index 023eaffa72..0d61c4f8d6 100644 --- a/fighters/robot/src/opff.rs +++ b/fighters/robot/src/opff.rs @@ -186,7 +186,6 @@ unsafe fn meter_control(boma: &mut BattleObjectModuleAccessor) { MeterModule::drain_direct(boma.object(), 2.0); } } - } pub unsafe fn moveset(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index bbfe2b115f..c19e2162b2 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -168,7 +168,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index f6afae82bc..edc9a70d50 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -157,7 +157,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { JostleModule::set_status(boma, true); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/roy/src/acmd/specials/mod.rs b/fighters/roy/src/acmd/specials/mod.rs index bea5dd7cb7..59958f04a6 100644 --- a/fighters/roy/src/acmd/specials/mod.rs +++ b/fighters/roy/src/acmd/specials/mod.rs @@ -469,7 +469,7 @@ pub fn install(agent: &mut Agent) { agent.acmd("game_specialairnend", game_specialairnend); agent.acmd("effect_specialairnend", effect_specialairnend); agent.acmd("sound_specialairnend", sound_specialairnend); - agent.acmd("expression_specialairnend",expression_specialairnend,); + agent.acmd("expression_specialairnend",expression_specialairnend); agent.acmd("game_specialairnend2", game_specialairnend2); agent.acmd("game_specialairnend3", game_specialairnend3); diff --git a/fighters/sheik/src/acmd/throws.rs b/fighters/sheik/src/acmd/throws.rs index efa061a46f..eaf266fe8e 100644 --- a/fighters/sheik/src/acmd/throws.rs +++ b/fighters/sheik/src/acmd/throws.rs @@ -42,7 +42,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { diff --git a/fighters/shulk/src/status/special_s.rs b/fighters/shulk/src/status/special_s.rs index 860775673e..5d6798f766 100644 --- a/fighters/shulk/src/status/special_s.rs +++ b/fighters/shulk/src/status/special_s.rs @@ -147,6 +147,6 @@ unsafe extern "C" fn special_s_main_loop(fighter: &mut L2CFighterCommon) -> L2CV } pub fn install(agent: &mut Agent) { - agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre,); + agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_pre); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_S, special_s_main); } \ No newline at end of file diff --git a/fighters/tantan/src/punch1/acmd.rs b/fighters/tantan/src/punch1/acmd.rs index d70c66e103..3dd0f177b4 100644 --- a/fighters/tantan/src/punch1/acmd.rs +++ b/fighters/tantan/src/punch1/acmd.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn dragon_game_attackshort(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackshort(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -22,7 +22,7 @@ unsafe extern "C" fn dragon_game_attackshort(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dragon_game_attacklong(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacklong(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -71,7 +71,7 @@ unsafe extern "C" fn dragon_game_attacklong(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dragon_game_attackdragonshootlong(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attackdragonshootlong(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -128,7 +128,7 @@ unsafe extern "C" fn dragon_game_attackdragonshootlong(agent: &mut L2CAgentBase) } } -unsafe extern "C" fn dragon_effect_attackdragonshootlong(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackdragonshootlong(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -149,7 +149,7 @@ unsafe extern "C" fn dragon_effect_attackdragonshootlong(agent: &mut L2CAgentBas } } -unsafe extern "C" fn dragon_special_hi_attack_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairhiattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); let angle = (75.0+WorkModule::get_float(boma,*FIGHTER_TANTAN_INSTANCE_WORK_ID_FLOAT_ATTACK_SHIFT_ANGLE_L)) as u64; @@ -166,7 +166,7 @@ unsafe extern "C" fn dragon_special_hi_attack_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackbeamloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -181,11 +181,14 @@ unsafe extern "C" fn dragon_sound_attackbeamloop(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackshort", dragon_game_attackshort); - agent.acmd("game_attacklong", dragon_game_attacklong); - agent.acmd("game_attackdragonshootlong",dragon_game_attackdragonshootlong,); - agent.acmd("effect_attackdragonshootlong",dragon_effect_attackdragonshootlong,); - agent.acmd("game_specialairhiattack", dragon_special_hi_attack_game); - agent.acmd("game_specialairhiattackdragon",dragon_special_hi_attack_game,); - agent.acmd("sound_attackbeamloop", dragon_sound_attackbeamloop); + agent.acmd("game_attackshort", game_attackshort); + agent.acmd("game_attacklong", game_attacklong); + + agent.acmd("game_attackdragonshootlong", game_attackdragonshootlong); + agent.acmd("effect_attackdragonshootlong", effect_attackdragonshootlong); + + agent.acmd("game_specialairhiattack", game_specialairhiattack); + agent.acmd("game_specialairhiattackdragon", game_specialairhiattack); + + agent.acmd("sound_attackbeamloop", sound_attackbeamloop); } From 57e3161a9dcded7734e05b1d742583b3c28ac39b Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 10:29:36 -0500 Subject: [PATCH 166/172] consistency...... --- fighters/cloud/src/opff.rs | 68 +++++++-------- fighters/diddy/src/acmd/aerials.rs | 19 +---- fighters/krool/src/status/attack_lw4.rs | 72 ++++++++-------- fighters/pikmin/src/opff.rs | 98 +++++++++++----------- fighters/pikmin/src/pikmin/status.rs | 94 ++++++++++----------- fighters/pikmin/src/status/attack_air.rs | 102 +++++++++++------------ fighters/pikmin/src/status/escape_air.rs | 6 +- fighters/pikmin/src/status/rebirth.rs | 6 +- fighters/pitb/src/status/special_hi.rs | 32 +++---- 9 files changed, 242 insertions(+), 255 deletions(-) diff --git a/fighters/cloud/src/opff.rs b/fighters/cloud/src/opff.rs index 86041399fb..eeb8d9f5af 100644 --- a/fighters/cloud/src/opff.rs +++ b/fighters/cloud/src/opff.rs @@ -3,29 +3,29 @@ use globals::*; utils::import_noreturn!(common::opff::fighter_common_opff); -unsafe fn dspecial_cancels(agent: &mut L2CFighterCommon) { - if agent.is_status(*FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END) - && agent.is_situation(*SITUATION_KIND_AIR) - && WorkModule::get_int(agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR +unsafe fn dspecial_cancels(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END) + && fighter.is_situation(*SITUATION_KIND_AIR) + && WorkModule::get_int(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS) == *FIGHTER_STATUS_KIND_ESCAPE_AIR { - WorkModule::set_int(agent.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS); + WorkModule::set_int(fighter.module_accessor, *FIGHTER_STATUS_KIND_NONE, *FIGHTER_CLOUD_STATUS_SPECIAL_LW_INT_CANCEL_STATUS); } } // Fixes bug where touching ground during upB puts you into special fall for 1f before landing -unsafe fn up_special_proper_landing(Agent: &mut L2CFighterCommon) { - if Agent.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) - && Agent.is_situation(*SITUATION_KIND_GROUND) - && WorkModule::is_flag(Agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL) { - Agent.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); - WorkModule::off_flag(Agent.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); +unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { + if fighter.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) + && fighter.is_situation(*SITUATION_KIND_GROUND) + && WorkModule::is_flag(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_CLOUD_STATUS_SPECIAL_HI_FLAG_FALL); } } -unsafe fn fastfall_specials(Agent: &mut L2CFighterCommon) { - if !Agent.is_in_hitlag() - && !StatusModule::is_changing(Agent.module_accessor) - && Agent.is_status_one_of(&[ +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_STATUS_KIND_SPECIAL_LW, @@ -35,34 +35,34 @@ unsafe fn fastfall_specials(Agent: &mut L2CFighterCommon) { *FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_CHARGE, *FIGHTER_CLOUD_STATUS_KIND_SPECIAL_LW_END ]) - && Agent.is_situation(*SITUATION_KIND_AIR) { - Agent.sub_air_check_dive(); - if Agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(Agent.module_accessor)) { - Agent.clear_lua_stack(); - lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(Agent.lua_state_agent); + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - Agent.clear_lua_stack(); - lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(Agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - Agent.clear_lua_stack(); - lua_args!(Agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(Agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, Agent.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); } } } } -pub unsafe extern "C" fn cloud_frame_wrapper(Agent: &mut L2CFighterCommon) { - common::opff::fighter_common_opff(Agent); +pub unsafe extern "C" fn cloud_frame_wrapper(fighter: &mut L2CFighterCommon) { + common::opff::fighter_common_opff(fighter); - dspecial_cancels(Agent); - up_special_proper_landing(Agent); - fastfall_specials(Agent); + dspecial_cancels(fighter); + up_special_proper_landing(fighter); + fastfall_specials(fighter); } pub fn install(agent: &mut Agent) { diff --git a/fighters/diddy/src/acmd/aerials.rs b/fighters/diddy/src/acmd/aerials.rs index 2feab39b29..2ba4b05554 100644 --- a/fighters/diddy/src/acmd/aerials.rs +++ b/fighters/diddy/src/acmd/aerials.rs @@ -145,7 +145,7 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); @@ -159,6 +159,7 @@ unsafe extern "C" fn diddy_attack_air_hi_effect(agent: &mut L2CAgentBase) { } } + unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -172,20 +173,6 @@ unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 5.0); - if is_excute(agent) { - EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("diddy_attack_arc"), Hash40::new("diddy_attack_arc"), Hash40::new("top"), 0, 10, 1, -48, 78.5, 51, 1.1, true, *EF_FLIP_YZ, 0.7); - LAST_EFFECT_SET_RATE(agent, 1.9); - } - frame(lua_state, 10.0); - if is_excute(agent) { - EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_arc"), true, true); - } -} - unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -222,8 +209,8 @@ pub fn install(agent: &mut Agent) { agent.acmd("effect_attackairb", effect_attackairb); agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); agent.acmd("game_attackairlw", game_attackairlw); } diff --git a/fighters/krool/src/status/attack_lw4.rs b/fighters/krool/src/status/attack_lw4.rs index 99225a6666..b7eb5b2339 100644 --- a/fighters/krool/src/status/attack_lw4.rs +++ b/fighters/krool/src/status/attack_lw4.rs @@ -2,30 +2,30 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_LW4 -pub unsafe extern "C" fn attack_lw4_main(agent: &mut L2CFighterCommon) -> L2CValue { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); - agent.attack_lw4_mtrans(); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - if !StopModule::is_stop(agent.module_accessor) { - agent.status_ThrowKirby_Uniq(L2CValue::Bool(false)); +pub unsafe extern "C" fn attack_lw4_main(fighter: &mut L2CFighterCommon) -> L2CValue { + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_SMASH_SMASH_HOLD_TO_ATTACK); + fighter.attack_lw4_mtrans(); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + if !StopModule::is_stop(fighter.module_accessor) { + fighter.status_ThrowKirby_Uniq(L2CValue::Bool(false)); } - agent.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); - agent.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) + fighter.global_table[SUB_STATUS].assign(&L2CValue::Ptr(smash::lua2cpp::L2CFighterCommon_status_ThrowKirby_Uniq as *const () as _)); + fighter.sub_shift_status_main(L2CValue::Ptr(attack_lw4_main_loop as *const () as _)) } -pub unsafe extern "C" fn attack_lw4_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if !CancelModule::is_enable_cancel(agent.module_accessor) - && !WorkModule::is_enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) - && !MotionModule::is_end(agent.module_accessor) { - agent.sub_status_uniq_process_ThrowKirby_execFixPos(); +pub unsafe extern "C" fn attack_lw4_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if !CancelModule::is_enable_cancel(fighter.module_accessor) + && !WorkModule::is_enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND) + && !MotionModule::is_end(fighter.module_accessor) { + fighter.sub_status_uniq_process_ThrowKirby_execFixPos(); return 0.into() } - agent.status_AttackLw4_Main() + fighter.status_AttackLw4_Main() } -pub unsafe extern "C" fn attack_lw4_map_correction(agent: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(agent.module_accessor); - let prev_frame = MotionModule::prev_frame(agent.module_accessor); +pub unsafe extern "C" fn attack_lw4_map_correction(fighter: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(fighter.module_accessor); + let prev_frame = MotionModule::prev_frame(fighter.module_accessor); let start_air_frame = 2.0; let fall_start_frame = 19.0; let fall_stop_frame = 20.0; @@ -35,31 +35,31 @@ pub unsafe extern "C" fn attack_lw4_map_correction(agent: &mut L2CFighterCommon) return 0.into() } if prev_frame < start_air_frame && frame >= start_air_frame { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); + WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_THROW_FLAG_START_AIR); } - if agent.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { + if fighter.global_table[SITUATION_KIND] != SITUATION_KIND_GROUND { if prev_frame < fall_stop_frame && frame >= fall_stop_frame { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_mul(agent.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); - app::sv_kinetic_energy::set_accel_x_add(agent.lua_state_agent); - MotionModule::set_frame(agent.module_accessor, fall_stop_frame, true); - MotionModule::set_rate(agent.module_accessor, 0.0); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, -12.0); + app::sv_kinetic_energy::set_speed(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_mul(fighter.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, 0.0); + app::sv_kinetic_energy::set_accel_x_add(fighter.lua_state_agent); + MotionModule::set_frame(fighter.module_accessor, fall_stop_frame, true); + MotionModule::set_rate(fighter.module_accessor, 0.0); } } else { if frame < landing_frame { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); - MotionModule::set_frame(agent.module_accessor, landing_frame, true); - MotionModule::set_rate(agent.module_accessor, 1.0); + KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION_IGNORE_NORMAL); + GroundModule::correct(fighter.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND)); + WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_THROW_KIRBY_GROUND); + MotionModule::set_frame(fighter.module_accessor, landing_frame, true); + MotionModule::set_rate(fighter.module_accessor, 1.0); } } 0.into() diff --git a/fighters/pikmin/src/opff.rs b/fighters/pikmin/src/opff.rs index 930cec8fad..88fb19e4f2 100644 --- a/fighters/pikmin/src/opff.rs +++ b/fighters/pikmin/src/opff.rs @@ -3,7 +3,7 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; -unsafe fn winged_pikmin_cancel(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat1: i32) { +unsafe fn winged_pikmin_cancel(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, cat1: i32) { if [*FIGHTER_STATUS_KIND_SPECIAL_HI, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_WAIT].contains(&status_kind) { if boma.is_cat_flag(Cat1::SpecialN) { StatusModule::change_status_request_from_script(boma, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_END, false); @@ -12,13 +12,13 @@ unsafe fn winged_pikmin_cancel(agent: &mut L2CFighterCommon, boma: &mut BattleOb VarModule::on_flag(boma.object(), vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); } } - if agent.is_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) - && agent.is_situation(*SITUATION_KIND_AIR) - && !StatusModule::is_changing(agent.module_accessor) - && CancelModule::is_enable_cancel(agent.module_accessor) + if fighter.is_status(*FIGHTER_STATUS_KIND_ESCAPE_AIR) + && fighter.is_situation(*SITUATION_KIND_AIR) + && !StatusModule::is_changing(fighter.module_accessor) + && CancelModule::is_enable_cancel(fighter.module_accessor) && VarModule::is_flag(boma.object(), vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR) { - agent.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true); - let cancel_module = *(agent.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; + fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true); + let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64; *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false } } @@ -50,10 +50,10 @@ pub struct TroopManager { // funny blujay made this happen } -unsafe fn pikmin_antenna_indicator(agent: &mut L2CFighterCommon) { - if agent.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ENTRY +unsafe fn pikmin_antenna_indicator(fighter: &mut L2CFighterCommon) { + if fighter.global_table[STATUS_KIND].get_i32() == *FIGHTER_STATUS_KIND_ENTRY || sv_information::is_ready_go() { - let troops = WorkModule::get_int64(agent.module_accessor, 0x100000C0); + let troops = WorkModule::get_int64(fighter.module_accessor, 0x100000C0); // 0x100000C0 = FIGHTER_PIKMIN_INSTANCE_WORK_INT_TROOPS_MANAGER_ADDRESS let troopmanager = troops as *const TroopManager; let count = (*troopmanager).current_pikmin_count; @@ -67,7 +67,7 @@ unsafe fn pikmin_antenna_indicator(agent: &mut L2CFighterCommon) { pikmin = std::ptr::null_mut(); pikmin_id = *BATTLE_OBJECT_ID_INVALID as u32; } - let antenna_eff = WorkModule::get_int(agent.module_accessor, 0x100000C4) as u32; + let antenna_eff = WorkModule::get_int(fighter.module_accessor, 0x100000C4) as u32; // 0x100000C4 = FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_ANTENNA_EFFECT_HANDLE if pikmin_id != *BATTLE_OBJECT_ID_INVALID as u32 && sv_battle_object::is_active(pikmin_id) { @@ -102,71 +102,71 @@ unsafe fn pikmin_antenna_indicator(agent: &mut L2CFighterCommon) { b_param = "antenna.light_medium_high"; } // Purple }; - let r = ParamModule::get_float(agent.battle_object, ParamType::Agent, r_param); - let g = ParamModule::get_float(agent.battle_object, ParamType::Agent, g_param); - let b = ParamModule::get_float(agent.battle_object, ParamType::Agent, b_param); - let alpha = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_bright_alpha"); - EffectModule::set_alpha(agent.module_accessor, antenna_eff, 1.0); - EffectModule::set_rgb(agent.module_accessor, antenna_eff, r, g, b); + let r = ParamModule::get_float(fighter.battle_object, ParamType::Agent, r_param); + let g = ParamModule::get_float(fighter.battle_object, ParamType::Agent, g_param); + let b = ParamModule::get_float(fighter.battle_object, ParamType::Agent, b_param); + let alpha = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_bright_alpha"); + EffectModule::set_alpha(fighter.module_accessor, antenna_eff, 1.0); + EffectModule::set_rgb(fighter.module_accessor, antenna_eff, r, g, b); } else { // No Pikmin, make it transparent and grey. - let rgb = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_medium_high"); - EffectModule::set_rgb(agent.module_accessor, antenna_eff, rgb, rgb, rgb); - let alpha = ParamModule::get_float(agent.battle_object, ParamType::Agent, "antenna.light_dim_alpha"); - EffectModule::set_alpha(agent.module_accessor, antenna_eff, 0.05); + let rgb = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_medium_high"); + EffectModule::set_rgb(fighter.module_accessor, antenna_eff, rgb, rgb, rgb); + let alpha = ParamModule::get_float(fighter.battle_object, ParamType::Agent, "antenna.light_dim_alpha"); + EffectModule::set_alpha(fighter.module_accessor, antenna_eff, 0.05); } } } -unsafe fn fastfall_specials(agent: &mut L2CFighterCommon) { - if !agent.is_in_hitlag() - && !StatusModule::is_changing(agent.module_accessor) - && agent.is_status_one_of(&[ +unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { + if !fighter.is_in_hitlag() + && !StatusModule::is_changing(fighter.module_accessor) + && fighter.is_status_one_of(&[ *FIGHTER_STATUS_KIND_SPECIAL_N, *FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_STATUS_KIND_SPECIAL_LW, *FIGHTER_PIKMIN_STATUS_KIND_SPECIAL_HI_END ]) - && agent.is_situation(*SITUATION_KIND_AIR) { - agent.sub_air_check_dive(); - if agent.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { - if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(agent.module_accessor)) { - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_MOTION); - let speed_y = app::sv_kinetic_energy::get_speed_y(agent.lua_state_agent); + && fighter.is_situation(*SITUATION_KIND_AIR) { + fighter.sub_air_check_dive(); + if fighter.is_flag(*FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_DIVE) { + if [*FIGHTER_KINETIC_TYPE_MOTION_AIR, *FIGHTER_KINETIC_TYPE_MOTION_AIR_ANGLE].contains(&KineticModule::get_kinetic_type(fighter.module_accessor)) { + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_MOTION); + let speed_y = app::sv_kinetic_energy::get_speed_y(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, ENERGY_GRAVITY_RESET_TYPE_GRAVITY, 0.0, speed_y, 0.0, 0.0, 0.0); + app::sv_kinetic_energy::reset_energy(fighter.lua_state_agent); - agent.clear_lua_stack(); - lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); - app::sv_kinetic_energy::enable(agent.lua_state_agent); + fighter.clear_lua_stack(); + lua_args!(fighter, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + app::sv_kinetic_energy::enable(fighter.lua_state_agent); - KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, agent.module_accessor); + KineticUtility::clear_unable_energy(*FIGHTER_KINETIC_ENERGY_ID_MOTION, fighter.module_accessor); } } } } -pub unsafe fn moveset(agent: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { - winged_pikmin_cancel(agent, boma, status_kind, cat[0]); +pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, id: usize, cat: [i32 ; 4], status_kind: i32, situation_kind: i32, motion_kind: u64, stick_x: f32, stick_y: f32, facing: f32, frame: f32) { + winged_pikmin_cancel(fighter, boma, status_kind, cat[0]); solimar_scaling(boma, status_kind, frame); - pikmin_antenna_indicator(agent); - fastfall_specials(agent); + pikmin_antenna_indicator(fighter); + fastfall_specials(fighter); } -pub extern "C" fn pikmin_frame_wrapper(agent: &mut smash::lua2cpp::L2CFighterCommon) { +pub extern "C" fn pikmin_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFighterCommon) { unsafe { - common::opff::fighter_common_opff(agent); - pikmin_frame(agent) + common::opff::fighter_common_opff(fighter); + pikmin_frame(fighter) } } -pub unsafe fn pikmin_frame(agent: &mut smash::lua2cpp::L2CFighterCommon) { - if let Some(info) = FrameInfo::update_and_get(agent) { - moveset(agent, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); +pub unsafe fn pikmin_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { + if let Some(info) = FrameInfo::update_and_get(fighter) { + moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } diff --git a/fighters/pikmin/src/pikmin/status.rs b/fighters/pikmin/src/pikmin/status.rs index 6e94996bf2..92d648b718 100644 --- a/fighters/pikmin/src/pikmin/status.rs +++ b/fighters/pikmin/src/pikmin/status.rs @@ -4,77 +4,77 @@ use globals::*; // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING -pub unsafe extern "C" fn special_s_cling_main(agent: &mut L2CFighterCommon) -> L2CValue { - agent.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); - AttackModule::set_ignore_just_shield(agent.module_accessor, true); - MotionModule::change_motion(agent.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); +pub unsafe extern "C" fn special_s_cling_main(weapon: &mut L2CFighterCommon) -> L2CValue { + weapon.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START); + AttackModule::set_ignore_just_shield(weapon.module_accessor, true); + MotionModule::change_motion(weapon.module_accessor, Hash40::new("sp_s_grab_attack"), 0.0, 1.0, false, 0.0, false, false); - if !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - && !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { - let target = agent.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); - agent.clear_lua_stack(); - agent.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(agent.lua_state_agent); + if !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + && !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + let target = weapon.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_SET_MATRIX | *CONSTRAINT_FLAG_NO_FLIP) as u32, true); + weapon.clear_lua_stack(); + weapon.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(weapon.lua_state_agent); } - let founder_id = sv_battle_object::get_founder_id(agent.global_table[OBJECT_ID].get_u32()); + let founder_id = sv_battle_object::get_founder_id(weapon.global_table[OBJECT_ID].get_u32()); let mut founder_module_accessor = sv_battle_object::module_accessor(founder_id as u32); if !founder_module_accessor.is_null() { let power_special_s = WorkModule::get_param_float(founder_module_accessor, hash40("power_special_s"), 0); - AttackModule::set_power_up(agent.module_accessor, power_special_s); + AttackModule::set_power_up(weapon.module_accessor, power_special_s); let founder_power_mul_status = AttackModule::power_mul_status(founder_module_accessor); - AttackModule::set_power_mul_status(agent.module_accessor, founder_power_mul_status); + AttackModule::set_power_mul_status(weapon.module_accessor, founder_power_mul_status); } - let variation = agent.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); + let variation = weapon.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - VarModule::set_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); - VarModule::off_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); - VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + VarModule::set_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0); + VarModule::off_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME); + VarModule::off_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - agent.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) + weapon.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _)) } -unsafe extern "C" fn special_s_cling_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - let frame = MotionModule::frame(agent.module_accessor); - let clatter_time = ControlModule::get_clatter_time(agent.module_accessor, 0); - agent.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); - let variation = agent.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); +unsafe extern "C" fn special_s_cling_main_loop(weapon: &mut L2CFighterCommon) -> L2CValue { + let frame = MotionModule::frame(weapon.module_accessor); + let clatter_time = ControlModule::get_clatter_time(weapon.module_accessor, 0); + weapon.set_int(clatter_time as i32, *WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_CLATTER_TIME); + let variation = weapon.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION); let p = PikminInfo::from(variation); - if !agent.global_table[IS_STOPPING].get_bool() - && !StatusModule::is_changing(agent.module_accessor) + if !weapon.global_table[IS_STOPPING].get_bool() + && !StatusModule::is_changing(weapon.module_accessor) { - let is_attack = AttackModule::is_attack(agent.module_accessor, 0, false); - if is_attack && !VarModule::is_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { - VarModule::inc_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); + let is_attack = AttackModule::is_attack(weapon.module_accessor, 0, false); + if is_attack && !VarModule::is_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) { + VarModule::inc_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER); } - VarModule::set_flag(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); - if VarModule::get_int(agent.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ - VarModule::on_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - agent.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); + VarModule::set_flag(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack); + if VarModule::get_int(weapon.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{ + VarModule::on_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + weapon.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into()); return 1.into(); } } - if agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) - || agent.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { + if weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY) + || weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_CARRIER) { return 0.into(); } - if !agent.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { - agent.clear_lua_stack(); - agent.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); - sv_battle_object::notify_event_msc_cmd(agent.lua_state_agent); + if !weapon.is_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT) { + weapon.clear_lua_stack(); + weapon.push_lua_stack(&mut L2CValue::new_int(0x367b17cdfd)); + sv_battle_object::notify_event_msc_cmd(weapon.lua_state_agent); if frame > 3.0 { - agent.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); - let target = agent.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); - LinkModule::set_model_constraint_pos_ort(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); + weapon.on_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_CLING_WORK_FLAG_IS_CONSTRAINT); + let target = weapon.get_int64(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_INT_TARGET_NODE); + LinkModule::set_model_constraint_pos_ort(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new("top"), Hash40::new_raw(target), (*CONSTRAINT_FLAG_POSITION | *CONSTRAINT_FLAG_NO_FLIP | *CONSTRAINT_FLAG_ORIENTATION) as u32, true); } } - if LinkModule::is_link(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { - LinkModule::send_event_parents(agent.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); + if LinkModule::is_link(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT) { + LinkModule::send_event_parents(weapon.module_accessor, *WEAPON_LINK_NO_CONSTRAINT, Hash40::new_raw(0x23fcecfa97)); } return 0.into(); @@ -82,9 +82,9 @@ unsafe extern "C" fn special_s_cling_main_loop(agent: &mut L2CFighterCommon) -> // WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE -pub unsafe extern "C" fn special_s_cling_remove_end(agent: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); - smashline::original_status(End, agent, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(agent) +pub unsafe extern "C" fn special_s_cling_remove_end(weapon: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(weapon.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE); + smashline::original_status(End, weapon, *WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE)(weapon) } pub fn install(agent: &mut Agent) { diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index 597073d51a..b359a8e4bf 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -2,49 +2,49 @@ use super::*; // FIGHTER_STATUS_KIND_ATTACK_AIR -pub unsafe extern "C" fn attack_air_main(agent: &mut L2CFighterCommon) -> L2CValue { - agent.sub_attack_air(); - agent.main_shift(attack_air_main_loop) +pub unsafe extern "C" fn attack_air_main(fighter: &mut L2CFighterCommon) -> L2CValue { + fighter.sub_attack_air(); + fighter.main_shift(attack_air_main_loop) } -unsafe extern "C" fn attack_air_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { - let status = if WorkModule::is_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { +unsafe extern "C" fn attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND { + let status = if WorkModule::is_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING) { FIGHTER_STATUS_KIND_LANDING_ATTACK_AIR } else { FIGHTER_STATUS_KIND_LANDING }; - agent.change_status(status.into(), false.into()); + fighter.change_status(status.into(), false.into()); return 0.into(); } else { - if agent.sub_transition_group_check_air_landing().get_bool() { + if fighter.sub_transition_group_check_air_landing().get_bool() { return 0.into(); } } - let fall_special = WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_ATTACK_AIR_WORK_FLAG_FALL_SPECIAL); + let fall_special = WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_ATTACK_AIR_WORK_FLAG_FALL_SPECIAL); if !fall_special { - if CancelModule::is_enable_cancel(agent.module_accessor) { - if agent.sub_wait_ground_check_common(false.into()).get_bool() - || agent.sub_air_check_fall_common().get_bool() { + if CancelModule::is_enable_cancel(fighter.module_accessor) { + if fighter.sub_wait_ground_check_common(false.into()).get_bool() + || fighter.sub_air_check_fall_common().get_bool() { return 0.into(); } } } - if MotionModule::is_end(agent.module_accessor) { + if MotionModule::is_end(fighter.module_accessor) { let status = if fall_special { FIGHTER_STATUS_KIND_FALL_SPECIAL } else { FIGHTER_STATUS_KIND_FALL }; - agent.change_status(status.into(), false.into()); + fighter.change_status(status.into(), false.into()); return 0.into(); } - if !agent.global_table[IS_STOPPING].get_bool() { - agent.sub_attack_air_uniq_process_exec_fix_pos(); - pikmin_attack_air_handle_pikmin(agent); + if !fighter.global_table[IS_STOPPING].get_bool() { + fighter.sub_attack_air_uniq_process_exec_fix_pos(); + pikmin_attack_air_handle_pikmin(fighter); } 0.into() } @@ -69,96 +69,96 @@ extern "C" { fn store_event_table(event: *const app::LinkEvent) -> L2CValue; } -unsafe extern "C" fn pikmin_attack_air_handle_pikmin(agent: &mut L2CFighterCommon) { - agent.sub_attack_air_uniq_process_exec(); - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC) { - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH) { +unsafe extern "C" fn pikmin_attack_air_handle_pikmin(fighter: &mut L2CFighterCommon) { + fighter.sub_attack_air_uniq_process_exec(); + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC) { + if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH) { return; } - pikmin_attack_air_handle_pikmin_detatch(agent); - WorkModule::off_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); + pikmin_attack_air_handle_pikmin_detatch(fighter); + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_DETACH); } else { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); - let fightermoduleaccessor = agent.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; + WorkModule::off_flag(fighter.module_accessor, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_FLAG_SYNC); + let fightermoduleaccessor = fighter.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; FighterSpecializer_Pikmin::hold_pikmin(fightermoduleaccessor, 1); FighterSpecializer_Pikmin::update_hold_pikmin_param(fightermoduleaccessor); - let hold_pikmin_num = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + let hold_pikmin_num = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if hold_pikmin_num <= 0 { return; } - let pikmin_id = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_OBJECT_ID_0); - let ret = LinkModule::link(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, pikmin_id as u32); + let pikmin_id = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_OBJECT_ID_0); + let ret = LinkModule::link(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, pikmin_id as u32); if ret & 1 != 0 { let mut link_event = FighterPikminLinkEventWeaponPikminConstraint__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_constraint"))); link_event[0xf2a5bf2beu64].assign(&L2CValue::Hash40(Hash40::new("top"))); link_event["joint_id_"].assign(&L2CValue::Hash40(Hash40::new("top"))); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); - LinkModule::set_attribute(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_STOP as u8}, true); - LinkModule::set_attribute(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_ATTACK_STOP as u8}, true); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + LinkModule::set_attribute(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_STOP as u8}, true); + LinkModule::set_attribute(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN, LinkAttribute{_address: *LINK_ATTRIBUTE_REFERENCE_PARENT_ATTACK_STOP as u8}, true); let mut link_event = FighterPikminLinkEventWeaponPikminChangeMotion__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_motion"))); - let motion = MotionModule::motion_kind(agent.module_accessor); + let motion = MotionModule::motion_kind(fighter.module_accessor); link_event["motion_kind_"].assign(&L2CValue::Hash40(Hash40::new_raw(motion))); link_event["start_frame_"].assign(&L2CValue::F32(0.0)); link_event["rate_"].assign(&L2CValue::F32(1.0)); link_event["loop_"].assign(&L2CValue::Bool(false)); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminChangeStatus__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_status"))); link_event["status_kind_"].assign(&L2CValue::I32(*WEAPON_PIKMIN_PIKMIN_STATUS_KIND_ATTACK_AIR)); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminSyncLR__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_sync_lr"))); - let lr = PostureModule::lr(agent.module_accessor); + let lr = PostureModule::lr(fighter.module_accessor); link_event["lr_"].assign(&L2CValue::F32(lr)); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); - WorkModule::set_int(agent.module_accessor, 1, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_INT_HAVE_PIKMIN); + WorkModule::set_int(fighter.module_accessor, 1, *FIGHTER_PIKMIN_STATUS_ATTACK_AIR_WORK_INT_HAVE_PIKMIN); } } } -unsafe extern "C" fn pikmin_attack_air_handle_pikmin_detatch(agent: &mut L2CFighterCommon) { - let fightermoduleaccessor = agent.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; +unsafe extern "C" fn pikmin_attack_air_handle_pikmin_detatch(fighter: &mut L2CFighterCommon) { + let fightermoduleaccessor = fighter.global_table[MODULE_ACCESSOR].get_ptr() as *mut FighterModuleAccessor; FighterSpecializer_Pikmin::update_hold_pikmin_param(fightermoduleaccessor); - let hold_pikmin_num = WorkModule::get_int(agent.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); + let hold_pikmin_num = WorkModule::get_int(fighter.module_accessor, *FIGHTER_PIKMIN_INSTANCE_WORK_INT_PIKMIN_HOLD_PIKMIN_NUM); if hold_pikmin_num > 0 { - if LinkModule::is_link(agent.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN) { + if LinkModule::is_link(fighter.module_accessor, *FIGHTER_PIKMIN_LINK_NO_PIKMIN) { let mut link_event = new_event_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new_raw(0x39ab74e206))); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); let mut link_event = FighterPikminLinkEventWeaponPikminChangeStatus__new_l2c_table(); link_event["link_event_kind_"].assign(&L2CValue::Hash40(Hash40::new("fighter_pikmin_link_event_weapon_pikmin_change_status"))); link_event["status_kind_"].assign(&L2CValue::I32(*WEAPON_PIKMIN_PIKMIN_STATUS_KIND_AIR_FOLLOW)); - let object_id = agent.global_table[OBJECT_ID].get_u32(); + let object_id = fighter.global_table[OBJECT_ID].get_u32(); link_event[0xaa79e68a2u64].assign(&L2CValue::U32(object_id)); - link_event_store_l2c_table(agent, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); + link_event_store_l2c_table(fighter, FIGHTER_PIKMIN_LINK_NO_PIKMIN.into(), link_event); } FighterSpecializer_Pikmin::reduce_pikmin_all(fightermoduleaccessor); } } -unsafe extern "C" fn link_event_store_l2c_table(agent: &mut L2CFighterCommon, link_no: L2CValue, event: L2CValue) -> L2CValue { +unsafe extern "C" fn link_event_store_l2c_table(fighter: &mut L2CFighterCommon, link_no: L2CValue, event: L2CValue) -> L2CValue { let callable: extern "C" fn() -> *mut app::LinkEvent = std::mem::transmute(event["new_instance_lua_"].get_ptr()); let link_event = callable(); lua_bind::LinkEvent::load_from_l2c_table(link_event, &event); - LinkModule::send_event_parents_struct(agent.module_accessor, link_no.get_i32(), link_event); + LinkModule::send_event_parents_struct(fighter.module_accessor, link_no.get_i32(), link_event); let ret = store_event_table(link_event); let deleter: extern "C" fn(*mut app::LinkEvent) = std::mem::transmute(*((*(link_event as *const u64) + 0x8) as *const u64)); deleter(link_event); diff --git a/fighters/pikmin/src/status/escape_air.rs b/fighters/pikmin/src/status/escape_air.rs index cac3eff327..eeb4fe1ea9 100644 --- a/fighters/pikmin/src/status/escape_air.rs +++ b/fighters/pikmin/src/status/escape_air.rs @@ -2,9 +2,9 @@ use super::*; // FIGHTER_STATUS_KIND_ESCAPE_AIR -pub unsafe extern "C" fn escape_air_end(agent: &mut L2CFighterCommon) -> L2CValue { - VarModule::off_flag(agent.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); - agent.status_end_EscapeAir() +pub unsafe extern "C" fn escape_air_end(fighter: &mut L2CFighterCommon) -> L2CValue { + VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_HI_CANCEL_ESCAPE_AIR); + fighter.status_end_EscapeAir() } pub fn install(agent: &mut Agent) { diff --git a/fighters/pikmin/src/status/rebirth.rs b/fighters/pikmin/src/status/rebirth.rs index 8b3c599c82..26a546e7a8 100644 --- a/fighters/pikmin/src/status/rebirth.rs +++ b/fighters/pikmin/src/status/rebirth.rs @@ -2,9 +2,9 @@ use super::*; // FIGHTER_STATUS_KIND_REBIRTH -pub unsafe extern "C" fn rebirth_end(agent: &mut L2CFighterCommon) -> L2CValue { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); - smashline::original_status(End, agent, *FIGHTER_STATUS_KIND_REBIRTH)(agent) +pub unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { + ArticleModule::generate_article(fighter.module_accessor, *FIGHTER_PIKMIN_GENERATE_ARTICLE_PIKMIN, false, -1); + smashline::original_status(End, fighter, *FIGHTER_STATUS_KIND_REBIRTH)(fighter) } pub fn install(agent: &mut Agent) { diff --git a/fighters/pitb/src/status/special_hi.rs b/fighters/pitb/src/status/special_hi.rs index 7c9d7d3503..5c419f7766 100644 --- a/fighters/pitb/src/status/special_hi.rs +++ b/fighters/pitb/src/status/special_hi.rs @@ -2,9 +2,9 @@ use super::*; // FIGHTER_PIT_STATUS_KIND_SPECIAL_HI_RUSH_END -pub unsafe extern "C" fn special_hi_rush_end_pre(agent: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_end_pre(fighter: &mut L2CFighterCommon) -> L2CValue { StatusModule::init_settings( - agent.module_accessor, + fighter.module_accessor, app::SituationKind(*SITUATION_KIND_NONE), *FIGHTER_KINETIC_TYPE_MOTION_FALL, *GROUND_CORRECT_KIND_KEEP as u32, @@ -17,7 +17,7 @@ pub unsafe extern "C" fn special_hi_rush_end_pre(agent: &mut L2CFighterCommon) - ); FighterStatusModuleImpl::set_fighter_status_data( - agent.module_accessor, + fighter.module_accessor, false, *FIGHTER_TREADED_KIND_NO_REAC, false, @@ -32,9 +32,9 @@ pub unsafe extern "C" fn special_hi_rush_end_pre(agent: &mut L2CFighterCommon) - 0.into() } -pub unsafe extern "C" fn special_hi_rush_end_main(agent: &mut L2CFighterCommon) -> L2CValue { +pub unsafe extern "C" fn special_hi_rush_end_main(fighter: &mut L2CFighterCommon) -> L2CValue { MotionModule::change_motion( - agent.module_accessor, + fighter.module_accessor, Hash40::new("special_air_hi_end"), 0.0, 1.0, @@ -44,31 +44,31 @@ pub unsafe extern "C" fn special_hi_rush_end_main(agent: &mut L2CFighterCommon) false ); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); - let x_max_mul = WorkModule::get_float(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FALL_X_MAX_MUL); + let air_speed_x_stable = WorkModule::get_param_float(fighter.module_accessor, hash40("air_speed_x_stable"), 0); + let x_max_mul = WorkModule::get_float(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLOAT_FALL_X_MAX_MUL); sv_kinetic_energy!( set_stable_speed, - agent, + fighter, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * x_max_mul, 0.0 ); - agent.select_cliff_hangdata_from_name("special_hi"); + fighter.select_cliff_hangdata_from_name("special_hi"); - agent.main_shift(special_hi_rush_end_main_loop) + fighter.main_shift(special_hi_rush_end_main_loop) } -unsafe extern "C" fn special_hi_rush_end_main_loop(agent: &mut L2CFighterCommon) -> L2CValue { - if agent.sub_transition_group_check_air_cliff().get_bool() { +unsafe extern "C" fn special_hi_rush_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { + if fighter.sub_transition_group_check_air_cliff().get_bool() { return 1.into(); } - if agent.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { - agent.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); + if fighter.global_table[SITUATION_KIND] == SITUATION_KIND_GROUND { + fighter.change_status_req(*FIGHTER_STATUS_KIND_LANDING_FALL_SPECIAL, false); return 0.into(); } - if MotionModule::is_end(agent.module_accessor) { - agent.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); + if MotionModule::is_end(fighter.module_accessor) { + fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, false); } 0.into() } From 2156887f068b6e440632ec82c0e1e0da16d93d38 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 11:09:53 -0500 Subject: [PATCH 167/172] lua_state sweep replaces all instances of "agent.lua_state_agent" with the properly defined variable --- fighters/bayonetta/src/acmd/aerials.rs | 5 +- fighters/bayonetta/src/acmd/other.rs | 29 +++-- fighters/bayonetta/src/acmd/specials.rs | 17 ++- fighters/bayonetta/src/wickedweavearm/acmd.rs | 4 +- fighters/buddy/src/acmd/aerials.rs | 13 +- fighters/buddy/src/acmd/specials.rs | 2 +- fighters/diddy/src/acmd/specials.rs | 2 +- fighters/donkey/src/acmd/specials.rs | 4 +- fighters/donkey/src/acmd/tilts.rs | 6 +- fighters/elight/src/acmd/other.rs | 2 +- fighters/elight/src/acmd/specials.rs | 3 +- fighters/falco/src/acmd/specials.rs | 2 +- fighters/ganon/src/acmd/specials.rs | 26 ++-- fighters/jack/src/acmd/other.rs | 10 +- fighters/kamui/src/acmd/specials.rs | 2 +- fighters/kamui/src/dragonhand/acmd.rs | 2 +- fighters/ken/src/acmd/specials/special_lw.rs | 14 +- fighters/kirby/src/acmd/copy/koopa.rs | 40 +++--- fighters/koopa/src/acmd/specials.rs | 89 +++++++------ fighters/koopa/src/breath/acmd.rs | 3 +- fighters/mewtwo/src/acmd/aerials.rs | 9 +- .../src/acmd/specials/special_lw.rs | 2 +- .../src/acmd/specials/special_hi.rs | 2 +- .../src/acmd/specials/special_n.rs | 6 +- fighters/ness/src/acmd/aerials.rs | 16 +-- fighters/packun/src/acmd/specials.rs | 8 +- fighters/peach/src/acmd/tilts.rs | 5 +- fighters/rockman/src/acmd/aerials.rs | 24 ++-- fighters/rockman/src/acmd/ground.rs | 72 ++++++----- fighters/rockman/src/acmd/smashes.rs | 121 ++++++++++-------- fighters/rockman/src/acmd/specials.rs | 24 ++-- fighters/rockman/src/acmd/tilts.rs | 32 +++-- fighters/rockman/src/rockbuster/acmd.rs | 5 +- fighters/ryu/src/acmd/finals.rs | 45 ++++--- .../ryu/src/acmd/specials/special_command.rs | 48 +++---- fighters/ryu/src/acmd/specials/special_lw.rs | 31 +++-- fighters/ryu/src/shinkuhadoken/acmd.rs | 7 +- fighters/sonic/src/acmd/specials.rs | 27 ++-- fighters/tantan/src/acmd/aerials.rs | 97 ++++++++------ fighters/tantan/src/acmd/throws.rs | 4 +- fighters/wario/src/acmd/smashes.rs | 8 +- fighters/wolf/src/acmd/specials.rs | 22 ++-- fighters/yoshi/src/acmd/aerials.rs | 2 +- fighters/zelda/src/phantom/acmd.rs | 15 ++- 44 files changed, 515 insertions(+), 392 deletions(-) diff --git a/fighters/bayonetta/src/acmd/aerials.rs b/fighters/bayonetta/src/acmd/aerials.rs index 2e659a91e2..ca255c1bb4 100644 --- a/fighters/bayonetta/src/acmd/aerials.rs +++ b/fighters/bayonetta/src/acmd/aerials.rs @@ -314,12 +314,13 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, Hash40::new("top"), 0, 14.6, -0.1, 0, -55, -90, 1.14, true); LAST_EFFECT_SET_RATE(agent, 0.84); } - frame(agent.lua_state_agent, 29.0); + frame(lua_state, 29.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_ATTACK_ARC1, false, true); } diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index ca2a0aef5c..8bbb54b5d1 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -138,7 +138,8 @@ unsafe extern "C" fn game_escapeb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 175.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 175.0); if is_excute(agent) { StatusModule::change_status_request(agent.module_accessor, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } @@ -163,7 +164,7 @@ unsafe extern "C" fn sound_appealhil (agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("vc_bayonetta_appeal01")); - sv_animcmd::PLAY_DAMAGESTOP(agent.lua_state_agent); + sv_animcmd::PLAY_DAMAGESTOP(lua_state); } frame(lua_state, 4.0); if is_excute(agent) { @@ -181,7 +182,7 @@ unsafe extern "C" fn sound_appealhil (agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("vc_bayonetta_appeal01_02")); - sv_animcmd::PLAY_DAMAGESTOP(agent.lua_state_agent); + sv_animcmd::PLAY_DAMAGESTOP(lua_state); } frame(lua_state, 41.0); if is_excute(agent) { @@ -195,47 +196,49 @@ unsafe extern "C" fn sound_appealhil (agent: &mut L2CAgentBase) { unsafe extern "C" fn sound_appeallwr(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 21.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 21.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win01")); } - frame(agent.lua_state_agent, 40.0); + frame(lua_state, 40.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win01_02")); } - frame(agent.lua_state_agent, 50.0); + frame(lua_state, 50.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win01_03")); } - frame(agent.lua_state_agent, 67.0); + frame(lua_state, 67.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_bayonetta_win08")); } - frame(agent.lua_state_agent, 90.0); + frame(lua_state, 90.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_step_right_m")); PLAY_SE(agent, Hash40::new("se_bayonetta_win01_04")); } - frame(agent.lua_state_agent, 106.0); + frame(lua_state, 106.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win01_05")); } - frame(agent.lua_state_agent, 127.0); + frame(lua_state, 127.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win01_06")); } } unsafe extern "C" fn sound_appeallwl(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 20.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 20.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win02_02")); } - frame(agent.lua_state_agent, 55.0); + frame(lua_state, 55.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_bayonetta_win02_03")); } - frame(agent.lua_state_agent, 85.0); + frame(lua_state, 85.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_bayonetta_win09")); } diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index 15e8097278..596e99d316 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -211,14 +211,15 @@ unsafe extern "C" fn game_specialairsu(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialairsu(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 13.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 13.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 13.0, 12.1, -21.1, 0, 0, 1.0, true); LAST_EFFECT_SET_RATE(agent, 1.15); EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("bayonetta_afterburner_line2"), Hash40::new("top"), 0, 13.8, 13.5, -21, 0, 0, 1.0, true); LAST_EFFECT_SET_RATE(agent, 1.15); } - frame(agent.lua_state_agent, 26.0); + frame(lua_state, 26.0); if is_excute(agent) { EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, -1); EFFECT_DETACH_KIND(agent, Hash40::new("bayonetta_afterburner_line2"), -1); @@ -284,7 +285,8 @@ unsafe extern "C" fn game_specialairsd(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialairsd(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 8.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 8.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_AFTERBURNER_LINE, Hash40::new("top"), 0, 0, 7, 45, -6, 0, 1.1, true); LAST_EFFECT_SET_RATE(agent, 0.85); @@ -377,14 +379,15 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { FOOT_EFFECT(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); LANDING_EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, Hash40::new("top"), 0, 25.3, 0, 0, 0, 0, 0.86, true); LAST_EFFECT_SET_RATE(agent, 1.1); @@ -395,12 +398,12 @@ unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { LAST_EFFECT_SET_RATE(agent, 1.7); } } - frame(agent.lua_state_agent, 22.0); + frame(lua_state, 22.0); if is_excute(agent) { EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); EffectModule::kill_kind(agent.module_accessor, Hash40::new("bayonetta_afterburner_line2"), false, true); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, false, true); EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_SPIRAL, false, true); diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs index 764358d296..c8edf6a2f6 100644 --- a/fighters/bayonetta/src/wickedweavearm/acmd.rs +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -102,11 +102,11 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { if is_excute(agent) { VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index a98c6b7352..dc90b43ef1 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -367,27 +367,28 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FLW_POS(agent, Hash40::new("buddy_air_lw"), Hash40::new("top"), 0, -7, 0, 0, 0, 0, 1, true); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("top"), 0, 2, 0, 0, 0, 0, 0.7, true); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, false, true); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); if is_excute(agent) { if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { EFFECT_OFF_KIND(agent, Hash40::new("buddy_air_lw"),false,false); EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.1, true); - sv_animcmd::EFFECT_WORK(agent.lua_state_agent); + sv_animcmd::EFFECT_WORK(lua_state); } } - frame(agent.lua_state_agent, 50.0); + frame(lua_state, 50.0); if is_excute(agent) { EFFECT_OFF_KIND_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, false, true); } diff --git a/fighters/buddy/src/acmd/specials.rs b/fighters/buddy/src/acmd/specials.rs index b778d634e3..05bcfe4e9a 100644 --- a/fighters/buddy/src/acmd/specials.rs +++ b/fighters/buddy/src/acmd/specials.rs @@ -133,7 +133,7 @@ unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); LAST_EFFECT_SET_COLOR(agent,1,0.5,0); } - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); LAST_EFFECT_SET_COLOR(agent,1,0.5,0); diff --git a/fighters/diddy/src/acmd/specials.rs b/fighters/diddy/src/acmd/specials.rs index 9641e7b8e9..9d9e70d3c8 100644 --- a/fighters/diddy/src/acmd/specials.rs +++ b/fighters/diddy/src/acmd/specials.rs @@ -91,7 +91,7 @@ unsafe extern "C" fn game_specialairsjump(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairskick(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 14.0, 361, 50, 0, 80, 4.0, 1.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.3, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } diff --git a/fighters/donkey/src/acmd/specials.rs b/fighters/donkey/src/acmd/specials.rs index 41fb5af1db..4c7eb8c4fb 100644 --- a/fighters/donkey/src/acmd/specials.rs +++ b/fighters/donkey/src/acmd/specials.rs @@ -481,12 +481,12 @@ unsafe extern "C" fn game_speciallwloop(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_speciallwloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { EFFECT(agent, Hash40::new("donkey_handslap"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 0.67, 0, 0, 0, 0, 0, 0, false); //LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 6, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, false); diff --git a/fighters/donkey/src/acmd/tilts.rs b/fighters/donkey/src/acmd/tilts.rs index ccf2d501f7..ccaf9f0174 100644 --- a/fighters/donkey/src/acmd/tilts.rs +++ b/fighters/donkey/src/acmd/tilts.rs @@ -117,16 +117,16 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("donkey_attack_arc"), Hash40::new("donkey_attack_arc"), Hash40::new("top"), 0, 12.5, -3, -138, 80, -54, 1.5, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 0.9); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { LAST_EFFECT_SET_RATE(agent, 5.0); } diff --git a/fighters/elight/src/acmd/other.rs b/fighters/elight/src/acmd/other.rs index b822d5f0d5..331c7470a0 100644 --- a/fighters/elight/src/acmd/other.rs +++ b/fighters/elight/src/acmd/other.rs @@ -92,7 +92,7 @@ unsafe extern "C" fn effect_justshieldoff(agent: &mut L2CAgentBase) { FLASH(agent, 0, 0.1, 0.6, 0.8); agent.clear_lua_stack(); lua_args!(agent, -1, 0, 0); - sv_animcmd::FLASH_SET_DIRECTION(agent.lua_state_agent); + sv_animcmd::FLASH_SET_DIRECTION(lua_state); EFFECT(agent, Hash40::new("elight_foresight2"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); EFFECT(agent, Hash40::new("elight_foresight_lensflare"), Hash40::new("top"), 0, 7.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW(agent, Hash40::new("elight_foresight_body"), Hash40::new("hip"), 2, 0, 0, 0, 0, 90, 1, true); diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index 3385055a15..e220ce4f12 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -1,10 +1,11 @@ use super::*; unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { + let lua_state = agent.lua_state_agent; let exists = { agent.clear_lua_stack(); lua_args!(agent, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); - app::sv_animcmd::IS_EXIST_ARTICLE(agent.lua_state_agent) + app::sv_animcmd::IS_EXIST_ARTICLE(lua_state) }; if !exists { diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index 7c0c480442..c7769f8ab6 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -266,7 +266,7 @@ unsafe extern "C" fn sound_speciallwloop(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_speciallwloop(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - sv_animcmd::wait_loop_sync_mot(agent.lua_state_agent); + sv_animcmd::wait_loop_sync_mot(lua_state); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index e3145eb05e..8550f0f2f6 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -320,36 +320,36 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { boma.select_cliff_hangdata_from_name("special_hi"); } - frame(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { CATCH(agent, 0, Hash40::new("top"), 6.5, 0.0, 16.0, 6.5, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); CATCH(agent, 1, Hash40::new("top"), 5.0, 0.0, 6.75, 7.75, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 6.0, 0, 50, 0, 70, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR, 1); CATCH(agent, 0, Hash40::new("bust"), 5.25, 0.0, 0.0, 2.25, None, None, None, *FIGHTER_STATUS_KIND_CLUNG_GANON, *COLLISION_SITUATION_MASK_GA); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); } - frame(agent.lua_state_agent, 29.0); + frame(lua_state, 29.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 34.0); + frame(lua_state, 34.0); if is_excute(agent) { //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 9.0, 6.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); //ATTACK(agent, 0, 0, Hash40::new("armr"), 7.0, 70, 90, 0, 70, 4.0, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_purple"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } - wait(agent.lua_state_agent, 3.0); + wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); @@ -394,7 +394,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { 0.0 ); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); } @@ -403,25 +403,25 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); EffectModule::enable_sync_init_pos_last(agent.module_accessor); } - frame(agent.lua_state_agent, 31.0); + frame(lua_state, 31.0); /* vanilla electric effects for _ in 0..4 { if is_excute(agent) { EFFECT(agent, Hash40::new("ganon_attack_elec"), Hash40::new("haver"), 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, true); } - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); } - frame(agent.lua_state_agent, 42.0); + frame(lua_state, 42.0); */ if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("ganon_raijin_hold"), false, true); diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 1d08185c77..739034e410 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -104,22 +104,24 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attacklw3(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 8.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 8.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n01")); } } unsafe extern "C" fn sound_attacklw3_ex(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_jack_special_n06")); } diff --git a/fighters/kamui/src/acmd/specials.rs b/fighters/kamui/src/acmd/specials.rs index 665f56f18a..1340f516d1 100644 --- a/fighters/kamui/src/acmd/specials.rs +++ b/fighters/kamui/src/acmd/specials.rs @@ -342,7 +342,7 @@ unsafe extern "C" fn effect_speciallwhit(agent: &mut L2CAgentBase) { } frame(lua_state, 26.0); if is_excute(agent) { - if sv_animcmd::get_value_float(agent.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 15, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, true); EFFECT(agent, Hash40::new("kamui_counter_splash"), Hash40::new("top"), -7, 0, 9, 0, 0, 0, 0.45, 0, 0, 0, 0, 0, 0, true); } diff --git a/fighters/kamui/src/dragonhand/acmd.rs b/fighters/kamui/src/dragonhand/acmd.rs index 08211e3fd0..006764c350 100644 --- a/fighters/kamui/src/dragonhand/acmd.rs +++ b/fighters/kamui/src/dragonhand/acmd.rs @@ -10,7 +10,7 @@ unsafe extern "C" fn game_dhspecialnend1(agent: &mut L2CAgentBase) { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_M); if WorkModule::is_flag(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLAG_IS_KAMUI) { - if sv_animcmd::get_value_float(agent.lua_state_agent, *SO_VAR_FLOAT_LR) < 0.0 { + if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { let lerp = WorkModule::get_float(boma, *WEAPON_KAMUI_DRAGONHAND_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 50, 100, 0, 50, 5.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); ATTACK(agent, 1, 0, Hash40::new("top"), 18.0, 50, 100, 0, 50, 6.5, 0.0, 8.8, 15.0, Some(0.0), Some(8.8), Some(9.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 3, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BITE); diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index d4d43f6e83..d3d74f180f 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -10,35 +10,37 @@ unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ken_appeal_l01")); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_ken_appeal_l01")); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ken_appeal_l02")); } } unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 31.0); + frame(lua_state, 31.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } diff --git a/fighters/kirby/src/acmd/copy/koopa.rs b/fighters/kirby/src/acmd/copy/koopa.rs index 7650c8f340..3f415295ab 100644 --- a/fighters/kirby/src/acmd/copy/koopa.rs +++ b/fighters/kirby/src/acmd/copy/koopa.rs @@ -1,15 +1,16 @@ use super::*; unsafe extern "C" fn effect_koopaspecialnstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { FLASH(agent, 0.961, 0.569, 0.569, 0.392); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { FLASH(agent, 1, 0.537, 0.537, 0.588); FLASH_FRM(agent, 20, 0, 0, 0, 0); } - wait(agent.lua_state_agent, 20.0); + wait(lua_state, 20.0); if is_excute(agent) { COL_NORMAL(agent); } @@ -29,23 +30,26 @@ unsafe extern "C" fn sound_koopaspecialnstart(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); FT_MOTION_RATE_RANGE(agent,1.0,31.0,16.0); } unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); } } unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_explosion_sign"), Hash40::new("jaw"), 0, 1.0, 0, 0, 0, 0, 0.75, true); LAST_EFFECT_SET_RATE(agent,1.5); @@ -56,27 +60,27 @@ unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { } FLASH(agent, 0.961, 0.569, 0.569, 0.392); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { FLASH(agent, 1, 0.537, 0.537, 0.588); FLASH_FRM(agent, 20, 0, 0, 0, 0); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { EFFECT_OFF_KIND(agent,Hash40::new("sys_explosion_sign"),false,false); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { EFFECT_OFF_KIND(agent,Hash40::new("koopa_breath_m_fire"),false,false); EFFECT_FOLLOW(agent, Hash40::new("sys_damage_fire_fly"), Hash40::new("jaw"), 0, 0, 0, 180, 0, 50, 0.5, true); FOOT_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 42.0); + frame(lua_state, 42.0); if is_excute(agent) { COL_NORMAL(agent); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { EFFECT(agent, Hash40::new("koopa_appeal_s"), Hash40::new("mouth2"), 0, -1.3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); LAST_EFFECT_SET_COLOR(agent,2.0,0.5,0); @@ -84,36 +88,38 @@ unsafe extern "C" fn effect_koopaspecialnmax(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_koopa_special_n01")); } - wait(agent.lua_state_agent, 19.0); + wait(lua_state, 19.0); if is_excute(agent) { if agent.is_motion(Hash40::new("koopa_special_n_max")){ PLAY_SE_REMAIN(agent, Hash40::new("se_koopa_step_left_m")); } } - frame(agent.lua_state_agent, 23.0); + frame(lua_state, 23.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_fire_m_damage")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_kirby_attack05")); } } unsafe extern "C" fn expression_koopaspecialnmax(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } diff --git a/fighters/koopa/src/acmd/specials.rs b/fighters/koopa/src/acmd/specials.rs index d032641157..290e0ae9f9 100644 --- a/fighters/koopa/src/acmd/specials.rs +++ b/fighters/koopa/src/acmd/specials.rs @@ -123,11 +123,11 @@ unsafe extern "C" fn expression_specialnmax(agent: &mut L2CAgentBase) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } @@ -140,26 +140,28 @@ unsafe extern "C" fn effect_specialssquat(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } unsafe extern "C" fn effect_specialsthrowlw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 17.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 17.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 2.2, 0, 0, 0, 0, 0, 360, true); @@ -168,21 +170,23 @@ unsafe extern "C" fn effect_specialsthrowlw(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specialsthrowlw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(agent.lua_state_agent, 18.0); + wait(lua_state, 18.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_heavy_hit_m")); } } unsafe extern "C" fn expression_specialsthrowlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_M); @@ -190,49 +194,53 @@ unsafe extern "C" fn expression_specialsthrowlw(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { CHECK_FINISH_CAMERA(agent, 23, 16); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } unsafe extern "C" fn effect_specialsthrowf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 17.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 17.0); if is_excute(agent) { if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } unsafe extern "C" fn sound_specialsthrowf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(agent.lua_state_agent, 15.0); + wait(lua_state, 15.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } unsafe extern "C" fn expression_specialsthrowf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); @@ -240,16 +248,17 @@ unsafe extern "C" fn expression_specialsthrowf(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); CHECK_FINISH_CAMERA(agent, 20, 15); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { REVERSE_LR(agent); WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); @@ -257,11 +266,12 @@ unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialsthrowb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 19.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 19.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 22.0); + frame(lua_state, 22.0); if is_excute(agent) { if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); @@ -270,21 +280,23 @@ unsafe extern "C" fn effect_specialsthrowb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specialsthrowb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_01")); } - wait(agent.lua_state_agent, 15.0); + wait(lua_state, 15.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_02")); } } unsafe extern "C" fn expression_specialsthrowb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); @@ -292,22 +304,24 @@ unsafe extern "C" fn expression_specialsthrowb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialsjump(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_v_smoke_a"), Hash40::new("top"), 0, -1.0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("koopa_drop_air"), Hash40::new("top"), 0, 9, 0, 0, 0, 0, 0.8, true); } } unsafe extern "C" fn sound_specialsjump(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_koopa_special_s03")); } - frame(agent.lua_state_agent, 35.0); + frame(lua_state, 35.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_koopa_special_s04")); } @@ -320,25 +334,26 @@ unsafe extern "C" fn effect_specialsfall(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); } - frame(agent.lua_state_agent, 1.0); + frame(lua_state, 1.0); if is_excute(agent) { //CHECK_FINISH_CAMERA(fighter, 3, 9); //lua_bind::FighterCutInManager::set_throw_finish_zoom_rate(singletons::FighterCutInManager(), 1.3); //lua_bind::FighterCutInManager::set_throw_finish_offset(singletons::FighterCutInManager(), Vector3f{x: 0.0, y: -9.0, z: 0.0}); } - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); FT_MOTION_RATE_RANGE(agent,10.0,14.0,8.0); - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE_RANGE(agent,14.0,26.0,16.0); - frame(agent.lua_state_agent, 26.0); + frame(lua_state, 26.0); FT_MOTION_RATE(agent,1.0) } @@ -350,31 +365,33 @@ unsafe extern "C" fn effect_specialslanding(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { STOP_SE(agent, Hash40::new("se_koopa_special_s04")); PLAY_STATUS(agent, Hash40::new("se_koopa_special_s05")); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_left_m"), Hash40::new("se_koopa_step_right_m")); } - frame(agent.lua_state_agent, 26.0); + frame(lua_state, 26.0); if is_excute(agent) { PLAY_STEP_FLIPPABLE(agent, Hash40::new("se_koopa_step_right_m"), Hash40::new("se_koopa_step_left_m")); } } unsafe extern "C" fn expression_specialslanding(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); QUAKE(agent, *CAMERA_QUAKE_KIND_L); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 3.0); + frame(lua_state, 3.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 23.0); + frame(lua_state, 23.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs index a0371f61d7..2bcba92a48 100644 --- a/fighters/koopa/src/breath/acmd.rs +++ b/fighters/koopa/src/breath/acmd.rs @@ -33,7 +33,8 @@ unsafe extern "C" fn effect_max(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_end(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } diff --git a/fighters/mewtwo/src/acmd/aerials.rs b/fighters/mewtwo/src/acmd/aerials.rs index c991909446..2c81b7473d 100644 --- a/fighters/mewtwo/src/acmd/aerials.rs +++ b/fighters/mewtwo/src/acmd/aerials.rs @@ -67,21 +67,22 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 3.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 1.2); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_attack_g"), Hash40::new("mewtwo_pk_attack_g"), Hash40::new("top"), 0, 7.7, 1.8, 15, 0, 30, 1.13, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 1.4); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("mewtwo_pk_hand"), false, false); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { EffectModule::kill_kind(agent.module_accessor, Hash40::new("mewtwo_pk_attack_g"), true, true); } diff --git a/fighters/miifighter/src/acmd/specials/special_lw.rs b/fighters/miifighter/src/acmd/specials/special_lw.rs index 7c6f1942b9..5bf4e0e208 100644 --- a/fighters/miifighter/src/acmd/specials/special_lw.rs +++ b/fighters/miifighter/src/acmd/specials/special_lw.rs @@ -136,7 +136,7 @@ unsafe extern "C" fn game_speciallw1loop(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_DAMAGE); - app::sv_kinetic_energy::clear_speed(agent.lua_state_agent); + app::sv_kinetic_energy::clear_speed(lua_state); KineticModule::clear_speed_all(boma); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION_AIR); SET_SPEED_EX(agent, 3.0, -2.5, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); diff --git a/fighters/miiswordsman/src/acmd/specials/special_hi.rs b/fighters/miiswordsman/src/acmd/specials/special_hi.rs index 761edda43c..4a5e85281e 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_hi.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_hi.rs @@ -363,7 +363,7 @@ unsafe extern "C" fn game_specialairhi3(agent: &mut L2CAgentBase) { let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, start_speed * start_x_mul); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); frame(lua_state, 8.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 367, 100, 115, 0, 6.0, 0.0, 9.0, 7.0, Some(0.0), Some(6.0), Some(14.0), 0.75, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); diff --git a/fighters/miiswordsman/src/acmd/specials/special_n.rs b/fighters/miiswordsman/src/acmd/specials/special_n.rs index 6d851503a9..6476c0b3ae 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_n.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_n.rs @@ -40,11 +40,11 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { let x_vel = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); - app::sv_kinetic_energy::reset_energy(agent.lua_state_agent); + app::sv_kinetic_energy::reset_energy(lua_state); let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); - app::sv_kinetic_energy::set_stable_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_stable_speed(lua_state); } } frame(lua_state, 14.0); @@ -67,7 +67,7 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.8); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); } } // light diff --git a/fighters/ness/src/acmd/aerials.rs b/fighters/ness/src/acmd/aerials.rs index 341c95823f..c64609f40e 100644 --- a/fighters/ness/src/acmd/aerials.rs +++ b/fighters/ness/src/acmd/aerials.rs @@ -34,21 +34,21 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { agent.clear_lua_stack(); EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("sys_spin_wind"), Hash40::new("top"), 0, 4.7, 4, 40, 0, -13, 0.7, true); lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } frame(lua_state, 11.0); if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handr"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_atk"), Hash40::new("handl"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } @@ -195,28 +195,28 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10.2, -5.5, 0.0, 0.0, 0.0, 0.82, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } frame(lua_state, 8.5); if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 13.2, -1.0, 0.0, 0.0, 0.0, 0.9, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } frame(lua_state, 9.75); if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 10, 4.8, 0.0, 0.0, 0.0, 0.82, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } frame(lua_state, 13.0); if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("ness_psi_rush"), Hash40::new("top"), 0.0, 5.0, 5.4, 0.0, 0.0, 0.0, 0.78, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } diff --git a/fighters/packun/src/acmd/specials.rs b/fighters/packun/src/acmd/specials.rs index 78409de453..876c79b59f 100644 --- a/fighters/packun/src/acmd/specials.rs +++ b/fighters/packun/src/acmd/specials.rs @@ -200,7 +200,7 @@ unsafe extern "C" fn effect_specialsshoot(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath2"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.2, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } @@ -208,7 +208,7 @@ unsafe extern "C" fn effect_specialsshoot(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.1, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); LAST_EFFECT_SET_RATE(agent, 1.6); } @@ -287,7 +287,7 @@ unsafe extern "C" fn effect_specialairsshoot(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath2"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.2, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); } } @@ -295,7 +295,7 @@ unsafe extern "C" fn effect_specialairsshoot(agent: &mut L2CAgentBase) { if is_excute(agent) { agent.clear_lua_stack(); lua_args!(agent, Hash40::new("packun_poison_breath"), Hash40::new("mouth"), 5, -0.6, 0, 0, 90, -100, 1.1, true); - smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(agent.lua_state_agent); + smash::app::sv_animcmd::EFFECT_FOLLOW_NO_SCALE(lua_state); agent.pop_lua_stack(1); LAST_EFFECT_SET_RATE(agent, 1.6); } diff --git a/fighters/peach/src/acmd/tilts.rs b/fighters/peach/src/acmd/tilts.rs index d705f213c9..800f65b329 100644 --- a/fighters/peach/src/acmd/tilts.rs +++ b/fighters/peach/src/acmd/tilts.rs @@ -47,11 +47,12 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { LANDING_EFFECT_FLIP(agent, Hash40::new("sys_whirlwind_l"), Hash40::new("sys_whirlwind_r"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_NONE); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("peach_attack_heart"), Hash40::new("top"), 0, 23.5, 0, 0, 90, 0, 0.8, true); EFFECT_FOLLOW(agent, Hash40::new("peach_attack_hi3"), Hash40::new("top"), 0, 23.5, 0, 0, 0, 0, 1, true); diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index c19e2162b2..7dd71a47e1 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -2,38 +2,40 @@ use super::*; unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 3.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 7.0, 62, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 7.0, 62, 80, 0, 40, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("footl"), 7.0, 62, 80, 0, 40, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("legl"), 4.5, 62, 80, 0, 40, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 4.5, 62, 80, 0, 40, 2.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("footl"), 4.5, 62, 80, 0, 40, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 35.0); + frame(lua_state, 35.0); if is_excute(agent) { WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } unsafe extern "C" fn effect_attackairnmelee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP_ALPHA(agent, Hash40::new("sys_attack_speedline"), Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 6, 1, 30, 0, 0, 0.6, true, *EF_FLIP_YZ, 1); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0.0, 0.0, 0, 0, 0, 0.7, true, 0.5); LAST_EFFECT_SET_RATE(agent, 1.3); @@ -41,23 +43,25 @@ unsafe extern "C" fn effect_attackairnmelee(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackairnmelee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } unsafe extern "C" fn expression_attackairnmelee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index 5e992a3ed3..f5fc4984ba 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -2,7 +2,8 @@ use super::*; unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 15, 0, 30, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 100, 15, 0, 30, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); @@ -10,26 +11,27 @@ unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - // frame(agent.lua_state_agent, 20.0); + // frame(lua_state, 20.0); // if is_excute(agent) { // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } unsafe extern "C" fn effect_attack11melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { EFFECT_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -4, 8, 0, 0, 0, 0, 0.95, 0, 1, 0, 0, 0, 0, false, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 8, 8, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 360, false); LAST_EFFECT_SET_ALPHA(agent, 0.7); @@ -37,53 +39,57 @@ unsafe extern "C" fn effect_attack11melee(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attack11melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_s")); } } unsafe extern "C" fn expression_attack11melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { AttackModule::set_attack_reference_joint_id(agent.module_accessor, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 15, 0, 30, 4.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 15, 0, 30, 3.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - // frame(agent.lua_state_agent, 20.0); + // frame(lua_state, 20.0); // if is_excute(agent) { // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 8, 2, 10, -39, 10, 0.95, true, *EF_FLIP_YZ); FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); @@ -91,93 +97,99 @@ unsafe extern "C" fn effect_attack12(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")); } } unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_L, 5); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 74, 70, 0, 70, 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } } unsafe extern "C" fn effect_attack13(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 1.5, -80, 0, 0, 1.0, true, *EF_FLIP_YZ); EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), 1, 0, 4, -80, 0, 0, 1.0, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -1, 5, 1, -80, 0, 0, 1.0, true); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_landing_smoke_s"), Hash40::new("top"), 1.5, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 9.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 9.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_step_right_m")); } } unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index 2f95644ca3..444cb966c6 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -2,64 +2,68 @@ use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 361, 60, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 361, 60, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } } unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("sys_attack_arc_b"), Hash40::new("top"), 0, 9, 3, 90, -90, -40, 1.0, true, *EF_FLIP_YZ); } } unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( agent.module_accessor, @@ -69,88 +73,92 @@ unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 35.0); + frame(lua_state, 35.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 12.0, 72, 60, 0, 90, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("top"), 12.0, 72, 60, 0, 90, 4.0, 0.0, 6.0, 2.0, Some(0.0), Some(16.0), Some(3.6), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { AttackModule::clear(agent.module_accessor, 1, false); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } } unsafe extern "C" fn effect_attacks4hi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2.5, 0, 3, -80, 0, 10, 1, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_attacks4hi(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 13.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 13.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")) } } unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { ControlModule::set_rumble( agent.module_accessor, @@ -160,50 +168,52 @@ unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 12.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 12.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 9.0, 361, 40, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footr"), 6.0, 361, 40, 0, 85, 4.0, 0.0, -2.0, 3.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } } unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footr"), 2.0, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 7, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_line"), Hash40::new("sys_attack_line"), Hash40::new("top"), -2, 1.5, -7, 0, 8, -5, 1, true, *EF_FLIP_YZ); @@ -211,26 +221,28 @@ unsafe extern "C" fn effect_attacks4lw(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attacks4lw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_m")) } } unsafe extern "C" fn expression_attacks4lw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 12.0); - execute(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); + execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( agent.module_accessor, @@ -240,32 +252,33 @@ unsafe extern "C" fn expression_attacks4lw(agent: &mut L2CAgentBase) { *BATTLE_OBJECT_ID_INVALID as u32 ); } - frame(agent.lua_state_agent, 14.5); + frame(lua_state, 14.5); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_NONE); RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 19.0); + frame(lua_state, 19.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_R); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } } unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_run_smoke"), Hash40::new("top"), 2, 0, 0, 0, 0, 0, 1, 12, 0, 4, 0, 0, 0, false); } for _ in 0..i32::MAX { - wait(agent.lua_state_agent, 5.0); + wait(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("havel"), 0, 0, 0, 0, 0, 0, 1, 4, 4, 4, 0, 0, 0, false); } @@ -273,20 +286,22 @@ unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_smash_start")); } } unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.8, -1, 0.8, 0.8, -1, Hash40::new("invalid")); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 61.0); + frame(lua_state, 61.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index c7b8ac1b60..d838d71b81 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -60,9 +60,10 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_busterchargeshot(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 11.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 11.0); FT_MOTION_RATE(agent, 1.0 / 7.0); - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CHARGESHOT, false, -1); @@ -71,38 +72,41 @@ unsafe extern "C" fn game_busterchargeshot(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 8, 8, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("rockman_chargeshot_elec"), Hash40::new("havel"), 0, 0, -1.5, 0, 0, 0, 1, true); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("rockman_chargeshot_shot"), Hash40::new("rockman_chargeshot_shot"), Hash40::new("top"), 0, 7.2, 9, 0, 0, 0, 1, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_busterchargeshot(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_rockman_smash_s02")); } } unsafe extern "C" fn expression_busterchargeshot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_ROCKBUSTER, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if WorkModule::get_float(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE) < 1.0 { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_S); @@ -234,8 +238,9 @@ unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 5.0); - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } @@ -243,8 +248,9 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 5.0); - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index edc9a70d50..3883853e1a 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -1,77 +1,81 @@ use super::*; unsafe extern "C" fn game_attacks3melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 13.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 13.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 1.5); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); FT_MOTION_RATE(agent, 0.5); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 270, 10, 0, 70, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.2); } - frame(agent.lua_state_agent, 21.0); + frame(lua_state, 21.0); FT_MOTION_RATE_RANGE(agent, 21.0, 53.0, 26.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 53.0); + frame(lua_state, 53.0); FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_attacks3melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("top"), -8, 10, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_jump_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, false); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("sys_attack_arc"), Hash40::new("sys_attack_arc"), Hash40::new("top"), 1, 8, -1, 10, -39, -140, 0.95, true, *EF_FLIP_YZ); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_landing_smoke"), Hash40::new("top"), 3.5, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_attacks3melee(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 14.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 14.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_jump01")); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_punch_kick_swing_l")); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_rockman_step_left_m")); } } unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 24.0); + frame(lua_state, 24.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); diff --git a/fighters/rockman/src/rockbuster/acmd.rs b/fighters/rockman/src/rockbuster/acmd.rs index be64314361..9e59699031 100644 --- a/fighters/rockman/src/rockbuster/acmd.rs +++ b/fighters/rockman/src/rockbuster/acmd.rs @@ -1,14 +1,15 @@ use super::*; unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 22, 3.3, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 11, 2.2, 0.0, 0.0, 0.0, None, None, None, 0.75, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 361, 0, 0, 0, 1.8, 0.0, 0.0, 0.0, None, None, None, 0.1, 0.5, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, -1, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_ENERGY); } diff --git a/fighters/ryu/src/acmd/finals.rs b/fighters/ryu/src/acmd/finals.rs index 2bae99ec38..edf297bca7 100644 --- a/fighters/ryu/src/acmd/finals.rs +++ b/fighters/ryu/src/acmd/finals.rs @@ -1,13 +1,14 @@ use super::*; unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { CHECK_VALID_FINAL_START_CAMERA(agent, 0, 7, 20, 0, 0, 0); SLOW_OPPONENT(agent, 80.0, 50.0); } if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { FT_SET_FINAL_FEAR_FACE(agent, 40); REQ_FINAL_START_CAMERA(agent, Hash40::new("d04final.nuanmb"), true); @@ -18,22 +19,22 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { CAM_ZOOM_IN_arg5(agent, 3.0, 0.0, 1.8, 0.0, 0.0); FT_START_CUTIN(agent); } - frame(agent.lua_state_agent, 28.0); + frame(lua_state, 28.0); if is_excute(agent) { CAM_ZOOM_OUT(agent); } } - frame(agent.lua_state_agent, 30.0); + frame(lua_state, 30.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 60, 90, 0, 50, 8.0, 0.0, 5.0, 8.0, Some(0.0), Some(9.5), Some(8.0), 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); AttackModule::set_no_dead_all(agent.module_accessor, true, false); AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 50.0); + frame(lua_state, 50.0); if is_excute(agent) { SlowModule::set_whole(agent.module_accessor, 2, 0); if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { @@ -42,35 +43,36 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 5.0, 10.0, Some(0.0), Some(9.5), Some(10.0), 2.6, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL01, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(agent.module_accessor, true, false); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); SlowModule::clear_whole(agent.module_accessor); } - frame(agent.lua_state_agent, 52.0); + frame(lua_state, 52.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 367, 100, 120, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(agent.module_accessor, true, false); } - wait(agent.lua_state_agent, 10.0); + wait(lua_state, 10.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 80, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(agent.module_accessor, true, false); } - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } } unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { SlowModule::set_whole(agent.module_accessor, 2, 0); } - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 12.0, 10.0, None, None, None, 2.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL02, *ATTACK_REGION_PUNCH); AttackModule::set_no_dead_all(agent.module_accessor, true, false); @@ -80,21 +82,21 @@ unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_2, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); CAM_ZOOM_OUT(agent); CAM_ZOOM_IN_arg5(agent, 5.0, 0.0, 2.1, 0.0, 0.0); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); ATTACK(agent, 0, 0, Hash40::new("top"), 7.1, 80, 126, 0, 82, 10.0, 0.0, 20.0, 8.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL03, *ATTACK_REGION_PUNCH); @@ -103,12 +105,12 @@ unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_3, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); SlowModule::clear_whole(agent.module_accessor); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { CAM_ZOOM_OUT(agent); WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); @@ -117,18 +119,19 @@ unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 75, 0, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 80, 0, 35.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - frame(agent.lua_state_agent, 90.0); + frame(lua_state, 90.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 6.0); + wait(lua_state, 6.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } diff --git a/fighters/ryu/src/acmd/specials/special_command.rs b/fighters/ryu/src/acmd/specials/special_command.rs index bceb5fe000..01f40bc355 100644 --- a/fighters/ryu/src/acmd/specials/special_command.rs +++ b/fighters/ryu/src/acmd/specials/special_command.rs @@ -1,7 +1,8 @@ use super::*; unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); let strength = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); let add_startup = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 6.0 @@ -18,9 +19,9 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { MeterModule::drain_direct(agent.battle_object, 2.0 * MeterModule::meter_per_level(agent.battle_object)); } } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); let speed = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 2.0 } else if strength == *FIGHTER_RYU_STRENGTH_W { @@ -38,7 +39,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, -6.2, -1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); ATTACK(agent, 2, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, 4.3, -1.7, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); MeterModule::watch_damage(agent.battle_object, true); @@ -56,7 +57,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { ATTACK(agent, 2, 0, Hash40::new("kneel"), 12.3, 361, 98, 0, 26, 3.9, 4.3, -1.7, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_KICK); } } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); let recovery = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { 33.0 } else if strength == *FIGHTER_RYU_STRENGTH_W { @@ -73,30 +74,31 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 33.0); + frame(lua_state, 33.0); if is_excute(agent) { WorkModule::off_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } - frame(agent.lua_state_agent, 46.0); + frame(lua_state, 46.0); FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); } - frame(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); @@ -110,22 +112,22 @@ unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { EFFECT_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 12.5, 14, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 360, true, 0.5); LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 21.0); + frame(lua_state, 21.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 1.7); } - frame(agent.lua_state_agent, 25.0); + frame(lua_state, 25.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { FLASH(agent, 0.95, 0.522, 0.051, 0.7); } - frame(agent.lua_state_agent, 29.0); + frame(lua_state, 29.0); if is_excute(agent) && VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { EFFECT_OFF_KIND(agent, Hash40::new("ryu_savingattack_aura"), true, true); @@ -134,41 +136,43 @@ unsafe extern "C" fn effect_attackcommand4(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackcommand4(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_common_smash_start")); } - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ryu_smash_s01")); PLAY_SE(agent, Hash40::new("vc_ryu_smash_s01")); } - wait(agent.lua_state_agent, 38.0); + wait(lua_state, 38.0); if is_excute(agent) { PLAY_STEP(agent, Hash40::new("se_ryu_step_left_m")); } } unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); AREA_WIND_2ND_arg10(agent, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); } - frame(agent.lua_state_agent, 28.0); + frame(lua_state, 28.0); if is_excute(agent) { AreaModule::erase_wind(agent.module_accessor, 0); } diff --git a/fighters/ryu/src/acmd/specials/special_lw.rs b/fighters/ryu/src/acmd/specials/special_lw.rs index 7c735d7383..87581d484a 100644 --- a/fighters/ryu/src/acmd/specials/special_lw.rs +++ b/fighters/ryu/src/acmd/specials/special_lw.rs @@ -29,22 +29,24 @@ unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 18.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 18.0); if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, false); } } unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ryu_appeal_l01")); } - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_ryu_appeal03")); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); @@ -52,23 +54,25 @@ unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } - frame(agent.lua_state_agent, 18.0); + frame(lua_state, 18.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); AREA_WIND_2ND_arg10(agent, 0, 1, 70, 8, 0.8, 0, 6, 32, 12, 80); } - frame(agent.lua_state_agent, 32.0); + frame(lua_state, 32.0); if is_excute(agent) { AreaModule::erase_wind(agent.module_accessor, 0); } } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 11.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 11.0); let lv = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_INT_SAVING_LV); MeterModule::watch_damage(agent.battle_object, true); if is_excute(agent) { @@ -90,23 +94,24 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_REVERSE_MATERIAL_ANIM); } } unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { REVERSE_LR(agent); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); let lv = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_INT_SAVING_LV); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_DISABLE_SUPER_ARMOR); @@ -128,12 +133,12 @@ unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { agent.on_flag(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_FLAG_REVERSE_MATERIAL_ANIM); } diff --git a/fighters/ryu/src/shinkuhadoken/acmd.rs b/fighters/ryu/src/shinkuhadoken/acmd.rs index 9ba045f368..092166431e 100644 --- a/fighters/ryu/src/shinkuhadoken/acmd.rs +++ b/fighters/ryu/src/shinkuhadoken/acmd.rs @@ -1,18 +1,19 @@ use super::*; unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("top"), 1.6, 366, 100, 75, 0, 16.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); // ATTACK(agent, 2, 0, Hash40::new("top"), 0.0, 366, 100, 80, 0, 35.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); } - frame(agent.lua_state_agent, 90.0); + frame(lua_state, 90.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } - wait(agent.lua_state_agent, 6.0); + wait(lua_state, 6.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index b9a8973a03..637ad1d1dc 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -93,32 +93,35 @@ unsafe extern "C" fn game_specialsbooststart(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specialsbooststart(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { PLAY_SEQUENCE(agent, Hash40::new("seq_sonic_rnd_attack")); } } unsafe extern "C" fn expression_specialsbooststart(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } unsafe extern "C" fn game_specialsboost(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 1.0 / 3.0); - frame(agent.lua_state_agent, 3.0); + frame(lua_state, 3.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 361, 100, 0, 45, 4.0, 0.0, 5.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } - frame(agent.lua_state_agent, 11.0); + frame(lua_state, 11.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 25, 120, 0, 50, 3.0, 0.0, 4.0, -0.5, Some(0.0), Some(9.0), Some(-0.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_JUMP); } - frame(agent.lua_state_agent, 14.0); + frame(lua_state, 14.0); FT_MOTION_RATE(agent, 0.25); } @@ -142,26 +145,29 @@ unsafe extern "C" fn sound_specialsboost(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_specialsboost(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } - frame(agent.lua_state_agent, 7.0); + frame(lua_state, 7.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attacks"), 0); } } unsafe extern "C" fn game_specialsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 0.5); - frame(agent.lua_state_agent, 4.0); + frame(lua_state, 4.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); FT_MOTION_RATE(agent, 1.6); } unsafe extern "C" fn effect_specialsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") @@ -175,7 +181,7 @@ unsafe extern "C" fn effect_specialsboostend(agent: &mut L2CAgentBase) { if is_excute(agent) { LANDING_EFFECT(agent, Hash40::new("sys_sliding_smoke"), Hash40::new("top"), 4, 0, 0, 0, 0, 0, 0.6, 0, 0, 3, 0, 0, 0, false); } - wait(agent.lua_state_agent, 4.0); + wait(lua_state, 4.0); } } @@ -192,8 +198,9 @@ unsafe extern "C" fn expression_specialsboostend(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialairsboostend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 0.8); - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); diff --git a/fighters/tantan/src/acmd/aerials.rs b/fighters/tantan/src/acmd/aerials.rs index 25ab588f33..7756eadc97 100644 --- a/fighters/tantan/src/acmd/aerials.rs +++ b/fighters/tantan/src/acmd/aerials.rs @@ -1,24 +1,25 @@ use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); - frame(agent.lua_state_agent, 3.0); + frame(lua_state, 3.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(agent.lua_state_agent, 3.0); + wait(lua_state, 3.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.4, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 8.25, 361, 67, 0, 32, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("hip"), 8.25, 361, 67, 0, 37, 2.75, -1.5, -1.0, 1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(agent.lua_state_agent, 16.0); + wait(lua_state, 16.0); if is_excute(agent) { WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); AttackModule::clear_all(agent.module_accessor); @@ -26,7 +27,8 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 5.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.7, -8, -10, 0, 0, 1.1, false); @@ -44,7 +46,7 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { } } } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 7.5, 8.0, 0, 0, 0, 0.9, true, 0.6); LAST_EFFECT_SET_RATE(agent, 1.3); @@ -53,11 +55,12 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("vc_tantan_attack02")); PLAY_SEQUENCE(agent, Hash40::new("seq_tantan_rnd_attack03")); @@ -65,11 +68,12 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 6.0); + frame(lua_state, 6.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } @@ -82,39 +86,42 @@ unsafe extern "C" fn effect_landingairn(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_landingairn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 6); } } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); FT_MOTION_RATE(agent, 1.0/(12.0-10.0)); - frame(agent.lua_state_agent, 12.0); + frame(lua_state, 12.0); FT_MOTION_RATE(agent, 1.0); - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("footl"), 13.75, 361, 100, 0, 25, 5.0, 0.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, 0.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { //Sweetspot ground spike// ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 274, 63, 0, 25, 5.0, 1.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); @@ -123,23 +130,24 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("kneel"), 13.75, 361, 100, 0, 25, 4.375, -1.0, 0.3, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(agent.lua_state_agent, 3.0); + wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 45.0); + frame(lua_state, 45.0); if is_excute(agent) { WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 15.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 15.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 0, 10.5, 2.0, 180, -150 , 90, 0.83, true); LAST_EFFECT_SET_RATE(agent, 2.0); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("footl"), 0, 0, 0, 0, 0, 0, 1.3, true, 0.9); LAST_EFFECT_SET_RATE(agent, 2); @@ -147,12 +155,13 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 10.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 10.0); if is_excute(agent) { //PLAY_SE(fighter, Hash40::new("se_tantan_swing_s01")); PLAY_SE(agent, Hash40::new("se_common_swing_09")); } - frame(agent.lua_state_agent, 13.0); + frame(lua_state, 13.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); if (app::sv_math::rand(hash40("fighter"), 3) == 0) @@ -160,18 +169,19 @@ unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { PLAY_SE(agent, Hash40::new("vc_tantan_punch_03")); } } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_tantan_swing_l01")); } } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 11.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 11.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } @@ -185,51 +195,55 @@ unsafe extern "C" fn effect_landingairf(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_landingairf(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 3.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); if is_excute(agent) { PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } } unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 17.0); + frame(lua_state, 17.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); } } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 4.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 4.0); if is_excute(agent) { WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("kneer"), 10.5, 42, 98, 0, 42, 3.75, -1.25, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneer"), 12.5, 42, 98, 0, 42, 4.0, 5.5, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } - wait(agent.lua_state_agent, 3.0); + wait(lua_state, 3.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 31.0); + frame(lua_state, 31.0); if is_excute(agent) { WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_b"), Hash40::new("top"), -1.5, 8.1, -6, -151, 47, 2.9, 0.9, true); LAST_EFFECT_SET_RATE(agent, 1.5); //EffectModule::enable_sync_init_pos_last(fighter.module_accessor); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_impact"), Hash40::new("top"), 0, 11.5, -14, 0, 0, 0, 0.9, false, 0.5); LAST_EFFECT_SET_RATE(agent, 1.3); @@ -237,11 +251,12 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 7.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 7.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_tantan_attackair_h01")); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { if (app::sv_math::rand(hash40("fighter"), 3) == 0) { @@ -251,11 +266,12 @@ unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 6.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 6.0); if is_excute(agent) { ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } - frame(agent.lua_state_agent, 8.0); + frame(lua_state, 8.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackm"), 0); } @@ -268,7 +284,8 @@ unsafe extern "C" fn effect_landingairb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_landingairb(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 3.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 3.0); if is_excute(agent) { PLAY_LANDING_SE(agent, Hash40::new("se_tantan_landing02")); } diff --git a/fighters/tantan/src/acmd/throws.rs b/fighters/tantan/src/acmd/throws.rs index c3ef32265e..e666145f53 100644 --- a/fighters/tantan/src/acmd/throws.rs +++ b/fighters/tantan/src/acmd/throws.rs @@ -14,12 +14,12 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { if is_excute(agent) { GrabModule::set_rebound(boma, true); } - wait(agent.lua_state_agent, 1.0); + wait(lua_state, 1.0); if is_excute(agent) { CATCH(agent, 0, Hash40::new("top"), 4.0, 0.0, 7.5, 8.0, Some(0.0), Some(7.5), Some(10.5), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } game_CaptureCutCommon(agent); - wait(agent.lua_state_agent, 2.0); + wait(lua_state, 2.0); if is_excute(agent) { FT_MOTION_RATE(agent, 1.250); grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); diff --git a/fighters/wario/src/acmd/smashes.rs b/fighters/wario/src/acmd/smashes.rs index 6532f5a960..c3dc117ab9 100644 --- a/fighters/wario/src/acmd/smashes.rs +++ b/fighters/wario/src/acmd/smashes.rs @@ -105,7 +105,7 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_quake"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); LAST_EFFECT_SET_RATE(agent, 1.2); @@ -119,16 +119,16 @@ unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - frame(agent.lua_state_agent, 5.0); + frame(lua_state, 5.0); if is_excute(agent) { STOP_SE(agent, Hash40::new("se_common_smash_start")); } - frame(agent.lua_state_agent, 9.0); + frame(lua_state, 9.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_wario_attack07")); PLAY_SE(agent, Hash40::new("se_wario_smash_s01")); } - frame(agent.lua_state_agent, 10.0); + frame(lua_state, 10.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_common_throw_02")); } diff --git a/fighters/wolf/src/acmd/specials.rs b/fighters/wolf/src/acmd/specials.rs index 9dfb7bfb34..fe6aed5ab1 100644 --- a/fighters/wolf/src/acmd/specials.rs +++ b/fighters/wolf/src/acmd/specials.rs @@ -1,35 +1,36 @@ use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 2.0); + let lua_state = agent.lua_state_agent; + frame(lua_state, 2.0); if is_excute(agent) { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); } if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); } - frame(agent.lua_state_agent, 15.0); + frame(lua_state, 15.0); if is_excute(agent) { // ATTACK(agent, 0, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, -3.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // ATTACK(agent, 1, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 1.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); // ATTACK(agent, 2, 0, Hash40::new("haver"), 7.0, 60, 37, 0, 80, 2.5, 0.0, 0.0, 5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); } - frame(agent.lua_state_agent, 16.0); + frame(lua_state, 16.0); if is_excute(agent) { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); } - frame(agent.lua_state_agent, 20.0); + frame(lua_state, 20.0); if is_excute(agent) { AttackModule::clear_all(agent.module_accessor); } - frame(agent.lua_state_agent, 38.0); + frame(lua_state, 38.0); if MotionModule::motion_kind(agent.module_accessor) == smash::hash40("special_air_n") { FT_MOTION_RATE(agent, 1.8); } if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); } - frame(agent.lua_state_agent, 45.0); + frame(lua_state, 45.0); if is_excute(agent) { ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } @@ -91,11 +92,12 @@ unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; FT_MOTION_RATE(agent, 1.5); if is_excute(agent) { JostleModule::set_status(agent.module_accessor, false); } - frame(agent.lua_state_agent, 0.66); + frame(lua_state, 0.66); if is_excute(agent) { ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); @@ -111,7 +113,8 @@ unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { } unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { - frame(agent.lua_state_agent, 1.33); + let lua_state = agent.lua_state_agent; + frame(lua_state, 1.33); if is_excute(agent) { PLAY_SE(agent, Hash40::new("vc_wolf_special_s01")); PLAY_SE(agent, Hash40::new("se_wolf_special_s02")); @@ -144,11 +147,12 @@ unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialsend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_scratch"), Hash40::new("top"), 5, 13, 0, -40, 0, 0, 0.45, true); LAST_EFFECT_SET_RATE(agent, 2); } - frame(agent.lua_state_agent, 2.0); + frame(lua_state, 2.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), 0, 5.5, 5.5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); LAST_EFFECT_SET_RATE(agent, 1.8); diff --git a/fighters/yoshi/src/acmd/aerials.rs b/fighters/yoshi/src/acmd/aerials.rs index 155df00ac3..ca5213798a 100644 --- a/fighters/yoshi/src/acmd/aerials.rs +++ b/fighters/yoshi/src/acmd/aerials.rs @@ -122,7 +122,7 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { EFFECT_FOLLOW_ALPHA(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), 1, 4, -1.5, 184, -16, -105, 1, true, 0.3); LAST_EFFECT_SET_RATE(agent, 2.5); } - frame(agent.lua_state_agent, 17.5); + frame(lua_state, 17.5); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("sys_attack_arc_d"), Hash40::new("top"), -1.5, 4, -4.5, -175.777, 8.688, 80.371, 0.95, true); LAST_EFFECT_SET_RATE(agent, 2.5); diff --git a/fighters/zelda/src/phantom/acmd.rs b/fighters/zelda/src/phantom/acmd.rs index df7bf3bc30..cc73424a02 100644 --- a/fighters/zelda/src/phantom/acmd.rs +++ b/fighters/zelda/src/phantom/acmd.rs @@ -119,7 +119,7 @@ unsafe extern "C" fn game_attackkick(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); agent.clear_lua_stack(); lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); agent.clear_lua_stack(); } frame(lua_state, 9.0); @@ -184,7 +184,7 @@ unsafe extern "C" fn game_attackpunch(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); agent.clear_lua_stack(); lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); agent.clear_lua_stack(); } frame(lua_state, 7.0); @@ -243,7 +243,7 @@ unsafe extern "C" fn game_attacks(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); agent.clear_lua_stack(); lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); agent.clear_lua_stack(); } frame(lua_state, 7.0); @@ -339,7 +339,7 @@ unsafe extern "C" fn game_attackl(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); agent.clear_lua_stack(); lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); agent.clear_lua_stack(); } frame(lua_state, 6.0); @@ -484,7 +484,7 @@ unsafe extern "C" fn game_attackmax(agent: &mut L2CAgentBase) { KineticModule::enable_energy(boma, *WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL); agent.clear_lua_stack(); lua_args!(agent, WEAPON_ZELDA_PHANTOM_KINETIC_ENERGY_ID_NORMAL, rush_speed * PostureModule::lr(boma)); - app::sv_kinetic_energy::set_speed(agent.lua_state_agent); + app::sv_kinetic_energy::set_speed(lua_state); agent.clear_lua_stack(); } frame(lua_state, 11.0); @@ -560,13 +560,14 @@ unsafe extern "C" fn effect_attackmax(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_cancel(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; let zelda = utils::util::get_battle_object_from_id(owner_id); - frame(agent.lua_state_agent, 1.0); + frame(lua_state, 1.0); if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { FT_MOTION_RATE_RANGE(agent, 1.0, 34.0, 99.0); } - frame(agent.lua_state_agent, 30.0);//100 + frame(lua_state, 30.0);//100 if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { FT_MOTION_RATE_RANGE(agent, 30.0, 90.0, 320.0); //8 seconds VarModule::off_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM); From 698ae7fb4aeb87d6d03efbb97f67de673601c595 Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 11:47:33 -0500 Subject: [PATCH 168/172] boma sweep replaces all instances of `agent.module_accessor` in acmd scripts with a properly defined `boma` variable --- fighters/bayonetta/src/acmd/ground.rs | 10 +- fighters/bayonetta/src/acmd/other.rs | 9 +- fighters/bayonetta/src/acmd/specials.rs | 17 ++- fighters/bayonetta/src/acmd/tilts.rs | 4 +- fighters/bayonetta/src/wickedweavearm/acmd.rs | 28 ++-- fighters/brave/src/acmd/other.rs | 6 +- fighters/buddy/src/acmd/aerials.rs | 15 +- fighters/buddy/src/acmd/other.rs | 6 +- fighters/buddy/src/acmd/smashes.rs | 2 +- fighters/buddy/src/acmd/specials.rs | 41 +++--- fighters/captain/src/acmd/other.rs | 6 +- fighters/captain/src/acmd/specials.rs | 4 +- fighters/chrom/src/acmd/other.rs | 6 +- fighters/cloud/src/acmd/other.rs | 6 +- fighters/daisy/src/acmd/other.rs | 6 +- fighters/daisy/src/acmd/specials.rs | 2 +- fighters/dedede/src/acmd/other.rs | 6 +- fighters/dedede/src/gordo/acmd.rs | 2 +- fighters/demon/src/acmd/aerials.rs | 8 +- fighters/demon/src/acmd/other.rs | 8 +- fighters/demon/src/acmd/throws.rs | 1 - fighters/diddy/src/acmd/ground.rs | 4 +- fighters/diddy/src/acmd/other.rs | 6 +- fighters/dolly/src/acmd/other.rs | 8 +- fighters/donkey/src/acmd/other.rs | 6 +- fighters/donkey/src/acmd/specials.rs | 6 +- fighters/donkey/src/acmd/throws.rs | 18 +-- fighters/duckhunt/src/acmd/other.rs | 6 +- fighters/edge/src/acmd/other.rs | 6 +- fighters/eflame/src/acmd/other.rs | 6 +- fighters/elight/src/acmd/other.rs | 6 +- fighters/elight/src/acmd/specials.rs | 139 +++++++++--------- fighters/elight/src/bunshin/acmd.rs | 2 +- fighters/falco/src/acmd/other.rs | 6 +- fighters/falco/src/acmd/specials.rs | 2 +- fighters/fox/src/acmd/other.rs | 6 +- fighters/gamewatch/src/acmd/other.rs | 2 +- fighters/gamewatch/src/acmd/specials.rs | 2 +- fighters/ganon/src/acmd/ground.rs | 2 +- fighters/ganon/src/acmd/other.rs | 6 +- fighters/ganon/src/acmd/specials.rs | 28 ++-- fighters/ganon/src/acmd/tilts.rs | 24 +-- fighters/gaogaen/src/acmd/other.rs | 6 +- fighters/gekkouga/src/acmd/other.rs | 6 +- fighters/iceclimber/src/acmd/other.rs | 10 +- fighters/ike/src/acmd/other.rs | 6 +- fighters/inkling/src/acmd/other.rs | 54 +++---- fighters/jack/src/acmd/aerials.rs | 10 +- fighters/jack/src/acmd/other.rs | 6 +- fighters/kamui/src/acmd/other.rs | 6 +- fighters/kamui/src/acmd/specials.rs | 24 +-- fighters/ken/src/acmd/finals.rs | 4 +- fighters/ken/src/acmd/other.rs | 6 +- fighters/ken/src/acmd/specials/special_hi.rs | 10 +- fighters/ken/src/acmd/specials/special_lw.rs | 12 +- fighters/ken/src/hadoken/acmd.rs | 8 +- fighters/kirby/src/acmd/copy/ganon.rs | 2 +- fighters/kirby/src/acmd/copy/koopa.rs | 10 +- fighters/kirby/src/acmd/copy/lucas.rs | 2 +- fighters/kirby/src/acmd/copy/mario.rs | 2 +- fighters/kirby/src/acmd/other.rs | 6 +- fighters/kirby/src/acmd/specials.rs | 4 +- fighters/koopa/src/acmd/ground.rs | 6 +- fighters/koopa/src/acmd/other.rs | 6 +- fighters/koopa/src/acmd/smashes.rs | 16 +- fighters/koopa/src/acmd/specials.rs | 42 ++++-- fighters/koopa/src/breath/acmd.rs | 11 +- fighters/koopajr/src/acmd/other.rs | 6 +- fighters/koopajr/src/acmd/throws.rs | 4 +- fighters/krool/src/acmd/aerials.rs | 2 +- fighters/krool/src/acmd/ground.rs | 2 +- fighters/krool/src/acmd/other.rs | 8 +- fighters/krool/src/acmd/smashes.rs | 10 +- fighters/krool/src/acmd/specials.rs | 4 +- fighters/krool/src/acmd/tilts.rs | 20 +-- fighters/link/src/acmd/ground.rs | 6 +- fighters/link/src/acmd/other.rs | 6 +- fighters/link/src/acmd/smashes.rs | 2 +- fighters/littlemac/src/acmd/other.rs | 6 +- fighters/littlemac/src/acmd/specials.rs | 2 +- fighters/lucario/src/acmd/other.rs | 6 +- fighters/lucario/src/acmd/specials.rs | 12 +- fighters/lucas/src/acmd/other.rs | 8 +- fighters/lucas/src/acmd/smashes.rs | 2 +- fighters/lucas/src/acmd/specials.rs | 2 +- fighters/lucas/src/acmd/throws.rs | 30 ++-- fighters/lucina/src/acmd/other.rs | 6 +- fighters/lucina/src/acmd/specials/mod.rs | 16 +- fighters/luigi/src/acmd/ground.rs | 10 +- fighters/luigi/src/acmd/other.rs | 6 +- fighters/luigi/src/acmd/specials.rs | 36 +++-- fighters/mario/src/acmd/other.rs | 6 +- fighters/mario/src/acmd/specials.rs | 2 +- fighters/mariod/src/acmd/other.rs | 6 +- fighters/marth/src/acmd/other.rs | 6 +- fighters/master/src/acmd/other.rs | 6 +- fighters/metaknight/src/acmd/other.rs | 6 +- fighters/metaknight/src/acmd/specials.rs | 12 +- fighters/metaknight/src/acmd/tilts.rs | 2 +- fighters/mewtwo/src/acmd/aerials.rs | 7 +- fighters/mewtwo/src/acmd/other.rs | 6 +- fighters/mewtwo/src/acmd/specials.rs | 3 +- fighters/mewtwo/src/acmd/tilts.rs | 10 +- fighters/miifighter/src/acmd/other.rs | 6 +- .../src/acmd/specials/special_hi.rs | 6 +- fighters/miigunner/src/acmd/aerials.rs | 6 +- fighters/miigunner/src/acmd/other.rs | 6 +- fighters/miiswordsman/src/acmd/other.rs | 6 +- .../src/acmd/specials/special_hi.rs | 6 +- .../src/acmd/specials/special_n.rs | 4 +- .../src/acmd/specials/special_s.rs | 7 +- .../miiswordsman/src/lightshuriken/acmd.rs | 16 +- fighters/murabito/src/acmd/other.rs | 2 +- fighters/ness/src/acmd/other.rs | 6 +- fighters/ness/src/acmd/smashes.rs | 14 +- fighters/ness/src/acmd/specials.rs | 4 +- fighters/ness/src/yoyohead/acmd.rs | 12 +- fighters/packun/src/acmd/other.rs | 2 +- fighters/packun/src/acmd/tilts.rs | 2 +- fighters/pacman/src/acmd/other.rs | 2 +- fighters/palutena/src/acmd/other.rs | 6 +- .../palutena/src/acmd/specials/special_n_g.rs | 2 +- .../palutena/src/acmd/specials/special_n_o.rs | 2 +- fighters/peach/src/acmd/other.rs | 6 +- fighters/peach/src/acmd/specials.rs | 4 +- fighters/pfushigisou/src/acmd/other.rs | 6 +- fighters/pichu/src/acmd/other.rs | 6 +- fighters/pickel/src/acmd/other.rs | 2 +- fighters/pickel/src/forge/acmd.rs | 4 +- fighters/pikachu/src/acmd/other.rs | 6 +- fighters/pikmin/src/acmd/other.rs | 2 +- fighters/pit/src/acmd/other.rs | 6 +- fighters/pitb/src/acmd/other.rs | 6 +- fighters/plizardon/src/acmd/other.rs | 6 +- fighters/purin/src/acmd/other.rs | 6 +- fighters/pzenigame/src/acmd/other.rs | 6 +- fighters/reflet/src/acmd/ground.rs | 10 +- fighters/reflet/src/acmd/other.rs | 6 +- fighters/reflet/src/thunder/acmd.rs | 4 +- fighters/ridley/src/acmd/other.rs | 6 +- fighters/ridley/src/acmd/specials.rs | 2 +- fighters/robot/src/acmd/aerials.rs | 2 +- fighters/robot/src/acmd/other.rs | 6 +- fighters/robot/src/acmd/specials.rs | 8 +- fighters/rockman/src/acmd/aerials.rs | 12 +- fighters/rockman/src/acmd/ground.rs | 38 +++-- fighters/rockman/src/acmd/other.rs | 2 +- fighters/rockman/src/acmd/smashes.rs | 46 +++--- fighters/rockman/src/acmd/specials.rs | 18 ++- fighters/rockman/src/acmd/tilts.rs | 8 +- fighters/rockman/src/chargeshot/acmd.rs | 5 +- fighters/rockman/src/leafshield/acmd.rs | 27 ++-- fighters/rosetta/src/acmd/other.rs | 6 +- fighters/roy/src/acmd/other.rs | 6 +- fighters/ryu/src/acmd/finals.rs | 71 ++++----- fighters/ryu/src/acmd/other.rs | 6 +- .../ryu/src/acmd/specials/special_command.rs | 20 +-- fighters/ryu/src/acmd/specials/special_hi.rs | 4 +- fighters/ryu/src/acmd/specials/special_lw.rs | 40 ++--- fighters/ryu/src/hadoken/acmd.rs | 8 +- fighters/ryu/src/shinkuhadoken/acmd.rs | 5 +- fighters/samus/src/acmd/other.rs | 2 +- fighters/samusd/src/acmd/other.rs | 2 +- fighters/sheik/src/acmd/other.rs | 6 +- fighters/shizue/src/acmd/other.rs | 2 +- fighters/shizue/src/acmd/specials.rs | 5 +- fighters/shizue/src/bullet/acmd.rs | 2 +- fighters/shulk/src/acmd/other.rs | 6 +- fighters/simon/src/acmd/other.rs | 6 +- fighters/simon/src/acmd/specials.rs | 4 +- fighters/snake/src/acmd/other.rs | 6 +- fighters/snake/src/acmd/specials.rs | 4 +- fighters/snake/src/nikitamissile/acmd.rs | 2 +- fighters/sonic/src/acmd/other.rs | 6 +- fighters/sonic/src/acmd/specials.rs | 15 +- fighters/szerosuit/src/acmd/other.rs | 6 +- fighters/szerosuit/src/acmd/throws.rs | 12 +- fighters/tantan/src/acmd/aerials.rs | 42 ++++-- fighters/tantan/src/acmd/throws.rs | 2 +- fighters/toonlink/src/acmd/other.rs | 6 +- fighters/trail/src/acmd/other.rs | 6 +- fighters/trail/src/acmd/specials.rs | 6 +- fighters/wario/src/acmd/smashes.rs | 2 +- fighters/wario/src/acmd/specials.rs | 2 +- fighters/wiifit/src/acmd/other.rs | 6 +- fighters/wolf/src/acmd/other.rs | 6 +- fighters/wolf/src/acmd/specials.rs | 29 ++-- fighters/yoshi/src/acmd/other.rs | 6 +- fighters/yoshi/src/acmd/specials.rs | 2 +- fighters/younglink/src/acmd/ground.rs | 2 +- fighters/younglink/src/acmd/other.rs | 6 +- fighters/younglink/src/acmd/smashes.rs | 8 +- fighters/younglink/src/acmd/throws.rs | 4 +- fighters/zelda/src/acmd/aerials.rs | 4 +- fighters/zelda/src/acmd/other.rs | 6 +- fighters/zelda/src/phantom/acmd.rs | 3 +- 196 files changed, 956 insertions(+), 870 deletions(-) diff --git a/fighters/bayonetta/src/acmd/ground.rs b/fighters/bayonetta/src/acmd/ground.rs index 09f7171bd5..3583ffd903 100644 --- a/fighters/bayonetta/src/acmd/ground.rs +++ b/fighters/bayonetta/src/acmd/ground.rs @@ -128,7 +128,7 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -140,7 +140,7 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -152,7 +152,7 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -164,7 +164,7 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.5, 0, 25, 0, 14, 5.6, 0.0, 9.5, 4.6, None, None, None, 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 0.5, 361, 15, 0, 5, 6.8, 0.0, 9.0, 13.0, Some(0.0), Some(9.0), Some(6.4), 0.6, 0.3, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_rush"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); ATK_SET_SHIELD_SETOFF_MUL_arg3(agent, 0, 1, 10.0); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); } wait(lua_state, 1.0); if is_excute(agent) { @@ -185,7 +185,7 @@ unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2bfb02b69a), true); GroundModule::correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_ARM, true, true, false, 10, 3, 15, 5, true); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); + WorkModule::on_flag(boma, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_ACTION); } frame(lua_state, 4.0); if is_excute(agent) { diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 8bbb54b5d1..d41456bc53 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_bayonetta_rnd_futtobi01"), Hash40::new("seq_bayonetta_rnd_futtobi02")); } } @@ -55,7 +55,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_bayonetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 22.0); @@ -139,9 +139,10 @@ unsafe extern "C" fn game_escapeb(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_appeallwl(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 175.0); if is_excute(agent) { - StatusModule::change_status_request(agent.module_accessor, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); + StatusModule::change_status_request(boma, *FIGHTER_STATUS_KIND_SQUAT_WAIT, false); } } diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index 596e99d316..4610e27709 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -81,7 +81,7 @@ unsafe extern "C" fn game_specialsedge(agent: &mut L2CAgentBase) { } frame(lua_state, 24.0); if is_excute(agent) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } @@ -132,7 +132,7 @@ unsafe extern "C" fn game_specialsholdend(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { //fighter.on_flag(*FIGHTER_BAYONETTA_INSTANCE_WORK_ID_FLAG_SHOOTING_CHECK_END); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); //fighter.on_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_S_FLAG_END_SPECIAL_S); } frame(lua_state, 34.5); @@ -200,13 +200,13 @@ unsafe extern "C" fn game_specialairsu(agent: &mut L2CAgentBase) { frame(lua_state, 32.0); //28 if is_excute(agent) { if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { //filters out bullet hits - CancelModule::enable_cancel(agent.module_accessor); + CancelModule::enable_cancel(boma); } } frame(lua_state, 38.0); //32 if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } @@ -251,7 +251,7 @@ unsafe extern "C" fn game_shootinglegl_atkon_specialairsu(agent: &mut L2CAgentBa ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_00 as u64, 0, Hash40::new("top"), 0.5, 340, 100, 0, 10, 3.5, 0.0, 4.5, -0.5, Some(0.0), Some(4.5), Some(3.5), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); } ATTACK(agent, *FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01 as u64, 0, Hash40::new("top"), 0.5, 340, 0, 0, 0, 2.5, 0.0, 2.5, 3.0, Some(0.0), Some(-18.0), Some(59.4), 0.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 7, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal_bullet"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_BAYONETTA_HIT_01, *ATTACK_REGION_NONE); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_63_bullet"), 4, true, *BATTLE_OBJECT_ID_INVALID as u32); notify_event_msc_cmd!(agent, Hash40::new_raw(0x36db1a34c9), FIGHTER_BAYONETTA_SHOOTING_ATTACK_ID_01, 6, 4.05); } } @@ -368,18 +368,19 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { frame(lua_state, 28.0); if is_excute(agent) { if VarModule::is_flag(agent.battle_object, vars::bayonetta::instance::IS_HIT) { - CancelModule::enable_cancel(agent.module_accessor); + CancelModule::enable_cancel(boma); } } frame(lua_state, 32.0); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); if is_excute(agent) { if agent.is_flag(*FIGHTER_BAYONETTA_STATUS_WORK_ID_SPECIAL_HI_FLAG_GROUND_START) { @@ -401,7 +402,7 @@ unsafe extern "C" fn effect_specialairhi(agent: &mut L2CAgentBase) { frame(lua_state, 22.0); if is_excute(agent) { EFFECT_DETACH_KIND_WORK(agent, *FIGHTER_BAYONETTA_INSTANCE_WORK_ID_INT_EFFECT_KIND_BAYONETTA_WITCHTWIST_WIND, -1); - EffectModule::kill_kind(agent.module_accessor, Hash40::new("bayonetta_afterburner_line2"), false, true); + EffectModule::kill_kind(boma, Hash40::new("bayonetta_afterburner_line2"), false, true); } frame(lua_state, 24.0); if is_excute(agent) { diff --git a/fighters/bayonetta/src/acmd/tilts.rs b/fighters/bayonetta/src/acmd/tilts.rs index 79ba82e09f..abdc21f899 100644 --- a/fighters/bayonetta/src/acmd/tilts.rs +++ b/fighters/bayonetta/src/acmd/tilts.rs @@ -68,7 +68,7 @@ unsafe extern "C" fn game_attacks32(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); FT_MOTION_RATE_RANGE(agent, 1.0, 16.75, 9.0); if is_excute(agent) { - KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 6.5, 6.0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_L_LEG, true, false, false, 10, 3, 10, 5, true); } @@ -121,7 +121,7 @@ unsafe extern "C" fn game_attacks33(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); FT_MOTION_RATE_RANGE(agent, 1.0, 20.0, 9.0); if is_excute(agent) { - KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); FighterAreaModuleImpl::enable_fix_jostle_area(boma, 4.5, 6.0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2d51fcdb09), *FIGHTER_BAYONETTA_SHOOTING_SLOT_R_LEG, true, false, false, 10, 3, 10, 5, true); } diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs index c8edf6a2f6..ab1c69c5af 100644 --- a/fighters/bayonetta/src/wickedweavearm/acmd.rs +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -52,15 +52,15 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 8.0); if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); } frame(lua_state, 9.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 12.0); if is_excute(agent) { @@ -70,7 +70,7 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { /* Air-only */ ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 7.0, 24.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 13.0); if is_excute(agent) { @@ -80,7 +80,7 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { /* Air-only */ ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.0, 7.0, Some(0.0), Some(10.0), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 6.0, 30.0, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } wait(lua_state, 2.0); if is_excute(agent) { @@ -89,26 +89,26 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { } wait(lua_state, 5.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } wait(lua_state, 40.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_hide") as i64); + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_hide") as i64); } frame(lua_state, 8.0); if is_excute(agent) { - VisibilityModule::set_int64(agent.module_accessor, hash40("body") as i64, hash40("body_show") as i64); + VisibilityModule::set_int64(boma, hash40("body") as i64, hash40("body_show") as i64); } frame(lua_state, 9.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } frame(lua_state, 12.0); if is_excute(agent) { @@ -118,7 +118,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { /* Air-only */ ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(15.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 9.0, 0.0, 15.0, 25.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } frame(lua_state, 13.0); if is_excute(agent) { @@ -128,7 +128,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { /* Air-only */ ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 361, 100, 0, 34, 5.5, 0.0, 14.5, 7.0, Some(0.0), Some(14.5), Some(19.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 3, 0, Hash40::new("top"), 16.0, 49, 100, 0, 35, 10.0, 0.0, 16.0, 30.5, None, None, None, 1.15, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - WorkModule::on_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); + WorkModule::on_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_DISABLE_LINK_STOP); } wait(lua_state, 2.0); if is_excute(agent) { @@ -137,11 +137,11 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } wait(lua_state, 5.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } wait(lua_state, 40.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); + WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } diff --git a/fighters/brave/src/acmd/other.rs b/fighters/brave/src/acmd/other.rs index b7b5da0d9b..4f420bc772 100644 --- a/fighters/brave/src/acmd/other.rs +++ b/fighters/brave/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_brave_rnd_futtobi01"), Hash40::new("seq_brave_rnd_futtobi02")); } } @@ -56,7 +56,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_brave_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_brave_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/buddy/src/acmd/aerials.rs b/fighters/buddy/src/acmd/aerials.rs index dc90b43ef1..04c74735ec 100644 --- a/fighters/buddy/src/acmd/aerials.rs +++ b/fighters/buddy/src/acmd/aerials.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); frame(lua_state, 6.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); if is_excute(agent) { @@ -18,7 +18,7 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } frame(lua_state, 12.0); if is_excute(agent) { - AttackModule::clear(agent.module_accessor, 1, false); + AttackModule::clear(boma, 1, false); ATTACK(agent, 0, 0, Hash40::new("handr"), 7.0, 50, 76, 0, 48, 3.6, -0.5, 0.0, 0.0, None,None,None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_PUNCH); } frame(lua_state, 15.0); @@ -31,7 +31,7 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 25.0); if is_excute(agent) { @@ -39,11 +39,11 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } wait(lua_state, 3.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 42.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -336,7 +336,7 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { frame(lua_state, 46.0); if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { KineticModule::resume_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); WorkModule::off_flag(boma, *FIGHTER_STATUS_WORK_ID_FLAG_RESERVE_GRAVITY_STABLE_UNABLE); @@ -368,6 +368,7 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 14.0); if is_excute(agent) { EFFECT_FLW_POS(agent, Hash40::new("buddy_air_lw"), Hash40::new("top"), 0, -7, 0, 0, 0, 0, 1, true); @@ -382,7 +383,7 @@ unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { } frame(lua_state, 46.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT | *COLLISION_KIND_MASK_SHIELD) { EFFECT_OFF_KIND(agent, Hash40::new("buddy_air_lw"),false,false); EFFECT_FOLLOW_WORK(agent, *FIGHTER_BUDDY_INSTANCE_WORK_ID_INT_EFFECT_KIND_FLYING, Hash40::new("top"), 0, 2, 0, 0, 0, 0, 1.1, true); sv_animcmd::EFFECT_WORK(lua_state); diff --git a/fighters/buddy/src/acmd/other.rs b/fighters/buddy/src/acmd/other.rs index fd7125596e..bdde172e34 100644 --- a/fighters/buddy/src/acmd/other.rs +++ b/fighters/buddy/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_buddy_rnd_futtobi01"), Hash40::new("seq_buddy_rnd_futtobi02")); } } @@ -63,7 +63,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_buddy_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_buddy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/buddy/src/acmd/smashes.rs b/fighters/buddy/src/acmd/smashes.rs index f07d3b947a..66336222da 100644 --- a/fighters/buddy/src/acmd/smashes.rs +++ b/fighters/buddy/src/acmd/smashes.rs @@ -72,7 +72,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear(agent.module_accessor, 0, false); + AttackModule::clear(boma, 0, false); } frame(lua_state, 11.0); if is_excute(agent) { diff --git a/fighters/buddy/src/acmd/specials.rs b/fighters/buddy/src/acmd/specials.rs index 05bcfe4e9a..a56bf67e01 100644 --- a/fighters/buddy/src/acmd/specials.rs +++ b/fighters/buddy/src/acmd/specials.rs @@ -3,7 +3,8 @@ use smash::app::sv_animcmd::EFFECT_WORK; use super::*; unsafe fn will_bayonet(agent: &mut L2CAgentBase) -> bool { - let is_csticking = ControlModule::get_command_flag_cat(agent.module_accessor, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; + let boma = agent.boma(); + let is_csticking = ControlModule::get_command_flag_cat(boma, 0) & *FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4 != 0; if (is_csticking) { return true; } @@ -12,7 +13,7 @@ unsafe fn will_bayonet(agent: &mut L2CAgentBase) -> bool { unsafe extern "C" fn game_specialnupperfire(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); for _ in 0..4 { if is_excute(agent) && will_bayonet(agent){ VarModule::on_flag(boma.object(), vars::buddy::instance::BAYONET_ACTIVE); @@ -102,12 +103,12 @@ unsafe extern "C" fn game_specialsdash(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); if is_excute(agent) { //Clear speed - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); - KineticModule::clear_speed_all(agent.module_accessor); - GroundModule::set_attach_ground(agent.module_accessor, false); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); + KineticModule::clear_speed_all(boma); + GroundModule::set_attach_ground(boma, false); sv_kinetic_energy!(clear_speed, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY); sv_kinetic_energy!(set_accel, agent, FIGHTER_KINETIC_ENERGY_ID_GRAVITY, 0.0); SET_SPEED_EX(agent, -0.5, 0.0, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); @@ -128,7 +129,7 @@ unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_start"), Hash40::new("rot"), -2, -2, -14, 0, 0, 0, 0.75, true); LAST_EFFECT_SET_COLOR(agent,1,0.5,0); @@ -137,7 +138,7 @@ unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("buddy_special_s_hold"), Hash40::new("virtualcenter"), 1.5, 0, 0, 0, 0, 0, 0.75, true); LAST_EFFECT_SET_COLOR(agent,1,0.5,0); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 3.0); if is_excute(agent) { @@ -160,7 +161,7 @@ unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) && !WorkModule::is_flag(boma, *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_FAIL){ PLAY_SE(agent, Hash40::new("se_buddy_special_s01")); @@ -180,7 +181,7 @@ unsafe extern "C" fn sound_specialairsstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); if is_excute(agent) { //Set control VarModule::on_flag(boma.object(), vars::buddy::instance::BEAKBOMB_ACTIVE); @@ -216,7 +217,7 @@ unsafe extern "C" fn game_specialairsdash(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialairsdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); if is_excute(agent) { EFFECT(agent, Hash40::new("buddy_special_s_flash1"), Hash40::new("top"), 0, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); LAST_EFFECT_SET_COLOR(agent, 1, 0.3, 0); @@ -291,7 +292,7 @@ unsafe extern "C" fn sound_specialairsdash(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialairsdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); if is_excute(agent) { if agent.is_situation(*SITUATION_KIND_GROUND) { ItemModule::set_have_item_visibility(boma, false,0); @@ -300,31 +301,31 @@ unsafe extern "C" fn expression_specialairsdash(agent: &mut L2CAgentBase) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackll"), 0); } if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } wait(lua_state, 6.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } wait(lua_state, 6.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } wait(lua_state, 6.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_73_bodyattack1"), 0, false, 0); } wait(lua_state, 6.0); frame(lua_state, 25.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, 0); } wait(lua_state, 2.0); } unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); frame(lua_state, 36.0); if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_BUDDY_STATUS_SPECIAL_S_FLAG_LANDING_HEAVY); @@ -333,13 +334,13 @@ unsafe extern "C" fn game_specialairsend(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairswall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = smash::app::sv_system::battle_object_module_accessor(lua_state); + let boma = agent.boma(); frame(lua_state, 15.0); if is_excute(agent) { let has_hit_shield = AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD); if (!has_hit_shield && VarModule::get_int(boma.object(), vars::buddy::instance::BEAKBOMB_BOUNCE)==0) { - CancelModule::enable_cancel(agent.module_accessor); + CancelModule::enable_cancel(boma); } } frame(lua_state, 17.0); diff --git a/fighters/captain/src/acmd/other.rs b/fighters/captain/src/acmd/other.rs index 54a37bc8e8..4a3ce75f96 100644 --- a/fighters/captain/src/acmd/other.rs +++ b/fighters/captain/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_captain_rnd_futtobi01"), Hash40::new("seq_captain_rnd_futtobi02")); } } @@ -49,7 +49,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_captain_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_captain_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); diff --git a/fighters/captain/src/acmd/specials.rs b/fighters/captain/src/acmd/specials.rs index 72aacae90a..70ec98d7ac 100644 --- a/fighters/captain/src/acmd/specials.rs +++ b/fighters/captain/src/acmd/specials.rs @@ -343,12 +343,12 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { frame(lua_state, 2.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("captain_fk_hold"), Hash40::new("bust"), 0, 0, 0, 0, 0, 0, 0.7, true); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 12.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("captain_fk_air"), Hash40::new("toel"), 1, 1, 0, 0, 0, 140, 0.45, true); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } } diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index f81feb4d1c..d01bf7a1f7 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_chrom_rnd_futtobi01"), Hash40::new("seq_chrom_rnd_futtobi02")); } } @@ -56,7 +56,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_chrom_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_chrom_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/cloud/src/acmd/other.rs b/fighters/cloud/src/acmd/other.rs index aea353b109..835ebe9059 100644 --- a/fighters/cloud/src/acmd/other.rs +++ b/fighters/cloud/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_cloud_rnd_futtobi01"), Hash40::new("seq_cloud_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_cloud_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_cloud_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); diff --git a/fighters/daisy/src/acmd/other.rs b/fighters/daisy/src/acmd/other.rs index c5f184f6ca..89950cec0e 100644 --- a/fighters/daisy/src/acmd/other.rs +++ b/fighters/daisy/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_daisy_rnd_futtobi01"), Hash40::new("seq_daisy_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_daisy_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_daisy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/daisy/src/acmd/specials.rs b/fighters/daisy/src/acmd/specials.rs index 945c433d0c..214461d1f8 100644 --- a/fighters/daisy/src/acmd/specials.rs +++ b/fighters/daisy/src/acmd/specials.rs @@ -181,7 +181,7 @@ unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_daisy_special_l01")); if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(agent.module_accessor, 0) { + && ItemModule::is_have_item(boma, 0) { PLAY_SE(agent, Hash40::new("vc_daisy_appeal_s01")); } } diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index 39c65d6d54..8f30734d9e 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_dedede_rnd_futtobi01"), Hash40::new("seq_dedede_rnd_futtobi02")); } } @@ -70,7 +70,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dedede_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dedede_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/dedede/src/gordo/acmd.rs b/fighters/dedede/src/gordo/acmd.rs index 80ef48f024..304f9a8b11 100644 --- a/fighters/dedede/src/gordo/acmd.rs +++ b/fighters/dedede/src/gordo/acmd.rs @@ -28,7 +28,7 @@ unsafe extern "C" fn game_specialsthrow(agent: &mut L2CAgentBase) { //Reduces the max amount of bounces by 1 per recatch on the same gordo if (WorkModule::get_int(boma, *WEAPON_DEDEDE_GORDO_STATUS_WORK_INT_BOUND_COUNT) - VarModule::get_int(owner_module_accessor.object(), vars::dedede::instance::RECATCH_COUNTER)) < 0{ - StatusModule::change_status_request(agent.module_accessor, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); + StatusModule::change_status_request(boma, *WEAPON_DEDEDE_GORDO_STATUS_KIND_DEAD, true); } } else{ diff --git a/fighters/demon/src/acmd/aerials.rs b/fighters/demon/src/acmd/aerials.rs index 0efc1c5a07..7577067d3a 100644 --- a/fighters/demon/src/acmd/aerials.rs +++ b/fighters/demon/src/acmd/aerials.rs @@ -2,7 +2,7 @@ use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -34,7 +34,7 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -69,7 +69,7 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); @@ -118,7 +118,7 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 2.0); if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); diff --git a/fighters/demon/src/acmd/other.rs b/fighters/demon/src/acmd/other.rs index 5a7e9ef0e6..98783833b4 100644 --- a/fighters/demon/src/acmd/other.rs +++ b/fighters/demon/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_demon_rnd_futtobi01"), Hash40::new("seq_demon_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } @@ -55,7 +55,7 @@ unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_demon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/demon/src/acmd/throws.rs b/fighters/demon/src/acmd/throws.rs index e5edcbff92..e9c4eb0096 100644 --- a/fighters/demon/src/acmd/throws.rs +++ b/fighters/demon/src/acmd/throws.rs @@ -64,7 +64,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_throwhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } diff --git a/fighters/diddy/src/acmd/ground.rs b/fighters/diddy/src/acmd/ground.rs index 1c8635c6b4..082fe6c0f5 100644 --- a/fighters/diddy/src/acmd/ground.rs +++ b/fighters/diddy/src/acmd/ground.rs @@ -57,10 +57,10 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_FALL); VarModule::on_flag(agent.battle_object, vars::common::status::ATTACK_DASH_ENABLE_AIR_CONTINUE); - smash::app::lua_bind::KineticEnergy::reset_energy(agent.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), agent.module_accessor); + smash::app::lua_bind::KineticEnergy::reset_energy(agent.get_controller_energy() as *mut _ as _, *ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, &Vector2f::zero(), &Vector3f::zero(), boma); smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_mul(agent.get_controller_energy(), 0.0); smash::app::lua_bind::FighterKineticEnergyController::mul_x_accel_add(agent.get_controller_energy(), 0.0); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } frame(lua_state, 5.0); if is_excute(agent){ diff --git a/fighters/diddy/src/acmd/other.rs b/fighters/diddy/src/acmd/other.rs index 13a70379a5..ccd89b5fb6 100644 --- a/fighters/diddy/src/acmd/other.rs +++ b/fighters/diddy/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_diddy_rnd_futtobi01"), Hash40::new("seq_diddy_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_diddy_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_diddy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/dolly/src/acmd/other.rs b/fighters/dolly/src/acmd/other.rs index 668cf1cfab..71d1e12b49 100644 --- a/fighters/dolly/src/acmd/other.rs +++ b/fighters/dolly/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_dolly_rnd_futtobi01"), Hash40::new("seq_dolly_rnd_futtobi02")); } } @@ -46,7 +46,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } @@ -56,7 +56,7 @@ unsafe extern "C" fn sound_dashb(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_dolly_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/donkey/src/acmd/other.rs b/fighters/donkey/src/acmd/other.rs index 086ccf683d..52742e910e 100644 --- a/fighters/donkey/src/acmd/other.rs +++ b/fighters/donkey/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_donkey_rnd_futtobi01"), Hash40::new("seq_donkey_rnd_futtobi02")); } } @@ -76,7 +76,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_donkey_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_donkey_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/donkey/src/acmd/specials.rs b/fighters/donkey/src/acmd/specials.rs index 4c7eb8c4fb..78147c6894 100644 --- a/fighters/donkey/src/acmd/specials.rs +++ b/fighters/donkey/src/acmd/specials.rs @@ -205,7 +205,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 5.0); if is_excute(agent) { FT_MOTION_RATE(agent, 0.667); - HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_XLU), 0); ATTACK(agent, 1, 0, Hash40::new("armr"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); ATTACK(agent, 2, 0, Hash40::new("arml"), 12.0, 361, 90, 0, 60, 8.0, 0.0, 0.0, 0.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 361, 90, 0, 60, 5.0, 0.0, 10.5, -5.0, None, None, None, 1.25, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); @@ -338,13 +338,13 @@ unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { } frame(lua_state, 4.0); if is_excute(agent) { - HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_XLU), 0); + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_XLU), 0); ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 361, 80, 0, 40, 8.0, 0.0, 11.0, -8.0, Some(0.0), Some(11.0), Some(6.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 1, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_BODY); FT_MOTION_RATE(agent, 1.0); } frame(lua_state, 7.0); if is_excute(agent) { - HitModule::set_whole(agent.module_accessor, HitStatus(*HIT_STATUS_NORMAL), 0); + HitModule::set_whole(boma, HitStatus(*HIT_STATUS_NORMAL), 0); FT_MOTION_RATE(agent, 0.6); AttackModule::clear_all(boma); } diff --git a/fighters/donkey/src/acmd/throws.rs b/fighters/donkey/src/acmd/throws.rs index 0fad5f0652..d2c64055e5 100644 --- a/fighters/donkey/src/acmd/throws.rs +++ b/fighters/donkey/src/acmd/throws.rs @@ -217,24 +217,24 @@ unsafe extern "C" fn game_itemheavythrowlw(agent: &mut L2CAgentBase) { } frame(lua_state, 14.0); if is_excute(agent) { - let main_speed_x = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let main_speed_x = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); let stick_add_x = agent.stick_x() * 0.5; // change to kinetic type fall and change to air situation - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - KineticModule::unable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); - GroundModule::set_correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - GroundModule::correct(agent.module_accessor, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); - StatusModule::set_situation_kind(agent.module_accessor, SituationKind(*SITUATION_KIND_AIR), true); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + GroundModule::set_correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + GroundModule::correct(boma, GroundCorrectKind(*GROUND_CORRECT_KIND_AIR)); + StatusModule::set_situation_kind(boma, SituationKind(*SITUATION_KIND_AIR), true); let kinetic = *FIGHTER_KINETIC_TYPE_FALL; - KineticModule::change_kinetic(agent.module_accessor, kinetic); + KineticModule::change_kinetic(boma, kinetic); // pop up into the air - SET_SPEED_EX(agent, (main_speed_x + stick_add_x) * PostureModule::lr(agent.module_accessor), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + SET_SPEED_EX(agent, (main_speed_x + stick_add_x) * PostureModule::lr(boma), 2.25, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } // when we reach the cancel frame, transition into fall instead - let motion_kind = Hash40::new_raw(MotionModule::motion_kind(agent.module_accessor)); + let motion_kind = Hash40::new_raw(MotionModule::motion_kind(boma)); let cancel_frame = FighterMotionModuleImpl::get_cancel_frame(boma, motion_kind, true); frame(lua_state, cancel_frame); if is_excute(agent) { diff --git a/fighters/duckhunt/src/acmd/other.rs b/fighters/duckhunt/src/acmd/other.rs index e6b1140c53..afcf2256d8 100644 --- a/fighters/duckhunt/src/acmd/other.rs +++ b/fighters/duckhunt/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_duckhunt_rnd_futtobi01"), Hash40::new("seq_duckhunt_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_duckhunt_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/edge/src/acmd/other.rs b/fighters/edge/src/acmd/other.rs index a005bed779..c0c093ab78 100644 --- a/fighters/edge/src/acmd/other.rs +++ b/fighters/edge/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_edge_rnd_futtobi01"), Hash40::new("seq_edge_rnd_futtobi02")); } } @@ -61,7 +61,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { if WorkModule::is_flag(boma, *FIGHTER_EDGE_INSTANCE_WORK_ID_FLAG_ONE_WINGED_ACTIVATED) { PLAY_SE(agent, Hash40::new("se_edge_winged_landing02")); } - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_edge_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/eflame/src/acmd/other.rs b/fighters/eflame/src/acmd/other.rs index 1ae50ca3b6..7761d4387c 100644 --- a/fighters/eflame/src/acmd/other.rs +++ b/fighters/eflame/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_eflame_rnd_futtobi01"), Hash40::new("seq_eflame_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_eflame_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_eflame_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); diff --git a/fighters/elight/src/acmd/other.rs b/fighters/elight/src/acmd/other.rs index 331c7470a0..076681a8f4 100644 --- a/fighters/elight/src/acmd/other.rs +++ b/fighters/elight/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_elight_rnd_futtobi01"), Hash40::new("seq_elight_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_elight_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_elight_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index e220ce4f12..9cadbd4a4d 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -2,6 +2,7 @@ use super::*; unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let exists = { agent.clear_lua_stack(); lua_args!(agent, FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD); @@ -14,7 +15,7 @@ unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { if is_excute(agent) { ArticleModule::add_motion_partial( - agent.module_accessor, + boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD, *WEAPON_ELIGHT_ESWORD_MOTION_PART_SET_KIND_OPEM_CLOSE, motion, @@ -29,7 +30,7 @@ unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { ); } - if MotionModule::is_changing(agent.module_accessor) && is_excute(agent) { + if MotionModule::is_changing(boma) && is_excute(agent) { agent.on_flag(*FIGHTER_ELIGHT_INSTANCE_WORK_ID_FLAG_ADD_PARTIAL_MTION_SWORD_WHEN_CHANGEING); } } @@ -63,7 +64,7 @@ unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -96,9 +97,9 @@ unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { } if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -128,9 +129,9 @@ unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { } if is_excute(agent) { WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -170,7 +171,7 @@ unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { } frame(lua_state, 38.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 42.0); @@ -215,7 +216,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -258,10 +259,10 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -276,7 +277,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 26.0); if is_excute(agent) { @@ -298,10 +299,10 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -311,7 +312,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 28.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 35.0); if is_excute(agent) { @@ -333,10 +334,10 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -346,7 +347,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 37.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 45.0); if is_excute(agent) { @@ -377,7 +378,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 47.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_HIT_CHECK2); } frame(lua_state, 52.0); @@ -421,7 +422,7 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 5.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -429,7 +430,7 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 6.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 9.0); if is_excute(agent) { @@ -460,10 +461,10 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -496,10 +497,10 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -508,7 +509,7 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } frame(lua_state, 28.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 35.0); if is_excute(agent) { @@ -528,10 +529,10 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); - AttackModule::set_add_reaction_frame(agent.module_accessor, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_N_FLAG_ATTACK_SET); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 0, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 1, /*Frames*/ 2.0, /*Unk*/ false); + AttackModule::set_add_reaction_frame(boma, /*ID*/ 2, /*Frames*/ 2.0, /*Unk*/ false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 1, 2.0); ATK_SET_SHIELD_SETOFF_MUL(agent, 2, 2.0); @@ -645,7 +646,7 @@ unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { MotionModule::set_rate(boma, 1.7); - JostleModule::set_status(agent.module_accessor, false); + JostleModule::set_status(boma, false); VarModule::off_flag(agent.battle_object, vars::elight::instance::ENABLE_SPECIAL_S_ACTIONABILITY); } if is_excute(agent) { @@ -664,12 +665,12 @@ unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { } frame(lua_state, 2.0); if is_excute(agent) { - WorkModule::set_int(agent.module_accessor, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); - if ArticleModule::get_num(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); - ArticleModule::set_rate(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); + WorkModule::set_int(boma, 5, *FIGHTER_ELIGHT_STATUS_SPECIAL_S_WORK_INT_BUNSHIN_NUM); + if ArticleModule::get_num(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN) == 0 { + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, false, -1); + ArticleModule::set_rate(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_BUNSHIN, 1.0); } - VisibilityModule::set_whole(agent.module_accessor, false); + VisibilityModule::set_whole(boma, false); } frame(lua_state, 3.0); if is_excute(agent) { @@ -715,7 +716,7 @@ unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { MotionModule::set_rate(boma, 3.0); } if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); + WorkModule::off_flag(boma, /*Flag*/ *FIGHTER_ELIGHT_STATUS_SPECIAL_S_FLAG_IS_CHECK_CLIFF); } } @@ -732,7 +733,7 @@ unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } @@ -754,7 +755,7 @@ unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && VarModule::get_int(agent.object(), vars::common::instance::LAST_ATTACK_HITBOX_ID) == 0{ EFFECT_FLW_UNSYNC_VIS(agent, Hash40::new("elight_attack100_finish"), Hash40::new("rot"), 0, 0, 0, 0, 0, 0, 1.0, true); } } @@ -924,6 +925,7 @@ unsafe extern "C" fn effect_specialhistart(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); manage_sword_motion(agent, Hash40::new("to_open")); frame(lua_state, 13.0); @@ -934,7 +936,7 @@ unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { frame(lua_state, 24.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_EXPROSIVESHOT, false, -1); } frame(lua_state, 25.0); @@ -943,6 +945,7 @@ unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { @@ -953,28 +956,28 @@ unsafe extern "C" fn game_specialairhi2(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 24.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 25.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 26.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 27.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_SPREADBULLET, false, -1); } frame(lua_state, 29.0); @@ -1060,34 +1063,36 @@ unsafe extern "C" fn sound_specialairhi2(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialairhi1(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 24.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, 0x50000000); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, 0x50000000); } } unsafe extern "C" fn expression_specialairhi2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 27.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); + ControlModule::set_rumble(boma, Hash40::new("rbkind_79_beams"), 0, false, 0x50000000); } } unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_NONE); - let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); - if PostureModule::lr(agent.module_accessor) > 0.0 { + let mut angle = app::lua_bind::FighterKineticEnergyMotion::get_angle(KineticModule::get_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION) as _); + if PostureModule::lr(boma) > 0.0 { angle *= -1.0; } angle = 80.0 - angle.to_degrees() / 2.0; @@ -1118,14 +1123,14 @@ unsafe extern "C" fn game_specialairhijump(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("sword2"), 7.0, 72, 10, 0, 55, 4.0, 2.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("sword2"), 7.0, 68, 10, 0, 55, 4.0, 9.0, 0.0, 0.0, None, None, None, 1.1, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::clear(agent.module_accessor, 2, false); - AttackModule::clear(agent.module_accessor, 3, false); + AttackModule::clear(boma, 2, false); + AttackModule::clear(boma, 3, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 5.0, false); //AttackModule::set_add_reaction_frame(fighter.module_accessor, 1, 5.0, false); } frame(lua_state, 6.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, 0x2127e37c07u64, GROUND_CLIFF_CHECK_KIND_ALWAYS); } frame(lua_state, 10.0); diff --git a/fighters/elight/src/bunshin/acmd.rs b/fighters/elight/src/bunshin/acmd.rs index 8bf0335c58..b57737d44d 100644 --- a/fighters/elight/src/bunshin/acmd.rs +++ b/fighters/elight/src/bunshin/acmd.rs @@ -4,7 +4,7 @@ unsafe extern "C" fn game_specialairs5(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - VisibilityModule::set_whole(agent.module_accessor, false); + VisibilityModule::set_whole(boma, false); } } unsafe extern "C" fn effect_specialairs5(agent: &mut L2CAgentBase) { diff --git a/fighters/falco/src/acmd/other.rs b/fighters/falco/src/acmd/other.rs index f74459f7d8..2d4fe2c852 100644 --- a/fighters/falco/src/acmd/other.rs +++ b/fighters/falco/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_falco_rnd_futtobi01"), Hash40::new("seq_falco_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_falco_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_falco_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/falco/src/acmd/specials.rs b/fighters/falco/src/acmd/specials.rs index c7769f8ab6..833f4f7f0d 100644 --- a/fighters/falco/src/acmd/specials.rs +++ b/fighters/falco/src/acmd/specials.rs @@ -165,7 +165,7 @@ unsafe extern "C" fn effect_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { //LANDING_EFFECT(agent, Hash40::new("sys_atk_smoke"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_loop"), Hash40::new("top"), 0, 7, -2.0, 0, 0, 0, 0.8, true); - EffectModule::preset_limit_num(agent.module_accessor, 2); + EffectModule::preset_limit_num(boma, 2); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_flash"), Hash40::new("reflector"), 1.4, 0, 0, 0, 0, 0, 1, true); EFFECT_FOLLOW(agent, Hash40::new("falco_ref_ref"), Hash40::new("top"), 0, 7.27, -2.0, 0, 0, 0, 0.5, true); //FLASH(agent, 1, 1, 1, 0.627); diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index 774709799c..3cb83ededd 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_fox_rnd_futtobi01"), Hash40::new("seq_fox_rnd_futtobi02")); } } @@ -55,7 +55,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_fox_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_fox_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/gamewatch/src/acmd/other.rs b/fighters/gamewatch/src/acmd/other.rs index 34ad0051fa..745ce5f868 100644 --- a/fighters/gamewatch/src/acmd/other.rs +++ b/fighters/gamewatch/src/acmd/other.rs @@ -14,7 +14,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gamewatch_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gamewatch_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 2.0); diff --git a/fighters/gamewatch/src/acmd/specials.rs b/fighters/gamewatch/src/acmd/specials.rs index 47d131584e..abab9d2ead 100644 --- a/fighters/gamewatch/src/acmd/specials.rs +++ b/fighters/gamewatch/src/acmd/specials.rs @@ -291,7 +291,7 @@ unsafe extern "C" fn game_specialhiopen(agent: &mut L2CAgentBase) { frame(lua_state, 30.0); FT_MOTION_RATE_RANGE(agent, 30.0, 45.0, 10.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_GAMEWATCH_GENERATE_ARTICLE_PARACHUTE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); AttackModule::clear_all(boma); } frame(lua_state, 45.0); diff --git a/fighters/ganon/src/acmd/ground.rs b/fighters/ganon/src/acmd/ground.rs index 2b1793fe93..20689fae69 100644 --- a/fighters/ganon/src/acmd/ground.rs +++ b/fighters/ganon/src/acmd/ground.rs @@ -48,7 +48,7 @@ unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { } frame(lua_state, 5.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); if is_excute(agent) { diff --git a/fighters/ganon/src/acmd/other.rs b/fighters/ganon/src/acmd/other.rs index aa2ff890a2..37a153705d 100644 --- a/fighters/ganon/src/acmd/other.rs +++ b/fighters/ganon/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ganon_rnd_futtobi01"), Hash40::new("seq_ganon_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ganon_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ganon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 16.0); diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index 8550f0f2f6..d32dc5943a 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -68,7 +68,7 @@ unsafe extern "C" fn game_floatairstart(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0 / 10.0); frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); - KineticModule::unable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); frame(lua_state, 14.0); if is_excute(agent) { VarModule::on_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); @@ -76,7 +76,7 @@ unsafe extern "C" fn game_floatairstart(agent: &mut L2CAgentBase) { } frame(lua_state, 20.0); if is_excute(agent) { - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); } } @@ -119,7 +119,7 @@ unsafe extern "C" fn game_float(agent: &mut L2CAgentBase) { frame(lua_state, 60.0); if is_excute(agent) { VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } @@ -322,7 +322,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); } frame(lua_state, 14.0); if is_excute(agent) { @@ -342,7 +342,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 29.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 34.0); if is_excute(agent) { @@ -351,12 +351,12 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } wait(lua_state, 3.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 41.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); sv_kinetic_energy!( reset_energy, agent, @@ -368,10 +368,10 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); - let air_accel_x_mul = WorkModule::get_param_float(agent.module_accessor, hash40("air_accel_x_mul"), 0); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + let air_accel_x_mul = WorkModule::get_param_float(boma, hash40("air_accel_x_mul"), 0); let special_hi_speed_x_mul = WorkModule::get_param_float( - agent.module_accessor, + boma, hash40("param_special_hi"), hash40("special_hi_speed_x_mul") ); @@ -380,9 +380,9 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { agent, air_accel_x_mul * special_hi_speed_x_mul ); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let special_hi_speed_max_x_mul = WorkModule::get_param_float( - agent.module_accessor, + boma, hash40("param_special_hi"), hash40("special_hi_speed_max_x_mul") ); @@ -396,7 +396,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } frame(lua_state, 46.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_GANON_STATUS_SPECIAL_HI_FLAG_IS_CHECK_DIVE); } } @@ -411,7 +411,7 @@ unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 13.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("ganon_raijin_hold"), Hash40::new("head"), 2, 0, 0, 0, 0, 0, 1.3, true); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } frame(lua_state, 31.0); /* vanilla electric effects diff --git a/fighters/ganon/src/acmd/tilts.rs b/fighters/ganon/src/acmd/tilts.rs index 54676e7d96..5ba8668593 100644 --- a/fighters/ganon/src/acmd/tilts.rs +++ b/fighters/ganon/src/acmd/tilts.rs @@ -111,8 +111,8 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); + ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::generate_article(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, false, 0); } frame(lua_state, 11.0); FT_MOTION_RATE(agent, 0.5); @@ -135,11 +135,11 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 41.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_GANON_GENERATE_ARTICLE_SWORD, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } @@ -225,12 +225,12 @@ unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); slope!(agent, MA_MSC_CMD_SLOPE_SLOPE, SLOPE_STATUS_TOP); } frame(lua_state, 3.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); if is_excute(agent) { @@ -260,12 +260,12 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } wait(lua_state, 4.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } // frame(lua_state, 30.0); // if is_excute(agent) { - // WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + // WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); // } } @@ -301,7 +301,7 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); if is_excute(agent) { @@ -323,7 +323,7 @@ unsafe extern "C" fn game_attacklw32(agent: &mut L2CAgentBase) { } wait(lua_state, 4.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } @@ -359,7 +359,7 @@ unsafe extern "C" fn expression_attacklw32(agent: &mut L2CAgentBase) { } frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 14.0); if is_excute(agent) { diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index df2e2f439e..4d7d4d1284 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -8,7 +8,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -33,7 +33,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_gaogaen_rnd_futtobi01"), Hash40::new("seq_gaogaen_rnd_futtobi02")); } } @@ -61,7 +61,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gaogaen_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gaogaen_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); diff --git a/fighters/gekkouga/src/acmd/other.rs b/fighters/gekkouga/src/acmd/other.rs index 67d89a8234..e939a1ef51 100644 --- a/fighters/gekkouga/src/acmd/other.rs +++ b/fighters/gekkouga/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_gekkouga_rnd_futtobi01"), Hash40::new("seq_gekkouga_rnd_futtobi02")); } } @@ -73,7 +73,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_gekkouga_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_gekkouga_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); diff --git a/fighters/iceclimber/src/acmd/other.rs b/fighters/iceclimber/src/acmd/other.rs index f71e8a47f5..27a879a2f6 100644 --- a/fighters/iceclimber/src/acmd/other.rs +++ b/fighters/iceclimber/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_popo_rnd_futtobi01"), Hash40::new("seq_popo_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_damagefly_nana(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -70,7 +70,7 @@ unsafe extern "C" fn sound_damageflyroll_nana(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_nana_rnd_futtobi01"), Hash40::new("seq_nana_rnd_futtobi02")); } } @@ -94,7 +94,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_popo_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_popo_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/ike/src/acmd/other.rs b/fighters/ike/src/acmd/other.rs index 68a26b4715..602465b4af 100644 --- a/fighters/ike/src/acmd/other.rs +++ b/fighters/ike/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ike_rnd_futtobi01"), Hash40::new("seq_ike_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ike_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/inkling/src/acmd/other.rs b/fighters/inkling/src/acmd/other.rs index 205f51b839..10da38a9d5 100644 --- a/fighters/inkling/src/acmd/other.rs +++ b/fighters/inkling/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_inkling_rnd_futtobi01"), Hash40::new("seq_inkling_rnd_futtobi02")); } } @@ -46,7 +46,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_inkling_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_inkling_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } @@ -58,23 +58,23 @@ unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(agent.module_accessor); - let motion_frame = MotionModule::frame(agent.module_accessor); - let motion_rate = MotionModule::rate(agent.module_accessor); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + let motion_kind = MotionModule::motion_kind(boma); + let motion_frame = MotionModule::frame(boma); + let motion_rate = MotionModule::rate(boma); + ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); if is_excute(agent) { - ArticleModule::set_frame(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(agent.module_accessor); + ArticleModule::set_frame(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); @@ -109,23 +109,23 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_NO_FLIP_SQUID); } - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { + if !WorkModule::is_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID) { if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, -1); } } - let motion_kind = MotionModule::motion_kind(agent.module_accessor); - let motion_frame = MotionModule::frame(agent.module_accessor); - let motion_rate = MotionModule::rate(agent.module_accessor); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); + let motion_kind = MotionModule::motion_kind(boma); + let motion_frame = MotionModule::frame(boma); + let motion_rate = MotionModule::rate(boma); + ArticleModule::change_motion(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, Hash40::new_raw(motion_kind), false, -1.0); if is_excute(agent) { - ArticleModule::set_frame(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); - ArticleModule::set_rate(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); - ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); - let status_kind = StatusModule::status_kind(agent.module_accessor); + ArticleModule::set_frame(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_frame); + ArticleModule::set_rate(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, motion_rate); + ArticleModule::set_visibility_whole(boma, *FIGHTER_INKLING_GENERATE_ARTICLE_SQUID, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + WorkModule::on_flag(boma, *FIGHTER_INKLING_INSTANCE_WORK_ID_FLAG_EXIST_SQUID); + let status_kind = StatusModule::status_kind(boma); if status_kind != *FIGHTER_STATUS_KIND_REBIRTH { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_FORCE_LOUPE); } } frame(lua_state, 6.0); diff --git a/fighters/jack/src/acmd/aerials.rs b/fighters/jack/src/acmd/aerials.rs index 5067fdb433..0771266ffd 100644 --- a/fighters/jack/src/acmd/aerials.rs +++ b/fighters/jack/src/acmd/aerials.rs @@ -95,7 +95,7 @@ unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_n"), 0); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_n"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); @@ -176,7 +176,7 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_f"), 0); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_f"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); @@ -260,7 +260,7 @@ unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_b"), 0); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_b"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); @@ -317,7 +317,7 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_hi"), 0); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_hi"), 0); let landing_frame_arsene = landing_frame_joker + 3.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); @@ -426,7 +426,7 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let landing_frame_joker = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_lw"), 0); + let landing_frame_joker = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_arsene = landing_frame_joker + 5.0; if WorkModule::is_flag(boma, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE){ FT_MOTION_RATE(agent, landing_frame_arsene/landing_frame_joker); diff --git a/fighters/jack/src/acmd/other.rs b/fighters/jack/src/acmd/other.rs index 739034e410..6039aa4798 100644 --- a/fighters/jack/src/acmd/other.rs +++ b/fighters/jack/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_jack_rnd_futtobi01"), Hash40::new("seq_jack_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_jack_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_jack_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 18.0); diff --git a/fighters/kamui/src/acmd/other.rs b/fighters/kamui/src/acmd/other.rs index ed7394d486..0b2e734ae0 100644 --- a/fighters/kamui/src/acmd/other.rs +++ b/fighters/kamui/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_kamui_rnd_futtobi01"), Hash40::new("seq_kamui_rnd_futtobi02")); } } @@ -59,7 +59,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_kamui_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_kamui_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/kamui/src/acmd/specials.rs b/fighters/kamui/src/acmd/specials.rs index 1340f516d1..c83f4cdef8 100644 --- a/fighters/kamui/src/acmd/specials.rs +++ b/fighters/kamui/src/acmd/specials.rs @@ -24,7 +24,7 @@ unsafe extern "C" fn game_specialsattack(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); + ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_s_attack"), false, -1.0); } frame(lua_state, 24.0); if is_excute(agent) { @@ -38,7 +38,7 @@ unsafe extern "C" fn game_specialairsattack(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, false, 0); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); + ArticleModule::change_motion(boma, *FIGHTER_KAMUI_GENERATE_ARTICLE_SPEARHAND, Hash40::new("special_air_s_attack"), false, -1.0); } frame(lua_state, 24.0); if is_excute(agent) { @@ -237,27 +237,27 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_REVERSE_LR); } frame(lua_state, 18.0); if is_excute(agent) { ATTACK(agent, 0, 1, Hash40::new("top"), 4.5, 85, 100, 150, 0, 5.0, 0.0, 4.0, -5.0, Some(0.0), Some(4.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(agent.module_accessor, true, false); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); + WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); } frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("rot"), 1.2, 80, 100, 140, 0, 2.0, 0.0, 5.5, 0.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); ATTACK(agent, 1, 1, Hash40::new("rot"), 1.2, 105, 100, 140, 0, 5.5, 0.0, 4.0, 6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); ATTACK(agent, 2, 1, Hash40::new("rot"), 1.2, 68, 100, 140, 0, 5.5, 0.0, 4.0, -6.0, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); ATTACK(agent, 3, 1, Hash40::new("rot"), 1.2, 100, 100, 155, 0, 5.0, 0.0, -1.0, 5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); ATTACK(agent, 4, 1, Hash40::new("rot"), 1.2, 73, 100, 155, 0, 5.0, 0.0, -1.0, -5.5, None, None, None, 0.7, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, true, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); - AttackModule::set_no_damage_fly_smoke_all(agent.module_accessor, true, false); + AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 23.0); if is_excute(agent) { @@ -265,19 +265,19 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } frame(lua_state, 29.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, -7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); ATTACK(agent, 1, 2, Hash40::new("rot"), 3.0, 65, 170, 0, 70, 6.5, 0.0, 3.5, 7.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); } frame(lua_state, 34.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } frame(lua_state, 36.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); + WorkModule::off_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_TILT_BODY_ON); + WorkModule::on_flag(boma, *FIGHTER_KAMUI_STATUS_SPECIAL_HI_FLAG_AIR_CONTROL); } frame(lua_state, 49.0); FT_MOTION_RATE(agent, 0.8); diff --git a/fighters/ken/src/acmd/finals.rs b/fighters/ken/src/acmd/finals.rs index b3c50937a4..113224cc16 100644 --- a/fighters/ken/src/acmd/finals.rs +++ b/fighters/ken/src/acmd/finals.rs @@ -182,8 +182,8 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { } frame(lua_state, 76.0); if is_excute(agent) { - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); } ATTACK(agent, 0, 0, Hash40::new("top"), 4.0, 50, 95, 40, 0, 11.0, 0.0, 8.0, 8.0, Some(0.0), Some(10.0), Some(8.0), 3.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_FINAL01, *ATTACK_REGION_KICK); AttackModule::set_no_dead_all(boma, true, false); diff --git a/fighters/ken/src/acmd/other.rs b/fighters/ken/src/acmd/other.rs index 040495f3b0..3eeef46b28 100644 --- a/fighters/ken/src/acmd/other.rs +++ b/fighters/ken/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ken_rnd_futtobi01"), Hash40::new("seq_ken_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ken_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ken_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/ken/src/acmd/specials/special_hi.rs b/fighters/ken/src/acmd/specials/special_hi.rs index 716f8644b5..e3f15bab34 100644 --- a/fighters/ken/src/acmd/specials/special_hi.rs +++ b/fighters/ken/src/acmd/specials/special_hi.rs @@ -78,7 +78,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(agent.module_accessor) == hash40("special_hi_command") { + if MotionModule::motion_kind(boma) == hash40("special_hi_command") { WHOLE_HIT(agent, *HIT_STATUS_XLU); } } @@ -116,7 +116,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 7.0); if is_excute(agent) && !VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) - && MotionModule::motion_kind(agent.module_accessor) != hash40("special_hi_command") { + && MotionModule::motion_kind(boma) != hash40("special_hi_command") { WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } frame(lua_state, 9.0); @@ -179,10 +179,10 @@ unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { || agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_M { EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_arc"), Hash40::new("trans"), 6.5, 5, 0, 5, 0, 25, 1, false); } else { - let id = EffectModule::req_follow(agent.module_accessor, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); + let id = EffectModule::req_follow(boma, Hash40::new("ken_syoryuken_fire"), Hash40::new("handr"), &Vector3f::new(0.0, 0.0, 0.0), &Vector3f::new(0.0, 0.0, 0.0), 1.0, false, 0, 0, 0, 0, 0, false, false); VarModule::set_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID, id as i32); EFFECT_FOLLOW(agent, Hash40::new("ken_savingattack_aura"), Hash40::new("handr"), 0, 0, 0, 0, 0, 0, 1, true); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); if sv_animcmd::get_value_float(lua_state, *SO_VAR_FLOAT_LR) < 0.0 { EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); EFFECT_FOLLOW(agent, Hash40::new("ken_syoryuken_firearc2"), Hash40::new("trans"), 3, 2, 2, 5, 0, 5, 1, false); @@ -252,7 +252,7 @@ unsafe extern "C" fn effect_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 21.0); if is_excute(agent) { let id = VarModule::get_int(agent.battle_object, vars::shotos::instance::SPECIAL_HI_FIRE_EFF_ID) as u32; - EffectModule::kill(agent.module_accessor, id, true, true); + EffectModule::kill(boma, id, true, true); } frame(lua_state, 22.0); if is_excute(agent) { diff --git a/fighters/ken/src/acmd/specials/special_lw.rs b/fighters/ken/src/acmd/specials/special_lw.rs index d3d74f180f..e35ad4d6c5 100644 --- a/fighters/ken/src/acmd/specials/special_lw.rs +++ b/fighters/ken/src/acmd/specials/special_lw.rs @@ -11,6 +11,7 @@ unsafe extern "C" fn game_speciallwinstall(agent: &mut L2CAgentBase) { unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ken_appeal_l01")); @@ -21,8 +22,8 @@ unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); + let sfx_handle = SoundModule::play_se(boma, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 0.5, 0); } frame(lua_state, 20.0); if is_excute(agent) { @@ -32,17 +33,18 @@ unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 31.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 3, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/ken/src/hadoken/acmd.rs b/fighters/ken/src/hadoken/acmd.rs index 6aa1c3d307..c0ea6b5814 100644 --- a/fighters/ken/src/hadoken/acmd.rs +++ b/fighters/ken/src/hadoken/acmd.rs @@ -25,8 +25,8 @@ unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { } } if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); @@ -110,8 +110,8 @@ unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { } if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); diff --git a/fighters/kirby/src/acmd/copy/ganon.rs b/fighters/kirby/src/acmd/copy/ganon.rs index 29f135ce01..f1775ba585 100644 --- a/fighters/kirby/src/acmd/copy/ganon.rs +++ b/fighters/kirby/src/acmd/copy/ganon.rs @@ -118,7 +118,7 @@ unsafe extern "C" fn game_ganonfloat(agent: &mut L2CAgentBase) { frame(lua_state, 60.0); if is_excute(agent) { VarModule::off_flag(agent.battle_object, vars::ganon::status::FLOAT_ENABLE_ACTIONS); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } } diff --git a/fighters/kirby/src/acmd/copy/koopa.rs b/fighters/kirby/src/acmd/copy/koopa.rs index 3f415295ab..2787bef9b8 100644 --- a/fighters/kirby/src/acmd/copy/koopa.rs +++ b/fighters/kirby/src/acmd/copy/koopa.rs @@ -37,13 +37,14 @@ unsafe extern "C" fn game_koopaspecialnend(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_koopaspecialnmax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { VarModule::set_int(agent.battle_object, vars::koopa::instance::FIREBALL_COOLDOWN_FRAME,KOOPA_MAX_COOLDOWN); } frame(lua_state, 24.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_BREATH_FLAG_START); } } @@ -111,17 +112,18 @@ unsafe extern "C" fn sound_koopaspecialnmax(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_koopaspecialnmax(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/kirby/src/acmd/copy/lucas.rs b/fighters/kirby/src/acmd/copy/lucas.rs index d94ded44d1..36460594b7 100644 --- a/fighters/kirby/src/acmd/copy/lucas.rs +++ b/fighters/kirby/src/acmd/copy/lucas.rs @@ -26,7 +26,7 @@ unsafe extern "C" fn sound_lucasspecialnstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_lucasspecialnhold(agent: &mut L2CAgentBase) { // INTENTIONALLY LEFT BLANK /* if agent.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); } */ } diff --git a/fighters/kirby/src/acmd/copy/mario.rs b/fighters/kirby/src/acmd/copy/mario.rs index 544034f7df..d9cd62ce48 100644 --- a/fighters/kirby/src/acmd/copy/mario.rs +++ b/fighters/kirby/src/acmd/copy/mario.rs @@ -71,7 +71,7 @@ unsafe extern "C" fn game_mariospecialnfire(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); if is_excute(agent) { - KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); + KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 5.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 6.5, 11.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 35d18c6283..3dd13b96cd 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_kirby_rnd_futtobi01"), Hash40::new("seq_kirby_rnd_futtobi02")); } } @@ -46,7 +46,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_kirby_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_kirby_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index 45eb9a7ff8..e761cc60b4 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -417,7 +417,7 @@ unsafe extern "C" fn game_specialairhih(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 52.0); if is_excute(agent) { - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_GRAVITY); if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { VarModule::on_flag(agent.battle_object, vars::kirby::instance::DISABLE_SPECIAL_HI); StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, false); @@ -429,7 +429,7 @@ unsafe extern "C" fn game_specialairhih(agent: &mut L2CAgentBase) { } frame(lua_state, 60.0); if is_excute(agent) { - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } diff --git a/fighters/koopa/src/acmd/ground.rs b/fighters/koopa/src/acmd/ground.rs index 27ca551133..5138a5d6bb 100644 --- a/fighters/koopa/src/acmd/ground.rs +++ b/fighters/koopa/src/acmd/ground.rs @@ -106,18 +106,18 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("koopa_scratch"), Hash40::new("koopa_scratch"), Hash40::new("top"), -2, 20, 5.5, 19, -8, -52, 1.6, true, *EF_FLIP_YZ); LAST_EFFECT_SET_RATE(agent, 1.5); - EffectModule::set_visible_kind(agent.module_accessor, Hash40::new("koopa_scratch"), false); + EffectModule::set_visible_kind(boma, Hash40::new("koopa_scratch"), false); EFFECT_FOLLOW(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), -4, 13, -30, 0, 0, 0, 2.5, true); LAST_EFFECT_SET_RATE(agent, 1.75); } frame(lua_state, 16.0); if is_excute(agent) { - EffectModule::set_visible_kind(agent.module_accessor, Hash40::new("koopa_scratch"), true); + EffectModule::set_visible_kind(boma, Hash40::new("koopa_scratch"), true); } frame(lua_state, 17.0); if is_excute(agent) { - if PostureModule::lr(agent.module_accessor) > 0.0 { + if PostureModule::lr(boma) > 0.0 { EFFECT(agent, Hash40::new("sys_damage_spark_s"), Hash40::new("top"), 18.0, 2.0, 0.0, 0,0,140,0.9, 0, 0, 0, 0, 0, 0, false); } else{ diff --git a/fighters/koopa/src/acmd/other.rs b/fighters/koopa/src/acmd/other.rs index 9130a24578..5c5f4ef0f2 100644 --- a/fighters/koopa/src/acmd/other.rs +++ b/fighters/koopa/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_koopa_rnd_futtobi01"), Hash40::new("seq_koopa_rnd_futtobi02")); } } @@ -70,7 +70,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_koopa_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_koopa_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); diff --git a/fighters/koopa/src/acmd/smashes.rs b/fighters/koopa/src/acmd/smashes.rs index abed1ee7d6..d4328c5099 100644 --- a/fighters/koopa/src/acmd/smashes.rs +++ b/fighters/koopa/src/acmd/smashes.rs @@ -22,14 +22,14 @@ unsafe extern "C" fn effect_attacks4charge(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { VarModule::off_flag(agent.battle_object, vars::koopa::instance::IS_EXCELLENT_PUNCH); } frame(lua_state, 19.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 22.0); if is_excute(agent) { @@ -44,9 +44,9 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { frame(lua_state, 26.0); FT_MOTION_RATE_RANGE(agent, 26.0, 40.0, 8.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - SlowModule::clear_whole(agent.module_accessor); - CameraModule::reset_all(agent.module_accessor); + AttackModule::clear_all(boma); + SlowModule::clear_whole(boma); + CameraModule::reset_all(boma); CAM_ZOOM_OUT(agent); } frame(lua_state, 40.0); @@ -57,7 +57,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let boma = agent.module_accessor; + let boma = agent.boma(); frame(lua_state, 2.0); if is_excute(agent) { EFFECT_FLIP(agent, Hash40::new("sys_smash_flash"), Hash40::new("sys_smash_flash"), Hash40::new("top"), 12, 15, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false, *EF_FLIP_YZ); @@ -86,8 +86,8 @@ unsafe extern "C" fn effect_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 26.0); if is_excute(agent) { - SlowModule::clear_whole(agent.module_accessor); - CameraModule::reset_all(agent.module_accessor); + SlowModule::clear_whole(boma); + CameraModule::reset_all(boma); EFFECT_OFF_KIND(agent, Hash40::new("sys_attack_line"), true, true); } } diff --git a/fighters/koopa/src/acmd/specials.rs b/fighters/koopa/src/acmd/specials.rs index 290e0ae9f9..d691a6846f 100644 --- a/fighters/koopa/src/acmd/specials.rs +++ b/fighters/koopa/src/acmd/specials.rs @@ -121,15 +121,15 @@ unsafe extern "C" fn expression_specialnmax(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_elecattack"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 25.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } @@ -141,6 +141,7 @@ unsafe extern "C" fn effect_specialssquat(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 82, 80, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); @@ -151,7 +152,7 @@ unsafe extern "C" fn game_specialsthrowlw(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } @@ -183,18 +184,20 @@ unsafe extern "C" fn sound_specialsthrowlw(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialsthrowlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 19.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_M); } } unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 50, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); @@ -205,15 +208,16 @@ unsafe extern "C" fn game_specialsthrowf(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } unsafe extern "C" fn effect_specialsthrowf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 17.0); if is_excute(agent) { - if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 2, 0, -6, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } @@ -237,43 +241,46 @@ unsafe extern "C" fn sound_specialsthrowf(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialsthrowf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 19.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } unsafe extern "C" fn game_specialsthrowb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 12.0, 45, 66, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 18.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); + WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); CHECK_FINISH_CAMERA(agent, 20, 15); } frame(lua_state, 19.0); if is_excute(agent) { REVERSE_LR(agent); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } } unsafe extern "C" fn effect_specialsthrowb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 19.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_smash_flash_s"), Hash40::new("throw"), 0, 0, 0, 0, 0, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } frame(lua_state, 22.0); if is_excute(agent) { - if StatusModule::situation_kind(agent.module_accessor) == *SITUATION_KIND_GROUND { + if StatusModule::situation_kind(boma) == *SITUATION_KIND_GROUND { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), 3, 0, 3, 0, 180, 0, 1.5, 0, 0, 0, 0, 0, 0, true); } } @@ -293,12 +300,13 @@ unsafe extern "C" fn sound_specialsthrowb(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialsthrowb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 19.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_attackm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); } } @@ -335,6 +343,7 @@ unsafe extern "C" fn effect_specialsfall(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialslanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 18.0, 60, 60, 0, 80, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 5.0, 70, 30, 0, 60, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_BODY); @@ -347,7 +356,7 @@ unsafe extern "C" fn game_specialslanding(agent: &mut L2CAgentBase) { } frame(lua_state, 2.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); + WorkModule::on_flag(boma, *FIGHTER_KOOPA_STATUS_SPECIAL_S_FLAG_HIT); } frame(lua_state, 10.0); FT_MOTION_RATE_RANGE(agent,10.0,14.0,8.0); @@ -382,14 +391,15 @@ unsafe extern "C" fn sound_specialslanding(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialslanding(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); QUAKE(agent, *CAMERA_QUAKE_KIND_L); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_erase"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 3.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 23.0); if is_excute(agent) { diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs index 2bcba92a48..02ce4e28c2 100644 --- a/fighters/koopa/src/breath/acmd.rs +++ b/fighters/koopa/src/breath/acmd.rs @@ -6,13 +6,13 @@ unsafe extern "C" fn game_max(agent: &mut L2CAgentBase) { //let mut halflife=30.0; if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 16.0, 55, 60, 0, 80, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(agent.module_accessor); + AttackModule::enable_safe_pos(boma); //halflife = WorkModule::get_int(weapon.module_accessor,*WEAPON_INSTANCE_WORK_ID_INT_INIT_LIFE) as f32 /2.0; } frame(lua_state, 11.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 12.0, 55, 60, 0, 80, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.8, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); - AttackModule::enable_safe_pos(agent.module_accessor); + AttackModule::enable_safe_pos(boma); } } @@ -41,10 +41,11 @@ unsafe extern "C" fn game_end(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_end(agent: &mut L2CAgentBase) { - let lr = PostureModule::lr(agent.module_accessor); - let pos = *PostureModule::pos(agent.module_accessor); + let boma = agent.boma(); + let lr = PostureModule::lr(boma); + let pos = *PostureModule::pos(boma); EffectModule::req( - agent.module_accessor, + boma, Hash40::new("sys_damage_fire"), &Vector3f{x: pos.x + 4.0*lr, y: pos.y, z:pos.z}, &Vector3f::zero(), diff --git a/fighters/koopajr/src/acmd/other.rs b/fighters/koopajr/src/acmd/other.rs index a73f616784..868f543737 100644 --- a/fighters/koopajr/src/acmd/other.rs +++ b/fighters/koopajr/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_koopajr_rnd_futtobi01"), Hash40::new("seq_koopajr_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_koopajr_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/koopajr/src/acmd/throws.rs b/fighters/koopajr/src/acmd/throws.rs index 46b65aa188..a35eb65cc7 100644 --- a/fighters/koopajr/src/acmd/throws.rs +++ b/fighters/koopajr/src/acmd/throws.rs @@ -102,13 +102,13 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { frame(lua_state, 16.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.2, 361, 100, 30, 0, 5.0, 0.0, 4.0, 0.0, None, None, None, 0.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_OBJECT); - AttackModule::set_catch_only_all(agent.module_accessor, true, false); + AttackModule::set_catch_only_all(boma, true, false); } frame(lua_state, 50.0); FT_MOTION_RATE_RANGE(agent, 50.0, 78.0, 14.0); if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); let opponent_boma = agent.get_grabbed_opponent_boma(); VarModule::on_flag(opponent_boma.object(), vars::common::instance::IS_KNOCKDOWN_THROW); } diff --git a/fighters/krool/src/acmd/aerials.rs b/fighters/krool/src/acmd/aerials.rs index b648ba78dd..02b3974db6 100644 --- a/fighters/krool/src/acmd/aerials.rs +++ b/fighters/krool/src/acmd/aerials.rs @@ -11,7 +11,7 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 7.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 361, 93, 0, 40, 9.5, 0.0, 9.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); diff --git a/fighters/krool/src/acmd/ground.rs b/fighters/krool/src/acmd/ground.rs index 95bdcfce95..734a278411 100644 --- a/fighters/krool/src/acmd/ground.rs +++ b/fighters/krool/src/acmd/ground.rs @@ -117,7 +117,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 0.5); ATTACK(agent, 0, 0, Hash40::new("hip"), 15.0, 45, 70, 0, 60, 7.0, 4.0, 3.5, 3.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } diff --git a/fighters/krool/src/acmd/other.rs b/fighters/krool/src/acmd/other.rs index 6bdde01fda..0e6ac06f4e 100644 --- a/fighters/krool/src/acmd/other.rs +++ b/fighters/krool/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_krool_rnd_futtobi01"), Hash40::new("seq_krool_rnd_futtobi02")); } } @@ -67,7 +67,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_krool_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_krool_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } @@ -117,7 +117,7 @@ unsafe extern "C" fn game_appeals(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } diff --git a/fighters/krool/src/acmd/smashes.rs b/fighters/krool/src/acmd/smashes.rs index 0d39bddac1..ccd5feb0e3 100644 --- a/fighters/krool/src/acmd/smashes.rs +++ b/fighters/krool/src/acmd/smashes.rs @@ -9,7 +9,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 12.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } @@ -35,7 +35,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 12.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } @@ -65,7 +65,7 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { } frame(lua_state, 12.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } @@ -96,7 +96,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { frame(lua_state, 6.0); if is_excute(agent) { HIT_NODE(agent, Hash40::new("head"), *HIT_STATUS_XLU); - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } ATTACK(agent, 1, 1, Hash40::new("bust"), 17.0, 83, 90, 0, 31, 8.0, 7.5, 1.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_HEAD); @@ -153,7 +153,7 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { + if WorkModule::get_float(boma, 0x4d) >= 1.0 { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } diff --git a/fighters/krool/src/acmd/specials.rs b/fighters/krool/src/acmd/specials.rs index 997365f6ca..b22fa6505f 100644 --- a/fighters/krool/src/acmd/specials.rs +++ b/fighters/krool/src/acmd/specials.rs @@ -272,8 +272,8 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { } frame(lua_state, 7.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 - && ControlModule::check_button_on(agent.module_accessor, *CONTROL_PAD_BUTTON_SPECIAL) { + if WorkModule::get_float(boma, 0x4d) >= 1.0 + && ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL) { WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } diff --git a/fighters/krool/src/acmd/tilts.rs b/fighters/krool/src/acmd/tilts.rs index 9e14258bad..95479495ce 100644 --- a/fighters/krool/src/acmd/tilts.rs +++ b/fighters/krool/src/acmd/tilts.rs @@ -5,8 +5,8 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); @@ -51,8 +51,8 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); @@ -97,8 +97,8 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 9.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 12.0); @@ -167,8 +167,8 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { frame(lua_state, 2.0); FT_MOTION_RATE_RANGE(agent, 2.0, 4.0, 2.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 4.0); @@ -240,8 +240,8 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } frame(lua_state, 10.0); if is_excute(agent) { - if WorkModule::get_float(agent.module_accessor, 0x4d) >= 1.0 { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); + if WorkModule::get_float(boma, 0x4d) >= 1.0 { + WorkModule::on_flag(boma, *FIGHTER_KROOL_INSTANCE_WORK_ID_FLAG_REQUEST_WAIST_SHIELD_ON); } } frame(lua_state, 13.0); diff --git a/fighters/link/src/acmd/ground.rs b/fighters/link/src/acmd/ground.rs index ff951107eb..f0869261f8 100644 --- a/fighters/link/src/acmd/ground.rs +++ b/fighters/link/src/acmd/ground.rs @@ -31,8 +31,8 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { } wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } @@ -47,7 +47,7 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { } wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/link/src/acmd/other.rs b/fighters/link/src/acmd/other.rs index bfe1a772cc..bcdba4e8e9 100644 --- a/fighters/link/src/acmd/other.rs +++ b/fighters/link/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_link_rnd_futtobi01"), Hash40::new("seq_link_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_link_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_link_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/link/src/acmd/smashes.rs b/fighters/link/src/acmd/smashes.rs index df07c7baf8..b72756fdc1 100644 --- a/fighters/link/src/acmd/smashes.rs +++ b/fighters/link/src/acmd/smashes.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 10.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } FT_MOTION_RATE(agent, 6.0/(14.0-10.0)); frame(lua_state, 14.0); diff --git a/fighters/littlemac/src/acmd/other.rs b/fighters/littlemac/src/acmd/other.rs index 32356781ee..35dd284fda 100644 --- a/fighters/littlemac/src/acmd/other.rs +++ b/fighters/littlemac/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_littlemac_rnd_futtobi01"), Hash40::new("seq_littlemac_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_littlemac_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_littlemac_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); diff --git a/fighters/littlemac/src/acmd/specials.rs b/fighters/littlemac/src/acmd/specials.rs index 9ca535e4a4..ee68323d6a 100644 --- a/fighters/littlemac/src/acmd/specials.rs +++ b/fighters/littlemac/src/acmd/specials.rs @@ -353,7 +353,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { } frame(lua_state, 32.0); if is_excute(agent) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, diff --git a/fighters/lucario/src/acmd/other.rs b/fighters/lucario/src/acmd/other.rs index db1d08cbc3..8cda1da185 100644 --- a/fighters/lucario/src/acmd/other.rs +++ b/fighters/lucario/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_lucario_rnd_futtobi01"), Hash40::new("seq_lucario_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucario_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucario_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); diff --git a/fighters/lucario/src/acmd/specials.rs b/fighters/lucario/src/acmd/specials.rs index dfe325a793..5aace0059d 100644 --- a/fighters/lucario/src/acmd/specials.rs +++ b/fighters/lucario/src/acmd/specials.rs @@ -167,25 +167,25 @@ unsafe extern "C" fn game_specialairsthrow(agent: &mut L2CAgentBase) { } frame(lua_state, 23.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_REQUEST_THROW); CHECK_FINISH_CAMERA(agent, 15, 0); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); + WorkModule::on_flag(boma, *FIGHTER_LUCARIO_POWER_PUNCH_STATUS_WORK_ID_FLAG_CRITICAL_HIT); ATTACK_IGNORE_THROW(agent, 0, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 5.0, 0.0, 8.5, 14.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); ATTACK_IGNORE_THROW(agent, 1, 0, Hash40::new("top"), 10.0, 52, 90, 0, 60, 4.0, 0.0, 8.5, 19.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_aura"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_LUCARIO, *ATTACK_REGION_NONE); } frame(lua_state, 24.0); if is_excute(agent) { - ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(agent.module_accessor, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } frame(lua_state, 25.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 55.0); if is_excute(agent) { - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_FALL); - KineticModule::resume_energy_all(agent.module_accessor); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); + KineticModule::resume_energy_all(boma); } } diff --git a/fighters/lucas/src/acmd/other.rs b/fighters/lucas/src/acmd/other.rs index 5d10fb1af6..75bad3a063 100644 --- a/fighters/lucas/src/acmd/other.rs +++ b/fighters/lucas/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_lucas_rnd_futtobi01"), Hash40::new("seq_lucas_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucas_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucas_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); @@ -104,7 +104,7 @@ unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { frame(lua_state, 40.0); if is_excute(agent) { if agent.is_button_on(Buttons::AppealHi) { - StatusModule::change_status_request_from_script(agent.module_accessor, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_SLIP_WAIT, true); } } } diff --git a/fighters/lucas/src/acmd/smashes.rs b/fighters/lucas/src/acmd/smashes.rs index 8fd42911f2..a8ecf95731 100644 --- a/fighters/lucas/src/acmd/smashes.rs +++ b/fighters/lucas/src/acmd/smashes.rs @@ -303,7 +303,7 @@ unsafe extern "C" fn effect_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { if VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { let handle = EffectModule::req_follow(boma, Hash40::new("sys_crown"), Hash40::new("top"), &Vector3f::zero(), &Vector3f::zero(), 1.0, true, 0, 0, 0, 0, 0, true, true) as u32; - EffectModule::set_rgb(agent.module_accessor, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); + EffectModule::set_rgb(boma, handle, 0.0 / 255.0, 204.0 / 255.0, 255.0 / 255.0); } else { LANDING_EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, false); diff --git a/fighters/lucas/src/acmd/specials.rs b/fighters/lucas/src/acmd/specials.rs index 4ebaa2722e..fa0e659c4d 100644 --- a/fighters/lucas/src/acmd/specials.rs +++ b/fighters/lucas/src/acmd/specials.rs @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_specialnstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialnhold(agent: &mut L2CAgentBase) { // INTENTIONALLY LEFT BLANK /* if agent.kind() == *FIGHTER_KIND_KIRBY { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); + WorkModule::on_flag(boma, *FIGHTER_LUCAS_STATUS_SPECIAL_N_FLAG_GENERATE_ARTICLE); } */ } diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index 7d507c0550..f81d408c96 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -4,15 +4,15 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 8.0); FT_MOTION_RATE(agent, 0.5 / (9.0 - 8.0)); frame(lua_state, 9.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - GrabModule::set_rebound(agent.module_accessor, true); + GrabModule::set_rebound(boma, true); } frame(lua_state, 12.0); if is_excute(agent) { @@ -32,11 +32,11 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(agent.module_accessor, false); + GrabModule::set_rebound(boma, false); } frame(lua_state, 69.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } @@ -44,12 +44,12 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch"), false, 0.0); } frame(lua_state, 11.0); if is_excute(agent) { - GrabModule::set_rebound(agent.module_accessor, true); + GrabModule::set_rebound(boma, true); } frame(lua_state, 14.0); if is_excute(agent) { @@ -67,11 +67,11 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { frame(lua_state, 20.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(agent.module_accessor, false); + GrabModule::set_rebound(boma, false); } frame(lua_state, 79.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } @@ -79,12 +79,12 @@ unsafe extern "C" fn game_catchturn (agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); + ArticleModule::generate_article(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, false, 0); + ArticleModule::change_motion(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 14.0); if is_excute(agent) { - GrabModule::set_rebound(agent.module_accessor, /*CanCatchRebound*/ true); + GrabModule::set_rebound(boma, /*CanCatchRebound*/ true); } frame(lua_state, 15.0); if is_excute(agent) { @@ -102,11 +102,11 @@ unsafe extern "C" fn game_catchturn (agent: &mut L2CAgentBase) { frame(lua_state, 21.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(agent.module_accessor, false); + GrabModule::set_rebound(boma, false); } frame(lua_state, 75.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); + ArticleModule::remove_exist(boma, *FIGHTER_LUCAS_GENERATE_ARTICLE_HIMOHEBI, ArticleOperationTarget(0)); } } diff --git a/fighters/lucina/src/acmd/other.rs b/fighters/lucina/src/acmd/other.rs index 5c56c6d679..01406a3361 100644 --- a/fighters/lucina/src/acmd/other.rs +++ b/fighters/lucina/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_lucina_rnd_futtobi01"), Hash40::new("seq_lucina_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_lucina_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_lucina_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/lucina/src/acmd/specials/mod.rs b/fighters/lucina/src/acmd/specials/mod.rs index 90b23fcfca..e68cb417d6 100644 --- a/fighters/lucina/src/acmd/specials/mod.rs +++ b/fighters/lucina/src/acmd/specials/mod.rs @@ -331,15 +331,15 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - HitModule::set_hit_stop_mul(agent.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(agent.module_accessor, 0.5); + HitModule::set_hit_stop_mul(boma, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 0.5); damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); } frame(lua_state, 15.0); if is_excute(agent) { - DamageModule::set_damage_mul(agent.module_accessor, 1.0); - HitModule::set_hit_stop_mul(agent.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 1.0); + HitModule::set_hit_stop_mul(boma, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK); } @@ -355,15 +355,15 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - HitModule::set_hit_stop_mul(agent.module_accessor, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); - DamageModule::set_damage_mul(agent.module_accessor, 0.5); + HitModule::set_hit_stop_mul(boma, 3.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 0.5); damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_ALWAYS, 0); VarModule::set_float(boma.object(), vars::lucina::instance::CURRENT_DAMAGE, DamageModule::damage(boma, 0)); } frame(lua_state, 15.0); if is_excute(agent) { - DamageModule::set_damage_mul(agent.module_accessor, 1.0); - HitModule::set_hit_stop_mul(agent.module_accessor, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); + DamageModule::set_damage_mul(boma, 1.0); + HitModule::set_hit_stop_mul(boma, 1.0, HitStopMulTarget{_address: (*HIT_STOP_MUL_TARGET_OPPONENT) as u8}, 0.0); damage!(agent, MA_MSC_DAMAGE_DAMAGE_NO_REACTION, DAMAGE_NO_REACTION_MODE_NORMAL, 0); VarModule::on_flag(agent.battle_object, vars::lucina::status::SPECIAL_LW_SPECIAL_CHECK) } diff --git a/fighters/luigi/src/acmd/ground.rs b/fighters/luigi/src/acmd/ground.rs index b70f786bb7..27c74e8c64 100644 --- a/fighters/luigi/src/acmd/ground.rs +++ b/fighters/luigi/src/acmd/ground.rs @@ -92,7 +92,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 8.0); if is_excute(agent) { @@ -101,7 +101,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 12.0); if is_excute(agent) { @@ -110,7 +110,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 16.0); if is_excute(agent) { @@ -119,7 +119,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 25.0); if is_excute(agent) { @@ -128,7 +128,7 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/luigi/src/acmd/other.rs b/fighters/luigi/src/acmd/other.rs index e9c3daa0d5..b16d5c54a9 100644 --- a/fighters/luigi/src/acmd/other.rs +++ b/fighters/luigi/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_luigi_rnd_futtobi01"), Hash40::new("seq_luigi_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_luigi_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_luigi_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/luigi/src/acmd/specials.rs b/fighters/luigi/src/acmd/specials.rs index 48aae2e7da..0618ad2e75 100644 --- a/fighters/luigi/src/acmd/specials.rs +++ b/fighters/luigi/src/acmd/specials.rs @@ -136,13 +136,13 @@ unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.0, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } frame(lua_state, 3.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_FLAG_REVERSE_LR); } } @@ -160,21 +160,22 @@ unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + let handle = EffectModule::get_last_handle(boma) as u32; VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } for _ in 0..100 { if is_excute(agent) { FOOT_EFFECT(agent, Hash40::new("sys_dash_smoke"), Hash40::new("top"), -5, 0, 0, 0, 0, 0, 1, 10, 00, 4, 0, 0, 0, false); - let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + let handle = EffectModule::get_last_handle(boma) as u32; VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_SMOKE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); } } @@ -184,12 +185,13 @@ unsafe extern "C" fn effect_specialshold(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_specialairshold(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("luigi_rocket_hold"), Hash40::new("top"), 0, 6, 0, 0, 1, 0, 1, true); - let handle = EffectModule::get_last_handle(agent.module_accessor) as u32; + let handle = EffectModule::get_last_handle(boma) as u32; VarModule::set_int(agent.battle_object, vars::luigi::instance::CHARGE_PULSE_EFFECT_HANDLE, handle as i32); - if WorkModule::is_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { + if WorkModule::is_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_CHARGE_FLAG_DISCHARGE) { LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); } } @@ -235,23 +237,24 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialsdischarge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let misfire_multiplier = VarModule::get_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER); VarModule::set_float(agent.battle_object, vars::luigi::instance::MISFIRE_DAMAGE_MULTIPLIER, 1.0); frame(lua_state, 4.0); if is_excute(agent) { SA_SET(agent, *SITUATION_KIND_AIR); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_LUIGI_SPECIAL_S_RAM); CORRECT(agent, *GROUND_CORRECT_KIND_AIR); } frame(lua_state, 5.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("neck"), 25.0 * misfire_multiplier, 361, 100, 0, 20, 5.5, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_HEAD); - AttackModule::set_attack_keep_rumble(agent.module_accessor, 0, true); - JostleModule::set_status(agent.module_accessor, false); + AttackModule::set_attack_keep_rumble(boma, 0, true); + JostleModule::set_status(boma, false); } frame(lua_state, 6.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_GROUND_CHECK); } frame(lua_state, 11.0); if is_excute(agent) { @@ -259,16 +262,17 @@ unsafe extern "C" fn game_specialsdischarge(agent: &mut L2CAgentBase) { } frame(lua_state, 14.0); if is_excute(agent) { - WorkModule::enable_transition_term(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); + WorkModule::enable_transition_term(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_TRANSITION_TERM_ID_GROUND); } frame(lua_state, 20.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); + WorkModule::on_flag(boma, *FIGHTER_LUIGI_STATUS_SPECIAL_S_RAM_FLAG_BRAKE); } } unsafe extern "C" fn effect_specialsdischarge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { EFFECT(agent, Hash40::new("luigi_rocket_bomb"), Hash40::new("top"), 0, 4, 0, 0, 0, 0, 1.2, 0, 0, 0, 0, 0, 0, true); LAST_EFFECT_SET_COLOR(agent, 0.0, 0.8, 0.0); @@ -282,7 +286,7 @@ unsafe extern "C" fn effect_specialsdischarge(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_FOLLOW_NO_STOP(agent, Hash40::new("luigi_rocket_jet2"), Hash40::new("top"), 0, 4, 4, 0, 0, 0, 1, true); LAST_EFFECT_SET_COLOR(agent, 0.0, 0.7, 0.3); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } } @@ -398,7 +402,7 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { + if KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) < 0.0 { KineticModule::mul_speed(boma, &Vector3f{x: 1.0, y: 0.1, z: 1.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); } } diff --git a/fighters/mario/src/acmd/other.rs b/fighters/mario/src/acmd/other.rs index 9d8989ddd9..5564019db6 100644 --- a/fighters/mario/src/acmd/other.rs +++ b/fighters/mario/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_mario_rnd_futtobi01"), Hash40::new("seq_mario_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mario_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mario_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); diff --git a/fighters/mario/src/acmd/specials.rs b/fighters/mario/src/acmd/specials.rs index 93129ccbaf..a108d0ad11 100644 --- a/fighters/mario/src/acmd/specials.rs +++ b/fighters/mario/src/acmd/specials.rs @@ -84,7 +84,7 @@ unsafe extern "C" fn game_specialnfire(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); frame(lua_state, 14.0); if is_excute(agent) { - KineticModule::add_speed(agent.module_accessor, &Vector3f::new(-0.5, 0.0, 0.0)); + KineticModule::add_speed(boma, &Vector3f::new(-0.5, 0.0, 0.0)); ATTACK(agent, 0, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 3.0, 0.0, 6.5, 4.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 50, 101, 0, 52, 5.0, 0.0, 7.5, 10.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_PUNCH); } diff --git a/fighters/mariod/src/acmd/other.rs b/fighters/mariod/src/acmd/other.rs index 2d9243f051..3f338e74dd 100644 --- a/fighters/mariod/src/acmd/other.rs +++ b/fighters/mariod/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_mariod_rnd_futtobi01"), Hash40::new("seq_mariod_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mariod_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mariod_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); diff --git a/fighters/marth/src/acmd/other.rs b/fighters/marth/src/acmd/other.rs index b2ce043408..01fdd4d978 100644 --- a/fighters/marth/src/acmd/other.rs +++ b/fighters/marth/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_marth_rnd_futtobi01"), Hash40::new("seq_marth_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_marth_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_marth_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/master/src/acmd/other.rs b/fighters/master/src/acmd/other.rs index b4c0ab2037..c2d0a2ed77 100644 --- a/fighters/master/src/acmd/other.rs +++ b/fighters/master/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_master_rnd_futtobi01"), Hash40::new("seq_master_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_master_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_master_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/metaknight/src/acmd/other.rs b/fighters/metaknight/src/acmd/other.rs index fc45f98b6b..d20f48f2b8 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_metaknight_rnd_futtobi01"), Hash40::new("seq_metaknight_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_metaknight_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_metaknight_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); diff --git a/fighters/metaknight/src/acmd/specials.rs b/fighters/metaknight/src/acmd/specials.rs index b255951d9d..ebef13d0b0 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -153,8 +153,8 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { frame(lua_state, 9.0); if is_excute(agent) { if agent.is_stick_backward() { - PostureModule::reverse_lr(agent.module_accessor); - PostureModule::update_rot_y_lr(agent.module_accessor); + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -197,7 +197,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, @@ -225,8 +225,8 @@ unsafe extern "C" fn game_specialhiloop(agent: &mut L2CAgentBase) { frame(lua_state, 2.0); if is_excute(agent) { if agent.is_stick_backward() { - PostureModule::reverse_lr(agent.module_accessor); - PostureModule::update_rot_y_lr(agent.module_accessor); + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } ATTACK(agent, 0, 0, Hash40::new("top"), 9.0, 86, 120, 125, 0, 4.0, 0.0, 0.0, 6.0, Some(0.0), Some(12.0), Some(8.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("top"), 9.0, 88, 120, 125, 0, 4.0, 0.0, 0.0, 12.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); @@ -272,7 +272,7 @@ unsafe extern "C" fn game_specialhiloop(agent: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = WorkModule::get_param_float( boma, diff --git a/fighters/metaknight/src/acmd/tilts.rs b/fighters/metaknight/src/acmd/tilts.rs index b485a9fa5b..52d4f11ae7 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -46,7 +46,7 @@ unsafe extern "C" fn game_attacks3s2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - KineticModule::clear_speed_energy_id(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_MOTION); + KineticModule::clear_speed_energy_id(boma, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } frame(lua_state, 2.0); if is_excute(agent) { diff --git a/fighters/mewtwo/src/acmd/aerials.rs b/fighters/mewtwo/src/acmd/aerials.rs index 2c81b7473d..13adb0f734 100644 --- a/fighters/mewtwo/src/acmd/aerials.rs +++ b/fighters/mewtwo/src/acmd/aerials.rs @@ -68,6 +68,7 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_pk_hand"), Hash40::new("mewtwo_pk_hand"), Hash40::new("haver"), 1.2, 0, 1.8, 0, 0, 0, 0.55, true, *EF_FLIP_YZ); @@ -84,7 +85,7 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { } frame(lua_state, 10.0); if is_excute(agent) { - EffectModule::kill_kind(agent.module_accessor, Hash40::new("mewtwo_pk_attack_g"), true, true); + EffectModule::kill_kind(boma, Hash40::new("mewtwo_pk_attack_g"), true, true); } } @@ -125,7 +126,7 @@ unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 13.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 13, -6.2, 180, 35, 90, 0.98, true, *EF_FLIP_YZ), @@ -197,7 +198,7 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 10.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), -1.5, 8.6, -1.8, 0, 9, 85, 1.08, true, *EF_FLIP_YZ), diff --git a/fighters/mewtwo/src/acmd/other.rs b/fighters/mewtwo/src/acmd/other.rs index 52cc7b7ff2..8b001f08b7 100644 --- a/fighters/mewtwo/src/acmd/other.rs +++ b/fighters/mewtwo/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_mewtwo_rnd_futtobi01"), Hash40::new("seq_mewtwo_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_mewtwo_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/mewtwo/src/acmd/specials.rs b/fighters/mewtwo/src/acmd/specials.rs index 93a43e7c8a..5e2908a612 100644 --- a/fighters/mewtwo/src/acmd/specials.rs +++ b/fighters/mewtwo/src/acmd/specials.rs @@ -68,8 +68,9 @@ unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_specialhistart(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { - GroundModule::set_correct(agent.module_accessor, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); + GroundModule::set_correct(boma, app::GroundCorrectKind(*GROUND_CORRECT_KIND_GROUND_CLIFF_STOP)); } } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index b5ceb679e6..2fc7c8d210 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -34,7 +34,7 @@ unsafe extern "C" fn effect_attacks3(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 8.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 8.0, 6.2, 0, -85, -15.3, 1, true, *EF_FLIP_YZ), @@ -105,7 +105,7 @@ unsafe extern "C" fn effect_attacks3hi(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 8.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 11.0, 6.4, -34, -72, 49.6, 1, true, *EF_FLIP_YZ), @@ -177,7 +177,7 @@ unsafe extern "C" fn effect_attacks3lw(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 8.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 2, 5, 6.5, 82, -85, -95.5, 1, true, *EF_FLIP_YZ), @@ -259,7 +259,7 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 14, 1.5, 0, 5, 90, 1, true, *EF_FLIP_YZ), @@ -306,7 +306,7 @@ unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - let color = WorkModule::get_int(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); + let color = WorkModule::get_int(boma, *FIGHTER_INSTANCE_WORK_ID_INT_COLOR); match color { 0 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("mewtwo_tail_attack_a_01"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), 1 => EFFECT_FOLLOW_FLIP(agent, Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("mewtwo_tail_attack_a_02"), Hash40::new("top"), 0, 5, 4.5, 0, -70, 190, 1.0, true, *EF_FLIP_YZ), diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index cbf70c04ac..25d4483c7c 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_miifighter_rnd_futtobi01"), Hash40::new("seq_miifighter_rnd_futtobi02")); } } @@ -55,7 +55,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miifighter_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/miifighter/src/acmd/specials/special_hi.rs b/fighters/miifighter/src/acmd/specials/special_hi.rs index a7b1caa895..e914fdc400 100644 --- a/fighters/miifighter/src/acmd/specials/special_hi.rs +++ b/fighters/miifighter/src/acmd/specials/special_hi.rs @@ -40,8 +40,8 @@ unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 8.5, 11.0, 3.0); if is_excute(agent) { if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) && agent.is_stick_backward() { - PostureModule::reverse_lr(agent.module_accessor); - PostureModule::update_rot_y_lr(agent.module_accessor); + PostureModule::reverse_lr(boma); + PostureModule::update_rot_y_lr(boma); } HitModule::set_status_all(boma, HitStatus(*HIT_STATUS_NORMAL), 0); ATTACK(agent, 0, 0, Hash40::new("legl"), 8.0, 45, 80, 0, 40, 3.0, 2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); @@ -62,7 +62,7 @@ unsafe extern "C" fn game_specialhi12(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_MOVE_TRANS); WorkModule::on_flag(boma, *FIGHTER_STATUS_SUPER_JUMP_PUNCH_FLAG_CHANGE_KINE); KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); let fall_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_x_mul"); let fall_acl_y_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_flash_kick.fall_acl_y_mul"); sv_kinetic_energy!(set_stable_speed, agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * fall_x_mul, 0.0); diff --git a/fighters/miigunner/src/acmd/aerials.rs b/fighters/miigunner/src/acmd/aerials.rs index d23df70cf2..7cde47cf4b 100644 --- a/fighters/miigunner/src/acmd/aerials.rs +++ b/fighters/miigunner/src/acmd/aerials.rs @@ -117,7 +117,7 @@ unsafe extern "C" fn game_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_f"), 0); + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_f"), 0); if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } @@ -239,7 +239,7 @@ unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_b"), 0); + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_b"), 0); if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { FT_MOTION_RATE(agent, (landing_frame + 3.0)/landing_frame); } @@ -423,7 +423,7 @@ unsafe extern "C" fn game_landingairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let landing_frame = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_hi"), 0); + let landing_frame = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_hi"), 0); if VarModule::is_flag(agent.battle_object, vars::miigunner::status::BOOSTED_AERIAL) { FT_MOTION_RATE(agent, (landing_frame + 5.0)/landing_frame); } diff --git a/fighters/miigunner/src/acmd/other.rs b/fighters/miigunner/src/acmd/other.rs index db59a08e34..a4698c6fc3 100644 --- a/fighters/miigunner/src/acmd/other.rs +++ b/fighters/miigunner/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_miigunner_rnd_futtobi01"), Hash40::new("seq_miigunner_rnd_futtobi02")); } } @@ -57,7 +57,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miigunner_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miigunner_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 277e5ab09c..c037e74160 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_miiswordsman_rnd_futtobi01"), Hash40::new("seq_miiswordsman_rnd_futtobi02")); } } @@ -56,7 +56,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_miiswordsman_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_miiswordsman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/miiswordsman/src/acmd/specials/special_hi.rs b/fighters/miiswordsman/src/acmd/specials/special_hi.rs index 4a5e85281e..5a84f9b33a 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_hi.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_hi.rs @@ -197,8 +197,8 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { } if is_excute(agent) { - let h_speed = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; - let v_speed = KineticModule::get_sum_speed_y(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let h_speed = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; + let v_speed = KineticModule::get_sum_speed_y(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN) as f32; //let angle_calc = v_speed / h_speed as f32; //println!("Angle: {}", angle_calc); @@ -321,7 +321,7 @@ unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { let start_x_mul = ParamModule::get_float(agent.battle_object, ParamType::Agent, "param_special_hi3.start_x_mul"); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); + KineticModule::mul_speed(boma, &Vector3f{x: start_x_mul, y: 1.0, z: 1.0}, *FIGHTER_KINETIC_ENERGY_ID_STOP); } frame(lua_state, 4.0); if is_excute(agent) { diff --git a/fighters/miiswordsman/src/acmd/specials/special_n.rs b/fighters/miiswordsman/src/acmd/specials/special_n.rs index 6476c0b3ae..0f43a6be79 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_n.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_n.rs @@ -37,11 +37,11 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_MOTION); } else { - let x_vel = KineticModule::get_sum_speed_x(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); + let x_vel = KineticModule::get_sum_speed_x(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN); agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, ENERGY_CONTROLLER_RESET_TYPE_FALL_ADJUST, x_vel * 0.6, 0.0, 0.0, 0.0, 0.0); app::sv_kinetic_energy::reset_energy(lua_state); - let air_speed_x_stable = WorkModule::get_param_float(agent.module_accessor, hash40("air_speed_x_stable"), 0); + let air_speed_x_stable = WorkModule::get_param_float(boma, hash40("air_speed_x_stable"), 0); agent.clear_lua_stack(); lua_args!(agent, FIGHTER_KINETIC_ENERGY_ID_CONTROL, air_speed_x_stable * 0.5, 100.0); app::sv_kinetic_energy::set_stable_speed(lua_state); diff --git a/fighters/miiswordsman/src/acmd/specials/special_s.rs b/fighters/miiswordsman/src/acmd/specials/special_s.rs index b267a25e6a..e55427ce2b 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_s.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_s.rs @@ -69,10 +69,10 @@ unsafe fn game_specials1hit(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specials2dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - + let boma = agent.boma(); frame(lua_state, 10.0); if is_excute(agent) { - MotionModule::set_rate(agent.module_accessor, 0.5); + MotionModule::set_rate(boma, 0.5); } } @@ -154,9 +154,10 @@ unsafe extern "C" fn effect_specials2attack(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairs2dash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); if is_excute(agent) { - MotionModule::set_rate(agent.module_accessor, 0.5); + MotionModule::set_rate(boma, 0.5); } } diff --git a/fighters/miiswordsman/src/lightshuriken/acmd.rs b/fighters/miiswordsman/src/lightshuriken/acmd.rs index a6e0900d21..2efba1a532 100644 --- a/fighters/miiswordsman/src/lightshuriken/acmd.rs +++ b/fighters/miiswordsman/src/lightshuriken/acmd.rs @@ -30,8 +30,8 @@ unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { EffectModule::set_alpha(boma, wave_2, 0.4); //Ray check here is used for checking if you're on the ground. Unfortunately is_touch and is_wall_touch_line didnt work for this. Sorry! if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); @@ -48,8 +48,8 @@ unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { EffectModule::set_rate(boma, wave_3, 0.7); EffectModule::set_alpha(boma, wave_3, 0.4); if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); @@ -61,8 +61,8 @@ unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { if is_excute(agent) { EffectModule::set_rate(boma, wave_3, 0.000001); if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); @@ -74,8 +74,8 @@ unsafe extern "C" fn effect_fly(agent: &mut L2CAgentBase) { wait(lua_state, 4.0); if is_excute(agent) { if GroundModule::ray_check( - agent.module_accessor, - &Vector2f{ x: PostureModule::pos_x(agent.module_accessor), y: PostureModule::pos_y(agent.module_accessor)}, + boma, + &Vector2f{ x: PostureModule::pos_x(boma), y: PostureModule::pos_y(boma)}, &Vector2f{ x: 0.0, y: -7.0}, true ) == 1 { FOOT_EFFECT(agent, Hash40::new("sys_magicball_aura"), Hash40::new("top"), 4, -0.5, 0, 0, 0, 0, 5.5, 0, 0, 0, 0, 0, 0, false); diff --git a/fighters/murabito/src/acmd/other.rs b/fighters/murabito/src/acmd/other.rs index 652f26cce4..9f8660ed5a 100644 --- a/fighters/murabito/src/acmd/other.rs +++ b/fighters/murabito/src/acmd/other.rs @@ -14,7 +14,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_murabito_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_murabito_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/ness/src/acmd/other.rs b/fighters/ness/src/acmd/other.rs index 086e445640..f22d94e6d6 100644 --- a/fighters/ness/src/acmd/other.rs +++ b/fighters/ness/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 10) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ness_rnd_futtobi01"), Hash40::new("seq_ness_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ness_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ness_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/ness/src/acmd/smashes.rs b/fighters/ness/src/acmd/smashes.rs index 93fa2154c0..63dbe7b783 100644 --- a/fighters/ness/src/acmd/smashes.rs +++ b/fighters/ness/src/acmd/smashes.rs @@ -54,7 +54,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { frame(lua_state, 12.0); FT_MOTION_RATE(agent, 1); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 56.0); if is_excute(agent) { @@ -94,21 +94,21 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, true, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } frame(lua_state, 6.0); if is_excute(agent) { - ArticleModule::shoot(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); + ArticleModule::shoot(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, /*Flag*/ *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 54.0); if is_excute(agent) { - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - ArticleModule::remove_exist(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(boma, *FIGHTER_NESS_GENERATE_ARTICLE_YOYO_HEAD, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index 50be601c15..f80f1cf089 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -34,7 +34,7 @@ unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1); frame(lua_state, 21.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); //WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_NESS_STATUS_SPECIAL_S_FLAG_SHOOT); } FT_MOTION_RATE(agent, 1); @@ -49,7 +49,7 @@ unsafe extern "C" fn game_specialairs (agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1); frame(lua_state, 21.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_NESS_GENERATE_ARTICLE_PK_FIRE, false, 0); //WorkModule::on_flag(fighter.module_accessor, /*Flag*/ *FIGHTER_NESS_STATUS_SPECIAL_S_FLAG_SHOOT); } FT_MOTION_RATE(agent, 1); diff --git a/fighters/ness/src/yoyohead/acmd.rs b/fighters/ness/src/yoyohead/acmd.rs index 69c2c04c37..4384777ef8 100644 --- a/fighters/ness/src/yoyohead/acmd.rs +++ b/fighters/ness/src/yoyohead/acmd.rs @@ -16,7 +16,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } frame(lua_state, 34.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 37.0); } @@ -27,16 +27,16 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { frame(lua_state, 11.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("attach"), 1.0, 367, 100, 12, 0, 4.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 15.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 16.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 28, 80, 0, 60, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } // frame(lua_state, 18.0); // if is_excute(fighter) { @@ -45,7 +45,7 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { frame(lua_state, 23.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("attach"), 10.0, 33, 80, 0, 50, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - AttackModule::set_attack_height_all(agent.module_accessor, AttackHeight(*ATTACK_HEIGHT_LOW), false); + AttackModule::set_attack_height_all(boma, AttackHeight(*ATTACK_HEIGHT_LOW), false); } // frame(lua_state, 25.0); // if is_excute(fighter) { @@ -60,7 +60,7 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { // } frame(lua_state, 32.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 40.0); } diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index 6d3a9d1784..f1cac837f7 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -15,7 +15,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_packun_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_packun_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); diff --git a/fighters/packun/src/acmd/tilts.rs b/fighters/packun/src/acmd/tilts.rs index dc8df07083..6bf5b15f91 100644 --- a/fighters/packun/src/acmd/tilts.rs +++ b/fighters/packun/src/acmd/tilts.rs @@ -112,7 +112,7 @@ unsafe extern "C" fn expression_attacks3a(agent: &mut L2CAgentBase) { frame(lua_state, 8.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } diff --git a/fighters/pacman/src/acmd/other.rs b/fighters/pacman/src/acmd/other.rs index 5fb4ce1104..76b6d22ac2 100644 --- a/fighters/pacman/src/acmd/other.rs +++ b/fighters/pacman/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pacman_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pacman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/palutena/src/acmd/other.rs b/fighters/palutena/src/acmd/other.rs index 05b48cf3cc..844c7a39af 100644 --- a/fighters/palutena/src/acmd/other.rs +++ b/fighters/palutena/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_palutena_rnd_futtobi01"), Hash40::new("seq_palutena_rnd_futtobi02")); } } @@ -56,7 +56,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_palutena_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_palutena_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/palutena/src/acmd/specials/special_n_g.rs b/fighters/palutena/src/acmd/specials/special_n_g.rs index 87b954c558..6ae5e78cf9 100644 --- a/fighters/palutena/src/acmd/specials/special_n_g.rs +++ b/fighters/palutena/src/acmd/specials/special_n_g.rs @@ -92,7 +92,7 @@ unsafe extern "C" fn expression_specialng(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 18.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_27_spinslash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 20.0); if is_excute(agent) { diff --git a/fighters/palutena/src/acmd/specials/special_n_o.rs b/fighters/palutena/src/acmd/specials/special_n_o.rs index 0e96b431c6..801a29f3f1 100644 --- a/fighters/palutena/src/acmd/specials/special_n_o.rs +++ b/fighters/palutena/src/acmd/specials/special_n_o.rs @@ -7,7 +7,7 @@ unsafe extern "C" fn game_specialno(agent: &mut L2CAgentBase) { if is_excute(agent) { MeterModule::drain(boma.object(), 2); VarModule::on_flag(boma.object(), vars::palutena::instance::FLUSH); - PostureModule::set_lr(boma, PostureModule::lr(agent.module_accessor)); + PostureModule::set_lr(boma, PostureModule::lr(boma)); PostureModule::update_rot_y_lr(boma); } frame(lua_state, 13.0); diff --git a/fighters/peach/src/acmd/other.rs b/fighters/peach/src/acmd/other.rs index f4a8ca2374..df8e2be8ae 100644 --- a/fighters/peach/src/acmd/other.rs +++ b/fighters/peach/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_peach_rnd_futtobi01"), Hash40::new("seq_peach_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_peach_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_peach_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/peach/src/acmd/specials.rs b/fighters/peach/src/acmd/specials.rs index 7deecb5704..c7c19b2b4f 100644 --- a/fighters/peach/src/acmd/specials.rs +++ b/fighters/peach/src/acmd/specials.rs @@ -9,7 +9,7 @@ unsafe extern "C" fn game_specialshitend(agent: &mut L2CAgentBase) { frame(lua_state, 5.0); if is_excute(agent) { AttackModule::clear_all(boma); - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_SHIELD) { + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_SHIELD) { KineticModule::unable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } @@ -189,7 +189,7 @@ unsafe extern "C" fn sound_speciallw(agent: &mut L2CAgentBase) { if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_peach_special_l01")); if agent.get_int(*FIGHTER_PEACH_STATUS_SPECIAL_LW_WORK_INT_UNIQ_ITEM_KIND) != *ITEM_KIND_NONE - && ItemModule::is_have_item(agent.module_accessor, 0) { + && ItemModule::is_have_item(boma, 0) { PLAY_SE(agent, Hash40::new("vc_peach_appeal01")); } } diff --git a/fighters/pfushigisou/src/acmd/other.rs b/fighters/pfushigisou/src/acmd/other.rs index 6439f3bd16..1d6a1c7d47 100644 --- a/fighters/pfushigisou/src/acmd/other.rs +++ b/fighters/pfushigisou/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pfushigisou_rnd_futtobi01"), Hash40::new("seq_pfushigisou_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pfushigisou_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } frame(lua_state, 11.0); diff --git a/fighters/pichu/src/acmd/other.rs b/fighters/pichu/src/acmd/other.rs index f718b4e4b5..cdd9f1bca1 100644 --- a/fighters/pichu/src/acmd/other.rs +++ b/fighters/pichu/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pichu_rnd_futtobi01"), Hash40::new("seq_pichu_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pichu_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pichu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); diff --git a/fighters/pickel/src/acmd/other.rs b/fighters/pickel/src/acmd/other.rs index 00e457646f..cac66ddc8b 100644 --- a/fighters/pickel/src/acmd/other.rs +++ b/fighters/pickel/src/acmd/other.rs @@ -19,7 +19,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pickel_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pickel_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/pickel/src/forge/acmd.rs b/fighters/pickel/src/forge/acmd.rs index 13b158925f..e84f40db5f 100644 --- a/fighters/pickel/src/forge/acmd.rs +++ b/fighters/pickel/src/forge/acmd.rs @@ -16,7 +16,7 @@ unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_fallattack(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; let pickel = utils::util::get_battle_object_from_id(owner_id); let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); if is_excute(agent) { @@ -44,7 +44,7 @@ unsafe extern "C" fn game_fallattack(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_fallattackride(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); - let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; let pickel = utils::util::get_battle_object_from_id(owner_id); let pickel_boma = &mut *(*pickel).module_accessor; let fall_distance = VarModule::get_float(pickel, vars::pickel::instance::FORGE_START_Y_POS) - PostureModule::pos_y(boma); diff --git a/fighters/pikachu/src/acmd/other.rs b/fighters/pikachu/src/acmd/other.rs index c692008036..00826f98b7 100644 --- a/fighters/pikachu/src/acmd/other.rs +++ b/fighters/pikachu/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pikachu_rnd_futtobi01"), Hash40::new("seq_pikachu_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pikachu_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pikachu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 15.0); diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index ee0ad8b72d..484591324c 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pikmin_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pikmin_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); diff --git a/fighters/pit/src/acmd/other.rs b/fighters/pit/src/acmd/other.rs index c68eb7d6b7..a7f5813598 100644 --- a/fighters/pit/src/acmd/other.rs +++ b/fighters/pit/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pit_rnd_futtobi01"), Hash40::new("seq_pit_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pit_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/pitb/src/acmd/other.rs b/fighters/pitb/src/acmd/other.rs index 2f69626846..19e1ffeef8 100644 --- a/fighters/pitb/src/acmd/other.rs +++ b/fighters/pitb/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pitb_rnd_futtobi01"), Hash40::new("seq_pitb_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pitb_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pitb_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/plizardon/src/acmd/other.rs b/fighters/plizardon/src/acmd/other.rs index b181458c3f..424429ab10 100644 --- a/fighters/plizardon/src/acmd/other.rs +++ b/fighters/plizardon/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_plizardon_rnd_futtobi01"), Hash40::new("seq_plizardon_rnd_futtobi02")); } } @@ -84,7 +84,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_plizardon_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_plizardon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); diff --git a/fighters/purin/src/acmd/other.rs b/fighters/purin/src/acmd/other.rs index 43743285d0..f1a348dc11 100644 --- a/fighters/purin/src/acmd/other.rs +++ b/fighters/purin/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_purin_rnd_futtobi01"), Hash40::new("seq_purin_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_purin_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_purin_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); diff --git a/fighters/pzenigame/src/acmd/other.rs b/fighters/pzenigame/src/acmd/other.rs index 39509d7cdf..e7cf7a982f 100644 --- a/fighters/pzenigame/src/acmd/other.rs +++ b/fighters/pzenigame/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_pzenigame_rnd_futtobi01"), Hash40::new("seq_pzenigame_rnd_futtobi02")); } } @@ -61,7 +61,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_pzenigame_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/reflet/src/acmd/ground.rs b/fighters/reflet/src/acmd/ground.rs index 75b6fcacd5..69eef10aa6 100644 --- a/fighters/reflet/src/acmd/ground.rs +++ b/fighters/reflet/src/acmd/ground.rs @@ -119,12 +119,13 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { } unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { + let boma = agent.boma(); for _ in 0..99 { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 3.0, false); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); wait_loop_clear(agent); } } @@ -132,9 +133,10 @@ unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } @@ -142,7 +144,7 @@ unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.1); frame(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index 62f099192e..d96e3303ec 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/reflet/src/thunder/acmd.rs b/fighters/reflet/src/thunder/acmd.rs index 986385c9ad..4bfacba53f 100644 --- a/fighters/reflet/src/thunder/acmd.rs +++ b/fighters/reflet/src/thunder/acmd.rs @@ -4,7 +4,7 @@ unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); AttackModule::enable_safe_pos(boma); } @@ -18,7 +18,7 @@ unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); diff --git a/fighters/ridley/src/acmd/other.rs b/fighters/ridley/src/acmd/other.rs index 42c5bbb596..59a5964173 100644 --- a/fighters/ridley/src/acmd/other.rs +++ b/fighters/ridley/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ridley_rnd_futtobi01"), Hash40::new("seq_ridley_rnd_futtobi02")); } } @@ -68,7 +68,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ridley_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ridley_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/ridley/src/acmd/specials.rs b/fighters/ridley/src/acmd/specials.rs index bd454aee31..8c87cd1843 100644 --- a/fighters/ridley/src/acmd/specials.rs +++ b/fighters/ridley/src/acmd/specials.rs @@ -107,7 +107,7 @@ unsafe extern "C" fn expression_specialnexplode(agent: &mut L2CAgentBase) { frame(lua_state, 18.0); if is_excute(agent) { RUMBLE_HIT(agent, Hash40::new("rbkind_attackl"), 0); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohit_explosion"), 0, false, 0); } } diff --git a/fighters/robot/src/acmd/aerials.rs b/fighters/robot/src/acmd/aerials.rs index d80e7a7c35..2b84c847dc 100644 --- a/fighters/robot/src/acmd/aerials.rs +++ b/fighters/robot/src/acmd/aerials.rs @@ -370,7 +370,7 @@ unsafe extern "C" fn game_landingairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let landing_frame_normal = WorkModule::get_param_float(agent.module_accessor, hash40("landing_attack_air_frame_lw"), 0); + let landing_frame_normal = WorkModule::get_param_float(boma, hash40("landing_attack_air_frame_lw"), 0); let landing_frame_boost = landing_frame_normal + 3.0; if VarModule::is_flag(agent.battle_object, vars::common::instance::IS_HEAVY_ATTACK) { FT_MOTION_RATE(agent, landing_frame_boost/landing_frame_normal); diff --git a/fighters/robot/src/acmd/other.rs b/fighters/robot/src/acmd/other.rs index 89155ac7fc..86402fc471 100644 --- a/fighters/robot/src/acmd/other.rs +++ b/fighters/robot/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_robot_rnd_futtobi01"), Hash40::new("seq_robot_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_robot_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_robot_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 10.0); diff --git a/fighters/robot/src/acmd/specials.rs b/fighters/robot/src/acmd/specials.rs index ff21273e5d..0f8bbc5f3b 100644 --- a/fighters/robot/src/acmd/specials.rs +++ b/fighters/robot/src/acmd/specials.rs @@ -14,7 +14,7 @@ unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 21.0); if is_excute(agent) { @@ -144,7 +144,7 @@ unsafe extern "C" fn game_specialshi(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 19.0); if is_excute(agent) { @@ -229,7 +229,7 @@ unsafe extern "C" fn game_specialslw(agent: &mut L2CAgentBase) { } frame(lua_state, 18.0); if is_excute(agent) { - VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(agent.module_accessor)); + VarModule::set_float(agent.battle_object, vars::robot::instance::STICK_ANGLE, ControlModule::get_stick_y(boma)); } frame(lua_state, 21.0); if is_excute(agent) { @@ -338,7 +338,7 @@ unsafe extern "C" fn game_specialhirise(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, vars::robot::status::HELD_BUTTON); + WorkModule::on_flag(boma, vars::robot::status::HELD_BUTTON); let mut workingDamage = robotFrames/3.5; if robotFrames <= 10.0 { MeterModule::drain_direct(agent.object(), 20.0); diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index 7dd71a47e1..8831d09f13 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -3,9 +3,10 @@ use super::*; unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 7.0); if is_excute(agent) { @@ -21,11 +22,11 @@ unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { } frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 35.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -52,14 +53,15 @@ unsafe extern "C" fn sound_attackairnmelee(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attackairnmelee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } frame(lua_state, 5.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); if is_excute(agent) { diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index f5fc4984ba..1c62563b23 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -3,25 +3,26 @@ use super::*; unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 90, 15, 0, 30, 3.0, 0.0, 8.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 100, 15, 0, 30, 3.0, 0.0, 8.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA_d, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); ATTACK(agent, 2, 0, Hash40::new("top"), 2.0, 361, 30, 0, 20, 2.5, 0.0, 3.3, 4.5, Some(0.0), Some(3.3), Some(8.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); } frame(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 11.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } // frame(lua_state, 20.0); // if is_excute(agent) { - // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } @@ -48,15 +49,16 @@ unsafe extern "C" fn sound_attack11melee(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attack11melee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - AttackModule::set_attack_reference_joint_id(agent.module_accessor, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); + AttackModule::set_attack_reference_joint_id(boma, Hash40::new("top"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_NONE), AttackDirectionAxis(*ATTACK_DIRECTION_NONE)); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); } frame(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 4, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); if is_excute(agent) { @@ -66,24 +68,25 @@ unsafe extern "C" fn expression_attack11melee(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 100, 15, 0, 30, 4.0, 0.0, 7.0, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 80, 15, 0, 30, 3.0, 0.0, 7.0, 5.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 0, 2.0, false); - AttackModule::set_add_reaction_frame_revised(agent.module_accessor, 1, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 0, 2.0, false); + AttackModule::set_add_reaction_frame_revised(boma, 1, 2.0, false); } frame(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 11.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } // frame(lua_state, 20.0); // if is_excute(agent) { - // WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); + // WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); // } } @@ -106,6 +109,7 @@ unsafe extern "C" fn sound_attack12(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -117,7 +121,7 @@ unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { } frame(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 7.0); if is_excute(agent) { @@ -131,13 +135,14 @@ unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 74, 70, 0, 70, 4.0, 0.0, 6.0, 4.0, Some(0.0), Some(13.0), Some(4.0), 1.2, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 13.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } @@ -176,6 +181,7 @@ unsafe extern "C" fn sound_attack13(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -183,7 +189,7 @@ unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 10.0); if is_excute(agent) { @@ -191,7 +197,7 @@ unsafe extern "C" fn expression_attack13(agent: &mut L2CAgentBase) { } frame(lua_state, 24.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 0bddbe5af5..9b182b3e33 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -16,7 +16,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_rockman_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_rockman_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 6.0); diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index 444cb966c6..1c83d821d0 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -3,9 +3,10 @@ use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); @@ -21,7 +22,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } @@ -51,22 +52,23 @@ unsafe extern "C" fn sound_attacks4(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitl"), 0, false, @@ -97,9 +99,10 @@ unsafe extern "C" fn expression_attacks4(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 15.0); if is_excute(agent) { @@ -108,11 +111,11 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 16.0); if is_excute(agent) { - AttackModule::clear(agent.module_accessor, 1, false); + AttackModule::clear(boma, 1, false); } frame(lua_state, 19.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } @@ -146,22 +149,23 @@ unsafe extern "C" fn sound_attacks4hi(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 15.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitl"), 0, false, @@ -185,9 +189,10 @@ unsafe extern "C" fn expression_attacks4hi(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 12.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 14.0); FT_MOTION_RATE(agent, 2.0); @@ -203,7 +208,7 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { } frame(lua_state, 25.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } @@ -230,22 +235,23 @@ unsafe extern "C" fn sound_attacks4lw(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 10); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 12.0); execute(lua_state, 12.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 14.0); if is_excute(agent) { ControlModule::set_rumble( - agent.module_accessor, + boma, Hash40::new("rbkind_nohitm"), 0, false, @@ -295,15 +301,16 @@ unsafe extern "C" fn sound_attacks4charge(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attacks4charge(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { physics!(agent, *MA_MSC_CMD_PHYSICS_START_CHARGE, 0.8, 0.8, -1, 0.8, 0.8, -1, Hash40::new("invalid")); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold1"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 61.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_smashhold2"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } @@ -344,7 +351,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index d838d71b81..3b4756550d 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -61,12 +61,13 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_busterchargeshot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); FT_MOTION_RATE(agent, 1.0 / 7.0); frame(lua_state, 18.0); FT_MOTION_RATE(agent, 1.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CHARGESHOT, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_CHARGESHOT, false, -1); VarModule::off_flag(agent.battle_object, vars::rockman::status::CHARGE_SHOT_KEEP_CHARGE); } } @@ -100,23 +101,24 @@ unsafe extern "C" fn sound_busterchargeshot(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_busterchargeshot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_ROCKBUSTER, 5); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_RIGHT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 0); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 18.0); - if WorkModule::get_float(agent.module_accessor, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE) < 1.0 { + if WorkModule::get_float(boma, *FIGHTER_STATUS_WORK_ID_FLOAT_RESERVE_HOLD_RATE) < 1.0 { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_S); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beams"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } else { if is_excute(agent) { QUAKE(agent, *CAMERA_QUAKE_KIND_M); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_beaml"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } } @@ -239,20 +241,22 @@ unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 5.0); frame(lua_state, 4.0); if is_excute(agent) { - ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); + ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } FT_MOTION_RATE(agent, 1.0); } unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 5.0); frame(lua_state, 4.0); if is_excute(agent) { - ArticleModule::generate_article_enable(agent.module_accessor, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); + ArticleModule::generate_article_enable(boma, *FIGHTER_ROCKMAN_GENERATE_ARTICLE_LEAFSHIELD, false, -1); } FT_MOTION_RATE(agent, 1.0); } diff --git a/fighters/rockman/src/acmd/tilts.rs b/fighters/rockman/src/acmd/tilts.rs index 3883853e1a..ca0b4f89fc 100644 --- a/fighters/rockman/src/acmd/tilts.rs +++ b/fighters/rockman/src/acmd/tilts.rs @@ -2,6 +2,7 @@ use super::*; unsafe extern "C" fn game_attacks3melee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 13.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handl"), 14.0, 65, 70, 0, 55, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 4, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_PUNCH); @@ -18,7 +19,7 @@ unsafe extern "C" fn game_attacks3melee(agent: &mut L2CAgentBase) { frame(lua_state, 21.0); FT_MOTION_RATE_RANGE(agent, 21.0, 53.0, 26.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 53.0); FT_MOTION_RATE(agent, 1.0); @@ -62,6 +63,7 @@ unsafe extern "C" fn sound_attacks3melee(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_L); notify_event_msc_cmd!(agent, Hash40::new_raw(0x1f5b14bb65), *FIGHTER_ROCKMAN_ARM_LEFT, *FIGHTER_ROCKMAN_ARMFORM_HAND, 5); @@ -69,7 +71,7 @@ unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { } frame(lua_state, 11.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 13.0); if is_excute(agent) { @@ -78,7 +80,7 @@ unsafe extern "C" fn expression_attacks3melee(agent: &mut L2CAgentBase) { frame(lua_state, 24.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 5); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands_hv"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/rockman/src/chargeshot/acmd.rs b/fighters/rockman/src/chargeshot/acmd.rs index be300ea913..a334dec74d 100644 --- a/fighters/rockman/src/chargeshot/acmd.rs +++ b/fighters/rockman/src/chargeshot/acmd.rs @@ -1,8 +1,9 @@ use super::*; unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { - let is_charge_max = 1.0 <= WorkModule::get_float(agent.module_accessor, *WEAPON_ROCKMAN_CHARGESHOT_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); + let is_charge_max = 1.0 <= WorkModule::get_float(boma, *WEAPON_ROCKMAN_CHARGESHOT_INSTANCE_WORK_ID_FLOAT_HOLD_RATE); let damage; let bkb; let kbg; @@ -18,7 +19,7 @@ unsafe extern "C" fn game_regular(agent: &mut L2CAgentBase) { } ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, bkb, 2.6, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY); ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.32); - AttackModule::enable_safe_pos(agent.module_accessor); + AttackModule::enable_safe_pos(boma); } } diff --git a/fighters/rockman/src/leafshield/acmd.rs b/fighters/rockman/src/leafshield/acmd.rs index cd5cf1dd09..6b1b89c4d9 100644 --- a/fighters/rockman/src/leafshield/acmd.rs +++ b/fighters/rockman/src/leafshield/acmd.rs @@ -1,54 +1,57 @@ use super::*; unsafe extern "C" fn game_start(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } } unsafe extern "C" fn game_shield(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 1.5, 361, 20, 0, 35, 1.3, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 11, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } } unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { + let boma = agent.boma(); FT_MOTION_RATE(agent, 4.0 / 3.0); if is_excute(agent) { - if !WorkModule::is_flag(agent.module_accessor, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 + if !WorkModule::is_flag(boma, 0x20000006) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_0 ATTACK(agent, 0, 0, Hash40::new("leafshield1"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 + if !WorkModule::is_flag(boma, 0x20000007) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_1 ATTACK(agent, 1, 0, Hash40::new("leafshield2"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 + if !WorkModule::is_flag(boma, 0x20000008) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_2 ATTACK(agent, 2, 0, Hash40::new("leafshield3"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } - if !WorkModule::is_flag(agent.module_accessor, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 + if !WorkModule::is_flag(boma, 0x20000009) { // WEAPON_ROCKMAN_LEAFSHIELD_INSTANCE_WORK_ID_FLAG_DEAD_3 ATTACK(agent, 3, 0, Hash40::new("leafshield4"), 3.8, 65, 70, 0, 50, 1.8, -1.0, -0.5, 0.0, Some(1.0), Some(0.5), Some(0.0), 0.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 11, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_NONE); } } diff --git a/fighters/rosetta/src/acmd/other.rs b/fighters/rosetta/src/acmd/other.rs index ce127af451..c0b798f1d9 100644 --- a/fighters/rosetta/src/acmd/other.rs +++ b/fighters/rosetta/src/acmd/other.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -31,7 +31,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_rosetta_rnd_futtobi01"), Hash40::new("seq_rosetta_rnd_futtobi02")); } } @@ -46,7 +46,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_rosetta_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/roy/src/acmd/other.rs b/fighters/roy/src/acmd/other.rs index bffc294d7b..4e6725fee7 100644 --- a/fighters/roy/src/acmd/other.rs +++ b/fighters/roy/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_roy_rnd_futtobi01"), Hash40::new("seq_roy_rnd_futtobi02")); } } @@ -64,7 +64,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_roy_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_roy_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/ryu/src/acmd/finals.rs b/fighters/ryu/src/acmd/finals.rs index edf297bca7..3310b27a98 100644 --- a/fighters/ryu/src/acmd/finals.rs +++ b/fighters/ryu/src/acmd/finals.rs @@ -2,12 +2,13 @@ use super::*; unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { CHECK_VALID_FINAL_START_CAMERA(agent, 0, 7, 20, 0, 0, 0); SLOW_OPPONENT(agent, 80.0, 50.0); } - if !WorkModule::is_flag(agent.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { + if !WorkModule::is_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_DISABLE_FINAL_START_CAMERA) { frame(lua_state, 10.0); if is_excute(agent) { FT_SET_FINAL_FEAR_FACE(agent, 40); @@ -27,99 +28,101 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { frame(lua_state, 30.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.0, 60, 90, 0, 50, 8.0, 0.0, 5.0, 8.0, Some(0.0), Some(9.5), Some(8.0), 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_paralyze"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); + AttackModule::set_no_dead_all(boma, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 50.0); if is_excute(agent) { - SlowModule::set_whole(agent.module_accessor, 2, 0); - if AttackModule::is_infliction_status(agent.module_accessor, *COLLISION_KIND_MASK_HIT) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); + SlowModule::set_whole(boma, 2, 0); + if AttackModule::is_infliction_status(boma, *COLLISION_KIND_MASK_HIT) { + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_LOCK_ATTACK); } ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 5.0, 10.0, Some(0.0), Some(9.5), Some(10.0), 2.6, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL01, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); - SlowModule::clear_whole(agent.module_accessor); + AttackModule::clear_all(boma); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_BRANCH_HIT); + SlowModule::clear_whole(boma); } frame(lua_state, 52.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("handr"), 2.0, 367, 100, 120, 0, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 2, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } wait(lua_state, 10.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 0, Hash40::new("handr"), 5.0, 80, 120, 0, 40, 4.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 0.1, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_PUNCH, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); + AttackModule::set_no_dead_all(boma, true, false); } wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } unsafe extern "C" fn game_finalhit(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - SlowModule::set_whole(agent.module_accessor, 2, 0); + SlowModule::set_whole(boma, 2, 0); } frame(lua_state, 4.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 95, 0, 50, 8.0, 0.0, 12.0, 10.0, None, None, None, 2.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL02, *ATTACK_REGION_PUNCH); - AttackModule::set_no_dead_all(agent.module_accessor, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); + AttackModule::set_no_dead_all(boma, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); CAM_ZOOM_OUT(agent); CAM_ZOOM_IN_arg5(agent, 3.0, 0.0, 1.9, 0.0, 0.0); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_2, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_2, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 7.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_REMOVE_FINAL_AURA); CAM_ZOOM_OUT(agent); CAM_ZOOM_IN_arg5(agent, 5.0, 0.0, 2.1, 0.0, 0.0); } frame(lua_state, 9.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END_SET_PARAM); } frame(lua_state, 10.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_ATTACK_END); ATTACK(agent, 0, 0, Hash40::new("top"), 7.1, 80, 126, 0, 82, 10.0, 0.0, 20.0, 8.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_FINAL03, *ATTACK_REGION_PUNCH); - AttackModule::set_force_reaction(agent.module_accessor, 0, true, false); - AttackModule::set_damage_shake_scale(agent.module_accessor, 0.18); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_3, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + AttackModule::set_force_reaction(boma, 0, true, false); + AttackModule::set_damage_shake_scale(boma, 0.18); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_3, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } wait(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); - SlowModule::clear_whole(agent.module_accessor); + AttackModule::clear_all(boma); + SlowModule::clear_whole(boma); } frame(lua_state, 18.0); if is_excute(agent) { CAM_ZOOM_OUT(agent); - WorkModule::set_int(agent.module_accessor, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); + WorkModule::set_int(boma, *FIGHTER_RYU_FINAL_CAMERA_OFFSET_RETURN, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_INT_CAMERA_OFFSET_TYPE); + WorkModule::on_flag(boma, *FIGHTER_RYU_STATUS_WORK_ID_FINAL_FLAG_CAMERA_OFFSET); } } unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); @@ -128,12 +131,12 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } frame(lua_state, 90.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 6.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/ryu/src/acmd/other.rs b/fighters/ryu/src/acmd/other.rs index 7d9d9e778c..6204e2f4b9 100644 --- a/fighters/ryu/src/acmd/other.rs +++ b/fighters/ryu/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_ryu_rnd_futtobi01"), Hash40::new("seq_ryu_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_ryu_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_ryu_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/ryu/src/acmd/specials/special_command.rs b/fighters/ryu/src/acmd/specials/special_command.rs index 01f40bc355..9a9cf2e0b7 100644 --- a/fighters/ryu/src/acmd/specials/special_command.rs +++ b/fighters/ryu/src/acmd/specials/special_command.rs @@ -2,6 +2,7 @@ use super::*; unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); let strength = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH); let add_startup = if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { @@ -33,7 +34,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { }; if is_excute(agent) { sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, speed); - JostleModule::set_team(agent.module_accessor, 1); + JostleModule::set_team(boma, 1); // nothing hitboxes here for interpolation ATTACK(agent, 0, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, -1.5, -1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); ATTACK(agent, 1, 0, Hash40::new("kneel"), 0.0, 361, 0, 0, 0, 0.0, -6.2, -1.0, -1.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_none"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); @@ -41,7 +42,7 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + WorkModule::on_flag(boma, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); MeterModule::watch_damage(agent.battle_object, true); if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::watch_damage(agent.battle_object, false); @@ -70,13 +71,13 @@ unsafe extern "C" fn game_attackcommand4(agent: &mut L2CAgentBase) { FT_MOTION_RATE_RANGE(agent, 20.0, 46.0, recovery); if is_excute(agent) { sv_kinetic_energy!(set_speed_mul, agent, FIGHTER_KINETIC_ENERGY_ID_MOTION, 1.0); - JostleModule::set_team(agent.module_accessor, 0); + JostleModule::set_team(boma, 0); MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 33.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); + WorkModule::off_flag(boma, *FIGHTER_RYU_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); } frame(lua_state, 46.0); FT_MOTION_RATE(agent, 1.0); @@ -154,18 +155,19 @@ unsafe extern "C" fn sound_attackcommand4(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 7.0); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ItemModule::set_have_item_visibility(agent.module_accessor, false, 0); + ItemModule::set_have_item_visibility(boma, false, 0); } frame(lua_state, 13.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitl"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); AREA_WIND_2ND_arg10(agent, 0, 0.8, 180, 8, 0.8, -10, 7, 20, 14, 80); } frame(lua_state, 15.0); @@ -174,7 +176,7 @@ unsafe extern "C" fn expression_attackcommand4(agent: &mut L2CAgentBase) { } frame(lua_state, 28.0); if is_excute(agent) { - AreaModule::erase_wind(agent.module_accessor, 0); + AreaModule::erase_wind(boma, 0); } } diff --git a/fighters/ryu/src/acmd/specials/special_hi.rs b/fighters/ryu/src/acmd/specials/special_hi.rs index 5083d9614f..46161dcfc2 100644 --- a/fighters/ryu/src/acmd/specials/special_hi.rs +++ b/fighters/ryu/src/acmd/specials/special_hi.rs @@ -91,7 +91,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if is_excute(agent) { HIT_NODE(agent, Hash40::new("armr"), *HIT_STATUS_XLU); HIT_NODE(agent, Hash40::new("shoulderr"), *HIT_STATUS_XLU); - if MotionModule::motion_kind(agent.module_accessor) == hash40("special_hi_command") { + if MotionModule::motion_kind(boma) == hash40("special_hi_command") { WHOLE_HIT(agent, *HIT_STATUS_XLU); } } @@ -122,7 +122,7 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { MeterModule::watch_damage(agent.battle_object, false); } else { - if MotionModule::motion_kind(agent.module_accessor) != hash40("special_hi_command") { + if MotionModule::motion_kind(boma) != hash40("special_hi_command") { WHOLE_HIT(agent, *HIT_STATUS_NORMAL); } if agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_COMMON_INT_STRENGTH) == *FIGHTER_RYU_STRENGTH_W diff --git a/fighters/ryu/src/acmd/specials/special_lw.rs b/fighters/ryu/src/acmd/specials/special_lw.rs index 87581d484a..7b56b82563 100644 --- a/fighters/ryu/src/acmd/specials/special_lw.rs +++ b/fighters/ryu/src/acmd/specials/special_lw.rs @@ -38,6 +38,7 @@ unsafe extern "C" fn effect_speciallwinstall(agent: &mut L2CAgentBase) { unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { PLAY_SE(agent, Hash40::new("se_ryu_appeal_l01")); @@ -48,30 +49,32 @@ unsafe extern "C" fn sound_speciallwinstall(agent: &mut L2CAgentBase) { } frame(lua_state, 8.0); if is_excute(agent) { - let sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 0.5, 0); + let sfx_handle = SoundModule::play_se(boma, Hash40::new("se_common_final_cutin"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 0.5, 0); } } unsafe extern "C" fn expression_speciallwinstall(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 18.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); QUAKE(agent, *CAMERA_QUAKE_KIND_S); AREA_WIND_2ND_arg10(agent, 0, 1, 70, 8, 0.8, 0, 6, 32, 12, 80); } frame(lua_state, 32.0); if is_excute(agent) { - AreaModule::erase_wind(agent.module_accessor, 0); + AreaModule::erase_wind(boma, 0); } } unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); let lv = agent.get_int(*FIGHTER_RYU_STATUS_WORK_ID_SPECIAL_LW_INT_SAVING_LV); MeterModule::watch_damage(agent.battle_object, true); @@ -83,21 +86,21 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { } else if lv == *FIGHTER_RYU_SAVING_LV_2 { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } else { ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, 11.5, Some(0.0), Some(10.5), Some(2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } - AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); - AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); + AttackModule::set_attack_level(boma, 0, lv as u8); + AttackModule::set_attack_level(boma, 1, lv as u8); } frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 15.0); if is_excute(agent) { @@ -107,6 +110,7 @@ unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { REVERSE_LR(agent); @@ -122,21 +126,21 @@ unsafe extern "C" fn game_speciallwturn(agent: &mut L2CAgentBase) { } else if lv == *FIGHTER_RYU_SAVING_LV_2 { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 10.0, 60, 100, 0, 0, 4.3, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 22, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } else { ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); ATTACK(agent, 1, 0, Hash40::new("top"), 17.0, 60, 100, 0, 0, 5.4, 0.0, 10.5, -13.5, Some(0.0), Some(10.5), Some(-2.0), 2.3, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, f32::NAN, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_saving"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_RYU_KICK, *ATTACK_REGION_PUNCH); - AttackModule::set_no_finish_camera(agent.module_accessor, 0, true, false); - AttackModule::set_no_finish_camera(agent.module_accessor, 1, true, false); + AttackModule::set_no_finish_camera(boma, 0, true, false); + AttackModule::set_no_finish_camera(boma, 1, true, false); } - AttackModule::set_attack_level(agent.module_accessor, 0, lv as u8); - AttackModule::set_attack_level(agent.module_accessor, 1, lv as u8); + AttackModule::set_attack_level(boma, 0, lv as u8); + AttackModule::set_attack_level(boma, 1, lv as u8); } frame(lua_state, 13.0); if is_excute(agent) { MeterModule::watch_damage(agent.battle_object, false); - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 15.0); if is_excute(agent) { diff --git a/fighters/ryu/src/hadoken/acmd.rs b/fighters/ryu/src/hadoken/acmd.rs index 6aa1c3d307..c0ea6b5814 100644 --- a/fighters/ryu/src/hadoken/acmd.rs +++ b/fighters/ryu/src/hadoken/acmd.rs @@ -25,8 +25,8 @@ unsafe extern "C" fn game_movewms(agent: &mut L2CAgentBase) { } } if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.016 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); agent.set_int(41, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); ATTACK(agent, 0, 0, Hash40::new("top"), 13.0, 0, 10, 0, 45, 3.5, 0.0, 0.5, -0.5, Some(0.0), Some(-5.2), Some(-0.5), 1.5, 0.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KEN_PUNCH, *ATTACK_REGION_ENERGY); @@ -110,8 +110,8 @@ unsafe extern "C" fn game_movespwms(agent: &mut L2CAgentBase) { } if VarModule::is_flag(agent.battle_object, vars::shotos::instance::IS_USE_EX_SPECIAL) { - let speed = KineticModule::get_sum_speed3f(agent.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); - KineticModule::mul_speed(agent.module_accessor, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + let speed = KineticModule::get_sum_speed3f(boma, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); + KineticModule::mul_speed(boma, &Vector3f{x: 2.1 / speed.x.abs(), y: 0.0, z: 0.0}, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_ALL); agent.set_int(38, *WEAPON_INSTANCE_WORK_ID_INT_LIFE); ATTACK(agent, 0, 0, Hash40::new("top"), 1.1, 80, 10, 0, 42, 3.5, 0.0, -5.2, 0.0, Some(0.0), Some(-5.2), Some(0.0), 0.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 1, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_ENERGY); diff --git a/fighters/ryu/src/shinkuhadoken/acmd.rs b/fighters/ryu/src/shinkuhadoken/acmd.rs index 092166431e..25caea13bb 100644 --- a/fighters/ryu/src/shinkuhadoken/acmd.rs +++ b/fighters/ryu/src/shinkuhadoken/acmd.rs @@ -2,6 +2,7 @@ use super::*; unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 1.6, 32, 100, 90, 0, 8.0, 0.0, 0.0, 0.0, None, None, None, 0.0, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, -0.6, 0.0, 5, true, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); @@ -10,12 +11,12 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } frame(lua_state, 90.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATTACK(agent, 0, 1, Hash40::new("top"), 7.0, 83, 130, 0, 50, 16.0, 0.0, 0.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_NONE); } wait(lua_state, 6.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/samus/src/acmd/other.rs b/fighters/samus/src/acmd/other.rs index 9e55ea886c..e21008276e 100644 --- a/fighters/samus/src/acmd/other.rs +++ b/fighters/samus/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_samus_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_samus_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/samusd/src/acmd/other.rs b/fighters/samusd/src/acmd/other.rs index f04cd96301..1e29d29547 100644 --- a/fighters/samusd/src/acmd/other.rs +++ b/fighters/samusd/src/acmd/other.rs @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_samusd_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_samusd_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/sheik/src/acmd/other.rs b/fighters/sheik/src/acmd/other.rs index fbe83a5d93..872100c2b1 100644 --- a/fighters/sheik/src/acmd/other.rs +++ b/fighters/sheik/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_sheik_rnd_futtobi01"), Hash40::new("seq_sheik_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_sheik_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_sheik_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/shizue/src/acmd/other.rs b/fighters/shizue/src/acmd/other.rs index ea1e669f46..567a9eabaf 100644 --- a/fighters/shizue/src/acmd/other.rs +++ b/fighters/shizue/src/acmd/other.rs @@ -18,7 +18,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_shizue_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_shizue_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } diff --git a/fighters/shizue/src/acmd/specials.rs b/fighters/shizue/src/acmd/specials.rs index 55b572073d..2f68f7a9d0 100644 --- a/fighters/shizue/src/acmd/specials.rs +++ b/fighters/shizue/src/acmd/specials.rs @@ -316,13 +316,14 @@ unsafe extern "C" fn game_specialairsthrowlw(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialairhidetach(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); if is_excute(agent) { VarModule::on_flag(agent.object(), vars::common::instance::UP_SPECIAL_CANCEL); - StatusModule::change_status_request_from_script(agent.module_accessor, *FIGHTER_STATUS_KIND_FALL, true); + StatusModule::change_status_request_from_script(boma, *FIGHTER_STATUS_KIND_FALL, true); if VarModule::is_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE) { VarModule::off_flag(agent.object(), vars::shizue::status::IS_NOT_QUICK_RELEASE); - WorkModule::set_float(agent.module_accessor, VarModule::get_float(agent.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); + WorkModule::set_float(boma, VarModule::get_float(agent.object(), vars::shizue::instance::STORED_BALLOON_POWER), *FIGHTER_MURABITO_INSTANCE_WORK_ID_FLOAT_SPECIAL_HI_FRAME); } } } diff --git a/fighters/shizue/src/bullet/acmd.rs b/fighters/shizue/src/bullet/acmd.rs index 6d9d63a8cb..8236dc53f3 100644 --- a/fighters/shizue/src/bullet/acmd.rs +++ b/fighters/shizue/src/bullet/acmd.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn game_shootb(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 361, 85, 0, 58, 5.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); - AttackModule::enable_safe_pos(agent.module_accessor); + AttackModule::enable_safe_pos(boma); } frame(lua_state, 3.0); if is_excute(agent) { diff --git a/fighters/shulk/src/acmd/other.rs b/fighters/shulk/src/acmd/other.rs index a1ff38ef22..e45b6bc504 100644 --- a/fighters/shulk/src/acmd/other.rs +++ b/fighters/shulk/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_shulk_rnd_futtobi01"), Hash40::new("seq_shulk_rnd_futtobi02")); } } @@ -58,7 +58,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_shulk_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_shulk_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 19.0); diff --git a/fighters/simon/src/acmd/other.rs b/fighters/simon/src/acmd/other.rs index e1ade187ca..ec863d050c 100644 --- a/fighters/simon/src/acmd/other.rs +++ b/fighters/simon/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_simon_rnd_futtobi01"), Hash40::new("seq_simon_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_simon_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_simon_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); PLAY_SE(agent, Hash40::new("se_simon_whip_chain")); } diff --git a/fighters/simon/src/acmd/specials.rs b/fighters/simon/src/acmd/specials.rs index 70589185b1..de2d4d25e5 100644 --- a/fighters/simon/src/acmd/specials.rs +++ b/fighters/simon/src/acmd/specials.rs @@ -5,11 +5,11 @@ unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let boma = agent.boma(); FT_MOTION_RATE(agent, 0.8); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, false, 0); } frame(lua_state, 30.0); if is_excute(agent){ - ArticleModule::shoot(agent.module_accessor, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); + ArticleModule::shoot(boma, *FIGHTER_SIMON_GENERATE_ARTICLE_AXE, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_LAST), false); } } diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index 8c6f74d76b..b0e2f9554a 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_snake_rnd_futtobi01"), Hash40::new("seq_snake_rnd_futtobi02")); } } @@ -55,7 +55,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_snake_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/snake/src/acmd/specials.rs b/fighters/snake/src/acmd/specials.rs index 94917258a7..0367090446 100644 --- a/fighters/snake/src/acmd/specials.rs +++ b/fighters/snake/src/acmd/specials.rs @@ -164,8 +164,8 @@ unsafe extern "C" fn sound_specialsstart(agent : &mut L2CAgentBase) { frame(lua_state, 30.0); if is_excute(agent) { if VarModule::is_flag(agent.battle_object, vars::snake::instance::TRANQ_RELOAD_VULNERABLE) { - let sfx_handle = SoundModule::play_se(agent.module_accessor, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); - SoundModule::set_se_vol(agent.module_accessor, sfx_handle as i32, 3.0, 0); + let sfx_handle = SoundModule::play_se(boma, smash::phx::Hash40::new("vc_snake_heavyget"), true, false, false, false, app::enSEType(0)); + SoundModule::set_se_vol(boma, sfx_handle as i32, 3.0, 0); } } frame(lua_state, 41.0); diff --git a/fighters/snake/src/nikitamissile/acmd.rs b/fighters/snake/src/nikitamissile/acmd.rs index e86b37ec7b..65a252c2a8 100644 --- a/fighters/snake/src/nikitamissile/acmd.rs +++ b/fighters/snake/src/nikitamissile/acmd.rs @@ -60,7 +60,7 @@ unsafe extern "C" fn sound_explosion(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - let sfx = SoundModule::play_se(agent.module_accessor, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); + let sfx = SoundModule::play_se(boma, Hash40::new("se_snake_special_l02"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, sfx as i32, 2.0, 0); } } diff --git a/fighters/sonic/src/acmd/other.rs b/fighters/sonic/src/acmd/other.rs index 8bf47972ed..d05f34c468 100644 --- a/fighters/sonic/src/acmd/other.rs +++ b/fighters/sonic/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_sonic_rnd_futtobi01"), Hash40::new("seq_sonic_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_sonic_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_sonic_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 9.0); diff --git a/fighters/sonic/src/acmd/specials.rs b/fighters/sonic/src/acmd/specials.rs index 637ad1d1dc..e6784f6257 100644 --- a/fighters/sonic/src/acmd/specials.rs +++ b/fighters/sonic/src/acmd/specials.rs @@ -102,9 +102,10 @@ unsafe extern "C" fn sound_specialsbooststart(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_specialsbooststart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, true, *BATTLE_OBJECT_ID_INVALID as u32); } } @@ -126,6 +127,7 @@ unsafe extern "C" fn game_specialsboost(agent: &mut L2CAgentBase) { } unsafe extern "C" fn effect_specialsboost(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { let eff = if VarModule::is_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_HOP) { Hash40::new("sonic_spintrace_max") @@ -134,7 +136,7 @@ unsafe extern "C" fn effect_specialsboost(agent: &mut L2CAgentBase) { Hash40::new("sonic_spintrace") }; EFFECT_FOLLOW_NO_STOP(agent, eff, Hash40::new("top"), 0, 6, 0, 0, 0, 0, 1.25, true); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); } } @@ -157,10 +159,11 @@ unsafe extern "C" fn expression_specialsboost(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specialsboostend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 0.5); frame(lua_state, 4.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 8.0); FT_MOTION_RATE(agent, 1.6); @@ -192,17 +195,19 @@ unsafe extern "C" fn sound_specialsboostend(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_specialsboostend(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_dash"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } unsafe extern "C" fn game_specialairsboostend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 0.8); frame(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS); VarModule::on_flag(agent.battle_object, vars::sonic::status::SPECIAL_S_ENABLE_CONTROL); } diff --git a/fighters/szerosuit/src/acmd/other.rs b/fighters/szerosuit/src/acmd/other.rs index 55854ca7f1..3544727987 100644 --- a/fighters/szerosuit/src/acmd/other.rs +++ b/fighters/szerosuit/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_szerosuit_rnd_futtobi01"), Hash40::new("seq_szerosuit_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_szerosuit_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_szerosuit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 8.0); diff --git a/fighters/szerosuit/src/acmd/throws.rs b/fighters/szerosuit/src/acmd/throws.rs index f813e71f85..0fb765a6ab 100644 --- a/fighters/szerosuit/src/acmd/throws.rs +++ b/fighters/szerosuit/src/acmd/throws.rs @@ -60,12 +60,12 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_dash"), false, 0.0); } frame(lua_state, 16.0); if is_excute(agent) { - GrabModule::set_rebound(agent.module_accessor, true); + GrabModule::set_rebound(boma, true); } frame(lua_state, 17.0); if is_excute(agent) { @@ -84,7 +84,7 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { frame(lua_state, 27.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(agent.module_accessor, false); + GrabModule::set_rebound(boma, false); } frame(lua_state, 76.0); if is_excute(agent) { @@ -96,12 +96,12 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); + ArticleModule::generate_article(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, false, 0); ArticleModule::change_motion(boma, *FIGHTER_SZEROSUIT_GENERATE_ARTICLE_WHIP, Hash40::new("catch_turn"), false, 0.0); } frame(lua_state, 17.0); if is_excute(agent) { - GrabModule::set_rebound(agent.module_accessor, true); + GrabModule::set_rebound(boma, true); } frame(lua_state, 18.0); if is_excute(agent) { @@ -120,7 +120,7 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { frame(lua_state, 27.0); if is_excute(agent) { grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); - GrabModule::set_rebound(agent.module_accessor, false); + GrabModule::set_rebound(boma, false); } frame(lua_state, 57.0); if is_excute(agent) { diff --git a/fighters/tantan/src/acmd/aerials.rs b/fighters/tantan/src/acmd/aerials.rs index 7756eadc97..a411d5bd33 100644 --- a/fighters/tantan/src/acmd/aerials.rs +++ b/fighters/tantan/src/acmd/aerials.rs @@ -2,13 +2,14 @@ use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); FT_MOTION_RATE(agent, 3.0/(3.0-1.0)); frame(lua_state, 3.0); FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); ATTACK(agent, 0, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.7, 5.0, -0.1, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneel"), 9.5, 361, 67, 0, 32, 3.25, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 2, 0, Hash40::new("hip"), 9.5, 361, 67, 0, 32, 3.25, -1.5, -1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); @@ -21,20 +22,21 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { } wait(lua_state, 16.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); - AttackModule::clear_all(agent.module_accessor); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + AttackModule::clear_all(boma); } } unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { EFFECT(agent, Hash40::new("sys_attack_speedline"), Hash40::new("top"), 0, 8.5, -5, 0, 0, 0, 0.8, 0, 0, 0, 0, 0, 0, true); //EFFECT_FOLLOW(fighter, Hash40::new("sys_attack_line_b"), Hash40::new("top"), 0, 5.7, -8, -10, 0, 0, 1.1, false); //LAST_EFFECT_SET_RATE(fighter, 1.5); - let lr = PostureModule::lr(agent.module_accessor); + let lr = PostureModule::lr(boma); if is_excute(agent) { if(lr>=0.0){ EFFECT_FLW_POS(agent, Hash40::new("tantan_attack_dash"), Hash40::new("kneel"), 1, -1.75, 0, 13, 0, 0, 0.9, true); @@ -69,9 +71,10 @@ unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.0); if is_excute(agent) { @@ -95,8 +98,9 @@ unsafe extern "C" fn sound_landingairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_TOP); } frame(lua_state, 17.0); @@ -107,9 +111,10 @@ unsafe extern "C" fn expression_landingairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); FT_MOTION_RATE(agent, 1.0/(12.0-10.0)); @@ -132,11 +137,11 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { } wait(lua_state, 3.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 45.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -177,9 +182,10 @@ unsafe extern "C" fn sound_attackairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 11.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 15.0); if is_excute(agent) { @@ -204,9 +210,10 @@ unsafe extern "C" fn sound_landingairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 2); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 17.0); if is_excute(agent) { @@ -216,9 +223,10 @@ unsafe extern "C" fn expression_landingairf(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); if is_excute(agent) { @@ -227,11 +235,11 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { } wait(lua_state, 3.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 31.0); if is_excute(agent) { - WorkModule::off_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); + WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } @@ -267,9 +275,10 @@ unsafe extern "C" fn sound_attackairb(agent: &mut L2CAgentBase) { unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); if is_excute(agent) { @@ -292,9 +301,10 @@ unsafe extern "C" fn sound_landingairb(agent: &mut L2CAgentBase) { } unsafe extern "C" fn expression_landingairb(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } diff --git a/fighters/tantan/src/acmd/throws.rs b/fighters/tantan/src/acmd/throws.rs index e666145f53..bcff0ecfbb 100644 --- a/fighters/tantan/src/acmd/throws.rs +++ b/fighters/tantan/src/acmd/throws.rs @@ -6,7 +6,7 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { frame(lua_state, 1.0); FT_MOTION_RATE(agent, 6.0/(15.0-1.0)); if is_excute(agent) { - FighterAreaModuleImpl::enable_fix_jostle_area(agent.module_accessor, 3.5, 3.5); + FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 3.5); } frame(lua_state, 15.0); FT_MOTION_RATE(agent, 1.0); diff --git a/fighters/toonlink/src/acmd/other.rs b/fighters/toonlink/src/acmd/other.rs index dc7d6199e8..1342905773 100644 --- a/fighters/toonlink/src/acmd/other.rs +++ b/fighters/toonlink/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_toonlink_rnd_futtobi01"), Hash40::new("seq_toonlink_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_toonlink_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_toonlink_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); diff --git a/fighters/trail/src/acmd/other.rs b/fighters/trail/src/acmd/other.rs index ee15255123..5770d37e85 100644 --- a/fighters/trail/src/acmd/other.rs +++ b/fighters/trail/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_trail_rnd_futtobi01"), Hash40::new("seq_trail_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_trail_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_trail_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 20.0); diff --git a/fighters/trail/src/acmd/specials.rs b/fighters/trail/src/acmd/specials.rs index 76c18a5f4d..93e4928aa4 100644 --- a/fighters/trail/src/acmd/specials.rs +++ b/fighters/trail/src/acmd/specials.rs @@ -173,7 +173,7 @@ unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD); - KineticModule::change_kinetic(agent.module_accessor, *FIGHTER_KINETIC_TYPE_AIR_STOP); + KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP); } wait(lua_state, 6.0); if is_excute(agent) { @@ -335,7 +335,7 @@ unsafe extern "C" fn game_specials2(agent: &mut L2CAgentBase) { } // Ensure only specials2 comes out - WorkModule::set_int(agent.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(boma, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { @@ -378,7 +378,7 @@ unsafe extern "C" fn game_specialairs2(agent: &mut L2CAgentBase) { } // Ensure only specials2 comes out - WorkModule::set_int(agent.module_accessor, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); + WorkModule::set_int(boma, 4, *FIGHTER_TRAIL_STATUS_SPECIAL_S_INT_ATTACK_COUNT); } unsafe extern "C" fn sound_specials2(agent: &mut L2CAgentBase) { diff --git a/fighters/wario/src/acmd/smashes.rs b/fighters/wario/src/acmd/smashes.rs index c3dc117ab9..37e99fc058 100644 --- a/fighters/wario/src/acmd/smashes.rs +++ b/fighters/wario/src/acmd/smashes.rs @@ -147,7 +147,7 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { } frame(lua_state, 7.0); if is_excute(agent) { - ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ControlModule::set_rumble(boma, Hash40::new("rbkind_impact"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 9.0); if is_excute(agent) { diff --git a/fighters/wario/src/acmd/specials.rs b/fighters/wario/src/acmd/specials.rs index 94f4d18045..ce3cdfa7f7 100644 --- a/fighters/wario/src/acmd/specials.rs +++ b/fighters/wario/src/acmd/specials.rs @@ -129,7 +129,7 @@ unsafe extern "C" fn game_specialhijump(agent: &mut L2CAgentBase) { 0.0, 0.0 ); - KineticModule::enable_energy(agent.module_accessor, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); + KineticModule::enable_energy(boma, *FIGHTER_KINETIC_ENERGY_ID_CONTROL); } } diff --git a/fighters/wiifit/src/acmd/other.rs b/fighters/wiifit/src/acmd/other.rs index dd031b82fb..244f43f037 100644 --- a/fighters/wiifit/src/acmd/other.rs +++ b/fighters/wiifit/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_wiifit_rnd_futtobi01"), Hash40::new("seq_wiifit_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_wiifit_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_wiifit_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 19.0); diff --git a/fighters/wolf/src/acmd/other.rs b/fighters/wolf/src/acmd/other.rs index 22b92dd43f..a4f0403c02 100644 --- a/fighters/wolf/src/acmd/other.rs +++ b/fighters/wolf/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_wolf_rnd_futtobi01"), Hash40::new("seq_wolf_rnd_futtobi02")); } } @@ -54,7 +54,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_wolf_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_wolf_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 12.0); diff --git a/fighters/wolf/src/acmd/specials.rs b/fighters/wolf/src/acmd/specials.rs index fe6aed5ab1..8c01105a2e 100644 --- a/fighters/wolf/src/acmd/specials.rs +++ b/fighters/wolf/src/acmd/specials.rs @@ -2,12 +2,13 @@ use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, -1); } - if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); + if ArticleModule::is_exist(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("open"), false, -1.0); } frame(lua_state, 15.0); if is_excute(agent) { @@ -17,22 +18,22 @@ unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { } frame(lua_state, 16.0); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER_BULLET, false, -1); } frame(lua_state, 20.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 38.0); - if MotionModule::motion_kind(agent.module_accessor) == smash::hash40("special_air_n") { + if MotionModule::motion_kind(boma) == smash::hash40("special_air_n") { FT_MOTION_RATE(agent, 1.8); } - if ArticleModule::is_exist(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { - ArticleModule::change_motion(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); + if ArticleModule::is_exist(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER) && is_excute(agent) { + ArticleModule::change_motion(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, Hash40::new("close"), false, -1.0); } frame(lua_state, 45.0); if is_excute(agent) { - ArticleModule::set_visibility_whole(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::set_visibility_whole(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_BLASTER, false, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } } @@ -93,21 +94,23 @@ unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; + let boma = agent.boma(); FT_MOTION_RATE(agent, 1.5); if is_excute(agent) { - JostleModule::set_status(agent.module_accessor, false); + JostleModule::set_status(boma, false); } frame(lua_state, 0.66); if is_excute(agent) { - ArticleModule::generate_article(agent.module_accessor, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); + ArticleModule::generate_article(boma, *FIGHTER_WOLF_GENERATE_ARTICLE_ILLUSION, false, -1); ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 60, 60, 0, 68, 3.0, 0.0, 5.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_BODY); } } unsafe extern "C" fn effect_specials(agent: &mut L2CAgentBase) { + let boma = agent.boma(); if is_excute(agent) { EFFECT_FOLLOW(agent, Hash40::new("wolf_slash"), Hash40::new("top"), -3, 5.5, 0, 65, 0, 0, 0.75, false); - EffectModule::enable_sync_init_pos_last(agent.module_accessor); + EffectModule::enable_sync_init_pos_last(boma); // EFFECT_FOLLOW(agent, Hash40::new("wolf_slash_rush"), Hash40::new("top"), -3, 20.7, 35, 65, 0, 0, 0.75, false); } } @@ -126,7 +129,7 @@ unsafe extern "C" fn game_specialsend(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - AttackModule::clear(agent.module_accessor, 1, false); + AttackModule::clear(boma, 1, false); } frame(lua_state, 2.0); if is_excute(agent) { diff --git a/fighters/yoshi/src/acmd/other.rs b/fighters/yoshi/src/acmd/other.rs index afe6e35c04..6cf9f075c3 100644 --- a/fighters/yoshi/src/acmd/other.rs +++ b/fighters/yoshi/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_yoshi_rnd_futtobi01"), Hash40::new("seq_yoshi_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_yoshi_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_yoshi_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 11.0); diff --git a/fighters/yoshi/src/acmd/specials.rs b/fighters/yoshi/src/acmd/specials.rs index 9617ac057c..a4cd77074f 100644 --- a/fighters/yoshi/src/acmd/specials.rs +++ b/fighters/yoshi/src/acmd/specials.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn game_specialsloop(agent: &mut L2CAgentBase) { let boma = agent.boma(); if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 10.0, 80, 50, 0, 70, 4.0, 0.0, 6.6, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 30, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_BODY); - JostleModule::set_status(agent.module_accessor, false); + JostleModule::set_status(boma, false); } } diff --git a/fighters/younglink/src/acmd/ground.rs b/fighters/younglink/src/acmd/ground.rs index 821f0ae87c..1c557cf837 100644 --- a/fighters/younglink/src/acmd/ground.rs +++ b/fighters/younglink/src/acmd/ground.rs @@ -53,7 +53,7 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { } wait(lua_state, 2.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } } diff --git a/fighters/younglink/src/acmd/other.rs b/fighters/younglink/src/acmd/other.rs index c89b33dec5..6d00150e2d 100644 --- a/fighters/younglink/src/acmd/other.rs +++ b/fighters/younglink/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_younglink_rnd_futtobi01"), Hash40::new("seq_younglink_rnd_futtobi02")); } } @@ -73,7 +73,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_younglink_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_younglink_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 5.0); diff --git a/fighters/younglink/src/acmd/smashes.rs b/fighters/younglink/src/acmd/smashes.rs index fb746b64b8..17b780c6c9 100644 --- a/fighters/younglink/src/acmd/smashes.rs +++ b/fighters/younglink/src/acmd/smashes.rs @@ -85,7 +85,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 6.0); if is_excute(agent) { - WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); + WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 10.0); if is_excute(agent) { @@ -93,11 +93,11 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("sword"), 4.0, 95, 100, 23, 0, 3.2, 0.0, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 2, 0, Hash40::new("sword"), 4.0, 149, 100, 23, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); ATTACK(agent, 3, 0, Hash40::new("sword"), 4.0, 105, 100, 48, 0, 3.2, 5.5, -1.0, 1.0, None, None, None, 0.8, 0.4, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 6.0, false); + AttackModule::set_add_reaction_frame(boma, 0, 6.0, false); } frame(lua_state, 14.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 26.0); if is_excute(agent) { @@ -108,7 +108,7 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { } frame(lua_state, 31.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); } frame(lua_state, 50.0); FT_MOTION_RATE_RANGE(agent, 50.0, 60.0, 7.0); diff --git a/fighters/younglink/src/acmd/throws.rs b/fighters/younglink/src/acmd/throws.rs index 7f7c5df47f..a05ef349cf 100644 --- a/fighters/younglink/src/acmd/throws.rs +++ b/fighters/younglink/src/acmd/throws.rs @@ -11,12 +11,12 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 0.0, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); ATTACK(agent, 1, 0, Hash40::new("kneer"), 3.0, 361, 0, 120, 0, 3.1, 3.5, 0.0, 0.0, None, None, None, 0.6, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - AttackModule::set_catch_only_all(agent.module_accessor, true, false); + AttackModule::set_catch_only_all(boma, true, false); CHECK_FINISH_CAMERA(agent, 21, 11); } frame(lua_state, 13.0); if is_excute(agent) { - AttackModule::clear_all(agent.module_accessor); + AttackModule::clear_all(boma); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } } diff --git a/fighters/zelda/src/acmd/aerials.rs b/fighters/zelda/src/acmd/aerials.rs index 88f1e5419b..2b606dcfeb 100644 --- a/fighters/zelda/src/acmd/aerials.rs +++ b/fighters/zelda/src/acmd/aerials.rs @@ -159,8 +159,8 @@ unsafe extern "C" fn expression_attackairb(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { - //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackll") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_1); - //WorkModule::set_int64(agent.module_accessor, hash40("rbkind_attackm") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_2); + //WorkModule::set_int64(boma, hash40("rbkind_attackll") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_1); + //WorkModule::set_int64(boma, hash40("rbkind_attackm") as i64, FIGHTER_ZELDA_INSTANCE_WORK_ID_INT_RUMBLE_HIT_KIND_2); } frame(lua_state, 4.0); if is_excute(agent) { diff --git a/fighters/zelda/src/acmd/other.rs b/fighters/zelda/src/acmd/other.rs index 34029c799d..b1cc7f0742 100644 --- a/fighters/zelda/src/acmd/other.rs +++ b/fighters/zelda/src/acmd/other.rs @@ -5,7 +5,7 @@ unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { @@ -30,7 +30,7 @@ unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 1.0); if is_excute(agent) { - if !StopModule::is_stop(agent.module_accessor) { + if !StopModule::is_stop(boma) { PLAY_FLY_VOICE(agent, Hash40::new("seq_zelda_rnd_futtobi01"), Hash40::new("seq_zelda_rnd_futtobi02")); } } @@ -45,7 +45,7 @@ unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { let boma = agent.boma(); frame(lua_state, 4.0); if is_excute(agent) { - let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_zelda_dash_start"), true, false, false, false, app::enSEType(0)); + let dash_sfx_handle = SoundModule::play_se(boma, Hash40::new("se_zelda_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } wait(lua_state, 13.0); diff --git a/fighters/zelda/src/phantom/acmd.rs b/fighters/zelda/src/phantom/acmd.rs index cc73424a02..d67a525827 100644 --- a/fighters/zelda/src/phantom/acmd.rs +++ b/fighters/zelda/src/phantom/acmd.rs @@ -561,7 +561,8 @@ unsafe extern "C" fn effect_attackmax(agent: &mut L2CAgentBase) { unsafe extern "C" fn game_cancel(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; - let owner_id = WorkModule::get_int(agent.module_accessor, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; + let boma = agent.boma(); + let owner_id = WorkModule::get_int(boma, *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER) as u32; let zelda = utils::util::get_battle_object_from_id(owner_id); frame(lua_state, 1.0); if VarModule::is_flag(zelda, vars::zelda::instance::HIT_CANCEL_PHANTOM) { From 3e94014bc6a72f2dcc004340397e3ef1cde4697c Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 12:55:07 -0500 Subject: [PATCH 169/172] more whitespace :) --- fighters/bayonetta/src/acmd/other.rs | 2 -- fighters/bayonetta/src/acmd/tilts.rs | 1 - fighters/brave/src/acmd/specials.rs | 2 -- fighters/brave/src/tornado/acmd.rs | 1 - fighters/chrom/src/acmd/other.rs | 1 - fighters/dedede/src/acmd/aerials.rs | 2 -- fighters/dedede/src/acmd/ground.rs | 4 ---- fighters/dedede/src/acmd/other.rs | 3 --- fighters/dedede/src/acmd/smashes.rs | 4 ---- fighters/dedede/src/acmd/specials.rs | 1 - fighters/dedede/src/acmd/throws.rs | 5 ----- fighters/dedede/src/acmd/tilts.rs | 2 -- fighters/demon/src/acmd/aerials.rs | 2 -- fighters/demon/src/acmd/ground.rs | 2 -- fighters/demon/src/acmd/jabs.rs | 2 -- fighters/demon/src/acmd/other.rs | 2 -- fighters/demon/src/acmd/specials.rs | 4 ---- fighters/demon/src/acmd/tilts.rs | 2 -- fighters/dolly/src/acmd/aerials.rs | 6 ----- fighters/dolly/src/acmd/ground.rs | 6 ----- fighters/dolly/src/acmd/other.rs | 4 ---- fighters/dolly/src/acmd/smashes.rs | 1 - fighters/dolly/src/acmd/specials.rs | 22 ------------------- fighters/dolly/src/acmd/throws.rs | 3 --- fighters/dolly/src/acmd/tilts.rs | 4 ---- fighters/dolly/src/burst/acmd.rs | 1 - fighters/dolly/src/opff.rs | 2 -- fighters/duckhunt/src/status/attacks3.rs | 1 - fighters/edge/src/flare1/acmd.rs | 1 - fighters/fox/src/acmd/other.rs | 2 -- fighters/fox/src/acmd/throws.rs | 1 - fighters/ganon/src/acmd/specials.rs | 1 - fighters/gaogaen/src/acmd/other.rs | 1 - fighters/iceclimber/src/acmd/aerials.rs | 1 - fighters/iceclimber/src/acmd/ground.rs | 3 --- fighters/iceclimber/src/acmd/smashes.rs | 1 - fighters/iceclimber/src/acmd/specials.rs | 1 - fighters/iceclimber/src/acmd/throws.rs | 1 - fighters/iceclimber/src/acmd/tilts.rs | 3 --- fighters/iceclimber/src/blizzard/acmd.rs | 1 - fighters/inkling/src/acmd/other.rs | 1 - fighters/jack/src/opff.rs | 1 - fighters/kirby/src/acmd/aerials.rs | 5 ----- fighters/kirby/src/acmd/copy/littlemac.rs | 1 - fighters/kirby/src/acmd/ground.rs | 2 -- fighters/kirby/src/acmd/other.rs | 2 -- fighters/kirby/src/acmd/smashes.rs | 1 - fighters/kirby/src/acmd/throws.rs | 4 ---- fighters/kirby/src/acmd/tilts.rs | 6 ----- fighters/kirby/src/status/lucas_special_n.rs | 1 - fighters/koopa/src/status/special_s.rs | 1 - fighters/krool/src/status/special_hi.rs | 1 - fighters/lucas/src/acmd/throws.rs | 1 - fighters/marth/src/acmd/throws.rs | 1 - fighters/miifighter/src/acmd/other.rs | 1 - fighters/miigunner/src/gunnercharge/acmd.rs | 1 - fighters/miigunner/src/stealthbomb_s/acmd.rs | 2 -- fighters/miiswordsman/src/acmd/other.rs | 1 - .../src/acmd/specials/special_lw.rs | 2 -- .../src/acmd/specials/special_s.rs | 5 ----- fighters/murabito/src/bullet/acmd.rs | 1 - fighters/murabito/src/flowerpot/acmd.rs | 1 - fighters/packun/src/acmd/other.rs | 2 -- fighters/pacman/src/acmd/ground.rs | 1 - .../palutena/src/acmd/specials/special_n_r.rs | 1 - fighters/pichu/src/acmd/other.rs | 1 - fighters/pickel/src/acmd/aerials.rs | 1 - fighters/pickel/src/acmd/ground.rs | 1 - fighters/pickel/src/acmd/other.rs | 2 -- fighters/pikachu/src/acmd/throws.rs | 1 - fighters/pikmin/src/acmd/other.rs | 1 - fighters/purin/src/acmd/specials.rs | 1 - fighters/richter/src/acmd/other.rs | 2 -- fighters/richter/src/acmd/throws.rs | 1 - fighters/robot/src/acmd/throws.rs | 1 - fighters/rockman/src/acmd/aerials.rs | 1 - fighters/rockman/src/acmd/ground.rs | 1 - fighters/rockman/src/acmd/other.rs | 3 --- fighters/rockman/src/acmd/smashes.rs | 2 -- fighters/rockman/src/acmd/specials.rs | 3 --- fighters/rosetta/src/acmd/other.rs | 1 - fighters/roy/src/acmd/throws.rs | 4 ---- fighters/roy/src/acmd/tilts.rs | 4 ---- fighters/samus/src/acmd/throws.rs | 1 - fighters/sheik/src/acmd/throws.rs | 1 - fighters/snake/src/acmd/other.rs | 2 -- fighters/szerosuit/src/acmd/aerials.rs | 1 - fighters/toonlink/src/acmd/tilts.rs | 1 - fighters/wiifit/src/acmd/throws.rs | 1 - fighters/wolf/src/acmd/throws.rs | 1 - fighters/zelda/src/acmd/throws.rs | 1 - 91 files changed, 195 deletions(-) diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index d41456bc53..87003ffdae 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -75,7 +74,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/bayonetta/src/acmd/tilts.rs b/fighters/bayonetta/src/acmd/tilts.rs index abdc21f899..1811184807 100644 --- a/fighters/bayonetta/src/acmd/tilts.rs +++ b/fighters/bayonetta/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { diff --git a/fighters/brave/src/acmd/specials.rs b/fighters/brave/src/acmd/specials.rs index 48c820a314..23789e9be5 100644 --- a/fighters/brave/src/acmd/specials.rs +++ b/fighters/brave/src/acmd/specials.rs @@ -211,7 +211,6 @@ unsafe extern "C" fn game_specialhi2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } - } unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { @@ -236,7 +235,6 @@ unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_BRAVE_STATUS_SPECIAL_HI_FLAG_REVERT_ANGLE); } - } unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { diff --git a/fighters/brave/src/tornado/acmd.rs b/fighters/brave/src/tornado/acmd.rs index 8bbd39fd87..db9236d3d1 100644 --- a/fighters/brave/src/tornado/acmd.rs +++ b/fighters/brave/src/tornado/acmd.rs @@ -64,7 +64,6 @@ unsafe extern "C" fn game_specialhi3(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); } - } unsafe extern "C" fn effect_specialhi3(agent: &mut L2CAgentBase) { diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index d01bf7a1f7..e0e4722c1a 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -48,7 +48,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/aerials.rs b/fighters/dedede/src/acmd/aerials.rs index fdaf72442a..416f39d5b8 100644 --- a/fighters/dedede/src/acmd/aerials.rs +++ b/fighters/dedede/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -108,7 +107,6 @@ unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT_OFF_KIND(agent, Hash40::new("dedede_hammer_arc_wind"), true, true); } - } unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/ground.rs b/fighters/dedede/src/acmd/ground.rs index 85fdb2ea75..80ecddc48a 100644 --- a/fighters/dedede/src/acmd/ground.rs +++ b/fighters/dedede/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -32,7 +31,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -67,7 +65,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -94,7 +91,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/other.rs b/fighters/dedede/src/acmd/other.rs index 8f30734d9e..e53088e71b 100644 --- a/fighters/dedede/src/acmd/other.rs +++ b/fighters/dedede/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -62,7 +61,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -90,7 +88,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/smashes.rs b/fighters/dedede/src/acmd/smashes.rs index 23f498e071..624950c576 100644 --- a/fighters/dedede/src/acmd/smashes.rs +++ b/fighters/dedede/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -35,7 +34,6 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { @@ -65,7 +63,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { @@ -98,7 +95,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dedede/src/acmd/specials.rs b/fighters/dedede/src/acmd/specials.rs index 0c21eb1b14..524cc6c368 100644 --- a/fighters/dedede/src/acmd/specials.rs +++ b/fighters/dedede/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { diff --git a/fighters/dedede/src/acmd/throws.rs b/fighters/dedede/src/acmd/throws.rs index f5aa274152..03e074c207 100644 --- a/fighters/dedede/src/acmd/throws.rs +++ b/fighters/dedede/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -43,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -119,7 +116,6 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FT_MOTION_RATE(agent, 0.9); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -145,7 +141,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dedede/src/acmd/tilts.rs b/fighters/dedede/src/acmd/tilts.rs index 526f812d48..692b04e82a 100644 --- a/fighters/dedede/src/acmd/tilts.rs +++ b/fighters/dedede/src/acmd/tilts.rs @@ -31,7 +31,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 1.0); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -91,7 +90,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attacklw3(agent: &mut L2CAgentBase) { diff --git a/fighters/demon/src/acmd/aerials.rs b/fighters/demon/src/acmd/aerials.rs index 7577067d3a..91243795c4 100644 --- a/fighters/demon/src/acmd/aerials.rs +++ b/fighters/demon/src/acmd/aerials.rs @@ -29,7 +29,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -64,7 +63,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { diff --git a/fighters/demon/src/acmd/ground.rs b/fighters/demon/src/acmd/ground.rs index 389d50827f..88b2b37781 100644 --- a/fighters/demon/src/acmd/ground.rs +++ b/fighters/demon/src/acmd/ground.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackstand1(agent: &mut L2CAgentBase) { @@ -110,7 +109,6 @@ unsafe extern "C" fn game_attackstand1(agent: &mut L2CAgentBase) { if is_excute(agent) { shield!(agent, *MA_MSC_CMD_SHIELD_OFF, *COLLISION_KIND_REFLECTOR, *FIGHTER_DEMON_REFLECTOR_KIND_ATTACK_STAND1, *FIGHTER_DEMON_REFLECTOR_GROUP_ATTACK_STAND1); } - } // Triple Spin Kicks diff --git a/fighters/demon/src/acmd/jabs.rs b/fighters/demon/src/acmd/jabs.rs index e4f1893e2b..f4e22e5587 100644 --- a/fighters/demon/src/acmd/jabs.rs +++ b/fighters/demon/src/acmd/jabs.rs @@ -40,7 +40,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -331,7 +330,6 @@ unsafe extern "C" fn game_flashpunch(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/demon/src/acmd/other.rs b/fighters/demon/src/acmd/other.rs index 98783833b4..e9895e379a 100644 --- a/fighters/demon/src/acmd/other.rs +++ b/fighters/demon/src/acmd/other.rs @@ -146,7 +146,6 @@ unsafe extern "C" fn game_appealsr(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { @@ -206,7 +205,6 @@ unsafe extern "C" fn game_appealsl(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/demon/src/acmd/specials.rs b/fighters/demon/src/acmd/specials.rs index 64e5d3560c..bb51fec70b 100644 --- a/fighters/demon/src/acmd/specials.rs +++ b/fighters/demon/src/acmd/specials.rs @@ -88,7 +88,6 @@ unsafe extern "C" fn game_attackstep2(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } // Electric Wind God Fist @@ -246,7 +245,6 @@ unsafe extern "C" fn game_attackstep2s(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } // Dragon Uppercut @@ -333,7 +331,6 @@ unsafe extern "C" fn game_attackstep2l(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { @@ -674,7 +671,6 @@ unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { //FT_MOTION_RATE(agent, 1.0); } } - } unsafe extern "C" fn game_specialhiair(agent: &mut L2CAgentBase) { diff --git a/fighters/demon/src/acmd/tilts.rs b/fighters/demon/src/acmd/tilts.rs index 71729991e3..dee2aa79c3 100644 --- a/fighters/demon/src/acmd/tilts.rs +++ b/fighters/demon/src/acmd/tilts.rs @@ -31,7 +31,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -83,7 +82,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attackhi32(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/aerials.rs b/fighters/dolly/src/acmd/aerials.rs index 69050ce0e4..79bccf0b31 100644 --- a/fighters/dolly/src/acmd/aerials.rs +++ b/fighters/dolly/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { @@ -41,7 +40,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -112,7 +110,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -176,7 +173,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { @@ -214,7 +210,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -264,7 +259,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dolly/src/acmd/ground.rs b/fighters/dolly/src/acmd/ground.rs index 18d215f0e2..fe23e567ca 100644 --- a/fighters/dolly/src/acmd/ground.rs +++ b/fighters/dolly/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -85,7 +83,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { @@ -149,7 +146,6 @@ unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); //WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { @@ -244,7 +240,6 @@ unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.5); } } - } unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { @@ -388,7 +383,6 @@ unsafe extern "C" fn effect_attackdash(agent: &mut L2CAgentBase) { } wait(lua_state, 2.0); } - } unsafe extern "C" fn expression_attackdash(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/other.rs b/fighters/dolly/src/acmd/other.rs index 71d1e12b49..0b3c247cc4 100644 --- a/fighters/dolly/src/acmd/other.rs +++ b/fighters/dolly/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -72,7 +71,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeattack(agent: &mut L2CAgentBase) { @@ -133,7 +131,6 @@ unsafe extern "C" fn game_escapeattack(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { @@ -145,7 +142,6 @@ unsafe extern "C" fn game_landingfallspecial(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.35); } } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/smashes.rs b/fighters/dolly/src/acmd/smashes.rs index ccf153ea25..3638eaedbe 100644 --- a/fighters/dolly/src/acmd/smashes.rs +++ b/fighters/dolly/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/specials.rs b/fighters/dolly/src/acmd/specials.rs index 0e8306025b..b4eec8e7e1 100644 --- a/fighters/dolly/src/acmd/specials.rs +++ b/fighters/dolly/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { @@ -23,7 +22,6 @@ unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { if is_excute(agent) { MeterModule::add(agent.battle_object, 3.0); } - } unsafe extern "C" fn game_specialsfstart(agent: &mut L2CAgentBase) { @@ -56,7 +54,6 @@ unsafe extern "C" fn game_specialsfstart(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } } - } unsafe extern "C" fn effect_specialsfstart(agent: &mut L2CAgentBase) { @@ -97,7 +94,6 @@ unsafe extern "C" fn effect_specialsfstart(agent: &mut L2CAgentBase) { FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } - } unsafe extern "C" fn game_specialairsfstart(agent: &mut L2CAgentBase) { @@ -130,7 +126,6 @@ unsafe extern "C" fn game_specialairsfstart(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); } } - } unsafe extern "C" fn effect_specialairsfstart(agent: &mut L2CAgentBase) { @@ -171,7 +166,6 @@ unsafe extern "C" fn effect_specialairsfstart(agent: &mut L2CAgentBase) { FLASH(agent, 1.0, 0.71, 0.115, 1.75); } } - } unsafe extern "C" fn game_specialsfattack(agent: &mut L2CAgentBase) { @@ -393,7 +387,6 @@ unsafe extern "C" fn effect_specialsfattack(agent: &mut L2CAgentBase) { } wait(lua_state, 1.0); } - } unsafe extern "C" fn game_specialsfend(agent: &mut L2CAgentBase) { @@ -959,7 +952,6 @@ unsafe extern "C" fn game_specialsbattack(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); MeterModule::watch_damage(agent.battle_object, false); } - } unsafe extern "C" fn effect_specialsbattack(agent: &mut L2CAgentBase) { @@ -1205,7 +1197,6 @@ unsafe extern "C" fn game_specialhi1(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.667); } } - } unsafe extern "C" fn game_specialhicommand(agent: &mut L2CAgentBase) { @@ -1417,7 +1408,6 @@ unsafe extern "C" fn game_specialhicommand(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.667); } } - } unsafe extern "C" fn effect_specialhicommand(agent: &mut L2CAgentBase) { @@ -1633,7 +1623,6 @@ unsafe extern "C" fn effect_specialhicommand(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); } - } unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { @@ -1753,7 +1742,6 @@ unsafe extern "C" fn game_specialairhi1(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.667); } } - } unsafe extern "C" fn game_specialairhicommand(agent: &mut L2CAgentBase) { @@ -1965,7 +1953,6 @@ unsafe extern "C" fn game_specialairhicommand(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 0.667); } } - } unsafe extern "C" fn effect_specialairhicommand(agent: &mut L2CAgentBase) { @@ -2181,7 +2168,6 @@ unsafe extern "C" fn effect_specialairhicommand(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color1"), false, true); EFFECT_OFF_KIND(agent, Hash40::new("dolly_roll_l_color2"), false, true); } - } unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { @@ -2191,7 +2177,6 @@ unsafe extern "C" fn game_specialhifall(agent: &mut L2CAgentBase) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); FT_MOTION_RATE(agent, 0.667); } - } unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { @@ -2200,7 +2185,6 @@ unsafe extern "C" fn game_specialairhiend(agent: &mut L2CAgentBase) { if is_excute(agent) { notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } - } unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { @@ -2226,7 +2210,6 @@ unsafe extern "C" fn game_speciallwstart(agent: &mut L2CAgentBase) { } } } - } unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { @@ -2246,7 +2229,6 @@ unsafe extern "C" fn game_specialairlwstart(agent: &mut L2CAgentBase) { } } } - } unsafe extern "C" fn game_specialairlwrisew(agent: &mut L2CAgentBase) { @@ -2316,7 +2298,6 @@ unsafe extern "C" fn game_specialairlwrisew(agent: &mut L2CAgentBase) { KineticModule::add_speed(boma, &Vector3f::new(5.0, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } - } unsafe extern "C" fn effect_specialairlwrisew(agent: &mut L2CAgentBase) { @@ -2408,7 +2389,6 @@ unsafe extern "C" fn game_specialairlwrise(agent: &mut L2CAgentBase) { KineticModule::add_speed(boma, &Vector3f::new(0.3, -1.5, 0.0)); WorkModule::off_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_NO_SPEED_OPERATION_CHK); } - } unsafe extern "C" fn effect_specialairlwrise(agent: &mut L2CAgentBase) { @@ -2703,7 +2683,6 @@ unsafe extern "C" fn game_specialairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_DOLLY_STATUS_SPECIAL_LW_WORK_FLAG_LANDING_HEAVY); } - } unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { @@ -2839,7 +2818,6 @@ unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.000); } } - } unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/throws.rs b/fighters/dolly/src/acmd/throws.rs index e4255d16e0..d391150093 100644 --- a/fighters/dolly/src/acmd/throws.rs +++ b/fighters/dolly/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -42,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -63,7 +61,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/acmd/tilts.rs b/fighters/dolly/src/acmd/tilts.rs index 7546c02be0..b980caca46 100644 --- a/fighters/dolly/src/acmd/tilts.rs +++ b/fighters/dolly/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -45,7 +44,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -122,7 +120,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); VarModule::on_flag(boma.object(), vars::dolly::status::UNABLE_CANCEL_S3_DASH); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -177,7 +174,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *FIGHTER_DOLLY_INSTANCE_WORK_ID_FLAG_FINAL_HIT_CANCEL); WorkModule::off_flag(boma, *FIGHTER_DOLLY_STATUS_ATTACK_WORK_FLAG_HIT_CANCEL); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/dolly/src/burst/acmd.rs b/fighters/dolly/src/burst/acmd.rs index d132d0134c..131209d731 100644 --- a/fighters/dolly/src/burst/acmd.rs +++ b/fighters/dolly/src/burst/acmd.rs @@ -15,7 +15,6 @@ unsafe extern "C" fn game_superspecial(agent: &mut L2CAgentBase) { ATTACK(agent, 1, 0, Hash40::new("top"), 20.0, 71, 42, 0, 110, 15.0, 0.0, 25.0, 3.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); ATTACK(agent, 2, 0, Hash40::new("top"), 20.0, 71, 44, 0, 100, 10.0, 0.0, 40.0, 6.0, None, None, None, 2.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -4, 0.0, 0, false, false, false, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_NO_FLOOR, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_DOLLY_SUPERSPECIAL01, *ATTACK_REGION_ENERGY); } - } unsafe extern "C" fn game_final3(agent: &mut L2CAgentBase) { diff --git a/fighters/dolly/src/opff.rs b/fighters/dolly/src/opff.rs index 801203b0cf..f1c8265ffb 100644 --- a/fighters/dolly/src/opff.rs +++ b/fighters/dolly/src/opff.rs @@ -469,7 +469,6 @@ unsafe fn special_cancels(boma: &mut BattleObjectModuleAccessor) { } } } - } unsafe fn jab_cancels(boma: &mut BattleObjectModuleAccessor) { @@ -741,7 +740,6 @@ unsafe fn smash_cancels(boma: &mut BattleObjectModuleAccessor) { boma.change_status_req(new_status, false); } } - } unsafe fn aerial_cancels(boma: &mut BattleObjectModuleAccessor) { diff --git a/fighters/duckhunt/src/status/attacks3.rs b/fighters/duckhunt/src/status/attacks3.rs index 0a92620750..40c31e6814 100644 --- a/fighters/duckhunt/src/status/attacks3.rs +++ b/fighters/duckhunt/src/status/attacks3.rs @@ -1,4 +1,3 @@ - use super::*; // FIGHTER_STATUS_KIND_ATTACK_S3 diff --git a/fighters/edge/src/flare1/acmd.rs b/fighters/edge/src/flare1/acmd.rs index 39f08ea808..f9e53ecfdd 100644 --- a/fighters/edge/src/flare1/acmd.rs +++ b/fighters/edge/src/flare1/acmd.rs @@ -14,7 +14,6 @@ unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { AttackModule::set_add_reaction_frame(boma, 2, 6.0, false); AttackModule::set_add_reaction_frame(boma, 3, 6.0, false); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/fox/src/acmd/other.rs b/fighters/fox/src/acmd/other.rs index 3cb83ededd..eb3fed17dc 100644 --- a/fighters/fox/src/acmd/other.rs +++ b/fighters/fox/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/fox/src/acmd/throws.rs b/fighters/fox/src/acmd/throws.rs index e3434cd80f..b98ad5e56a 100644 --- a/fighters/fox/src/acmd/throws.rs +++ b/fighters/fox/src/acmd/throws.rs @@ -64,7 +64,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { diff --git a/fighters/ganon/src/acmd/specials.rs b/fighters/ganon/src/acmd/specials.rs index d32dc5943a..abc30dfacb 100644 --- a/fighters/ganon/src/acmd/specials.rs +++ b/fighters/ganon/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_floatstart(agent: &mut L2CAgentBase) { diff --git a/fighters/gaogaen/src/acmd/other.rs b/fighters/gaogaen/src/acmd/other.rs index 4d7d4d1284..f8b747ced6 100644 --- a/fighters/gaogaen/src/acmd/other.rs +++ b/fighters/gaogaen/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; use smash::app::BattleObjectModuleAccessor; diff --git a/fighters/iceclimber/src/acmd/aerials.rs b/fighters/iceclimber/src/acmd/aerials.rs index e8f8da76d0..1cfc48f66c 100644 --- a/fighters/iceclimber/src/acmd/aerials.rs +++ b/fighters/iceclimber/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/acmd/ground.rs b/fighters/iceclimber/src/acmd/ground.rs index 87b4a5fc1f..ec5f486160 100644 --- a/fighters/iceclimber/src/acmd/ground.rs +++ b/fighters/iceclimber/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -27,7 +26,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attack11_nana(agent: &mut L2CAgentBase) { @@ -52,7 +50,6 @@ unsafe extern "C" fn game_attack11_nana(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/acmd/smashes.rs b/fighters/iceclimber/src/acmd/smashes.rs index cce5234621..a1cbf4bb4c 100644 --- a/fighters/iceclimber/src/acmd/smashes.rs +++ b/fighters/iceclimber/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/acmd/specials.rs b/fighters/iceclimber/src/acmd/specials.rs index 725b91d8be..33e8afba47 100644 --- a/fighters/iceclimber/src/acmd/specials.rs +++ b/fighters/iceclimber/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/acmd/throws.rs b/fighters/iceclimber/src/acmd/throws.rs index 4b22b913c0..a3c78fd21a 100644 --- a/fighters/iceclimber/src/acmd/throws.rs +++ b/fighters/iceclimber/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/acmd/tilts.rs b/fighters/iceclimber/src/acmd/tilts.rs index c090ece6ba..af190d3127 100644 --- a/fighters/iceclimber/src/acmd/tilts.rs +++ b/fighters/iceclimber/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -14,7 +13,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -31,7 +29,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { diff --git a/fighters/iceclimber/src/blizzard/acmd.rs b/fighters/iceclimber/src/blizzard/acmd.rs index d2a07ce82c..d6d6755612 100644 --- a/fighters/iceclimber/src/blizzard/acmd.rs +++ b/fighters/iceclimber/src/blizzard/acmd.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_fly(agent: &mut L2CAgentBase) { diff --git a/fighters/inkling/src/acmd/other.rs b/fighters/inkling/src/acmd/other.rs index 10da38a9d5..390e17d32e 100644 --- a/fighters/inkling/src/acmd/other.rs +++ b/fighters/inkling/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { diff --git a/fighters/jack/src/opff.rs b/fighters/jack/src/opff.rs index 3b15bb66ca..70254b7cb5 100644 --- a/fighters/jack/src/opff.rs +++ b/fighters/jack/src/opff.rs @@ -61,7 +61,6 @@ unsafe fn arsene_summon_desmummon(boma: &mut BattleObjectModuleAccessor) { //smash::app::FighterSpecializer_Jack::add_rebel_gauge(boma, app::FighterEntryID(entry_id), 100.0); } } - } // Joker Arsene Grappling Hook diff --git a/fighters/kirby/src/acmd/aerials.rs b/fighters/kirby/src/acmd/aerials.rs index 372d8e3108..0f205f5162 100644 --- a/fighters/kirby/src/acmd/aerials.rs +++ b/fighters/kirby/src/acmd/aerials.rs @@ -38,7 +38,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { @@ -116,7 +114,6 @@ unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { @@ -154,7 +151,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { @@ -180,7 +176,6 @@ unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/copy/littlemac.rs b/fighters/kirby/src/acmd/copy/littlemac.rs index 27c05b6fc8..1c99640bdd 100644 --- a/fighters/kirby/src/acmd/copy/littlemac.rs +++ b/fighters/kirby/src/acmd/copy/littlemac.rs @@ -39,7 +39,6 @@ unsafe extern "C" fn game_littlemacspecialn(agent: &mut L2CAgentBase) { if is_excute(agent) { VarModule::on_flag(agent.object(), vars::kirby::status::KO_PUNCH_GRAVITY); } - } unsafe extern "C" fn effect_littlemacspecialn(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/ground.rs b/fighters/kirby/src/acmd/ground.rs index a71092d20a..40dda72801 100644 --- a/fighters/kirby/src/acmd/ground.rs +++ b/fighters/kirby/src/acmd/ground.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_RESTART); } - } unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { @@ -42,7 +41,6 @@ unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } - } unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index 3dd13b96cd..cf355fca55 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { @@ -70,7 +69,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index 36cf63749a..521d34e5e6 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -268,7 +268,6 @@ unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { HIT_RESET_ALL(agent); } } - } unsafe extern "C" fn sound_attackhi4(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/throws.rs b/fighters/kirby/src/acmd/throws.rs index 72f3716df5..704ede467a 100644 --- a/fighters/kirby/src/acmd/throws.rs +++ b/fighters/kirby/src/acmd/throws.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { @@ -22,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -43,7 +41,6 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { @@ -64,7 +61,6 @@ unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { diff --git a/fighters/kirby/src/acmd/tilts.rs b/fighters/kirby/src/acmd/tilts.rs index f9de6a55a2..a09fc3a849 100644 --- a/fighters/kirby/src/acmd/tilts.rs +++ b/fighters/kirby/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { @@ -15,7 +14,6 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -32,7 +30,6 @@ unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { @@ -50,7 +47,6 @@ unsafe extern "C" fn game_attacks3lw(agent: &mut L2CAgentBase) { HitModule::set_status_all(boma, app::HitStatus(*HIT_STATUS_NORMAL), 0); AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { @@ -73,7 +69,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); HIT_RESET_ALL(agent); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { @@ -92,7 +87,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { HIT_RESET_ALL(agent); AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/kirby/src/status/lucas_special_n.rs b/fighters/kirby/src/status/lucas_special_n.rs index f59bab5a19..bcb1802217 100644 --- a/fighters/kirby/src/status/lucas_special_n.rs +++ b/fighters/kirby/src/status/lucas_special_n.rs @@ -10,7 +10,6 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue{ else { smashline::original_status(Pre, fighter, *FIGHTER_KIRBY_STATUS_KIND_LUCAS_SPECIAL_N)(fighter) } - } // SPECIAL N HOLD // diff --git a/fighters/koopa/src/status/special_s.rs b/fighters/koopa/src/status/special_s.rs index 4548c5a710..d38fb22264 100644 --- a/fighters/koopa/src/status/special_s.rs +++ b/fighters/koopa/src/status/special_s.rs @@ -195,7 +195,6 @@ unsafe extern "C" fn special_s_kinetic_exec(fighter: &mut L2CFighterCommon) { ); } } - } unsafe extern "C" fn specials_squat_main(fighter: &mut L2CFighterCommon) -> L2CValue { diff --git a/fighters/krool/src/status/special_hi.rs b/fighters/krool/src/status/special_hi.rs index c2a4881a44..f2f3b8c051 100644 --- a/fighters/krool/src/status/special_hi.rs +++ b/fighters/krool/src/status/special_hi.rs @@ -215,7 +215,6 @@ unsafe extern "C" fn special_hi_change_motion(fighter: &mut L2CFighterCommon, mo else { MotionModule::change_motion(fighter.module_accessor, motion, 0.0, 1.0, false, 0.0, false, false); } - } // FUN_710001ea30 diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index f81d408c96..31dc57745c 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -169,7 +169,6 @@ unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { diff --git a/fighters/marth/src/acmd/throws.rs b/fighters/marth/src/acmd/throws.rs index 5880842bb7..f829b47f3c 100644 --- a/fighters/marth/src/acmd/throws.rs +++ b/fighters/marth/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/miifighter/src/acmd/other.rs b/fighters/miifighter/src/acmd/other.rs index 25d4483c7c..1a52cc9b2c 100644 --- a/fighters/miifighter/src/acmd/other.rs +++ b/fighters/miifighter/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { diff --git a/fighters/miigunner/src/gunnercharge/acmd.rs b/fighters/miigunner/src/gunnercharge/acmd.rs index 899bfb622c..ac81ceb26f 100644 --- a/fighters/miigunner/src/gunnercharge/acmd.rs +++ b/fighters/miigunner/src/gunnercharge/acmd.rs @@ -17,7 +17,6 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { KineticModule::mul_speed(boma, &motion_vec, *FIGHTER_KINETIC_ENERGY_ID_MOTION); } } - } unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { diff --git a/fighters/miigunner/src/stealthbomb_s/acmd.rs b/fighters/miigunner/src/stealthbomb_s/acmd.rs index 0266dde2bb..193bfad6d0 100644 --- a/fighters/miigunner/src/stealthbomb_s/acmd.rs +++ b/fighters/miigunner/src/stealthbomb_s/acmd.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { if is_excute(agent) { //AreaModule::erase_wind(boma, 0); } - } unsafe extern "C" fn effect_move(agent: &mut L2CAgentBase) { @@ -31,7 +30,6 @@ unsafe extern "C" fn effect_move(agent: &mut L2CAgentBase) { if is_excute(agent) { EFFECT(agent, Hash40::new("sys_bomb_a"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, true); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index c037e74160..43b4750fc9 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -48,7 +48,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { diff --git a/fighters/miiswordsman/src/acmd/specials/special_lw.rs b/fighters/miiswordsman/src/acmd/specials/special_lw.rs index 3980368a72..d338b80342 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_lw.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_lw.rs @@ -305,7 +305,6 @@ unsafe extern "C" fn game_speciallw2(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_MIISWORDSMAN_STATUS_REVERSE_SLASH_FLAG_SPECIAL_FALL); } - } unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { @@ -377,7 +376,6 @@ unsafe extern "C" fn effect_speciallw2(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("sys_thunder"), false, true); EFFECT_DETACH_KIND(agent, Hash40::new("miiswordsman_reflect1"), -1); } - } unsafe extern "C" fn sound_speciallw2(agent: &mut L2CAgentBase) { diff --git a/fighters/miiswordsman/src/acmd/specials/special_s.rs b/fighters/miiswordsman/src/acmd/specials/special_s.rs index e55427ce2b..939bc76406 100644 --- a/fighters/miiswordsman/src/acmd/specials/special_s.rs +++ b/fighters/miiswordsman/src/acmd/specials/special_s.rs @@ -12,7 +12,6 @@ unsafe extern "C" fn game_specials1start(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.4); } - } unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { @@ -23,7 +22,6 @@ unsafe extern "C" fn game_specialairs1start(agent: &mut L2CAgentBase) { if is_excute(agent) { FT_MOTION_RATE(agent, 0.4); } - } unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { @@ -33,7 +31,6 @@ unsafe extern "C" fn game_specials1(agent: &mut L2CAgentBase) { if is_excute(agent) { } - } unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { @@ -43,7 +40,6 @@ unsafe extern "C" fn game_specialairs1(agent: &mut L2CAgentBase) { if is_excute(agent) { } - } /* unsafe fn game_specials1hit(agent: &mut L2CAgentBase) { @@ -59,7 +55,6 @@ unsafe fn game_specials1hit(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } */ diff --git a/fighters/murabito/src/bullet/acmd.rs b/fighters/murabito/src/bullet/acmd.rs index 76b39d3764..48c9762df3 100644 --- a/fighters/murabito/src/bullet/acmd.rs +++ b/fighters/murabito/src/bullet/acmd.rs @@ -15,7 +15,6 @@ unsafe extern "C" fn game_shootf(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("top"), 2.5, 361, 100, 0, 10, 2.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -1, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_PUNCH, *ATTACK_REGION_OBJECT); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/murabito/src/flowerpot/acmd.rs b/fighters/murabito/src/flowerpot/acmd.rs index 75941a5a8d..84bef3a7da 100644 --- a/fighters/murabito/src/flowerpot/acmd.rs +++ b/fighters/murabito/src/flowerpot/acmd.rs @@ -11,7 +11,6 @@ unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { if is_excute(agent) { ATTACK(agent, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } - } unsafe extern "C" fn effect_bound(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; diff --git a/fighters/packun/src/acmd/other.rs b/fighters/packun/src/acmd/other.rs index f1cac837f7..de521a437b 100644 --- a/fighters/packun/src/acmd/other.rs +++ b/fighters/packun/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/pacman/src/acmd/ground.rs b/fighters/pacman/src/acmd/ground.rs index 608f1cb8c6..8d536b2190 100644 --- a/fighters/pacman/src/acmd/ground.rs +++ b/fighters/pacman/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { diff --git a/fighters/palutena/src/acmd/specials/special_n_r.rs b/fighters/palutena/src/acmd/specials/special_n_r.rs index 8ef7e89e05..f55e693a9b 100644 --- a/fighters/palutena/src/acmd/specials/special_n_r.rs +++ b/fighters/palutena/src/acmd/specials/special_n_r.rs @@ -62,7 +62,6 @@ unsafe extern "C" fn effect_specialnr(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light_trace"), false, false); EFFECT_OFF_KIND(agent, Hash40::new("palutena_wand_light2"), false, false); } - } unsafe extern "C" fn sound_specialnr(agent: &mut L2CAgentBase) { diff --git a/fighters/pichu/src/acmd/other.rs b/fighters/pichu/src/acmd/other.rs index cdd9f1bca1..fa1d8318d6 100644 --- a/fighters/pichu/src/acmd/other.rs +++ b/fighters/pichu/src/acmd/other.rs @@ -88,7 +88,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/pickel/src/acmd/aerials.rs b/fighters/pickel/src/acmd/aerials.rs index 4fc8ff1628..96df6e9efd 100644 --- a/fighters/pickel/src/acmd/aerials.rs +++ b/fighters/pickel/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; // Note: Neutral air is handled in tilts.rs, as it shares a script with forward tilt/jab diff --git a/fighters/pickel/src/acmd/ground.rs b/fighters/pickel/src/acmd/ground.rs index 4c4e84ab87..3370df1a53 100644 --- a/fighters/pickel/src/acmd/ground.rs +++ b/fighters/pickel/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; pub fn install(agent: &mut Agent) {} diff --git a/fighters/pickel/src/acmd/other.rs b/fighters/pickel/src/acmd/other.rs index cac66ddc8b..9f55603f16 100644 --- a/fighters/pickel/src/acmd/other.rs +++ b/fighters/pickel/src/acmd/other.rs @@ -11,7 +11,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -42,7 +41,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/pikachu/src/acmd/throws.rs b/fighters/pikachu/src/acmd/throws.rs index b811a0c5f0..07eac50a75 100644 --- a/fighters/pikachu/src/acmd/throws.rs +++ b/fighters/pikachu/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/pikmin/src/acmd/other.rs b/fighters/pikmin/src/acmd/other.rs index 484591324c..8b002a94d0 100644 --- a/fighters/pikmin/src/acmd/other.rs +++ b/fighters/pikmin/src/acmd/other.rs @@ -44,7 +44,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { diff --git a/fighters/purin/src/acmd/specials.rs b/fighters/purin/src/acmd/specials.rs index b7e2673f71..840fb204c6 100644 --- a/fighters/purin/src/acmd/specials.rs +++ b/fighters/purin/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_specialnstart(agent: &mut L2CAgentBase) { diff --git a/fighters/richter/src/acmd/other.rs b/fighters/richter/src/acmd/other.rs index a97f511900..6fc8b9b99f 100644 --- a/fighters/richter/src/acmd/other.rs +++ b/fighters/richter/src/acmd/other.rs @@ -123,7 +123,6 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { @@ -148,7 +147,6 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { diff --git a/fighters/richter/src/acmd/throws.rs b/fighters/richter/src/acmd/throws.rs index d852416833..154268eb1f 100644 --- a/fighters/richter/src/acmd/throws.rs +++ b/fighters/richter/src/acmd/throws.rs @@ -24,7 +24,6 @@ unsafe extern "C" fn richter_catch_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn richter_catch_dash_game(agent: &mut L2CAgentBase) { diff --git a/fighters/robot/src/acmd/throws.rs b/fighters/robot/src/acmd/throws.rs index ee5ddd73cd..737114893c 100644 --- a/fighters/robot/src/acmd/throws.rs +++ b/fighters/robot/src/acmd/throws.rs @@ -22,7 +22,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/acmd/aerials.rs b/fighters/rockman/src/acmd/aerials.rs index 8831d09f13..01a7af7e6b 100644 --- a/fighters/rockman/src/acmd/aerials.rs +++ b/fighters/rockman/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairnmelee(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/acmd/ground.rs b/fighters/rockman/src/acmd/ground.rs index 1c62563b23..f69b240a01 100644 --- a/fighters/rockman/src/acmd/ground.rs +++ b/fighters/rockman/src/acmd/ground.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11melee(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/acmd/other.rs b/fighters/rockman/src/acmd/other.rs index 9b182b3e33..b0a1cb8842 100644 --- a/fighters/rockman/src/acmd/other.rs +++ b/fighters/rockman/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { @@ -8,7 +7,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -40,7 +38,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } /* diff --git a/fighters/rockman/src/acmd/smashes.rs b/fighters/rockman/src/acmd/smashes.rs index 1c83d821d0..3c643b02ae 100644 --- a/fighters/rockman/src/acmd/smashes.rs +++ b/fighters/rockman/src/acmd/smashes.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { @@ -394,7 +393,6 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); FT_MOTION_RATE(agent, 0.800); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/rockman/src/acmd/specials.rs b/fighters/rockman/src/acmd/specials.rs index 3b4756550d..50f1b10248 100644 --- a/fighters/rockman/src/acmd/specials.rs +++ b/fighters/rockman/src/acmd/specials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { @@ -39,7 +38,6 @@ unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1.0); WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - } unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -203,7 +201,6 @@ unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { } } - } unsafe extern "C" fn effect_specialairs(agent: &mut L2CAgentBase) { diff --git a/fighters/rosetta/src/acmd/other.rs b/fighters/rosetta/src/acmd/other.rs index c0b798f1d9..fecac7f6c7 100644 --- a/fighters/rosetta/src/acmd/other.rs +++ b/fighters/rosetta/src/acmd/other.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn sound_damagefly(agent: &mut L2CAgentBase) { diff --git a/fighters/roy/src/acmd/throws.rs b/fighters/roy/src/acmd/throws.rs index c2f0355a86..6f653cd91e 100644 --- a/fighters/roy/src/acmd/throws.rs +++ b/fighters/roy/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { @@ -82,7 +81,6 @@ unsafe extern "C" fn game_throwf(agent: &mut L2CAgentBase) { ModelModule::set_joint_translate(boma, Hash40::new("throw"), &release_position, false, false); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { @@ -100,7 +98,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { @@ -138,7 +135,6 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { if is_excute(agent) { ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/roy/src/acmd/tilts.rs b/fighters/roy/src/acmd/tilts.rs index 99f7140fad..c343f25c19 100644 --- a/fighters/roy/src/acmd/tilts.rs +++ b/fighters/roy/src/acmd/tilts.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { @@ -96,7 +95,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { @@ -111,7 +109,6 @@ unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AFTER_IMAGE_OFF(agent, 10); } - } unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { @@ -151,7 +148,6 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/samus/src/acmd/throws.rs b/fighters/samus/src/acmd/throws.rs index 5bdd9ea1f2..2aac452182 100644 --- a/fighters/samus/src/acmd/throws.rs +++ b/fighters/samus/src/acmd/throws.rs @@ -110,7 +110,6 @@ unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { REVERSE_LR(agent); ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP), WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO)); } - } pub fn install(agent: &mut Agent) { diff --git a/fighters/sheik/src/acmd/throws.rs b/fighters/sheik/src/acmd/throws.rs index eaf266fe8e..220e967739 100644 --- a/fighters/sheik/src/acmd/throws.rs +++ b/fighters/sheik/src/acmd/throws.rs @@ -18,7 +18,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index b0e2f9554a..9c8b3a6234 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -47,7 +47,6 @@ unsafe extern "C" fn game_dash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { @@ -79,7 +78,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } - } unsafe extern "C" fn sound_appealsr(agent : &mut L2CAgentBase) { diff --git a/fighters/szerosuit/src/acmd/aerials.rs b/fighters/szerosuit/src/acmd/aerials.rs index b2f94d02c1..61e7cb6c29 100644 --- a/fighters/szerosuit/src/acmd/aerials.rs +++ b/fighters/szerosuit/src/acmd/aerials.rs @@ -1,4 +1,3 @@ - use super::*; unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { diff --git a/fighters/toonlink/src/acmd/tilts.rs b/fighters/toonlink/src/acmd/tilts.rs index 9cd2c532a1..d2f51860ec 100644 --- a/fighters/toonlink/src/acmd/tilts.rs +++ b/fighters/toonlink/src/acmd/tilts.rs @@ -36,7 +36,6 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { if is_excute(agent) { AttackModule::clear_all(boma); } - } unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { diff --git a/fighters/wiifit/src/acmd/throws.rs b/fighters/wiifit/src/acmd/throws.rs index add3ec7903..aeb97d3362 100644 --- a/fighters/wiifit/src/acmd/throws.rs +++ b/fighters/wiifit/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/wolf/src/acmd/throws.rs b/fighters/wolf/src/acmd/throws.rs index c4630da84c..3d2ffb1bc5 100644 --- a/fighters/wolf/src/acmd/throws.rs +++ b/fighters/wolf/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { diff --git a/fighters/zelda/src/acmd/throws.rs b/fighters/zelda/src/acmd/throws.rs index 2d42a005a0..47d8756eba 100644 --- a/fighters/zelda/src/acmd/throws.rs +++ b/fighters/zelda/src/acmd/throws.rs @@ -21,7 +21,6 @@ unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } - } unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { From fc7aa040259a2ef65e20143b07be9a9b3afe8fae Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 13:40:43 -0500 Subject: [PATCH 170/172] will i ever stop cleaning --- fighters/bayonetta/src/acmd/aerials.rs | 28 +++--- fighters/bayonetta/src/acmd/other.rs | 2 +- fighters/bayonetta/src/acmd/specials.rs | 2 +- fighters/bayonetta/src/opff.rs | 1 + fighters/bayonetta/src/wickedweavearm/acmd.rs | 1 + fighters/buddy/src/opff.rs | 2 +- fighters/captain/src/acmd/aerials.rs | 2 - fighters/chrom/src/acmd/other.rs | 28 +++--- .../src/general_statuses/attack/attackair.rs | 1 + .../src/general_statuses/attack/attackdash.rs | 1 + fighters/daisy/src/opff.rs | 1 + fighters/demon/src/opff.rs | 1 + fighters/diddy/src/acmd/aerials.rs | 1 - fighters/diddy/src/opff.rs | 1 + fighters/elight/src/acmd/specials.rs | 15 ++-- fighters/elight/src/bunshin/acmd.rs | 3 + fighters/ganon/src/opff.rs | 1 + fighters/jack/src/acmd/tilts.rs | 2 +- fighters/ken/src/acmd/finals.rs | 1 + fighters/ken/src/acmd/specials/special_n.rs | 1 - fighters/ken/src/opff.rs | 1 + fighters/ken/src/shinryuken/acmd.rs | 3 + fighters/ken/src/status/finals.rs | 1 + fighters/kirby/src/acmd/aerials.rs | 18 ++-- fighters/kirby/src/acmd/ground.rs | 11 +-- fighters/kirby/src/acmd/other.rs | 26 +++--- fighters/kirby/src/acmd/smashes.rs | 90 ++++++++++--------- fighters/kirby/src/acmd/specials.rs | 63 ++++++------- fighters/kirby/src/acmd/throws.rs | 18 ++-- fighters/kirby/src/acmd/tilts.rs | 28 +++--- fighters/kirby/src/opff.rs | 1 + fighters/koopa/src/breath/acmd.rs | 1 - fighters/lucario/src/status/attack_hi4.rs | 1 + fighters/lucas/src/acmd/aerials.rs | 4 +- fighters/lucas/src/acmd/throws.rs | 2 +- fighters/lucas/src/pkfire/acmd.rs | 1 + fighters/lucas/src/pkthunder/acmd.rs | 3 +- fighters/mario/src/opff.rs | 1 + fighters/mewtwo/src/acmd/tilts.rs | 1 - fighters/mewtwo/src/opff.rs | 1 - fighters/miiswordsman/src/acmd/other.rs | 1 - fighters/murabito/src/flowerpot/acmd.rs | 1 + fighters/ness/src/acmd/specials.rs | 10 +-- fighters/ness/src/pkfire/acmd.rs | 1 + fighters/packun/src/status/special_s.rs | 1 + fighters/pacman/src/lib.rs | 2 +- fighters/peach/src/status/attack_air.rs | 1 + fighters/peach/src/status/jump_aerial.rs | 1 + fighters/peach/src/status/special_lw.rs | 1 + fighters/pfushigisou/src/opff.rs | 1 + fighters/pickel/src/lib.rs | 2 +- fighters/pikmin/src/status/attack_air.rs | 1 + fighters/pit/src/opff.rs | 1 + fighters/pzenigame/src/opff.rs | 1 + fighters/richter/src/acmd/other.rs | 2 + fighters/richter/src/acmd/throws.rs | 1 + fighters/rockman/src/lib.rs | 2 +- fighters/rockman/src/opff.rs | 1 + fighters/roy/src/acmd/aerials.rs | 1 - fighters/roy/src/opff.rs | 2 +- fighters/ryu/src/status/finals.rs | 1 + fighters/samusd/src/cshot/acmd.rs | 2 +- fighters/shizue/src/opff.rs | 2 - fighters/shulk/src/opff.rs | 2 +- fighters/simon/src/acmd/smashes.rs | 2 - fighters/simon/src/lib.rs | 2 +- fighters/snake/src/nikitamissile/acmd.rs | 1 - fighters/snake/src/status/appeal.rs | 3 + fighters/snake/src/status/catch.rs | 2 + fighters/sonic/src/status/dash.rs | 1 + fighters/sonic/src/status/wait.rs | 1 + fighters/tantan/src/opff.rs | 7 +- fighters/toonlink/src/opff.rs | 1 + fighters/wario/src/acmd/throws.rs | 1 - fighters/younglink/src/opff.rs | 1 + 75 files changed, 240 insertions(+), 193 deletions(-) diff --git a/fighters/bayonetta/src/acmd/aerials.rs b/fighters/bayonetta/src/acmd/aerials.rs index ca255c1bb4..e9681cf544 100644 --- a/fighters/bayonetta/src/acmd/aerials.rs +++ b/fighters/bayonetta/src/acmd/aerials.rs @@ -436,21 +436,21 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attackairn); - agent.acmd("game_attackairnhold", game_attackairnhold); + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("game_attackairnhold", game_attackairnhold); - agent.acmd("game_attackairf", game_attackairf); - agent.acmd("game_attackairf2", game_attackairf2); - agent.acmd("game_attackairf3", game_attackairf3); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("game_attackairf2", game_attackairf2); + agent.acmd("game_attackairf3", game_attackairf3); - agent.acmd("game_attackairb", game_attackairb); - agent.acmd("expression_attackairb", expression_attackairb); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("expression_attackairb", expression_attackairb); - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("effect_attackairhi", effect_attackairhi); - agent.acmd("expression_attackairhi", expression_attackairhi); - agent.acmd("game_attackairhihold", game_attackairhihold); - - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("expression_attackairhi", expression_attackairhi); + agent.acmd("game_attackairhihold", game_attackairhihold); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/bayonetta/src/acmd/other.rs b/fighters/bayonetta/src/acmd/other.rs index 87003ffdae..26b97e8643 100644 --- a/fighters/bayonetta/src/acmd/other.rs +++ b/fighters/bayonetta/src/acmd/other.rs @@ -156,7 +156,7 @@ unsafe extern "C" fn game_appealhir(agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 210/(100-1)); } -unsafe extern "C" fn sound_appealhil (agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_appealhil(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); diff --git a/fighters/bayonetta/src/acmd/specials.rs b/fighters/bayonetta/src/acmd/specials.rs index 4610e27709..9898a3bfb3 100644 --- a/fighters/bayonetta/src/acmd/specials.rs +++ b/fighters/bayonetta/src/acmd/specials.rs @@ -429,7 +429,7 @@ unsafe extern "C" fn sound_specialhi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_speciallw (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); diff --git a/fighters/bayonetta/src/opff.rs b/fighters/bayonetta/src/opff.rs index 60ef08a17c..4af915b34b 100644 --- a/fighters/bayonetta/src/opff.rs +++ b/fighters/bayonetta/src/opff.rs @@ -146,6 +146,7 @@ pub unsafe extern "C" fn bayonetta_frame_wrapper(fighter: &mut L2CFighterCommon) common::opff::fighter_common_opff(fighter); bayonetta_frame(fighter); } + pub unsafe fn bayonetta_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.frame); diff --git a/fighters/bayonetta/src/wickedweavearm/acmd.rs b/fighters/bayonetta/src/wickedweavearm/acmd.rs index ab1c69c5af..cbab51e4eb 100644 --- a/fighters/bayonetta/src/wickedweavearm/acmd.rs +++ b/fighters/bayonetta/src/wickedweavearm/acmd.rs @@ -96,6 +96,7 @@ unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { WorkModule::off_flag(boma, *WEAPON_BAYONETTA_WICKEDWEAVEARM_INSTANCE_WORK_ID_FLAG_CANCEL_EFFECT); } } + unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/buddy/src/opff.rs b/fighters/buddy/src/opff.rs index 1a7ecee6ab..645c6b4b4e 100644 --- a/fighters/buddy/src/opff.rs +++ b/fighters/buddy/src/opff.rs @@ -156,8 +156,8 @@ unsafe fn beakbomb_control(fighter: &mut L2CFighterCommon, boma: &mut BattleObje let motion_offset = -0.125; let motion_vec = Vector3f{x: 0.0, y: motion_offset+(VarModule::get_float(boma.object(), vars::buddy::instance::BEAKBOMB_ANGLE)*motion_factor), z: 0.0}; KineticModule::add_speed_outside(fighter.module_accessor, *KINETIC_OUTSIDE_ENERGY_TYPE_WIND_NO_ADDITION, &motion_vec); - } + unsafe fn beakbomb_update(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor,status: i32){ let sideSpecial = [ *FIGHTER_STATUS_KIND_SPECIAL_S, diff --git a/fighters/captain/src/acmd/aerials.rs b/fighters/captain/src/acmd/aerials.rs index e1fb29b472..3c63e12b73 100644 --- a/fighters/captain/src/acmd/aerials.rs +++ b/fighters/captain/src/acmd/aerials.rs @@ -170,8 +170,6 @@ unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { } } - - unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 7.0); diff --git a/fighters/chrom/src/acmd/other.rs b/fighters/chrom/src/acmd/other.rs index e0e4722c1a..0edb50ef46 100644 --- a/fighters/chrom/src/acmd/other.rs +++ b/fighters/chrom/src/acmd/other.rs @@ -118,19 +118,19 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damagefly); - agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflytop", sound_damagefly); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - - agent.acmd("game_dash", game_dash); - agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("game_dash", game_dash); + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); - agent.acmd("game_appeallwl", game_appeallwl); - agent.acmd("game_appeallwr", game_appeallwl); - - agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); + agent.acmd("game_appeallwl", game_appeallwl); + agent.acmd("game_appeallwr", game_appeallwl); + + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/common/src/general_statuses/attack/attackair.rs b/fighters/common/src/general_statuses/attack/attackair.rs index 60d64d326c..a1c7acf9f7 100644 --- a/fighters/common/src/general_statuses/attack/attackair.rs +++ b/fighters/common/src/general_statuses/attack/attackair.rs @@ -106,6 +106,7 @@ fn nro_hook(info: &skyline::nro::NroInfo) { ); } } + pub fn install() { skyline::nro::add_hook(nro_hook); } \ No newline at end of file diff --git a/fighters/common/src/general_statuses/attack/attackdash.rs b/fighters/common/src/general_statuses/attack/attackdash.rs index dd7bcca640..a04ed8520d 100644 --- a/fighters/common/src/general_statuses/attack/attackdash.rs +++ b/fighters/common/src/general_statuses/attack/attackdash.rs @@ -12,6 +12,7 @@ fn nro_hook(info: &skyline::nro::NroInfo) { ); } } + pub fn install() { skyline::nro::add_hook(nro_hook); // Agent::new("fighter") diff --git a/fighters/daisy/src/opff.rs b/fighters/daisy/src/opff.rs index 5613b99095..3ff8c0f9a3 100644 --- a/fighters/daisy/src/opff.rs +++ b/fighters/daisy/src/opff.rs @@ -72,6 +72,7 @@ pub unsafe extern "C" fn daisy_frame_wrapper(fighter: &mut L2CFighterCommon) { common::opff::fighter_common_opff(fighter); daisy_frame(fighter) } + pub unsafe fn daisy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); diff --git a/fighters/demon/src/opff.rs b/fighters/demon/src/opff.rs index d741a75477..d60a3135df 100644 --- a/fighters/demon/src/opff.rs +++ b/fighters/demon/src/opff.rs @@ -255,6 +255,7 @@ pub unsafe fn demon_frame(fighter: &mut L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, demon_frame_wrapper); } diff --git a/fighters/diddy/src/acmd/aerials.rs b/fighters/diddy/src/acmd/aerials.rs index 2ba4b05554..fb83583157 100644 --- a/fighters/diddy/src/acmd/aerials.rs +++ b/fighters/diddy/src/acmd/aerials.rs @@ -159,7 +159,6 @@ unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { } } - unsafe extern "C" fn expression_attackairhi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/diddy/src/opff.rs b/fighters/diddy/src/opff.rs index 34b8671a40..0bcbff4b7c 100644 --- a/fighters/diddy/src/opff.rs +++ b/fighters/diddy/src/opff.rs @@ -194,6 +194,7 @@ pub unsafe fn diddy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, diddy_frame_wrapper); } diff --git a/fighters/elight/src/acmd/specials.rs b/fighters/elight/src/acmd/specials.rs index 9cadbd4a4d..bddd56a88a 100644 --- a/fighters/elight/src/acmd/specials.rs +++ b/fighters/elight/src/acmd/specials.rs @@ -35,7 +35,7 @@ unsafe fn manage_sword_motion(agent: &mut L2CAgentBase, motion: Hash40) { } } -unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ @@ -189,7 +189,7 @@ unsafe extern "C" fn game_specialn (agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialn2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ @@ -395,7 +395,7 @@ unsafe extern "C" fn game_specialn2 (agent: &mut L2CAgentBase) { // for SOME reason, full charge aerial neutral b would crash if i did the above script as a multiscript install // so we need to reimplement the aerial version too /shrug -unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairn2(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if ArticleModule::is_exist(boma, *FIGHTER_ELIGHT_GENERATE_ARTICLE_ESWORD){ @@ -590,7 +590,7 @@ unsafe extern "C" fn game_specialairn2 (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specialairsstart (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -599,7 +599,7 @@ unsafe extern "C" fn game_specialairsstart (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialsstart (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -620,7 +620,7 @@ unsafe extern "C" fn effect_specialsstart (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairsstart (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairsstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -640,7 +640,7 @@ unsafe extern "C" fn effect_specialairsstart (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -892,6 +892,7 @@ unsafe extern "C" fn effect_specialairsend(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } + unsafe extern "C" fn game_speciallw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; frame(lua_state, 1.0); diff --git a/fighters/elight/src/bunshin/acmd.rs b/fighters/elight/src/bunshin/acmd.rs index b57737d44d..c61259cccb 100644 --- a/fighters/elight/src/bunshin/acmd.rs +++ b/fighters/elight/src/bunshin/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_specialairs5(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -7,6 +8,7 @@ unsafe extern "C" fn game_specialairs5(agent: &mut L2CAgentBase) { VisibilityModule::set_whole(boma, false); } } + unsafe extern "C" fn effect_specialairs5(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -53,6 +55,7 @@ unsafe extern "C" fn effect_specialairs5(agent: &mut L2CAgentBase) { EFFECT_OFF_KIND(agent, Hash40::new("elight_photon_sword"), true, true); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_specialairs5", game_specialairs5); agent.acmd("game_specials5", game_specialairs5); diff --git a/fighters/ganon/src/opff.rs b/fighters/ganon/src/opff.rs index ed0a2d08a7..95db94f2e0 100644 --- a/fighters/ganon/src/opff.rs +++ b/fighters/ganon/src/opff.rs @@ -79,6 +79,7 @@ pub unsafe fn ganon_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, ganon_frame_wrapper); } diff --git a/fighters/jack/src/acmd/tilts.rs b/fighters/jack/src/acmd/tilts.rs index 544c56da56..08cc6f95fd 100644 --- a/fighters/jack/src/acmd/tilts.rs +++ b/fighters/jack/src/acmd/tilts.rs @@ -139,7 +139,7 @@ unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_attackhi3 (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_attackhi3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 8.0); diff --git a/fighters/ken/src/acmd/finals.rs b/fighters/ken/src/acmd/finals.rs index 113224cc16..1a65c9f5ad 100644 --- a/fighters/ken/src/acmd/finals.rs +++ b/fighters/ken/src/acmd/finals.rs @@ -482,6 +482,7 @@ unsafe extern "C" fn ken_shinryuken_effect_final(agent: &mut L2CAgentBase) { EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_final", game_final); agent.acmd("game_finalair", game_final); diff --git a/fighters/ken/src/acmd/specials/special_n.rs b/fighters/ken/src/acmd/specials/special_n.rs index 4a1de6cc4e..02a4bebb66 100644 --- a/fighters/ken/src/acmd/specials/special_n.rs +++ b/fighters/ken/src/acmd/specials/special_n.rs @@ -291,7 +291,6 @@ unsafe extern "C" fn effect_specialairn(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_specialn", game_specialn); agent.acmd("game_specialairn", game_specialairn); diff --git a/fighters/ken/src/opff.rs b/fighters/ken/src/opff.rs index d27413d50c..7b022ff0fd 100644 --- a/fighters/ken/src/opff.rs +++ b/fighters/ken/src/opff.rs @@ -359,6 +359,7 @@ unsafe fn rotate_forward_bair(boma: &mut BattleObjectModuleAccessor) { } } } + unsafe fn ken_ex_focus(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, frame: f32) { // enter EX if A+B on frame<5 if fighter.is_status_one_of(&[ diff --git a/fighters/ken/src/shinryuken/acmd.rs b/fighters/ken/src/shinryuken/acmd.rs index 08590c0e47..2a05ab2cbf 100644 --- a/fighters/ken/src/shinryuken/acmd.rs +++ b/fighters/ken/src/shinryuken/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -24,6 +25,7 @@ unsafe extern "C" fn game_final(agent: &mut L2CAgentBase) { AttackModule::clear_all(boma); } } + unsafe extern "C" fn effect_final(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -37,6 +39,7 @@ unsafe extern "C" fn effect_final(agent: &mut L2CAgentBase) { EFFECT_DETACH_KIND(agent, Hash40::new("ken_final_shinryuken_beam"), -1); } } + pub fn install(agent: &mut Agent) { agent.acmd("game_final", game_final); agent.acmd("effect_final", effect_final); diff --git a/fighters/ken/src/status/finals.rs b/fighters/ken/src/status/finals.rs index e7cba91312..8a54a4f330 100644 --- a/fighters/ken/src/status/finals.rs +++ b/fighters/ken/src/status/finals.rs @@ -41,6 +41,7 @@ pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); diff --git a/fighters/kirby/src/acmd/aerials.rs b/fighters/kirby/src/acmd/aerials.rs index 0f205f5162..99fdb36b2b 100644 --- a/fighters/kirby/src/acmd/aerials.rs +++ b/fighters/kirby/src/acmd/aerials.rs @@ -187,11 +187,15 @@ unsafe extern "C" fn game_landingairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attackairn", game_attackairn); - agent.acmd("game_attackairf", game_attackairf); - agent.acmd("game_attackairb", game_attackairb); - agent.acmd("effect_attackairb", effect_attackairb); - agent.acmd("game_attackairhi", game_attackairhi); - agent.acmd("game_attackairlw", game_attackairlw); - agent.acmd("game_landingairlw", game_landingairlw); + agent.acmd("game_attackairn", game_attackairn); + + agent.acmd("game_attackairf", game_attackairf); + + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + + agent.acmd("game_attackairhi", game_attackairhi); + + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("game_landingairlw", game_landingairlw); } diff --git a/fighters/kirby/src/acmd/ground.rs b/fighters/kirby/src/acmd/ground.rs index 40dda72801..381eb86ec0 100644 --- a/fighters/kirby/src/acmd/ground.rs +++ b/fighters/kirby/src/acmd/ground.rs @@ -128,9 +128,10 @@ unsafe extern "C" fn sound_attackdash(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attack11", game_attack11); - agent.acmd("game_attack12", game_attack12); - agent.acmd("game_attackdash", game_attackdash); - agent.acmd("effect_attackdash", effect_attackdash); - agent.acmd("sound_attackdash", sound_attackdash); + agent.acmd("game_attack11", game_attack11); + agent.acmd("game_attack12", game_attack12); + + agent.acmd("game_attackdash", game_attackdash); + agent.acmd("effect_attackdash", effect_attackdash); + agent.acmd("sound_attackdash", sound_attackdash); } diff --git a/fighters/kirby/src/acmd/other.rs b/fighters/kirby/src/acmd/other.rs index cf355fca55..8cd65ba0ed 100644 --- a/fighters/kirby/src/acmd/other.rs +++ b/fighters/kirby/src/acmd/other.rs @@ -118,18 +118,18 @@ unsafe extern "C" fn effect_landingheavy(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("sound_damageflyhi", sound_damagefly); - agent.acmd("sound_damageflylw", sound_damagefly); - agent.acmd("sound_damageflyn", sound_damagefly); - agent.acmd("sound_damageflytop", sound_damagefly); - agent.acmd("sound_damageflyroll", sound_damageflyroll); - - agent.acmd("sound_dash", sound_dash); - agent.acmd("game_turndash", game_turndash); + agent.acmd("sound_damageflyhi", sound_damagefly); + agent.acmd("sound_damageflylw", sound_damagefly); + agent.acmd("sound_damageflyn", sound_damagefly); + agent.acmd("sound_damageflytop", sound_damagefly); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + + agent.acmd("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); - agent.acmd("game_escapeair", game_escapeair); - agent.acmd("game_escapeairslide", game_escapeairslide); - - agent.acmd("game_landingheavy", game_landingheavy); - agent.acmd("effect_landingheavy", effect_landingheavy); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); + + agent.acmd("game_landingheavy", game_landingheavy); + agent.acmd("effect_landingheavy", effect_landingheavy); } diff --git a/fighters/kirby/src/acmd/smashes.rs b/fighters/kirby/src/acmd/smashes.rs index 521d34e5e6..9e9648fe9a 100644 --- a/fighters/kirby/src/acmd/smashes.rs +++ b/fighters/kirby/src/acmd/smashes.rs @@ -1,6 +1,6 @@ use super::*; -unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { @@ -11,7 +11,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -33,7 +33,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -46,7 +46,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -58,7 +58,7 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { @@ -69,7 +69,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 106, 0, 40, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 19.0, 361, 103, 0, 36, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.35, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -91,7 +91,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -104,7 +104,7 @@ unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { } frame(lua_state, 13.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 106, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 15.0, 361, 103, 0, 32, 4.2, 0.0, -7.5, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } frame(lua_state, 16.0); if is_excute(agent) { @@ -376,6 +376,31 @@ unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + frame(lua_state, 6.0); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start_04")); + if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { + PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); + PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); + } + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("vc_kirby_attack07")); + } + wait(lua_state, 1.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_smash_l01")); + } + wait(lua_state, 40.0); + if is_excute(agent) { + PLAY_SE(agent, Hash40::new("se_kirby_landing01")); + } +} + unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -407,41 +432,18 @@ unsafe extern "C" fn expression_attacklw4(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let boma = agent.boma(); - frame(lua_state, 6.0); - if is_excute(agent) { - STOP_SE(agent, Hash40::new("se_common_smash_start_04")); - if WorkModule::get_int(boma, *FIGHTER_KIRBY_INSTANCE_WORK_ID_INT_COPY_CHARA) == FIGHTER_KIND_LUCAS && VarModule::is_flag(agent.object(), vars::lucas::instance::SPECIAL_N_OFFENSE_UP_ACTIVE) { - PLAY_SE_REMAIN(agent, Hash40::new("se_lucas_special_n04_ll")); - PLAY_SE_REMAIN(agent, Hash40::new("se_common_electric_hit_m")); - } - } - wait(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("vc_kirby_attack07")); - } - wait(lua_state, 1.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_kirby_smash_l01")); - } - wait(lua_state, 40.0); - if is_excute(agent) { - PLAY_SE(agent, Hash40::new("se_kirby_landing01")); - } -} - pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks4hi", game_attacks4hi); - agent.acmd("game_attacks4", game_attacks4); - agent.acmd("game_attacks4lw", game_attacks4lw); - agent.acmd("sound_attacks4hi", sound_attacks4); - agent.acmd("sound_attacks4", sound_attacks4); - agent.acmd("sound_attacks4lw", sound_attacks4); - agent.acmd("game_attackhi4", game_attackhi4); - agent.acmd("sound_attackhi4", sound_attackhi4); - agent.acmd("game_attacklw4", game_attacklw4); - agent.acmd("expression_attacklw4", expression_attacklw4); - agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacks4hi", game_attacks4hi); + agent.acmd("game_attacks4lw", game_attacks4lw); + agent.acmd("sound_attacks4", sound_attacks4); + agent.acmd("sound_attacks4hi", sound_attacks4); + agent.acmd("sound_attacks4lw", sound_attacks4); + + agent.acmd("game_attackhi4", game_attackhi4); + agent.acmd("sound_attackhi4", sound_attackhi4); + + agent.acmd("game_attacklw4", game_attacklw4); + agent.acmd("sound_attacklw4", sound_attacklw4); + agent.acmd("expression_attacklw4", expression_attacklw4); } diff --git a/fighters/kirby/src/acmd/specials.rs b/fighters/kirby/src/acmd/specials.rs index e761cc60b4..7c2ac3763a 100644 --- a/fighters/kirby/src/acmd/specials.rs +++ b/fighters/kirby/src/acmd/specials.rs @@ -580,34 +580,37 @@ unsafe extern "C" fn effect_specialairlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_specialnstart", game_specialnstart); - agent.acmd("game_specialairnstart", game_specialnstart); - agent.acmd("game_specialnloop", game_specialnloop); - agent.acmd("game_specialairnloop", game_specialnloop); - agent.acmd("game_specialneat", game_specialneat); - agent.acmd("game_specialairneat", game_specialneat); - agent.acmd("game_specialndrink", game_specialndrink); - agent.acmd("game_specialairndrink", game_specialndrink); - agent.acmd("game_specialnlarge", game_specialnlarge); - agent.acmd("game_specialairnlarge", game_specialnlarge); - agent.acmd("game_specialsstart", game_specialsstart); - agent.acmd("game_specials", game_specials); - agent.acmd("game_specialss", game_specialss); - agent.acmd("game_specialsmax", game_specialsmax); - agent.acmd("game_specialairsstart", game_specialairsstart); - agent.acmd("game_specialairs", game_specialairs); - agent.acmd("game_specialairss", game_specialairss); - agent.acmd("game_specialairhi2", game_specialairhi2); - agent.acmd("effect_specialairhi2", effect_specialairhi2); - agent.acmd("game_specialhih", game_specialhih); - agent.acmd("effect_specialhih", effect_specialhih); - agent.acmd("sound_specialhih", sound_specialhih); - agent.acmd("expression_specialhih", expression_specialhih); - agent.acmd("game_specialairhih", game_specialairhih); - agent.acmd("effect_specialairhih", effect_specialairhih); - agent.acmd("sound_specialairhih", sound_specialairhih); - agent.acmd("expression_specialairhih", expression_specialairhih); - agent.acmd("game_speciallw", game_speciallw); - agent.acmd("game_specialairlw", game_specialairlw); - agent.acmd("effect_specialairlw", effect_specialairlw); + agent.acmd("game_specialnstart", game_specialnstart); + agent.acmd("game_specialairnstart", game_specialnstart); + agent.acmd("game_specialnloop", game_specialnloop); + agent.acmd("game_specialairnloop", game_specialnloop); + agent.acmd("game_specialneat", game_specialneat); + agent.acmd("game_specialairneat", game_specialneat); + agent.acmd("game_specialndrink", game_specialndrink); + agent.acmd("game_specialairndrink", game_specialndrink); + agent.acmd("game_specialnlarge", game_specialnlarge); + agent.acmd("game_specialairnlarge", game_specialnlarge); + + agent.acmd("game_specialsstart", game_specialsstart); + agent.acmd("game_specials", game_specials); + agent.acmd("game_specialss", game_specialss); + agent.acmd("game_specialsmax", game_specialsmax); + agent.acmd("game_specialairsstart", game_specialairsstart); + agent.acmd("game_specialairs", game_specialairs); + agent.acmd("game_specialairss", game_specialairss); + + agent.acmd("game_specialairhi2", game_specialairhi2); + agent.acmd("effect_specialairhi2", effect_specialairhi2); + agent.acmd("game_specialhih", game_specialhih); + agent.acmd("effect_specialhih", effect_specialhih); + agent.acmd("sound_specialhih", sound_specialhih); + agent.acmd("expression_specialhih", expression_specialhih); + agent.acmd("game_specialairhih", game_specialairhih); + agent.acmd("effect_specialairhih", effect_specialairhih); + agent.acmd("sound_specialairhih", sound_specialairhih); + agent.acmd("expression_specialairhih", expression_specialairhih); + + agent.acmd("game_speciallw", game_speciallw); + agent.acmd("game_specialairlw", game_specialairlw); + agent.acmd("effect_specialairlw", effect_specialairlw); } diff --git a/fighters/kirby/src/acmd/throws.rs b/fighters/kirby/src/acmd/throws.rs index 704ede467a..9af68ded46 100644 --- a/fighters/kirby/src/acmd/throws.rs +++ b/fighters/kirby/src/acmd/throws.rs @@ -204,11 +204,15 @@ unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_catch", game_catch); - agent.acmd("game_catchdash", game_catchdash); - agent.acmd("game_catchturn", game_catchturn); - agent.acmd("game_throwf", game_throwf); - agent.acmd("game_throwb", game_throwb); - agent.acmd("game_throwhi", game_throwhi); - agent.acmd("game_throwlw", game_throwlw); + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + + agent.acmd("game_throwf", game_throwf); + + agent.acmd("game_throwb", game_throwb); + + agent.acmd("game_throwhi", game_throwhi); + + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/kirby/src/acmd/tilts.rs b/fighters/kirby/src/acmd/tilts.rs index a09fc3a849..c7cfeabbc5 100644 --- a/fighters/kirby/src/acmd/tilts.rs +++ b/fighters/kirby/src/acmd/tilts.rs @@ -1,13 +1,13 @@ use super::*; -unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); if is_excute(agent) { @@ -16,14 +16,14 @@ unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_attacks3hi(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 5.0); if is_excute(agent) { - ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); - ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 361, 104, 0, 40, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 0, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.1, 1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 1, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.3, 1.0, -4.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); + ATTACK(agent, 2, 0, Hash40::new("footl"), 9.0, 60, 45, 0, 60, 3.0, 1.0, -8.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_KICK); } wait(lua_state, 4.0); if is_excute(agent) { @@ -90,9 +90,11 @@ unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { } pub fn install(agent: &mut Agent) { - agent.acmd("game_attacks3hi", game_attacks3hi); - agent.acmd("game_attacks3", game_attacks3); - agent.acmd("game_attacks3lw", game_attacks3lw); - agent.acmd("game_attackhi3", game_attackhi3); - agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("game_attacks3hi", game_attacks3hi); + agent.acmd("game_attacks3lw", game_attacks3lw); + + agent.acmd("game_attackhi3", game_attackhi3); + + agent.acmd("game_attacklw3", game_attacklw3); } diff --git a/fighters/kirby/src/opff.rs b/fighters/kirby/src/opff.rs index 2a9b2e6f71..4b3e5a4e77 100644 --- a/fighters/kirby/src/opff.rs +++ b/fighters/kirby/src/opff.rs @@ -160,6 +160,7 @@ pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, kirby_frame_wrapper); } diff --git a/fighters/koopa/src/breath/acmd.rs b/fighters/koopa/src/breath/acmd.rs index 02ce4e28c2..e16f34224d 100644 --- a/fighters/koopa/src/breath/acmd.rs +++ b/fighters/koopa/src/breath/acmd.rs @@ -57,7 +57,6 @@ unsafe extern "C" fn effect_end(agent: &mut L2CAgentBase) { ); } - pub fn install(agent: &mut Agent) { agent.acmd("game_max", game_max); agent.acmd("effect_max", effect_max); diff --git a/fighters/lucario/src/status/attack_hi4.rs b/fighters/lucario/src/status/attack_hi4.rs index 58104e0f16..24661f6660 100644 --- a/fighters/lucario/src/status/attack_hi4.rs +++ b/fighters/lucario/src/status/attack_hi4.rs @@ -90,6 +90,7 @@ unsafe extern "C" fn attack_hi_set_kinetic(fighter: &mut L2CFighterCommon) { // KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_MOTION); } } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_pre); agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_HI4, attack_hi4_main); diff --git a/fighters/lucas/src/acmd/aerials.rs b/fighters/lucas/src/acmd/aerials.rs index 4347a5939e..05b46e9590 100644 --- a/fighters/lucas/src/acmd/aerials.rs +++ b/fighters/lucas/src/acmd/aerials.rs @@ -97,7 +97,7 @@ unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_attackairn (agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_attackairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 7.0); @@ -139,7 +139,7 @@ unsafe extern "C" fn game_landingairn(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_landingairn (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_landingairn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { diff --git a/fighters/lucas/src/acmd/throws.rs b/fighters/lucas/src/acmd/throws.rs index 31dc57745c..03377bacb4 100644 --- a/fighters/lucas/src/acmd/throws.rs +++ b/fighters/lucas/src/acmd/throws.rs @@ -75,7 +75,7 @@ unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_catchturn (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { diff --git a/fighters/lucas/src/pkfire/acmd.rs b/fighters/lucas/src/pkfire/acmd.rs index 9826ffae6c..4fff1e7442 100644 --- a/fighters/lucas/src/pkfire/acmd.rs +++ b/fighters/lucas/src/pkfire/acmd.rs @@ -8,6 +8,7 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { AttackModule::enable_safe_pos(boma); } } + unsafe extern "C" fn effect_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/lucas/src/pkthunder/acmd.rs b/fighters/lucas/src/pkthunder/acmd.rs index d86073adb7..7d14391cc2 100644 --- a/fighters/lucas/src/pkthunder/acmd.rs +++ b/fighters/lucas/src/pkthunder/acmd.rs @@ -1,4 +1,5 @@ use super::*; + unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -12,6 +13,7 @@ unsafe extern "C" fn game_move(agent: &mut L2CAgentBase) { } } } + unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); @@ -27,7 +29,6 @@ unsafe extern "C" fn game_movechild(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_move", game_move); agent.acmd("game_movechild", game_movechild); diff --git a/fighters/mario/src/opff.rs b/fighters/mario/src/opff.rs index e3d307f6df..c893e23bc6 100644 --- a/fighters/mario/src/opff.rs +++ b/fighters/mario/src/opff.rs @@ -265,6 +265,7 @@ pub unsafe fn mario_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, mario_frame_wrapper); } diff --git a/fighters/mewtwo/src/acmd/tilts.rs b/fighters/mewtwo/src/acmd/tilts.rs index 2fc7c8d210..1fb8fd02d9 100644 --- a/fighters/mewtwo/src/acmd/tilts.rs +++ b/fighters/mewtwo/src/acmd/tilts.rs @@ -342,7 +342,6 @@ unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_attacks3", game_attacks3); agent.acmd("effect_attacks3", effect_attacks3); diff --git a/fighters/mewtwo/src/opff.rs b/fighters/mewtwo/src/opff.rs index d11ba1a4d9..c2ec19673d 100644 --- a/fighters/mewtwo/src/opff.rs +++ b/fighters/mewtwo/src/opff.rs @@ -58,7 +58,6 @@ unsafe fn dj_upB_jump_refresh(fighter: &mut L2CFighterCommon) { } } - pub unsafe fn mewtwo_teleport_wall_ride(fighter: &mut smash::lua2cpp::L2CFighterCommon, boma: &mut BattleObjectModuleAccessor, status_kind: i32, id: usize) { // Wall Ride momentum fixes let touch_right = GroundModule::is_wall_touch_line(boma, *GROUND_TOUCH_FLAG_RIGHT_SIDE as u32); diff --git a/fighters/miiswordsman/src/acmd/other.rs b/fighters/miiswordsman/src/acmd/other.rs index 43b4750fc9..2b3e5e114e 100644 --- a/fighters/miiswordsman/src/acmd/other.rs +++ b/fighters/miiswordsman/src/acmd/other.rs @@ -81,7 +81,6 @@ unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { } } - unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/murabito/src/flowerpot/acmd.rs b/fighters/murabito/src/flowerpot/acmd.rs index 84bef3a7da..f6986032ac 100644 --- a/fighters/murabito/src/flowerpot/acmd.rs +++ b/fighters/murabito/src/flowerpot/acmd.rs @@ -12,6 +12,7 @@ unsafe extern "C" fn game_throwed(agent: &mut L2CAgentBase) { ATTACK(agent, 0, 0, Hash40::new("have"), 6.0, 70, 60, 0, 70, 3.7, 0.0, 2.5, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } + unsafe extern "C" fn effect_bound(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/ness/src/acmd/specials.rs b/fighters/ness/src/acmd/specials.rs index f80f1cf089..bf312d1700 100644 --- a/fighters/ness/src/acmd/specials.rs +++ b/fighters/ness/src/acmd/specials.rs @@ -25,7 +25,7 @@ unsafe extern "C" fn sound_specials(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specials(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -40,7 +40,7 @@ unsafe extern "C" fn game_specials (agent: &mut L2CAgentBase) { FT_MOTION_RATE(agent, 1); } -unsafe extern "C" fn game_specialairs (agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_specialairs(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 1.0); @@ -141,7 +141,7 @@ unsafe extern "C" fn game_speciallwend(agent: &mut L2CAgentBase) { let boma = agent.boma(); } -unsafe extern "C" fn effect_speciallwstart (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwstart(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -149,7 +149,7 @@ unsafe extern "C" fn effect_speciallwstart (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_speciallwend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_speciallwend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { @@ -168,7 +168,7 @@ unsafe extern "C" fn effect_speciallwend (agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn effect_specialairlwend (agent: &mut L2CAgentBase) { +unsafe extern "C" fn effect_specialairlwend(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); if is_excute(agent) { diff --git a/fighters/ness/src/pkfire/acmd.rs b/fighters/ness/src/pkfire/acmd.rs index 924b477276..8734cf4b4f 100644 --- a/fighters/ness/src/pkfire/acmd.rs +++ b/fighters/ness/src/pkfire/acmd.rs @@ -9,6 +9,7 @@ unsafe extern "C" fn game_pillar(agent: &mut L2CAgentBase) { AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.6, 0, 10, 20, 60); } } + unsafe extern "C" fn game_pillarair(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/packun/src/status/special_s.rs b/fighters/packun/src/status/special_s.rs index fbc014a7f2..7ad71a2b48 100644 --- a/fighters/packun/src/status/special_s.rs +++ b/fighters/packun/src/status/special_s.rs @@ -128,6 +128,7 @@ unsafe extern "C" fn special_s_shoot_main_loop(fighter: &mut L2CFighterCommon) - return 0.into(); } + unsafe fn special_s_shoot_helper(fighter: &mut L2CFighterCommon) { if !StatusModule::is_changing(fighter.module_accessor) { if StatusModule::is_situation_changed(fighter.module_accessor) { diff --git a/fighters/pacman/src/lib.rs b/fighters/pacman/src/lib.rs index 7186f49847..63ab91a7b9 100644 --- a/fighters/pacman/src/lib.rs +++ b/fighters/pacman/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; use smash::{ lib::{ diff --git a/fighters/peach/src/status/attack_air.rs b/fighters/peach/src/status/attack_air.rs index 2f9efdd711..5a9006f762 100644 --- a/fighters/peach/src/status/attack_air.rs +++ b/fighters/peach/src/status/attack_air.rs @@ -108,6 +108,7 @@ unsafe extern "C" fn attack_air_main_loop(fighter: &mut L2CFighterCommon) -> L2C WorkModule::set_int64(fighter.module_accessor, motion_kind as i64, *FIGHTER_STATUS_ATTACK_AIR_WORK_INT_MOTION_KIND); 0.into() } + pub fn install(agent: &mut Agent) { agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_init); agent.status(Exec, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_exec); diff --git a/fighters/peach/src/status/jump_aerial.rs b/fighters/peach/src/status/jump_aerial.rs index 6abce36383..8586333d22 100644 --- a/fighters/peach/src/status/jump_aerial.rs +++ b/fighters/peach/src/status/jump_aerial.rs @@ -57,6 +57,7 @@ unsafe extern "C" fn jump_aerial_main_loop(fighter: &mut L2CFighterCommon) -> L2 } fighter.status_JumpAerial_Main() } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_pre); agent.status(Main, *FIGHTER_STATUS_KIND_JUMP_AERIAL, jump_aerial_main); diff --git a/fighters/peach/src/status/special_lw.rs b/fighters/peach/src/status/special_lw.rs index b7651b5b6b..1393cd0985 100644 --- a/fighters/peach/src/status/special_lw.rs +++ b/fighters/peach/src/status/special_lw.rs @@ -72,6 +72,7 @@ unsafe extern "C" fn special_lw_end(fighter: &mut L2CFighterCommon) -> L2CValue } 0.into() } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_pre); agent.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_LW, special_lw_main); diff --git a/fighters/pfushigisou/src/opff.rs b/fighters/pfushigisou/src/opff.rs index 05f2de0c39..3e0cab4074 100644 --- a/fighters/pfushigisou/src/opff.rs +++ b/fighters/pfushigisou/src/opff.rs @@ -70,6 +70,7 @@ pub unsafe fn pfushigisou_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, pfushigisou_frame_wrapper); } diff --git a/fighters/pickel/src/lib.rs b/fighters/pickel/src/lib.rs index 32efc6c7be..910e6f4a22 100644 --- a/fighters/pickel/src/lib.rs +++ b/fighters/pickel/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/pikmin/src/status/attack_air.rs b/fighters/pikmin/src/status/attack_air.rs index b359a8e4bf..0f27aaf89e 100644 --- a/fighters/pikmin/src/status/attack_air.rs +++ b/fighters/pikmin/src/status/attack_air.rs @@ -164,6 +164,7 @@ unsafe extern "C" fn link_event_store_l2c_table(fighter: &mut L2CFighterCommon, deleter(link_event); ret } + pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, attack_air_main); } diff --git a/fighters/pit/src/opff.rs b/fighters/pit/src/opff.rs index de97612dd6..d7436988c8 100644 --- a/fighters/pit/src/opff.rs +++ b/fighters/pit/src/opff.rs @@ -97,6 +97,7 @@ pub unsafe fn pit_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, pit_frame_wrapper); } diff --git a/fighters/pzenigame/src/opff.rs b/fighters/pzenigame/src/opff.rs index 9a0ea868f3..bd67a8c201 100644 --- a/fighters/pzenigame/src/opff.rs +++ b/fighters/pzenigame/src/opff.rs @@ -100,6 +100,7 @@ pub extern "C" fn pzenigame_frame_wrapper(fighter: &mut smash::lua2cpp::L2CFight pzenigame_frame(fighter) } } + pub unsafe fn pzenigame_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { if let Some(info) = FrameInfo::update_and_get(fighter) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); diff --git a/fighters/richter/src/acmd/other.rs b/fighters/richter/src/acmd/other.rs index 6fc8b9b99f..3c3acb5d87 100644 --- a/fighters/richter/src/acmd/other.rs +++ b/fighters/richter/src/acmd/other.rs @@ -123,6 +123,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } + } unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { @@ -147,6 +148,7 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { if is_excute(fighter) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } + } unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { diff --git a/fighters/richter/src/acmd/throws.rs b/fighters/richter/src/acmd/throws.rs index 154268eb1f..d852416833 100644 --- a/fighters/richter/src/acmd/throws.rs +++ b/fighters/richter/src/acmd/throws.rs @@ -24,6 +24,7 @@ unsafe extern "C" fn richter_catch_game(fighter: &mut L2CAgentBase) { WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } + } unsafe extern "C" fn richter_catch_dash_game(agent: &mut L2CAgentBase) { diff --git a/fighters/rockman/src/lib.rs b/fighters/rockman/src/lib.rs index c3c9a26375..df90f11811 100644 --- a/fighters/rockman/src/lib.rs +++ b/fighters/rockman/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/rockman/src/opff.rs b/fighters/rockman/src/opff.rs index 35d3577760..d3539f2e00 100644 --- a/fighters/rockman/src/opff.rs +++ b/fighters/rockman/src/opff.rs @@ -131,6 +131,7 @@ pub unsafe fn rockman_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, rockman_frame_wrapper); } diff --git a/fighters/roy/src/acmd/aerials.rs b/fighters/roy/src/acmd/aerials.rs index d9d2aa7dbe..3349fdbb82 100644 --- a/fighters/roy/src/acmd/aerials.rs +++ b/fighters/roy/src/acmd/aerials.rs @@ -336,7 +336,6 @@ unsafe extern "C" fn expression_attackairlw(agent: &mut L2CAgentBase) { } } - pub fn install(agent: &mut Agent) { agent.acmd("game_attackairn", game_attackairn); agent.acmd("effect_attackairn", effect_attackairn); diff --git a/fighters/roy/src/opff.rs b/fighters/roy/src/opff.rs index 6ebfa31b1a..edf908dfeb 100644 --- a/fighters/roy/src/opff.rs +++ b/fighters/roy/src/opff.rs @@ -15,7 +15,6 @@ pub unsafe fn double_edge_dance_vertical_momentum(boma: &mut BattleObjectModuleA } } - pub unsafe fn double_edge_dance_during_hitlag(fighter: &mut L2CFighterCommon) { if !fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_SPECIAL_S, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S2, *FIGHTER_ROY_STATUS_KIND_SPECIAL_S3]) { return; @@ -136,6 +135,7 @@ pub unsafe fn roy_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, roy_frame_wrapper); } diff --git a/fighters/ryu/src/status/finals.rs b/fighters/ryu/src/status/finals.rs index e7cba91312..8a54a4f330 100644 --- a/fighters/ryu/src/status/finals.rs +++ b/fighters/ryu/src/status/finals.rs @@ -41,6 +41,7 @@ pub unsafe extern "C" fn final2_pre(fighter: &mut L2CFighterCommon) -> L2CValue MeterModule::drain_direct(fighter.battle_object, meter_amount); ret } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_FINAL, final_pre); agent.status(Pre, *FIGHTER_RYU_STATUS_KIND_FINAL2, final2_pre); diff --git a/fighters/samusd/src/cshot/acmd.rs b/fighters/samusd/src/cshot/acmd.rs index 634f921d1c..4baaa2a47d 100644 --- a/fighters/samusd/src/cshot/acmd.rs +++ b/fighters/samusd/src/cshot/acmd.rs @@ -10,7 +10,7 @@ unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn sound_shoot (agent: &mut L2CAgentBase) { +unsafe extern "C" fn sound_shoot(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 0.0); diff --git a/fighters/shizue/src/opff.rs b/fighters/shizue/src/opff.rs index f3de04682d..052f60a9fc 100644 --- a/fighters/shizue/src/opff.rs +++ b/fighters/shizue/src/opff.rs @@ -54,8 +54,6 @@ unsafe fn fuel_indicators(fighter: &mut smash::lua2cpp::L2CFighterCommon) { } } - - //Cancel aerials on hit into Balloon Trip unsafe fn balloon_special_cancel(fighter: &mut L2CFighterCommon) { let boma = fighter.boma(); diff --git a/fighters/shulk/src/opff.rs b/fighters/shulk/src/opff.rs index 24bde763c6..781b4e8e66 100644 --- a/fighters/shulk/src/opff.rs +++ b/fighters/shulk/src/opff.rs @@ -3,7 +3,6 @@ utils::import_noreturn!(common::opff::fighter_common_opff); use super::*; use globals::*; - // Fixes weird vanilla behavior where touching ground during upB puts you into special fall for 1f before landing unsafe fn up_special_proper_landing(fighter: &mut L2CFighterCommon) { if fighter.is_status(*FIGHTER_STATUS_KIND_SPECIAL_HI) @@ -88,6 +87,7 @@ pub unsafe fn shulk_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, shulk_frame_wrapper); } diff --git a/fighters/simon/src/acmd/smashes.rs b/fighters/simon/src/acmd/smashes.rs index 4dfbc21120..9f99a0f512 100644 --- a/fighters/simon/src/acmd/smashes.rs +++ b/fighters/simon/src/acmd/smashes.rs @@ -42,8 +42,6 @@ unsafe extern "C" fn game_attacks4hi(agent: &mut L2CAgentBase) { } } - - unsafe extern "C" fn game_attacks4lw(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/simon/src/lib.rs b/fighters/simon/src/lib.rs index f1a1650195..c0cd3e961c 100644 --- a/fighters/simon/src/lib.rs +++ b/fighters/simon/src/lib.rs @@ -4,8 +4,8 @@ pub mod acmd; -pub mod status; pub mod opff; +pub mod status; // articles diff --git a/fighters/snake/src/nikitamissile/acmd.rs b/fighters/snake/src/nikitamissile/acmd.rs index 65a252c2a8..adaabed21d 100644 --- a/fighters/snake/src/nikitamissile/acmd.rs +++ b/fighters/snake/src/nikitamissile/acmd.rs @@ -1,6 +1,5 @@ use super::*; - unsafe extern "C" fn game_fly(agent : &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); diff --git a/fighters/snake/src/status/appeal.rs b/fighters/snake/src/status/appeal.rs index a437df08f6..854e939b30 100644 --- a/fighters/snake/src/status/appeal.rs +++ b/fighters/snake/src/status/appeal.rs @@ -28,6 +28,7 @@ unsafe extern "C" fn appeal_main(fighter: &mut L2CFighterCommon) -> L2CValue { fighter.sub_shift_status_main(L2CValue::Ptr(appeal_main_loop as *const () as _)) // 0.into() } + pub unsafe fn appeal_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); @@ -82,6 +83,7 @@ unsafe extern "C" fn appeal_wait_main(fighter: &mut L2CFighterCommon) -> L2CValu fighter.sub_shift_status_main(L2CValue::Ptr(appeal_wait_main_loop as *const () as _)) // 0.into() } + pub unsafe fn appeal_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if VarModule::get_int(fighter.object(), vars::snake::instance::DTAUNT_GRENADE_WAIT_COUNT) > 0 { @@ -179,6 +181,7 @@ unsafe extern "C" fn appeal_end_main(fighter: &mut L2CFighterCommon) -> L2CValue fighter.sub_shift_status_main(L2CValue::Ptr(appeal_end_main_loop as *const () as _)) // 0.into() } + pub unsafe fn appeal_end_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_FALL.into(), false.into()); diff --git a/fighters/snake/src/status/catch.rs b/fighters/snake/src/status/catch.rs index 7304f28837..f9007c951c 100644 --- a/fighters/snake/src/status/catch.rs +++ b/fighters/snake/src/status/catch.rs @@ -72,6 +72,7 @@ unsafe extern "C" fn catch_attack_main(fighter: &mut L2CFighterCommon) -> L2CVal fighter.sub_shift_status_main(L2CValue::Ptr(catch_attack_main_loop as *const () as _)) // 0.into() } + pub unsafe fn catch_attack_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { fighter.change_status(FIGHTER_STATUS_KIND_CATCH_CUT.into(), false.into()); @@ -151,6 +152,7 @@ unsafe extern "C" fn catch_wait_main(fighter: &mut L2CFighterCommon) -> L2CValue fighter.sub_shift_status_main(L2CValue::Ptr(catch_wait_main_loop as *const () as _)) // 0.into() } + pub unsafe fn catch_wait_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue { let entry_id = fighter.get_int(*FIGHTER_INSTANCE_WORK_ID_INT_ENTRY_ID) as usize; if StatusModule::situation_kind(fighter.module_accessor) == *SITUATION_KIND_AIR { diff --git a/fighters/sonic/src/status/dash.rs b/fighters/sonic/src/status/dash.rs index 56db1f7418..e775df4204 100644 --- a/fighters/sonic/src/status/dash.rs +++ b/fighters/sonic/src/status/dash.rs @@ -22,6 +22,7 @@ pub unsafe extern "C" fn dash_pre(fighter: &mut L2CFighterCommon) -> L2CValue { smashline::original_status(Pre, fighter, *FIGHTER_STATUS_KIND_DASH)(fighter) } + pub fn install(agent: &mut Agent) { agent.status(Pre, *FIGHTER_STATUS_KIND_DASH, dash_pre); } diff --git a/fighters/sonic/src/status/wait.rs b/fighters/sonic/src/status/wait.rs index bf16fdb2e1..7a1dec6f63 100644 --- a/fighters/sonic/src/status/wait.rs +++ b/fighters/sonic/src/status/wait.rs @@ -16,6 +16,7 @@ pub unsafe extern "C" fn wait_main(fighter: &mut L2CFighterCommon) -> L2CValue { ); fighter.sub_shift_status_main(L2CValue::Ptr(L2CFighterCommon_status_Wait_Main as *const () as _)) } + pub fn install(agent: &mut Agent) { agent.status(Main, *FIGHTER_STATUS_KIND_WAIT, wait_main); } diff --git a/fighters/tantan/src/opff.rs b/fighters/tantan/src/opff.rs index d63ab7f187..e796f31e0a 100644 --- a/fighters/tantan/src/opff.rs +++ b/fighters/tantan/src/opff.rs @@ -47,8 +47,7 @@ unsafe fn arms_switch_during_normals(boma: &mut BattleObjectModuleAccessor, cat1 } } -unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) -{ +unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) { let dragonEffect = VarModule::get_int(boma.object(),vars::tantan::instance::DRAGONIZE_R_EFFECT_HANDLE) as u32; let armType = WorkModule::get_int(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_INT_PUNCH_KIND_R); if WorkModule::is_flag(boma, *FIGHTER_TANTAN_INSTANCE_WORK_ID_FLAG_DRAGONIZE_L) { @@ -75,8 +74,8 @@ unsafe fn double_dragon(boma: &mut BattleObjectModuleAccessor) } } } -unsafe fn fsmash_effect_translation(boma: &mut BattleObjectModuleAccessor, status_kind: i32) -{ + +unsafe fn fsmash_effect_translation(boma: &mut BattleObjectModuleAccessor, status_kind: i32) { if status_kind != *FIGHTER_STATUS_KIND_ATTACK_S4 { return; } diff --git a/fighters/toonlink/src/opff.rs b/fighters/toonlink/src/opff.rs index 7d81f47172..9acf13090f 100644 --- a/fighters/toonlink/src/opff.rs +++ b/fighters/toonlink/src/opff.rs @@ -110,6 +110,7 @@ pub unsafe fn toonlink_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } + pub fn install(agent: &mut Agent) { agent.on_line(Main, toonlink_frame_wrapper); } diff --git a/fighters/wario/src/acmd/throws.rs b/fighters/wario/src/acmd/throws.rs index dae75d0900..097d984b15 100644 --- a/fighters/wario/src/acmd/throws.rs +++ b/fighters/wario/src/acmd/throws.rs @@ -172,7 +172,6 @@ unsafe extern "C" fn expression_throwf(agent: &mut L2CAgentBase) { } } - pub const THROWHI_FRAME_FALL: f32 = 48.0; pub const THROWHI_FRAME_LAND: f32 = 55.0; diff --git a/fighters/younglink/src/opff.rs b/fighters/younglink/src/opff.rs index f2e4f8cc63..e0dc656f53 100644 --- a/fighters/younglink/src/opff.rs +++ b/fighters/younglink/src/opff.rs @@ -66,6 +66,7 @@ unsafe fn sword_length(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMo let long_sword_scale = Vector3f{x: 1.0, y: 1.1, z: 1.0}; ModelModule::set_joint_scale(boma, smash::phx::Hash40::new("sword"), &long_sword_scale); } + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) From 09796eb2a53913866c1f87770a58683c9b0506ca Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 17:55:27 -0500 Subject: [PATCH 171/172] doc rebirth fix --- fighters/mariod/src/status/rebirth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fighters/mariod/src/status/rebirth.rs b/fighters/mariod/src/status/rebirth.rs index c93bf3e5ed..8a18d77d1c 100644 --- a/fighters/mariod/src/status/rebirth.rs +++ b/fighters/mariod/src/status/rebirth.rs @@ -4,7 +4,7 @@ use super::*; unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE) { - ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIO_GENERATE_ARTICLE_CAPPY, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); + ArticleModule::remove_exist(fighter.module_accessor, *FIGHTER_MARIOD_GENERATE_ARTICLE_DRCAPSULE, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); } fighter.status_end_Rebirth(); 0.into() From e176cdad9bf149d734da6623db5bedb185be697f Mon Sep 17 00:00:00 2001 From: mokl Date: Fri, 29 Mar 2024 20:33:37 -0500 Subject: [PATCH 172/172] fix snake respawn taunting --- fighters/snake/src/acmd/other.rs | 7 ++++++ fighters/snake/src/opff.rs | 10 +++++++++ fighters/snake/src/status/rebirth.rs | 32 ++++++---------------------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/fighters/snake/src/acmd/other.rs b/fighters/snake/src/acmd/other.rs index 9c8b3a6234..ed8bfb8c10 100644 --- a/fighters/snake/src/acmd/other.rs +++ b/fighters/snake/src/acmd/other.rs @@ -203,6 +203,8 @@ unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { } } +unsafe extern "C" fn stub(agent: &mut L2CAgentBase) {} + pub fn install(agent: &mut Agent) { agent.acmd("sound_damageflyhi", sound_damagefly); agent.acmd("sound_damageflylw", sound_damagefly); @@ -214,6 +216,11 @@ pub fn install(agent: &mut Agent) { agent.acmd("sound_dash", sound_dash); agent.acmd("game_turndash", game_turndash); + agent.acmd("expression_appealsr", stub); + agent.acmd("expression_appealsl", stub); + agent.acmd("expression_appealhir", stub); + agent.acmd("expression_appealhil", stub); + agent.acmd("sound_appealsr", sound_appealsr); agent.acmd("sound_appealhir", sound_appealhir); diff --git a/fighters/snake/src/opff.rs b/fighters/snake/src/opff.rs index a8df810a2a..47eafc3b36 100644 --- a/fighters/snake/src/opff.rs +++ b/fighters/snake/src/opff.rs @@ -52,6 +52,15 @@ unsafe fn fsmash_combo(boma: &mut BattleObjectModuleAccessor, status_kind: i32) } } +// freeze snake in place when using down taunt on the respawn platform +unsafe fn rebirth_box_handling(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectModuleAccessor) { + if boma.is_status(*FIGHTER_STATUS_KIND_REBIRTH) + && boma.is_motion_one_of(&[Hash40::new("appeal_lw_l"), Hash40::new("appeal_lw_r")]) + && MotionModule::frame(boma) as i32 == 37 { + MotionModule::set_rate(boma, 0.0); + } +} + unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) { if !fighter.is_in_hitlag() && !StatusModule::is_changing(fighter.module_accessor) @@ -95,6 +104,7 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod fsmash_combo(boma, status_kind); grenade_counter_reset(boma, id, status_kind); fastfall_specials(fighter); + rebirth_box_handling(fighter, boma); } /*#[weapon_frame( agent = WEAPON_KIND_SNAKE_C4 )] diff --git a/fighters/snake/src/status/rebirth.rs b/fighters/snake/src/status/rebirth.rs index 89e22899aa..dc90f1d643 100644 --- a/fighters/snake/src/status/rebirth.rs +++ b/fighters/snake/src/status/rebirth.rs @@ -3,33 +3,13 @@ use super::*; // FIGHTER_STATUS_KIND_REBIRTH unsafe extern "C" fn rebirth_end(fighter: &mut L2CFighterCommon) -> L2CValue { - let mot = MotionModule::motion_kind(fighter.module_accessor); - if [ - hash40("appeal_hi_l"), - hash40("appeal_hi_r"), - hash40("appeal_s_l"), - hash40("appeal_s_r"), - hash40("appeal_lw_l"), - hash40("appeal_lw_r") - ].contains(&mot) { - if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { - ArticleModule::remove(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); - } - } - else { - let fighta = fighter.global_table[0x2].get_ptr() as *mut Fighter; - if FighterSpecializer_Snake::is_constraint_article( - fighta, + if ArticleModule::is_exist(fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX) { + ArticleModule::shoot( + fighter.module_accessor, *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL) - ) & 1 != 0 { - ArticleModule::shoot( - fighter.module_accessor, - *FIGHTER_SNAKE_GENERATE_ARTICLE_CBOX, - ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), - false - ); - } + ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), + false + ); } fighter.status_end_Rebirth(); 0.into()